@moldable-ai/ui 0.2.22 → 0.2.24

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 (492) hide show
  1. package/dist/catalog/catalog-coverage.d.ts +1 -1
  2. package/dist/catalog/catalog-manifest.d.ts +1 -1
  3. package/dist/catalog/catalog-manifest.js +1 -1
  4. package/dist/catalog/component-catalog.d.ts +1 -1
  5. package/dist/catalog/component-catalog.js +2 -2
  6. package/dist/catalog/core-catalog-exclusions.d.ts +1 -1
  7. package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -1
  8. package/dist/catalog/core-catalog-exclusions.js +1 -150
  9. package/dist/catalog/core-catalog.d.ts +1 -1
  10. package/dist/catalog/core-catalog.d.ts.map +1 -1
  11. package/dist/catalog/core-catalog.js +11 -7
  12. package/dist/catalog/core-collection-stories.d.ts +1 -1
  13. package/dist/catalog/core-collection-stories.d.ts.map +1 -1
  14. package/dist/catalog/core-collection-stories.js +40 -8
  15. package/dist/catalog/core-control-stories.d.ts +1 -1
  16. package/dist/catalog/core-control-stories.d.ts.map +1 -1
  17. package/dist/catalog/core-control-stories.js +48 -20
  18. package/dist/catalog/core-feedback-stories.d.ts +1 -1
  19. package/dist/catalog/core-feedback-stories.d.ts.map +1 -1
  20. package/dist/catalog/core-feedback-stories.js +89 -10
  21. package/dist/catalog/core-form-stories.d.ts +3 -0
  22. package/dist/catalog/core-form-stories.d.ts.map +1 -0
  23. package/dist/catalog/core-form-stories.js +56 -0
  24. package/dist/catalog/core-foundation-stories.d.ts +1 -1
  25. package/dist/catalog/core-foundation-stories.js +7 -7
  26. package/dist/catalog/core-layout-stories.d.ts +3 -0
  27. package/dist/catalog/core-layout-stories.d.ts.map +1 -0
  28. package/dist/catalog/core-layout-stories.js +78 -0
  29. package/dist/catalog/core-navigation-stories.d.ts +1 -1
  30. package/dist/catalog/core-navigation-stories.d.ts.map +1 -1
  31. package/dist/catalog/core-navigation-stories.js +25 -3
  32. package/dist/catalog/core-overlay-stories.d.ts +1 -1
  33. package/dist/catalog/core-overlay-stories.d.ts.map +1 -1
  34. package/dist/catalog/core-overlay-stories.js +113 -8
  35. package/dist/catalog/index.d.ts +6 -6
  36. package/dist/catalog/index.js +6 -6
  37. package/dist/components/app-error-boundary.js +2 -2
  38. package/dist/components/chat/chat-image-lightbox.js +3 -3
  39. package/dist/components/chat/chat-input.js +5 -5
  40. package/dist/components/chat/chat-message.js +17 -17
  41. package/dist/components/chat/chat-messages.d.ts +1 -1
  42. package/dist/components/chat/chat-messages.js +3 -3
  43. package/dist/components/chat/chat-panel.d.ts +6 -6
  44. package/dist/components/chat/chat-panel.d.ts.map +1 -1
  45. package/dist/components/chat/chat-panel.js +33 -33
  46. package/dist/components/chat/checkpoint-badge.js +3 -3
  47. package/dist/components/chat/conversation-history.d.ts.map +1 -1
  48. package/dist/components/chat/conversation-history.js +13 -13
  49. package/dist/components/chat/index.d.ts +20 -15
  50. package/dist/components/chat/index.d.ts.map +1 -1
  51. package/dist/components/chat/index.js +20 -15
  52. package/dist/components/chat/markdown.js +1 -1
  53. package/dist/components/chat/model-effort-selector.js +10 -10
  54. package/dist/components/chat/model-selector.js +4 -4
  55. package/dist/components/chat/reasoning-effort-selector.js +4 -4
  56. package/dist/components/chat/restore-dialog.js +3 -3
  57. package/dist/components/chat/thinking-timeline.js +2 -2
  58. package/dist/components/chat/tool-approval.d.ts +1 -1
  59. package/dist/components/chat/tool-approval.d.ts.map +1 -1
  60. package/dist/components/chat/tool-approval.js +9 -9
  61. package/dist/components/chat/tool-handlers.d.ts +2 -2
  62. package/dist/components/chat/tool-handlers.js +90 -90
  63. package/dist/components/chat/voice-orb-audio.d.ts +16 -0
  64. package/dist/components/chat/voice-orb-audio.d.ts.map +1 -0
  65. package/dist/components/chat/voice-orb-audio.js +110 -0
  66. package/dist/components/chat/voice-orb-renderer.d.ts +51 -0
  67. package/dist/components/chat/voice-orb-renderer.d.ts.map +1 -0
  68. package/dist/components/chat/voice-orb-renderer.js +410 -0
  69. package/dist/components/chat/voice-orb-shaders.d.ts +3 -0
  70. package/dist/components/chat/voice-orb-shaders.d.ts.map +1 -0
  71. package/dist/components/chat/voice-orb-shaders.js +355 -0
  72. package/dist/components/chat/voice-orb-types.d.ts +24 -0
  73. package/dist/components/chat/voice-orb-types.d.ts.map +1 -0
  74. package/dist/components/chat/voice-orb-types.js +73 -0
  75. package/dist/components/chat/voice-orb.d.ts +20 -0
  76. package/dist/components/chat/voice-orb.d.ts.map +1 -0
  77. package/dist/components/chat/voice-orb.js +67 -0
  78. package/dist/components/code-block.js +1 -1
  79. package/dist/components/hardware/bluetooth-panel.d.ts +2 -2
  80. package/dist/components/hardware/bluetooth-panel.js +10 -10
  81. package/dist/components/hardware/camera-preview.js +6 -6
  82. package/dist/components/hardware/capability-badge.d.ts +2 -2
  83. package/dist/components/hardware/capability-badge.js +2 -2
  84. package/dist/components/hardware/capability-matrix.d.ts +1 -1
  85. package/dist/components/hardware/capability-matrix.js +5 -5
  86. package/dist/components/hardware/clipboard-button.d.ts +1 -1
  87. package/dist/components/hardware/clipboard-button.js +2 -2
  88. package/dist/components/hardware/device-list.js +1 -1
  89. package/dist/components/hardware/display-map.d.ts +1 -1
  90. package/dist/components/hardware/display-map.js +7 -7
  91. package/dist/components/hardware/haptic-button.d.ts +2 -2
  92. package/dist/components/hardware/haptic-button.js +3 -3
  93. package/dist/components/hardware/hardware-panel.js +1 -1
  94. package/dist/components/hardware/hid-panel.d.ts +2 -2
  95. package/dist/components/hardware/hid-panel.js +10 -10
  96. package/dist/components/hardware/index.d.ts +26 -26
  97. package/dist/components/hardware/index.js +26 -26
  98. package/dist/components/hardware/live-indicator.js +1 -1
  99. package/dist/components/hardware/local-auth-button.d.ts +2 -2
  100. package/dist/components/hardware/local-auth-button.js +4 -4
  101. package/dist/components/hardware/location-panel.d.ts +1 -1
  102. package/dist/components/hardware/location-panel.js +6 -6
  103. package/dist/components/hardware/microphone-meter.js +7 -7
  104. package/dist/components/hardware/midi-monitor.d.ts +2 -2
  105. package/dist/components/hardware/midi-monitor.js +9 -9
  106. package/dist/components/hardware/notification-panel.d.ts +1 -1
  107. package/dist/components/hardware/notification-panel.js +8 -8
  108. package/dist/components/hardware/power-blocker-controller.d.ts +1 -1
  109. package/dist/components/hardware/power-blocker-controller.js +1 -1
  110. package/dist/components/hardware/power-panel.d.ts +1 -1
  111. package/dist/components/hardware/power-panel.js +9 -9
  112. package/dist/components/hardware/readout.js +1 -1
  113. package/dist/components/hardware/screen-share-preview.js +5 -5
  114. package/dist/components/hardware/secure-storage-panel.d.ts +1 -1
  115. package/dist/components/hardware/secure-storage-panel.js +9 -9
  116. package/dist/components/hardware/serial-console.d.ts +2 -2
  117. package/dist/components/hardware/serial-console.js +10 -10
  118. package/dist/components/hardware/shortcut-recorder.d.ts +1 -1
  119. package/dist/components/hardware/shortcut-recorder.js +4 -4
  120. package/dist/components/hardware/stream-log.js +1 -1
  121. package/dist/components/hardware/system-audio-monitor.d.ts +1 -1
  122. package/dist/components/hardware/system-audio-monitor.js +9 -9
  123. package/dist/components/hardware/usb-panel.d.ts +5 -5
  124. package/dist/components/hardware/usb-panel.js +10 -10
  125. package/dist/components/hardware/use-capability.d.ts +1 -1
  126. package/dist/components/hardware/use-capability.js +1 -1
  127. package/dist/components/markdown.js +5 -5
  128. package/dist/components/native-capabilities/bluetooth-panel.d.ts +2 -2
  129. package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -1
  130. package/dist/components/native-capabilities/bluetooth-panel.js +17 -17
  131. package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -1
  132. package/dist/components/native-capabilities/camera-preview.js +7 -7
  133. package/dist/components/native-capabilities/capability-badge.d.ts +2 -2
  134. package/dist/components/native-capabilities/capability-badge.js +4 -4
  135. package/dist/components/native-capabilities/capability-matrix.d.ts +1 -1
  136. package/dist/components/native-capabilities/capability-matrix.js +7 -7
  137. package/dist/components/native-capabilities/clipboard-button.d.ts +1 -1
  138. package/dist/components/native-capabilities/clipboard-button.js +2 -2
  139. package/dist/components/native-capabilities/device-list.js +4 -4
  140. package/dist/components/native-capabilities/display-map.d.ts +1 -1
  141. package/dist/components/native-capabilities/display-map.d.ts.map +1 -1
  142. package/dist/components/native-capabilities/display-map.js +11 -11
  143. package/dist/components/native-capabilities/haptic-button.d.ts +2 -2
  144. package/dist/components/native-capabilities/haptic-button.js +3 -3
  145. package/dist/components/native-capabilities/hid-panel.d.ts +2 -2
  146. package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -1
  147. package/dist/components/native-capabilities/hid-panel.js +14 -14
  148. package/dist/components/native-capabilities/index.d.ts +26 -26
  149. package/dist/components/native-capabilities/index.js +26 -26
  150. package/dist/components/native-capabilities/live-indicator.js +3 -3
  151. package/dist/components/native-capabilities/local-auth-button.d.ts +2 -2
  152. package/dist/components/native-capabilities/local-auth-button.js +4 -4
  153. package/dist/components/native-capabilities/location-panel.d.ts +1 -1
  154. package/dist/components/native-capabilities/location-panel.d.ts.map +1 -1
  155. package/dist/components/native-capabilities/location-panel.js +8 -8
  156. package/dist/components/native-capabilities/microphone-meter.js +9 -9
  157. package/dist/components/native-capabilities/midi-monitor.d.ts +2 -2
  158. package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -1
  159. package/dist/components/native-capabilities/midi-monitor.js +11 -11
  160. package/dist/components/native-capabilities/native-capability-panel.js +6 -6
  161. package/dist/components/native-capabilities/notification-panel.d.ts +1 -1
  162. package/dist/components/native-capabilities/notification-panel.js +9 -9
  163. package/dist/components/native-capabilities/power-blocker-controller.d.ts +1 -1
  164. package/dist/components/native-capabilities/power-blocker-controller.js +1 -1
  165. package/dist/components/native-capabilities/power-panel.d.ts +1 -1
  166. package/dist/components/native-capabilities/power-panel.d.ts.map +1 -1
  167. package/dist/components/native-capabilities/power-panel.js +12 -12
  168. package/dist/components/native-capabilities/readout.d.ts.map +1 -1
  169. package/dist/components/native-capabilities/readout.js +2 -2
  170. package/dist/components/native-capabilities/screen-share-preview.js +6 -6
  171. package/dist/components/native-capabilities/secure-storage-panel.d.ts +1 -1
  172. package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -1
  173. package/dist/components/native-capabilities/secure-storage-panel.js +11 -11
  174. package/dist/components/native-capabilities/serial-console.d.ts +2 -2
  175. package/dist/components/native-capabilities/serial-console.d.ts.map +1 -1
  176. package/dist/components/native-capabilities/serial-console.js +11 -11
  177. package/dist/components/native-capabilities/shortcut-recorder.d.ts +1 -1
  178. package/dist/components/native-capabilities/shortcut-recorder.js +5 -5
  179. package/dist/components/native-capabilities/stream-log.js +3 -3
  180. package/dist/components/native-capabilities/system-audio-monitor.d.ts +1 -1
  181. package/dist/components/native-capabilities/system-audio-monitor.js +12 -12
  182. package/dist/components/native-capabilities/usb-panel.d.ts +5 -5
  183. package/dist/components/native-capabilities/usb-panel.js +15 -15
  184. package/dist/components/native-capabilities/use-capability.d.ts +1 -1
  185. package/dist/components/native-capabilities/use-capability.js +1 -1
  186. package/dist/components/rich-media-player.js +3 -3
  187. package/dist/components/ui/accordion.js +3 -3
  188. package/dist/components/ui/alert-dialog.d.ts +2 -2
  189. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  190. package/dist/components/ui/alert-dialog.js +16 -10
  191. package/dist/components/ui/alert.d.ts +1 -1
  192. package/dist/components/ui/alert.d.ts.map +1 -1
  193. package/dist/components/ui/alert.js +11 -11
  194. package/dist/components/ui/app-frame.d.ts +7 -1
  195. package/dist/components/ui/app-frame.d.ts.map +1 -1
  196. package/dist/components/ui/app-frame.js +52 -16
  197. package/dist/components/ui/avatar.js +5 -5
  198. package/dist/components/ui/badge.d.ts +1 -1
  199. package/dist/components/ui/badge.js +4 -4
  200. package/dist/components/ui/breadcrumb.js +2 -2
  201. package/dist/components/ui/button-group.d.ts +1 -1
  202. package/dist/components/ui/button-group.js +4 -4
  203. package/dist/components/ui/button.d.ts +1 -1
  204. package/dist/components/ui/button.d.ts.map +1 -1
  205. package/dist/components/ui/button.js +16 -16
  206. package/dist/components/ui/calendar.d.ts +1 -1
  207. package/dist/components/ui/calendar.d.ts.map +1 -1
  208. package/dist/components/ui/calendar.js +15 -15
  209. package/dist/components/ui/card.js +3 -3
  210. package/dist/components/ui/carousel.d.ts +1 -1
  211. package/dist/components/ui/carousel.js +4 -4
  212. package/dist/components/ui/chart.js +5 -5
  213. package/dist/components/ui/checkbox.d.ts.map +1 -1
  214. package/dist/components/ui/checkbox.js +2 -2
  215. package/dist/components/ui/collapsible.js +3 -3
  216. package/dist/components/ui/color-well.js +2 -2
  217. package/dist/components/ui/combobox.js +9 -9
  218. package/dist/components/ui/command.d.ts +1 -1
  219. package/dist/components/ui/command.d.ts.map +1 -1
  220. package/dist/components/ui/command.js +9 -9
  221. package/dist/components/ui/confirm-dialog.d.ts +1 -1
  222. package/dist/components/ui/confirm-dialog.js +2 -2
  223. package/dist/components/ui/context-menu.d.ts +16 -5
  224. package/dist/components/ui/context-menu.d.ts.map +1 -1
  225. package/dist/components/ui/context-menu.js +92 -16
  226. package/dist/components/ui/date-field.d.ts.map +1 -1
  227. package/dist/components/ui/date-field.js +8 -8
  228. package/dist/components/ui/date-picker.d.ts +2 -2
  229. package/dist/components/ui/date-picker.js +7 -7
  230. package/dist/components/ui/dialog.d.ts +2 -2
  231. package/dist/components/ui/dialog.d.ts.map +1 -1
  232. package/dist/components/ui/dialog.js +14 -8
  233. package/dist/components/ui/drawer.js +4 -4
  234. package/dist/components/ui/dropdown-menu.d.ts +15 -5
  235. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  236. package/dist/components/ui/dropdown-menu.js +98 -16
  237. package/dist/components/ui/edge-fade.js +1 -1
  238. package/dist/components/ui/empty.d.ts +1 -1
  239. package/dist/components/ui/empty.js +5 -5
  240. package/dist/components/ui/error-boundary-view.d.ts.map +1 -1
  241. package/dist/components/ui/error-boundary-view.js +3 -3
  242. package/dist/components/ui/field.d.ts +1 -1
  243. package/dist/components/ui/field.d.ts.map +1 -1
  244. package/dist/components/ui/field.js +9 -9
  245. package/dist/components/ui/form.js +4 -4
  246. package/dist/components/ui/grid.d.ts.map +1 -1
  247. package/dist/components/ui/grid.js +5 -5
  248. package/dist/components/ui/hover-card.js +2 -2
  249. package/dist/components/ui/icon-button.d.ts +1 -1
  250. package/dist/components/ui/icon-button.js +3 -3
  251. package/dist/components/ui/index.d.ts +77 -77
  252. package/dist/components/ui/index.js +77 -77
  253. package/dist/components/ui/input-group.d.ts +2 -2
  254. package/dist/components/ui/input-group.js +14 -14
  255. package/dist/components/ui/input-otp.js +3 -3
  256. package/dist/components/ui/input.js +2 -2
  257. package/dist/components/ui/inspector.d.ts +1 -1
  258. package/dist/components/ui/inspector.js +6 -6
  259. package/dist/components/ui/item.d.ts +1 -1
  260. package/dist/components/ui/item.js +7 -7
  261. package/dist/components/ui/kbd.js +2 -2
  262. package/dist/components/ui/label.js +2 -2
  263. package/dist/components/ui/list.d.ts.map +1 -1
  264. package/dist/components/ui/list.js +5 -5
  265. package/dist/components/ui/material.js +3 -3
  266. package/dist/components/ui/menu-items.d.ts +28 -0
  267. package/dist/components/ui/menu-items.d.ts.map +1 -0
  268. package/dist/components/ui/menu-items.js +111 -0
  269. package/dist/components/ui/menubar.js +11 -11
  270. package/dist/components/ui/message-scroller-controller.d.ts +1 -1
  271. package/dist/components/ui/message-scroller-controller.js +1 -1
  272. package/dist/components/ui/message-scroller-primitive.d.ts +1 -1
  273. package/dist/components/ui/message-scroller-primitive.js +1 -1
  274. package/dist/components/ui/message-scroller.d.ts +2 -2
  275. package/dist/components/ui/message-scroller.js +3 -3
  276. package/dist/components/ui/navigation-button-group.d.ts +2 -2
  277. package/dist/components/ui/navigation-button-group.js +2 -2
  278. package/dist/components/ui/navigation-menu.js +6 -6
  279. package/dist/components/ui/notification-dot.js +2 -2
  280. package/dist/components/ui/number-input.js +8 -8
  281. package/dist/components/ui/pagination.d.ts +1 -1
  282. package/dist/components/ui/pagination.js +2 -2
  283. package/dist/components/ui/panel.d.ts +1 -1
  284. package/dist/components/ui/panel.js +3 -3
  285. package/dist/components/ui/popover.d.ts +1 -1
  286. package/dist/components/ui/popover.js +3 -3
  287. package/dist/components/ui/progress.js +2 -2
  288. package/dist/components/ui/radio-group.d.ts.map +1 -1
  289. package/dist/components/ui/radio-group.js +2 -2
  290. package/dist/components/ui/resizable.d.ts +1 -1
  291. package/dist/components/ui/resizable.d.ts.map +1 -1
  292. package/dist/components/ui/resizable.js +15 -4
  293. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  294. package/dist/components/ui/scroll-area.js +3 -3
  295. package/dist/components/ui/search-field.js +7 -7
  296. package/dist/components/ui/segmented-control.js +9 -9
  297. package/dist/components/ui/select.d.ts.map +1 -1
  298. package/dist/components/ui/select.js +6 -6
  299. package/dist/components/ui/separator.js +1 -1
  300. package/dist/components/ui/sheet.js +4 -4
  301. package/dist/components/ui/sidebar.d.ts +5 -5
  302. package/dist/components/ui/sidebar.d.ts.map +1 -1
  303. package/dist/components/ui/sidebar.js +111 -24
  304. package/dist/components/ui/skeleton.js +2 -2
  305. package/dist/components/ui/slider.d.ts +3 -1
  306. package/dist/components/ui/slider.d.ts.map +1 -1
  307. package/dist/components/ui/slider.js +3 -3
  308. package/dist/components/ui/sonner.js +1 -1
  309. package/dist/components/ui/spinner.js +1 -1
  310. package/dist/components/ui/split-view.js +1 -1
  311. package/dist/components/ui/status.d.ts +1 -1
  312. package/dist/components/ui/status.d.ts.map +1 -1
  313. package/dist/components/ui/status.js +10 -9
  314. package/dist/components/ui/switch.js +2 -2
  315. package/dist/components/ui/table.d.ts.map +1 -1
  316. package/dist/components/ui/table.js +7 -7
  317. package/dist/components/ui/tabs.js +3 -3
  318. package/dist/components/ui/text.d.ts +2 -2
  319. package/dist/components/ui/text.js +19 -19
  320. package/dist/components/ui/textarea.js +2 -2
  321. package/dist/components/ui/toggle-group.d.ts +1 -1
  322. package/dist/components/ui/toggle-group.js +4 -4
  323. package/dist/components/ui/toggle.d.ts +1 -1
  324. package/dist/components/ui/toggle.js +10 -10
  325. package/dist/components/ui/toolbar.d.ts +7 -7
  326. package/dist/components/ui/toolbar.js +7 -7
  327. package/dist/components/ui/tooltip.d.ts +2 -2
  328. package/dist/components/ui/tooltip.js +5 -5
  329. package/dist/index.d.ts +21 -20
  330. package/dist/index.d.ts.map +1 -1
  331. package/dist/index.js +21 -20
  332. package/dist/lib/frame-lifecycle.d.ts +27 -0
  333. package/dist/lib/frame-lifecycle.d.ts.map +1 -1
  334. package/dist/lib/frame-lifecycle.js +136 -0
  335. package/dist/lib/host-date-time-picker.d.ts +1 -1
  336. package/dist/lib/host-date-time-picker.js +1 -1
  337. package/dist/lib/host-file-dialog.d.ts +1 -1
  338. package/dist/lib/host-file-dialog.js +1 -1
  339. package/dist/lib/host-native-menu.d.ts +48 -7
  340. package/dist/lib/host-native-menu.d.ts.map +1 -1
  341. package/dist/lib/host-native-menu.js +56 -1
  342. package/dist/lib/host-services.js +1 -1
  343. package/dist/lib/host-share.d.ts +1 -1
  344. package/dist/lib/host-share.js +1 -1
  345. package/dist/lib/host-web-surface.d.ts +31 -0
  346. package/dist/lib/host-web-surface.d.ts.map +1 -0
  347. package/dist/lib/host-web-surface.js +116 -0
  348. package/dist/lib/native-capabilities/access.d.ts +2 -2
  349. package/dist/lib/native-capabilities/access.js +2 -2
  350. package/dist/lib/native-capabilities/bluetooth-access.d.ts +1 -1
  351. package/dist/lib/native-capabilities/bluetooth-access.js +2 -2
  352. package/dist/lib/native-capabilities/bluetooth-connection.d.ts +1 -1
  353. package/dist/lib/native-capabilities/bluetooth-connection.js +1 -1
  354. package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +1 -1
  355. package/dist/lib/native-capabilities/bluetooth-gatt.js +1 -1
  356. package/dist/lib/native-capabilities/bluetooth-internal.d.ts +2 -2
  357. package/dist/lib/native-capabilities/bluetooth-internal.js +1 -1
  358. package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +2 -2
  359. package/dist/lib/native-capabilities/bluetooth-native-fallback.js +2 -2
  360. package/dist/lib/native-capabilities/bluetooth.d.ts +6 -6
  361. package/dist/lib/native-capabilities/bluetooth.js +4 -4
  362. package/dist/lib/native-capabilities/bridge.d.ts +1 -1
  363. package/dist/lib/native-capabilities/bridge.js +2 -2
  364. package/dist/lib/native-capabilities/capabilities.d.ts +1 -1
  365. package/dist/lib/native-capabilities/capabilities.js +1 -1
  366. package/dist/lib/native-capabilities/clipboard.js +2 -2
  367. package/dist/lib/native-capabilities/device-io-errors.d.ts +1 -1
  368. package/dist/lib/native-capabilities/device-io-errors.js +1 -1
  369. package/dist/lib/native-capabilities/displays.d.ts +1 -1
  370. package/dist/lib/native-capabilities/displays.js +1 -1
  371. package/dist/lib/native-capabilities/global-shortcuts.d.ts +2 -2
  372. package/dist/lib/native-capabilities/global-shortcuts.js +1 -1
  373. package/dist/lib/native-capabilities/haptics.d.ts +1 -1
  374. package/dist/lib/native-capabilities/haptics.js +1 -1
  375. package/dist/lib/native-capabilities/hid-native.d.ts +2 -2
  376. package/dist/lib/native-capabilities/hid-native.js +3 -3
  377. package/dist/lib/native-capabilities/hid.js +5 -5
  378. package/dist/lib/native-capabilities/index.d.ts +39 -39
  379. package/dist/lib/native-capabilities/index.js +21 -21
  380. package/dist/lib/native-capabilities/local-authentication.d.ts +1 -1
  381. package/dist/lib/native-capabilities/local-authentication.js +1 -1
  382. package/dist/lib/native-capabilities/location.js +1 -1
  383. package/dist/lib/native-capabilities/media-permissions.d.ts +1 -1
  384. package/dist/lib/native-capabilities/media-permissions.js +1 -1
  385. package/dist/lib/native-capabilities/media.d.ts +1 -1
  386. package/dist/lib/native-capabilities/media.js +2 -2
  387. package/dist/lib/native-capabilities/midi-access.d.ts +1 -1
  388. package/dist/lib/native-capabilities/midi-access.js +3 -3
  389. package/dist/lib/native-capabilities/midi-internal.d.ts +1 -1
  390. package/dist/lib/native-capabilities/midi-internal.js +1 -1
  391. package/dist/lib/native-capabilities/midi-native-fallback.d.ts +1 -1
  392. package/dist/lib/native-capabilities/midi-native-fallback.js +2 -2
  393. package/dist/lib/native-capabilities/midi-ports.d.ts +1 -1
  394. package/dist/lib/native-capabilities/midi-ports.js +1 -1
  395. package/dist/lib/native-capabilities/midi.d.ts +5 -5
  396. package/dist/lib/native-capabilities/midi.js +3 -3
  397. package/dist/lib/native-capabilities/native-device-io.d.ts +1 -1
  398. package/dist/lib/native-capabilities/native-device-io.js +1 -1
  399. package/dist/lib/native-capabilities/native-device-lifecycle.js +1 -1
  400. package/dist/lib/native-capabilities/notifications.d.ts +2 -2
  401. package/dist/lib/native-capabilities/notifications.js +1 -1
  402. package/dist/lib/native-capabilities/power-session.d.ts +2 -2
  403. package/dist/lib/native-capabilities/power-session.js +1 -1
  404. package/dist/lib/native-capabilities/secure-storage.d.ts +1 -1
  405. package/dist/lib/native-capabilities/secure-storage.js +1 -1
  406. package/dist/lib/native-capabilities/serial-native.d.ts +2 -2
  407. package/dist/lib/native-capabilities/serial-native.js +3 -3
  408. package/dist/lib/native-capabilities/serial.js +5 -5
  409. package/dist/lib/native-capabilities/system-audio.d.ts +1 -1
  410. package/dist/lib/native-capabilities/system-audio.js +1 -1
  411. package/dist/lib/native-capabilities/usb-native.d.ts +2 -2
  412. package/dist/lib/native-capabilities/usb-native.js +3 -3
  413. package/dist/lib/native-capabilities/usb.js +5 -5
  414. package/dist/lib/native-hardware/bluetooth-access.d.ts +1 -1
  415. package/dist/lib/native-hardware/bluetooth-access.js +1 -1
  416. package/dist/lib/native-hardware/bluetooth-connection.d.ts +1 -1
  417. package/dist/lib/native-hardware/bluetooth-connection.js +1 -1
  418. package/dist/lib/native-hardware/bluetooth-gatt.d.ts +1 -1
  419. package/dist/lib/native-hardware/bluetooth-gatt.js +1 -1
  420. package/dist/lib/native-hardware/bluetooth-internal.d.ts +2 -2
  421. package/dist/lib/native-hardware/bluetooth-internal.js +1 -1
  422. package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts +2 -2
  423. package/dist/lib/native-hardware/bluetooth-native-fallback.js +2 -2
  424. package/dist/lib/native-hardware/bluetooth.d.ts +6 -6
  425. package/dist/lib/native-hardware/bluetooth.js +4 -4
  426. package/dist/lib/native-hardware/bridge.d.ts +1 -1
  427. package/dist/lib/native-hardware/bridge.js +2 -2
  428. package/dist/lib/native-hardware/capabilities.d.ts +1 -1
  429. package/dist/lib/native-hardware/capabilities.js +1 -1
  430. package/dist/lib/native-hardware/clipboard.js +1 -1
  431. package/dist/lib/native-hardware/device-io-errors.d.ts +1 -1
  432. package/dist/lib/native-hardware/device-io-errors.js +1 -1
  433. package/dist/lib/native-hardware/displays.d.ts +1 -1
  434. package/dist/lib/native-hardware/displays.js +1 -1
  435. package/dist/lib/native-hardware/global-shortcuts.d.ts +2 -2
  436. package/dist/lib/native-hardware/global-shortcuts.js +1 -1
  437. package/dist/lib/native-hardware/haptics.d.ts +1 -1
  438. package/dist/lib/native-hardware/haptics.js +1 -1
  439. package/dist/lib/native-hardware/hid-native.d.ts +2 -2
  440. package/dist/lib/native-hardware/hid-native.js +3 -3
  441. package/dist/lib/native-hardware/hid.js +4 -4
  442. package/dist/lib/native-hardware/index.d.ts +37 -37
  443. package/dist/lib/native-hardware/index.js +20 -20
  444. package/dist/lib/native-hardware/local-authentication.d.ts +1 -1
  445. package/dist/lib/native-hardware/local-authentication.js +1 -1
  446. package/dist/lib/native-hardware/location.js +1 -1
  447. package/dist/lib/native-hardware/media-permissions.d.ts +1 -1
  448. package/dist/lib/native-hardware/media-permissions.js +1 -1
  449. package/dist/lib/native-hardware/media.d.ts +1 -1
  450. package/dist/lib/native-hardware/media.js +1 -1
  451. package/dist/lib/native-hardware/midi-access.d.ts +1 -1
  452. package/dist/lib/native-hardware/midi-access.js +2 -2
  453. package/dist/lib/native-hardware/midi-internal.d.ts +1 -1
  454. package/dist/lib/native-hardware/midi-internal.js +1 -1
  455. package/dist/lib/native-hardware/midi-native-fallback.d.ts +1 -1
  456. package/dist/lib/native-hardware/midi-native-fallback.js +2 -2
  457. package/dist/lib/native-hardware/midi-ports.d.ts +1 -1
  458. package/dist/lib/native-hardware/midi-ports.js +1 -1
  459. package/dist/lib/native-hardware/midi.d.ts +5 -5
  460. package/dist/lib/native-hardware/midi.js +3 -3
  461. package/dist/lib/native-hardware/native-device-io.d.ts +1 -1
  462. package/dist/lib/native-hardware/native-device-io.js +1 -1
  463. package/dist/lib/native-hardware/native-device-lifecycle.js +1 -1
  464. package/dist/lib/native-hardware/notifications.d.ts +2 -2
  465. package/dist/lib/native-hardware/notifications.js +1 -1
  466. package/dist/lib/native-hardware/power-session.d.ts +2 -2
  467. package/dist/lib/native-hardware/power-session.js +1 -1
  468. package/dist/lib/native-hardware/secure-storage.d.ts +1 -1
  469. package/dist/lib/native-hardware/secure-storage.js +1 -1
  470. package/dist/lib/native-hardware/serial-native.d.ts +2 -2
  471. package/dist/lib/native-hardware/serial-native.js +3 -3
  472. package/dist/lib/native-hardware/serial.js +4 -4
  473. package/dist/lib/native-hardware/system-audio.d.ts +1 -1
  474. package/dist/lib/native-hardware/system-audio.js +1 -1
  475. package/dist/lib/native-hardware/usb-native.d.ts +2 -2
  476. package/dist/lib/native-hardware/usb-native.js +3 -3
  477. package/dist/lib/native-hardware/usb.js +4 -4
  478. package/dist/lib/theme.js +1 -1
  479. package/docs/design-tokens.md +28 -6
  480. package/docs/foundations.md +4 -2
  481. package/package.json +4 -2
  482. package/src/components/ui/confirm-dialog.md +97 -0
  483. package/src/components/ui/context-menu.md +158 -0
  484. package/src/components/ui/dropdown-menu.md +165 -0
  485. package/src/components/ui/hover-card.md +90 -0
  486. package/src/components/ui/select.md +111 -0
  487. package/src/lib/host-date-time-picker.md +29 -0
  488. package/src/lib/host-file-dialog.md +76 -0
  489. package/src/lib/host-native-menu.md +67 -0
  490. package/src/lib/host-share.md +36 -0
  491. package/src/lib/host-web-surface.md +66 -0
  492. package/src/styles/index.css +141 -68
@@ -0,0 +1,355 @@
1
+ export const voiceOrbVertexShader = `
2
+ attribute vec2 a_position;
3
+ varying vec2 v_uv;
4
+
5
+ void main() {
6
+ v_uv = (a_position + 1.0) * 0.5;
7
+ gl_Position = vec4(a_position, 0.0, 1.0);
8
+ }
9
+ `;
10
+ export const voiceOrbFragmentShader = `
11
+ precision highp float;
12
+
13
+ varying vec2 v_uv;
14
+
15
+ uniform vec2 u_resolution;
16
+ uniform float u_time;
17
+ uniform float u_micLevel;
18
+ uniform float u_outputLevel;
19
+ uniform float u_stateListen;
20
+ uniform float u_stateThink;
21
+ uniform float u_stateSpeak;
22
+ uniform float u_stateMuted;
23
+ uniform float u_stateError;
24
+ uniform float u_motionScale;
25
+ uniform vec4 u_audio;
26
+ uniform vec4 u_cumulativeAudio;
27
+
28
+ #define PI 3.141592653589793
29
+ #define NUM_OCTAVES 5
30
+
31
+ float rand(vec2 n) {
32
+ return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
33
+ }
34
+
35
+ float noise(vec2 p) {
36
+ vec2 ip = floor(p);
37
+ vec2 u = fract(p);
38
+ u = u * u * (3.0 - 2.0 * u);
39
+ float value = mix(
40
+ mix(rand(ip), rand(ip + vec2(1.0, 0.0)), u.x),
41
+ mix(rand(ip + vec2(0.0, 1.0)), rand(ip + vec2(1.0, 1.0)), u.x),
42
+ u.y
43
+ );
44
+ return value * value;
45
+ }
46
+
47
+ float fbm(vec2 point) {
48
+ float value = 0.0;
49
+ float amplitude = 0.5;
50
+ vec2 shift = vec2(100.0);
51
+ mat2 rotation = mat2(cos(0.5), sin(0.5), -sin(0.5), cos(0.5));
52
+ for (int index = 0; index < NUM_OCTAVES; index++) {
53
+ value += amplitude * noise(point);
54
+ point = rotation * point * 2.0 + shift;
55
+ amplitude *= 0.5;
56
+ }
57
+ return value;
58
+ }
59
+
60
+ vec3 blendLinearBurn(vec3 base, vec3 blend, float opacity) {
61
+ vec3 burned = max(base + blend - vec3(1.0), vec3(0.0));
62
+ return burned * opacity + base * (1.0 - opacity);
63
+ }
64
+
65
+ vec4 permute(vec4 value) {
66
+ return mod((value * 34.0 + 1.0) * value, 289.0);
67
+ }
68
+
69
+ vec4 taylorInvSqrt(vec4 value) {
70
+ return 1.79284291400159 - 0.85373472095314 * value;
71
+ }
72
+
73
+ vec3 fade(vec3 value) {
74
+ return value * value * value * (value * (value * 6.0 - 15.0) + 10.0);
75
+ }
76
+
77
+ float cnoise(vec3 point) {
78
+ vec3 cell0 = floor(point);
79
+ vec3 cell1 = cell0 + vec3(1.0);
80
+ cell0 = mod(cell0, 289.0);
81
+ cell1 = mod(cell1, 289.0);
82
+ vec3 offset0 = fract(point);
83
+ vec3 offset1 = offset0 - vec3(1.0);
84
+ vec4 x = vec4(cell0.x, cell1.x, cell0.x, cell1.x);
85
+ vec4 y = vec4(cell0.yy, cell1.yy);
86
+ vec4 z0 = vec4(cell0.z);
87
+ vec4 z1 = vec4(cell1.z);
88
+ vec4 xy = permute(permute(x) + y);
89
+ vec4 xy0 = permute(xy + z0);
90
+ vec4 xy1 = permute(xy + z1);
91
+
92
+ vec4 gx0 = xy0 / 7.0;
93
+ vec4 gy0 = fract(floor(gx0) / 7.0) - 0.5;
94
+ gx0 = fract(gx0);
95
+ vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);
96
+ vec4 sz0 = step(gz0, vec4(0.0));
97
+ gx0 -= sz0 * (step(vec4(0.0), gx0) - 0.5);
98
+ gy0 -= sz0 * (step(vec4(0.0), gy0) - 0.5);
99
+
100
+ vec4 gx1 = xy1 / 7.0;
101
+ vec4 gy1 = fract(floor(gx1) / 7.0) - 0.5;
102
+ gx1 = fract(gx1);
103
+ vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);
104
+ vec4 sz1 = step(gz1, vec4(0.0));
105
+ gx1 -= sz1 * (step(vec4(0.0), gx1) - 0.5);
106
+ gy1 -= sz1 * (step(vec4(0.0), gy1) - 0.5);
107
+
108
+ vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);
109
+ vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);
110
+ vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);
111
+ vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);
112
+ vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);
113
+ vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);
114
+ vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);
115
+ vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);
116
+
117
+ vec4 norm0 = taylorInvSqrt(
118
+ vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))
119
+ );
120
+ g000 *= norm0.x;
121
+ g010 *= norm0.y;
122
+ g100 *= norm0.z;
123
+ g110 *= norm0.w;
124
+ vec4 norm1 = taylorInvSqrt(
125
+ vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))
126
+ );
127
+ g001 *= norm1.x;
128
+ g011 *= norm1.y;
129
+ g101 *= norm1.z;
130
+ g111 *= norm1.w;
131
+
132
+ float n000 = dot(g000, offset0);
133
+ float n100 = dot(g100, vec3(offset1.x, offset0.yz));
134
+ float n010 = dot(g010, vec3(offset0.x, offset1.y, offset0.z));
135
+ float n110 = dot(g110, vec3(offset1.xy, offset0.z));
136
+ float n001 = dot(g001, vec3(offset0.xy, offset1.z));
137
+ float n101 = dot(g101, vec3(offset1.x, offset0.y, offset1.z));
138
+ float n011 = dot(g011, vec3(offset0.x, offset1.yz));
139
+ float n111 = dot(g111, offset1);
140
+
141
+ vec3 fadePoint = fade(offset0);
142
+ vec4 noiseZ = mix(
143
+ vec4(n000, n100, n010, n110),
144
+ vec4(n001, n101, n011, n111),
145
+ fadePoint.z
146
+ );
147
+ vec2 noiseYZ = mix(noiseZ.xy, noiseZ.zw, fadePoint.y);
148
+ return 2.2 * mix(noiseYZ.x, noiseYZ.y, fadePoint.x);
149
+ }
150
+
151
+ void main() {
152
+ vec2 st = v_uv - 0.5;
153
+ st.x *= u_resolution.x / u_resolution.y;
154
+
155
+ float sound = max(max(u_audio.x, u_audio.y), max(u_audio.z, u_audio.w));
156
+ float stateAmount = max(
157
+ max(u_stateListen, u_stateThink),
158
+ max(u_stateSpeak, max(u_stateMuted, u_stateError))
159
+ );
160
+ float audioEnergy = smoothstep(0.08, 0.72, max(sound, u_micLevel));
161
+ float outputEnergy = smoothstep(0.04, 0.46, u_outputLevel);
162
+ float animatedTime = u_time * u_motionScale;
163
+ float breath = sin(animatedTime * PI * 0.34) * 0.5 + 0.5;
164
+ float entry = smoothstep(0.0, 0.9, stateAmount);
165
+ float maxRadius = min(
166
+ 0.36,
167
+ min(0.5, 0.5 * u_resolution.x / u_resolution.y) - 0.16
168
+ );
169
+ float baseRadius = mix(maxRadius * 0.88, maxRadius * 0.94, u_stateThink);
170
+ float radius = baseRadius * mix(0.82, 1.0, entry);
171
+ radius += outputEnergy * maxRadius * 0.12;
172
+ radius +=
173
+ (1.0 - u_stateThink) *
174
+ (1.0 - outputEnergy) *
175
+ breath *
176
+ maxRadius *
177
+ 0.01;
178
+ radius = min(maxRadius, radius);
179
+
180
+ vec2 drift = vec2(
181
+ sin(animatedTime * 0.43) * 0.0028,
182
+ sin(animatedTime * 0.36 + 1.7) * 0.0035
183
+ );
184
+ vec2 lifted = st - drift;
185
+ float distanceToEdge = length(lifted) - radius;
186
+ float edgeWidth = max(1.25 / min(u_resolution.x, u_resolution.y), 0.0014);
187
+ if (distanceToEdge > edgeWidth) discard;
188
+ float edge = 1.0 - smoothstep(-edgeWidth, edgeWidth, distanceToEdge);
189
+
190
+ vec2 uv = lifted / (2.0 * radius) + 0.5;
191
+ float soundScale = 1.0 + audioEnergy * 0.22;
192
+ float time = animatedTime * 0.34;
193
+ float noiseX = cnoise(vec3(
194
+ uv + vec2(0.0, 74.8572),
195
+ (time + u_cumulativeAudio.x * 0.05 * soundScale) * 0.3
196
+ ));
197
+ float noiseY = cnoise(vec3(
198
+ uv + vec2(203.91282, 10.0),
199
+ (time + u_cumulativeAudio.z * 0.05 * soundScale) * 0.3
200
+ ));
201
+ uv += vec2(noiseX * 2.0, noiseY) * 0.19;
202
+
203
+ float voiceWarpX = cnoise(vec3(
204
+ uv * 3.1 + vec2(0.0, 17.3),
205
+ u_cumulativeAudio.x * 0.085 + u_cumulativeAudio.z * 0.035
206
+ ));
207
+ float voiceWarpY = cnoise(vec3(
208
+ uv * 3.4 + vec2(31.7, 0.0),
209
+ u_cumulativeAudio.y * 0.075 + u_cumulativeAudio.w * 0.045
210
+ ));
211
+ uv += vec2(voiceWarpX, voiceWarpY) * audioEnergy * 0.04;
212
+ uv.y +=
213
+ sin(uv.x * 5.4 + u_cumulativeAudio.w * 0.19) *
214
+ audioEnergy *
215
+ 0.016;
216
+
217
+ float watercolor =
218
+ cnoise(vec3(uv * 18.0 + vec2(344.91282, 0.0), time * 0.3)) +
219
+ cnoise(vec3(uv * 39.6 + vec2(723.937, 0.0), time * 0.4)) * 0.5;
220
+ uv += watercolor * 0.006;
221
+
222
+ float textureA = noise(
223
+ uv * 22.0 + vec2(time * 0.08, u_cumulativeAudio.x * 0.025)
224
+ );
225
+ float textureB = noise(
226
+ vec2(1.0 - uv.x, uv.y) * 41.0 +
227
+ vec2(u_cumulativeAudio.z * 0.018, -time * 0.11)
228
+ );
229
+ float texture = mix(
230
+ textureA,
231
+ textureB,
232
+ sin(time + u_cumulativeAudio.w * 0.12) * 0.5 + 0.5
233
+ ) - 0.5;
234
+ uv += texture * (0.012 + audioEnergy * 0.004);
235
+
236
+ uv.y = 1.0 - uv.y;
237
+ vec2 centeredUv = uv - 0.5;
238
+ float angle = -0.16;
239
+ uv = mat2(cos(angle), -sin(angle), sin(angle), cos(angle)) * centeredUv + 0.5;
240
+ uv.y -= 0.03;
241
+
242
+ vec2 stNoise = uv * 1.25;
243
+ vec2 q = vec2(
244
+ fbm(
245
+ stNoise * 0.5 +
246
+ 0.075 * (time + u_cumulativeAudio.w * 0.175 * soundScale)
247
+ ),
248
+ fbm(
249
+ stNoise * 0.5 +
250
+ 0.075 * (time + u_cumulativeAudio.x * 0.136 * soundScale)
251
+ )
252
+ );
253
+ vec2 r = vec2(
254
+ fbm(
255
+ stNoise + q + vec2(0.3, 9.2) +
256
+ 0.15 * (time + u_cumulativeAudio.y * 0.234 * soundScale)
257
+ ),
258
+ fbm(
259
+ stNoise + q + vec2(8.3, 0.8) +
260
+ 0.126 * (time + u_cumulativeAudio.z * 0.165 * soundScale)
261
+ )
262
+ );
263
+ float field = fbm(stNoise + r - q);
264
+ float fullField = pow(
265
+ ((field + 0.6 * field * field + 0.7 * field) + 0.5) * 0.5,
266
+ 0.55
267
+ );
268
+
269
+ vec3 mainColor = mix(
270
+ vec3(0.94, 0.965, 1.0),
271
+ vec3(1.0, 0.99, 0.96),
272
+ u_micLevel
273
+ );
274
+ vec3 lowColor = vec3(0.36, 0.34, 0.96);
275
+ vec3 midColor = mix(
276
+ vec3(0.57, 0.64, 1.0),
277
+ vec3(0.96, 0.92, 1.0),
278
+ u_micLevel
279
+ );
280
+ vec3 highColor = vec3(1.0, 0.99, 0.97);
281
+
282
+ vec3 offsets = vec3(
283
+ u_cumulativeAudio.x * 0.15 * soundScale,
284
+ -u_cumulativeAudio.y * 0.5 * soundScale,
285
+ u_cumulativeAudio.z * 1.5 * soundScale
286
+ );
287
+
288
+ vec2 lowUv = uv + vec2((fullField - 0.5) * 1.2, 0.025);
289
+ float lowNoise = noise(
290
+ lowUv * 2.0 + vec2(sin(offsets.x * 0.25), time * 0.5 + offsets.x)
291
+ ) * 2.0;
292
+ float lowMask = smoothstep(
293
+ lowNoise - 1.8,
294
+ lowNoise + 1.8,
295
+ ((lowUv.y - 0.5) * (5.0 - u_audio.x * 0.05 * soundScale)) + 0.5
296
+ );
297
+
298
+ vec2 midUv = uv + vec2((fullField - 0.5) * 0.85, 0.025);
299
+ float midNoise = noise(
300
+ midUv * 4.0 +
301
+ vec2(sin(offsets.y * 0.15) * 2.4 + 293.0, time + offsets.y * 0.5)
302
+ ) * 2.0;
303
+ float midMask = smoothstep(
304
+ midNoise - ((0.9 + u_audio.y * 0.4) * 1.5),
305
+ midNoise + ((0.9 + u_audio.y * 0.8) * 1.5),
306
+ ((midUv.y - 0.6) * (5.0 - u_audio.y * 0.75)) + 0.5
307
+ );
308
+
309
+ vec2 highUv = uv + vec2((fullField - 0.5) * 1.1);
310
+ float highNoise = noise(
311
+ highUv * 6.0 +
312
+ vec2(sin(offsets.z * 0.1) * 2.4 + 153.0, time * 1.2 + offsets.z * 0.8)
313
+ ) * 2.0;
314
+ float highMask = smoothstep(
315
+ highNoise - 1.05,
316
+ highNoise + 1.05,
317
+ ((highUv.y - 0.9) * 6.0) + 0.5
318
+ );
319
+
320
+ lowMask = pow(lowMask, 0.8);
321
+ midMask = pow(midMask, 0.9);
322
+ vec3 color = blendLinearBurn(mainColor, lowColor, 1.0 - lowMask);
323
+ color = blendLinearBurn(
324
+ color,
325
+ mix(mainColor, midColor, 1.0 - midMask),
326
+ lowMask
327
+ );
328
+ color = mix(
329
+ color,
330
+ mix(mainColor, highColor, 1.0 - highMask),
331
+ lowMask * midMask
332
+ );
333
+
334
+ float fineNoise = fbm(
335
+ uv * 12.0 + vec2(time * 0.13, -time * 0.09) + r * 0.4
336
+ );
337
+ color = mix(
338
+ color,
339
+ highColor,
340
+ smoothstep(0.58, 0.9, fineNoise) * (0.035 + audioEnergy * 0.025)
341
+ );
342
+ color = mix(
343
+ color,
344
+ lowColor,
345
+ smoothstep(0.42, 0.12, fineNoise) * 0.018
346
+ );
347
+
348
+ float luminance = dot(color, vec3(0.299, 0.587, 0.114));
349
+ color = mix(color, vec3(luminance), u_stateMuted * 0.72);
350
+ color = mix(color, vec3(1.0, 0.35, 0.31), u_stateError * 0.58);
351
+
352
+ float alpha = edge * smoothstep(0.0, 0.18, stateAmount + 0.3);
353
+ gl_FragColor = vec4(color, alpha);
354
+ }
355
+ `;
@@ -0,0 +1,24 @@
1
+ export declare const voiceOrbStates: readonly ["inactive", "connecting", "listening", "thinking", "speaking", "muted", "disconnecting", "error"];
2
+ export type VoiceOrbState = (typeof voiceOrbStates)[number];
3
+ export interface VoiceOrbAudioLevels {
4
+ low: number;
5
+ mid: number;
6
+ high: number;
7
+ overall: number;
8
+ }
9
+ export interface VoiceOrbStateTargets {
10
+ listen: number;
11
+ think: number;
12
+ speak: number;
13
+ muted: number;
14
+ error: number;
15
+ }
16
+ export declare const voiceOrbStateTransitionSeconds = 0.28;
17
+ export declare const voiceOrbSpeakingThreshold = 0.08;
18
+ export declare const voiceOrbSilenceThreshold = 0.04;
19
+ export declare const voiceOrbSilenceHoldMs = 300;
20
+ export declare const silentVoiceOrbAudioLevels: VoiceOrbAudioLevels;
21
+ export declare function normalizeVoiceOrbAudioLevels(levels: VoiceOrbAudioLevels): VoiceOrbAudioLevels;
22
+ export declare function getVoiceOrbStateTargets(state: VoiceOrbState): VoiceOrbStateTargets;
23
+ export declare function getVoiceOrbStateLabel(state: VoiceOrbState): string;
24
+ //# sourceMappingURL=voice-orb-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice-orb-types.d.ts","sourceRoot":"","sources":["../../../src/components/chat/voice-orb-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,6GASjB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,8BAA8B,OAAO,CAAA;AAClD,eAAO,MAAM,yBAAyB,OAAO,CAAA;AAC7C,eAAO,MAAM,wBAAwB,OAAO,CAAA;AAC5C,eAAO,MAAM,qBAAqB,MAAM,CAAA;AAExC,eAAO,MAAM,yBAAyB,EAAE,mBAKvC,CAAA;AAOD,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,mBAAmB,GAC1B,mBAAmB,CAOrB;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,aAAa,GACnB,oBAAoB,CAmBtB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAmBlE"}
@@ -0,0 +1,73 @@
1
+ export const voiceOrbStates = [
2
+ 'inactive',
3
+ 'connecting',
4
+ 'listening',
5
+ 'thinking',
6
+ 'speaking',
7
+ 'muted',
8
+ 'disconnecting',
9
+ 'error',
10
+ ];
11
+ export const voiceOrbStateTransitionSeconds = 0.28;
12
+ export const voiceOrbSpeakingThreshold = 0.08;
13
+ export const voiceOrbSilenceThreshold = 0.04;
14
+ export const voiceOrbSilenceHoldMs = 300;
15
+ export const silentVoiceOrbAudioLevels = {
16
+ low: 0,
17
+ mid: 0,
18
+ high: 0,
19
+ overall: 0,
20
+ };
21
+ function normalizeLevel(value) {
22
+ if (!Number.isFinite(value))
23
+ return 0;
24
+ return Math.max(0, Math.min(1, value));
25
+ }
26
+ export function normalizeVoiceOrbAudioLevels(levels) {
27
+ return {
28
+ low: normalizeLevel(levels.low),
29
+ mid: normalizeLevel(levels.mid),
30
+ high: normalizeLevel(levels.high),
31
+ overall: normalizeLevel(levels.overall),
32
+ };
33
+ }
34
+ export function getVoiceOrbStateTargets(state) {
35
+ switch (state) {
36
+ case 'inactive':
37
+ return { listen: 0, think: 0, speak: 0, muted: 0, error: 0 };
38
+ case 'connecting':
39
+ return { listen: 0, think: 1, speak: 0, muted: 0, error: 0 };
40
+ case 'listening':
41
+ return { listen: 1, think: 0, speak: 0, muted: 0, error: 0 };
42
+ case 'thinking':
43
+ return { listen: 0.65, think: 1, speak: 0, muted: 0, error: 0 };
44
+ case 'speaking':
45
+ return { listen: 0.2, think: 0, speak: 1, muted: 0, error: 0 };
46
+ case 'muted':
47
+ return { listen: 0.45, think: 0, speak: 0, muted: 1, error: 0 };
48
+ case 'disconnecting':
49
+ return { listen: 0.35, think: 0, speak: 0, muted: 0, error: 0 };
50
+ case 'error':
51
+ return { listen: 0.2, think: 0, speak: 0, muted: 0, error: 1 };
52
+ }
53
+ }
54
+ export function getVoiceOrbStateLabel(state) {
55
+ switch (state) {
56
+ case 'inactive':
57
+ return 'Voice inactive';
58
+ case 'connecting':
59
+ return 'Connecting voice';
60
+ case 'listening':
61
+ return 'Listening';
62
+ case 'thinking':
63
+ return 'Thinking';
64
+ case 'speaking':
65
+ return 'Speaking';
66
+ case 'muted':
67
+ return 'Microphone muted';
68
+ case 'disconnecting':
69
+ return 'Ending voice session';
70
+ case 'error':
71
+ return 'Voice unavailable';
72
+ }
73
+ }
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import { type VoiceOrbAudioLevels, type VoiceOrbState } from './voice-orb-types.js';
3
+ export interface VoiceOrbProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
4
+ state: VoiceOrbState;
5
+ /** Audio stream to analyse. A live session should pass its remote output. */
6
+ stream?: MediaStream | null;
7
+ /** Precomputed levels take effect when no stream is supplied. */
8
+ audioLevels?: VoiceOrbAudioLevels;
9
+ onAudioLevels?: (levels: VoiceOrbAudioLevels) => void;
10
+ /** Synthetic energy used for state previews before a stream is available. */
11
+ previewAudioLevel?: number;
12
+ /** Render one deterministic frame at this timestamp instead of animating. */
13
+ previewTimeMs?: number;
14
+ reducedMotion?: boolean;
15
+ size?: number;
16
+ glow?: boolean;
17
+ label?: string;
18
+ }
19
+ export declare function VoiceOrb({ state, stream, audioLevels, onAudioLevels, previewAudioLevel, previewTimeMs, reducedMotion, size, glow, label, className, style, ...props }: VoiceOrbProps): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=voice-orb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice-orb.d.ts","sourceRoot":"","sources":["../../../src/components/chat/voice-orb.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAGnB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC/D,KAAK,EAAE,aAAa,CAAA;IACpB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,iEAAiE;IACjE,WAAW,CAAC,EAAE,mBAAmB,CAAA;IACjC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACrD,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,MAAa,EACb,WAAW,EACX,aAAa,EACb,iBAAqB,EACrB,aAAa,EACb,aAAa,EACb,IAAU,EACV,IAAW,EACX,KAAK,EACL,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,2CAkFf"}
@@ -0,0 +1,67 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect, useRef } from 'react';
4
+ import { cn } from '../../lib/utils.js';
5
+ import { VoiceOrbStreamAnalyser } from './voice-orb-audio.js';
6
+ import { VoiceOrbRenderer } from './voice-orb-renderer.js';
7
+ import { getVoiceOrbStateLabel, normalizeVoiceOrbAudioLevels, } from './voice-orb-types.js';
8
+ export function VoiceOrb({ state, stream = null, audioLevels, onAudioLevels, previewAudioLevel = 0, previewTimeMs, reducedMotion, size = 160, glow = true, label, className, style, ...props }) {
9
+ const canvasRef = useRef(null);
10
+ const rendererRef = useRef(null);
11
+ const analyserRef = useRef(null);
12
+ const onAudioLevelsRef = useRef(onAudioLevels);
13
+ useEffect(() => {
14
+ onAudioLevelsRef.current = onAudioLevels;
15
+ }, [onAudioLevels]);
16
+ useEffect(() => {
17
+ const canvas = canvasRef.current;
18
+ if (!canvas)
19
+ return;
20
+ const renderer = new VoiceOrbRenderer(canvas);
21
+ const analyser = new VoiceOrbStreamAnalyser((levels) => {
22
+ renderer.setAudioLevels(levels);
23
+ onAudioLevelsRef.current?.(levels);
24
+ });
25
+ rendererRef.current = renderer;
26
+ analyserRef.current = analyser;
27
+ return () => {
28
+ analyser.dispose();
29
+ renderer.dispose();
30
+ analyserRef.current = null;
31
+ rendererRef.current = null;
32
+ };
33
+ }, []);
34
+ useEffect(() => {
35
+ rendererRef.current?.setState(state);
36
+ }, [state]);
37
+ useEffect(() => {
38
+ analyserRef.current?.setStream(stream);
39
+ }, [stream]);
40
+ useEffect(() => {
41
+ if (stream)
42
+ return;
43
+ const normalized = audioLevels
44
+ ? normalizeVoiceOrbAudioLevels(audioLevels)
45
+ : null;
46
+ rendererRef.current?.setAudioLevels(normalized);
47
+ if (normalized)
48
+ onAudioLevelsRef.current?.(normalized);
49
+ }, [audioLevels, stream]);
50
+ useEffect(() => {
51
+ rendererRef.current?.setPreview(previewAudioLevel, previewTimeMs);
52
+ }, [previewAudioLevel, previewTimeMs]);
53
+ useEffect(() => {
54
+ const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
55
+ const sync = () => {
56
+ rendererRef.current?.setReducedMotion(reducedMotion ?? mediaQuery.matches);
57
+ };
58
+ sync();
59
+ mediaQuery.addEventListener('change', sync);
60
+ return () => mediaQuery.removeEventListener('change', sync);
61
+ }, [reducedMotion]);
62
+ return (_jsx("div", { role: "img", "aria-label": label ?? getVoiceOrbStateLabel(state), "data-slot": "voice-orb", "data-state": state, className: cn('relative shrink-0', className), style: { width: size, height: size, ...style }, ...props, children: _jsx("canvas", { ref: canvasRef, "aria-hidden": "true", className: "pointer-events-none absolute -inset-5 size-[calc(100%+2.5rem)] max-w-none", style: {
63
+ filter: glow
64
+ ? 'drop-shadow(0 0 4px rgb(154 154 249 / 55%))'
65
+ : undefined,
66
+ } }) }));
67
+ }
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { memo, useEffect, useState } from 'react';
4
- import { cn } from '../lib/utils';
4
+ import { cn } from '../lib/utils.js';
5
5
  let highlighterPromise = null;
6
6
  async function getHighlighter() {
7
7
  if (!highlighterPromise) {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type MoldableBluetoothConnection, type MoldableBluetoothDevice, type MoldableBluetoothRemoteGATTCharacteristic, type MoldableNativeBluetoothDevice } from '../../lib/native-hardware';
2
+ import { type MoldableBluetoothConnection, type MoldableBluetoothDevice, type MoldableBluetoothRemoteGATTCharacteristic, type MoldableNativeBluetoothDevice } from '../../lib/native-hardware/index.js';
3
3
  export type MoldableBluetoothStatus = 'idle' | 'requesting' | 'connecting' | 'connected' | 'error';
4
4
  export interface MoldableBluetoothCharacteristicInfo {
5
5
  serviceUuid: string;
@@ -30,7 +30,7 @@ export declare function useMoldableBluetooth(options?: UseMoldableBluetoothOptio
30
30
  services: MoldableBluetoothServiceInfo[];
31
31
  subscribedUuids: string[];
32
32
  error: Error | null;
33
- entries: import("./stream-log").StreamLogEntry[];
33
+ entries: import("./stream-log.js").StreamLogEntry[];
34
34
  request: (serviceUuid?: string) => Promise<void>;
35
35
  connect: () => Promise<void>;
36
36
  disconnect: () => Promise<void>;
@@ -2,16 +2,16 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Binary, Bluetooth } from 'lucide-react';
4
4
  import { useCallback, useEffect, useRef, useState } from 'react';
5
- import { NativeHardwareBridgeError, connectMoldableBluetoothDevice, isMoldableBluetoothSupported, observeMoldableBluetoothNotifications, readMoldableBluetoothValue, requestMoldableBluetoothWithFallback, writeMoldableBluetoothValue, } from '../../lib/native-hardware';
6
- import { Button } from '../ui/button';
7
- import { Input } from '../ui/input';
8
- import { Spinner } from '../ui/spinner';
9
- import { cleanupBluetoothSubscriptions, parseBluetoothHexBytes, } from './bluetooth-panel-helpers';
10
- import { CapabilityBadge } from './capability-badge';
11
- import { DeviceList, DeviceListEmpty, DeviceListItem } from './device-list';
12
- import { HardwarePanel, HardwarePanelAction, HardwarePanelContent, HardwarePanelHeader, HardwarePanelIcon, HardwarePanelTitle, } from './hardware-panel';
13
- import { LiveIndicator } from './live-indicator';
14
- import { StreamLog, useStreamLog } from './stream-log';
5
+ import { NativeHardwareBridgeError, connectMoldableBluetoothDevice, isMoldableBluetoothSupported, observeMoldableBluetoothNotifications, readMoldableBluetoothValue, requestMoldableBluetoothWithFallback, writeMoldableBluetoothValue, } from '../../lib/native-hardware/index.js';
6
+ import { Button } from '../ui/button.js';
7
+ import { Input } from '../ui/input.js';
8
+ import { Spinner } from '../ui/spinner.js';
9
+ import { cleanupBluetoothSubscriptions, parseBluetoothHexBytes, } from './bluetooth-panel-helpers.js';
10
+ import { CapabilityBadge } from './capability-badge.js';
11
+ import { DeviceList, DeviceListEmpty, DeviceListItem } from './device-list.js';
12
+ import { HardwarePanel, HardwarePanelAction, HardwarePanelContent, HardwarePanelHeader, HardwarePanelIcon, HardwarePanelTitle, } from './hardware-panel.js';
13
+ import { LiveIndicator } from './live-indicator.js';
14
+ import { StreamLog, useStreamLog } from './stream-log.js';
15
15
  const HEX_DUMP_MAX_BYTES = 32;
16
16
  const BLUETOOTH_BASE_UUID_SUFFIX = '-0000-1000-8000-00805f9b34fb';
17
17
  function toError(cause) {
@@ -2,12 +2,12 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Camera, CameraOff, RefreshCw, Square } from 'lucide-react';
4
4
  import { useCallback, useEffect, useRef, useState } from 'react';
5
- import { NativeHardwareBridgeError, enumerateMoldableMediaDevices, getMoldableCameraStream, getMoldableMediaPermissionStatus, requestMoldableMediaPermission, stopMoldableMediaStream, } from '../../lib/native-hardware';
6
- import { cn } from '../../lib/utils';
7
- import { Button } from '../ui/button';
8
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../ui/select';
9
- import { Spinner } from '../ui/spinner';
10
- import { LiveIndicator } from './live-indicator';
5
+ import { NativeHardwareBridgeError, enumerateMoldableMediaDevices, getMoldableCameraStream, getMoldableMediaPermissionStatus, requestMoldableMediaPermission, stopMoldableMediaStream, } from '../../lib/native-hardware/index.js';
6
+ import { cn } from '../../lib/utils.js';
7
+ import { Button } from '../ui/button.js';
8
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../ui/select.js';
9
+ import { Spinner } from '../ui/spinner.js';
10
+ import { LiveIndicator } from './live-indicator.js';
11
11
  function isPermissionDenied(error) {
12
12
  if (error instanceof NativeHardwareBridgeError) {
13
13
  return error.code === 'permission_denied';
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import type { NativeHardwareCapabilityId } from '../../lib/native-hardware';
3
- import { type MoldableCapabilityStatus } from './use-capability';
2
+ import type { NativeHardwareCapabilityId } from '../../lib/native-hardware/index.js';
3
+ import { type MoldableCapabilityStatus } from './use-capability.js';
4
4
  declare function CapabilityDot({ status, className, ...props }: React.ComponentProps<'span'> & {
5
5
  status: MoldableCapabilityStatus;
6
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cn } from '../../lib/utils';
4
- import { useMoldableCapability, } from './use-capability';
3
+ import { cn } from '../../lib/utils.js';
4
+ import { useMoldableCapability, } from './use-capability.js';
5
5
  const STATUS_LABEL = {
6
6
  checking: 'Checking',
7
7
  supported: 'Supported',
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type NativeHardwareCapabilityId } from '../../lib/native-hardware';
2
+ import { type NativeHardwareCapabilityId } from '../../lib/native-hardware/index.js';
3
3
  export interface CapabilityMatrixProps extends React.ComponentProps<'div'> {
4
4
  /** Subset of capabilities to show; defaults to every known capability. */
5
5
  capabilities?: NativeHardwareCapabilityId[];
@@ -2,11 +2,11 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Activity, BatteryCharging, Bell, Bluetooth, Cable, Camera, Clipboard, ClipboardCopy, Fingerprint, Gamepad2, KeyRound, Keyboard, MapPin, Mic, Monitor, MonitorUp, Moon, Music, Timer, Usb, Vibrate, Volume2, } from 'lucide-react';
4
4
  import { useEffect, useRef, useState } from 'react';
5
- import { NATIVE_HARDWARE_CAPABILITY_IDS, } from '../../lib/native-hardware';
6
- import { cn } from '../../lib/utils';
7
- import { Skeleton } from '../ui/skeleton';
8
- import { CapabilityDot } from './capability-badge';
9
- import { loadMoldableCapabilities, } from './use-capability';
5
+ import { NATIVE_HARDWARE_CAPABILITY_IDS, } from '../../lib/native-hardware/index.js';
6
+ import { cn } from '../../lib/utils.js';
7
+ import { Skeleton } from '../ui/skeleton.js';
8
+ import { CapabilityDot } from './capability-badge.js';
9
+ import { loadMoldableCapabilities, } from './use-capability.js';
10
10
  const CAPABILITY_ICON = {
11
11
  camera: Camera,
12
12
  microphone: Mic,