@brett_lamy/ui 2.0.0 → 3.0.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 (456) hide show
  1. package/README.md +4 -4
  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 +300 -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 +24 -47
  194. package/dist/index.d.ts.map +1 -1
  195. package/dist/index.js +91 -20350
  196. package/dist/lib/container.d.ts.map +1 -1
  197. package/dist/lib/container.js +49 -0
  198. package/dist/lib/icon-shapes/chat.js +13 -0
  199. package/dist/lib/icon-shapes/pencilkit.js +20 -0
  200. package/dist/lib/icon-shapes/workbench.js +47 -0
  201. package/dist/lib/icon.d.ts +1 -1
  202. package/dist/lib/icon.d.ts.map +1 -1
  203. package/dist/lib/icon.js +1774 -0
  204. package/dist/lib/motion.d.ts +16 -0
  205. package/dist/lib/motion.d.ts.map +1 -1
  206. package/dist/lib/motion.js +104 -0
  207. package/dist/lib/{chat/persistent-host.d.ts → persistent-host.d.ts} +1 -1
  208. package/dist/lib/persistent-host.d.ts.map +1 -0
  209. package/dist/lib/persistent-host.js +41 -0
  210. package/dist/lib/primitives.js +8 -0
  211. package/dist/lib/qr.js +552 -0
  212. package/dist/lib/row-label.d.ts.map +1 -1
  213. package/dist/lib/row-label.js +10 -0
  214. package/dist/lib/sheet-drag.d.ts +1 -1
  215. package/dist/lib/sheet-drag.d.ts.map +1 -1
  216. package/dist/lib/sheet-drag.js +128 -0
  217. package/dist/lib/syntax.js +204 -0
  218. package/dist/lib/theme.d.ts +33 -8
  219. package/dist/lib/theme.d.ts.map +1 -1
  220. package/dist/lib/theme.js +138 -0
  221. package/dist/lib/tokens.generated.d.ts +16 -0
  222. package/dist/lib/tokens.generated.d.ts.map +1 -0
  223. package/dist/lib/tokens.generated.js +22 -0
  224. package/dist/lib/utils.d.ts +5 -0
  225. package/dist/lib/utils.d.ts.map +1 -1
  226. package/dist/lib/utils.js +18 -0
  227. package/dist/theme.css +0 -60
  228. package/package.json +4 -7
  229. package/dist/components/adaptive-pane.stories.d.ts +0 -7
  230. package/dist/components/adaptive-pane.stories.d.ts.map +0 -1
  231. package/dist/components/avatar.stories.d.ts +0 -9
  232. package/dist/components/avatar.stories.d.ts.map +0 -1
  233. package/dist/components/badge.stories.d.ts +0 -9
  234. package/dist/components/badge.stories.d.ts.map +0 -1
  235. package/dist/components/button.stories.d.ts +0 -11
  236. package/dist/components/button.stories.d.ts.map +0 -1
  237. package/dist/components/card.stories.d.ts +0 -9
  238. package/dist/components/card.stories.d.ts.map +0 -1
  239. package/dist/components/chat/chat-column.d.ts.map +0 -1
  240. package/dist/components/chat/chat-column.stories.d.ts +0 -9
  241. package/dist/components/chat/chat-column.stories.d.ts.map +0 -1
  242. package/dist/components/chat/floating-chat.d.ts.map +0 -1
  243. package/dist/components/chat/floating-chat.stories.d.ts +0 -17
  244. package/dist/components/chat/floating-chat.stories.d.ts.map +0 -1
  245. package/dist/components/chat/floating-sheet.d.ts.map +0 -1
  246. package/dist/components/chat/floating-sheet.stories.d.ts +0 -22
  247. package/dist/components/chat/floating-sheet.stories.d.ts.map +0 -1
  248. package/dist/components/chat/progress-stepper.d.ts.map +0 -1
  249. package/dist/components/checkbox.stories.d.ts +0 -11
  250. package/dist/components/checkbox.stories.d.ts.map +0 -1
  251. package/dist/components/combobox.stories.d.ts +0 -10
  252. package/dist/components/combobox.stories.d.ts.map +0 -1
  253. package/dist/components/command-menu.stories.d.ts +0 -17
  254. package/dist/components/command-menu.stories.d.ts.map +0 -1
  255. package/dist/components/credenza.stories.d.ts +0 -8
  256. package/dist/components/credenza.stories.d.ts.map +0 -1
  257. package/dist/components/dialog.stories.d.ts +0 -12
  258. package/dist/components/dialog.stories.d.ts.map +0 -1
  259. package/dist/components/disclosure.stories.d.ts +0 -10
  260. package/dist/components/disclosure.stories.d.ts.map +0 -1
  261. package/dist/components/dropdown-menu.stories.d.ts +0 -11
  262. package/dist/components/dropdown-menu.stories.d.ts.map +0 -1
  263. package/dist/components/edge-drawer.stories.d.ts +0 -8
  264. package/dist/components/edge-drawer.stories.d.ts.map +0 -1
  265. package/dist/components/edit-bar.stories.d.ts +0 -10
  266. package/dist/components/edit-bar.stories.d.ts.map +0 -1
  267. package/dist/components/form.stories.d.ts +0 -9
  268. package/dist/components/form.stories.d.ts.map +0 -1
  269. package/dist/components/haptic-indicator.d.ts +0 -11
  270. package/dist/components/haptic-indicator.d.ts.map +0 -1
  271. package/dist/components/haptic-indicator.stories.d.ts +0 -8
  272. package/dist/components/haptic-indicator.stories.d.ts.map +0 -1
  273. package/dist/components/index-bar.stories.d.ts +0 -12
  274. package/dist/components/index-bar.stories.d.ts.map +0 -1
  275. package/dist/components/input.stories.d.ts +0 -10
  276. package/dist/components/input.stories.d.ts.map +0 -1
  277. package/dist/components/kbd.stories.d.ts +0 -9
  278. package/dist/components/kbd.stories.d.ts.map +0 -1
  279. package/dist/components/label.stories.d.ts +0 -8
  280. package/dist/components/label.stories.d.ts.map +0 -1
  281. package/dist/components/list-box.stories.d.ts +0 -9
  282. package/dist/components/list-box.stories.d.ts.map +0 -1
  283. package/dist/components/list-row.stories.d.ts +0 -24
  284. package/dist/components/list-row.stories.d.ts.map +0 -1
  285. package/dist/components/list.stories.d.ts +0 -27
  286. package/dist/components/list.stories.d.ts.map +0 -1
  287. package/dist/components/markdown-editor.stories.d.ts +0 -17
  288. package/dist/components/markdown-editor.stories.d.ts.map +0 -1
  289. package/dist/components/morph.stories.d.ts +0 -14
  290. package/dist/components/morph.stories.d.ts.map +0 -1
  291. package/dist/components/motion.stories.d.ts +0 -15
  292. package/dist/components/motion.stories.d.ts.map +0 -1
  293. package/dist/components/navigation-stack.stories.d.ts +0 -31
  294. package/dist/components/navigation-stack.stories.d.ts.map +0 -1
  295. package/dist/components/now-playing-bars.stories.d.ts +0 -12
  296. package/dist/components/now-playing-bars.stories.d.ts.map +0 -1
  297. package/dist/components/pencilkit/pencil-canvas.stories.d.ts +0 -18
  298. package/dist/components/pencilkit/pencil-canvas.stories.d.ts.map +0 -1
  299. package/dist/components/pencilkit/pencil-toolbar.stories.d.ts +0 -10
  300. package/dist/components/pencilkit/pencil-toolbar.stories.d.ts.map +0 -1
  301. package/dist/components/popover.stories.d.ts +0 -9
  302. package/dist/components/popover.stories.d.ts.map +0 -1
  303. package/dist/components/progress-ring.stories.d.ts +0 -15
  304. package/dist/components/progress-ring.stories.d.ts.map +0 -1
  305. package/dist/components/progress.stories.d.ts +0 -10
  306. package/dist/components/progress.stories.d.ts.map +0 -1
  307. package/dist/components/qr-svg.stories.d.ts +0 -16
  308. package/dist/components/qr-svg.stories.d.ts.map +0 -1
  309. package/dist/components/radio-group.stories.d.ts +0 -10
  310. package/dist/components/radio-group.stories.d.ts.map +0 -1
  311. package/dist/components/scroll-area.stories.d.ts +0 -8
  312. package/dist/components/scroll-area.stories.d.ts.map +0 -1
  313. package/dist/components/search-field.stories.d.ts +0 -10
  314. package/dist/components/search-field.stories.d.ts.map +0 -1
  315. package/dist/components/segmented.stories.d.ts +0 -8
  316. package/dist/components/segmented.stories.d.ts.map +0 -1
  317. package/dist/components/select.stories.d.ts +0 -12
  318. package/dist/components/select.stories.d.ts.map +0 -1
  319. package/dist/components/separator.stories.d.ts +0 -9
  320. package/dist/components/separator.stories.d.ts.map +0 -1
  321. package/dist/components/sheet.stories.d.ts +0 -12
  322. package/dist/components/sheet.stories.d.ts.map +0 -1
  323. package/dist/components/side-drawer.stories.d.ts +0 -8
  324. package/dist/components/side-drawer.stories.d.ts.map +0 -1
  325. package/dist/components/sidebar.stories.d.ts +0 -10
  326. package/dist/components/sidebar.stories.d.ts.map +0 -1
  327. package/dist/components/skeleton.stories.d.ts +0 -11
  328. package/dist/components/skeleton.stories.d.ts.map +0 -1
  329. package/dist/components/slider.stories.d.ts +0 -12
  330. package/dist/components/slider.stories.d.ts.map +0 -1
  331. package/dist/components/spinner.stories.d.ts +0 -9
  332. package/dist/components/spinner.stories.d.ts.map +0 -1
  333. package/dist/components/split-view.stories.d.ts +0 -58
  334. package/dist/components/split-view.stories.d.ts.map +0 -1
  335. package/dist/components/switch.stories.d.ts +0 -9
  336. package/dist/components/switch.stories.d.ts.map +0 -1
  337. package/dist/components/syntax-highlighting.stories.d.ts +0 -18
  338. package/dist/components/syntax-highlighting.stories.d.ts.map +0 -1
  339. package/dist/components/tab-bar.stories.d.ts +0 -8
  340. package/dist/components/tab-bar.stories.d.ts.map +0 -1
  341. package/dist/components/tab-view.stories.d.ts +0 -37
  342. package/dist/components/tab-view.stories.d.ts.map +0 -1
  343. package/dist/components/tabs.stories.d.ts +0 -9
  344. package/dist/components/tabs.stories.d.ts.map +0 -1
  345. package/dist/components/text-field.stories.d.ts +0 -9
  346. package/dist/components/text-field.stories.d.ts.map +0 -1
  347. package/dist/components/toast.stories.d.ts +0 -13
  348. package/dist/components/toast.stories.d.ts.map +0 -1
  349. package/dist/components/toggle-group.stories.d.ts +0 -10
  350. package/dist/components/toggle-group.stories.d.ts.map +0 -1
  351. package/dist/components/toggle.stories.d.ts +0 -9
  352. package/dist/components/toggle.stories.d.ts.map +0 -1
  353. package/dist/components/tooltip.stories.d.ts +0 -11
  354. package/dist/components/tooltip.stories.d.ts.map +0 -1
  355. package/dist/components/workbench/annotator.d.ts.map +0 -1
  356. package/dist/components/workbench/chat.d.ts.map +0 -1
  357. package/dist/components/workbench/chat.stories.d.ts +0 -13
  358. package/dist/components/workbench/chat.stories.d.ts.map +0 -1
  359. package/dist/components/workbench/composer-files.d.ts.map +0 -1
  360. package/dist/components/workbench/composer.d.ts.map +0 -1
  361. package/dist/components/workbench/composer.stories.d.ts +0 -35
  362. package/dist/components/workbench/composer.stories.d.ts.map +0 -1
  363. package/dist/components/workbench/fixtures.d.ts +0 -38
  364. package/dist/components/workbench/fixtures.d.ts.map +0 -1
  365. package/dist/components/workbench/markdown.d.ts.map +0 -1
  366. package/dist/components/workbench/message-scroller.d.ts.map +0 -1
  367. package/dist/components/workbench/message-scroller.stories.d.ts +0 -9
  368. package/dist/components/workbench/message-scroller.stories.d.ts.map +0 -1
  369. package/dist/components/workbench/model-picker.d.ts +0 -29
  370. package/dist/components/workbench/model-picker.d.ts.map +0 -1
  371. package/dist/components/workbench/models.d.ts +0 -32
  372. package/dist/components/workbench/models.d.ts.map +0 -1
  373. package/dist/components/workbench/snap-sheet.d.ts.map +0 -1
  374. package/dist/components/workbench/snap-sheet.stories.d.ts +0 -8
  375. package/dist/components/workbench/snap-sheet.stories.d.ts.map +0 -1
  376. package/dist/components/workbench/surfaces.d.ts +0 -67
  377. package/dist/components/workbench/surfaces.d.ts.map +0 -1
  378. package/dist/components/workbench/surfaces.stories.d.ts +0 -15
  379. package/dist/components/workbench/surfaces.stories.d.ts.map +0 -1
  380. package/dist/components/workbench/terminal.d.ts +0 -51
  381. package/dist/components/workbench/terminal.d.ts.map +0 -1
  382. package/dist/components/workbench/terminal.stories.d.ts +0 -8
  383. package/dist/components/workbench/terminal.stories.d.ts.map +0 -1
  384. package/dist/components/workbench/wb-popover.d.ts.map +0 -1
  385. package/dist/components/workbench/workbench-composer.d.ts +0 -26
  386. package/dist/components/workbench/workbench-composer.d.ts.map +0 -1
  387. package/dist/demos/delivery/delivery-tracking-demo.d.ts +0 -41
  388. package/dist/demos/delivery/delivery-tracking-demo.d.ts.map +0 -1
  389. package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts +0 -13
  390. package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts.map +0 -1
  391. package/dist/demos/haptics-playground.d.ts +0 -18
  392. package/dist/demos/haptics-playground.d.ts.map +0 -1
  393. package/dist/demos/haptics-playground.stories.d.ts +0 -8
  394. package/dist/demos/haptics-playground.stories.d.ts.map +0 -1
  395. package/dist/demos/map-chat/geo.d.ts +0 -46
  396. package/dist/demos/map-chat/geo.d.ts.map +0 -1
  397. package/dist/demos/map-chat/map-agent.d.ts +0 -48
  398. package/dist/demos/map-chat/map-agent.d.ts.map +0 -1
  399. package/dist/demos/map-chat/map-chat-demo.d.ts +0 -19
  400. package/dist/demos/map-chat/map-chat-demo.d.ts.map +0 -1
  401. package/dist/demos/map-chat/map-chat-demo.stories.d.ts +0 -16
  402. package/dist/demos/map-chat/map-chat-demo.stories.d.ts.map +0 -1
  403. package/dist/demos/map-chat/map-icons.d.ts +0 -44
  404. package/dist/demos/map-chat/map-icons.d.ts.map +0 -1
  405. package/dist/demos/map-chat/places.d.ts +0 -29
  406. package/dist/demos/map-chat/places.d.ts.map +0 -1
  407. package/dist/demos/map-chat/tile-map.d.ts +0 -108
  408. package/dist/demos/map-chat/tile-map.d.ts.map +0 -1
  409. package/dist/demos/pencilkit/demo-strokes.d.ts +0 -4
  410. package/dist/demos/pencilkit/demo-strokes.d.ts.map +0 -1
  411. package/dist/demos/pencilkit/pencilkit-demo.d.ts +0 -17
  412. package/dist/demos/pencilkit/pencilkit-demo.d.ts.map +0 -1
  413. package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts +0 -11
  414. package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts.map +0 -1
  415. package/dist/demos/sidebar-demo.d.ts +0 -6
  416. package/dist/demos/sidebar-demo.d.ts.map +0 -1
  417. package/dist/demos/split-view-demos.d.ts +0 -50
  418. package/dist/demos/split-view-demos.d.ts.map +0 -1
  419. package/dist/lib/chat/chat-shell-context.d.ts +0 -20
  420. package/dist/lib/chat/chat-shell-context.d.ts.map +0 -1
  421. package/dist/lib/chat/persistent-host.d.ts.map +0 -1
  422. package/dist/lib/haptics.d.ts +0 -27
  423. package/dist/lib/haptics.d.ts.map +0 -1
  424. package/dist/lib/icon.stories.d.ts +0 -15
  425. package/dist/lib/icon.stories.d.ts.map +0 -1
  426. package/dist/lib/pencilkit/constants.d.ts.map +0 -1
  427. package/dist/lib/workbench/haptics.d.ts +0 -3
  428. package/dist/lib/workbench/haptics.d.ts.map +0 -1
  429. package/dist/lib/workbench/icons.d.ts.map +0 -1
  430. package/dist/lib/workbench/motion.d.ts +0 -19
  431. package/dist/lib/workbench/motion.d.ts.map +0 -1
  432. package/dist/lib/workbench/press.d.ts +0 -10
  433. package/dist/lib/workbench/press.d.ts.map +0 -1
  434. package/dist/lib/workbench/theme.d.ts.map +0 -1
  435. package/dist/lib/workbench/util.d.ts +0 -8
  436. package/dist/lib/workbench/util.d.ts.map +0 -1
  437. package/dist/stories/frame.d.ts +0 -16
  438. package/dist/stories/frame.d.ts.map +0 -1
  439. package/dist/stories/primitive-frame.d.ts +0 -20
  440. package/dist/stories/primitive-frame.d.ts.map +0 -1
  441. package/dist/templates/artifact-chat-container.d.ts.map +0 -1
  442. package/dist/templates/artifact-chat-container.stories.d.ts +0 -24
  443. package/dist/templates/artifact-chat-container.stories.d.ts.map +0 -1
  444. package/dist/templates/chat-shell.d.ts +0 -87
  445. package/dist/templates/chat-shell.d.ts.map +0 -1
  446. package/dist/templates/workbench-shell.d.ts +0 -177
  447. package/dist/templates/workbench-shell.d.ts.map +0 -1
  448. package/dist/templates/workbench-shell.stories.d.ts +0 -17
  449. package/dist/templates/workbench-shell.stories.d.ts.map +0 -1
  450. /package/dist/components/{chat/chat-column.d.ts → chat-column.d.ts} +0 -0
  451. /package/dist/components/{workbench → composer}/annotator.d.ts +0 -0
  452. /package/dist/components/{workbench → composer}/composer-files.d.ts +0 -0
  453. /package/dist/components/{workbench/message-scroller.d.ts → message-scroller.d.ts} +0 -0
  454. /package/dist/{lib → components}/pencilkit/constants.d.ts +0 -0
  455. /package/dist/components/{chat/progress-stepper.d.ts → progress-stepper.d.ts} +0 -0
  456. /package/dist/components/{workbench/snap-sheet.d.ts → snap-sheet.d.ts} +0 -0
@@ -0,0 +1,506 @@
1
+ "use client";
2
+ import { cn as e } from "../lib/utils.js";
3
+ import { springCss as t, springs as n } from "../lib/motion.js";
4
+ import { Icon as r } from "../lib/icon.js";
5
+ import { BLSafeCtx as i, BLStickyCtx as a, chromeStore as o } from "../lib/theme.js";
6
+ import { Spinner as s } from "./spinner.js";
7
+ import { useSplitViewBack as c } from "./split-view.js";
8
+ import { animate as l } from "framer-motion";
9
+ import { use as u, useEffect as d, useLayoutEffect as f, useRef as p, useState as m } from "react";
10
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
11
+ import { Button as ee } from "react-aria-components";
12
+ //#region src/components/navigation-stack.tsx
13
+ var _ = {
14
+ off: "103%",
15
+ under: "-28%",
16
+ underPct: -28,
17
+ dim: .12,
18
+ edge: 36,
19
+ commit: .32,
20
+ flick: .55,
21
+ settleMs: 580
22
+ };
23
+ function v({ sc: n, depth: c, top: l, ghost: v, entering: y, nav: b, backTitle: x, reg: S, defIns: C, z: w, rootBack: T }) {
24
+ let E = c === 0 && !v ? T : null, D = E ? E.title ?? "Back" : x, O = p(!1), [k, A] = m(!y), [j, M] = m(!1), [N, P] = m(!1), [F, I] = m(!1), L = u(i), R = p(0), z = p(null), B = p(null), V = p(null), H = p(null), [U, W] = m(!1), G = p(null), K = p(null), q = p(null), J = p(null), [Y, X] = m({
25
+ mode: "title",
26
+ w: 160
27
+ }), Z = c > 0 || v || !!E;
28
+ f(() => {
29
+ let e = G.current, t = K.current, r = q.current, i = J.current;
30
+ if (!Z || !e || !r || !i) return;
31
+ let a = () => {
32
+ let a = n.title != null && t ? t.offsetWidth : 0, o = Math.floor((e.clientWidth - a) / 2 - 40), s = r.offsetWidth, c = i.offsetWidth, l = s > 0 && (o >= s || o >= c + 14) ? "title" : o >= c ? "back" : "none";
33
+ X((e) => e.mode === l && e.w === o ? e : {
34
+ mode: l,
35
+ w: Math.max(0, o)
36
+ });
37
+ };
38
+ if (a(), typeof ResizeObserver > "u") return;
39
+ let o = new ResizeObserver(a);
40
+ return [
41
+ e,
42
+ r,
43
+ i
44
+ ].forEach((e) => o.observe(e)), t && o.observe(t), () => o.disconnect();
45
+ }, [
46
+ Z,
47
+ D,
48
+ n.title
49
+ ]), f(() => {
50
+ y && !O.current && (O.current = !0, A(!1), requestAnimationFrame(() => requestAnimationFrame(() => A(!0))));
51
+ }, [y]), d(() => {
52
+ v && requestAnimationFrame(() => M(!0));
53
+ }, [v]);
54
+ let Q = !v && c < l, { off: $, under: te } = _, ne = v ? j ? $ : "0%" : k ? Q ? te : "0%" : $, re = n.bottomInset == null ? C || 0 : n.bottomInset, ie = L + 52, ae = n.hideChromeOnScroll !== !1;
55
+ d(() => () => o.set(!1), []);
56
+ let oe = (e) => {
57
+ let t = e.currentTarget.scrollTop, r = t > (n.largeTitle ? 44 : 8);
58
+ if (r !== N && P(r), ae && !v) {
59
+ let e = t - R.current;
60
+ t < ie * .7 ? F && (I(!1), o.set(!1)) : e > 5 ? F || (I(!0), o.set(!0)) : e < -5 && F && (I(!1), o.set(!1));
61
+ }
62
+ R.current = t;
63
+ }, se = n.titleOnScroll ? N : !n.largeTitle || N, ce = (e) => {
64
+ if (e.key === "Escape" && b.canPop && c > 0) {
65
+ b.pop();
66
+ return;
67
+ }
68
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
69
+ let t = [...e.currentTarget.querySelectorAll("[data-tkrow]")].filter((e) => e.offsetParent), n = t.indexOf(document.activeElement), r = e.key === "ArrowDown" ? n < 0 ? 0 : Math.min(n + 1, t.length - 1) : n < 0 ? t.length - 1 : Math.max(n - 1, 0);
70
+ t[r] && (t[r].focus(), e.preventDefault());
71
+ }
72
+ }, le = (e) => {
73
+ !n.onRefresh || U || e.button || z.current.scrollTop > 2 || (H.current = {
74
+ y0: e.clientY,
75
+ x0: e.clientX,
76
+ on: !1,
77
+ armed: !1
78
+ });
79
+ }, ue = (e) => {
80
+ let t = H.current;
81
+ if (!t) return;
82
+ let n = e.clientY - t.y0, r = e.clientX - t.x0;
83
+ if (!t.on) {
84
+ if (n > 10 && n > Math.abs(r) * 1.3 && z.current.scrollTop <= 1) {
85
+ t.on = !0;
86
+ try {
87
+ z.current.setPointerCapture(e.pointerId);
88
+ } catch {}
89
+ } else if (n < -6) {
90
+ H.current = null;
91
+ return;
92
+ } else return;
93
+ }
94
+ let i = Math.min(110, 56 * Math.log1p(Math.max(0, n - 10) / 40));
95
+ t.t = i;
96
+ let a = B.current, o = V.current;
97
+ a && (a.style.transition = "none", a.style.transform = `translateY(${i}px)`), o && (o.style.opacity = String(Math.min(1, i / 58)), o.style.transform = `translateX(-50%) rotate(${i * 3.2}deg) scale(${Math.min(1, .5 + i / 90)})`), t.armed = i > 54;
98
+ }, de = () => {
99
+ let e = H.current;
100
+ if (!e || (H.current = null, !e.on)) return;
101
+ let r = B.current, i = V.current;
102
+ e.armed ? (W(!0), r && (r.style.transition = t("transform", "snappy"), r.style.transform = "translateY(52px)"), i && (i.style.opacity = "1", i.style.transform = "translateX(-50%)"), setTimeout(() => {
103
+ W(!1), r && (r.style.transition = t("transform", "smooth"), r.style.transform = "translateY(0)"), i && (i.style.opacity = "0"), n.onRefresh && n.onRefresh(), setTimeout(() => {
104
+ r && (r.style.transition = "", r.style.transform = "");
105
+ }, 560);
106
+ }, 1100)) : (r && (r.style.transition = t("transform", "snappy"), r.style.transform = "translateY(0)", setTimeout(() => {
107
+ r && (r.style.transition = "", r.style.transform = "");
108
+ }, 400)), i && (i.style.opacity = "0"));
109
+ };
110
+ return /* @__PURE__ */ g("div", {
111
+ ref: (e) => S(n.key, { el: e }),
112
+ "data-slot": "screen",
113
+ "data-screen-label": typeof n.title == "string" ? n.title : n.key,
114
+ className: e("absolute inset-0 z-(--screen-z) overflow-hidden will-change-transform [transform:translateX(var(--screen-x))] transition-transform duration-spring-smooth ease-spring-smooth motion-reduce:transition-none", n.grouped ? "bg-muted" : "bg-background", c > 0 && "shadow-[-10px_0_30px_black] shadow-black/16", v ? "pointer-events-none" : "pointer-events-auto"),
115
+ "data-scrolled": N ? "" : void 0,
116
+ style: {
117
+ "--screen-z": 10 + w,
118
+ "--screen-x": ne,
119
+ "--screen-bar-h": ie + "px",
120
+ "--screen-safe-top": L + "px",
121
+ "--screen-max-w": n.maxW == null || n.maxW === 0 || n.maxW === "" ? "none" : typeof n.maxW == "number" ? n.maxW + "px" : n.maxW,
122
+ "--screen-inset": re + 28 + "px"
123
+ },
124
+ children: [
125
+ /* @__PURE__ */ h("div", {
126
+ ref: (e) => {
127
+ z.current = e, S(n.key, { scroller: e });
128
+ },
129
+ className: "bl-scroll absolute inset-0 overflow-x-hidden overflow-y-auto overscroll-contain [-webkit-overflow-scrolling:touch]",
130
+ onScroll: oe,
131
+ onKeyDown: ce,
132
+ onPointerDown: le,
133
+ onPointerMove: ue,
134
+ onPointerUp: de,
135
+ onPointerCancel: de,
136
+ children: /* @__PURE__ */ g("div", {
137
+ ref: B,
138
+ className: "mx-auto box-border w-full max-w-(--screen-max-w)",
139
+ children: [
140
+ n.largeTitle ? /* @__PURE__ */ g("div", {
141
+ className: "px-4 pt-[calc(var(--screen-bar-h)+2px)] pb-1.5",
142
+ children: [/* @__PURE__ */ h("div", {
143
+ className: "text-[34px] leading-[1.15] font-extrabold tracking-[-.5px]",
144
+ children: /* @__PURE__ */ h("span", {
145
+ ref: (e) => S(n.key, { large: e }),
146
+ children: n.title
147
+ })
148
+ }), n.subheader ? /* @__PURE__ */ h("div", {
149
+ className: "mt-2.5",
150
+ children: n.subheader
151
+ }) : null]
152
+ }) : /* @__PURE__ */ h("div", { className: "h-(--screen-bar-h)" }),
153
+ /* @__PURE__ */ h(a.Provider, {
154
+ value: ie,
155
+ children: n.content
156
+ }),
157
+ /* @__PURE__ */ h("div", { className: "h-(--screen-inset)" })
158
+ ]
159
+ })
160
+ }),
161
+ n.onRefresh ? /* @__PURE__ */ h("div", {
162
+ ref: V,
163
+ className: "pointer-events-none absolute top-[calc(var(--screen-bar-h)+8px)] left-1/2 z-5 [transform:translateX(-50%)] text-muted-foreground opacity-0 transition-opacity duration-spring-snappy ease-spring-snappy",
164
+ children: /* @__PURE__ */ h(s, { spin: U })
165
+ }) : null,
166
+ /* @__PURE__ */ g("div", {
167
+ className: e("absolute inset-x-0 top-0 z-30 box-border flex h-(--screen-bar-h) items-end px-1.5 pt-(--screen-safe-top) transition-transform duration-spring-smooth ease-spring-smooth", F ? "[transform:translateY(calc(var(--screen-safe-top)-var(--screen-bar-h)))]" : "[transform:none]"),
168
+ children: [
169
+ /* @__PURE__ */ h("div", { className: e("absolute inset-0 [border-bottom:1px_solid_var(--border)] bg-bar backdrop-blur-[18px] backdrop-saturate-[1.7] transition-opacity duration-spring-snappy ease-spring-snappy", N ? "opacity-100" : "opacity-0") }),
170
+ L ? /* @__PURE__ */ h("div", { className: e("absolute inset-x-0 top-0 h-(--screen-safe-top) bg-bar backdrop-blur-[18px] backdrop-saturate-[1.7] transition-transform duration-spring-smooth ease-spring-smooth", N || F ? "opacity-100" : "opacity-0", F ? "[transform:translateY(calc(var(--screen-bar-h)-var(--screen-safe-top)))]" : "[transform:none]") }) : null,
171
+ /* @__PURE__ */ g("div", {
172
+ ref: G,
173
+ className: e("flex h-toolbar w-full items-center transition-opacity duration-spring-snappy ease-spring-snappy", F ? "opacity-0" : "opacity-100"),
174
+ children: [
175
+ /* @__PURE__ */ g("div", {
176
+ className: "relative z-1 flex min-w-[44px] items-center",
177
+ children: [Z ? /* @__PURE__ */ g(ee, {
178
+ className: "bl-btn flex cursor-pointer items-center border-0 bg-transparent py-1.5 pr-2 pl-0 [font-family:inherit] text-body text-primary",
179
+ "aria-label": Y.mode === "none" ? "Back" : void 0,
180
+ onPress: E ? E.onPress : b.canPop ? b.pop : void 0,
181
+ children: [/* @__PURE__ */ h(r, {
182
+ name: "chevL",
183
+ size: 24,
184
+ sw: 2.4
185
+ }), Y.mode === "none" ? null : /* @__PURE__ */ h("span", {
186
+ ref: (e) => S(n.key, { back: e }),
187
+ "data-mode": Y.mode,
188
+ className: "max-w-(--back-w) truncate",
189
+ style: { "--back-w": Y.w + "px" },
190
+ children: Y.mode === "title" ? D : "Back"
191
+ })]
192
+ }) : n.leading || null, Z ? /* @__PURE__ */ g("span", {
193
+ "aria-hidden": "true",
194
+ className: "pointer-events-none invisible absolute top-0 left-0 flex text-body whitespace-nowrap",
195
+ children: [/* @__PURE__ */ h("span", {
196
+ ref: q,
197
+ children: D
198
+ }), /* @__PURE__ */ h("span", {
199
+ ref: J,
200
+ children: "Back"
201
+ })]
202
+ }) : null]
203
+ }),
204
+ /* @__PURE__ */ h("div", {
205
+ ref: (e) => {
206
+ K.current = e, S(n.key, { inline: e });
207
+ },
208
+ className: e("pointer-events-none absolute left-1/2 max-w-[52%] -translate-x-1/2 truncate text-body font-semibold text-foreground transition-opacity duration-spring-snappy ease-spring-snappy", se ? "opacity-100" : "opacity-0"),
209
+ children: n.title
210
+ }),
211
+ /* @__PURE__ */ h("div", {
212
+ className: "relative z-1 ml-auto flex items-center",
213
+ children: n.trailing || null
214
+ })
215
+ ]
216
+ })
217
+ ]
218
+ }),
219
+ n.overlay || null,
220
+ /* @__PURE__ */ h("div", {
221
+ ref: (e) => S(n.key, { dim: e }),
222
+ className: e("pointer-events-none absolute inset-0 z-200 bg-black transition-opacity duration-spring-smooth ease-spring-smooth", Q ? "opacity-12" : "opacity-0")
223
+ })
224
+ ]
225
+ });
226
+ }
227
+ var y = (e, t, n) => e + (t - e) * n, b = (e) => Math.max(0, Math.min(1, e));
228
+ function x(e) {
229
+ return e ? e.large && !e.el?.hasAttribute("data-scrolled") ? e.large : e.inline && parseFloat(getComputedStyle(e.inline).opacity) > .5 ? e.inline : null : null;
230
+ }
231
+ function S(e) {
232
+ return e?.back && e.back.dataset.mode === "title" ? e.back : null;
233
+ }
234
+ function C(e, t, n, r) {
235
+ let i = e.getBoundingClientRect(), a = t.getBoundingClientRect(), o = n.getBoundingClientRect();
236
+ if (!a.width || !o.width) return null;
237
+ let s = r ? r.getBoundingClientRect() : i, c = {
238
+ x: a.left - i.left,
239
+ y: a.top - i.top,
240
+ w: a.width,
241
+ h: a.height
242
+ }, l = {
243
+ x: o.left - s.left,
244
+ y: o.top - s.top,
245
+ w: o.width,
246
+ h: o.height
247
+ }, u = getComputedStyle(t), d = getComputedStyle(n), f = (parseFloat(d.fontSize) || 17) / (parseFloat(u.fontSize) || 17), p = document.createElement("div");
248
+ p.setAttribute("aria-hidden", "true"), p.dataset.slot = "navigation-title-flight", Object.assign(p.style, {
249
+ position: "absolute",
250
+ inset: "0",
251
+ pointerEvents: "none",
252
+ zIndex: "300",
253
+ overflow: "hidden"
254
+ });
255
+ let m = (e, t, n) => {
256
+ let r = document.createElement("div");
257
+ return r.innerHTML = e.innerHTML, Object.assign(r.style, {
258
+ position: "absolute",
259
+ left: "0",
260
+ top: "0",
261
+ width: n.w + "px",
262
+ height: n.h + "px",
263
+ whiteSpace: "nowrap",
264
+ overflow: "hidden",
265
+ textOverflow: "ellipsis",
266
+ transformOrigin: "0 50%",
267
+ willChange: "transform, opacity",
268
+ color: t.color,
269
+ fontFamily: t.fontFamily,
270
+ fontSize: t.fontSize,
271
+ fontWeight: t.fontWeight,
272
+ letterSpacing: t.letterSpacing,
273
+ lineHeight: n.h + "px"
274
+ }), p.appendChild(r), r;
275
+ }, h = m(t, u, c), g = m(n, d, l);
276
+ return e.appendChild(p), t.style.visibility = "hidden", n.style.visibility = "hidden", {
277
+ set(e) {
278
+ let t = y(c.x, l.x, e), n = y(c.y + c.h / 2, l.y + l.h / 2, e);
279
+ h.style.transform = `translate(${t}px, ${n - c.h / 2}px) scale(${y(1, f, e)})`, g.style.transform = `translate(${t}px, ${n - l.h / 2}px) scale(${y(1 / f, 1, e)})`, h.style.opacity = String(b(1 - e * 1.8)), g.style.opacity = String(b((e - .2) / .6));
280
+ },
281
+ done() {
282
+ t.style.visibility = "", n.style.visibility = "", p.remove();
283
+ }
284
+ };
285
+ }
286
+ var w = _.settleMs, T = /* @__PURE__ */ new Set(), E = !1, D = typeof matchMedia < "u" && matchMedia("(any-pointer: coarse)").matches;
287
+ function O() {
288
+ if (!(!D || E)) try {
289
+ history.pushState({ blNav: 1 }, ""), E = !0;
290
+ } catch {
291
+ D = !1;
292
+ }
293
+ }
294
+ typeof window < "u" && !window.__tkPopstate && (window.__tkPopstate = 1, window.addEventListener("popstate", () => {
295
+ if (!E) return;
296
+ E = !1;
297
+ let e = null;
298
+ T.forEach((t) => {
299
+ let n = t();
300
+ n.depth > 1 && (e = n);
301
+ }), e && (e.pop(), setTimeout(() => {
302
+ let e = !1;
303
+ T.forEach((t) => {
304
+ t().depth > 1 && (e = !0);
305
+ }), e && O();
306
+ }, 80));
307
+ }));
308
+ function k({ screens: r, onPop: a, defIns: o, safeTop: s, rootBack: u, className: g, style: ee }) {
309
+ let y = r[0]?.title, b = c(typeof y == "string" ? y : void 0), E = u === !1 ? null : u ?? (b ? {
310
+ title: b.title,
311
+ onPress: b.back
312
+ } : null), D = p(null), k = p({}), A = (e, t) => {
313
+ k.current[e] = {
314
+ ...k.current[e],
315
+ ...t
316
+ };
317
+ }, [j, M] = m({
318
+ enter: null,
319
+ exit: null
320
+ }), N = p(r), P = p(!1), F = p(null), I = p(a);
321
+ I.current = a;
322
+ let L = p(null), R = p(null), z = () => {
323
+ let e = R.current;
324
+ R.current = null, e && (e.run?.stop(), e.f.done());
325
+ }, B = () => typeof matchMedia < "u" && matchMedia("(prefers-reduced-motion: reduce)").matches, V = (e) => {
326
+ z(), !B() && requestAnimationFrame(() => {
327
+ let [t, r, i] = e();
328
+ if (!t || !r || !D.current) return;
329
+ let a = C(D.current, t, r, i);
330
+ if (!a) return;
331
+ a.set(0);
332
+ let o = { f: a };
333
+ R.current = o, o.run = l(0, 1, {
334
+ ...n.smooth,
335
+ onUpdate: a.set,
336
+ onComplete: () => {
337
+ R.current === o && z();
338
+ }
339
+ });
340
+ });
341
+ };
342
+ d(() => z, []);
343
+ let H = r.map((e) => e.key).join("¦");
344
+ f(() => {
345
+ let e = N.current;
346
+ N.current = r;
347
+ let t = e.map((e) => e.key), n = r.map((e) => e.key);
348
+ if (t.join("¦") === H) return;
349
+ clearTimeout(F.current);
350
+ let i = (e, t) => e.every((e, n) => t[n] === e);
351
+ if (n.length > t.length && i(t, n)) {
352
+ M({
353
+ enter: n[n.length - 1],
354
+ exit: null
355
+ });
356
+ let e = t[t.length - 1], r = n[n.length - 1];
357
+ V(() => [
358
+ x(k.current[e]),
359
+ S(k.current[r]),
360
+ k.current[r]?.el
361
+ ]), O(), F.current = setTimeout(() => M({
362
+ enter: null,
363
+ exit: null
364
+ }), w);
365
+ } else if (n.length < t.length && i(n, t)) {
366
+ if (P.current) {
367
+ P.current = !1, M({
368
+ enter: null,
369
+ exit: null
370
+ });
371
+ return;
372
+ }
373
+ M({
374
+ enter: null,
375
+ exit: e.slice(n.length)
376
+ });
377
+ let r = t[t.length - 1], i = n[n.length - 1];
378
+ V(() => [
379
+ S(k.current[r]),
380
+ x(k.current[i]),
381
+ k.current[i]?.el
382
+ ]), F.current = setTimeout(() => M({
383
+ enter: null,
384
+ exit: null
385
+ }), w);
386
+ } else M({
387
+ enter: null,
388
+ exit: null
389
+ });
390
+ }, [H]);
391
+ let U = j.exit || [], W = r.length > 1, G = p(0);
392
+ G.current = r.length, d(() => {
393
+ let e = () => ({
394
+ depth: G.current,
395
+ pop: () => I.current && I.current()
396
+ });
397
+ return T.add(e), () => {
398
+ T.delete(e);
399
+ };
400
+ }, []);
401
+ let K = (e) => {
402
+ if (e.button || j.enter || j.exit || r.length < 2) return;
403
+ let t = D.current.getBoundingClientRect();
404
+ if (e.clientX - t.left > _.edge) return;
405
+ let n = k.current[r[r.length - 1].key], i = k.current[r[r.length - 2].key];
406
+ if (!(!n || !n.el || !i || !i.el)) {
407
+ L.current = {
408
+ x0: e.clientX,
409
+ y0: e.clientY,
410
+ w: t.width,
411
+ topR: n,
412
+ undR: i,
413
+ last: e.clientX,
414
+ lt: performance.now(),
415
+ vel: 0,
416
+ moved: !1,
417
+ on: !1
418
+ };
419
+ try {
420
+ D.current.setPointerCapture(e.pointerId);
421
+ } catch {}
422
+ }
423
+ }, q = (e) => {
424
+ let t = L.current;
425
+ if (!t) return;
426
+ let n = e.clientX - t.x0, r = e.clientY - t.y0;
427
+ if (!t.on) {
428
+ if (n > 8 && n > Math.abs(r) * 1.2) {
429
+ t.on = !0, z();
430
+ let e = S(t.topR), n = x(t.undR), r = !B() && e && n ? C(D.current, e, n, t.undR.el) : null;
431
+ r && (r.set(0), R.current = { f: r }, t.flight = R.current);
432
+ } else {
433
+ Math.abs(r) > 14 && (L.current = null);
434
+ return;
435
+ }
436
+ }
437
+ let i = Math.max(0, n);
438
+ t.moved = !0, t.dx = i, t.vel = (e.clientX - t.last) / Math.max(1, performance.now() - t.lt), t.last = e.clientX, t.lt = performance.now();
439
+ let a = i / t.w;
440
+ try {
441
+ t.topR.el.style.transition = "none", t.topR.el.style.transform = `translateX(${i}px)`, t.undR.el.style.transition = "none", t.undR.el.style.transform = `translateX(${_.underPct * (1 - a)}%)`, t.undR.dim && (t.undR.dim.style.transition = "none", t.undR.dim.style.opacity = String(_.dim * (1 - a))), t.flight && R.current === t.flight && t.flight.f.set(a);
442
+ } catch {
443
+ L.current = null;
444
+ }
445
+ }, J = () => {
446
+ let e = L.current;
447
+ if (!e) return;
448
+ if (L.current = null, !e.moved || !e.on) {
449
+ Y(e);
450
+ return;
451
+ }
452
+ let r = (e.dx || 0) / e.w, i = r > _.commit || e.vel > _.flick, a = t("transform", "tray"), o = e.flight && R.current === e.flight ? e.flight : null;
453
+ o && (o.run = l(r, +!!i, {
454
+ ...n.tray,
455
+ onUpdate: o.f.set,
456
+ onComplete: () => {
457
+ R.current === o && z();
458
+ }
459
+ })), i ? (e.topR.el.style.transition = a, e.topR.el.style.transform = "translateX(104%)", e.undR.el.style.transition = a, e.undR.el.style.transform = "translateX(0%)", e.undR.dim && (e.undR.dim.style.transition = t("opacity", "tray"), e.undR.dim.style.opacity = "0"), P.current = !0, setTimeout(() => {
460
+ I.current && I.current(), requestAnimationFrame(() => Y(e));
461
+ }, 380)) : (e.topR.el.style.transition = a, e.topR.el.style.transform = "translateX(0px)", e.undR.el.style.transition = a, e.undR.el.style.transform = `translateX(${_.under})`, e.undR.dim && (e.undR.dim.style.transition = t("opacity", "tray"), e.undR.dim.style.opacity = String(_.dim)), setTimeout(() => Y(e), 430));
462
+ }, Y = (e) => [e.topR, e.undR].forEach((e) => {
463
+ try {
464
+ e && e.el && (e.el.style.transition = "", e.el.style.transform = ""), e && e.dim && (e.dim.style.transition = "", e.dim.style.opacity = "");
465
+ } catch {}
466
+ }), X = r.length - 1, Z = N.current.map((e) => e.key), Q = r.length > Z.length && Z.every((e, t) => r[t] && r[t].key === e) ? r[X].key : null, $ = [...r.map((e, t) => ({
467
+ sc: e,
468
+ i: t,
469
+ ghost: !1
470
+ })), ...U.map((e, t) => ({
471
+ sc: e,
472
+ i: r.length + t,
473
+ ghost: !0
474
+ }))], te = $.length - 1, ne = /* @__PURE__ */ h("div", {
475
+ ref: D,
476
+ "data-slot": "navigation-stack",
477
+ onPointerDownCapture: K,
478
+ onPointerMove: q,
479
+ onPointerUp: J,
480
+ onPointerCancel: J,
481
+ className: e("absolute inset-0 touch-pan-y overflow-hidden", g),
482
+ style: ee,
483
+ children: $.map((e) => /* @__PURE__ */ h(v, {
484
+ sc: e.sc,
485
+ depth: e.i,
486
+ top: e.ghost ? te : X,
487
+ ghost: e.ghost,
488
+ entering: !e.ghost && (j.enter === e.sc.key || Q === e.sc.key) && e.i === X,
489
+ nav: {
490
+ pop: () => I.current && I.current(),
491
+ canPop: W && !e.ghost
492
+ },
493
+ backTitle: e.i > 0 ? e.ghost ? r[r.length - 1] && r[r.length - 1].title : r[e.i - 1].title : null,
494
+ reg: A,
495
+ defIns: o,
496
+ z: e.i,
497
+ rootBack: E
498
+ }, e.sc.key))
499
+ });
500
+ return s == null ? ne : /* @__PURE__ */ h(i.Provider, {
501
+ value: parseFloat(String(s)) || 0,
502
+ children: ne
503
+ });
504
+ }
505
+ //#endregion
506
+ export { k as NavigationStack, v as ScreenWrap, _ as navigationPush };
@@ -0,0 +1,38 @@
1
+ import { cn as e } from "../lib/utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/components/now-playing-bars.tsx
4
+ var n = [
5
+ .9,
6
+ .5,
7
+ .75,
8
+ .35,
9
+ .62,
10
+ .44
11
+ ];
12
+ function r({ playing: r = !0, bars: i = 4, size: a = 14, barWidth: o, gap: s, speed: c = .7, className: l, style: u, "aria-label": d }) {
13
+ let f = o ?? Math.max(2, Math.round(a * .22)), p = s ?? Math.max(1, Math.round(a * .14));
14
+ return /* @__PURE__ */ t("span", {
15
+ "data-slot": "now-playing-bars",
16
+ "data-playing": r || void 0,
17
+ role: d ? "img" : void 0,
18
+ "aria-label": d,
19
+ "aria-hidden": !d || void 0,
20
+ className: e("inline-flex shrink-0 items-end", l),
21
+ style: {
22
+ height: a,
23
+ gap: p,
24
+ ...u
25
+ },
26
+ children: Array.from({ length: i }, (e, r) => /* @__PURE__ */ t("span", {
27
+ className: "bl-eq-bar block origin-bottom rounded-[1px] bg-current",
28
+ style: {
29
+ width: f,
30
+ height: `${n[r % n.length] * 100}%`,
31
+ "--bl-eq-dur": `${c + r * .13}s`,
32
+ "--bl-eq-delay": `${r * -.2}s`
33
+ }
34
+ }, r))
35
+ });
36
+ }
37
+ //#endregion
38
+ export { r as NowPlayingBars };
@@ -1 +1 @@
1
- {"version":3,"file":"number-morph.d.ts","sourceRoot":"","sources":["../../src/components/number-morph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AA6DvE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,MAAM,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,gBAAgB,2CA8BzF"}
1
+ {"version":3,"file":"number-morph.d.ts","sourceRoot":"","sources":["../../src/components/number-morph.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AA6DvE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,MAAM,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,gBAAgB,2CA8BzF"}
@@ -0,0 +1,123 @@
1
+ "use client";
2
+ import { cn as e } from "../lib/utils.js";
3
+ import { fades as t, springs as n } from "../lib/motion.js";
4
+ import { AnimatePresence as r, animate as i, motion as a, useMotionValue as o, useReducedMotion as s, useTransform as c } from "framer-motion";
5
+ import { useEffect as l, useMemo as u, useRef as d } from "react";
6
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ //#region src/components/number-morph.tsx
8
+ function m(e, t) {
9
+ let n = t.formatToParts(e), r = n.filter((e) => e.type === "integer").reduce((e, t) => e + t.value.length, 0), i = 0, a = 0, o = {}, s = [];
10
+ for (let e of n) if (e.type === "integer") for (let t of e.value) s.push({
11
+ key: `i${r - 1 - i}`,
12
+ type: "digit",
13
+ value: t
14
+ }), i++;
15
+ else if (e.type === "fraction") for (let t of e.value) s.push({
16
+ key: `f${a}`,
17
+ type: "digit",
18
+ value: t
19
+ }), a++;
20
+ else e.type === "group" ? s.push({
21
+ key: `g${r - i}`,
22
+ type: "sep",
23
+ value: e.value
24
+ }) : (o[e.type] = (o[e.type] ?? -1) + 1, s.push({
25
+ key: `${e.type}${o[e.type]}`,
26
+ type: e.type === "decimal" ? "sep" : "sym",
27
+ value: e.value
28
+ }));
29
+ return s;
30
+ }
31
+ function h({ value: e, trend: t }) {
32
+ let r = Number(e), u = s(), m = o(r), h = c(m, (e) => `${-((e % 10 + 10) % 10) * (100 / 11)}%`), g = d(r);
33
+ return l(() => {
34
+ let e = g.current;
35
+ if (g.current = r, e === r) return;
36
+ let a = m.get(), o = t >= 0 ? (r - e + 10) % 10 : -((e - r + 10) % 10);
37
+ if (u) {
38
+ m.set(a + o);
39
+ return;
40
+ }
41
+ i(m, Math.round(a) + o, n.smooth);
42
+ }, [
43
+ r,
44
+ t,
45
+ u,
46
+ m
47
+ ]), /* @__PURE__ */ p("span", {
48
+ className: "relative inline-block [mask-image:linear-gradient(to_bottom,transparent,#000_.12em,#000_calc(100%_-_.12em),transparent)] py-[.12em] -my-[.12em]",
49
+ children: [/* @__PURE__ */ f("span", {
50
+ className: "invisible",
51
+ children: e
52
+ }), /* @__PURE__ */ f(a.span, {
53
+ "aria-hidden": "true",
54
+ className: "absolute inset-x-0 top-[.12em] flex flex-col items-center",
55
+ style: { y: h },
56
+ children: [
57
+ 0,
58
+ 1,
59
+ 2,
60
+ 3,
61
+ 4,
62
+ 5,
63
+ 6,
64
+ 7,
65
+ 8,
66
+ 9,
67
+ 0
68
+ ].map((e, t) => /* @__PURE__ */ f("span", { children: e }, t))
69
+ })]
70
+ });
71
+ }
72
+ function g({ value: i, format: o, locales: c, className: p, style: g }) {
73
+ let _ = JSON.stringify([c, o]), v = u(() => new Intl.NumberFormat(c, o), [_]), y = m(i, v), b = d(i), x = i === b.current ? 0 : i > b.current ? 1 : -1;
74
+ l(() => {
75
+ b.current = i;
76
+ }, [i]);
77
+ let S = s() ? { duration: 0 } : n.snappy;
78
+ return /* @__PURE__ */ f("span", {
79
+ "data-slot": "number-morph",
80
+ className: e("inline-flex items-baseline whitespace-pre tabular-nums", p),
81
+ style: g,
82
+ role: "img",
83
+ "aria-label": v.format(i),
84
+ children: /* @__PURE__ */ f(r, {
85
+ initial: !1,
86
+ mode: "popLayout",
87
+ children: y.map((e) => /* @__PURE__ */ f(a.span, {
88
+ layout: "position",
89
+ className: "inline-block",
90
+ initial: {
91
+ opacity: 0,
92
+ scale: .6,
93
+ filter: "blur(3px)",
94
+ y: x > 0 ? ".35em" : "-.35em"
95
+ },
96
+ animate: {
97
+ opacity: 1,
98
+ scale: 1,
99
+ filter: "blur(0px)",
100
+ y: 0
101
+ },
102
+ exit: {
103
+ opacity: 0,
104
+ scale: .6,
105
+ filter: "blur(3px)",
106
+ transition: t.out
107
+ },
108
+ transition: {
109
+ layout: S,
110
+ y: S,
111
+ scale: S,
112
+ default: t.in
113
+ },
114
+ children: e.type === "digit" ? /* @__PURE__ */ f(h, {
115
+ value: e.value,
116
+ trend: x
117
+ }) : e.value
118
+ }, e.key))
119
+ })
120
+ });
121
+ }
122
+ //#endregion
123
+ export { g as NumberMorph };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/pencilkit/constants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACzD,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,aAAa,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,aAAa,CAO1D,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,OAAO,UAAqE,CAAC;AAE1F,eAAO,MAAM,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAK1C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,oFAAoF;AACpF,eAAO,MAAM,aAAa;;;;;CAKqB,CAAC"}