@brett_lamy/ui 2.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/README.md +12 -5
  2. package/dist/components/adaptive-pane.d.ts.map +1 -1
  3. package/dist/components/adaptive-pane.js +30 -0
  4. package/dist/components/animated-height.d.ts.map +1 -1
  5. package/dist/components/animated-height.js +82 -0
  6. package/dist/{templates → components}/artifact-chat-container.d.ts +12 -5
  7. package/dist/components/artifact-chat-container.d.ts.map +1 -0
  8. package/dist/components/artifact-chat-container.js +200 -0
  9. package/dist/components/avatar.js +26 -0
  10. package/dist/components/badge.js +24 -0
  11. package/dist/components/button.d.ts.map +1 -1
  12. package/dist/components/button.js +46 -0
  13. package/dist/components/card.js +56 -0
  14. package/dist/components/celebrate.d.ts.map +1 -1
  15. package/dist/components/celebrate.js +142 -0
  16. package/dist/components/chat-column.d.ts.map +1 -0
  17. package/dist/components/chat-column.js +26 -0
  18. package/dist/components/checkbox.d.ts +2 -2
  19. package/dist/components/checkbox.d.ts.map +1 -1
  20. package/dist/components/checkbox.js +55 -0
  21. package/dist/components/combobox.d.ts +1 -1
  22. package/dist/components/combobox.d.ts.map +1 -1
  23. package/dist/components/combobox.js +65 -0
  24. package/dist/components/command-menu.d.ts.map +1 -1
  25. package/dist/components/command-menu.js +906 -0
  26. package/dist/components/composer/annotator.d.ts.map +1 -0
  27. package/dist/components/composer/annotator.js +17 -0
  28. package/dist/components/composer/composer-files.d.ts.map +1 -0
  29. package/dist/components/composer/composer-files.js +91 -0
  30. package/dist/components/{workbench/wb-popover.d.ts → composer/composer-popover.d.ts} +1 -1
  31. package/dist/components/composer/composer-popover.d.ts.map +1 -0
  32. package/dist/components/composer/composer-popover.js +29 -0
  33. package/dist/components/{workbench → composer}/composer.d.ts +3 -3
  34. package/dist/components/composer/composer.d.ts.map +1 -0
  35. package/dist/components/composer/composer.js +1633 -0
  36. package/dist/components/{workbench/chat.d.ts → conversation.d.ts} +2 -2
  37. package/dist/components/conversation.d.ts.map +1 -0
  38. package/dist/components/conversation.js +357 -0
  39. package/dist/components/credenza.d.ts.map +1 -1
  40. package/dist/components/credenza.js +294 -0
  41. package/dist/components/dialog.d.ts +2 -2
  42. package/dist/components/dialog.d.ts.map +1 -1
  43. package/dist/components/dialog.js +125 -0
  44. package/dist/components/disclosure.d.ts.map +1 -1
  45. package/dist/components/disclosure.js +59 -0
  46. package/dist/components/dropdown-menu.d.ts +1 -1
  47. package/dist/components/dropdown-menu.d.ts.map +1 -1
  48. package/dist/components/dropdown-menu.js +114 -0
  49. package/dist/components/edge-drawer.js +73 -0
  50. package/dist/components/edit-bar.d.ts.map +1 -1
  51. package/dist/components/edit-bar.js +33 -0
  52. package/dist/components/{chat/floating-chat.d.ts → floating-chat.d.ts} +8 -4
  53. package/dist/components/floating-chat.d.ts.map +1 -0
  54. package/dist/components/floating-chat.js +288 -0
  55. package/dist/components/{chat/floating-sheet.d.ts → floating-sheet.d.ts} +5 -5
  56. package/dist/components/floating-sheet.d.ts.map +1 -0
  57. package/dist/components/floating-sheet.js +252 -0
  58. package/dist/components/form.d.ts.map +1 -1
  59. package/dist/components/form.js +32 -0
  60. package/dist/{lib/workbench/icons.d.ts → components/icon-button.d.ts} +5 -5
  61. package/dist/components/icon-button.d.ts.map +1 -0
  62. package/dist/components/icon-button.js +31 -0
  63. package/dist/components/icon-swap.d.ts.map +1 -1
  64. package/dist/components/icon-swap.js +80 -0
  65. package/dist/components/index-bar.d.ts +14 -1
  66. package/dist/components/index-bar.d.ts.map +1 -1
  67. package/dist/components/index-bar.js +249 -0
  68. package/dist/components/input.d.ts.map +1 -1
  69. package/dist/components/input.js +30 -0
  70. package/dist/components/kbd.d.ts.map +1 -1
  71. package/dist/components/kbd.js +21 -0
  72. package/dist/components/label.d.ts.map +1 -1
  73. package/dist/components/label.js +22 -0
  74. package/dist/components/list-box.d.ts +1 -3
  75. package/dist/components/list-box.d.ts.map +1 -1
  76. package/dist/components/list-box.js +104 -0
  77. package/dist/components/list.d.ts.map +1 -1
  78. package/dist/components/list.js +491 -0
  79. package/dist/components/markdown-editor.d.ts.map +1 -1
  80. package/dist/components/markdown-editor.js +322 -0
  81. package/dist/components/{workbench/markdown.d.ts → markdown-view.d.ts} +1 -1
  82. package/dist/components/markdown-view.d.ts.map +1 -0
  83. package/dist/components/markdown-view.js +129 -0
  84. package/dist/components/measure-h.d.ts.map +1 -1
  85. package/dist/components/measure-h.js +20 -0
  86. package/dist/components/message-scroller.d.ts.map +1 -0
  87. package/dist/components/message-scroller.js +247 -0
  88. package/dist/components/morph.d.ts.map +1 -1
  89. package/dist/components/morph.js +89 -0
  90. package/dist/components/navigation-stack.d.ts +14 -0
  91. package/dist/components/navigation-stack.d.ts.map +1 -1
  92. package/dist/components/navigation-stack.js +506 -0
  93. package/dist/components/now-playing-bars.js +38 -0
  94. package/dist/components/number-morph.d.ts.map +1 -1
  95. package/dist/components/number-morph.js +123 -0
  96. package/dist/components/pencilkit/constants.d.ts.map +1 -0
  97. package/dist/components/pencilkit/constants.js +63 -0
  98. package/dist/components/pencilkit/pencil-canvas.d.ts +1 -1
  99. package/dist/components/pencilkit/pencil-canvas.d.ts.map +1 -1
  100. package/dist/components/pencilkit/pencil-canvas.js +105 -0
  101. package/dist/components/pencilkit/pencil-toolbar.d.ts +2 -2
  102. package/dist/components/pencilkit/pencil-toolbar.d.ts.map +1 -1
  103. package/dist/components/pencilkit/pencil-toolbar.js +186 -0
  104. package/dist/components/pencilkit/pencilkit-annotator.d.ts +1 -1
  105. package/dist/components/pencilkit/pencilkit-annotator.d.ts.map +1 -1
  106. package/dist/components/pencilkit/pencilkit-annotator.js +44 -0
  107. package/dist/components/pencilkit/stroke-path.d.ts +1 -1
  108. package/dist/components/pencilkit/stroke-path.d.ts.map +1 -1
  109. package/dist/components/pencilkit/stroke-path.js +44 -0
  110. package/dist/components/pencilkit/use-pencil-history.d.ts +2 -2
  111. package/dist/components/pencilkit/use-pencil-history.d.ts.map +1 -1
  112. package/dist/components/pencilkit/use-pencil-history.js +25 -0
  113. package/dist/components/plain-button.d.ts +10 -0
  114. package/dist/components/plain-button.d.ts.map +1 -0
  115. package/dist/components/plain-button.js +23 -0
  116. package/dist/components/popover.d.ts +1 -1
  117. package/dist/components/popover.d.ts.map +1 -1
  118. package/dist/components/popover.js +36 -0
  119. package/dist/components/progress-ring.d.ts.map +1 -1
  120. package/dist/components/progress-ring.js +195 -0
  121. package/dist/components/progress-stepper.d.ts.map +1 -0
  122. package/dist/components/progress-stepper.js +62 -0
  123. package/dist/components/progress.d.ts.map +1 -1
  124. package/dist/components/progress.js +54 -0
  125. package/dist/components/qr-svg.d.ts.map +1 -1
  126. package/dist/components/qr-svg.js +74 -0
  127. package/dist/components/radio-group.d.ts +1 -1
  128. package/dist/components/radio-group.d.ts.map +1 -1
  129. package/dist/components/radio-group.js +41 -0
  130. package/dist/components/replay-preview.d.ts +4 -0
  131. package/dist/components/replay-preview.d.ts.map +1 -0
  132. package/dist/components/replay-preview.js +3 -0
  133. package/dist/components/scroll-area.js +23 -0
  134. package/dist/components/search-field.d.ts.map +1 -1
  135. package/dist/components/search-field.js +44 -0
  136. package/dist/components/segmented.d.ts +1 -1
  137. package/dist/components/segmented.d.ts.map +1 -1
  138. package/dist/components/segmented.js +32 -0
  139. package/dist/components/select.d.ts +1 -1
  140. package/dist/components/select.d.ts.map +1 -1
  141. package/dist/components/select.js +93 -0
  142. package/dist/components/separator.d.ts.map +1 -1
  143. package/dist/components/separator.js +40 -0
  144. package/dist/components/sheet.d.ts.map +1 -1
  145. package/dist/components/sheet.js +55 -0
  146. package/dist/components/side-drawer.d.ts +10 -1
  147. package/dist/components/side-drawer.d.ts.map +1 -1
  148. package/dist/components/side-drawer.js +247 -0
  149. package/dist/components/sidebar.d.ts.map +1 -1
  150. package/dist/components/sidebar.js +282 -0
  151. package/dist/components/skeleton.js +48 -0
  152. package/dist/components/slider.d.ts +1 -1
  153. package/dist/components/slider.d.ts.map +1 -1
  154. package/dist/components/slider.js +98 -0
  155. package/dist/components/snap-sheet.d.ts.map +1 -0
  156. package/dist/components/snap-sheet.js +100 -0
  157. package/dist/components/spinner.js +35 -0
  158. package/dist/components/split-view.d.ts.map +1 -1
  159. package/dist/components/split-view.js +1060 -0
  160. package/dist/components/switch.d.ts.map +1 -1
  161. package/dist/components/switch.js +27 -0
  162. package/dist/components/syntax-highlighting.d.ts.map +1 -1
  163. package/dist/components/syntax-highlighting.js +293 -0
  164. package/dist/components/tab-bar.js +28 -0
  165. package/dist/components/tab-view.d.ts +1 -1
  166. package/dist/components/tab-view.d.ts.map +1 -1
  167. package/dist/components/tab-view.js +307 -0
  168. package/dist/components/tabs.d.ts +1 -1
  169. package/dist/components/tabs.d.ts.map +1 -1
  170. package/dist/components/tabs.js +86 -0
  171. package/dist/components/text-field.d.ts.map +1 -1
  172. package/dist/components/text-field.js +29 -0
  173. package/dist/components/text-morph.d.ts.map +1 -1
  174. package/dist/components/text-morph.js +131 -0
  175. package/dist/components/textarea.d.ts.map +1 -1
  176. package/dist/components/textarea.js +30 -0
  177. package/dist/components/toast.d.ts +0 -2
  178. package/dist/components/toast.d.ts.map +1 -1
  179. package/dist/components/toast.js +302 -0
  180. package/dist/components/toggle-group.d.ts +1 -1
  181. package/dist/components/toggle-group.d.ts.map +1 -1
  182. package/dist/components/toggle-group.js +48 -0
  183. package/dist/components/toggle.d.ts +1 -1
  184. package/dist/components/toggle.d.ts.map +1 -1
  185. package/dist/components/toggle.js +42 -0
  186. package/dist/components/tooltip.d.ts +1 -1
  187. package/dist/components/tooltip.d.ts.map +1 -1
  188. package/dist/components/tooltip.js +42 -0
  189. package/dist/{lib/workbench/theme.d.ts → components/workbench-theme.d.ts} +2 -2
  190. package/dist/components/workbench-theme.d.ts.map +1 -0
  191. package/dist/components/workbench-theme.js +34 -0
  192. package/dist/index.css +1 -1
  193. package/dist/index.d.ts +29 -47
  194. package/dist/index.d.ts.map +1 -1
  195. package/dist/index.js +94 -20350
  196. package/dist/lib/append-stream.d.ts +43 -0
  197. package/dist/lib/append-stream.d.ts.map +1 -0
  198. package/dist/lib/append-stream.js +128 -0
  199. package/dist/lib/container.d.ts.map +1 -1
  200. package/dist/lib/container.js +49 -0
  201. package/dist/lib/durable-streams.d.ts +102 -0
  202. package/dist/lib/durable-streams.d.ts.map +1 -0
  203. package/dist/lib/durable-streams.js +280 -0
  204. package/dist/lib/icon-shapes/chat.js +13 -0
  205. package/dist/lib/icon-shapes/pencilkit.js +20 -0
  206. package/dist/lib/icon-shapes/workbench.js +47 -0
  207. package/dist/lib/icon.d.ts +1 -1
  208. package/dist/lib/icon.d.ts.map +1 -1
  209. package/dist/lib/icon.js +1774 -0
  210. package/dist/lib/motion.d.ts +16 -0
  211. package/dist/lib/motion.d.ts.map +1 -1
  212. package/dist/lib/motion.js +104 -0
  213. package/dist/lib/{chat/persistent-host.d.ts → persistent-host.d.ts} +1 -1
  214. package/dist/lib/persistent-host.d.ts.map +1 -0
  215. package/dist/lib/persistent-host.js +41 -0
  216. package/dist/lib/primitives.js +8 -0
  217. package/dist/lib/qr.js +552 -0
  218. package/dist/lib/row-label.d.ts.map +1 -1
  219. package/dist/lib/row-label.js +10 -0
  220. package/dist/lib/session-recorder.d.ts +87 -0
  221. package/dist/lib/session-recorder.d.ts.map +1 -0
  222. package/dist/lib/session-recorder.js +257 -0
  223. package/dist/lib/sheet-drag.d.ts +1 -1
  224. package/dist/lib/sheet-drag.d.ts.map +1 -1
  225. package/dist/lib/sheet-drag.js +128 -0
  226. package/dist/lib/syntax.js +204 -0
  227. package/dist/lib/theme.d.ts +33 -8
  228. package/dist/lib/theme.d.ts.map +1 -1
  229. package/dist/lib/theme.js +138 -0
  230. package/dist/lib/tokens.generated.d.ts +16 -0
  231. package/dist/lib/tokens.generated.d.ts.map +1 -0
  232. package/dist/lib/tokens.generated.js +22 -0
  233. package/dist/lib/utils.d.ts +5 -0
  234. package/dist/lib/utils.d.ts.map +1 -1
  235. package/dist/lib/utils.js +18 -0
  236. package/dist/theme.css +0 -60
  237. package/package.json +5 -7
  238. package/dist/components/adaptive-pane.stories.d.ts +0 -7
  239. package/dist/components/adaptive-pane.stories.d.ts.map +0 -1
  240. package/dist/components/avatar.stories.d.ts +0 -9
  241. package/dist/components/avatar.stories.d.ts.map +0 -1
  242. package/dist/components/badge.stories.d.ts +0 -9
  243. package/dist/components/badge.stories.d.ts.map +0 -1
  244. package/dist/components/button.stories.d.ts +0 -11
  245. package/dist/components/button.stories.d.ts.map +0 -1
  246. package/dist/components/card.stories.d.ts +0 -9
  247. package/dist/components/card.stories.d.ts.map +0 -1
  248. package/dist/components/chat/chat-column.d.ts.map +0 -1
  249. package/dist/components/chat/chat-column.stories.d.ts +0 -9
  250. package/dist/components/chat/chat-column.stories.d.ts.map +0 -1
  251. package/dist/components/chat/floating-chat.d.ts.map +0 -1
  252. package/dist/components/chat/floating-chat.stories.d.ts +0 -17
  253. package/dist/components/chat/floating-chat.stories.d.ts.map +0 -1
  254. package/dist/components/chat/floating-sheet.d.ts.map +0 -1
  255. package/dist/components/chat/floating-sheet.stories.d.ts +0 -22
  256. package/dist/components/chat/floating-sheet.stories.d.ts.map +0 -1
  257. package/dist/components/chat/progress-stepper.d.ts.map +0 -1
  258. package/dist/components/checkbox.stories.d.ts +0 -11
  259. package/dist/components/checkbox.stories.d.ts.map +0 -1
  260. package/dist/components/combobox.stories.d.ts +0 -10
  261. package/dist/components/combobox.stories.d.ts.map +0 -1
  262. package/dist/components/command-menu.stories.d.ts +0 -17
  263. package/dist/components/command-menu.stories.d.ts.map +0 -1
  264. package/dist/components/credenza.stories.d.ts +0 -8
  265. package/dist/components/credenza.stories.d.ts.map +0 -1
  266. package/dist/components/dialog.stories.d.ts +0 -12
  267. package/dist/components/dialog.stories.d.ts.map +0 -1
  268. package/dist/components/disclosure.stories.d.ts +0 -10
  269. package/dist/components/disclosure.stories.d.ts.map +0 -1
  270. package/dist/components/dropdown-menu.stories.d.ts +0 -11
  271. package/dist/components/dropdown-menu.stories.d.ts.map +0 -1
  272. package/dist/components/edge-drawer.stories.d.ts +0 -8
  273. package/dist/components/edge-drawer.stories.d.ts.map +0 -1
  274. package/dist/components/edit-bar.stories.d.ts +0 -10
  275. package/dist/components/edit-bar.stories.d.ts.map +0 -1
  276. package/dist/components/form.stories.d.ts +0 -9
  277. package/dist/components/form.stories.d.ts.map +0 -1
  278. package/dist/components/haptic-indicator.d.ts +0 -11
  279. package/dist/components/haptic-indicator.d.ts.map +0 -1
  280. package/dist/components/haptic-indicator.stories.d.ts +0 -8
  281. package/dist/components/haptic-indicator.stories.d.ts.map +0 -1
  282. package/dist/components/index-bar.stories.d.ts +0 -12
  283. package/dist/components/index-bar.stories.d.ts.map +0 -1
  284. package/dist/components/input.stories.d.ts +0 -10
  285. package/dist/components/input.stories.d.ts.map +0 -1
  286. package/dist/components/kbd.stories.d.ts +0 -9
  287. package/dist/components/kbd.stories.d.ts.map +0 -1
  288. package/dist/components/label.stories.d.ts +0 -8
  289. package/dist/components/label.stories.d.ts.map +0 -1
  290. package/dist/components/list-box.stories.d.ts +0 -9
  291. package/dist/components/list-box.stories.d.ts.map +0 -1
  292. package/dist/components/list-row.stories.d.ts +0 -24
  293. package/dist/components/list-row.stories.d.ts.map +0 -1
  294. package/dist/components/list.stories.d.ts +0 -27
  295. package/dist/components/list.stories.d.ts.map +0 -1
  296. package/dist/components/markdown-editor.stories.d.ts +0 -17
  297. package/dist/components/markdown-editor.stories.d.ts.map +0 -1
  298. package/dist/components/morph.stories.d.ts +0 -14
  299. package/dist/components/morph.stories.d.ts.map +0 -1
  300. package/dist/components/motion.stories.d.ts +0 -15
  301. package/dist/components/motion.stories.d.ts.map +0 -1
  302. package/dist/components/navigation-stack.stories.d.ts +0 -31
  303. package/dist/components/navigation-stack.stories.d.ts.map +0 -1
  304. package/dist/components/now-playing-bars.stories.d.ts +0 -12
  305. package/dist/components/now-playing-bars.stories.d.ts.map +0 -1
  306. package/dist/components/pencilkit/pencil-canvas.stories.d.ts +0 -18
  307. package/dist/components/pencilkit/pencil-canvas.stories.d.ts.map +0 -1
  308. package/dist/components/pencilkit/pencil-toolbar.stories.d.ts +0 -10
  309. package/dist/components/pencilkit/pencil-toolbar.stories.d.ts.map +0 -1
  310. package/dist/components/popover.stories.d.ts +0 -9
  311. package/dist/components/popover.stories.d.ts.map +0 -1
  312. package/dist/components/progress-ring.stories.d.ts +0 -15
  313. package/dist/components/progress-ring.stories.d.ts.map +0 -1
  314. package/dist/components/progress.stories.d.ts +0 -10
  315. package/dist/components/progress.stories.d.ts.map +0 -1
  316. package/dist/components/qr-svg.stories.d.ts +0 -16
  317. package/dist/components/qr-svg.stories.d.ts.map +0 -1
  318. package/dist/components/radio-group.stories.d.ts +0 -10
  319. package/dist/components/radio-group.stories.d.ts.map +0 -1
  320. package/dist/components/scroll-area.stories.d.ts +0 -8
  321. package/dist/components/scroll-area.stories.d.ts.map +0 -1
  322. package/dist/components/search-field.stories.d.ts +0 -10
  323. package/dist/components/search-field.stories.d.ts.map +0 -1
  324. package/dist/components/segmented.stories.d.ts +0 -8
  325. package/dist/components/segmented.stories.d.ts.map +0 -1
  326. package/dist/components/select.stories.d.ts +0 -12
  327. package/dist/components/select.stories.d.ts.map +0 -1
  328. package/dist/components/separator.stories.d.ts +0 -9
  329. package/dist/components/separator.stories.d.ts.map +0 -1
  330. package/dist/components/sheet.stories.d.ts +0 -12
  331. package/dist/components/sheet.stories.d.ts.map +0 -1
  332. package/dist/components/side-drawer.stories.d.ts +0 -8
  333. package/dist/components/side-drawer.stories.d.ts.map +0 -1
  334. package/dist/components/sidebar.stories.d.ts +0 -10
  335. package/dist/components/sidebar.stories.d.ts.map +0 -1
  336. package/dist/components/skeleton.stories.d.ts +0 -11
  337. package/dist/components/skeleton.stories.d.ts.map +0 -1
  338. package/dist/components/slider.stories.d.ts +0 -12
  339. package/dist/components/slider.stories.d.ts.map +0 -1
  340. package/dist/components/spinner.stories.d.ts +0 -9
  341. package/dist/components/spinner.stories.d.ts.map +0 -1
  342. package/dist/components/split-view.stories.d.ts +0 -58
  343. package/dist/components/split-view.stories.d.ts.map +0 -1
  344. package/dist/components/switch.stories.d.ts +0 -9
  345. package/dist/components/switch.stories.d.ts.map +0 -1
  346. package/dist/components/syntax-highlighting.stories.d.ts +0 -18
  347. package/dist/components/syntax-highlighting.stories.d.ts.map +0 -1
  348. package/dist/components/tab-bar.stories.d.ts +0 -8
  349. package/dist/components/tab-bar.stories.d.ts.map +0 -1
  350. package/dist/components/tab-view.stories.d.ts +0 -37
  351. package/dist/components/tab-view.stories.d.ts.map +0 -1
  352. package/dist/components/tabs.stories.d.ts +0 -9
  353. package/dist/components/tabs.stories.d.ts.map +0 -1
  354. package/dist/components/text-field.stories.d.ts +0 -9
  355. package/dist/components/text-field.stories.d.ts.map +0 -1
  356. package/dist/components/toast.stories.d.ts +0 -13
  357. package/dist/components/toast.stories.d.ts.map +0 -1
  358. package/dist/components/toggle-group.stories.d.ts +0 -10
  359. package/dist/components/toggle-group.stories.d.ts.map +0 -1
  360. package/dist/components/toggle.stories.d.ts +0 -9
  361. package/dist/components/toggle.stories.d.ts.map +0 -1
  362. package/dist/components/tooltip.stories.d.ts +0 -11
  363. package/dist/components/tooltip.stories.d.ts.map +0 -1
  364. package/dist/components/workbench/annotator.d.ts.map +0 -1
  365. package/dist/components/workbench/chat.d.ts.map +0 -1
  366. package/dist/components/workbench/chat.stories.d.ts +0 -13
  367. package/dist/components/workbench/chat.stories.d.ts.map +0 -1
  368. package/dist/components/workbench/composer-files.d.ts.map +0 -1
  369. package/dist/components/workbench/composer.d.ts.map +0 -1
  370. package/dist/components/workbench/composer.stories.d.ts +0 -35
  371. package/dist/components/workbench/composer.stories.d.ts.map +0 -1
  372. package/dist/components/workbench/fixtures.d.ts +0 -38
  373. package/dist/components/workbench/fixtures.d.ts.map +0 -1
  374. package/dist/components/workbench/markdown.d.ts.map +0 -1
  375. package/dist/components/workbench/message-scroller.d.ts.map +0 -1
  376. package/dist/components/workbench/message-scroller.stories.d.ts +0 -9
  377. package/dist/components/workbench/message-scroller.stories.d.ts.map +0 -1
  378. package/dist/components/workbench/model-picker.d.ts +0 -29
  379. package/dist/components/workbench/model-picker.d.ts.map +0 -1
  380. package/dist/components/workbench/models.d.ts +0 -32
  381. package/dist/components/workbench/models.d.ts.map +0 -1
  382. package/dist/components/workbench/snap-sheet.d.ts.map +0 -1
  383. package/dist/components/workbench/snap-sheet.stories.d.ts +0 -8
  384. package/dist/components/workbench/snap-sheet.stories.d.ts.map +0 -1
  385. package/dist/components/workbench/surfaces.d.ts +0 -67
  386. package/dist/components/workbench/surfaces.d.ts.map +0 -1
  387. package/dist/components/workbench/surfaces.stories.d.ts +0 -15
  388. package/dist/components/workbench/surfaces.stories.d.ts.map +0 -1
  389. package/dist/components/workbench/terminal.d.ts +0 -51
  390. package/dist/components/workbench/terminal.d.ts.map +0 -1
  391. package/dist/components/workbench/terminal.stories.d.ts +0 -8
  392. package/dist/components/workbench/terminal.stories.d.ts.map +0 -1
  393. package/dist/components/workbench/wb-popover.d.ts.map +0 -1
  394. package/dist/components/workbench/workbench-composer.d.ts +0 -26
  395. package/dist/components/workbench/workbench-composer.d.ts.map +0 -1
  396. package/dist/demos/delivery/delivery-tracking-demo.d.ts +0 -41
  397. package/dist/demos/delivery/delivery-tracking-demo.d.ts.map +0 -1
  398. package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts +0 -13
  399. package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts.map +0 -1
  400. package/dist/demos/haptics-playground.d.ts +0 -18
  401. package/dist/demos/haptics-playground.d.ts.map +0 -1
  402. package/dist/demos/haptics-playground.stories.d.ts +0 -8
  403. package/dist/demos/haptics-playground.stories.d.ts.map +0 -1
  404. package/dist/demos/map-chat/geo.d.ts +0 -46
  405. package/dist/demos/map-chat/geo.d.ts.map +0 -1
  406. package/dist/demos/map-chat/map-agent.d.ts +0 -48
  407. package/dist/demos/map-chat/map-agent.d.ts.map +0 -1
  408. package/dist/demos/map-chat/map-chat-demo.d.ts +0 -19
  409. package/dist/demos/map-chat/map-chat-demo.d.ts.map +0 -1
  410. package/dist/demos/map-chat/map-chat-demo.stories.d.ts +0 -16
  411. package/dist/demos/map-chat/map-chat-demo.stories.d.ts.map +0 -1
  412. package/dist/demos/map-chat/map-icons.d.ts +0 -44
  413. package/dist/demos/map-chat/map-icons.d.ts.map +0 -1
  414. package/dist/demos/map-chat/places.d.ts +0 -29
  415. package/dist/demos/map-chat/places.d.ts.map +0 -1
  416. package/dist/demos/map-chat/tile-map.d.ts +0 -108
  417. package/dist/demos/map-chat/tile-map.d.ts.map +0 -1
  418. package/dist/demos/pencilkit/demo-strokes.d.ts +0 -4
  419. package/dist/demos/pencilkit/demo-strokes.d.ts.map +0 -1
  420. package/dist/demos/pencilkit/pencilkit-demo.d.ts +0 -17
  421. package/dist/demos/pencilkit/pencilkit-demo.d.ts.map +0 -1
  422. package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts +0 -11
  423. package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts.map +0 -1
  424. package/dist/demos/sidebar-demo.d.ts +0 -6
  425. package/dist/demos/sidebar-demo.d.ts.map +0 -1
  426. package/dist/demos/split-view-demos.d.ts +0 -50
  427. package/dist/demos/split-view-demos.d.ts.map +0 -1
  428. package/dist/lib/chat/chat-shell-context.d.ts +0 -20
  429. package/dist/lib/chat/chat-shell-context.d.ts.map +0 -1
  430. package/dist/lib/chat/persistent-host.d.ts.map +0 -1
  431. package/dist/lib/haptics.d.ts +0 -27
  432. package/dist/lib/haptics.d.ts.map +0 -1
  433. package/dist/lib/icon.stories.d.ts +0 -15
  434. package/dist/lib/icon.stories.d.ts.map +0 -1
  435. package/dist/lib/pencilkit/constants.d.ts.map +0 -1
  436. package/dist/lib/workbench/haptics.d.ts +0 -3
  437. package/dist/lib/workbench/haptics.d.ts.map +0 -1
  438. package/dist/lib/workbench/icons.d.ts.map +0 -1
  439. package/dist/lib/workbench/motion.d.ts +0 -19
  440. package/dist/lib/workbench/motion.d.ts.map +0 -1
  441. package/dist/lib/workbench/press.d.ts +0 -10
  442. package/dist/lib/workbench/press.d.ts.map +0 -1
  443. package/dist/lib/workbench/theme.d.ts.map +0 -1
  444. package/dist/lib/workbench/util.d.ts +0 -8
  445. package/dist/lib/workbench/util.d.ts.map +0 -1
  446. package/dist/stories/frame.d.ts +0 -16
  447. package/dist/stories/frame.d.ts.map +0 -1
  448. package/dist/stories/primitive-frame.d.ts +0 -20
  449. package/dist/stories/primitive-frame.d.ts.map +0 -1
  450. package/dist/templates/artifact-chat-container.d.ts.map +0 -1
  451. package/dist/templates/artifact-chat-container.stories.d.ts +0 -24
  452. package/dist/templates/artifact-chat-container.stories.d.ts.map +0 -1
  453. package/dist/templates/chat-shell.d.ts +0 -87
  454. package/dist/templates/chat-shell.d.ts.map +0 -1
  455. package/dist/templates/workbench-shell.d.ts +0 -177
  456. package/dist/templates/workbench-shell.d.ts.map +0 -1
  457. package/dist/templates/workbench-shell.stories.d.ts +0 -17
  458. package/dist/templates/workbench-shell.stories.d.ts.map +0 -1
  459. /package/dist/components/{chat/chat-column.d.ts → chat-column.d.ts} +0 -0
  460. /package/dist/components/{workbench → composer}/annotator.d.ts +0 -0
  461. /package/dist/components/{workbench → composer}/composer-files.d.ts +0 -0
  462. /package/dist/components/{workbench/message-scroller.d.ts → message-scroller.d.ts} +0 -0
  463. /package/dist/{lib → components}/pencilkit/constants.d.ts +0 -0
  464. /package/dist/components/{chat/progress-stepper.d.ts → progress-stepper.d.ts} +0 -0
  465. /package/dist/components/{workbench/snap-sheet.d.ts → snap-sheet.d.ts} +0 -0
@@ -0,0 +1,257 @@
1
+ "use client";
2
+ import { LocalStreams as e, StreamFullError as t } from "./append-stream.js";
3
+ import { CloudSync as n, deviceId as r, useCloud as i } from "./durable-streams.js";
4
+ import { useEffect as a, useSyncExternalStore as o } from "react";
5
+ //#region src/lib/session-recorder.ts
6
+ var s = "sessions", c = (e) => `session/${e}`, l = 5e6, u = [], d = null, f = new e({ evict(e) {
7
+ let t = [...u].reverse().find((t) => t.local && t.id !== d && c(t.id) !== e);
8
+ return t ? (f.remove(c(t.id)), !0) : !1;
9
+ } }), p = new n(f, [s]);
10
+ async function m() {
11
+ let e = await f.read(s), t = p.pulledRecords(s), n = /* @__PURE__ */ new Set(), r = [...e, ...t].filter((e) => {
12
+ let t = `${e.t}:${e.id}`;
13
+ return !n.has(t) && (n.add(t), !0);
14
+ }), i = new Set(r.filter((e) => e.t === "delete").map((e) => e.id)), a = [];
15
+ for (let e of r) {
16
+ if (e.t !== "start" || i.has(e.id)) continue;
17
+ let t = r.find((t) => t.t === "end" && t.id === e.id), n = f.length(c(e.id)), o = p.getSettings().enabled;
18
+ !n && !o || a.push({
19
+ id: e.id,
20
+ startedAt: e.at,
21
+ endedAt: t?.at,
22
+ events: n || t?.events,
23
+ url: e.url,
24
+ title: e.title,
25
+ width: e.width,
26
+ height: e.height,
27
+ device: e.device,
28
+ live: e.id === d,
29
+ local: n > 0,
30
+ truncated: t?.truncated
31
+ });
32
+ }
33
+ return a.sort((e, t) => t.startedAt - e.startedAt);
34
+ }
35
+ var h = /* @__PURE__ */ new Set(), g = !1, _ = !1;
36
+ async function v() {
37
+ if (g) {
38
+ _ = !0;
39
+ return;
40
+ }
41
+ g = !0;
42
+ try {
43
+ do
44
+ _ = !1, u = await m(), h.forEach((e) => e());
45
+ while (_);
46
+ } finally {
47
+ g = !1;
48
+ }
49
+ }
50
+ function y(e) {
51
+ h.add(e);
52
+ let t = [f.subscribe(() => void v()), p.subscribe(() => void v())];
53
+ return v(), () => {
54
+ h.delete(e), t.forEach((e) => e());
55
+ };
56
+ }
57
+ function b() {
58
+ return o(y, () => u, () => u);
59
+ }
60
+ function x() {
61
+ return d;
62
+ }
63
+ async function S(e) {
64
+ e === d && await f.flush();
65
+ let t = c(e);
66
+ return f.length(t) > 0 ? f.read(t) : p.readRemote(t);
67
+ }
68
+ async function C(e) {
69
+ e !== d && (f.remove(c(e)), await f.append(s, [{
70
+ t: "delete",
71
+ id: e,
72
+ at: Date.now()
73
+ }]));
74
+ }
75
+ async function w() {
76
+ for (let e of u) await C(e.id);
77
+ }
78
+ function T() {
79
+ return {
80
+ used: f.size(),
81
+ quota: l
82
+ };
83
+ }
84
+ function E() {
85
+ let { status: e, settings: t } = i(p);
86
+ return {
87
+ status: e,
88
+ settings: t,
89
+ configure: (e) => p.configure(e)
90
+ };
91
+ }
92
+ var D = class {
93
+ opts;
94
+ id = `${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`;
95
+ buffer = [];
96
+ events = 0;
97
+ started = !1;
98
+ last = Date.now();
99
+ info;
100
+ timer;
101
+ stopRecord;
102
+ dead = !1;
103
+ constructor(e, t) {
104
+ this.opts = e, this.info = {
105
+ t: "start",
106
+ id: this.id,
107
+ at: Date.now(),
108
+ url: location.href,
109
+ title: document.title,
110
+ width: innerWidth,
111
+ height: innerHeight,
112
+ device: t
113
+ };
114
+ }
115
+ start(e) {
116
+ this.stopRecord = e({
117
+ emit: (e) => this.push(e),
118
+ blockClass: this.opts.blockClass,
119
+ ignoreClass: this.opts.ignoreClass,
120
+ maskAllInputs: this.opts.maskAllInputs,
121
+ sampling: {
122
+ mousemove: 60,
123
+ scroll: 150,
124
+ input: "last"
125
+ },
126
+ slimDOMOptions: {
127
+ script: !0,
128
+ comment: !0,
129
+ headFavicon: !0,
130
+ headMetaSocial: !0,
131
+ headMetaRobots: !0,
132
+ headMetaHttpEquiv: !0,
133
+ headMetaVerification: !0
134
+ }
135
+ }), this.timer = setInterval(() => this.flush(), this.opts.flushMs), document.addEventListener("visibilitychange", this.onHide), addEventListener("pagehide", this.onLeave);
136
+ }
137
+ onHide = () => {
138
+ document.visibilityState === "hidden" && this.flush(!0);
139
+ };
140
+ onLeave = () => {
141
+ this.flush(!0);
142
+ };
143
+ push(e) {
144
+ if (!this.dead) {
145
+ if (e.type === 4 && !this.events) {
146
+ let t = e.data;
147
+ this.info = {
148
+ ...this.info,
149
+ at: e.timestamp,
150
+ url: t.href ?? this.info.url,
151
+ width: t.width ?? this.info.width,
152
+ height: t.height ?? this.info.height
153
+ };
154
+ }
155
+ this.buffer.push(e), this.events++, this.last = Math.max(this.last, e.timestamp), this.buffer.length >= 400 && this.flush();
156
+ }
157
+ }
158
+ flush(e = !1) {
159
+ if (!this.buffer.length || this.dead) return;
160
+ let t = this.buffer;
161
+ this.buffer = [];
162
+ let n = c(this.id), r = () => (this.started || (this.started = !0, d = this.id, f.appendSync(s, [this.info])), e ? Promise.resolve(f.appendSync(n, t)) : f.append(n, t));
163
+ try {
164
+ r().catch((e) => this.fail(e));
165
+ } catch (e) {
166
+ this.fail(e);
167
+ }
168
+ }
169
+ fail(e) {
170
+ if (!(e instanceof t)) throw e;
171
+ this.dead = !0, this.stopRecord?.(), clearInterval(this.timer);
172
+ try {
173
+ f.appendSync(s, [{
174
+ t: "end",
175
+ id: this.id,
176
+ at: this.last,
177
+ events: this.events,
178
+ truncated: !0
179
+ }]);
180
+ } catch {}
181
+ }
182
+ stop() {
183
+ if (!this.dead) {
184
+ if (this.stopRecord?.(), clearInterval(this.timer), document.removeEventListener("visibilitychange", this.onHide), removeEventListener("pagehide", this.onLeave), !this.started && this.events < 4) {
185
+ this.dead = !0;
186
+ return;
187
+ }
188
+ this.flush(!0), this.dead = !0;
189
+ try {
190
+ f.appendSync(s, [{
191
+ t: "end",
192
+ id: this.id,
193
+ at: this.last,
194
+ events: this.events
195
+ }]);
196
+ } catch {}
197
+ d === this.id && (d = null);
198
+ }
199
+ }
200
+ }, O = 0, k = null, A = null, j = {
201
+ blockClass: "rr-block",
202
+ ignoreClass: "rr-ignore",
203
+ maskAllInputs: !0,
204
+ maxSessions: 30,
205
+ flushMs: 1500
206
+ };
207
+ async function M(e) {
208
+ let { record: t } = await import("rrweb");
209
+ if (!(O === 0 || k)) {
210
+ await v();
211
+ for (let t of u.filter((e) => e.local).slice(Math.max(0, e.maxSessions - 1))) f.remove(c(t.id));
212
+ k = new D(e, r()), k.start(t);
213
+ }
214
+ }
215
+ async function N() {
216
+ if (await A, O > 0 || !k) return;
217
+ let e = k;
218
+ k = null, e.stop(), v();
219
+ }
220
+ function P(e = {}) {
221
+ O++;
222
+ let t = Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
223
+ (O === 1 || !k) && (A = M({
224
+ ...j,
225
+ ...t
226
+ }));
227
+ let n = !1;
228
+ return () => {
229
+ n || (n = !0, --O === 0 && N());
230
+ };
231
+ }
232
+ function F({ enabled: e = !0, ...t } = {}) {
233
+ let { blockClass: n, ignoreClass: r, maskAllInputs: i, maxSessions: o, flushMs: s } = t;
234
+ a(() => {
235
+ if (!e) return;
236
+ p.start();
237
+ let t = P({
238
+ blockClass: n,
239
+ ignoreClass: r,
240
+ maskAllInputs: i,
241
+ maxSessions: o,
242
+ flushMs: s
243
+ });
244
+ return () => {
245
+ t();
246
+ };
247
+ }, [
248
+ e,
249
+ n,
250
+ r,
251
+ i,
252
+ o,
253
+ s
254
+ ]);
255
+ }
256
+ //#endregion
257
+ export { w as clearSessions, x as currentSessionId, C as deleteSession, S as readSession, p as sessionCloud, P as startSessionRecording, T as storageUsage, E as useSessionCloud, F as useSessionRecording, b as useSessions };
@@ -47,7 +47,7 @@ export interface SheetDragState {
47
47
  * the pointer one-to-one (rubber-banding past its ends); on release the pointer's velocity is projected
48
48
  * forward to pick a stop (peek, a detent, open, or the FAB) and a spring carries the body there *from that
49
49
  * velocity*, so a flick keeps its momentum. Grabbing mid-flight catches the body where it is. State changes
50
- * from outside (a tap, Escape, `peek` changing) spring too. Snaps tick.
50
+ * from outside (a tap, Escape, `peek` changing) spring too.
51
51
  */
52
52
  export declare function useSheetDrag({ open, onOpenChange, peek, maxReveal, detents, minimizable, minimized, onMinimizedChange, spring, }: SheetDragOptions): SheetDragState;
53
53
  //# sourceMappingURL=sheet-drag.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheet-drag.d.ts","sourceRoot":"","sources":["../../src/lib/sheet-drag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,YAAY,IAAI,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG7G,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAMpD,gEAAgE;AAChE,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAMxC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,qDAAqD;IACrD,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE;QACR,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC/D,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC/D,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC7D,eAAe,EAAE,MAAM,IAAI,CAAC;QAC5B,oBAAoB,EAAE,MAAM,IAAI,CAAC;KAClC,CAAC;IACF,sEAAsE;IACtE,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAID;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,OAAY,EACZ,WAAmB,EACnB,SAAiB,EACjB,iBAAiB,EACjB,MAAe,GAChB,EAAE,gBAAgB,GAAG,cAAc,CAyKnC"}
1
+ {"version":3,"file":"sheet-drag.d.ts","sourceRoot":"","sources":["../../src/lib/sheet-drag.ts"],"names":[],"mappings":"AACA,OAAO,EAAgD,KAAK,YAAY,IAAI,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE7G,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAMxD,gEAAgE;AAChE,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAMxC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,qDAAqD;IACrD,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE;QACR,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC/D,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC/D,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC7D,eAAe,EAAE,MAAM,IAAI,CAAC;QAC5B,oBAAoB,EAAE,MAAM,IAAI,CAAC;KAClC,CAAC;IACF,sEAAsE;IACtE,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAID;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,OAAY,EACZ,WAAmB,EACnB,SAAiB,EACjB,iBAAiB,EACjB,MAAe,GAChB,EAAE,gBAAgB,GAAG,cAAc,CAsKnC"}
@@ -0,0 +1,128 @@
1
+ "use client";
2
+ import { prefersReducedMotion as e, springs as t } from "./motion.js";
3
+ import { animate as n } from "framer-motion";
4
+ import { useEffect as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
5
+ //#region src/lib/sheet-drag.ts
6
+ var s = typeof window > "u" ? r : i, c = 4, l = 96, u = 200, d = .4, f = (e) => Math.max(0, e) ** .72;
7
+ function p({ open: i, onOpenChange: c, peek: l, maxReveal: p, detents: m = [], minimizable: h = !1, minimized: g = !1, onMinimizedChange: _, spring: v = "tray" }) {
8
+ let [y, b] = o(null), x = y != null && y > l && y < p ? y : null, S = i ? p : x ?? l, C = +!!g, [w, T] = o(S), [E, D] = o(C), [O, k] = o(!1), [A, j] = o(!1), [M, N] = o(0), P = a({
9
+ reveal: S,
10
+ minimize: C
11
+ }), F = a({}), I = a({
12
+ reveal: 0,
13
+ minimize: 0
14
+ }), L = a({
15
+ active: !1,
16
+ y: 0,
17
+ from: 0,
18
+ moved: !1,
19
+ samples: []
20
+ }), R = a(!1), z = l + 96, B = (e) => h && e < l ? Math.min(1, (l - e) / z) : 0, V = () => {
21
+ F.current.r?.stop(), F.current.m?.stop(), F.current = {};
22
+ }, H = (e, t) => {
23
+ P.current = {
24
+ reveal: e,
25
+ minimize: t
26
+ }, T(e), D(t);
27
+ };
28
+ s(() => {
29
+ if (L.current.active) return;
30
+ let r = !R.current;
31
+ R.current = !0;
32
+ let i = P.current;
33
+ if (r || e() || Math.abs(i.reveal - S) < .5 && Math.abs(i.minimize - C) < .005) {
34
+ V(), H(S, C), j(!1);
35
+ return;
36
+ }
37
+ V(), j(!0);
38
+ let a = 2, o = () => {
39
+ --a === 0 && j(!1);
40
+ }, s = t[v];
41
+ F.current.r = n(i.reveal, S, {
42
+ ...s,
43
+ velocity: I.current.reveal,
44
+ onUpdate: (e) => {
45
+ let t = Math.max(0, Math.min(p, e));
46
+ P.current.reveal = t, T(t);
47
+ },
48
+ onComplete: o
49
+ }), F.current.m = n(i.minimize, C, {
50
+ ...s,
51
+ velocity: I.current.minimize,
52
+ onUpdate: (e) => {
53
+ let t = Math.max(0, Math.min(1, e));
54
+ P.current.minimize = t, D(t);
55
+ },
56
+ onComplete: o
57
+ }), I.current = {
58
+ reveal: 0,
59
+ minimize: 0
60
+ };
61
+ }, [
62
+ S,
63
+ C,
64
+ M
65
+ ]), r(() => () => V(), []);
66
+ let U = (e) => {
67
+ V(), j(!1), L.current = {
68
+ active: !0,
69
+ y: e.clientY,
70
+ from: P.current.reveal,
71
+ moved: !1,
72
+ samples: [{
73
+ t: e.timeStamp,
74
+ y: e.clientY
75
+ }]
76
+ }, e.currentTarget.setPointerCapture(e.pointerId);
77
+ }, W = (e) => {
78
+ let t = L.current;
79
+ if (!t.active) return;
80
+ let n = t.y - e.clientY;
81
+ if (!t.moved && Math.abs(n) < 4) return;
82
+ t.moved || k(!0), t.moved = !0, t.samples.push({
83
+ t: e.timeStamp,
84
+ y: e.clientY
85
+ }), t.samples.length > 6 && t.samples.shift();
86
+ let r = t.from + n, i = h ? 0 : Math.min(l, p), a = r > p ? p + f(r - p) * .35 : r < i ? Math.max(0, i - f(i - r)) : r;
87
+ H(Math.min(p + 24, a), B(r));
88
+ }, G = (e, t) => {
89
+ let n = L.current;
90
+ if (n.active = !1, k(!1), !n.moved) return;
91
+ let r = n.samples.filter((e) => t - e.t < 90)[0] ?? n.samples[0], a = Math.max(1, t - (r?.t ?? t)), o = r ? (r.y - e) / a : 0, s = n.from + (n.y - e), f = s + o * u, v = h && B(f) > .5 && B(s) > .08, y = [
92
+ l,
93
+ ...m.filter((e) => e > l && e < p),
94
+ p
95
+ ], x = Math.max(0, Math.min(p, f)), S = Math.abs(o) > d ? y.filter((e) => o > 0 ? e > s + 1 : e < s - 1) : [], C = S.length ? o > 0 ? Math.min(...S) : Math.max(...S) : y.reduce((e, t) => Math.abs(t - x) < Math.abs(e - x) ? t : e, y[0]), w = !v && C === p && p > l, T = !v && C !== l && C !== p ? C : null;
96
+ I.current = {
97
+ reveal: o * 1e3,
98
+ minimize: h && s < l ? -o * 1e3 / z : 0
99
+ }, b(T), v !== g && _?.(v), w !== i && c(w), N((e) => e + 1);
100
+ }, K = (e) => {
101
+ L.current.active && (e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), G(e.clientY, e.timeStamp));
102
+ }, q = () => {
103
+ L.current.active && (L.current.active = !1, k(!1), N((e) => e + 1));
104
+ };
105
+ return {
106
+ reveal: w,
107
+ minimize: E,
108
+ dragging: O,
109
+ settling: A,
110
+ detent: x,
111
+ handlers: {
112
+ onPointerDown: U,
113
+ onPointerMove: W,
114
+ onPointerUp: K,
115
+ onPointerCancel: q,
116
+ onLostPointerCapture: q
117
+ },
118
+ toggle: () => {
119
+ if (L.current.moved) {
120
+ L.current.moved = !1;
121
+ return;
122
+ }
123
+ b(null), _?.(!1), c(!i);
124
+ }
125
+ };
126
+ }
127
+ //#endregion
128
+ export { l as SHEET_MINIMIZE_TRAVEL, c as SHEET_TAP_SLOP, p as useSheetDrag };
@@ -0,0 +1,204 @@
1
+ //#region src/lib/syntax.ts
2
+ var e = "unknown", t = null, n = null, r = /swiftshader|llvmpipe|lavapipe|software|microsoft basic/i, i = () => typeof navigator > "u" ? void 0 : navigator.gpu;
3
+ async function a(e) {
4
+ if (!e) return "none";
5
+ let t = e.info;
6
+ if (!t && typeof e.requestAdapterInfo == "function" && (t = await e.requestAdapterInfo().catch(() => void 0)), e.isFallbackAdapter || t?.isFallbackAdapter) return "software";
7
+ let n = [
8
+ t?.vendor,
9
+ t?.architecture,
10
+ t?.device,
11
+ t?.description
12
+ ].filter(Boolean).join(" ");
13
+ return r.test(n) ? "software" : "hardware";
14
+ }
15
+ function o() {
16
+ if (n) return n;
17
+ let e = i();
18
+ if (!e) return t = "none", n = Promise.resolve("none");
19
+ let r = Promise.resolve().then(() => e.requestAdapter()).then(a, () => "none"), o, s = new Promise((e) => {
20
+ o = setTimeout(() => e("software"), 2500);
21
+ });
22
+ return r.then((e) => {
23
+ clearTimeout(o), t = e;
24
+ }), n = Promise.race([r, s]).then((e) => t ??= e), n;
25
+ }
26
+ function s(n = "auto") {
27
+ return n === "fallback" || e === "unavailable" || t === "none" || n === "auto" && t === "software" ? !1 : !!i();
28
+ }
29
+ var c = 256, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
30
+ function d(e, t) {
31
+ let n = e.get(t);
32
+ return n && (e.delete(t), e.set(t, n)), n;
33
+ }
34
+ function f(e, t, n) {
35
+ e.set(t, n), e.size > c && e.delete(e.keys().next().value);
36
+ }
37
+ function p(e, t = "auto") {
38
+ return t === "fallback" ? d(u, e) : d(l, e) ?? (s(t) ? void 0 : d(u, e));
39
+ }
40
+ var m = /* @__PURE__ */ new Set([
41
+ "keyword",
42
+ "type",
43
+ "function",
44
+ "constant"
45
+ ]), h = "=<>!+-*/%&|^~?:.", g = "()[]{};,", _ = (e) => e === " " || e === " " || e === "\n" || e === "\r" || e === "\f" || e === "\v", v = (e) => !!e && !_(e) && !h.includes(e) && !g.includes(e);
46
+ function y(e, t) {
47
+ let n = e[t];
48
+ if (_(n)) return "space";
49
+ if (g.includes(n)) return "punct";
50
+ if (!h.includes(n)) return "word";
51
+ if (n === "-") {
52
+ if (v(e[t - 1]) && v(e[t + 1])) return "word";
53
+ let n = t;
54
+ for (; e[n - 1] === "-";) n--;
55
+ let r = t;
56
+ for (; e[r] === "-";) r++;
57
+ if (n === 0 && v(e[r])) return "word";
58
+ }
59
+ return "op";
60
+ }
61
+ function b(e, t) {
62
+ let n = [], r = 0, i = (e, t, i) => {
63
+ if (t = Math.max(t, r), i <= t || (r = i, e === "plain")) return;
64
+ let a = n[n.length - 1];
65
+ a && a.type === e && a.end === t ? a.end = i : n.push({
66
+ type: e,
67
+ start: t,
68
+ end: i
69
+ });
70
+ }, a = t.every((e, n) => n === 0 || t[n - 1].start <= e.start) ? t : [...t].sort((e, t) => e.start - t.start);
71
+ for (let t of a) {
72
+ if (!m.has(t.type)) {
73
+ i(t.type, t.start, t.end);
74
+ continue;
75
+ }
76
+ let n = e.slice(t.start, t.end), r = 0;
77
+ for (; r < n.length;) {
78
+ let e = y(n, r), a = r + 1;
79
+ for (; a < n.length && y(n, a) === e;) a++;
80
+ let o = n.slice(r, a), s = /^(<\/?|\/?>)$/.test(o) && /[A-Za-z]/.test(n);
81
+ i(e === "word" ? t.type : e === "op" && o !== "." && o !== ":" && !s ? "operator" : "plain", t.start + r, t.start + a), r = a;
82
+ }
83
+ }
84
+ return n;
85
+ }
86
+ var x = null, S = () => x ??= import("gpu-lexer").then((e) => e.parse), C = Promise.resolve(), w = /* @__PURE__ */ new Map(), T = 65536;
87
+ async function E(e) {
88
+ let t = await S();
89
+ if (e.length <= T) return b(e, await t(e));
90
+ let n = [], r = 0;
91
+ for (; r < e.length;) {
92
+ let i = Math.min(e.length, r + T);
93
+ if (i < e.length) {
94
+ let t = e.lastIndexOf("\n", i);
95
+ t > r && (i = t + 1);
96
+ }
97
+ for (let a of await t(e.slice(r, i))) n.push({
98
+ type: a.type,
99
+ start: a.start + r,
100
+ end: a.end + r
101
+ });
102
+ r = i;
103
+ }
104
+ return b(e, n);
105
+ }
106
+ function D(t) {
107
+ return C = C.then(() => E(t).then((t) => (e = "ready", {
108
+ spans: t,
109
+ highlighter: "gpu"
110
+ }), (n) => (e !== "ready" && /unavailable/i.test(String(n)) && (e = "unavailable"), k(t))));
111
+ }
112
+ function O(e, t = "auto") {
113
+ let n = p(e, t);
114
+ if (n) return Promise.resolve(n);
115
+ if (!s(t)) return Promise.resolve(k(e));
116
+ let r = t + "\0" + e, i = w.get(r);
117
+ if (i) return i;
118
+ let a = o().then(() => s(t) ? D(e) : k(e)).then((t) => (w.delete(r), t.highlighter === "gpu" && f(l, e, t), t));
119
+ return w.set(r, a), a;
120
+ }
121
+ function k(e) {
122
+ let t = d(u, e);
123
+ if (t) return t;
124
+ let n = {
125
+ spans: b(e, N(e)),
126
+ highlighter: "fallback"
127
+ };
128
+ return f(u, e, n), n;
129
+ }
130
+ var A = new Set("as async await break case catch class const continue def default delete do elif else enum export extends fn for from func function go if impl implements import in instanceof interface let match mod module mut new package pass private protected pub public raise readonly return static struct super switch then this throw trait try type typeof use var void where while with yield fi done esac local echo".split(" ")), j = new Set("true false null undefined nil None True False NaN Infinity self".split(" ")), M = /(\/\/[^\n]*|#(?=[ \t!]|$)[^\n]*|\/\*[\s\S]*?(?:\*\/|$)|<!--[\s\S]*?(?:-->|$))|("(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?|`(?:[^`\\]|\\.)*`?)|(\b(?:0[xob][\da-f_]+|\d[\d_]*(?:\.\d+)?(?:e[+-]?\d+)?)\b)|([A-Za-z_$][\w$]*)|(\?\.(?!\d)|\.{2,3}|::|[=<>!+\-*/%&|^~?:]*[=<>!+\-*/%&|^~?][=<>!+\-*/%&|^~?:]*)/gi;
131
+ function N(e) {
132
+ let t = [];
133
+ M.lastIndex = 0;
134
+ let n;
135
+ for (; n = M.exec(e);) {
136
+ let r = n.index, i = r + n[0].length, a = "plain";
137
+ if (n[1]) a = "comment";
138
+ else if (n[2]) a = "string";
139
+ else if (n[3]) a = "number";
140
+ else if (n[4]) {
141
+ let t = n[4];
142
+ a = A.has(t) ? "keyword" : j.has(t) ? "constant" : /^\s*\(/.test(e.slice(i, i + 8)) ? "function" : /^[A-Z][a-z]/.test(t) ? "type" : "plain";
143
+ } else n[5] && (a = "operator");
144
+ a !== "plain" && t.push({
145
+ type: a,
146
+ start: r,
147
+ end: i
148
+ });
149
+ }
150
+ return t;
151
+ }
152
+ function P(e, t) {
153
+ let n = e.endsWith("\n") ? e.slice(0, -1) : e, r = [[]], i = (e, t) => {
154
+ let n = 0;
155
+ for (let i = t.indexOf("\n"); i !== -1; i = t.indexOf("\n", n)) i > n && r[r.length - 1].push({
156
+ type: e,
157
+ text: t.slice(n, i)
158
+ }), r.push([]), n = i + 1;
159
+ n < t.length && r[r.length - 1].push({
160
+ type: e,
161
+ text: t.slice(n)
162
+ });
163
+ }, a = 0;
164
+ for (let e of t ?? []) {
165
+ if (e.start >= n.length) break;
166
+ e.start > a && i("plain", n.slice(a, e.start));
167
+ let t = Math.max(e.start, a), r = Math.min(e.end, n.length);
168
+ r > t && i(e.type, n.slice(t, r)), a = Math.max(a, r);
169
+ }
170
+ return a < n.length && i("plain", n.slice(a)), r;
171
+ }
172
+ function F(e) {
173
+ let t = (e.split("/").pop() ?? e).toLowerCase();
174
+ if (t === "dockerfile") return "dockerfile";
175
+ if (t === "makefile") return "makefile";
176
+ let n = t.includes(".") ? t.split(".").pop() : "";
177
+ return {
178
+ mjs: "js",
179
+ cjs: "js",
180
+ mts: "ts",
181
+ cts: "ts",
182
+ yml: "yaml",
183
+ markdown: "md",
184
+ mdx: "mdx",
185
+ sh: "bash",
186
+ zsh: "bash",
187
+ py: "python",
188
+ rb: "ruby",
189
+ rs: "rust",
190
+ kt: "kotlin",
191
+ htm: "html",
192
+ txt: "text",
193
+ patch: "diff"
194
+ }[n] ?? (n || "text");
195
+ }
196
+ var I = /* @__PURE__ */ new Set([
197
+ "text",
198
+ "txt",
199
+ "plaintext",
200
+ "plain",
201
+ "none"
202
+ ]);
203
+ //#endregion
204
+ export { I as PLAIN_LANGUAGES, k as fallbackResult, N as fallbackSpans, F as languageFromPath, O as lexSyntax, b as normalizeSpans, p as peekSyntax, o as probeWebGPU, P as tokenizeLines, s as webgpuSupported };
@@ -1,4 +1,6 @@
1
1
  import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
+ import { THEME_VARS, ThemeVar } from './tokens.generated';
3
+ export { THEME_VARS, type ThemeVar };
2
4
  export declare const chromeStore: {
3
5
  hidden: boolean;
4
6
  subs: Set<(v: boolean) => void>;
@@ -15,37 +17,60 @@ export declare function AppearanceProvider({ value, children }: {
15
17
  children?: ReactNode;
16
18
  }): import("react/jsx-runtime").JSX.Element;
17
19
  export declare function useAppearance(): Appearance | undefined;
18
- export type ThemeScopeName = 'workbench' | 'chat' | 'terminal' | 'sheet' | 'glass';
20
+ export type ThemeScopeName = 'workbench' | 'chat' | 'terminal' | 'sheet' | 'glass' | (string & {});
21
+ /** Variables to set on a scope, by name without the leading `--`: `{ radius: '0.25rem', primary: '#f43' }`. Names are
22
+ the theme variables (tokens.css), so they autocomplete; anything else is a custom property of your own. */
23
+ export type ThemeVars = {
24
+ [K in ThemeVar]?: string;
25
+ } & {
26
+ [custom: string]: string | undefined;
27
+ };
28
+ /** The inline style for a `vars` object: `{ radius: '0.25rem' }` → `{ '--radius': '0.25rem' }`. */
29
+ export declare const themeVarStyle: (vars?: ThemeVars) => CSSProperties;
19
30
  /** Root classes for an appearance: shadcn's `dark` (or `light`) plus the matching color-scheme. */
20
31
  export declare const themeScopeClass: (appearance: Appearance | undefined) => "" | "dark scheme-dark" | "light scheme-light";
21
32
  /** --primary / --ring for a tint (nothing when no tint is given, so the theme's primary applies). */
22
33
  export declare const tintVars: (tint?: string) => CSSProperties;
23
34
  /** The props a scope root carries: `data-theme-scope`, the appearance class and the tint. */
24
- export declare function themeScopeProps({ scope, appearance, tint }: {
35
+ export declare function themeScopeProps({ scope, appearance, tint, vars }: {
25
36
  scope?: ThemeScopeName;
26
37
  appearance?: Appearance;
27
38
  tint?: string;
39
+ vars?: ThemeVars;
28
40
  }): {
29
41
  'data-theme-scope': ThemeScopeName | undefined;
30
42
  className: string;
31
43
  style: CSSProperties;
32
44
  };
33
- /** The theme variables a portalled overlay copies from the element that opened it, so it keeps that surface's
34
- palette wherever it renders. */
35
- export declare const THEME_VARS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "border", "input", "ring", "success", "warning", "tertiary-foreground", "secondary-strong", "overlay", "bar", "sticky", "handle", "link", "code", "code-foreground"];
45
+ export interface ThemeScopeState {
46
+ scope?: ThemeScopeName;
47
+ appearance?: Appearance;
48
+ tint?: string;
49
+ vars?: ThemeVars;
50
+ }
51
+ export declare const ThemeScopeContext: import('react').Context<ThemeScopeState | null>;
52
+ /** Props (`data-theme-scope`, `className`, `style`) that carry the surrounding ThemeScope onto a portalled overlay. */
53
+ export declare function useThemeScopeProps(): {
54
+ 'data-theme-scope'?: string;
55
+ className?: string;
56
+ style?: CSSProperties;
57
+ };
36
58
  /** The resolved theme variables (and color-scheme) at an element, as a style object. */
37
59
  export declare function readThemeVars(el: Element | null | undefined): CSSProperties;
38
60
  export interface ThemeScopeProps extends HTMLAttributes<HTMLDivElement> {
39
- /** The surface palette the bl-theme defines: `workbench`, `chat`, `terminal`, `sheet` (a floating chat surface's tone) or `glass` (the Composer floating over content). Omit for the plain theme. */
61
+ /** A named surface palette — `[data-theme-scope="name"] { … }` in your CSS, or one the bl-theme and the blocks define (`workbench`, `chat`, `terminal`, `sheet`, `glass`). Omit for the plain theme. */
40
62
  scope?: ThemeScopeName;
41
63
  /** Defaults to the ambient `AppearanceProvider` value; without one a plain scope inherits the page's `.dark` / light,
42
64
  a surface scope is light (the terminal scope is always dark). */
43
65
  appearance?: Appearance;
44
66
  /** Accent for the subtree (--primary / --ring). */
45
67
  tint?: string;
68
+ /** Theme variables for the subtree, by name without `--`: `{ radius: '0.25rem', card: '#111' }`. Wins over `tint`. */
69
+ vars?: ThemeVars;
46
70
  }
47
- /** A subtree with its own appearance, accent and (optionally) surface palette. */
48
- export declare function ThemeScope({ scope, appearance: appearanceProp, tint, className, style, ...props }: ThemeScopeProps): import("react/jsx-runtime").JSX.Element;
71
+ /** A subtree with its own appearance, accent, variables and (optionally) named surface palette. Overlays opened inside
72
+ it (popovers, menus, dialogs, tooltips) wear the same scope. Scopes nest; the nearest one wins. */
73
+ export declare function ThemeScope({ scope, appearance: appearanceProp, tint, vars, className, style, ...props }: ThemeScopeProps): import("react/jsx-runtime").JSX.Element;
49
74
  export interface BLProviderProps {
50
75
  /** Defaults to the ambient `AppearanceProvider` value; without one the provider inherits the page's appearance
51
76
  (shadcn's `.dark` on an ancestor, else light). */