@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
@@ -2,21 +2,21 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
4
4
  import * as React from 'react';
5
- import { cn } from '../../lib/utils';
6
- import { toggleVariants } from './toggle';
5
+ import { cn } from '../../lib/utils.js';
6
+ import { toggleVariants } from './toggle.js';
7
7
  const ToggleGroupContext = React.createContext({
8
8
  size: 'default',
9
9
  variant: 'default',
10
10
  spacing: 0,
11
11
  });
12
12
  function ToggleGroup({ className, variant, size, spacing = 0, children, ...props }) {
13
- return (_jsx(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, style: { '--gap': spacing }, className: cn('group/toggle-group data-[spacing=default]:data-[variant=outline]:shadow-xs flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md', className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children: children }) }));
13
+ return (_jsx(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, style: { '--gap': spacing }, className: cn('group/toggle-group data-[spacing=default]:data-[variant=outline]:shadow-xs rounded-control flex w-fit items-center gap-[--spacing(var(--gap))]', className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children: children }) }));
14
14
  }
15
15
  function ToggleGroupItem({ className, children, variant, size, ...props }) {
16
16
  const context = React.useContext(ToggleGroupContext);
17
17
  return (_jsx(ToggleGroupPrimitive.Item, { "data-slot": "toggle-group-item", "data-variant": context.variant || variant, "data-size": context.size || size, "data-spacing": context.spacing, className: cn(toggleVariants({
18
18
  variant: context.variant || variant,
19
19
  size: context.size || size,
20
- }), 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10', 'data-[spacing=0]:rounded-none data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:data-[variant=outline]:first:border-l data-[spacing=0]:last:rounded-r-md', className), ...props, children: children }));
20
+ }), 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10', 'data-[spacing=0]:first:rounded-l-control data-[spacing=0]:last:rounded-r-control data-[spacing=0]:rounded-none data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:shadow-none data-[spacing=0]:data-[variant=outline]:first:border-l', className), ...props, children: children }));
21
21
  }
22
22
  export { ToggleGroup, ToggleGroupItem };
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { type VariantProps } from 'class-variance-authority';
4
4
  declare const toggleVariants: (props?: ({
5
5
  variant?: "default" | "outline" | "filled" | null | undefined;
6
- size?: "default" | "xs" | "sm" | "lg" | null | undefined;
6
+ size?: "default" | "sm" | "xs" | "lg" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  type ToggleProps = React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>;
9
9
  declare function Toggle({ className, variant, size, ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as TogglePrimitive from '@radix-ui/react-toggle';
4
- import { cn } from '../../lib/utils';
4
+ import { cn } from '../../lib/utils.js';
5
5
  import { cva } from 'class-variance-authority';
6
- const toggleVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-control-hover disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=on]:bg-control-selected data-[state=on]:text-control-selected-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[background-color,color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
6
+ const toggleVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-control text-ui-body font-medium hover:bg-control-hover active:bg-control-pressed disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=on]:bg-control-selected data-[state=on]:text-control-selected-foreground data-[state=on]:hover:bg-control-hover data-[state=on]:active:bg-control-pressed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-1 outline-none transition-[background-color,color,box-shadow] aria-invalid:border-destructive whitespace-nowrap", {
7
7
  variants: {
8
8
  variant: {
9
9
  default: 'bg-transparent',
@@ -11,10 +11,10 @@ const toggleVariants = cva("inline-flex cursor-pointer items-center justify-cent
11
11
  filled: 'bg-muted/70 text-foreground shadow-xs',
12
12
  },
13
13
  size: {
14
- xs: 'h-6 min-w-6 gap-1 px-1.5 text-xs [&_svg:not([class*="size-"])]:size-3',
15
- default: 'h-9 px-2 min-w-9',
16
- sm: 'h-8 px-1.5 min-w-8',
17
- lg: 'h-10 px-2.5 min-w-10',
14
+ xs: 'h-control-xs min-w-control-xs gap-1 px-1.5 text-ui-caption [&_svg:not([class*="size-"])]:size-3',
15
+ default: 'h-control-md min-w-control-md px-2',
16
+ sm: 'h-control-sm min-w-control-sm px-1.5',
17
+ lg: 'h-control-lg min-w-control-lg px-2.5',
18
18
  },
19
19
  },
20
20
  defaultVariants: {
@@ -26,10 +26,10 @@ function Toggle({ className, variant, size, ...props }) {
26
26
  return (_jsx(TogglePrimitive.Root, { "data-slot": "toggle", className: cn(toggleVariants({ variant, size, className })), ...props }));
27
27
  }
28
28
  const iconOnlySizeClasses = {
29
- xs: 'size-6 min-w-6 p-0',
30
- sm: 'size-8 min-w-8 p-0',
31
- default: 'size-9 min-w-9 p-0',
32
- lg: 'size-10 min-w-10 p-0',
29
+ xs: 'size-control-xs min-w-control-xs p-0',
30
+ sm: 'size-control-sm min-w-control-sm p-0',
31
+ default: 'size-control-md min-w-control-md p-0',
32
+ lg: 'size-control-lg min-w-control-lg p-0',
33
33
  };
34
34
  function ToggleButton({ className, iconOnly = false, size = 'default', ...props }) {
35
35
  return (_jsx(Toggle, { "data-slot": "toggle-button", "data-icon-only": iconOnly || undefined, size: size, className: cn(iconOnly && iconOnlySizeClasses[size ?? 'default'], className), ...props }));
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
- import type { MaterialVariant } from './material';
3
- import { Separator } from './separator';
4
- import { Text } from './text';
2
+ import type { MaterialVariant } from './material.js';
3
+ import { Separator } from './separator.js';
4
+ import { Text } from './text.js';
5
5
  import { type VariantProps } from 'class-variance-authority';
6
6
  declare const toolbarVariants: (props?: ({
7
- variant?: "default" | "plain" | "panel" | null | undefined;
8
- material?: "regular" | "clear" | "none" | null | undefined;
9
- density?: "default" | "compact" | "comfortable" | null | undefined;
10
- position?: "static" | "top" | "bottom" | null | undefined;
7
+ variant?: "default" | "panel" | "plain" | null | undefined;
8
+ material?: "regular" | "none" | "clear" | null | undefined;
9
+ density?: "compact" | "default" | "comfortable" | null | undefined;
10
+ position?: "top" | "bottom" | "static" | null | undefined;
11
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
12
  export interface ToolbarProps extends React.ComponentProps<'header'>, VariantProps<typeof toolbarVariants> {
13
13
  /**
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { cn } from '../../lib/utils';
4
- import { Separator } from './separator';
5
- import { Text } from './text';
3
+ import { cn } from '../../lib/utils.js';
4
+ import { Separator } from './separator.js';
5
+ import { Text } from './text.js';
6
6
  import { cva } from 'class-variance-authority';
7
- const toolbarVariants = cva('z-20 flex w-full shrink-0 items-center gap-2 px-3', {
7
+ const toolbarVariants = cva('z-20 flex min-h-toolbar w-full shrink-0 items-center gap-control-gap px-control-inline', {
8
8
  variants: {
9
9
  variant: {
10
10
  default: 'border-border/70 border-b',
@@ -17,9 +17,9 @@ const toolbarVariants = cva('z-20 flex w-full shrink-0 items-center gap-2 px-3',
17
17
  none: '',
18
18
  },
19
19
  density: {
20
- compact: 'min-h-8 py-1',
21
- default: 'min-h-10 py-1.5',
22
- comfortable: 'min-h-12 py-2',
20
+ compact: 'py-1',
21
+ default: 'py-1.5',
22
+ comfortable: 'py-2',
23
23
  },
24
24
  position: {
25
25
  static: '',
@@ -1,7 +1,7 @@
1
1
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
2
  import * as React from 'react';
3
- import { KbdGroup } from './kbd';
4
- import { type MaterialVariant } from './material';
3
+ import { KbdGroup } from './kbd.js';
4
+ import { type MaterialVariant } from './material.js';
5
5
  declare function TooltipProvider({ delayDuration, skipDelayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
6
6
  declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
7
7
  declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
4
- import { cn } from '../../lib/utils';
5
- import { KbdGroup } from './kbd';
6
- import { Material } from './material';
4
+ import { cn } from '../../lib/utils.js';
5
+ import { KbdGroup } from './kbd.js';
6
+ import { Material } from './material.js';
7
7
  function TooltipProvider({ delayDuration = 500, skipDelayDuration = 300, ...props }) {
8
8
  return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, skipDelayDuration: skipDelayDuration, ...props }));
9
9
  }
@@ -14,9 +14,9 @@ function TooltipTrigger({ ...props }) {
14
14
  return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
15
15
  }
16
16
  function TooltipContent({ className, material = 'regular', sideOffset = 0, children, ...props }) {
17
- return (_jsx(TooltipPrimitive.Portal, { children: _jsx(Material, { variant: material, elevation: "overlay", asChild: true, children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1', 'origin-(--radix-tooltip-content-transform-origin) z-50 flex w-fit max-w-80 items-center text-balance px-2.5 py-1.5 text-xs duration-[var(--motion-duration-fast)]', className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "fill-surface-overlay z-50" })] }) }) }));
17
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsx(Material, { variant: material, elevation: "overlay", asChild: true, children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1', 'origin-(--radix-tooltip-content-transform-origin) text-ui-caption z-50 flex w-fit max-w-80 items-center text-balance px-2.5 py-1.5 duration-[var(--motion-duration-fast)]', className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "fill-surface-overlay z-50" })] }) }) }));
18
18
  }
19
19
  function TooltipShortcut({ className, ...props }) {
20
- return (_jsx(KbdGroup, { "data-slot": "tooltip-shortcut", className: cn('ml-2 text-[0.625rem] opacity-70', className), ...props }));
20
+ return (_jsx(KbdGroup, { "data-slot": "tooltip-shortcut", className: cn('text-11 ml-2 opacity-70', className), ...props }));
21
21
  }
22
22
  export { Tooltip, TooltipContent, TooltipProvider, TooltipShortcut, TooltipTrigger, };
package/dist/index.d.ts CHANGED
@@ -1,21 +1,22 @@
1
- export { cn } from './lib/utils';
2
- export { ThemeProvider, useTheme, themeScript, type Theme } from './lib/theme';
3
- export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace';
4
- export { useMoldableCommands, useMoldableCommand, useMoldableAppCommands, useMoldableNavigationPop, useMoldableNavigationState, isInMoldable, sendToMoldable, pushMoldableNavigation, popMoldableNavigation, resetMoldableNavigation, downloadFile, publishMoldableArtifact, setMoldableWindowFullscreen, type AppCommand, type CommandAction, type CommandsResponse, type CommandMessage, type MoldableNavigationEntry, type MoldableNavigationPopMessage, type MoldableNavigationStateMessage, type DownloadFileOptions, type MoldableArtifactFile, type MoldableArtifactPublishOptions, type MoldableArtifactPublishResult, type MoldableWindowFullscreenMode, type MoldableWindowFullscreenOptions, type MoldableWindowFullscreenResult, type MoldableWindowFullscreenMessage, type MoldableWindowFullscreenResultMessage, } from './lib/commands';
5
- export * from './lib/native-capabilities';
6
- export * from './components/ui';
7
- export * from './components/native-capabilities';
8
- export { TODAY_KIND_RANK, TODAY_KIND_TTL_MS, makeTodayItem, type TodayItem, type TodayItemKind, type TodaySurface, type TodayAction, type TodayResponse, type ResumeState, type HydratedTodayItem, type HydratedResume, } from './lib/today';
9
- export { useIsMobile } from './hooks/use-mobile';
10
- export { Markdown } from './components/markdown';
11
- export { RichMediaPlayer, type RichMediaPlayerProps, } from './components/rich-media-player';
12
- export { CodeBlock } from './components/code-block';
13
- export { AppErrorBoundary, type AppErrorSource, } from './components/app-error-boundary';
14
- export { getMoldableHostServices, installMoldableFrameLifecycle, type MoldableHostServiceCapabilities, type MoldableHostServicesAdvertisement, } from './lib/frame-lifecycle';
15
- export { HostServiceRequestError, isHostServiceAvailable, requestHostService, type HostServiceRequestOptions, type HostServiceResponseStatus, } from './lib/host-services';
16
- export { pickDateTimeWithHost, useHostDateTimePicker, type HostDateTimePicker, type HostDateTimePickerAnchorRect, type HostDateTimePickerMode, type HostDateTimePickerOptions, type HostDateTimePickerResult, } from './lib/host-date-time-picker';
17
- export { shareWithHost, useHostShare, type HostShare, type HostShareAnchorRect, type HostShareItem, type HostShareOptions, type HostShareResult, } from './lib/host-share';
18
- export { HOST_NATIVE_MENU_MAX_DEPTH, HOST_NATIVE_MENU_MAX_ITEMS, HOST_NATIVE_MENU_MAX_SUBLABEL_LENGTH, HOST_NATIVE_MENU_MAX_TITLE_LENGTH, openNativeMenuWithHost, useHostNativeMenu, type HostNativeMenu, type HostNativeMenuAnchorRect, type HostNativeMenuOptions, type HostNativeMenuPoint, type HostNativeMenuResult, type NativeMenuItem, type NativeMenuItemKind, type NativeMenuShortcut, } from './lib/host-native-menu';
19
- export { openFileDialogWithHost, saveFileDialogWithHost, useHostFileDialog, type HostFileDialog, type HostFileDialogDefaultLocation, type HostFileDialogFilter, type HostOpenFileDialogOptions, type HostOpenFileDialogProperties, type HostOpenFileDialogResult, type HostSaveFileDialogOptions, type HostSaveFileDialogResult, } from './lib/host-file-dialog';
20
- export * from './components/chat';
1
+ export { cn } from './lib/utils.js';
2
+ export { ThemeProvider, useTheme, themeScript, type Theme } from './lib/theme.js';
3
+ export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace.js';
4
+ export { useMoldableCommands, useMoldableCommand, useMoldableAppCommands, useMoldableNavigationPop, useMoldableNavigationState, isInMoldable, sendToMoldable, pushMoldableNavigation, popMoldableNavigation, resetMoldableNavigation, downloadFile, publishMoldableArtifact, setMoldableWindowFullscreen, type AppCommand, type CommandAction, type CommandsResponse, type CommandMessage, type MoldableNavigationEntry, type MoldableNavigationPopMessage, type MoldableNavigationStateMessage, type DownloadFileOptions, type MoldableArtifactFile, type MoldableArtifactPublishOptions, type MoldableArtifactPublishResult, type MoldableWindowFullscreenMode, type MoldableWindowFullscreenOptions, type MoldableWindowFullscreenResult, type MoldableWindowFullscreenMessage, type MoldableWindowFullscreenResultMessage, } from './lib/commands.js';
5
+ export * from './lib/native-capabilities/index.js';
6
+ export * from './components/ui/index.js';
7
+ export * from './components/native-capabilities/index.js';
8
+ export { TODAY_KIND_RANK, TODAY_KIND_TTL_MS, makeTodayItem, type TodayItem, type TodayItemKind, type TodaySurface, type TodayAction, type TodayResponse, type ResumeState, type HydratedTodayItem, type HydratedResume, } from './lib/today.js';
9
+ export { useIsMobile } from './hooks/use-mobile.js';
10
+ export { Markdown } from './components/markdown.js';
11
+ export { RichMediaPlayer, type RichMediaPlayerProps, } from './components/rich-media-player.js';
12
+ export { CodeBlock } from './components/code-block.js';
13
+ export { AppErrorBoundary, type AppErrorSource, } from './components/app-error-boundary.js';
14
+ export { getMoldableHostServices, installMoldableFrameLifecycle, type MoldableHostServiceCapabilities, type MoldableHostServicesAdvertisement, } from './lib/frame-lifecycle.js';
15
+ export { HostServiceRequestError, isHostServiceAvailable, requestHostService, type HostServiceRequestOptions, type HostServiceResponseStatus, } from './lib/host-services.js';
16
+ export { pickDateTimeWithHost, useHostDateTimePicker, type HostDateTimePicker, type HostDateTimePickerAnchorRect, type HostDateTimePickerMode, type HostDateTimePickerOptions, type HostDateTimePickerResult, } from './lib/host-date-time-picker.js';
17
+ export { shareWithHost, useHostShare, type HostShare, type HostShareAnchorRect, type HostShareItem, type HostShareOptions, type HostShareResult, } from './lib/host-share.js';
18
+ export { HOST_NATIVE_MENU_MAX_DEPTH, HOST_NATIVE_MENU_MAX_ITEMS, HOST_NATIVE_MENU_MAX_SUBLABEL_LENGTH, HOST_NATIVE_MENU_MAX_TITLE_LENGTH, openNativeMenuWithHost, useHostNativeMenu, type HostNativeMenu, type HostNativeMenuAnchorRect, type HostNativeMenuOptions, type HostNativeMenuPoint, type HostNativeMenuResult, type NativeMenuItem, type NativeMenuItemKind, type NativeMenuShortcut, } from './lib/host-native-menu.js';
19
+ export { openFileDialogWithHost, saveFileDialogWithHost, useHostFileDialog, type HostFileDialog, type HostFileDialogDefaultLocation, type HostFileDialogFilter, type HostOpenFileDialogOptions, type HostOpenFileDialogProperties, type HostOpenFileDialogResult, type HostSaveFileDialogOptions, type HostSaveFileDialogResult, } from './lib/host-file-dialog.js';
20
+ export { useHostWebSurface, type HostWebSurface, type HostWebSurfaceBounds, type HostWebSurfaceNavigationState, type HostWebSurfaceNavigationSubscriber, } from './lib/host-web-surface.js';
21
+ export * from './components/chat/index.js';
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAGhC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAA;AAG9E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,uBAAuB,EACvB,2BAA2B,EAC3B,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,qCAAqC,GAC3C,MAAM,gBAAgB,CAAA;AAGvB,cAAc,2BAA2B,CAAA;AAGzC,cAAc,iBAAiB,CAAA;AAG/B,cAAc,kCAAkC,CAAA;AAGhD,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAA;AA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AC/B,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,GAC9B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,GACxC,MAAM,wBAAwB,CAAA;AAG/B,cAAc,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -1,35 +1,36 @@
1
1
  // Export utilities
2
- export { cn } from './lib/utils';
2
+ export { cn } from './lib/utils.js';
3
3
  // Export theme
4
- export { ThemeProvider, useTheme, themeScript } from './lib/theme';
4
+ export { ThemeProvider, useTheme, themeScript } from './lib/theme.js';
5
5
  // Export workspace
6
- export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace';
6
+ export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace.js';
7
7
  // Export commands
8
- export { useMoldableCommands, useMoldableCommand, useMoldableAppCommands, useMoldableNavigationPop, useMoldableNavigationState, isInMoldable, sendToMoldable, pushMoldableNavigation, popMoldableNavigation, resetMoldableNavigation, downloadFile, publishMoldableArtifact, setMoldableWindowFullscreen, } from './lib/commands';
8
+ export { useMoldableCommands, useMoldableCommand, useMoldableAppCommands, useMoldableNavigationPop, useMoldableNavigationState, isInMoldable, sendToMoldable, pushMoldableNavigation, popMoldableNavigation, resetMoldableNavigation, downloadFile, publishMoldableArtifact, setMoldableWindowFullscreen, } from './lib/commands.js';
9
9
  // Export typed desktop/native capability APIs
10
- export * from './lib/native-capabilities';
10
+ export * from './lib/native-capabilities/index.js';
11
11
  // Export UI components
12
- export * from './components/ui';
12
+ export * from './components/ui/index.js';
13
13
  // Export native capability components (polished wrappers over lib/native-capabilities)
14
- export * from './components/native-capabilities';
14
+ export * from './components/native-capabilities/index.js';
15
15
  // Export Today contract
16
- export { TODAY_KIND_RANK, TODAY_KIND_TTL_MS, makeTodayItem, } from './lib/today';
16
+ export { TODAY_KIND_RANK, TODAY_KIND_TTL_MS, makeTodayItem, } from './lib/today.js';
17
17
  // Export hooks
18
- export { useIsMobile } from './hooks/use-mobile';
18
+ export { useIsMobile } from './hooks/use-mobile.js';
19
19
  // Export Markdown
20
- export { Markdown } from './components/markdown';
21
- export { RichMediaPlayer, } from './components/rich-media-player';
20
+ export { Markdown } from './components/markdown.js';
21
+ export { RichMediaPlayer, } from './components/rich-media-player.js';
22
22
  // Export CodeBlock
23
- export { CodeBlock } from './components/code-block';
23
+ export { CodeBlock } from './components/code-block.js';
24
24
  // Export app error boundary
25
- export { AppErrorBoundary, } from './components/app-error-boundary';
25
+ export { AppErrorBoundary, } from './components/app-error-boundary.js';
26
26
  // Export Moldable frame lifecycle
27
- export { getMoldableHostServices, installMoldableFrameLifecycle, } from './lib/frame-lifecycle';
27
+ export { getMoldableHostServices, installMoldableFrameLifecycle, } from './lib/frame-lifecycle.js';
28
28
  // Export the host-owned native service envelope
29
- export { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './lib/host-services';
30
- export { pickDateTimeWithHost, useHostDateTimePicker, } from './lib/host-date-time-picker';
31
- export { shareWithHost, useHostShare, } from './lib/host-share';
32
- export { HOST_NATIVE_MENU_MAX_DEPTH, HOST_NATIVE_MENU_MAX_ITEMS, HOST_NATIVE_MENU_MAX_SUBLABEL_LENGTH, HOST_NATIVE_MENU_MAX_TITLE_LENGTH, openNativeMenuWithHost, useHostNativeMenu, } from './lib/host-native-menu';
33
- export { openFileDialogWithHost, saveFileDialogWithHost, useHostFileDialog, } from './lib/host-file-dialog';
29
+ export { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './lib/host-services.js';
30
+ export { pickDateTimeWithHost, useHostDateTimePicker, } from './lib/host-date-time-picker.js';
31
+ export { shareWithHost, useHostShare, } from './lib/host-share.js';
32
+ export { HOST_NATIVE_MENU_MAX_DEPTH, HOST_NATIVE_MENU_MAX_ITEMS, HOST_NATIVE_MENU_MAX_SUBLABEL_LENGTH, HOST_NATIVE_MENU_MAX_TITLE_LENGTH, openNativeMenuWithHost, useHostNativeMenu, } from './lib/host-native-menu.js';
33
+ export { openFileDialogWithHost, saveFileDialogWithHost, useHostFileDialog, } from './lib/host-file-dialog.js';
34
+ export { useHostWebSurface, } from './lib/host-web-surface.js';
34
35
  // Export chat components
35
- export * from './components/chat';
36
+ export * from './components/chat/index.js';
@@ -30,6 +30,11 @@ export interface MoldableHostContextMessage {
30
30
  titlebar?: 'host' | 'app';
31
31
  platform?: 'macos' | 'windows' | 'linux' | 'unknown';
32
32
  windowId?: string;
33
+ nativeMaterial?: {
34
+ regions?: {
35
+ sidebar?: unknown;
36
+ };
37
+ };
33
38
  safeInsets?: {
34
39
  top?: unknown;
35
40
  inlineStart?: unknown;
@@ -46,8 +51,30 @@ export interface MoldableHostContextMessage {
46
51
  };
47
52
  hostServices?: unknown;
48
53
  }
54
+ export declare const MOLDABLE_NAVIGATION_CHORD_ALLOWLIST: readonly [{
55
+ readonly chord: "back";
56
+ readonly code: "BracketLeft";
57
+ readonly metaKey: true;
58
+ readonly altKey: false;
59
+ readonly ctrlKey: false;
60
+ readonly shiftKey: false;
61
+ }];
62
+ export declare const MOLDABLE_MATERIAL_REGION_CHANGE_EVENT = "moldable:material-region-change";
63
+ export declare const MOLDABLE_MATERIAL_REGION_MESSAGE_TYPE = "moldable:material-region";
64
+ export declare const MOLDABLE_MATERIAL_REGION_ACK_TYPE = "moldable:material-region-ack";
65
+ export declare const MOLDABLE_SIDEBAR_REGION_WIDTH_PROPERTY = "--moldable-material-region-sidebar-width";
66
+ export interface MoldableMaterialRegionAck {
67
+ type: typeof MOLDABLE_MATERIAL_REGION_ACK_TYPE;
68
+ regionId: string;
69
+ role: 'sidebar';
70
+ side: 'leading';
71
+ active: boolean;
72
+ width?: number;
73
+ }
49
74
  export declare function getMoldableHostServices(): MoldableHostServicesAdvertisement | undefined;
75
+ export declare function applyMoldableMaterialRegionAck(value: unknown): boolean;
50
76
  export declare function applyMoldableChatSafePadding(safePadding: unknown): boolean;
51
77
  export declare function applyMoldableHostContext(message: MoldableHostContextMessage): void;
78
+ export declare function installMoldableNavigationChordLifecycle(): () => void;
52
79
  export declare function installMoldableFrameLifecycle(): void;
53
80
  //# sourceMappingURL=frame-lifecycle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frame-lifecycle.d.ts","sourceRoot":"","sources":["../../src/lib/frame-lifecycle.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,eAAe,CAAC,CAAA;KAC/C,CAAA;IACD,cAAc,CAAC,EAAE;QACf,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,CAAA;KAC3C,CAAA;IACD,UAAU,CAAC,EAAE;QACX,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;KAC9B,CAAA;CACF,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAAA;AAEvD,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,CAAC,CAAA;IACV,QAAQ,EAAE,+BAA+B,CAAA;CAC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OWLIST = [
2
+ {
3
+ chord: 'back',
4
+ code: 'BracketLeft',
5
+ metaKey: true,
6
+ altKey: false,
7
+ ctrlKey: false,
8
+ shiftKey: false,
9
+ },
10
+ ];
1
11
  let frameLifecycleInstalled = false;
2
12
  let advertisedHostServices;
13
+ let sidebarMaterialPreviousBodyBackgroundColor = null;
14
+ export const MOLDABLE_MATERIAL_REGION_CHANGE_EVENT = 'moldable:material-region-change';
15
+ export const MOLDABLE_MATERIAL_REGION_MESSAGE_TYPE = 'moldable:material-region';
16
+ export const MOLDABLE_MATERIAL_REGION_ACK_TYPE = 'moldable:material-region-ack';
17
+ export const MOLDABLE_SIDEBAR_REGION_WIDTH_PROPERTY = '--moldable-material-region-sidebar-width';
3
18
  function normalizeHostServices(value) {
4
19
  if (typeof value !== 'object' ||
5
20
  value === null ||
@@ -24,6 +39,79 @@ function normalizeHostServices(value) {
24
39
  export function getMoldableHostServices() {
25
40
  return advertisedHostServices;
26
41
  }
42
+ function clearSidebarMaterialRegion() {
43
+ const root = document.documentElement;
44
+ const hadActiveRegion = root.dataset.moldableMaterialRegionSidebar === 'active';
45
+ delete root.dataset.moldableMaterialRegionSidebar;
46
+ delete root.dataset.moldableMaterialRegionSidebarId;
47
+ root.style.removeProperty(MOLDABLE_SIDEBAR_REGION_WIDTH_PROPERTY);
48
+ if (sidebarMaterialPreviousBodyBackgroundColor !== null) {
49
+ if (sidebarMaterialPreviousBodyBackgroundColor) {
50
+ document.body.style.backgroundColor =
51
+ sidebarMaterialPreviousBodyBackgroundColor;
52
+ }
53
+ else {
54
+ document.body.style.removeProperty('background-color');
55
+ }
56
+ sidebarMaterialPreviousBodyBackgroundColor = null;
57
+ }
58
+ if (hadActiveRegion) {
59
+ window.dispatchEvent(new CustomEvent(MOLDABLE_MATERIAL_REGION_CHANGE_EVENT, {
60
+ detail: { role: 'sidebar', active: false },
61
+ }));
62
+ }
63
+ }
64
+ export function applyMoldableMaterialRegionAck(value) {
65
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
66
+ return false;
67
+ }
68
+ const ack = value;
69
+ if (ack.type !== MOLDABLE_MATERIAL_REGION_ACK_TYPE ||
70
+ typeof ack.regionId !== 'string' ||
71
+ ack.regionId.length === 0 ||
72
+ ack.regionId.length > 128 ||
73
+ ack.role !== 'sidebar' ||
74
+ ack.side !== 'leading' ||
75
+ typeof ack.active !== 'boolean') {
76
+ return false;
77
+ }
78
+ if (!ack.active) {
79
+ const activeRegionId = document.documentElement.dataset.moldableMaterialRegionSidebarId;
80
+ if (activeRegionId && activeRegionId !== ack.regionId)
81
+ return false;
82
+ clearSidebarMaterialRegion();
83
+ return true;
84
+ }
85
+ if (document.documentElement.dataset.moldableNativeMaterialSidebar !==
86
+ 'available' ||
87
+ typeof ack.width !== 'number' ||
88
+ !Number.isFinite(ack.width) ||
89
+ ack.width < 120 ||
90
+ ack.width > 600) {
91
+ return false;
92
+ }
93
+ const normalizedAck = {
94
+ type: MOLDABLE_MATERIAL_REGION_ACK_TYPE,
95
+ regionId: ack.regionId,
96
+ role: 'sidebar',
97
+ side: 'leading',
98
+ active: true,
99
+ width: ack.width,
100
+ };
101
+ const root = document.documentElement;
102
+ root.dataset.moldableMaterialRegionSidebar = 'active';
103
+ root.dataset.moldableMaterialRegionSidebarId = normalizedAck.regionId;
104
+ root.style.setProperty(MOLDABLE_SIDEBAR_REGION_WIDTH_PROPERTY, `${normalizedAck.width}px`);
105
+ if (sidebarMaterialPreviousBodyBackgroundColor === null) {
106
+ sidebarMaterialPreviousBodyBackgroundColor =
107
+ document.body.style.backgroundColor;
108
+ }
109
+ document.body.style.backgroundColor = 'transparent';
110
+ window.dispatchEvent(new CustomEvent(MOLDABLE_MATERIAL_REGION_CHANGE_EVENT, {
111
+ detail: normalizedAck,
112
+ }));
113
+ return true;
114
+ }
27
115
  export function applyMoldableChatSafePadding(safePadding) {
28
116
  if (typeof document === 'undefined')
29
117
  return false;
@@ -59,6 +147,15 @@ export function applyMoldableHostContext(message) {
59
147
  root.dataset.moldablePlatform = message.platform;
60
148
  if (message.windowId)
61
149
  root.dataset.moldableWindowId = message.windowId;
150
+ const sidebarMaterialAvailable = message.displayMode === 'window' &&
151
+ message.nativeMaterial?.regions?.sidebar === true;
152
+ if (sidebarMaterialAvailable) {
153
+ root.dataset.moldableNativeMaterialSidebar = 'available';
154
+ }
155
+ else {
156
+ delete root.dataset.moldableNativeMaterialSidebar;
157
+ clearSidebarMaterialRegion();
158
+ }
62
159
  const insets = message.safeInsets;
63
160
  if (insets) {
64
161
  applyBoundedLength('--window-safe-area-top', insets.top);
@@ -107,6 +204,9 @@ function installHostStateLifecycle() {
107
204
  applyMoldableHostContext(message);
108
205
  }
109
206
  }
207
+ else if (event.data.type === MOLDABLE_MATERIAL_REGION_ACK_TYPE) {
208
+ applyMoldableMaterialRegionAck(event.data);
209
+ }
110
210
  });
111
211
  }
112
212
  function postMoldableFrameMessage(message) {
@@ -114,6 +214,41 @@ function postMoldableFrameMessage(message) {
114
214
  return;
115
215
  window.parent.postMessage(message, '*');
116
216
  }
217
+ function isEditableKeyTarget(target) {
218
+ if (!(target instanceof Element))
219
+ return false;
220
+ if (target.closest('input, textarea, select'))
221
+ return true;
222
+ if (target instanceof HTMLElement && target.isContentEditable)
223
+ return true;
224
+ const contentEditable = target.closest('[contenteditable]');
225
+ const contentEditableValue = contentEditable
226
+ ?.getAttribute('contenteditable')
227
+ ?.toLowerCase();
228
+ return (contentEditableValue === '' ||
229
+ contentEditableValue === 'true' ||
230
+ contentEditableValue === 'plaintext-only');
231
+ }
232
+ export function installMoldableNavigationChordLifecycle() {
233
+ const handleKeyDown = (event) => {
234
+ if (event.defaultPrevented || isEditableKeyTarget(event.target))
235
+ return;
236
+ const match = MOLDABLE_NAVIGATION_CHORD_ALLOWLIST.find((candidate) => event.code === candidate.code &&
237
+ event.metaKey === candidate.metaKey &&
238
+ event.altKey === candidate.altKey &&
239
+ event.ctrlKey === candidate.ctrlKey &&
240
+ event.shiftKey === candidate.shiftKey);
241
+ if (!match)
242
+ return;
243
+ event.preventDefault();
244
+ postMoldableFrameMessage({
245
+ type: 'moldable:navigation-chord',
246
+ chord: match.chord,
247
+ });
248
+ };
249
+ document.addEventListener('keydown', handleKeyDown, true);
250
+ return () => document.removeEventListener('keydown', handleKeyDown, true);
251
+ }
117
252
  function reportAppReady(reason) {
118
253
  postMoldableFrameMessage({ type: 'moldable:app-ready', reason });
119
254
  }
@@ -148,6 +283,7 @@ export function installMoldableFrameLifecycle() {
148
283
  return;
149
284
  frameLifecycleInstalled = true;
150
285
  installHostStateLifecycle();
286
+ installMoldableNavigationChordLifecycle();
151
287
  installViteHmrLifecycle();
152
288
  scheduleRenderReady();
153
289
  if (document.readyState === 'complete') {
@@ -1,4 +1,4 @@
1
- import { type HostServiceRequestOptions } from './host-services';
1
+ import { type HostServiceRequestOptions } from './host-services.js';
2
2
  export type HostDateTimePickerMode = 'date' | 'time' | 'datetime';
3
3
  export interface HostDateTimePickerAnchorRect {
4
4
  x: number;
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useState } from 'react';
2
- import { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './host-services';
2
+ import { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './host-services.js';
3
3
  const HOST_CONTEXT_CHANGE_EVENT = 'moldable:host-context-change';
4
4
  const DATE_TIME_PICKER_SERVICE_NAME = 'dateTimePicker';
5
5
  const MAX_ISO_VALUE_LENGTH = 128;
@@ -1,4 +1,4 @@
1
- import { type HostServiceRequestOptions } from './host-services';
1
+ import { type HostServiceRequestOptions } from './host-services.js';
2
2
  export type HostFileDialogDefaultLocation = 'documents' | 'downloads' | 'desktop' | 'home' | 'appData';
3
3
  export interface HostFileDialogFilter {
4
4
  name: string;
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useState } from 'react';
2
- import { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './host-services';
2
+ import { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './host-services.js';
3
3
  const HOST_CONTEXT_CHANGE_EVENT = 'moldable:host-context-change';
4
4
  const FILE_DIALOG_SERVICE_NAME = 'fileDialog';
5
5
  const MAX_TEXT_LENGTH = 512;