@moldable-ai/ui 0.2.18 → 0.2.20

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 (587) hide show
  1. package/dist/catalog/catalog-manifest.d.ts +6 -0
  2. package/dist/catalog/catalog-manifest.d.ts.map +1 -0
  3. package/dist/catalog/catalog-manifest.js +105 -0
  4. package/dist/catalog/catalog-types.d.ts +54 -0
  5. package/dist/catalog/catalog-types.d.ts.map +1 -0
  6. package/dist/catalog/catalog-types.js +14 -0
  7. package/dist/catalog/component-catalog.d.ts +14 -0
  8. package/dist/catalog/component-catalog.d.ts.map +1 -0
  9. package/dist/catalog/component-catalog.js +39 -0
  10. package/dist/catalog/core-catalog.d.ts +6 -0
  11. package/dist/catalog/core-catalog.d.ts.map +1 -0
  12. package/dist/catalog/core-catalog.js +105 -0
  13. package/dist/catalog/index.d.ts +5 -0
  14. package/dist/catalog/index.d.ts.map +1 -0
  15. package/dist/catalog/index.js +4 -0
  16. package/dist/components/app-error-boundary.d.ts +1 -0
  17. package/dist/components/app-error-boundary.d.ts.map +1 -1
  18. package/dist/components/app-error-boundary.js +13 -0
  19. package/dist/components/chat/chat-image-lightbox.d.ts +9 -0
  20. package/dist/components/chat/chat-image-lightbox.d.ts.map +1 -0
  21. package/dist/components/chat/chat-image-lightbox.js +9 -0
  22. package/dist/components/chat/chat-message.d.ts +19 -1
  23. package/dist/components/chat/chat-message.d.ts.map +1 -1
  24. package/dist/components/chat/chat-message.js +66 -16
  25. package/dist/components/chat/chat-messages.d.ts +5 -2
  26. package/dist/components/chat/chat-messages.d.ts.map +1 -1
  27. package/dist/components/chat/chat-messages.js +61 -6
  28. package/dist/components/chat/chat-panel.d.ts +67 -17
  29. package/dist/components/chat/chat-panel.d.ts.map +1 -1
  30. package/dist/components/chat/chat-panel.js +250 -159
  31. package/dist/components/chat/conversation-history.d.ts +39 -5
  32. package/dist/components/chat/conversation-history.d.ts.map +1 -1
  33. package/dist/components/chat/conversation-history.js +192 -26
  34. package/dist/components/chat/index.d.ts +3 -2
  35. package/dist/components/chat/index.d.ts.map +1 -1
  36. package/dist/components/chat/index.js +3 -2
  37. package/dist/components/chat/model-effort-power-effects.d.ts +7 -0
  38. package/dist/components/chat/model-effort-power-effects.d.ts.map +1 -0
  39. package/dist/components/chat/model-effort-power-effects.js +54 -0
  40. package/dist/components/chat/model-effort-selector.d.ts +26 -0
  41. package/dist/components/chat/model-effort-selector.d.ts.map +1 -0
  42. package/dist/components/chat/model-effort-selector.js +179 -0
  43. package/dist/components/chat/model-effort-ultra-effects.d.ts +5 -0
  44. package/dist/components/chat/model-effort-ultra-effects.d.ts.map +1 -0
  45. package/dist/components/chat/model-effort-ultra-effects.js +56 -0
  46. package/dist/components/chat/tool-handlers.d.ts.map +1 -1
  47. package/dist/components/chat/tool-handlers.js +40 -2
  48. package/dist/components/chat/vertical-scroll-fade.d.ts +6 -0
  49. package/dist/components/chat/vertical-scroll-fade.d.ts.map +1 -0
  50. package/dist/components/chat/vertical-scroll-fade.js +12 -0
  51. package/dist/components/hardware/bluetooth-panel-helpers.d.ts +9 -0
  52. package/dist/components/hardware/bluetooth-panel-helpers.d.ts.map +1 -0
  53. package/dist/components/hardware/bluetooth-panel-helpers.js +37 -0
  54. package/dist/components/hardware/bluetooth-panel.d.ts +56 -0
  55. package/dist/components/hardware/bluetooth-panel.d.ts.map +1 -0
  56. package/dist/components/hardware/bluetooth-panel.js +470 -0
  57. package/dist/components/hardware/camera-preview.d.ts +39 -0
  58. package/dist/components/hardware/camera-preview.d.ts.map +1 -0
  59. package/dist/components/hardware/camera-preview.js +228 -0
  60. package/dist/components/hardware/capability-badge.d.ts +23 -0
  61. package/dist/components/hardware/capability-badge.d.ts.map +1 -0
  62. package/dist/components/hardware/capability-badge.js +39 -0
  63. package/dist/components/hardware/capability-matrix.d.ts +14 -0
  64. package/dist/components/hardware/capability-matrix.d.ts.map +1 -0
  65. package/dist/components/hardware/capability-matrix.js +97 -0
  66. package/dist/components/hardware/clipboard-button.d.ts +26 -0
  67. package/dist/components/hardware/clipboard-button.d.ts.map +1 -0
  68. package/dist/components/hardware/clipboard-button.js +114 -0
  69. package/dist/components/hardware/device-io-controls.d.ts +4 -0
  70. package/dist/components/hardware/device-io-controls.d.ts.map +1 -0
  71. package/dist/components/hardware/device-io-controls.js +28 -0
  72. package/dist/components/hardware/device-list.d.ts +20 -0
  73. package/dist/components/hardware/device-list.d.ts.map +1 -0
  74. package/dist/components/hardware/device-list.js +14 -0
  75. package/dist/components/hardware/display-map.d.ts +23 -0
  76. package/dist/components/hardware/display-map.d.ts.map +1 -0
  77. package/dist/components/hardware/display-map.js +114 -0
  78. package/dist/components/hardware/haptic-button.d.ts +26 -0
  79. package/dist/components/hardware/haptic-button.d.ts.map +1 -0
  80. package/dist/components/hardware/haptic-button.js +94 -0
  81. package/dist/components/hardware/hardware-panel.d.ts +11 -0
  82. package/dist/components/hardware/hardware-panel.d.ts.map +1 -0
  83. package/dist/components/hardware/hardware-panel.js +28 -0
  84. package/dist/components/hardware/hid-panel.d.ts +40 -0
  85. package/dist/components/hardware/hid-panel.d.ts.map +1 -0
  86. package/dist/components/hardware/hid-panel.js +373 -0
  87. package/dist/components/hardware/index.d.ts +27 -0
  88. package/dist/components/hardware/index.d.ts.map +1 -0
  89. package/dist/components/hardware/index.js +26 -0
  90. package/dist/components/hardware/live-indicator.d.ts +15 -0
  91. package/dist/components/hardware/live-indicator.d.ts.map +1 -0
  92. package/dist/components/hardware/live-indicator.js +26 -0
  93. package/dist/components/hardware/local-auth-button.d.ts +33 -0
  94. package/dist/components/hardware/local-auth-button.d.ts.map +1 -0
  95. package/dist/components/hardware/local-auth-button.js +115 -0
  96. package/dist/components/hardware/location-panel.d.ts +29 -0
  97. package/dist/components/hardware/location-panel.d.ts.map +1 -0
  98. package/dist/components/hardware/location-panel.js +154 -0
  99. package/dist/components/hardware/microphone-meter.d.ts +35 -0
  100. package/dist/components/hardware/microphone-meter.d.ts.map +1 -0
  101. package/dist/components/hardware/microphone-meter.js +244 -0
  102. package/dist/components/hardware/midi-monitor.d.ts +54 -0
  103. package/dist/components/hardware/midi-monitor.d.ts.map +1 -0
  104. package/dist/components/hardware/midi-monitor.js +534 -0
  105. package/dist/components/hardware/notification-panel.d.ts +24 -0
  106. package/dist/components/hardware/notification-panel.d.ts.map +1 -0
  107. package/dist/components/hardware/notification-panel.js +124 -0
  108. package/dist/components/hardware/power-blocker-controller.d.ts +19 -0
  109. package/dist/components/hardware/power-blocker-controller.d.ts.map +1 -0
  110. package/dist/components/hardware/power-blocker-controller.js +83 -0
  111. package/dist/components/hardware/power-panel.d.ts +67 -0
  112. package/dist/components/hardware/power-panel.d.ts.map +1 -0
  113. package/dist/components/hardware/power-panel.js +309 -0
  114. package/dist/components/hardware/readout.d.ts +10 -0
  115. package/dist/components/hardware/readout.d.ts.map +1 -0
  116. package/dist/components/hardware/readout.js +11 -0
  117. package/dist/components/hardware/screen-share-preview.d.ts +36 -0
  118. package/dist/components/hardware/screen-share-preview.d.ts.map +1 -0
  119. package/dist/components/hardware/screen-share-preview.js +191 -0
  120. package/dist/components/hardware/secure-storage-panel.d.ts +36 -0
  121. package/dist/components/hardware/secure-storage-panel.d.ts.map +1 -0
  122. package/dist/components/hardware/secure-storage-panel.js +193 -0
  123. package/dist/components/hardware/serial-console.d.ts +64 -0
  124. package/dist/components/hardware/serial-console.d.ts.map +1 -0
  125. package/dist/components/hardware/serial-console.js +399 -0
  126. package/dist/components/hardware/shortcut-recorder.d.ts +35 -0
  127. package/dist/components/hardware/shortcut-recorder.d.ts.map +1 -0
  128. package/dist/components/hardware/shortcut-recorder.js +217 -0
  129. package/dist/components/hardware/stream-log.d.ts +35 -0
  130. package/dist/components/hardware/stream-log.d.ts.map +1 -0
  131. package/dist/components/hardware/stream-log.js +65 -0
  132. package/dist/components/hardware/system-audio-monitor.d.ts +34 -0
  133. package/dist/components/hardware/system-audio-monitor.d.ts.map +1 -0
  134. package/dist/components/hardware/system-audio-monitor.js +275 -0
  135. package/dist/components/hardware/usb-panel.d.ts +54 -0
  136. package/dist/components/hardware/usb-panel.d.ts.map +1 -0
  137. package/dist/components/hardware/usb-panel.js +363 -0
  138. package/dist/components/hardware/use-capability.d.ts +20 -0
  139. package/dist/components/hardware/use-capability.d.ts.map +1 -0
  140. package/dist/components/hardware/use-capability.js +61 -0
  141. package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts +9 -0
  142. package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts.map +1 -0
  143. package/dist/components/native-capabilities/bluetooth-panel-helpers.js +37 -0
  144. package/dist/components/native-capabilities/bluetooth-panel.d.ts +56 -0
  145. package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -0
  146. package/dist/components/native-capabilities/bluetooth-panel.js +470 -0
  147. package/dist/components/native-capabilities/camera-preview.d.ts +39 -0
  148. package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -0
  149. package/dist/components/native-capabilities/camera-preview.js +228 -0
  150. package/dist/components/native-capabilities/capability-badge.d.ts +23 -0
  151. package/dist/components/native-capabilities/capability-badge.d.ts.map +1 -0
  152. package/dist/components/native-capabilities/capability-badge.js +39 -0
  153. package/dist/components/native-capabilities/capability-matrix.d.ts +14 -0
  154. package/dist/components/native-capabilities/capability-matrix.d.ts.map +1 -0
  155. package/dist/components/native-capabilities/capability-matrix.js +97 -0
  156. package/dist/components/native-capabilities/clipboard-button.d.ts +26 -0
  157. package/dist/components/native-capabilities/clipboard-button.d.ts.map +1 -0
  158. package/dist/components/native-capabilities/clipboard-button.js +99 -0
  159. package/dist/components/native-capabilities/device-io-controls.d.ts +4 -0
  160. package/dist/components/native-capabilities/device-io-controls.d.ts.map +1 -0
  161. package/dist/components/native-capabilities/device-io-controls.js +28 -0
  162. package/dist/components/native-capabilities/device-list.d.ts +20 -0
  163. package/dist/components/native-capabilities/device-list.d.ts.map +1 -0
  164. package/dist/components/native-capabilities/device-list.js +14 -0
  165. package/dist/components/native-capabilities/display-map.d.ts +23 -0
  166. package/dist/components/native-capabilities/display-map.d.ts.map +1 -0
  167. package/dist/components/native-capabilities/display-map.js +114 -0
  168. package/dist/components/native-capabilities/haptic-button.d.ts +26 -0
  169. package/dist/components/native-capabilities/haptic-button.d.ts.map +1 -0
  170. package/dist/components/native-capabilities/haptic-button.js +94 -0
  171. package/dist/components/native-capabilities/hid-panel.d.ts +40 -0
  172. package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -0
  173. package/dist/components/native-capabilities/hid-panel.js +373 -0
  174. package/dist/components/native-capabilities/index.d.ts +27 -0
  175. package/dist/components/native-capabilities/index.d.ts.map +1 -0
  176. package/dist/components/native-capabilities/index.js +26 -0
  177. package/dist/components/native-capabilities/live-indicator.d.ts +15 -0
  178. package/dist/components/native-capabilities/live-indicator.d.ts.map +1 -0
  179. package/dist/components/native-capabilities/live-indicator.js +26 -0
  180. package/dist/components/native-capabilities/local-auth-button.d.ts +33 -0
  181. package/dist/components/native-capabilities/local-auth-button.d.ts.map +1 -0
  182. package/dist/components/native-capabilities/local-auth-button.js +115 -0
  183. package/dist/components/native-capabilities/location-panel.d.ts +29 -0
  184. package/dist/components/native-capabilities/location-panel.d.ts.map +1 -0
  185. package/dist/components/native-capabilities/location-panel.js +146 -0
  186. package/dist/components/native-capabilities/microphone-meter.d.ts +35 -0
  187. package/dist/components/native-capabilities/microphone-meter.d.ts.map +1 -0
  188. package/dist/components/native-capabilities/microphone-meter.js +244 -0
  189. package/dist/components/native-capabilities/midi-monitor.d.ts +54 -0
  190. package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -0
  191. package/dist/components/native-capabilities/midi-monitor.js +534 -0
  192. package/dist/components/native-capabilities/native-capability-panel.d.ts +11 -0
  193. package/dist/components/native-capabilities/native-capability-panel.d.ts.map +1 -0
  194. package/dist/components/native-capabilities/native-capability-panel.js +28 -0
  195. package/dist/components/native-capabilities/notification-panel.d.ts +24 -0
  196. package/dist/components/native-capabilities/notification-panel.d.ts.map +1 -0
  197. package/dist/components/native-capabilities/notification-panel.js +124 -0
  198. package/dist/components/native-capabilities/power-blocker-controller.d.ts +19 -0
  199. package/dist/components/native-capabilities/power-blocker-controller.d.ts.map +1 -0
  200. package/dist/components/native-capabilities/power-blocker-controller.js +83 -0
  201. package/dist/components/native-capabilities/power-panel.d.ts +67 -0
  202. package/dist/components/native-capabilities/power-panel.d.ts.map +1 -0
  203. package/dist/components/native-capabilities/power-panel.js +309 -0
  204. package/dist/components/native-capabilities/readout.d.ts +10 -0
  205. package/dist/components/native-capabilities/readout.d.ts.map +1 -0
  206. package/dist/components/native-capabilities/readout.js +11 -0
  207. package/dist/components/native-capabilities/screen-share-preview.d.ts +36 -0
  208. package/dist/components/native-capabilities/screen-share-preview.d.ts.map +1 -0
  209. package/dist/components/native-capabilities/screen-share-preview.js +191 -0
  210. package/dist/components/native-capabilities/secure-storage-panel.d.ts +36 -0
  211. package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -0
  212. package/dist/components/native-capabilities/secure-storage-panel.js +193 -0
  213. package/dist/components/native-capabilities/serial-console.d.ts +64 -0
  214. package/dist/components/native-capabilities/serial-console.d.ts.map +1 -0
  215. package/dist/components/native-capabilities/serial-console.js +399 -0
  216. package/dist/components/native-capabilities/shortcut-recorder.d.ts +35 -0
  217. package/dist/components/native-capabilities/shortcut-recorder.d.ts.map +1 -0
  218. package/dist/components/native-capabilities/shortcut-recorder.js +217 -0
  219. package/dist/components/native-capabilities/stream-log.d.ts +35 -0
  220. package/dist/components/native-capabilities/stream-log.d.ts.map +1 -0
  221. package/dist/components/native-capabilities/stream-log.js +65 -0
  222. package/dist/components/native-capabilities/system-audio-monitor.d.ts +34 -0
  223. package/dist/components/native-capabilities/system-audio-monitor.d.ts.map +1 -0
  224. package/dist/components/native-capabilities/system-audio-monitor.js +275 -0
  225. package/dist/components/native-capabilities/usb-panel.d.ts +54 -0
  226. package/dist/components/native-capabilities/usb-panel.d.ts.map +1 -0
  227. package/dist/components/native-capabilities/usb-panel.js +363 -0
  228. package/dist/components/native-capabilities/use-capability.d.ts +20 -0
  229. package/dist/components/native-capabilities/use-capability.d.ts.map +1 -0
  230. package/dist/components/native-capabilities/use-capability.js +61 -0
  231. package/dist/components/ui/app-frame.d.ts +22 -0
  232. package/dist/components/ui/app-frame.d.ts.map +1 -0
  233. package/dist/components/ui/app-frame.js +56 -0
  234. package/dist/components/ui/button-group.d.ts +1 -1
  235. package/dist/components/ui/button.js +1 -1
  236. package/dist/components/ui/color-well.d.ts +13 -0
  237. package/dist/components/ui/color-well.d.ts.map +1 -0
  238. package/dist/components/ui/color-well.js +30 -0
  239. package/dist/components/ui/date-field.d.ts +19 -0
  240. package/dist/components/ui/date-field.d.ts.map +1 -0
  241. package/dist/components/ui/date-field.js +54 -0
  242. package/dist/components/ui/edge-fade.d.ts +11 -0
  243. package/dist/components/ui/edge-fade.d.ts.map +1 -0
  244. package/dist/components/ui/edge-fade.js +41 -0
  245. package/dist/components/ui/empty.js +1 -1
  246. package/dist/components/ui/field.d.ts +1 -1
  247. package/dist/components/ui/grid.d.ts +24 -0
  248. package/dist/components/ui/grid.d.ts.map +1 -0
  249. package/dist/components/ui/grid.js +234 -0
  250. package/dist/components/ui/icon-button.d.ts +15 -0
  251. package/dist/components/ui/icon-button.d.ts.map +1 -0
  252. package/dist/components/ui/icon-button.js +15 -0
  253. package/dist/components/ui/index.d.ts +19 -0
  254. package/dist/components/ui/index.d.ts.map +1 -1
  255. package/dist/components/ui/index.js +19 -0
  256. package/dist/components/ui/inspector.d.ts +15 -0
  257. package/dist/components/ui/inspector.d.ts.map +1 -0
  258. package/dist/components/ui/inspector.js +26 -0
  259. package/dist/components/ui/kbd.d.ts +1 -1
  260. package/dist/components/ui/list.d.ts +24 -0
  261. package/dist/components/ui/list.d.ts.map +1 -0
  262. package/dist/components/ui/list.js +224 -0
  263. package/dist/components/ui/message-scroller-layout-stability.d.ts +33 -0
  264. package/dist/components/ui/message-scroller-layout-stability.d.ts.map +1 -0
  265. package/dist/components/ui/message-scroller-layout-stability.js +153 -0
  266. package/dist/components/ui/message-scroller.d.ts +11 -0
  267. package/dist/components/ui/message-scroller.d.ts.map +1 -0
  268. package/dist/components/ui/message-scroller.js +37 -0
  269. package/dist/components/ui/notification-dot.d.ts +4 -0
  270. package/dist/components/ui/notification-dot.d.ts.map +1 -0
  271. package/dist/components/ui/notification-dot.js +7 -0
  272. package/dist/components/ui/number-input.d.ts +16 -0
  273. package/dist/components/ui/number-input.d.ts.map +1 -0
  274. package/dist/components/ui/number-input.js +56 -0
  275. package/dist/components/ui/panel.d.ts +18 -0
  276. package/dist/components/ui/panel.d.ts.map +1 -0
  277. package/dist/components/ui/panel.js +40 -0
  278. package/dist/components/ui/popover.js +1 -1
  279. package/dist/components/ui/search-field.d.ts +19 -0
  280. package/dist/components/ui/search-field.d.ts.map +1 -0
  281. package/dist/components/ui/search-field.js +64 -0
  282. package/dist/components/ui/segmented-control.d.ts +21 -0
  283. package/dist/components/ui/segmented-control.d.ts.map +1 -0
  284. package/dist/components/ui/segmented-control.js +61 -0
  285. package/dist/components/ui/sidebar.js +1 -1
  286. package/dist/components/ui/slider.d.ts +4 -1
  287. package/dist/components/ui/slider.d.ts.map +1 -1
  288. package/dist/components/ui/slider.js +2 -2
  289. package/dist/components/ui/sonner.d.ts +4 -3
  290. package/dist/components/ui/sonner.d.ts.map +1 -1
  291. package/dist/components/ui/sonner.js +7 -6
  292. package/dist/components/ui/split-view.d.ts +11 -0
  293. package/dist/components/ui/split-view.d.ts.map +1 -0
  294. package/dist/components/ui/split-view.js +13 -0
  295. package/dist/components/ui/status.d.ts +13 -0
  296. package/dist/components/ui/status.d.ts.map +1 -0
  297. package/dist/components/ui/status.js +36 -0
  298. package/dist/components/ui/table.d.ts +11 -2
  299. package/dist/components/ui/table.d.ts.map +1 -1
  300. package/dist/components/ui/table.js +28 -6
  301. package/dist/components/ui/text.d.ts +17 -0
  302. package/dist/components/ui/text.d.ts.map +1 -0
  303. package/dist/components/ui/text.js +55 -0
  304. package/dist/components/ui/toggle.js +1 -1
  305. package/dist/components/ui/toolbar.d.ts +20 -0
  306. package/dist/components/ui/toolbar.d.ts.map +1 -0
  307. package/dist/components/ui/toolbar.js +52 -0
  308. package/dist/index.d.ts +2 -0
  309. package/dist/index.d.ts.map +1 -1
  310. package/dist/index.js +4 -0
  311. package/dist/lib/frame-lifecycle.d.ts +28 -0
  312. package/dist/lib/frame-lifecycle.d.ts.map +1 -1
  313. package/dist/lib/frame-lifecycle.js +84 -0
  314. package/dist/lib/native-capabilities/access.d.ts +13 -0
  315. package/dist/lib/native-capabilities/access.d.ts.map +1 -0
  316. package/dist/lib/native-capabilities/access.js +53 -0
  317. package/dist/lib/native-capabilities/bluetooth-access.d.ts +14 -0
  318. package/dist/lib/native-capabilities/bluetooth-access.d.ts.map +1 -0
  319. package/dist/lib/native-capabilities/bluetooth-access.js +43 -0
  320. package/dist/lib/native-capabilities/bluetooth-connection.d.ts +19 -0
  321. package/dist/lib/native-capabilities/bluetooth-connection.d.ts.map +1 -0
  322. package/dist/lib/native-capabilities/bluetooth-connection.js +88 -0
  323. package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +7 -0
  324. package/dist/lib/native-capabilities/bluetooth-gatt.d.ts.map +1 -0
  325. package/dist/lib/native-capabilities/bluetooth-gatt.js +77 -0
  326. package/dist/lib/native-capabilities/bluetooth-internal.d.ts +10 -0
  327. package/dist/lib/native-capabilities/bluetooth-internal.d.ts.map +1 -0
  328. package/dist/lib/native-capabilities/bluetooth-internal.js +105 -0
  329. package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +33 -0
  330. package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts.map +1 -0
  331. package/dist/lib/native-capabilities/bluetooth-native-fallback.js +214 -0
  332. package/dist/lib/native-capabilities/bluetooth-types.d.ts +85 -0
  333. package/dist/lib/native-capabilities/bluetooth-types.d.ts.map +1 -0
  334. package/dist/lib/native-capabilities/bluetooth-types.js +2 -0
  335. package/dist/lib/native-capabilities/bluetooth.d.ts +7 -0
  336. package/dist/lib/native-capabilities/bluetooth.d.ts.map +1 -0
  337. package/dist/lib/native-capabilities/bluetooth.js +4 -0
  338. package/dist/lib/native-capabilities/bridge.d.ts +23 -0
  339. package/dist/lib/native-capabilities/bridge.d.ts.map +1 -0
  340. package/dist/lib/native-capabilities/bridge.js +266 -0
  341. package/dist/lib/native-capabilities/capabilities.d.ts +7 -0
  342. package/dist/lib/native-capabilities/capabilities.d.ts.map +1 -0
  343. package/dist/lib/native-capabilities/capabilities.js +95 -0
  344. package/dist/lib/native-capabilities/clipboard.d.ts +11 -0
  345. package/dist/lib/native-capabilities/clipboard.d.ts.map +1 -0
  346. package/dist/lib/native-capabilities/clipboard.js +58 -0
  347. package/dist/lib/native-capabilities/device-io-errors.d.ts +11 -0
  348. package/dist/lib/native-capabilities/device-io-errors.d.ts.map +1 -0
  349. package/dist/lib/native-capabilities/device-io-errors.js +82 -0
  350. package/dist/lib/native-capabilities/displays.d.ts +38 -0
  351. package/dist/lib/native-capabilities/displays.d.ts.map +1 -0
  352. package/dist/lib/native-capabilities/displays.js +12 -0
  353. package/dist/lib/native-capabilities/global-shortcuts.d.ts +86 -0
  354. package/dist/lib/native-capabilities/global-shortcuts.d.ts.map +1 -0
  355. package/dist/lib/native-capabilities/global-shortcuts.js +351 -0
  356. package/dist/lib/native-capabilities/haptics.d.ts +25 -0
  357. package/dist/lib/native-capabilities/haptics.d.ts.map +1 -0
  358. package/dist/lib/native-capabilities/haptics.js +18 -0
  359. package/dist/lib/native-capabilities/hid-native.d.ts +26 -0
  360. package/dist/lib/native-capabilities/hid-native.d.ts.map +1 -0
  361. package/dist/lib/native-capabilities/hid-native.js +229 -0
  362. package/dist/lib/native-capabilities/hid.d.ts +52 -0
  363. package/dist/lib/native-capabilities/hid.d.ts.map +1 -0
  364. package/dist/lib/native-capabilities/hid.js +163 -0
  365. package/dist/lib/native-capabilities/index.d.ts +40 -0
  366. package/dist/lib/native-capabilities/index.d.ts.map +1 -0
  367. package/dist/lib/native-capabilities/index.js +21 -0
  368. package/dist/lib/native-capabilities/local-authentication.d.ts +32 -0
  369. package/dist/lib/native-capabilities/local-authentication.d.ts.map +1 -0
  370. package/dist/lib/native-capabilities/local-authentication.js +46 -0
  371. package/dist/lib/native-capabilities/location.d.ts +49 -0
  372. package/dist/lib/native-capabilities/location.d.ts.map +1 -0
  373. package/dist/lib/native-capabilities/location.js +114 -0
  374. package/dist/lib/native-capabilities/media-permissions.d.ts +28 -0
  375. package/dist/lib/native-capabilities/media-permissions.d.ts.map +1 -0
  376. package/dist/lib/native-capabilities/media-permissions.js +37 -0
  377. package/dist/lib/native-capabilities/media.d.ts +17 -0
  378. package/dist/lib/native-capabilities/media.d.ts.map +1 -0
  379. package/dist/lib/native-capabilities/media.js +104 -0
  380. package/dist/lib/native-capabilities/midi-access.d.ts +13 -0
  381. package/dist/lib/native-capabilities/midi-access.d.ts.map +1 -0
  382. package/dist/lib/native-capabilities/midi-access.js +68 -0
  383. package/dist/lib/native-capabilities/midi-internal.d.ts +12 -0
  384. package/dist/lib/native-capabilities/midi-internal.d.ts.map +1 -0
  385. package/dist/lib/native-capabilities/midi-internal.js +88 -0
  386. package/dist/lib/native-capabilities/midi-native-fallback.d.ts +27 -0
  387. package/dist/lib/native-capabilities/midi-native-fallback.d.ts.map +1 -0
  388. package/dist/lib/native-capabilities/midi-native-fallback.js +127 -0
  389. package/dist/lib/native-capabilities/midi-ports.d.ts +6 -0
  390. package/dist/lib/native-capabilities/midi-ports.d.ts.map +1 -0
  391. package/dist/lib/native-capabilities/midi-ports.js +115 -0
  392. package/dist/lib/native-capabilities/midi-types.d.ts +25 -0
  393. package/dist/lib/native-capabilities/midi-types.d.ts.map +1 -0
  394. package/dist/lib/native-capabilities/midi-types.js +1 -0
  395. package/dist/lib/native-capabilities/midi.d.ts +6 -0
  396. package/dist/lib/native-capabilities/midi.d.ts.map +1 -0
  397. package/dist/lib/native-capabilities/midi.js +3 -0
  398. package/dist/lib/native-capabilities/native-device-io.d.ts +28 -0
  399. package/dist/lib/native-capabilities/native-device-io.d.ts.map +1 -0
  400. package/dist/lib/native-capabilities/native-device-io.js +91 -0
  401. package/dist/lib/native-capabilities/native-device-lifecycle.d.ts +13 -0
  402. package/dist/lib/native-capabilities/native-device-lifecycle.d.ts.map +1 -0
  403. package/dist/lib/native-capabilities/native-device-lifecycle.js +40 -0
  404. package/dist/lib/native-capabilities/notifications.d.ts +38 -0
  405. package/dist/lib/native-capabilities/notifications.d.ts.map +1 -0
  406. package/dist/lib/native-capabilities/notifications.js +50 -0
  407. package/dist/lib/native-capabilities/power-session.d.ts +113 -0
  408. package/dist/lib/native-capabilities/power-session.d.ts.map +1 -0
  409. package/dist/lib/native-capabilities/power-session.js +264 -0
  410. package/dist/lib/native-capabilities/secure-storage.d.ts +36 -0
  411. package/dist/lib/native-capabilities/secure-storage.d.ts.map +1 -0
  412. package/dist/lib/native-capabilities/secure-storage.js +64 -0
  413. package/dist/lib/native-capabilities/serial-native.d.ts +23 -0
  414. package/dist/lib/native-capabilities/serial-native.d.ts.map +1 -0
  415. package/dist/lib/native-capabilities/serial-native.js +181 -0
  416. package/dist/lib/native-capabilities/serial.d.ts +76 -0
  417. package/dist/lib/native-capabilities/serial.d.ts.map +1 -0
  418. package/dist/lib/native-capabilities/serial.js +215 -0
  419. package/dist/lib/native-capabilities/system-audio.d.ts +127 -0
  420. package/dist/lib/native-capabilities/system-audio.d.ts.map +1 -0
  421. package/dist/lib/native-capabilities/system-audio.js +330 -0
  422. package/dist/lib/native-capabilities/types.d.ts +62 -0
  423. package/dist/lib/native-capabilities/types.d.ts.map +1 -0
  424. package/dist/lib/native-capabilities/types.js +27 -0
  425. package/dist/lib/native-capabilities/usb-native.d.ts +39 -0
  426. package/dist/lib/native-capabilities/usb-native.d.ts.map +1 -0
  427. package/dist/lib/native-capabilities/usb-native.js +217 -0
  428. package/dist/lib/native-capabilities/usb.d.ts +85 -0
  429. package/dist/lib/native-capabilities/usb.d.ts.map +1 -0
  430. package/dist/lib/native-capabilities/usb.js +225 -0
  431. package/dist/lib/native-hardware/bluetooth-access.d.ts +14 -0
  432. package/dist/lib/native-hardware/bluetooth-access.d.ts.map +1 -0
  433. package/dist/lib/native-hardware/bluetooth-access.js +40 -0
  434. package/dist/lib/native-hardware/bluetooth-connection.d.ts +19 -0
  435. package/dist/lib/native-hardware/bluetooth-connection.d.ts.map +1 -0
  436. package/dist/lib/native-hardware/bluetooth-connection.js +88 -0
  437. package/dist/lib/native-hardware/bluetooth-gatt.d.ts +7 -0
  438. package/dist/lib/native-hardware/bluetooth-gatt.d.ts.map +1 -0
  439. package/dist/lib/native-hardware/bluetooth-gatt.js +77 -0
  440. package/dist/lib/native-hardware/bluetooth-internal.d.ts +10 -0
  441. package/dist/lib/native-hardware/bluetooth-internal.d.ts.map +1 -0
  442. package/dist/lib/native-hardware/bluetooth-internal.js +105 -0
  443. package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts +33 -0
  444. package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts.map +1 -0
  445. package/dist/lib/native-hardware/bluetooth-native-fallback.js +214 -0
  446. package/dist/lib/native-hardware/bluetooth-types.d.ts +85 -0
  447. package/dist/lib/native-hardware/bluetooth-types.d.ts.map +1 -0
  448. package/dist/lib/native-hardware/bluetooth-types.js +2 -0
  449. package/dist/lib/native-hardware/bluetooth.d.ts +7 -0
  450. package/dist/lib/native-hardware/bluetooth.d.ts.map +1 -0
  451. package/dist/lib/native-hardware/bluetooth.js +4 -0
  452. package/dist/lib/native-hardware/bridge.d.ts +23 -0
  453. package/dist/lib/native-hardware/bridge.d.ts.map +1 -0
  454. package/dist/lib/native-hardware/bridge.js +266 -0
  455. package/dist/lib/native-hardware/capabilities.d.ts +7 -0
  456. package/dist/lib/native-hardware/capabilities.d.ts.map +1 -0
  457. package/dist/lib/native-hardware/capabilities.js +95 -0
  458. package/dist/lib/native-hardware/clipboard.d.ts +11 -0
  459. package/dist/lib/native-hardware/clipboard.d.ts.map +1 -0
  460. package/dist/lib/native-hardware/clipboard.js +55 -0
  461. package/dist/lib/native-hardware/device-io-errors.d.ts +11 -0
  462. package/dist/lib/native-hardware/device-io-errors.d.ts.map +1 -0
  463. package/dist/lib/native-hardware/device-io-errors.js +82 -0
  464. package/dist/lib/native-hardware/displays.d.ts +38 -0
  465. package/dist/lib/native-hardware/displays.d.ts.map +1 -0
  466. package/dist/lib/native-hardware/displays.js +12 -0
  467. package/dist/lib/native-hardware/global-shortcuts.d.ts +86 -0
  468. package/dist/lib/native-hardware/global-shortcuts.d.ts.map +1 -0
  469. package/dist/lib/native-hardware/global-shortcuts.js +351 -0
  470. package/dist/lib/native-hardware/haptics.d.ts +25 -0
  471. package/dist/lib/native-hardware/haptics.d.ts.map +1 -0
  472. package/dist/lib/native-hardware/haptics.js +18 -0
  473. package/dist/lib/native-hardware/hid-native.d.ts +26 -0
  474. package/dist/lib/native-hardware/hid-native.d.ts.map +1 -0
  475. package/dist/lib/native-hardware/hid-native.js +229 -0
  476. package/dist/lib/native-hardware/hid.d.ts +52 -0
  477. package/dist/lib/native-hardware/hid.d.ts.map +1 -0
  478. package/dist/lib/native-hardware/hid.js +160 -0
  479. package/dist/lib/native-hardware/index.d.ts +38 -0
  480. package/dist/lib/native-hardware/index.d.ts.map +1 -0
  481. package/dist/lib/native-hardware/index.js +20 -0
  482. package/dist/lib/native-hardware/local-authentication.d.ts +32 -0
  483. package/dist/lib/native-hardware/local-authentication.d.ts.map +1 -0
  484. package/dist/lib/native-hardware/local-authentication.js +46 -0
  485. package/dist/lib/native-hardware/location.d.ts +49 -0
  486. package/dist/lib/native-hardware/location.d.ts.map +1 -0
  487. package/dist/lib/native-hardware/location.js +114 -0
  488. package/dist/lib/native-hardware/media-permissions.d.ts +28 -0
  489. package/dist/lib/native-hardware/media-permissions.d.ts.map +1 -0
  490. package/dist/lib/native-hardware/media-permissions.js +37 -0
  491. package/dist/lib/native-hardware/media.d.ts +17 -0
  492. package/dist/lib/native-hardware/media.d.ts.map +1 -0
  493. package/dist/lib/native-hardware/media.js +99 -0
  494. package/dist/lib/native-hardware/midi-access.d.ts +13 -0
  495. package/dist/lib/native-hardware/midi-access.d.ts.map +1 -0
  496. package/dist/lib/native-hardware/midi-access.js +66 -0
  497. package/dist/lib/native-hardware/midi-internal.d.ts +12 -0
  498. package/dist/lib/native-hardware/midi-internal.d.ts.map +1 -0
  499. package/dist/lib/native-hardware/midi-internal.js +88 -0
  500. package/dist/lib/native-hardware/midi-native-fallback.d.ts +27 -0
  501. package/dist/lib/native-hardware/midi-native-fallback.d.ts.map +1 -0
  502. package/dist/lib/native-hardware/midi-native-fallback.js +127 -0
  503. package/dist/lib/native-hardware/midi-ports.d.ts +6 -0
  504. package/dist/lib/native-hardware/midi-ports.d.ts.map +1 -0
  505. package/dist/lib/native-hardware/midi-ports.js +115 -0
  506. package/dist/lib/native-hardware/midi-types.d.ts +25 -0
  507. package/dist/lib/native-hardware/midi-types.d.ts.map +1 -0
  508. package/dist/lib/native-hardware/midi-types.js +1 -0
  509. package/dist/lib/native-hardware/midi.d.ts +6 -0
  510. package/dist/lib/native-hardware/midi.d.ts.map +1 -0
  511. package/dist/lib/native-hardware/midi.js +3 -0
  512. package/dist/lib/native-hardware/native-device-io.d.ts +28 -0
  513. package/dist/lib/native-hardware/native-device-io.d.ts.map +1 -0
  514. package/dist/lib/native-hardware/native-device-io.js +91 -0
  515. package/dist/lib/native-hardware/native-device-lifecycle.d.ts +13 -0
  516. package/dist/lib/native-hardware/native-device-lifecycle.d.ts.map +1 -0
  517. package/dist/lib/native-hardware/native-device-lifecycle.js +40 -0
  518. package/dist/lib/native-hardware/notifications.d.ts +38 -0
  519. package/dist/lib/native-hardware/notifications.d.ts.map +1 -0
  520. package/dist/lib/native-hardware/notifications.js +50 -0
  521. package/dist/lib/native-hardware/power-session.d.ts +113 -0
  522. package/dist/lib/native-hardware/power-session.d.ts.map +1 -0
  523. package/dist/lib/native-hardware/power-session.js +264 -0
  524. package/dist/lib/native-hardware/secure-storage.d.ts +36 -0
  525. package/dist/lib/native-hardware/secure-storage.d.ts.map +1 -0
  526. package/dist/lib/native-hardware/secure-storage.js +64 -0
  527. package/dist/lib/native-hardware/serial-native.d.ts +23 -0
  528. package/dist/lib/native-hardware/serial-native.d.ts.map +1 -0
  529. package/dist/lib/native-hardware/serial-native.js +181 -0
  530. package/dist/lib/native-hardware/serial.d.ts +76 -0
  531. package/dist/lib/native-hardware/serial.d.ts.map +1 -0
  532. package/dist/lib/native-hardware/serial.js +212 -0
  533. package/dist/lib/native-hardware/system-audio.d.ts +127 -0
  534. package/dist/lib/native-hardware/system-audio.d.ts.map +1 -0
  535. package/dist/lib/native-hardware/system-audio.js +330 -0
  536. package/dist/lib/native-hardware/types.d.ts +62 -0
  537. package/dist/lib/native-hardware/types.d.ts.map +1 -0
  538. package/dist/lib/native-hardware/types.js +27 -0
  539. package/dist/lib/native-hardware/usb-native.d.ts +39 -0
  540. package/dist/lib/native-hardware/usb-native.d.ts.map +1 -0
  541. package/dist/lib/native-hardware/usb-native.js +217 -0
  542. package/dist/lib/native-hardware/usb.d.ts +85 -0
  543. package/dist/lib/native-hardware/usb.d.ts.map +1 -0
  544. package/dist/lib/native-hardware/usb.js +222 -0
  545. package/docs/README.md +37 -0
  546. package/docs/accessibility.md +32 -0
  547. package/docs/app-anatomy.md +72 -0
  548. package/docs/component-catalog.md +59 -0
  549. package/docs/component-guide-template.md +37 -0
  550. package/docs/design-tokens.md +172 -0
  551. package/docs/foundations.md +56 -0
  552. package/docs/native-integration.md +33 -0
  553. package/docs/standalone-app-windows.md +128 -0
  554. package/package.json +9 -3
  555. package/src/components/ui/alert.md +55 -0
  556. package/src/components/ui/app-frame.md +33 -0
  557. package/src/components/ui/badge.md +57 -0
  558. package/src/components/ui/button.md +76 -0
  559. package/src/components/ui/color-well.md +11 -0
  560. package/src/components/ui/combobox.md +43 -0
  561. package/src/components/ui/date-field.md +32 -0
  562. package/src/components/ui/edge-fade.md +7 -0
  563. package/src/components/ui/empty.md +82 -0
  564. package/src/components/ui/field.md +77 -0
  565. package/src/components/ui/grid.md +105 -0
  566. package/src/components/ui/icon-button.md +36 -0
  567. package/src/components/ui/inspector.md +11 -0
  568. package/src/components/ui/item.md +87 -0
  569. package/src/components/ui/list.md +107 -0
  570. package/src/components/ui/notification-dot.md +7 -0
  571. package/src/components/ui/number-input.md +19 -0
  572. package/src/components/ui/panel.md +11 -0
  573. package/src/components/ui/resizable.md +66 -0
  574. package/src/components/ui/scroll-area.md +68 -0
  575. package/src/components/ui/search-field.md +33 -0
  576. package/src/components/ui/segmented-control.md +39 -0
  577. package/src/components/ui/sidebar.md +113 -0
  578. package/src/components/ui/sonner.md +37 -0
  579. package/src/components/ui/split-view.md +15 -0
  580. package/src/components/ui/status.md +12 -0
  581. package/src/components/ui/table.md +35 -0
  582. package/src/components/ui/tabs.md +66 -0
  583. package/src/components/ui/text.md +17 -0
  584. package/src/components/ui/toggle-group.md +80 -0
  585. package/src/components/ui/toggle.md +73 -0
  586. package/src/components/ui/toolbar.md +21 -0
  587. package/src/styles/index.css +868 -3
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ type ListSelectionMode = 'none' | 'single' | 'multiple';
3
+ type ListProps = Omit<React.ComponentProps<'div'>, 'defaultValue' | 'onChange'> & {
4
+ selectionMode?: ListSelectionMode;
5
+ selectedValues?: Iterable<string>;
6
+ defaultSelectedValues?: Iterable<string>;
7
+ onSelectionChange?: (values: ReadonlySet<string>) => void;
8
+ onAction?: (value: string) => void;
9
+ orientation?: 'horizontal' | 'vertical';
10
+ loop?: boolean;
11
+ disabled?: boolean;
12
+ };
13
+ declare function List({ className, children, selectionMode, selectedValues, defaultSelectedValues, onSelectionChange, onAction, orientation, loop, disabled, role, onKeyDown, ref, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
14
+ type ListItemProps = Omit<React.ComponentProps<'div'>, 'value'> & {
15
+ value: string;
16
+ disabled?: boolean;
17
+ };
18
+ declare function ListItem({ className, children, value, disabled, onClick, onDoubleClick, onFocus, ref, role, ...props }: ListItemProps): import("react/jsx-runtime").JSX.Element;
19
+ declare function ListItemContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
20
+ declare function ListItemTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
21
+ declare function ListItemDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
22
+ declare function ListItemActions({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
23
+ export { List, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemTitle, type ListProps, type ListSelectionMode, };
24
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/ui/list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAA;AAmDvD,KAAK,SAAS,GAAG,IAAI,CACnB,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,cAAc,GAAG,UAAU,CAC5B,GAAG;IACF,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC,cAAc,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IACjC,qBAAqB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IACxC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IACzD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,QAAQ,EACR,aAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,WAAwB,EACxB,IAAY,EACZ,QAAgB,EAChB,IAAI,EACJ,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,2CAsMX;AAED,KAAK,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IAChE,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,OAAO,EACP,aAAa,EACb,OAAO,EACP,GAAG,EACH,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,aAAa,2CAmFf;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAQ3B;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,KAAK,SAAS,EACd,KAAK,iBAAiB,GACvB,CAAA"}
@@ -0,0 +1,224 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { cn } from '../../lib/utils';
5
+ const ListContext = React.createContext(null);
6
+ function useListContext(component) {
7
+ const context = React.useContext(ListContext);
8
+ if (!context) {
9
+ throw new Error(`${component} must be used inside List`);
10
+ }
11
+ return context;
12
+ }
13
+ function toSelection(values) {
14
+ return new Set(values ?? []);
15
+ }
16
+ function sameSelection(a, b) {
17
+ if (a.size !== b.size)
18
+ return false;
19
+ for (const value of a) {
20
+ if (!b.has(value))
21
+ return false;
22
+ }
23
+ return true;
24
+ }
25
+ function isInteractiveDescendant(target, currentTarget) {
26
+ if (!(target instanceof HTMLElement) || target === currentTarget)
27
+ return false;
28
+ return Boolean(target.closest('a,button,input,select,textarea,[contenteditable="true"],[role="button"],[role="link"]'));
29
+ }
30
+ function List({ className, children, selectionMode = 'none', selectedValues, defaultSelectedValues, onSelectionChange, onAction, orientation = 'vertical', loop = false, disabled = false, role, onKeyDown, ref, ...props }) {
31
+ const rootRef = React.useRef(null);
32
+ const itemsRef = React.useRef(new Map());
33
+ const [activeValue, setActiveValueState] = React.useState(null);
34
+ const [uncontrolledSelection, setUncontrolledSelection] = React.useState(() => toSelection(defaultSelectedValues));
35
+ const controlledSelection = React.useMemo(() => selectedValues === undefined ? undefined : toSelection(selectedValues), [selectedValues]);
36
+ const selection = controlledSelection ?? uncontrolledSelection;
37
+ const setRef = React.useCallback((node) => {
38
+ rootRef.current = node;
39
+ if (typeof ref === 'function')
40
+ ref(node);
41
+ else if (ref)
42
+ ref.current = node;
43
+ }, [ref]);
44
+ const registerItem = React.useCallback((value, node, itemDisabled) => {
45
+ if (!node)
46
+ return () => undefined;
47
+ itemsRef.current.set(value, { node, disabled: itemDisabled });
48
+ if (!disabled && !itemDisabled) {
49
+ setActiveValueState((current) => current ?? value);
50
+ }
51
+ return () => {
52
+ itemsRef.current.delete(value);
53
+ setActiveValueState((current) => {
54
+ if (current !== value)
55
+ return current;
56
+ return ([...itemsRef.current.entries()].find(([, item]) => !disabled && !item.disabled)?.[0] ?? null);
57
+ });
58
+ };
59
+ }, [disabled]);
60
+ const setActiveValue = React.useCallback((value) => {
61
+ const item = itemsRef.current.get(value);
62
+ if (item && !item.disabled)
63
+ setActiveValueState(value);
64
+ }, []);
65
+ const commitSelection = React.useCallback((next) => {
66
+ if (sameSelection(selection, next))
67
+ return;
68
+ if (controlledSelection === undefined)
69
+ setUncontrolledSelection(next);
70
+ onSelectionChange?.(next);
71
+ }, [controlledSelection, onSelectionChange, selection]);
72
+ const select = React.useCallback((value) => {
73
+ if (disabled || selectionMode === 'none')
74
+ return;
75
+ const item = itemsRef.current.get(value);
76
+ if (!item || item.disabled)
77
+ return;
78
+ if (selectionMode === 'single') {
79
+ commitSelection(new Set([value]));
80
+ return;
81
+ }
82
+ const next = new Set(selection);
83
+ if (next.has(value))
84
+ next.delete(value);
85
+ else
86
+ next.add(value);
87
+ commitSelection(next);
88
+ }, [commitSelection, disabled, selection, selectionMode]);
89
+ const activate = React.useCallback((value) => {
90
+ if (disabled || itemsRef.current.get(value)?.disabled)
91
+ return;
92
+ onAction?.(value);
93
+ }, [disabled, onAction]);
94
+ const moveFocus = React.useCallback((direction) => {
95
+ const items = [...itemsRef.current.entries()].filter(([, item]) => !disabled && !item.disabled);
96
+ if (items.length === 0)
97
+ return;
98
+ const currentIndex = items.findIndex(([value]) => value === activeValue);
99
+ let nextIndex = currentIndex;
100
+ if (direction === 'first')
101
+ nextIndex = 0;
102
+ if (direction === 'last')
103
+ nextIndex = items.length - 1;
104
+ if (direction === 'next') {
105
+ nextIndex = currentIndex < 0 ? 0 : currentIndex + 1;
106
+ if (nextIndex >= items.length)
107
+ nextIndex = loop ? 0 : items.length - 1;
108
+ }
109
+ if (direction === 'previous') {
110
+ nextIndex = currentIndex < 0 ? items.length - 1 : currentIndex - 1;
111
+ if (nextIndex < 0)
112
+ nextIndex = loop ? items.length - 1 : 0;
113
+ }
114
+ const [value, item] = items[nextIndex];
115
+ setActiveValueState(value);
116
+ item.node.focus();
117
+ }, [activeValue, disabled, loop]);
118
+ const handleKeyDown = (event) => {
119
+ onKeyDown?.(event);
120
+ if (event.defaultPrevented || disabled)
121
+ return;
122
+ const target = event.target;
123
+ if (target.dataset.slot !== 'list-item')
124
+ return;
125
+ const previousKey = orientation === 'vertical' ? 'ArrowUp' : 'ArrowLeft';
126
+ const nextKey = orientation === 'vertical' ? 'ArrowDown' : 'ArrowRight';
127
+ if (event.key === previousKey || event.key === nextKey) {
128
+ event.preventDefault();
129
+ moveFocus(event.key === previousKey ? 'previous' : 'next');
130
+ }
131
+ else if (event.key === 'Home' || event.key === 'End') {
132
+ event.preventDefault();
133
+ moveFocus(event.key === 'Home' ? 'first' : 'last');
134
+ }
135
+ else if (event.key === ' ') {
136
+ event.preventDefault();
137
+ if (activeValue)
138
+ select(activeValue);
139
+ }
140
+ else if (event.key === 'Enter' && activeValue) {
141
+ event.preventDefault();
142
+ if (selectionMode !== 'none')
143
+ select(activeValue);
144
+ activate(activeValue);
145
+ }
146
+ };
147
+ const context = React.useMemo(() => ({
148
+ activeValue,
149
+ disabled,
150
+ isSelected: (value) => selection.has(value),
151
+ registerItem,
152
+ select,
153
+ selectionMode,
154
+ setActiveValue,
155
+ activate,
156
+ }), [
157
+ activeValue,
158
+ activate,
159
+ disabled,
160
+ registerItem,
161
+ select,
162
+ selection,
163
+ selectionMode,
164
+ setActiveValue,
165
+ ]);
166
+ const resolvedRole = role ?? (selectionMode === 'none' ? 'list' : 'listbox');
167
+ return (_jsx(ListContext.Provider, { value: context, children: _jsx("div", { ref: setRef, role: resolvedRole, "aria-disabled": disabled || undefined, "aria-multiselectable": selectionMode === 'multiple' ? true : undefined, "aria-orientation": resolvedRole === 'listbox' ? orientation : undefined, "data-slot": "list", "data-disabled": disabled || undefined, "data-orientation": orientation, "data-selection-mode": selectionMode, className: cn('flex min-w-0 outline-none', orientation === 'vertical'
168
+ ? 'flex-col gap-0.5'
169
+ : 'flex-row items-center gap-1', className), onKeyDown: handleKeyDown, ...props, children: children }) }));
170
+ }
171
+ function ListItem({ className, children, value, disabled = false, onClick, onDoubleClick, onFocus, ref, role, ...props }) {
172
+ const context = useListContext('ListItem');
173
+ const { registerItem } = context;
174
+ const itemRef = React.useRef(null);
175
+ const isDisabled = context.disabled || disabled;
176
+ const isSelected = context.isSelected(value);
177
+ const isActive = context.activeValue === value;
178
+ const setRef = React.useCallback((node) => {
179
+ itemRef.current = node;
180
+ if (typeof ref === 'function')
181
+ ref(node);
182
+ else if (ref)
183
+ ref.current = node;
184
+ }, [ref]);
185
+ React.useLayoutEffect(() => registerItem(value, itemRef.current, isDisabled), [isDisabled, registerItem, value]);
186
+ const resolvedRole = role ?? (context.selectionMode === 'none' ? 'listitem' : 'option');
187
+ return (_jsx("div", { ref: setRef, role: resolvedRole, tabIndex: isDisabled ? -1 : isActive ? 0 : -1, "aria-disabled": isDisabled || undefined, "aria-selected": context.selectionMode === 'none' ? undefined : isSelected, "data-slot": "list-item", "data-active": isActive || undefined, "data-disabled": isDisabled || undefined, "data-selected": context.selectionMode === 'none' ? undefined : isSelected, "data-value": value, className: cn('group/list-item relative flex min-w-0 cursor-default select-none items-center gap-2 rounded-md px-2.5 py-2 text-sm outline-none transition-colors duration-100', 'hover:bg-accent/60 focus-visible:bg-accent focus-visible:ring-ring/50 focus-visible:ring-[3px]', 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground', 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', className), onClick: (event) => {
188
+ onClick?.(event);
189
+ if (event.defaultPrevented ||
190
+ isDisabled ||
191
+ isInteractiveDescendant(event.target, event.currentTarget)) {
192
+ return;
193
+ }
194
+ context.setActiveValue(value);
195
+ event.currentTarget.focus();
196
+ context.select(value);
197
+ }, onDoubleClick: (event) => {
198
+ onDoubleClick?.(event);
199
+ if (event.defaultPrevented ||
200
+ isDisabled ||
201
+ isInteractiveDescendant(event.target, event.currentTarget)) {
202
+ return;
203
+ }
204
+ context.activate(value);
205
+ }, onFocus: (event) => {
206
+ onFocus?.(event);
207
+ if (!event.defaultPrevented && !isDisabled) {
208
+ context.setActiveValue(value);
209
+ }
210
+ }, ...props, children: children }));
211
+ }
212
+ function ListItemContent({ className, ...props }) {
213
+ return (_jsx("div", { "data-slot": "list-item-content", className: cn('min-w-0 flex-1', className), ...props }));
214
+ }
215
+ function ListItemTitle({ className, ...props }) {
216
+ return (_jsx("div", { "data-slot": "list-item-title", className: cn('truncate font-medium', className), ...props }));
217
+ }
218
+ function ListItemDescription({ className, ...props }) {
219
+ return (_jsx("p", { "data-slot": "list-item-description", className: cn('text-muted-foreground truncate text-xs', className), ...props }));
220
+ }
221
+ function ListItemActions({ className, ...props }) {
222
+ return (_jsx("div", { "data-slot": "list-item-actions", className: cn('ml-auto flex shrink-0 items-center gap-1', className), ...props }));
223
+ }
224
+ export { List, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemTitle, };
@@ -0,0 +1,33 @@
1
+ import { type RefObject } from 'react';
2
+ type ScrollToEnd = (options?: {
3
+ behavior?: ScrollBehavior;
4
+ }) => boolean;
5
+ type AnchorPosition = {
6
+ element: HTMLElement;
7
+ top: number;
8
+ bottom: number;
9
+ };
10
+ export type MessageScrollerLayoutSnapshot = {
11
+ anchors: AnchorPosition[];
12
+ atEnd: boolean;
13
+ scrollHeight: number;
14
+ };
15
+ export declare function isMessageScrollerAtEnd(viewport: HTMLElement): boolean;
16
+ export declare function captureMessageScrollerLayout(viewport: HTMLElement): MessageScrollerLayoutSnapshot;
17
+ /**
18
+ * Preserve the first previously visible stable leaf when content above it
19
+ * changes height. Native scroll anchoring may already have done this; in that
20
+ * case the measured delta is zero and this is deliberately a no-op.
21
+ */
22
+ export declare function restoreMessageScrollerAnchor(viewport: HTMLElement, snapshot: MessageScrollerLayoutSnapshot): boolean;
23
+ /**
24
+ * Complements shadcn's message scroller for mutable chat rows. The upstream
25
+ * primitive handles appends, prepends, and explicit jumps well, but a nested
26
+ * disclosure shrinking inside an existing row can look like user scroll
27
+ * intent. We remember whether the viewport was following the end before the
28
+ * resize and restore that mode, or preserve a visible content leaf when the
29
+ * user is reading higher in the transcript.
30
+ */
31
+ export declare function useMessageScrollerLayoutStability(viewportRef: RefObject<HTMLElement | null>, scrollToEnd: ScrollToEnd): void;
32
+ export {};
33
+ //# sourceMappingURL=message-scroller-layout-stability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-scroller-layout-stability.d.ts","sourceRoot":"","sources":["../../../src/components/ui/message-scroller-layout-stability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAA;AAQzD,KAAK,WAAW,GAAG,CAAC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAE,KAAK,OAAO,CAAA;AAEvE,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,WAAW,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,KAAK,EAAE,OAAO,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAWD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAKrE;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,WAAW,GACpB,6BAA6B,CAoB/B;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,6BAA6B,GACtC,OAAO,CAcT;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAC1C,WAAW,EAAE,WAAW,QAqGzB"}
@@ -0,0 +1,153 @@
1
+ import { useEffect, useRef } from 'react';
2
+ const END_THRESHOLD_PX = 8;
3
+ const POSITION_EPSILON_PX = 0.5;
4
+ const USER_SCROLL_GRACE_MS = 300;
5
+ const CONTENT_ANCHOR_SELECTOR = '[data-message-scroll-anchor]';
6
+ const MESSAGE_ANCHOR_SELECTOR = '[data-message-id]';
7
+ function relativePosition(element, viewport) {
8
+ const elementRect = element.getBoundingClientRect();
9
+ const viewportRect = viewport.getBoundingClientRect();
10
+ return {
11
+ top: elementRect.top - viewportRect.top,
12
+ bottom: elementRect.bottom - viewportRect.top,
13
+ };
14
+ }
15
+ export function isMessageScrollerAtEnd(viewport) {
16
+ return (viewport.scrollHeight - viewport.scrollTop - viewport.clientHeight <=
17
+ END_THRESHOLD_PX);
18
+ }
19
+ export function captureMessageScrollerLayout(viewport) {
20
+ // Prefer stable leaves within a message. A top-level message's own top does
21
+ // not move when content collapses inside it, so it is only a fallback when
22
+ // the visible leaf itself was removed by the disclosure transition.
23
+ const contentAnchors = Array.from(viewport.querySelectorAll(CONTENT_ANCHOR_SELECTOR));
24
+ const messageAnchors = Array.from(viewport.querySelectorAll(MESSAGE_ANCHOR_SELECTOR));
25
+ const anchors = [...contentAnchors, ...messageAnchors].map((element) => ({
26
+ element,
27
+ ...relativePosition(element, viewport),
28
+ }));
29
+ return {
30
+ anchors,
31
+ atEnd: isMessageScrollerAtEnd(viewport),
32
+ scrollHeight: viewport.scrollHeight,
33
+ };
34
+ }
35
+ /**
36
+ * Preserve the first previously visible stable leaf when content above it
37
+ * changes height. Native scroll anchoring may already have done this; in that
38
+ * case the measured delta is zero and this is deliberately a no-op.
39
+ */
40
+ export function restoreMessageScrollerAnchor(viewport, snapshot) {
41
+ const anchor = snapshot.anchors.find(({ element, top, bottom }) => {
42
+ if (!element.isConnected)
43
+ return false;
44
+ const current = element.getBoundingClientRect();
45
+ return current.height > 0 && bottom > 0 && top < viewport.clientHeight;
46
+ });
47
+ if (!anchor)
48
+ return false;
49
+ const current = relativePosition(anchor.element, viewport);
50
+ const delta = current.top - anchor.top;
51
+ if (Math.abs(delta) <= POSITION_EPSILON_PX)
52
+ return false;
53
+ viewport.scrollTop += delta;
54
+ return true;
55
+ }
56
+ /**
57
+ * Complements shadcn's message scroller for mutable chat rows. The upstream
58
+ * primitive handles appends, prepends, and explicit jumps well, but a nested
59
+ * disclosure shrinking inside an existing row can look like user scroll
60
+ * intent. We remember whether the viewport was following the end before the
61
+ * resize and restore that mode, or preserve a visible content leaf when the
62
+ * user is reading higher in the transcript.
63
+ */
64
+ export function useMessageScrollerLayoutStability(viewportRef, scrollToEnd) {
65
+ const snapshotRef = useRef(null);
66
+ const followEndRef = useRef(true);
67
+ const userInteractingRef = useRef(false);
68
+ const suspendStabilityUntilRef = useRef(0);
69
+ useEffect(() => {
70
+ const viewport = viewportRef.current;
71
+ if (!viewport || typeof ResizeObserver === 'undefined')
72
+ return;
73
+ snapshotRef.current = captureMessageScrollerLayout(viewport);
74
+ followEndRef.current = snapshotRef.current.atEnd;
75
+ let frame = 0;
76
+ const suspendForUserScroll = () => {
77
+ suspendStabilityUntilRef.current = Date.now() + USER_SCROLL_GRACE_MS;
78
+ };
79
+ const isUserScrolling = () => userInteractingRef.current ||
80
+ Date.now() < suspendStabilityUntilRef.current;
81
+ const handleWheel = (event) => {
82
+ suspendForUserScroll();
83
+ if (event.deltaY < 0)
84
+ followEndRef.current = false;
85
+ snapshotRef.current = captureMessageScrollerLayout(viewport);
86
+ };
87
+ const handlePointerDown = () => {
88
+ userInteractingRef.current = true;
89
+ suspendForUserScroll();
90
+ snapshotRef.current = captureMessageScrollerLayout(viewport);
91
+ };
92
+ const handlePointerUp = () => {
93
+ userInteractingRef.current = false;
94
+ suspendForUserScroll();
95
+ };
96
+ const captureAfterIntentionalScroll = () => {
97
+ const previous = snapshotRef.current;
98
+ const heightChanged = previous &&
99
+ Math.abs(previous.scrollHeight - viewport.scrollHeight) >
100
+ POSITION_EPSILON_PX;
101
+ // A browser clamp caused by content shrinking is layout, not user intent.
102
+ // Explicit wheel or scrollbar interaction always wins over that heuristic.
103
+ if (isUserScrolling() || !heightChanged) {
104
+ if (isUserScrolling())
105
+ suspendForUserScroll();
106
+ followEndRef.current = isMessageScrollerAtEnd(viewport);
107
+ snapshotRef.current = captureMessageScrollerLayout(viewport);
108
+ }
109
+ };
110
+ const resizeObserver = new ResizeObserver(() => {
111
+ window.cancelAnimationFrame(frame);
112
+ frame = window.requestAnimationFrame(() => {
113
+ const previous = snapshotRef.current;
114
+ if (isUserScrolling()) {
115
+ snapshotRef.current = captureMessageScrollerLayout(viewport);
116
+ return;
117
+ }
118
+ if (previous) {
119
+ if (followEndRef.current) {
120
+ // Public API resets the primitive's internal mode as well as the
121
+ // DOM position after a shrink was mistaken for an upward scroll.
122
+ scrollToEnd({ behavior: 'auto' });
123
+ }
124
+ else {
125
+ restoreMessageScrollerAnchor(viewport, previous);
126
+ }
127
+ }
128
+ snapshotRef.current = captureMessageScrollerLayout(viewport);
129
+ });
130
+ });
131
+ const content = viewport.querySelector('[data-slot="message-scroller-content"]');
132
+ if (content)
133
+ resizeObserver.observe(content);
134
+ viewport.addEventListener('wheel', handleWheel, { passive: true });
135
+ viewport.addEventListener('pointerdown', handlePointerDown, {
136
+ passive: true,
137
+ });
138
+ window.addEventListener('pointerup', handlePointerUp, { passive: true });
139
+ window.addEventListener('pointercancel', handlePointerUp, { passive: true });
140
+ viewport.addEventListener('scroll', captureAfterIntentionalScroll, {
141
+ passive: true,
142
+ });
143
+ return () => {
144
+ window.cancelAnimationFrame(frame);
145
+ resizeObserver.disconnect();
146
+ viewport.removeEventListener('wheel', handleWheel);
147
+ viewport.removeEventListener('pointerdown', handlePointerDown);
148
+ window.removeEventListener('pointerup', handlePointerUp);
149
+ window.removeEventListener('pointercancel', handlePointerUp);
150
+ viewport.removeEventListener('scroll', captureAfterIntentionalScroll);
151
+ };
152
+ }, [scrollToEnd, viewportRef]);
153
+ }
@@ -0,0 +1,11 @@
1
+ import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
2
+ import * as React from 'react';
3
+ import { Button } from './button';
4
+ declare function MessageScrollerProvider(props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
5
+ declare function MessageScroller({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
6
+ declare function MessageScrollerViewport({ className, ref, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
7
+ declare function MessageScrollerContent({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
8
+ declare function MessageScrollerItem({ className, scrollAnchor, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
9
+ declare function MessageScrollerButton({ direction, className, children, render, variant, size, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Button> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>): import("react/jsx-runtime").JSX.Element;
10
+ export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
11
+ //# sourceMappingURL=message-scroller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-scroller.d.ts","sourceRoot":"","sources":["../../../src/components/ui/message-scroller.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,IAAI,wBAAwB,EAC3C,kBAAkB,EAClB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGjC,iBAAS,uBAAuB,CAC9B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,QAAQ,CAAC,2CAGtE;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,IAAI,CAAC,2CAW5D;AAED,iBAAS,uBAAuB,CAAC,EAC/B,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,QAAQ,CAAC,2CAyBhE;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,OAAO,CAAC,2CAQ/D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,YAAoB,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,IAAI,CAAC,2CAY5D;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAiB,EACjB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAqB,EACrB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,MAAM,CAAC,GAC7D,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,2CAyB9D;AAED,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,4BAA4B,GAC7B,CAAA"}
@@ -0,0 +1,37 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from '@shadcn/react/message-scroller';
4
+ import { ArrowDown } from 'lucide-react';
5
+ import * as React from 'react';
6
+ import { cn } from '../../lib/utils';
7
+ import { Button } from './button';
8
+ import { useMessageScrollerLayoutStability } from './message-scroller-layout-stability';
9
+ function MessageScrollerProvider(props) {
10
+ return _jsx(MessageScrollerPrimitive.Provider, { ...props });
11
+ }
12
+ function MessageScroller({ className, ...props }) {
13
+ return (_jsx(MessageScrollerPrimitive.Root, { "data-slot": "message-scroller", className: cn('group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden', className), ...props }));
14
+ }
15
+ function MessageScrollerViewport({ className, ref, ...props }) {
16
+ const viewportRef = React.useRef(null);
17
+ const { scrollToEnd } = useMessageScroller();
18
+ useMessageScrollerLayoutStability(viewportRef, scrollToEnd);
19
+ const setViewportRef = React.useCallback((element) => {
20
+ viewportRef.current = element;
21
+ if (typeof ref === 'function')
22
+ ref(element);
23
+ else if (ref)
24
+ ref.current = element;
25
+ }, [ref]);
26
+ return (_jsx(MessageScrollerPrimitive.Viewport, { ref: setViewportRef, "data-slot": "message-scroller-viewport", className: cn('message-scroller-viewport size-full min-h-0 min-w-0 overflow-y-auto overscroll-contain [contain:content] [scrollbar-gutter:stable]', className), ...props }));
27
+ }
28
+ function MessageScrollerContent({ className, ...props }) {
29
+ return (_jsx(MessageScrollerPrimitive.Content, { "data-slot": "message-scroller-content", className: cn('flex h-max min-h-full flex-col', className), ...props }));
30
+ }
31
+ function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
32
+ return (_jsx(MessageScrollerPrimitive.Item, { "data-slot": "message-scroller-item", scrollAnchor: scrollAnchor, className: cn('min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]', className), ...props }));
33
+ }
34
+ function MessageScrollerButton({ direction = 'end', className, children, render, variant = 'secondary', size = 'icon-sm', ...props }) {
35
+ return (_jsx(MessageScrollerPrimitive.Button, { "data-slot": "message-scroller-button", "data-direction": direction, "data-variant": variant, "data-size": size, direction: direction, className: cn('border-border bg-background text-foreground hover:bg-muted hover:text-foreground absolute left-1/2 -translate-x-1/2 cursor-pointer transition-[translate,scale,opacity] duration-200 data-[active=false]:pointer-events-none data-[direction=end]:bottom-4 data-[direction=start]:top-4 data-[active=true]:translate-y-0 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:data-[active=false]:-translate-y-full data-[active=false]:scale-95 data-[active=true]:scale-100 data-[active=false]:opacity-0 data-[active=true]:opacity-100 data-[direction=start]:[&_svg]:rotate-180', className), render: render ?? _jsx(Button, { variant: variant, size: size }), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(ArrowDown, {}), _jsx("span", { className: "sr-only", children: direction === 'end' ? 'Scroll to end' : 'Scroll to start' })] })) }));
36
+ }
37
+ export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ declare function NotificationDot({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
3
+ export { NotificationDot };
4
+ //# sourceMappingURL=notification-dot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-dot.d.ts","sourceRoot":"","sources":["../../../src/components/ui/notification-dot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAY9B;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from '../../lib/utils';
4
+ function NotificationDot({ className, ...props }) {
5
+ return (_jsx("span", { "aria-hidden": "true", "data-slot": "notification-dot", className: cn('bg-primary inline-block size-1.5 shrink-0 rounded-full', className), ...props }));
6
+ }
7
+ export { NotificationDot };
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const numberInputVariants: (props?: ({
4
+ variant?: "default" | "filled" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface NumberInputProps extends Omit<React.ComponentProps<'input'>, 'defaultValue' | 'onChange' | 'size' | 'type' | 'value'>, VariantProps<typeof numberInputVariants> {
8
+ value?: number | null;
9
+ defaultValue?: number;
10
+ onValueChange?: (value: number | null) => void;
11
+ unit?: React.ReactNode;
12
+ steppers?: boolean;
13
+ }
14
+ declare function NumberInput({ className, value, defaultValue, onValueChange, unit, steppers, variant, size, min, max, step, disabled, ...props }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
15
+ export { NumberInput, numberInputVariants };
16
+ //# sourceMappingURL=number-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/number-input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,mBAAmB;;;8EAmBxB,CAAA;AAED,MAAM,WAAW,gBACf,SAAQ,IAAI,CACR,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAC7B,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CACxD,EACD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,QAAe,EACf,OAAO,EACP,IAAI,EACJ,GAAG,EACH,GAAG,EACH,IAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAmGlB;AAED,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAA"}
@@ -0,0 +1,56 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
4
+ import * as React from 'react';
5
+ import { cn } from '../../lib/utils';
6
+ import { Button } from './button';
7
+ import { cva } from 'class-variance-authority';
8
+ const numberInputVariants = cva('border-input bg-transparent focus-within:border-ring focus-within:ring-ring/50 flex items-stretch overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px] has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-destructive/20', {
9
+ variants: {
10
+ variant: {
11
+ default: 'bg-background',
12
+ filled: 'bg-muted/60 border-transparent shadow-none',
13
+ },
14
+ size: {
15
+ sm: 'h-8',
16
+ default: 'h-9',
17
+ lg: 'h-10',
18
+ },
19
+ },
20
+ defaultVariants: {
21
+ variant: 'default',
22
+ size: 'default',
23
+ },
24
+ });
25
+ function NumberInput({ className, value, defaultValue, onValueChange, unit, steppers = true, variant, size, min, max, step = 1, disabled, ...props }) {
26
+ const controlled = value !== undefined;
27
+ const [internalValue, setInternalValue] = React.useState(defaultValue ?? null);
28
+ const currentValue = controlled ? value : internalValue;
29
+ const commitValue = React.useCallback((nextValue) => {
30
+ if (!controlled)
31
+ setInternalValue(nextValue);
32
+ onValueChange?.(nextValue);
33
+ }, [controlled, onValueChange]);
34
+ const changeByStep = React.useCallback((direction) => {
35
+ const numericStep = typeof step === 'number' ? step : Number(step);
36
+ const safeStep = Number.isFinite(numericStep) ? numericStep : 1;
37
+ const baseValue = currentValue ?? 0;
38
+ let nextValue = baseValue + safeStep * direction;
39
+ const numericMin = min === undefined ? undefined : Number(min);
40
+ const numericMax = max === undefined ? undefined : Number(max);
41
+ if (numericMin !== undefined && Number.isFinite(numericMin)) {
42
+ nextValue = Math.max(numericMin, nextValue);
43
+ }
44
+ if (numericMax !== undefined && Number.isFinite(numericMax)) {
45
+ nextValue = Math.min(numericMax, nextValue);
46
+ }
47
+ commitValue(nextValue);
48
+ }, [commitValue, currentValue, max, min, step]);
49
+ return (_jsxs("div", { "data-slot": "number-input", "data-size": size ?? 'default', "data-variant": variant ?? 'default', className: cn(numberInputVariants({ variant, size }), className), children: [_jsx("input", { "data-slot": "number-input-field", type: "number", value: currentValue ?? '', min: min, max: max, step: step, disabled: disabled, className: "placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent px-3 text-sm outline-none disabled:cursor-not-allowed", onChange: (event) => {
50
+ const nextValue = event.currentTarget.value === ''
51
+ ? null
52
+ : event.currentTarget.valueAsNumber;
53
+ commitValue(Number.isNaN(nextValue) ? null : nextValue);
54
+ }, ...props }), unit ? (_jsx("span", { "data-slot": "number-input-unit", className: "text-muted-foreground flex shrink-0 items-center pr-2 text-xs", children: unit })) : null, steppers ? (_jsxs("span", { "data-slot": "number-input-steppers", className: "border-border/70 flex w-6 shrink-0 flex-col border-l", children: [_jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", disabled: disabled, "aria-label": "Increase value", className: "h-1/2 min-h-0 w-full rounded-none border-b", onClick: () => changeByStep(1), children: _jsx(ChevronUpIcon, {}) }), _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", disabled: disabled, "aria-label": "Decrease value", className: "h-1/2 min-h-0 w-full rounded-none", onClick: () => changeByStep(-1), children: _jsx(ChevronDownIcon, {}) })] })) : null] }));
55
+ }
56
+ export { NumberInput, numberInputVariants };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const panelVariants: (props?: ({
4
+ surface?: "default" | "transparent" | "muted" | "sidebar" | null | undefined;
5
+ border?: "all" | "none" | "inline" | "block" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface PanelGroupProps extends React.ComponentProps<'div'> {
8
+ orientation?: 'horizontal' | 'vertical';
9
+ }
10
+ declare function PanelGroup({ orientation, className, ...props }: PanelGroupProps): import("react/jsx-runtime").JSX.Element;
11
+ export interface PanelProps extends React.ComponentProps<'section'>, VariantProps<typeof panelVariants> {
12
+ }
13
+ declare function Panel({ surface, border, className, ...props }: PanelProps): import("react/jsx-runtime").JSX.Element;
14
+ declare function PanelHeader({ className, ...props }: React.ComponentProps<'header'>): import("react/jsx-runtime").JSX.Element;
15
+ declare function PanelContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
16
+ declare function PanelFooter({ className, ...props }: React.ComponentProps<'footer'>): import("react/jsx-runtime").JSX.Element;
17
+ export { Panel, PanelContent, PanelFooter, PanelGroup, PanelHeader, panelVariants, };
18
+ //# sourceMappingURL=panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/panel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,aAAa;;;8EAmBjB,CAAA;AAEF,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAClE,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CACxC;AAED,iBAAS,UAAU,CAAC,EAClB,WAA0B,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,2CAajB;AAED,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EACrC,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,iBAAS,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CASlE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,2CAW3E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,2CAW3E;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,WAAW,EACX,aAAa,GACd,CAAA"}