@moldable-ai/ui 0.2.19 → 0.2.21

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 (464) hide show
  1. package/dist/catalog/catalog-coverage.d.ts +15 -0
  2. package/dist/catalog/catalog-coverage.d.ts.map +1 -0
  3. package/dist/catalog/catalog-coverage.js +44 -0
  4. package/dist/catalog/catalog-manifest.d.ts +6 -0
  5. package/dist/catalog/catalog-manifest.d.ts.map +1 -0
  6. package/dist/catalog/catalog-manifest.js +117 -0
  7. package/dist/catalog/catalog-types.d.ts +64 -0
  8. package/dist/catalog/catalog-types.d.ts.map +1 -0
  9. package/dist/catalog/catalog-types.js +20 -0
  10. package/dist/catalog/component-catalog.d.ts +14 -0
  11. package/dist/catalog/component-catalog.d.ts.map +1 -0
  12. package/dist/catalog/component-catalog.js +49 -0
  13. package/dist/catalog/core-catalog-exclusions.d.ts +8 -0
  14. package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -0
  15. package/dist/catalog/core-catalog-exclusions.js +151 -0
  16. package/dist/catalog/core-catalog.d.ts +2 -0
  17. package/dist/catalog/core-catalog.d.ts.map +1 -0
  18. package/dist/catalog/core-catalog.js +19 -0
  19. package/dist/catalog/core-collection-stories.d.ts +3 -0
  20. package/dist/catalog/core-collection-stories.d.ts.map +1 -0
  21. package/dist/catalog/core-collection-stories.js +42 -0
  22. package/dist/catalog/core-control-stories.d.ts +3 -0
  23. package/dist/catalog/core-control-stories.d.ts.map +1 -0
  24. package/dist/catalog/core-control-stories.js +94 -0
  25. package/dist/catalog/core-feedback-stories.d.ts +3 -0
  26. package/dist/catalog/core-feedback-stories.d.ts.map +1 -0
  27. package/dist/catalog/core-feedback-stories.js +50 -0
  28. package/dist/catalog/core-foundation-stories.d.ts +3 -0
  29. package/dist/catalog/core-foundation-stories.d.ts.map +1 -0
  30. package/dist/catalog/core-foundation-stories.js +53 -0
  31. package/dist/catalog/core-navigation-stories.d.ts +3 -0
  32. package/dist/catalog/core-navigation-stories.d.ts.map +1 -0
  33. package/dist/catalog/core-navigation-stories.js +25 -0
  34. package/dist/catalog/core-overlay-stories.d.ts +3 -0
  35. package/dist/catalog/core-overlay-stories.d.ts.map +1 -0
  36. package/dist/catalog/core-overlay-stories.js +20 -0
  37. package/dist/catalog/index.d.ts +7 -0
  38. package/dist/catalog/index.d.ts.map +1 -0
  39. package/dist/catalog/index.js +6 -0
  40. package/dist/components/app-error-boundary.d.ts +1 -0
  41. package/dist/components/app-error-boundary.d.ts.map +1 -1
  42. package/dist/components/app-error-boundary.js +13 -0
  43. package/dist/components/chat/chat-image-lightbox.d.ts +9 -0
  44. package/dist/components/chat/chat-image-lightbox.d.ts.map +1 -0
  45. package/dist/components/chat/chat-image-lightbox.js +9 -0
  46. package/dist/components/chat/chat-message.d.ts +19 -1
  47. package/dist/components/chat/chat-message.d.ts.map +1 -1
  48. package/dist/components/chat/chat-message.js +66 -16
  49. package/dist/components/chat/chat-messages.d.ts +5 -2
  50. package/dist/components/chat/chat-messages.d.ts.map +1 -1
  51. package/dist/components/chat/chat-messages.js +61 -6
  52. package/dist/components/chat/chat-panel.d.ts +49 -6
  53. package/dist/components/chat/chat-panel.d.ts.map +1 -1
  54. package/dist/components/chat/chat-panel.js +196 -163
  55. package/dist/components/chat/conversation-history.d.ts +39 -5
  56. package/dist/components/chat/conversation-history.d.ts.map +1 -1
  57. package/dist/components/chat/conversation-history.js +192 -26
  58. package/dist/components/chat/index.d.ts +2 -2
  59. package/dist/components/chat/index.d.ts.map +1 -1
  60. package/dist/components/chat/index.js +1 -1
  61. package/dist/components/chat/tool-handlers.d.ts.map +1 -1
  62. package/dist/components/chat/tool-handlers.js +40 -2
  63. package/dist/components/chat/vertical-scroll-fade.d.ts +6 -0
  64. package/dist/components/chat/vertical-scroll-fade.d.ts.map +1 -0
  65. package/dist/components/chat/vertical-scroll-fade.js +12 -0
  66. package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts +9 -0
  67. package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts.map +1 -0
  68. package/dist/components/native-capabilities/bluetooth-panel-helpers.js +37 -0
  69. package/dist/components/native-capabilities/bluetooth-panel.d.ts +56 -0
  70. package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -0
  71. package/dist/components/native-capabilities/bluetooth-panel.js +470 -0
  72. package/dist/components/native-capabilities/camera-preview.d.ts +39 -0
  73. package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -0
  74. package/dist/components/native-capabilities/camera-preview.js +228 -0
  75. package/dist/components/native-capabilities/capability-badge.d.ts +23 -0
  76. package/dist/components/native-capabilities/capability-badge.d.ts.map +1 -0
  77. package/dist/components/native-capabilities/capability-badge.js +39 -0
  78. package/dist/components/native-capabilities/capability-matrix.d.ts +14 -0
  79. package/dist/components/native-capabilities/capability-matrix.d.ts.map +1 -0
  80. package/dist/components/native-capabilities/capability-matrix.js +97 -0
  81. package/dist/components/native-capabilities/clipboard-button.d.ts +26 -0
  82. package/dist/components/native-capabilities/clipboard-button.d.ts.map +1 -0
  83. package/dist/components/native-capabilities/clipboard-button.js +99 -0
  84. package/dist/components/native-capabilities/device-io-controls.d.ts +4 -0
  85. package/dist/components/native-capabilities/device-io-controls.d.ts.map +1 -0
  86. package/dist/components/native-capabilities/device-io-controls.js +28 -0
  87. package/dist/components/native-capabilities/device-list.d.ts +20 -0
  88. package/dist/components/native-capabilities/device-list.d.ts.map +1 -0
  89. package/dist/components/native-capabilities/device-list.js +14 -0
  90. package/dist/components/native-capabilities/display-map.d.ts +23 -0
  91. package/dist/components/native-capabilities/display-map.d.ts.map +1 -0
  92. package/dist/components/native-capabilities/display-map.js +114 -0
  93. package/dist/components/native-capabilities/haptic-button.d.ts +26 -0
  94. package/dist/components/native-capabilities/haptic-button.d.ts.map +1 -0
  95. package/dist/components/native-capabilities/haptic-button.js +94 -0
  96. package/dist/components/native-capabilities/hid-panel.d.ts +40 -0
  97. package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -0
  98. package/dist/components/native-capabilities/hid-panel.js +373 -0
  99. package/dist/components/native-capabilities/index.d.ts +27 -0
  100. package/dist/components/native-capabilities/index.d.ts.map +1 -0
  101. package/dist/components/native-capabilities/index.js +26 -0
  102. package/dist/components/native-capabilities/live-indicator.d.ts +15 -0
  103. package/dist/components/native-capabilities/live-indicator.d.ts.map +1 -0
  104. package/dist/components/native-capabilities/live-indicator.js +26 -0
  105. package/dist/components/native-capabilities/local-auth-button.d.ts +33 -0
  106. package/dist/components/native-capabilities/local-auth-button.d.ts.map +1 -0
  107. package/dist/components/native-capabilities/local-auth-button.js +115 -0
  108. package/dist/components/native-capabilities/location-panel.d.ts +29 -0
  109. package/dist/components/native-capabilities/location-panel.d.ts.map +1 -0
  110. package/dist/components/native-capabilities/location-panel.js +146 -0
  111. package/dist/components/native-capabilities/microphone-meter.d.ts +35 -0
  112. package/dist/components/native-capabilities/microphone-meter.d.ts.map +1 -0
  113. package/dist/components/native-capabilities/microphone-meter.js +244 -0
  114. package/dist/components/native-capabilities/midi-monitor.d.ts +54 -0
  115. package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -0
  116. package/dist/components/native-capabilities/midi-monitor.js +534 -0
  117. package/dist/components/native-capabilities/native-capability-panel.d.ts +11 -0
  118. package/dist/components/native-capabilities/native-capability-panel.d.ts.map +1 -0
  119. package/dist/components/native-capabilities/native-capability-panel.js +28 -0
  120. package/dist/components/native-capabilities/notification-panel.d.ts +24 -0
  121. package/dist/components/native-capabilities/notification-panel.d.ts.map +1 -0
  122. package/dist/components/native-capabilities/notification-panel.js +124 -0
  123. package/dist/components/native-capabilities/power-blocker-controller.d.ts +19 -0
  124. package/dist/components/native-capabilities/power-blocker-controller.d.ts.map +1 -0
  125. package/dist/components/native-capabilities/power-blocker-controller.js +83 -0
  126. package/dist/components/native-capabilities/power-panel.d.ts +67 -0
  127. package/dist/components/native-capabilities/power-panel.d.ts.map +1 -0
  128. package/dist/components/native-capabilities/power-panel.js +309 -0
  129. package/dist/components/native-capabilities/readout.d.ts +10 -0
  130. package/dist/components/native-capabilities/readout.d.ts.map +1 -0
  131. package/dist/components/native-capabilities/readout.js +11 -0
  132. package/dist/components/native-capabilities/screen-share-preview.d.ts +36 -0
  133. package/dist/components/native-capabilities/screen-share-preview.d.ts.map +1 -0
  134. package/dist/components/native-capabilities/screen-share-preview.js +191 -0
  135. package/dist/components/native-capabilities/secure-storage-panel.d.ts +36 -0
  136. package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -0
  137. package/dist/components/native-capabilities/secure-storage-panel.js +193 -0
  138. package/dist/components/native-capabilities/serial-console.d.ts +64 -0
  139. package/dist/components/native-capabilities/serial-console.d.ts.map +1 -0
  140. package/dist/components/native-capabilities/serial-console.js +399 -0
  141. package/dist/components/native-capabilities/shortcut-recorder.d.ts +35 -0
  142. package/dist/components/native-capabilities/shortcut-recorder.d.ts.map +1 -0
  143. package/dist/components/native-capabilities/shortcut-recorder.js +217 -0
  144. package/dist/components/native-capabilities/stream-log.d.ts +35 -0
  145. package/dist/components/native-capabilities/stream-log.d.ts.map +1 -0
  146. package/dist/components/native-capabilities/stream-log.js +65 -0
  147. package/dist/components/native-capabilities/system-audio-monitor.d.ts +34 -0
  148. package/dist/components/native-capabilities/system-audio-monitor.d.ts.map +1 -0
  149. package/dist/components/native-capabilities/system-audio-monitor.js +275 -0
  150. package/dist/components/native-capabilities/usb-panel.d.ts +54 -0
  151. package/dist/components/native-capabilities/usb-panel.d.ts.map +1 -0
  152. package/dist/components/native-capabilities/usb-panel.js +363 -0
  153. package/dist/components/native-capabilities/use-capability.d.ts +20 -0
  154. package/dist/components/native-capabilities/use-capability.d.ts.map +1 -0
  155. package/dist/components/native-capabilities/use-capability.js +61 -0
  156. package/dist/components/ui/alert-dialog.d.ts +7 -3
  157. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  158. package/dist/components/ui/alert-dialog.js +9 -5
  159. package/dist/components/ui/alert.d.ts +19 -3
  160. package/dist/components/ui/alert.d.ts.map +1 -1
  161. package/dist/components/ui/alert.js +25 -8
  162. package/dist/components/ui/app-frame.d.ts +28 -0
  163. package/dist/components/ui/app-frame.d.ts.map +1 -0
  164. package/dist/components/ui/app-frame.js +95 -0
  165. package/dist/components/ui/button-group.d.ts +1 -1
  166. package/dist/components/ui/button.js +1 -1
  167. package/dist/components/ui/collapsible.d.ts +9 -1
  168. package/dist/components/ui/collapsible.d.ts.map +1 -1
  169. package/dist/components/ui/collapsible.js +13 -2
  170. package/dist/components/ui/collection-navigation.d.ts +8 -0
  171. package/dist/components/ui/collection-navigation.d.ts.map +1 -0
  172. package/dist/components/ui/collection-navigation.js +19 -0
  173. package/dist/components/ui/color-well.d.ts +13 -0
  174. package/dist/components/ui/color-well.d.ts.map +1 -0
  175. package/dist/components/ui/color-well.js +30 -0
  176. package/dist/components/ui/command.d.ts +5 -1
  177. package/dist/components/ui/command.d.ts.map +1 -1
  178. package/dist/components/ui/command.js +13 -1
  179. package/dist/components/ui/confirm-dialog.d.ts +19 -0
  180. package/dist/components/ui/confirm-dialog.d.ts.map +1 -0
  181. package/dist/components/ui/confirm-dialog.js +45 -0
  182. package/dist/components/ui/date-field.d.ts +19 -0
  183. package/dist/components/ui/date-field.d.ts.map +1 -0
  184. package/dist/components/ui/date-field.js +54 -0
  185. package/dist/components/ui/date-picker.d.ts +24 -0
  186. package/dist/components/ui/date-picker.d.ts.map +1 -0
  187. package/dist/components/ui/date-picker.js +92 -0
  188. package/dist/components/ui/dialog.d.ts +4 -2
  189. package/dist/components/ui/dialog.d.ts.map +1 -1
  190. package/dist/components/ui/dialog.js +8 -5
  191. package/dist/components/ui/edge-fade.d.ts +11 -0
  192. package/dist/components/ui/edge-fade.d.ts.map +1 -0
  193. package/dist/components/ui/edge-fade.js +41 -0
  194. package/dist/components/ui/empty.d.ts +7 -2
  195. package/dist/components/ui/empty.d.ts.map +1 -1
  196. package/dist/components/ui/empty.js +20 -7
  197. package/dist/components/ui/field.d.ts +1 -1
  198. package/dist/components/ui/grid.d.ts +24 -0
  199. package/dist/components/ui/grid.d.ts.map +1 -0
  200. package/dist/components/ui/grid.js +258 -0
  201. package/dist/components/ui/icon-button.d.ts +15 -0
  202. package/dist/components/ui/icon-button.d.ts.map +1 -0
  203. package/dist/components/ui/icon-button.js +15 -0
  204. package/dist/components/ui/index.d.ts +23 -0
  205. package/dist/components/ui/index.d.ts.map +1 -1
  206. package/dist/components/ui/index.js +23 -0
  207. package/dist/components/ui/input-group.d.ts +1 -1
  208. package/dist/components/ui/inspector.d.ts +15 -0
  209. package/dist/components/ui/inspector.d.ts.map +1 -0
  210. package/dist/components/ui/inspector.js +26 -0
  211. package/dist/components/ui/kbd.d.ts +1 -1
  212. package/dist/components/ui/list.d.ts +28 -0
  213. package/dist/components/ui/list.d.ts.map +1 -0
  214. package/dist/components/ui/list.js +235 -0
  215. package/dist/components/ui/material.d.ts +34 -0
  216. package/dist/components/ui/material.d.ts.map +1 -0
  217. package/dist/components/ui/material.js +34 -0
  218. package/dist/components/ui/message-scroller-controller.d.ts +162 -0
  219. package/dist/components/ui/message-scroller-controller.d.ts.map +1 -0
  220. package/dist/components/ui/message-scroller-controller.js +888 -0
  221. package/dist/components/ui/message-scroller-layout-stability.d.ts +33 -0
  222. package/dist/components/ui/message-scroller-layout-stability.d.ts.map +1 -0
  223. package/dist/components/ui/message-scroller-layout-stability.js +153 -0
  224. package/dist/components/ui/message-scroller-policy.d.ts +74 -0
  225. package/dist/components/ui/message-scroller-policy.d.ts.map +1 -0
  226. package/dist/components/ui/message-scroller-policy.js +129 -0
  227. package/dist/components/ui/message-scroller-primitive.d.ts +55 -0
  228. package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -0
  229. package/dist/components/ui/message-scroller-primitive.js +226 -0
  230. package/dist/components/ui/message-scroller.d.ts +11 -0
  231. package/dist/components/ui/message-scroller.d.ts.map +1 -0
  232. package/dist/components/ui/message-scroller.js +25 -0
  233. package/dist/components/ui/navigation-button-group.d.ts +16 -0
  234. package/dist/components/ui/navigation-button-group.d.ts.map +1 -0
  235. package/dist/components/ui/navigation-button-group.js +9 -0
  236. package/dist/components/ui/notification-dot.d.ts +4 -0
  237. package/dist/components/ui/notification-dot.d.ts.map +1 -0
  238. package/dist/components/ui/notification-dot.js +7 -0
  239. package/dist/components/ui/number-input.d.ts +16 -0
  240. package/dist/components/ui/number-input.d.ts.map +1 -0
  241. package/dist/components/ui/number-input.js +56 -0
  242. package/dist/components/ui/panel.d.ts +18 -0
  243. package/dist/components/ui/panel.d.ts.map +1 -0
  244. package/dist/components/ui/panel.js +40 -0
  245. package/dist/components/ui/popover.d.ts +9 -2
  246. package/dist/components/ui/popover.d.ts.map +1 -1
  247. package/dist/components/ui/popover.js +14 -4
  248. package/dist/components/ui/scroll-area.d.ts +8 -2
  249. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  250. package/dist/components/ui/scroll-area.js +6 -3
  251. package/dist/components/ui/search-field.d.ts +19 -0
  252. package/dist/components/ui/search-field.d.ts.map +1 -0
  253. package/dist/components/ui/search-field.js +64 -0
  254. package/dist/components/ui/segmented-control.d.ts +21 -0
  255. package/dist/components/ui/segmented-control.d.ts.map +1 -0
  256. package/dist/components/ui/segmented-control.js +62 -0
  257. package/dist/components/ui/sheet.d.ts +4 -2
  258. package/dist/components/ui/sheet.d.ts.map +1 -1
  259. package/dist/components/ui/sheet.js +12 -9
  260. package/dist/components/ui/sidebar.js +1 -1
  261. package/dist/components/ui/sonner.d.ts +4 -3
  262. package/dist/components/ui/sonner.d.ts.map +1 -1
  263. package/dist/components/ui/sonner.js +7 -6
  264. package/dist/components/ui/split-view.d.ts +11 -0
  265. package/dist/components/ui/split-view.d.ts.map +1 -0
  266. package/dist/components/ui/split-view.js +13 -0
  267. package/dist/components/ui/status.d.ts +13 -0
  268. package/dist/components/ui/status.d.ts.map +1 -0
  269. package/dist/components/ui/status.js +36 -0
  270. package/dist/components/ui/table.d.ts +11 -2
  271. package/dist/components/ui/table.d.ts.map +1 -1
  272. package/dist/components/ui/table.js +33 -6
  273. package/dist/components/ui/text.d.ts +17 -0
  274. package/dist/components/ui/text.d.ts.map +1 -0
  275. package/dist/components/ui/text.js +55 -0
  276. package/dist/components/ui/toggle.d.ts +12 -4
  277. package/dist/components/ui/toggle.d.ts.map +1 -1
  278. package/dist/components/ui/toggle.js +13 -2
  279. package/dist/components/ui/toolbar.d.ts +27 -0
  280. package/dist/components/ui/toolbar.d.ts.map +1 -0
  281. package/dist/components/ui/toolbar.js +71 -0
  282. package/dist/components/ui/tooltip.d.ts +8 -3
  283. package/dist/components/ui/tooltip.d.ts.map +1 -1
  284. package/dist/components/ui/tooltip.js +11 -6
  285. package/dist/index.d.ts +2 -2
  286. package/dist/index.d.ts.map +1 -1
  287. package/dist/index.js +4 -4
  288. package/dist/lib/frame-lifecycle.d.ts +29 -0
  289. package/dist/lib/frame-lifecycle.d.ts.map +1 -1
  290. package/dist/lib/frame-lifecycle.js +85 -0
  291. package/dist/lib/native-capabilities/access.d.ts +13 -0
  292. package/dist/lib/native-capabilities/access.d.ts.map +1 -0
  293. package/dist/lib/native-capabilities/access.js +53 -0
  294. package/dist/lib/native-capabilities/bluetooth-access.d.ts +14 -0
  295. package/dist/lib/native-capabilities/bluetooth-access.d.ts.map +1 -0
  296. package/dist/lib/native-capabilities/bluetooth-access.js +43 -0
  297. package/dist/lib/native-capabilities/bluetooth-connection.d.ts +19 -0
  298. package/dist/lib/native-capabilities/bluetooth-connection.d.ts.map +1 -0
  299. package/dist/lib/native-capabilities/bluetooth-connection.js +88 -0
  300. package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +7 -0
  301. package/dist/lib/native-capabilities/bluetooth-gatt.d.ts.map +1 -0
  302. package/dist/lib/native-capabilities/bluetooth-gatt.js +77 -0
  303. package/dist/lib/native-capabilities/bluetooth-internal.d.ts +10 -0
  304. package/dist/lib/native-capabilities/bluetooth-internal.d.ts.map +1 -0
  305. package/dist/lib/native-capabilities/bluetooth-internal.js +105 -0
  306. package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +33 -0
  307. package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts.map +1 -0
  308. package/dist/lib/native-capabilities/bluetooth-native-fallback.js +214 -0
  309. package/dist/lib/native-capabilities/bluetooth-types.d.ts +85 -0
  310. package/dist/lib/native-capabilities/bluetooth-types.d.ts.map +1 -0
  311. package/dist/lib/native-capabilities/bluetooth-types.js +2 -0
  312. package/dist/lib/native-capabilities/bluetooth.d.ts +7 -0
  313. package/dist/lib/native-capabilities/bluetooth.d.ts.map +1 -0
  314. package/dist/lib/native-capabilities/bluetooth.js +4 -0
  315. package/dist/lib/native-capabilities/bridge.d.ts +23 -0
  316. package/dist/lib/native-capabilities/bridge.d.ts.map +1 -0
  317. package/dist/lib/native-capabilities/bridge.js +266 -0
  318. package/dist/lib/native-capabilities/capabilities.d.ts +7 -0
  319. package/dist/lib/native-capabilities/capabilities.d.ts.map +1 -0
  320. package/dist/lib/native-capabilities/capabilities.js +95 -0
  321. package/dist/lib/native-capabilities/clipboard.d.ts +11 -0
  322. package/dist/lib/native-capabilities/clipboard.d.ts.map +1 -0
  323. package/dist/lib/native-capabilities/clipboard.js +58 -0
  324. package/dist/lib/native-capabilities/device-io-errors.d.ts +11 -0
  325. package/dist/lib/native-capabilities/device-io-errors.d.ts.map +1 -0
  326. package/dist/lib/native-capabilities/device-io-errors.js +82 -0
  327. package/dist/lib/native-capabilities/displays.d.ts +38 -0
  328. package/dist/lib/native-capabilities/displays.d.ts.map +1 -0
  329. package/dist/lib/native-capabilities/displays.js +12 -0
  330. package/dist/lib/native-capabilities/global-shortcuts.d.ts +86 -0
  331. package/dist/lib/native-capabilities/global-shortcuts.d.ts.map +1 -0
  332. package/dist/lib/native-capabilities/global-shortcuts.js +351 -0
  333. package/dist/lib/native-capabilities/haptics.d.ts +25 -0
  334. package/dist/lib/native-capabilities/haptics.d.ts.map +1 -0
  335. package/dist/lib/native-capabilities/haptics.js +18 -0
  336. package/dist/lib/native-capabilities/hid-native.d.ts +26 -0
  337. package/dist/lib/native-capabilities/hid-native.d.ts.map +1 -0
  338. package/dist/lib/native-capabilities/hid-native.js +229 -0
  339. package/dist/lib/native-capabilities/hid.d.ts +52 -0
  340. package/dist/lib/native-capabilities/hid.d.ts.map +1 -0
  341. package/dist/lib/native-capabilities/hid.js +163 -0
  342. package/dist/lib/native-capabilities/index.d.ts +40 -0
  343. package/dist/lib/native-capabilities/index.d.ts.map +1 -0
  344. package/dist/lib/native-capabilities/index.js +21 -0
  345. package/dist/lib/native-capabilities/local-authentication.d.ts +32 -0
  346. package/dist/lib/native-capabilities/local-authentication.d.ts.map +1 -0
  347. package/dist/lib/native-capabilities/local-authentication.js +46 -0
  348. package/dist/lib/native-capabilities/location.d.ts +49 -0
  349. package/dist/lib/native-capabilities/location.d.ts.map +1 -0
  350. package/dist/lib/native-capabilities/location.js +114 -0
  351. package/dist/lib/native-capabilities/media-permissions.d.ts +28 -0
  352. package/dist/lib/native-capabilities/media-permissions.d.ts.map +1 -0
  353. package/dist/lib/native-capabilities/media-permissions.js +37 -0
  354. package/dist/lib/native-capabilities/media.d.ts +17 -0
  355. package/dist/lib/native-capabilities/media.d.ts.map +1 -0
  356. package/dist/lib/native-capabilities/media.js +104 -0
  357. package/dist/lib/native-capabilities/midi-access.d.ts +13 -0
  358. package/dist/lib/native-capabilities/midi-access.d.ts.map +1 -0
  359. package/dist/lib/native-capabilities/midi-access.js +68 -0
  360. package/dist/lib/native-capabilities/midi-internal.d.ts +12 -0
  361. package/dist/lib/native-capabilities/midi-internal.d.ts.map +1 -0
  362. package/dist/lib/native-capabilities/midi-internal.js +88 -0
  363. package/dist/lib/native-capabilities/midi-native-fallback.d.ts +27 -0
  364. package/dist/lib/native-capabilities/midi-native-fallback.d.ts.map +1 -0
  365. package/dist/lib/native-capabilities/midi-native-fallback.js +127 -0
  366. package/dist/lib/native-capabilities/midi-ports.d.ts +6 -0
  367. package/dist/lib/native-capabilities/midi-ports.d.ts.map +1 -0
  368. package/dist/lib/native-capabilities/midi-ports.js +115 -0
  369. package/dist/lib/native-capabilities/midi-types.d.ts +25 -0
  370. package/dist/lib/native-capabilities/midi-types.d.ts.map +1 -0
  371. package/dist/lib/native-capabilities/midi-types.js +1 -0
  372. package/dist/lib/native-capabilities/midi.d.ts +6 -0
  373. package/dist/lib/native-capabilities/midi.d.ts.map +1 -0
  374. package/dist/lib/native-capabilities/midi.js +3 -0
  375. package/dist/lib/native-capabilities/native-device-io.d.ts +28 -0
  376. package/dist/lib/native-capabilities/native-device-io.d.ts.map +1 -0
  377. package/dist/lib/native-capabilities/native-device-io.js +91 -0
  378. package/dist/lib/native-capabilities/native-device-lifecycle.d.ts +13 -0
  379. package/dist/lib/native-capabilities/native-device-lifecycle.d.ts.map +1 -0
  380. package/dist/lib/native-capabilities/native-device-lifecycle.js +40 -0
  381. package/dist/lib/native-capabilities/notifications.d.ts +38 -0
  382. package/dist/lib/native-capabilities/notifications.d.ts.map +1 -0
  383. package/dist/lib/native-capabilities/notifications.js +50 -0
  384. package/dist/lib/native-capabilities/power-session.d.ts +113 -0
  385. package/dist/lib/native-capabilities/power-session.d.ts.map +1 -0
  386. package/dist/lib/native-capabilities/power-session.js +264 -0
  387. package/dist/lib/native-capabilities/secure-storage.d.ts +36 -0
  388. package/dist/lib/native-capabilities/secure-storage.d.ts.map +1 -0
  389. package/dist/lib/native-capabilities/secure-storage.js +64 -0
  390. package/dist/lib/native-capabilities/serial-native.d.ts +23 -0
  391. package/dist/lib/native-capabilities/serial-native.d.ts.map +1 -0
  392. package/dist/lib/native-capabilities/serial-native.js +181 -0
  393. package/dist/lib/native-capabilities/serial.d.ts +76 -0
  394. package/dist/lib/native-capabilities/serial.d.ts.map +1 -0
  395. package/dist/lib/native-capabilities/serial.js +215 -0
  396. package/dist/lib/native-capabilities/system-audio.d.ts +127 -0
  397. package/dist/lib/native-capabilities/system-audio.d.ts.map +1 -0
  398. package/dist/lib/native-capabilities/system-audio.js +330 -0
  399. package/dist/lib/native-capabilities/types.d.ts +62 -0
  400. package/dist/lib/native-capabilities/types.d.ts.map +1 -0
  401. package/dist/lib/native-capabilities/types.js +27 -0
  402. package/dist/lib/native-capabilities/usb-native.d.ts +39 -0
  403. package/dist/lib/native-capabilities/usb-native.d.ts.map +1 -0
  404. package/dist/lib/native-capabilities/usb-native.js +217 -0
  405. package/dist/lib/native-capabilities/usb.d.ts +85 -0
  406. package/dist/lib/native-capabilities/usb.d.ts.map +1 -0
  407. package/dist/lib/native-capabilities/usb.js +225 -0
  408. package/dist/lib/theme.d.ts.map +1 -1
  409. package/dist/lib/theme.js +2 -1
  410. package/docs/README.md +39 -0
  411. package/docs/accessibility.md +32 -0
  412. package/docs/adaptive-materials.md +79 -0
  413. package/docs/app-anatomy.md +74 -0
  414. package/docs/component-catalog.md +82 -0
  415. package/docs/component-guide-template.md +37 -0
  416. package/docs/design-tokens.md +185 -0
  417. package/docs/foundations.md +58 -0
  418. package/docs/native-integration.md +33 -0
  419. package/docs/standalone-app-windows.md +136 -0
  420. package/package.json +8 -3
  421. package/src/components/ui/alert-dialog.md +31 -0
  422. package/src/components/ui/alert.md +77 -0
  423. package/src/components/ui/app-frame.md +38 -0
  424. package/src/components/ui/badge.md +57 -0
  425. package/src/components/ui/button.md +76 -0
  426. package/src/components/ui/collapsible.md +52 -0
  427. package/src/components/ui/color-well.md +11 -0
  428. package/src/components/ui/combobox.md +42 -0
  429. package/src/components/ui/command.md +54 -0
  430. package/src/components/ui/date-field.md +32 -0
  431. package/src/components/ui/date-picker.md +55 -0
  432. package/src/components/ui/dialog.md +40 -0
  433. package/src/components/ui/edge-fade.md +7 -0
  434. package/src/components/ui/empty.md +87 -0
  435. package/src/components/ui/field.md +77 -0
  436. package/src/components/ui/grid.md +109 -0
  437. package/src/components/ui/icon-button.md +36 -0
  438. package/src/components/ui/inspector.md +11 -0
  439. package/src/components/ui/item.md +87 -0
  440. package/src/components/ui/list.md +140 -0
  441. package/src/components/ui/material.md +51 -0
  442. package/src/components/ui/navigation-button-group.md +46 -0
  443. package/src/components/ui/notification-dot.md +7 -0
  444. package/src/components/ui/number-input.md +19 -0
  445. package/src/components/ui/panel.md +11 -0
  446. package/src/components/ui/popover.md +31 -0
  447. package/src/components/ui/resizable.md +66 -0
  448. package/src/components/ui/scroll-area.md +72 -0
  449. package/src/components/ui/search-field.md +33 -0
  450. package/src/components/ui/segmented-control.md +36 -0
  451. package/src/components/ui/sheet.md +30 -0
  452. package/src/components/ui/sidebar.md +113 -0
  453. package/src/components/ui/sonner.md +37 -0
  454. package/src/components/ui/split-view.md +15 -0
  455. package/src/components/ui/status.md +12 -0
  456. package/src/components/ui/table.md +37 -0
  457. package/src/components/ui/tabs.md +66 -0
  458. package/src/components/ui/text.md +17 -0
  459. package/src/components/ui/toggle-button.md +48 -0
  460. package/src/components/ui/toggle-group.md +80 -0
  461. package/src/components/ui/toggle.md +73 -0
  462. package/src/components/ui/toolbar.md +26 -0
  463. package/src/components/ui/tooltip.md +31 -0
  464. package/src/styles/index.css +704 -3
@@ -0,0 +1,79 @@
1
+ # Adaptive materials
2
+
3
+ Moldable uses restrained translucent material to separate controls and
4
+ navigation from the content they operate on. Material frames content; it does
5
+ not replace content surfaces.
6
+
7
+ ## Roles
8
+
9
+ Use `regular` material for normal toolbar and window chrome, grouped controls,
10
+ menus, and temporary control overlays. It provides enough frosting for text
11
+ and icons to remain stable as content moves behind it.
12
+
13
+ Use `clear` material only for compact controls floating over photos, maps,
14
+ video, or another richly colored canvas. Check the control against the
15
+ lightest, darkest, and busiest content it can cover. If contrast is not stable,
16
+ use `regular`.
17
+
18
+ Documents, calendars, tables, forms, cards, sheets, inspectors, and primary
19
+ working canvases remain opaque. Do not stack translucent content cards to
20
+ create hierarchy.
21
+
22
+ ## Components
23
+
24
+ `Material` applies one adaptive surface:
25
+
26
+ ```tsx
27
+ <Material asChild variant="clear" shape="circle" interactive>
28
+ <IconButton label="Center map" variant="ghost">
29
+ <Locate />
30
+ </IconButton>
31
+ </Material>
32
+ ```
33
+
34
+ `MaterialGroup` applies one sampled layer to a related cluster:
35
+
36
+ ```tsx
37
+ <MaterialGroup variant="regular" shape="capsule" spacing="compact">
38
+ <IconButton label="Previous" variant="ghost">
39
+ <ChevronLeft />
40
+ </IconButton>
41
+ <IconButton label="Next" variant="ghost">
42
+ <ChevronRight />
43
+ </IconButton>
44
+ </MaterialGroup>
45
+ ```
46
+
47
+ Children of a `MaterialGroup` should be ordinary transparent or ghost
48
+ controls. Do not apply another `Material` to every child. A single grouped
49
+ sampler produces clearer hierarchy and avoids accumulated blur.
50
+
51
+ `Toolbar`, `AppFrameTitlebar`, and `AppFrameStatusbar` expose a `material`
52
+ property. Their normal chrome uses `regular`; pass `material="none"` for an
53
+ opaque or transparent composition that supplies its own surface.
54
+
55
+ ## Fallback behavior
56
+
57
+ Every material starts from an opaque fallback. Translucent sampling is enabled
58
+ only when the renderer supports backdrop filtering.
59
+
60
+ - Reduced transparency uses opaque fills and removes blur and saturation.
61
+ - Increased contrast makes fills more opaque and strengthens borders.
62
+ - Forced colors use system surfaces and borders without blur or shadows.
63
+ - Reduced motion removes material press transforms.
64
+
65
+ The manual `data-transparency="reduced"`, `data-contrast="increased"`, and
66
+ `data-motion="reduced"` attributes mirror system preferences for deterministic
67
+ catalog and app testing.
68
+
69
+ Do not animate blur, saturation, or backdrop filters. They are expensive,
70
+ visually noisy, and difficult to make accessible. Limit the number of visible
71
+ sampled layers and avoid nesting them.
72
+
73
+ ## Host boundary
74
+
75
+ CSS material samples content inside the app renderer. It cannot sample the
76
+ desktop behind a native window. Native behind-window material, window
77
+ transparency, active-window appearance, and energy policy remain host-owned
78
+ capabilities. Apps should use the same semantic variants regardless of which
79
+ adapter renders them.
@@ -0,0 +1,74 @@
1
+ # App anatomy
2
+
3
+ ## Recommended window shell
4
+
5
+ Apps should be able to own a dedicated window without changing their internal
6
+ layout. `AppFrame` consumes host-owned safe-area variables and keeps the app
7
+ canvas independent of the desktop shell.
8
+
9
+ ```tsx
10
+ <AppFrame>
11
+ <AppFrameTitlebar>
12
+ <AppFrameToolbar>
13
+ {/* title, view controls, primary actions */}
14
+ </AppFrameToolbar>
15
+ </AppFrameTitlebar>
16
+ <AppFrameContent scrollable={false}>
17
+ {/* app-owned canvas and panes */}
18
+ </AppFrameContent>
19
+ </AppFrame>
20
+ ```
21
+
22
+ The host renders native window controls and drag regions. Do not draw those
23
+ inside app UI.
24
+
25
+ ## Recommended pane shell
26
+
27
+ ```tsx
28
+ <PanelGroup>
29
+ <Panel surface="sidebar" className="w-64">
30
+ <Toolbar>{/* navigation and search */}</Toolbar>
31
+ <PanelContent>{/* selectable list */}</PanelContent>
32
+ </Panel>
33
+ <Panel>
34
+ <Toolbar>{/* title and primary actions */}</Toolbar>
35
+ <PanelContent>{/* primary work */}</PanelContent>
36
+ </Panel>
37
+ </PanelGroup>
38
+ ```
39
+
40
+ Use `SplitView` when the user benefits from resizing panes. Use `PanelGroup`
41
+ for fixed or responsive layouts. Do not nest both merely for styling.
42
+
43
+ ## Pane responsibilities
44
+
45
+ - Sidebar: sources, navigation, saved views, and compact search.
46
+ - Main pane: the user's primary object and dominant workflow.
47
+ - Inspector: properties and secondary controls for the current selection.
48
+ - Toolbar: current context and actions, never a second page header.
49
+
50
+ Every pane must use `min-h-0 min-w-0`. The element containing long content owns
51
+ `overflow-auto`; headers and footers remain fixed.
52
+
53
+ ## Chat clearance
54
+
55
+ `installMoldableFrameLifecycle()` applies the embedded host's chat state to the
56
+ shared token. `AppFrameContent` consumes it by default. In layouts that own
57
+ their own scroll region, set `chatSafe={false}` on `AppFrameContent` and add
58
+ `pb-[var(--chat-safe-padding)]` or an equivalent `calc()` only to that region.
59
+ Do not pad every ancestor.
60
+
61
+ The token is `0px` in a standalone app window. Chat belongs to the central
62
+ orchestrator rather than being recreated inside every app.
63
+
64
+ ## Narrow widths
65
+
66
+ Collapse optional inspectors before truncating the primary task. At narrow
67
+ widths, preserve action reachability, focus order, and readable labels.
68
+
69
+ ## Multiwindow ownership
70
+
71
+ Each app window owns its local navigation, selection, loading, empty, error,
72
+ and save feedback. Workspace identity, app process lifecycle, native
73
+ permissions, and orchestration remain host-owned. Never assume another visible
74
+ window can supply a missing app state.
@@ -0,0 +1,82 @@
1
+ # Component catalog
2
+
3
+ The catalog turns component review into a deterministic matrix rather than a
4
+ set of hand-picked screenshots. Import the catalog utilities from the separate
5
+ subpath so production app bundles do not pull in review infrastructure.
6
+
7
+ ```tsx
8
+ import {
9
+ ComponentCatalog,
10
+ createCatalogManifest,
11
+ } from '@moldable-ai/ui/catalog'
12
+
13
+ const manifest = createCatalogManifest({
14
+ title: 'App UI',
15
+ sections: [
16
+ {
17
+ id: 'controls',
18
+ title: 'Controls',
19
+ stories: [
20
+ {
21
+ id: 'primary-action',
22
+ title: 'Primary action',
23
+ components: ['button'],
24
+ interactions: ['rest', 'focus-visible', 'disabled', 'loading'],
25
+ render: ({ interaction }) => (
26
+ <Button
27
+ autoFocus={interaction === 'focus-visible'}
28
+ disabled={interaction === 'disabled'}
29
+ >
30
+ Continue
31
+ </Button>
32
+ ),
33
+ },
34
+ ],
35
+ },
36
+ ],
37
+ })
38
+
39
+ <ComponentCatalog manifest={manifest} />
40
+ ```
41
+
42
+ ## Required review matrix
43
+
44
+ Every public interactive component should cover:
45
+
46
+ - light and dark themes;
47
+ - regular and compact density;
48
+ - wide and narrow viewports;
49
+ - standard accessibility behavior plus reduced transparency, increased
50
+ contrast, and reduced motion where material or motion is part of the recipe;
51
+ - rest, focus-visible, disabled, invalid, selected, loading, and empty states
52
+ where those states apply;
53
+ - keyboard behavior in unit tests.
54
+
55
+ `buildCatalogCases()` generates stable case IDs and supports filtering, which
56
+ lets a visual-regression runner capture one addressable case at a time. Keep
57
+ catalog stories deterministic: fixed content, fixed dates, no network calls,
58
+ and no animation unless motion itself is under review.
59
+
60
+ Accessibility environments are opt-in per story through
61
+ `accessibilityModes`. Standard cases preserve the existing case ID; a
62
+ nonstandard mode is appended as the final segment. The catalog maps those
63
+ modes to deterministic `data-transparency`, `data-contrast`, and `data-motion`
64
+ attributes.
65
+
66
+ ## Public component accountability
67
+
68
+ Every story declares the public visual component modules it exercises through
69
+ `components`. The core catalog test reads the barrel exports from
70
+ `components/ui/index.ts` and requires every module to be either:
71
+
72
+ - named by at least one deterministic story; or
73
+ - listed in `coreCatalogExclusions` with a concise reason.
74
+
75
+ Exclusions are visible debt, not permanent exemptions. Remove an exclusion in
76
+ the same change that adds representative stories. Unknown component ids, stale
77
+ exclusions, duplicate exclusions, and empty reasons fail the catalog test.
78
+
79
+ The core catalog covers window materials, semantic controls, collections,
80
+ navigation, representative popover material, and feedback recipes. Complex
81
+ portals and geometry-dependent components remain explicitly deferred until an
82
+ isolated browser fixture can make their states deterministic.
@@ -0,0 +1,37 @@
1
+ # Component guide template
2
+
3
+ Use this structure for each public component family.
4
+
5
+ ```markdown
6
+ # Component
7
+
8
+ One-sentence intent.
9
+
10
+ ## When to use
11
+
12
+ ## When not to use
13
+
14
+ ## Anatomy
15
+
16
+ ## Usage
17
+
18
+ ## Variants and sizes
19
+
20
+ ## API
21
+
22
+ ## States and interaction
23
+
24
+ ## Keyboard and accessibility
25
+
26
+ ## Platform behavior
27
+
28
+ ## Do
29
+
30
+ ## Don't
31
+
32
+ ## Testing
33
+ ```
34
+
35
+ Document the real exported API. Include neighboring-component decisions and
36
+ the states callers must implement. Keep examples compact and use semantic
37
+ theme tokens.
@@ -0,0 +1,185 @@
1
+ # Design tokens
2
+
3
+ The token system makes an interface feel consistent before it makes it
4
+ distinctive. Use semantic roles from `@moldable-ai/ui/styles`; do not choose
5
+ raw palette values, one-off control dimensions, or custom easing curves in app
6
+ chrome.
7
+
8
+ Tokens are CSS custom properties so they work in React, plain CSS, canvas
9
+ overlays, and host-provided webviews. Tailwind aliases are provided for the
10
+ roles that are useful in markup.
11
+
12
+ ## Token layers
13
+
14
+ 1. **Theme primitives** such as `--background`, `--foreground`, and
15
+ `--primary` preserve the shadcn-compatible theme contract.
16
+ 2. **Semantic roles** such as `--surface-recessed`, `--text-secondary`, and
17
+ `--control-pressed` describe intent.
18
+ 3. **Component recipes** combine roles into a complete control or layout.
19
+
20
+ Apps should primarily use layer two through shared components or the Tailwind
21
+ aliases below. Override theme primitives to brand a complete app. Override a
22
+ semantic role only when the meaning of that role changes for the entire
23
+ subtree.
24
+
25
+ ## Typography
26
+
27
+ The default UI font is the platform sans-serif stack. Monospaced text uses the
28
+ platform monospace stack. Prefer `Text` for normal interface copy; the token
29
+ utilities are useful for display-scale titles and highly composed canvases.
30
+
31
+ | Role | CSS token | Tailwind utility | Use |
32
+ | ------- | ------------------ | ----------------- | ---------------------------------- |
33
+ | Display | `--type-display-*` | `text-ui-display` | One dominant app or document title |
34
+ | Heading | `--type-heading-*` | `text-ui-heading` | Primary view heading |
35
+ | Title | `--type-title-*` | `text-ui-title` | Major section title |
36
+ | Body | `--type-body-*` | `text-ui-body` | Dense working content |
37
+ | Label | `--type-label-*` | `text-ui-label` | Controls and metadata |
38
+ | Caption | `--type-caption-*` | `text-ui-caption` | Timestamps and compact annotations |
39
+
40
+ Use display type sparingly. A large title can establish a focused canvas, but
41
+ it should not force every utility screen into a marketing-page hierarchy.
42
+ Prefer `font-sans` and `font-mono` over naming a platform font directly.
43
+
44
+ ## Density
45
+
46
+ Density is contextual, not a global scale transform. Place `data-density` on
47
+ the smallest pane that needs a different rhythm:
48
+
49
+ ```tsx
50
+ <section data-density="compact">
51
+ <Toolbar>{/* compact desktop actions */}</Toolbar>
52
+ <div className="min-h-row">{/* selectable row */}</div>
53
+ </section>
54
+ ```
55
+
56
+ Supported values are:
57
+
58
+ - `compact`: inspectors, source lists, and toolbars.
59
+ - default (attribute omitted): general app UI.
60
+ - `comfortable`: touch-forward or presentation-oriented surfaces.
61
+
62
+ The scope sets control heights, row and toolbar heights, gaps, inline padding,
63
+ pane padding, and section spacing. Utilities include `h-control-xs`,
64
+ `h-control-sm`, `h-control-md`, `h-control-lg`, `min-h-row`, `min-h-toolbar`,
65
+ `gap-control-gap`, `px-control-inline`, `p-pane`, and `gap-section`.
66
+
67
+ Component size or density props remain authoritative when supplied. Do not use
68
+ density to shrink labels below readable sizes or to make a pointer-only target
69
+ difficult to acquire.
70
+
71
+ ## Text and surfaces
72
+
73
+ Use the narrowest semantic role that describes the region:
74
+
75
+ | Role | Tailwind alias | Purpose |
76
+ | -------------------- | --------------------- | --------------------------------- |
77
+ | `--text-primary` | `text-text-primary` | Primary content |
78
+ | `--text-secondary` | `text-text-secondary` | Supporting content |
79
+ | `--text-tertiary` | `text-text-tertiary` | De-emphasized metadata |
80
+ | `--text-disabled` | `text-text-disabled` | Unavailable content |
81
+ | `--surface-canvas` | `bg-surface-canvas` | Primary work surface |
82
+ | `--surface-raised` | `bg-surface-raised` | Bounded content above the canvas |
83
+ | `--surface-recessed` | `bg-surface-recessed` | Wells and subordinate regions |
84
+ | `--surface-sidebar` | `bg-surface-sidebar` | Source navigation |
85
+ | `--surface-toolbar` | `bg-surface-toolbar` | Translucent window or pane chrome |
86
+ | `--surface-overlay` | `bg-surface-overlay` | Menus, popovers, and toasts |
87
+ | `--surface-selected` | `bg-surface-selected` | Selected collection items |
88
+
89
+ Use `border-separator` for ordinary pane boundaries and
90
+ `border-separator-strong` when the boundary must remain clear over imagery or
91
+ a busy canvas. Avoid stacking raised surfaces inside cards merely to create
92
+ visual hierarchy; whitespace and a separator are usually quieter.
93
+
94
+ ## Control states
95
+
96
+ Control state roles are shared across buttons, rows, grid items, segmented
97
+ controls, and fields:
98
+
99
+ - `--control-hover`
100
+ - `--control-pressed`
101
+ - `--control-selected`
102
+ - `--control-selected-foreground`
103
+ - `--control-disabled`
104
+ - `--control-focus`
105
+ - `--control-invalid`
106
+
107
+ A complete recipe covers rest, hover, pressed, focus-visible, selected,
108
+ disabled, and invalid states. Disabled wins over pointer states. Focus remains
109
+ visible when combined with selected or invalid. Selection is durable state;
110
+ hover is not a substitute for it.
111
+
112
+ Do not use state-layer colors as arbitrary fills. Prefer the shared component
113
+ when one exists.
114
+
115
+ ## Shape and materials
116
+
117
+ Use `rounded-control`, `rounded-container`, and `rounded-overlay` to keep
118
+ related objects visually consistent. `rounded-window` is host-informed and
119
+ normally only useful in previews; the native host owns the actual window
120
+ shape.
121
+
122
+ Adaptive material has two semantic variants. Each includes fill, fallback,
123
+ border, highlight, blur, and saturation tokens:
124
+
125
+ - `--material-regular-*` supports normal toolbar and control chrome.
126
+ - `--material-clear-*` supports compact controls over media or a richly
127
+ colored canvas.
128
+ - `shadow-panel`, `shadow-overlay`, and `shadow-window` provide elevation
129
+ independently from translucency.
130
+
131
+ Use `Material` and `MaterialGroup` instead of assembling those tokens in app
132
+ markup. `MaterialGroup` owns one sampled layer for a related control cluster;
133
+ its children must not add nested material.
134
+
135
+ Translucency must have an opaque fallback. The token system removes blur and
136
+ uses opaque toolbar and overlay surfaces when the operating system requests
137
+ reduced transparency or an ancestor has `data-transparency="reduced"`.
138
+ Unsupported renderers stay on the same opaque fallback. Increased contrast
139
+ makes fills more opaque and strengthens their borders.
140
+
141
+ Material is a control and navigation affordance. Primary canvases, documents,
142
+ tables, calendars, forms, cards, sheets, and inspectors remain opaque. See
143
+ [Adaptive materials](./adaptive-materials.md) for composition rules.
144
+
145
+ ## Motion
146
+
147
+ Use motion to explain entry, exit, reordering, or a state transition:
148
+
149
+ | Purpose | Duration | Easing |
150
+ | ------------------------------- | --------------------------- | ------------------------ |
151
+ | Immediate feedback | `--motion-duration-instant` | `--motion-ease-standard` |
152
+ | Hover and press | `--motion-duration-fast` | `--motion-ease-standard` |
153
+ | Popover or selection transition | `--motion-duration-normal` | `--motion-ease-enter` |
154
+ | Large surface transition | `--motion-duration-slow` | `--motion-ease-enter` |
155
+
156
+ `ease-standard`, `ease-enter`, `ease-exit`, and `ease-spring` are available as
157
+ Tailwind utilities. Use the duration variables directly or with an arbitrary
158
+ value such as `duration-[var(--motion-duration-fast)]`.
159
+
160
+ Reduced-motion preferences collapse token durations to 1ms and remove
161
+ decorative package animations. Components must still render their final state
162
+ without depending on an animation callback.
163
+
164
+ ## Contrast and themes
165
+
166
+ Light and dark themes share semantic names. Never branch app behavior on a
167
+ specific color value. Increased-contrast preferences strengthen separators,
168
+ state layers, and tertiary text. Forced-color mode maps semantic roles to
169
+ system colors and removes material shadows.
170
+
171
+ Test at minimum:
172
+
173
+ - Light and dark.
174
+ - Default and increased contrast.
175
+ - Reduced motion and reduced transparency.
176
+ - Compact and comfortable density.
177
+ - Focus-visible, selected, disabled, and invalid states in combination.
178
+
179
+ ## Adding a token
180
+
181
+ Add a token only when the decision repeats across component families. Name it
182
+ for its role, provide light and dark behavior when necessary, define
183
+ accessibility fallbacks, expose a Tailwind alias only if it improves normal
184
+ composition, and document the intended use. A component-specific visual tweak
185
+ belongs in that component recipe instead.
@@ -0,0 +1,58 @@
1
+ # Foundations
2
+
3
+ ## Character
4
+
5
+ Moldable apps are local working instruments, not websites or SaaS dashboards.
6
+ The interface should be calm, compact, direct, and organized around the user's
7
+ objects. Decoration must clarify hierarchy or state.
8
+
9
+ ## Hierarchy
10
+
11
+ Use `Text` roles instead of rebuilding typography from arbitrary utilities.
12
+ Most desktop chrome should use `regular`, `strong`, `small`, or
13
+ `small-strong`. Reserve `heading1` for a view's primary title and `heading2`
14
+ for a major section.
15
+
16
+ Use one obvious accent action in a region. Secondary actions should be quiet.
17
+ Status color communicates status only; it is not decoration.
18
+
19
+ ## Density
20
+
21
+ - Compact controls are the default in toolbars and inspectors.
22
+ - Preserve usable pointer targets even when the visible control is small.
23
+ - Prefer separators, background shifts, and whitespace over nested cards.
24
+ - Working panes own scrolling. The window shell should not accidentally scroll.
25
+ - Set `data-density="compact"`, `"default"`, or `"comfortable"` at a
26
+ composition boundary. Components should consume density tokens rather than
27
+ inventing per-screen heights.
28
+
29
+ ## Surfaces
30
+
31
+ - `background`: primary work surface.
32
+ - `muted`: subordinate region, well, or quiet selection context.
33
+ - `sidebar`: navigation/list source surface.
34
+ - `popover`: temporary floating surface.
35
+ - `card`: bounded content group, not a universal page wrapper.
36
+
37
+ Use semantic tokens only. Do not introduce raw gray, zinc, white, or black
38
+ classes in app UI.
39
+
40
+ Use adaptive material only for navigation and control layers. Regular material
41
+ supports toolbars and grouped controls; clear material is reserved for compact
42
+ controls over media. Content canvases and content-bearing surfaces stay
43
+ opaque. Group related controls under one sampler and never nest material
44
+ effects.
45
+
46
+ ## Motion
47
+
48
+ Motion explains state or continuity. Keep it brief and honor
49
+ `prefers-reduced-motion`. Pulse only for live activity; a static notification
50
+ does not pulse.
51
+
52
+ Use the shared duration and easing tokens. Do not make routine controls feel
53
+ springy, and do not animate layout merely to make a screen feel active.
54
+
55
+ ## Focus
56
+
57
+ Keyboard focus must remain visible against every surface. Do not remove a
58
+ focus ring unless the replacement is at least as clear.
@@ -0,0 +1,33 @@
1
+ # Native integration
2
+
3
+ Renderer components should feel compatible with macOS without pretending to be
4
+ native controls. Use a host-native control only when Moldable exposes a shared,
5
+ transport-neutral capability for it.
6
+
7
+ ## Selection policy
8
+
9
+ 1. Prefer a real Moldable host contract when the operation is inherently
10
+ platform-owned, such as sharing, file selection, or a system permission.
11
+ 2. Use the shared renderer component when its semantics are app-owned.
12
+ 3. Provide an accessible renderer fallback only when the product contract
13
+ defines what happens on desktop, iOS, and remote clients.
14
+
15
+ Do not create UI-only no-op stubs for native menus, share sheets, or date
16
+ pickers. First define ownership, cancellation, errors, replay/reconnect
17
+ behavior, and platform fallbacks.
18
+
19
+ `DateField` is the portable renderer baseline. A future system date picker,
20
+ share sheet, or native menu must only be selected after the host advertises the
21
+ service through a versioned context. Requests must remain bound to the
22
+ originating app window and user activation.
23
+
24
+ Standalone windows should remain host-owned surfaces around an app frame. Do
25
+ not load arbitrary app URLs directly into a privileged native webview merely to
26
+ gain window chrome.
27
+
28
+ ## Platform details
29
+
30
+ Use toolbars, panes, compact controls, keyboard commands, restrained material,
31
+ and clear selection state to achieve platform affinity. Do not copy private
32
+ framework code, undocumented IPC, proprietary fonts, or host-specific symbol
33
+ plumbing.
@@ -0,0 +1,136 @@
1
+ # Standalone app windows
2
+
3
+ Moldable apps should work as focused windows as well as embedded views. The
4
+ same app surface must survive either presentation without imitating operating
5
+ system chrome or assuming that a global desktop shell is present.
6
+
7
+ ## Ownership boundary
8
+
9
+ | Layer | Owns |
10
+ | ----------------- | --------------------------------------------------------------------------------------------------------------------------------- |
11
+ | Native host | Window creation, close/minimize/zoom controls, dragging, resize regions, focus state, system menus, share sheets, and safe insets |
12
+ | Shared UI package | Semantic window tokens, app-level layout recipes, accessible controls, density, and embedded fallbacks |
13
+ | App | Title, document context, primary canvas, toolbars, navigation, selection, and app-specific state |
14
+ | Orchestrator | Cross-app commands, conversation, launching, and switching; it is not permanent app chrome |
15
+
16
+ Do not draw traffic-light controls or recreate a title bar in React. When a
17
+ platform cannot provide a native capability, expose it through a host contract
18
+ or use a clearly web-native fallback.
19
+
20
+ ## Window inset contract
21
+
22
+ The stylesheet defines a renderer boundary with zero-value browser-safe
23
+ defaults:
24
+
25
+ - `--window-safe-area-top`
26
+ - `--window-safe-area-inline-start`
27
+ - `--window-safe-area-inline-end`
28
+ - `--window-safe-area-bottom`
29
+ - `--window-titlebar-height`
30
+ - `--window-drag-region-height`
31
+ - `--window-control-inset-inline-start`
32
+ - `--window-control-inset-inline-end`
33
+ - `--window-content-inset-top`
34
+ - `--window-content-inset-inline-start`
35
+ - `--window-content-inset-inline-end`
36
+ - `--window-content-inset-bottom`
37
+ - `--window-corner-radius`
38
+
39
+ The host may set the primitive safe-area, titlebar, and control inset values on
40
+ the document root. Composite content insets then resolve automatically. The
41
+ transport used to deliver those values belongs to the host integration layer,
42
+ not individual apps.
43
+
44
+ Dedicated windows use the host titlebar by default. An app with a unified
45
+ toolbar can declare `{ "window": { "titlebar": "app" } }` in `moldable.json`.
46
+ In that mode the host removes its strip and advertises the titlebar height and
47
+ leading window-control inset. `AppFrameTitlebar` consumes those values, sends
48
+ `startWindowDrag` on a non-interactive pointerdown, and sends
49
+ `titlebarDoubleClick` on a non-interactive double-click. The latter toggles
50
+ maximize as a cross-platform approximation of the macOS titlebar zoom action.
51
+
52
+ Window appearance roles are `--window-chrome-background`,
53
+ `--window-chrome-foreground`, `--window-chrome-muted-foreground`,
54
+ `--window-border`, and `--material-shadow-window`. The host may update the
55
+ foreground roles when a window becomes inactive. Apps must not infer focus
56
+ from pointer events.
57
+
58
+ ## A portable root
59
+
60
+ Keep the root bounded and make one descendant own each scroll region:
61
+
62
+ ```tsx
63
+ <main
64
+ className="bg-surface-canvas text-text-primary flex h-dvh min-h-0 min-w-0 flex-col overflow-hidden"
65
+ style={{
66
+ paddingTop: 'var(--window-content-inset-top)',
67
+ paddingInlineStart: 'var(--window-content-inset-inline-start)',
68
+ paddingInlineEnd: 'var(--window-content-inset-inline-end)',
69
+ paddingBottom: 'var(--window-content-inset-bottom)',
70
+ }}
71
+ >
72
+ <Toolbar>{/* app title and primary actions */}</Toolbar>
73
+ <PanelContent>{/* the primary canvas or collection */}</PanelContent>
74
+ </main>
75
+ ```
76
+
77
+ This conservative layout places app chrome below any overlay titlebar. A
78
+ future shared window-shell recipe may integrate a toolbar into a host-declared
79
+ drag region, but only the platform adapter should mark draggable and
80
+ non-draggable areas.
81
+
82
+ In embedded presentation all window insets resolve to zero. If chat overlays
83
+ the app, the owning bottom scroll region uses `--chat-safe-padding`. A
84
+ standalone window must not reserve that space unless the orchestrator is
85
+ actually overlaid in that window.
86
+
87
+ ## Window-shaped information architecture
88
+
89
+ A standalone app should identify itself without relying on a global sidebar:
90
+
91
+ - Put the current app or document identity in its own top region.
92
+ - Keep the primary object visually dominant.
93
+ - Place frequent tools near the edge of the canvas they affect.
94
+ - Use a sidebar or inspector only when the task needs one.
95
+ - Keep primary actions reachable at narrow widths.
96
+ - Make empty and onboarding states feel like the app, not a generic dialog.
97
+
98
+ Large, single-purpose canvases can use display typography and generous space.
99
+ Dense utilities should retain compact controls and stronger information
100
+ hierarchy. Native feeling comes from predictable focus, keyboard behavior,
101
+ selection, materials, and restraint—not from decorative window chrome.
102
+
103
+ ## Multi-window state
104
+
105
+ Treat each window as an independent client of shared product APIs:
106
+
107
+ - Give each window its own React root, focus, selection, and transient UI
108
+ state.
109
+ - Keep durable workspace data behind the same authoritative API used by
110
+ embedded and remote clients.
111
+ - Make document and route identity explicit so a window can reconnect or
112
+ restore without a process-global singleton.
113
+ - Define ordering, replay, and conflict behavior for live shared state.
114
+ - Keep binary assets addressable; do not place large payloads in window or
115
+ conversation events.
116
+
117
+ Closing one window must not imply closing an app service or discarding another
118
+ window's state. System menu, share, file, and date behavior should remain
119
+ behind platform-neutral capability contracts with native adapters.
120
+
121
+ ## Verification matrix
122
+
123
+ Every app shell or shared window recipe should cover:
124
+
125
+ - Embedded and standalone presentation.
126
+ - Active and inactive native windows.
127
+ - Light and dark appearance.
128
+ - Narrow, default, and wide sizes.
129
+ - Keyboard-only use and visible focus.
130
+ - Increased contrast, reduced motion, and reduced transparency.
131
+ - Empty, loading, error, ready, and offline or disconnected states.
132
+ - Reopen or reconnect with durable state intact.
133
+
134
+ Visual regression fixtures should capture the same canonical states at stable
135
+ viewport sizes. Interaction tests should verify focus movement, selection,
136
+ resize behavior, and that window controls remain host-owned.