fancy-ui-react 0.2.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 (837) hide show
  1. package/LICENSE +21 -0
  2. package/PORTING.md +118 -0
  3. package/README.md +643 -0
  4. package/dist/cameleon/FancyProvider.d.ts +11 -0
  5. package/dist/cameleon/FancyProvider.js +42 -0
  6. package/dist/cameleon/context.d.ts +22 -0
  7. package/dist/cameleon/context.js +16 -0
  8. package/dist/cameleon/index.d.ts +31 -0
  9. package/dist/cameleon/index.js +39 -0
  10. package/dist/cameleon/primitives/Badge.d.ts +10 -0
  11. package/dist/cameleon/primitives/Badge.js +12 -0
  12. package/dist/cameleon/primitives/Button.d.ts +11 -0
  13. package/dist/cameleon/primitives/Button.js +43 -0
  14. package/dist/cameleon/primitives/Checkbox.d.ts +10 -0
  15. package/dist/cameleon/primitives/Checkbox.js +39 -0
  16. package/dist/cameleon/primitives/Input.d.ts +10 -0
  17. package/dist/cameleon/primitives/Input.js +13 -0
  18. package/dist/cameleon/primitives/Radio.d.ts +12 -0
  19. package/dist/cameleon/primitives/Radio.js +29 -0
  20. package/dist/cameleon/primitives/Select.d.ts +10 -0
  21. package/dist/cameleon/primitives/Select.js +27 -0
  22. package/dist/cameleon/primitives/Slider.d.ts +7 -0
  23. package/dist/cameleon/primitives/Slider.js +22 -0
  24. package/dist/cameleon/primitives/Switch.d.ts +9 -0
  25. package/dist/cameleon/primitives/Switch.js +33 -0
  26. package/dist/cameleon/primitives/Textarea.d.ts +9 -0
  27. package/dist/cameleon/primitives/Textarea.js +13 -0
  28. package/dist/cameleon/primitives/Tooltip.d.ts +14 -0
  29. package/dist/cameleon/primitives/Tooltip.js +15 -0
  30. package/dist/cameleon/primitives/index.d.ts +10 -0
  31. package/dist/cameleon/skins/aurora/index.d.ts +2 -0
  32. package/dist/cameleon/skins/aurora/index.js +16 -0
  33. package/dist/cameleon/skins/aurora/meta.d.ts +3 -0
  34. package/dist/cameleon/skins/aurora/meta.js +61 -0
  35. package/dist/cameleon/skins/aurora/recipes.d.ts +24 -0
  36. package/dist/cameleon/skins/aurora/recipes.js +124 -0
  37. package/dist/cameleon/skins/aurora/tokens.d.ts +6 -0
  38. package/dist/cameleon/skins/aurora/tokens.js +18 -0
  39. package/dist/cameleon/skins/brutal/index.d.ts +2 -0
  40. package/dist/cameleon/skins/brutal/index.js +35 -0
  41. package/dist/cameleon/skins/brutal/meta.d.ts +3 -0
  42. package/dist/cameleon/skins/brutal/meta.js +73 -0
  43. package/dist/cameleon/skins/brutal/ornaments.d.ts +7 -0
  44. package/dist/cameleon/skins/brutal/ornaments.js +18 -0
  45. package/dist/cameleon/skins/brutal/recipes.d.ts +23 -0
  46. package/dist/cameleon/skins/brutal/recipes.js +113 -0
  47. package/dist/cameleon/skins/brutal/tokens.d.ts +8 -0
  48. package/dist/cameleon/skins/brutal/tokens.js +23 -0
  49. package/dist/cameleon/skins/default.d.ts +2 -0
  50. package/dist/cameleon/skins/default.js +79 -0
  51. package/dist/cameleon/skins/glass/index.d.ts +2 -0
  52. package/dist/cameleon/skins/glass/index.js +16 -0
  53. package/dist/cameleon/skins/glass/meta.d.ts +3 -0
  54. package/dist/cameleon/skins/glass/meta.js +63 -0
  55. package/dist/cameleon/skins/glass/recipes.d.ts +24 -0
  56. package/dist/cameleon/skins/glass/recipes.js +124 -0
  57. package/dist/cameleon/skins/glass/tokens.d.ts +5 -0
  58. package/dist/cameleon/skins/glass/tokens.js +18 -0
  59. package/dist/cameleon/skins/retro-os/index.d.ts +2 -0
  60. package/dist/cameleon/skins/retro-os/index.js +24 -0
  61. package/dist/cameleon/skins/retro-os/meta.d.ts +3 -0
  62. package/dist/cameleon/skins/retro-os/meta.js +61 -0
  63. package/dist/cameleon/skins/retro-os/ornaments.d.ts +9 -0
  64. package/dist/cameleon/skins/retro-os/ornaments.js +28 -0
  65. package/dist/cameleon/skins/retro-os/recipes.d.ts +35 -0
  66. package/dist/cameleon/skins/retro-os/recipes.js +126 -0
  67. package/dist/cameleon/skins/retro-os/tokens.d.ts +16 -0
  68. package/dist/cameleon/skins/retro-os/tokens.js +23 -0
  69. package/dist/cameleon/skins/terminal/index.d.ts +2 -0
  70. package/dist/cameleon/skins/terminal/index.js +24 -0
  71. package/dist/cameleon/skins/terminal/meta.d.ts +3 -0
  72. package/dist/cameleon/skins/terminal/meta.js +70 -0
  73. package/dist/cameleon/skins/terminal/ornaments.d.ts +7 -0
  74. package/dist/cameleon/skins/terminal/ornaments.js +8 -0
  75. package/dist/cameleon/skins/terminal/recipes.d.ts +25 -0
  76. package/dist/cameleon/skins/terminal/recipes.js +125 -0
  77. package/dist/cameleon/skins/terminal/tokens.d.ts +5 -0
  78. package/dist/cameleon/skins/terminal/tokens.js +18 -0
  79. package/dist/cameleon/types.d.ts +133 -0
  80. package/dist/components/agent-plan/AgentPlan.d.ts +25 -0
  81. package/dist/components/agent-plan/AgentPlan.js +181 -0
  82. package/dist/components/agent-plan/index.d.ts +2 -0
  83. package/dist/components/ai-data-table/AiDataTable.d.ts +54 -0
  84. package/dist/components/ai-data-table/AiDataTable.js +110 -0
  85. package/dist/components/ai-data-table/index.d.ts +2 -0
  86. package/dist/components/alert-dialog/AlertDialog.d.ts +35 -0
  87. package/dist/components/alert-dialog/AlertDialog.js +109 -0
  88. package/dist/components/alert-dialog/index.d.ts +2 -0
  89. package/dist/components/animated-beam/AnimatedBeam.d.ts +39 -0
  90. package/dist/components/animated-beam/AnimatedBeam.js +192 -0
  91. package/dist/components/animated-beam/index.d.ts +2 -0
  92. package/dist/components/animated-testimonials/AnimatedTestimonials.d.ts +32 -0
  93. package/dist/components/animated-testimonials/AnimatedTestimonials.js +172 -0
  94. package/dist/components/animated-testimonials/index.d.ts +2 -0
  95. package/dist/components/animated-tooltip/AnimatedTooltip.d.ts +13 -0
  96. package/dist/components/animated-tooltip/AnimatedTooltip.js +137 -0
  97. package/dist/components/animated-tooltip/index.d.ts +2 -0
  98. package/dist/components/apple-card-carousel/AppleCard.d.ts +30 -0
  99. package/dist/components/apple-card-carousel/AppleCard.js +219 -0
  100. package/dist/components/apple-card-carousel/AppleCardCarousel.d.ts +14 -0
  101. package/dist/components/apple-card-carousel/AppleCardCarousel.js +30 -0
  102. package/dist/components/apple-card-carousel/index.d.ts +4 -0
  103. package/dist/components/approval-card/ApprovalCard.d.ts +57 -0
  104. package/dist/components/approval-card/ApprovalCard.js +153 -0
  105. package/dist/components/approval-card/index.d.ts +2 -0
  106. package/dist/components/artifact-card/ArtifactCard.d.ts +44 -0
  107. package/dist/components/artifact-card/ArtifactCard.js +204 -0
  108. package/dist/components/artifact-card/index.d.ts +2 -0
  109. package/dist/components/autocomplete/Autocomplete.d.ts +36 -0
  110. package/dist/components/autocomplete/Autocomplete.js +186 -0
  111. package/dist/components/autocomplete/AutocompletePanel.d.ts +12 -0
  112. package/dist/components/autocomplete/AutocompletePanel.js +123 -0
  113. package/dist/components/autocomplete/index.d.ts +4 -0
  114. package/dist/components/autocomplete/match.d.ts +6 -0
  115. package/dist/components/autocomplete/match.js +10 -0
  116. package/dist/components/autocomplete/types.d.ts +52 -0
  117. package/dist/components/autocomplete/types.js +6 -0
  118. package/dist/components/bento-grid/BentoGrid.d.ts +6 -0
  119. package/dist/components/bento-grid/BentoGrid.js +19 -0
  120. package/dist/components/bento-grid/BentoGridCard.d.ts +11 -0
  121. package/dist/components/bento-grid/BentoGridCard.js +49 -0
  122. package/dist/components/bento-grid/BentoGridItem.d.ts +9 -0
  123. package/dist/components/bento-grid/BentoGridItem.js +33 -0
  124. package/dist/components/bento-grid/index.d.ts +6 -0
  125. package/dist/components/bg-falling-stars/FallingStarsBg.d.ts +24 -0
  126. package/dist/components/bg-falling-stars/FallingStarsBg.js +134 -0
  127. package/dist/components/bg-falling-stars/index.d.ts +2 -0
  128. package/dist/components/bg-stars/StarsBackground.d.ts +40 -0
  129. package/dist/components/bg-stars/StarsBackground.js +188 -0
  130. package/dist/components/bg-stars/index.d.ts +2 -0
  131. package/dist/components/blur-reveal/BlurReveal.d.ts +19 -0
  132. package/dist/components/blur-reveal/BlurReveal.js +50 -0
  133. package/dist/components/blur-reveal/index.d.ts +2 -0
  134. package/dist/components/book/Book.d.ts +13 -0
  135. package/dist/components/book/Book.js +94 -0
  136. package/dist/components/book/BookDescription.d.ts +6 -0
  137. package/dist/components/book/BookDescription.js +9 -0
  138. package/dist/components/book/BookHeader.d.ts +6 -0
  139. package/dist/components/book/BookHeader.js +9 -0
  140. package/dist/components/book/BookTitle.d.ts +6 -0
  141. package/dist/components/book/BookTitle.js +9 -0
  142. package/dist/components/book/index.d.ts +132 -0
  143. package/dist/components/book/index.js +48 -0
  144. package/dist/components/border-beam/BorderBeam.d.ts +25 -0
  145. package/dist/components/border-beam/BorderBeam.js +45 -0
  146. package/dist/components/border-beam/index.d.ts +2 -0
  147. package/dist/components/box-reveal/BoxReveal.d.ts +20 -0
  148. package/dist/components/box-reveal/BoxReveal.js +58 -0
  149. package/dist/components/box-reveal/index.d.ts +2 -0
  150. package/dist/components/breadcrumb/Breadcrumb.d.ts +49 -0
  151. package/dist/components/breadcrumb/Breadcrumb.js +61 -0
  152. package/dist/components/breadcrumb/index.d.ts +2 -0
  153. package/dist/components/button/Button.d.ts +44 -0
  154. package/dist/components/button/Button.js +120 -0
  155. package/dist/components/button/index.d.ts +2 -0
  156. package/dist/components/button/types.d.ts +4 -0
  157. package/dist/components/button-group/ButtonGroup.d.ts +23 -0
  158. package/dist/components/button-group/ButtonGroup.js +30 -0
  159. package/dist/components/button-group/index.d.ts +4 -0
  160. package/dist/components/button-group/types.d.ts +34 -0
  161. package/dist/components/button-group/types.js +7 -0
  162. package/dist/components/card-3d/CardBody.d.ts +8 -0
  163. package/dist/components/card-3d/CardBody.js +9 -0
  164. package/dist/components/card-3d/CardContainer.d.ts +19 -0
  165. package/dist/components/card-3d/CardContainer.js +61 -0
  166. package/dist/components/card-3d/CardItem.d.ts +22 -0
  167. package/dist/components/card-3d/CardItem.js +29 -0
  168. package/dist/components/card-3d/index.d.ts +6 -0
  169. package/dist/components/card-spotlight/CardSpotlight.d.ts +16 -0
  170. package/dist/components/card-spotlight/CardSpotlight.js +65 -0
  171. package/dist/components/card-spotlight/index.d.ts +2 -0
  172. package/dist/components/chat-error/ChatError.d.ts +32 -0
  173. package/dist/components/chat-error/ChatError.js +75 -0
  174. package/dist/components/chat-error/index.d.ts +2 -0
  175. package/dist/components/chat-message/ChatMessage.d.ts +43 -0
  176. package/dist/components/chat-message/ChatMessage.js +127 -0
  177. package/dist/components/chat-message/ChatMessageAction.d.ts +20 -0
  178. package/dist/components/chat-message/ChatMessageAction.js +58 -0
  179. package/dist/components/chat-message/ChatMessageActions.d.ts +14 -0
  180. package/dist/components/chat-message/ChatMessageActions.js +30 -0
  181. package/dist/components/chat-message/ChatMessageBranches.d.ts +15 -0
  182. package/dist/components/chat-message/ChatMessageBranches.js +93 -0
  183. package/dist/components/chat-message/index.d.ts +10 -0
  184. package/dist/components/chat-message/types.d.ts +38 -0
  185. package/dist/components/chat-message/types.js +7 -0
  186. package/dist/components/chat-panel/ChatEmptyState.d.ts +17 -0
  187. package/dist/components/chat-panel/ChatEmptyState.js +42 -0
  188. package/dist/components/chat-panel/ChatPanel.d.ts +31 -0
  189. package/dist/components/chat-panel/ChatPanel.js +163 -0
  190. package/dist/components/chat-panel/index.d.ts +4 -0
  191. package/dist/components/checkbox/Checkbox.d.ts +64 -0
  192. package/dist/components/checkbox/Checkbox.js +123 -0
  193. package/dist/components/checkbox/index.d.ts +2 -0
  194. package/dist/components/code-diff/CodeDiff.d.ts +39 -0
  195. package/dist/components/code-diff/CodeDiff.js +213 -0
  196. package/dist/components/code-diff/index.d.ts +2 -0
  197. package/dist/components/colourful-text/ColourfulText.d.ts +28 -0
  198. package/dist/components/colourful-text/ColourfulText.js +73 -0
  199. package/dist/components/colourful-text/index.d.ts +2 -0
  200. package/dist/components/combobox/Combobox.d.ts +53 -0
  201. package/dist/components/combobox/Combobox.js +248 -0
  202. package/dist/components/combobox/ComboboxPanel.d.ts +28 -0
  203. package/dist/components/combobox/ComboboxPanel.js +110 -0
  204. package/dist/components/combobox/index.d.ts +4 -0
  205. package/dist/components/combobox/match.d.ts +15 -0
  206. package/dist/components/combobox/match.js +14 -0
  207. package/dist/components/combobox/types.d.ts +60 -0
  208. package/dist/components/combobox/types.js +6 -0
  209. package/dist/components/command-menu/CommandMenu.d.ts +37 -0
  210. package/dist/components/command-menu/CommandMenu.js +386 -0
  211. package/dist/components/command-menu/index.d.ts +3 -0
  212. package/dist/components/command-menu/match.d.ts +19 -0
  213. package/dist/components/command-menu/match.js +45 -0
  214. package/dist/components/command-menu/types.d.ts +19 -0
  215. package/dist/components/compare/Compare.d.ts +31 -0
  216. package/dist/components/compare/Compare.js +300 -0
  217. package/dist/components/compare/StarField.d.ts +22 -0
  218. package/dist/components/compare/StarField.js +66 -0
  219. package/dist/components/compare/index.d.ts +4 -0
  220. package/dist/components/composer/Composer.d.ts +56 -0
  221. package/dist/components/composer/Composer.js +155 -0
  222. package/dist/components/composer/ComposerAttachment.d.ts +14 -0
  223. package/dist/components/composer/ComposerAttachment.js +127 -0
  224. package/dist/components/composer/ComposerAttachments.d.ts +18 -0
  225. package/dist/components/composer/ComposerAttachments.js +85 -0
  226. package/dist/components/composer/ComposerCommandMenu.d.ts +37 -0
  227. package/dist/components/composer/ComposerCommandMenu.js +208 -0
  228. package/dist/components/composer/ComposerInput.d.ts +22 -0
  229. package/dist/components/composer/ComposerInput.js +96 -0
  230. package/dist/components/composer/ComposerModelPicker.d.ts +32 -0
  231. package/dist/components/composer/ComposerModelPicker.js +223 -0
  232. package/dist/components/composer/ComposerSubmit.d.ts +16 -0
  233. package/dist/components/composer/ComposerSubmit.js +52 -0
  234. package/dist/components/composer/ComposerToolbar.d.ts +38 -0
  235. package/dist/components/composer/ComposerToolbar.js +9 -0
  236. package/dist/components/composer/caret.d.ts +69 -0
  237. package/dist/components/composer/caret.js +112 -0
  238. package/dist/components/composer/index.d.ts +18 -0
  239. package/dist/components/composer/types.d.ts +86 -0
  240. package/dist/components/composer/types.js +7 -0
  241. package/dist/components/confetti/Confetti.d.ts +37 -0
  242. package/dist/components/confetti/Confetti.js +45 -0
  243. package/dist/components/confetti/ConfettiButton.d.ts +23 -0
  244. package/dist/components/confetti/ConfettiButton.js +29 -0
  245. package/dist/components/confetti/context.d.ts +21 -0
  246. package/dist/components/confetti/context.js +6 -0
  247. package/dist/components/confetti/index.d.ts +4 -0
  248. package/dist/components/container-scroll/ContainerScroll.d.ts +10 -0
  249. package/dist/components/container-scroll/ContainerScroll.js +74 -0
  250. package/dist/components/container-scroll/index.d.ts +2 -0
  251. package/dist/components/container-text-flip/ContainerTextFlip.d.ts +9 -0
  252. package/dist/components/container-text-flip/ContainerTextFlip.js +58 -0
  253. package/dist/components/container-text-flip/index.d.ts +2 -0
  254. package/dist/components/context-menu/ContextMenu.d.ts +39 -0
  255. package/dist/components/context-menu/ContextMenu.js +105 -0
  256. package/dist/components/context-menu/ContextMenuContent.d.ts +27 -0
  257. package/dist/components/context-menu/ContextMenuContent.js +97 -0
  258. package/dist/components/context-menu/ContextMenuTrigger.d.ts +26 -0
  259. package/dist/components/context-menu/ContextMenuTrigger.js +37 -0
  260. package/dist/components/context-menu/index.d.ts +20 -0
  261. package/dist/components/context-menu/types.d.ts +52 -0
  262. package/dist/components/context-menu/types.js +17 -0
  263. package/dist/components/context-ring/ContextRing.d.ts +33 -0
  264. package/dist/components/context-ring/ContextRing.js +257 -0
  265. package/dist/components/context-ring/index.d.ts +2 -0
  266. package/dist/components/copy-button/CopyButton.d.ts +39 -0
  267. package/dist/components/copy-button/CopyButton.js +124 -0
  268. package/dist/components/copy-button/index.d.ts +2 -0
  269. package/dist/components/date-picker/DatePicker.d.ts +58 -0
  270. package/dist/components/date-picker/DatePicker.js +331 -0
  271. package/dist/components/date-picker/date-utils.d.ts +39 -0
  272. package/dist/components/date-picker/date-utils.js +85 -0
  273. package/dist/components/date-picker/index.d.ts +2 -0
  274. package/dist/components/dialog/Dialog.d.ts +29 -0
  275. package/dist/components/dialog/Dialog.js +105 -0
  276. package/dist/components/dialog/DialogSurface.d.ts +2 -0
  277. package/dist/components/dialog/DialogSurface.js +98 -0
  278. package/dist/components/dialog/index.d.ts +2 -0
  279. package/dist/components/dialog/types.d.ts +61 -0
  280. package/dist/components/dim-siblings/DimSiblings.d.ts +30 -0
  281. package/dist/components/dim-siblings/DimSiblings.js +47 -0
  282. package/dist/components/dim-siblings/index.d.ts +2 -0
  283. package/dist/components/direction-aware-hover/DirectionAwareHover.d.ts +10 -0
  284. package/dist/components/direction-aware-hover/DirectionAwareHover.js +185 -0
  285. package/dist/components/direction-aware-hover/index.d.ts +2 -0
  286. package/dist/components/displacement-text/DisplacementText.d.ts +26 -0
  287. package/dist/components/displacement-text/DisplacementText.js +185 -0
  288. package/dist/components/displacement-text/index.d.ts +2 -0
  289. package/dist/components/dock/Dock.d.ts +28 -0
  290. package/dist/components/dock/Dock.js +80 -0
  291. package/dist/components/dock/DockIcon.d.ts +17 -0
  292. package/dist/components/dock/DockIcon.js +38 -0
  293. package/dist/components/dock/DockSeparator.d.ts +6 -0
  294. package/dist/components/dock/DockSeparator.js +20 -0
  295. package/dist/components/dock/index.d.ts +7 -0
  296. package/dist/components/dock/types.d.ts +47 -0
  297. package/dist/components/dock/types.js +15 -0
  298. package/dist/components/drawer/Drawer.d.ts +34 -0
  299. package/dist/components/drawer/Drawer.js +237 -0
  300. package/dist/components/drawer/index.d.ts +2 -0
  301. package/dist/components/dropdown-menu/DropdownMenu.d.ts +38 -0
  302. package/dist/components/dropdown-menu/DropdownMenu.js +99 -0
  303. package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +15 -0
  304. package/dist/components/dropdown-menu/DropdownMenuContent.js +111 -0
  305. package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +26 -0
  306. package/dist/components/dropdown-menu/DropdownMenuItem.js +74 -0
  307. package/dist/components/dropdown-menu/DropdownMenuLabel.d.ts +15 -0
  308. package/dist/components/dropdown-menu/DropdownMenuLabel.js +18 -0
  309. package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +6 -0
  310. package/dist/components/dropdown-menu/DropdownMenuSeparator.js +15 -0
  311. package/dist/components/dropdown-menu/DropdownMenuSub.d.ts +10 -0
  312. package/dist/components/dropdown-menu/DropdownMenuSub.js +110 -0
  313. package/dist/components/dropdown-menu/DropdownMenuSubContent.d.ts +15 -0
  314. package/dist/components/dropdown-menu/DropdownMenuSubContent.js +139 -0
  315. package/dist/components/dropdown-menu/DropdownMenuSubTrigger.d.ts +17 -0
  316. package/dist/components/dropdown-menu/DropdownMenuSubTrigger.js +104 -0
  317. package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +16 -0
  318. package/dist/components/dropdown-menu/DropdownMenuTrigger.js +67 -0
  319. package/dist/components/dropdown-menu/index.d.ts +20 -0
  320. package/dist/components/dropdown-menu/menu-shared.d.ts +39 -0
  321. package/dist/components/dropdown-menu/menu-shared.js +48 -0
  322. package/dist/components/dropdown-menu/types.d.ts +159 -0
  323. package/dist/components/dropdown-menu/types.js +32 -0
  324. package/dist/components/editorial-engine/EditorialEngine.d.ts +21 -0
  325. package/dist/components/editorial-engine/EditorialEngine.js +68 -0
  326. package/dist/components/editorial-engine/engine.d.ts +7 -0
  327. package/dist/components/editorial-engine/engine.js +558 -0
  328. package/dist/components/editorial-engine/index.d.ts +2 -0
  329. package/dist/components/file-upload/FileUpload.d.ts +63 -0
  330. package/dist/components/file-upload/FileUpload.js +438 -0
  331. package/dist/components/file-upload/index.d.ts +2 -0
  332. package/dist/components/fireworks-hdr/FireworksHdr.d.ts +56 -0
  333. package/dist/components/fireworks-hdr/FireworksHdr.js +426 -0
  334. package/dist/components/fireworks-hdr/dev.d.ts +1 -0
  335. package/dist/components/fireworks-hdr/dev.js +8 -0
  336. package/dist/components/fireworks-hdr/fireworks-shared.d.ts +444 -0
  337. package/dist/components/fireworks-hdr/fireworks-shared.js +1205 -0
  338. package/dist/components/fireworks-hdr/index.d.ts +4 -0
  339. package/dist/components/fireworks-hdr/webgl2-renderer.d.ts +20 -0
  340. package/dist/components/fireworks-hdr/webgl2-renderer.js +517 -0
  341. package/dist/components/fireworks-hdr/webgpu-renderer.d.ts +51 -0
  342. package/dist/components/fireworks-hdr/webgpu-renderer.js +461 -0
  343. package/dist/components/fireworks-hdr/webgpu-types.d.ts +159 -0
  344. package/dist/components/flickering-grid/FlickeringGrid.d.ts +33 -0
  345. package/dist/components/flickering-grid/FlickeringGrid.js +154 -0
  346. package/dist/components/flickering-grid/index.d.ts +2 -0
  347. package/dist/components/flip-card/FlipCard.d.ts +8 -0
  348. package/dist/components/flip-card/FlipCard.js +35 -0
  349. package/dist/components/flip-card/index.d.ts +2 -0
  350. package/dist/components/flip-words/FlipWords.d.ts +16 -0
  351. package/dist/components/flip-words/FlipWords.js +82 -0
  352. package/dist/components/flip-words/index.d.ts +2 -0
  353. package/dist/components/fluid-cursor/FluidCursor.d.ts +61 -0
  354. package/dist/components/fluid-cursor/FluidCursor.js +1479 -0
  355. package/dist/components/fluid-cursor/fluid-shared.d.ts +74 -0
  356. package/dist/components/fluid-cursor/fluid-shared.js +120 -0
  357. package/dist/components/fluid-cursor/index.d.ts +8 -0
  358. package/dist/components/fluid-cursor/webgpu-engine.d.ts +36 -0
  359. package/dist/components/fluid-cursor/webgpu-engine.js +922 -0
  360. package/dist/components/focus/Focus.d.ts +24 -0
  361. package/dist/components/focus/Focus.js +103 -0
  362. package/dist/components/focus/index.d.ts +2 -0
  363. package/dist/components/form-field/FormField.d.ts +46 -0
  364. package/dist/components/form-field/FormField.js +151 -0
  365. package/dist/components/form-field/index.d.ts +2 -0
  366. package/dist/components/frosted-glass/FrostedGlass.d.ts +48 -0
  367. package/dist/components/frosted-glass/FrostedGlass.js +89 -0
  368. package/dist/components/frosted-glass/index.d.ts +2 -0
  369. package/dist/components/glare-card/GlareCard.d.ts +8 -0
  370. package/dist/components/glare-card/GlareCard.js +103 -0
  371. package/dist/components/glare-card/index.d.ts +2 -0
  372. package/dist/components/glow-border/GlowBorder.d.ts +8 -0
  373. package/dist/components/glow-border/GlowBorder.js +39 -0
  374. package/dist/components/glow-border/index.d.ts +2 -0
  375. package/dist/components/glowing-effect/GlowingEffect.d.ts +23 -0
  376. package/dist/components/glowing-effect/GlowingEffect.js +157 -0
  377. package/dist/components/glowing-effect/index.d.ts +2 -0
  378. package/dist/components/gradient-button/GradientButton.d.ts +28 -0
  379. package/dist/components/gradient-button/GradientButton.js +66 -0
  380. package/dist/components/gradient-button/index.d.ts +2 -0
  381. package/dist/components/hover-card/HoverCard.d.ts +57 -0
  382. package/dist/components/hover-card/HoverCard.js +139 -0
  383. package/dist/components/hover-card/index.d.ts +2 -0
  384. package/dist/components/hyper-text/HyperText.d.ts +25 -0
  385. package/dist/components/hyper-text/HyperText.js +102 -0
  386. package/dist/components/hyper-text/index.d.ts +2 -0
  387. package/dist/components/icon-button/IconButton.d.ts +46 -0
  388. package/dist/components/icon-button/IconButton.js +62 -0
  389. package/dist/components/icon-button/index.d.ts +2 -0
  390. package/dist/components/image-generation/ImageGeneration.d.ts +33 -0
  391. package/dist/components/image-generation/ImageGeneration.js +131 -0
  392. package/dist/components/image-generation/index.d.ts +2 -0
  393. package/dist/components/image-trail-cursor/ImageTrailCursor.d.ts +15 -0
  394. package/dist/components/image-trail-cursor/ImageTrailCursor.js +75 -0
  395. package/dist/components/image-trail-cursor/index.d.ts +3 -0
  396. package/dist/components/image-trail-cursor/trail-variants.d.ts +112 -0
  397. package/dist/components/image-trail-cursor/trail-variants.js +787 -0
  398. package/dist/components/inline-citation/InlineCitation.d.ts +23 -0
  399. package/dist/components/inline-citation/InlineCitation.js +179 -0
  400. package/dist/components/inline-citation/index.d.ts +2 -0
  401. package/dist/components/input/Input.d.ts +41 -0
  402. package/dist/components/input/Input.js +74 -0
  403. package/dist/components/input/index.d.ts +2 -0
  404. package/dist/components/interactive-grid-pattern/InteractiveGridPattern.d.ts +17 -0
  405. package/dist/components/interactive-grid-pattern/InteractiveGridPattern.js +89 -0
  406. package/dist/components/interactive-grid-pattern/index.d.ts +2 -0
  407. package/dist/components/interactive-hover-button/InteractiveHoverButton.d.ts +18 -0
  408. package/dist/components/interactive-hover-button/InteractiveHoverButton.js +66 -0
  409. package/dist/components/interactive-hover-button/index.d.ts +2 -0
  410. package/dist/components/label/Label.d.ts +18 -0
  411. package/dist/components/label/Label.js +28 -0
  412. package/dist/components/label/index.d.ts +2 -0
  413. package/dist/components/letter-pullup/LetterPullup.d.ts +16 -0
  414. package/dist/components/letter-pullup/LetterPullup.js +27 -0
  415. package/dist/components/letter-pullup/index.d.ts +2 -0
  416. package/dist/components/line-hover-link/LineHoverLink.d.ts +33 -0
  417. package/dist/components/line-hover-link/LineHoverLink.js +69 -0
  418. package/dist/components/line-hover-link/index.d.ts +2 -0
  419. package/dist/components/line-reveal/LineReveal.d.ts +31 -0
  420. package/dist/components/line-reveal/LineReveal.js +117 -0
  421. package/dist/components/line-reveal/index.d.ts +2 -0
  422. package/dist/components/line-shadow-text/LineShadowText.d.ts +18 -0
  423. package/dist/components/line-shadow-text/LineShadowText.js +26 -0
  424. package/dist/components/line-shadow-text/index.d.ts +2 -0
  425. package/dist/components/link/Link.d.ts +30 -0
  426. package/dist/components/link/Link.js +82 -0
  427. package/dist/components/link/index.d.ts +2 -0
  428. package/dist/components/liquid-glass/LiquidGlass.d.ts +49 -0
  429. package/dist/components/liquid-glass/LiquidGlass.js +165 -0
  430. package/dist/components/liquid-glass/index.d.ts +2 -0
  431. package/dist/components/liquid-text/LiquidText.d.ts +35 -0
  432. package/dist/components/liquid-text/LiquidText.js +882 -0
  433. package/dist/components/liquid-text/index.d.ts +2 -0
  434. package/dist/components/logo-cloud/AnimatedLogoCloud.d.ts +13 -0
  435. package/dist/components/logo-cloud/AnimatedLogoCloud.js +38 -0
  436. package/dist/components/logo-cloud/IconLogoCloud.d.ts +10 -0
  437. package/dist/components/logo-cloud/IconLogoCloud.js +20 -0
  438. package/dist/components/logo-cloud/StaticLogoCloud.d.ts +28 -0
  439. package/dist/components/logo-cloud/StaticLogoCloud.js +45 -0
  440. package/dist/components/logo-cloud/index.d.ts +6 -0
  441. package/dist/components/magnetic/Magnetic.d.ts +35 -0
  442. package/dist/components/magnetic/Magnetic.js +113 -0
  443. package/dist/components/magnetic/index.d.ts +2 -0
  444. package/dist/components/marquee/Marquee.d.ts +16 -0
  445. package/dist/components/marquee/Marquee.js +39 -0
  446. package/dist/components/marquee/ReviewCard.d.ts +8 -0
  447. package/dist/components/marquee/ReviewCard.js +17 -0
  448. package/dist/components/marquee/index.d.ts +4 -0
  449. package/dist/components/matrix-rain/MatrixRain.d.ts +35 -0
  450. package/dist/components/matrix-rain/MatrixRain.js +130 -0
  451. package/dist/components/matrix-rain/index.d.ts +2 -0
  452. package/dist/components/meteors/Meteors.d.ts +21 -0
  453. package/dist/components/meteors/Meteors.js +45 -0
  454. package/dist/components/meteors/index.d.ts +2 -0
  455. package/dist/components/mosaic-glow/MosaicGlow.d.ts +47 -0
  456. package/dist/components/mosaic-glow/MosaicGlow.js +438 -0
  457. package/dist/components/mosaic-glow/index.d.ts +2 -0
  458. package/dist/components/mosaic-glow/mosaic-glow-core.d.ts +94 -0
  459. package/dist/components/mosaic-glow/mosaic-glow-core.js +190 -0
  460. package/dist/components/navbar/Navbar.d.ts +25 -0
  461. package/dist/components/navbar/Navbar.js +27 -0
  462. package/dist/components/navbar/NavbarLink.d.ts +37 -0
  463. package/dist/components/navbar/NavbarLink.js +48 -0
  464. package/dist/components/navbar/index.d.ts +4 -0
  465. package/dist/components/navigation-menu/NavigationMenu.d.ts +28 -0
  466. package/dist/components/navigation-menu/NavigationMenu.js +202 -0
  467. package/dist/components/navigation-menu/NavigationMenuContent.d.ts +8 -0
  468. package/dist/components/navigation-menu/NavigationMenuContent.js +77 -0
  469. package/dist/components/navigation-menu/NavigationMenuItem.d.ts +20 -0
  470. package/dist/components/navigation-menu/NavigationMenuItem.js +18 -0
  471. package/dist/components/navigation-menu/NavigationMenuLink.d.ts +31 -0
  472. package/dist/components/navigation-menu/NavigationMenuLink.js +41 -0
  473. package/dist/components/navigation-menu/NavigationMenuList.d.ts +8 -0
  474. package/dist/components/navigation-menu/NavigationMenuList.js +33 -0
  475. package/dist/components/navigation-menu/NavigationMenuTrigger.d.ts +8 -0
  476. package/dist/components/navigation-menu/NavigationMenuTrigger.js +90 -0
  477. package/dist/components/navigation-menu/index.d.ts +14 -0
  478. package/dist/components/navigation-menu/types.d.ts +107 -0
  479. package/dist/components/navigation-menu/types.js +32 -0
  480. package/dist/components/neon-border/NeonBorder.d.ts +22 -0
  481. package/dist/components/neon-border/NeonBorder.js +50 -0
  482. package/dist/components/neon-border/index.d.ts +2 -0
  483. package/dist/components/noise-reveal/NoiseReveal.d.ts +29 -0
  484. package/dist/components/noise-reveal/NoiseReveal.js +329 -0
  485. package/dist/components/noise-reveal/index.d.ts +2 -0
  486. package/dist/components/number-input/NumberInput.d.ts +40 -0
  487. package/dist/components/number-input/NumberInput.js +207 -0
  488. package/dist/components/number-input/index.d.ts +2 -0
  489. package/dist/components/number-ticker/NumberTicker.d.ts +22 -0
  490. package/dist/components/number-ticker/NumberTicker.js +106 -0
  491. package/dist/components/number-ticker/index.d.ts +2 -0
  492. package/dist/components/pagination/Pagination.d.ts +43 -0
  493. package/dist/components/pagination/Pagination.js +156 -0
  494. package/dist/components/pagination/index.d.ts +2 -0
  495. package/dist/components/pagination/pagination-range.d.ts +11 -0
  496. package/dist/components/pagination/pagination-range.js +35 -0
  497. package/dist/components/password-input/PasswordInput.d.ts +56 -0
  498. package/dist/components/password-input/PasswordInput.js +246 -0
  499. package/dist/components/password-input/index.d.ts +2 -0
  500. package/dist/components/pixel-loader/PixelLoader.d.ts +18 -0
  501. package/dist/components/pixel-loader/PixelLoader.js +56 -0
  502. package/dist/components/pixel-loader/index.d.ts +2 -0
  503. package/dist/components/popover/Popover.d.ts +49 -0
  504. package/dist/components/popover/Popover.js +81 -0
  505. package/dist/components/popover/PopoverContent.d.ts +21 -0
  506. package/dist/components/popover/PopoverContent.js +78 -0
  507. package/dist/components/popover/index.d.ts +6 -0
  508. package/dist/components/popover/types.d.ts +64 -0
  509. package/dist/components/popover/types.js +17 -0
  510. package/dist/components/presence/Presence.d.ts +40 -0
  511. package/dist/components/presence/Presence.js +49 -0
  512. package/dist/components/presence/index.d.ts +2 -0
  513. package/dist/components/pressable/Pressable.d.ts +27 -0
  514. package/dist/components/pressable/Pressable.js +86 -0
  515. package/dist/components/pressable/index.d.ts +2 -0
  516. package/dist/components/prompt-suggestions/PromptSuggestions.d.ts +25 -0
  517. package/dist/components/prompt-suggestions/PromptSuggestions.js +68 -0
  518. package/dist/components/prompt-suggestions/index.d.ts +2 -0
  519. package/dist/components/pulse-beam/PulseBeam.d.ts +44 -0
  520. package/dist/components/pulse-beam/PulseBeam.js +197 -0
  521. package/dist/components/pulse-beam/index.d.ts +2 -0
  522. package/dist/components/pulse-beam/pulse-beam-data.d.ts +81 -0
  523. package/dist/components/pulse-beam/pulse-beam-data.js +306 -0
  524. package/dist/components/pulse-beam/pulse-beam-loop.d.ts +26 -0
  525. package/dist/components/pulse-beam/pulse-beam-loop.js +58 -0
  526. package/dist/components/radio-group/RadioGroup.d.ts +56 -0
  527. package/dist/components/radio-group/RadioGroup.js +82 -0
  528. package/dist/components/radio-group/RadioGroupItem.d.ts +21 -0
  529. package/dist/components/radio-group/RadioGroupItem.js +47 -0
  530. package/dist/components/radio-group/index.d.ts +6 -0
  531. package/dist/components/radio-group/types.d.ts +50 -0
  532. package/dist/components/radio-group/types.js +7 -0
  533. package/dist/components/rainbow-button/RainbowButton.d.ts +21 -0
  534. package/dist/components/rainbow-button/RainbowButton.js +59 -0
  535. package/dist/components/rainbow-button/index.d.ts +2 -0
  536. package/dist/components/reasoning-panel/ReasoningPanel.d.ts +38 -0
  537. package/dist/components/reasoning-panel/ReasoningPanel.js +172 -0
  538. package/dist/components/reasoning-panel/index.d.ts +2 -0
  539. package/dist/components/recommendation-card/RecommendationCard.d.ts +53 -0
  540. package/dist/components/recommendation-card/RecommendationCard.js +234 -0
  541. package/dist/components/recommendation-card/index.d.ts +2 -0
  542. package/dist/components/reveal/Reveal.d.ts +36 -0
  543. package/dist/components/reveal/Reveal.js +138 -0
  544. package/dist/components/reveal/index.d.ts +2 -0
  545. package/dist/components/ripple/Ripple.d.ts +11 -0
  546. package/dist/components/ripple/Ripple.js +45 -0
  547. package/dist/components/ripple/index.d.ts +2 -0
  548. package/dist/components/ripple-button/RippleButton.d.ts +17 -0
  549. package/dist/components/ripple-button/RippleButton.js +77 -0
  550. package/dist/components/ripple-button/index.d.ts +2 -0
  551. package/dist/components/scroll-anchor/ScrollAnchor.d.ts +33 -0
  552. package/dist/components/scroll-anchor/ScrollAnchor.js +99 -0
  553. package/dist/components/scroll-anchor/index.d.ts +2 -0
  554. package/dist/components/scroll-progress/ScrollProgress.d.ts +39 -0
  555. package/dist/components/scroll-progress/ScrollProgress.js +118 -0
  556. package/dist/components/scroll-progress/index.d.ts +2 -0
  557. package/dist/components/search-input/SearchInput.d.ts +56 -0
  558. package/dist/components/search-input/SearchInput.js +192 -0
  559. package/dist/components/search-input/index.d.ts +2 -0
  560. package/dist/components/select/Select.d.ts +44 -0
  561. package/dist/components/select/Select.js +255 -0
  562. package/dist/components/select/SelectPanel.d.ts +33 -0
  563. package/dist/components/select/SelectPanel.js +108 -0
  564. package/dist/components/select/index.d.ts +3 -0
  565. package/dist/components/select/types.d.ts +83 -0
  566. package/dist/components/select/types.js +8 -0
  567. package/dist/components/sheet/Sheet.d.ts +40 -0
  568. package/dist/components/sheet/Sheet.js +183 -0
  569. package/dist/components/sheet/index.d.ts +2 -0
  570. package/dist/components/shimmer-button/ShimmerButton.d.ts +26 -0
  571. package/dist/components/shimmer-button/ShimmerButton.js +69 -0
  572. package/dist/components/shimmer-button/index.d.ts +2 -0
  573. package/dist/components/sidebar/Sidebar.d.ts +17 -0
  574. package/dist/components/sidebar/Sidebar.js +27 -0
  575. package/dist/components/sidebar/SidebarFooter.d.ts +10 -0
  576. package/dist/components/sidebar/SidebarFooter.js +31 -0
  577. package/dist/components/sidebar/SidebarGroup.d.ts +10 -0
  578. package/dist/components/sidebar/SidebarGroup.js +28 -0
  579. package/dist/components/sidebar/SidebarItem.d.ts +33 -0
  580. package/dist/components/sidebar/SidebarItem.js +81 -0
  581. package/dist/components/sidebar/SidebarSeparator.d.ts +5 -0
  582. package/dist/components/sidebar/SidebarSeparator.js +13 -0
  583. package/dist/components/sidebar/index.d.ts +12 -0
  584. package/dist/components/sidebar/types.d.ts +36 -0
  585. package/dist/components/sidebar/types.js +7 -0
  586. package/dist/components/skeleton/Skeleton.d.ts +35 -0
  587. package/dist/components/skeleton/Skeleton.js +106 -0
  588. package/dist/components/skeleton/index.d.ts +2 -0
  589. package/dist/components/slider/Slider.d.ts +32 -0
  590. package/dist/components/slider/Slider.js +119 -0
  591. package/dist/components/slider/index.d.ts +2 -0
  592. package/dist/components/smooth-cursor/SmoothCursor.d.ts +18 -0
  593. package/dist/components/smooth-cursor/SmoothCursor.js +186 -0
  594. package/dist/components/smooth-cursor/index.d.ts +2 -0
  595. package/dist/components/sources/SourceCard.d.ts +21 -0
  596. package/dist/components/sources/SourceCard.js +48 -0
  597. package/dist/components/sources/Sources.d.ts +31 -0
  598. package/dist/components/sources/Sources.js +39 -0
  599. package/dist/components/sources/SourcesList.d.ts +13 -0
  600. package/dist/components/sources/SourcesList.js +42 -0
  601. package/dist/components/sources/SourcesTrigger.d.ts +11 -0
  602. package/dist/components/sources/SourcesTrigger.js +50 -0
  603. package/dist/components/sources/index.d.ts +10 -0
  604. package/dist/components/sources/types.d.ts +45 -0
  605. package/dist/components/sources/types.js +7 -0
  606. package/dist/components/sparkles/Sparkles.d.ts +35 -0
  607. package/dist/components/sparkles/Sparkles.js +112 -0
  608. package/dist/components/sparkles/index.d.ts +2 -0
  609. package/dist/components/sparkles-text/SparklesText.d.ts +28 -0
  610. package/dist/components/sparkles-text/SparklesText.js +84 -0
  611. package/dist/components/sparkles-text/index.d.ts +2 -0
  612. package/dist/components/status-morph/StatusMorph.d.ts +47 -0
  613. package/dist/components/status-morph/StatusMorph.js +110 -0
  614. package/dist/components/status-morph/index.d.ts +2 -0
  615. package/dist/components/stepper/Step.d.ts +24 -0
  616. package/dist/components/stepper/Step.js +152 -0
  617. package/dist/components/stepper/Stepper.d.ts +38 -0
  618. package/dist/components/stepper/Stepper.js +79 -0
  619. package/dist/components/stepper/index.d.ts +6 -0
  620. package/dist/components/stepper/types.d.ts +66 -0
  621. package/dist/components/stepper/types.js +7 -0
  622. package/dist/components/sticky-scroll/StickyScroll.d.ts +40 -0
  623. package/dist/components/sticky-scroll/StickyScroll.js +163 -0
  624. package/dist/components/sticky-scroll/index.d.ts +2 -0
  625. package/dist/components/streaming-text/StreamingText.d.ts +20 -0
  626. package/dist/components/streaming-text/StreamingText.js +32 -0
  627. package/dist/components/streaming-text/index.d.ts +2 -0
  628. package/dist/components/subagent-list/SubagentList.d.ts +28 -0
  629. package/dist/components/subagent-list/SubagentList.js +167 -0
  630. package/dist/components/subagent-list/index.d.ts +2 -0
  631. package/dist/components/switch/Switch.d.ts +55 -0
  632. package/dist/components/switch/Switch.js +77 -0
  633. package/dist/components/switch/index.d.ts +2 -0
  634. package/dist/components/tabs/Tabs.d.ts +43 -0
  635. package/dist/components/tabs/Tabs.js +123 -0
  636. package/dist/components/tabs/TabsContent.d.ts +26 -0
  637. package/dist/components/tabs/TabsContent.js +64 -0
  638. package/dist/components/tabs/TabsList.d.ts +16 -0
  639. package/dist/components/tabs/TabsList.js +152 -0
  640. package/dist/components/tabs/TabsTrigger.d.ts +19 -0
  641. package/dist/components/tabs/TabsTrigger.js +138 -0
  642. package/dist/components/tabs/index.d.ts +10 -0
  643. package/dist/components/tabs/types.d.ts +94 -0
  644. package/dist/components/tabs/types.js +7 -0
  645. package/dist/components/terminal-block/TerminalBlock.d.ts +27 -0
  646. package/dist/components/terminal-block/TerminalBlock.js +120 -0
  647. package/dist/components/terminal-block/ansi.d.ts +30 -0
  648. package/dist/components/terminal-block/ansi.js +114 -0
  649. package/dist/components/terminal-block/index.d.ts +2 -0
  650. package/dist/components/terminal-text/TerminalText.d.ts +11 -0
  651. package/dist/components/terminal-text/TerminalText.js +140 -0
  652. package/dist/components/terminal-text/index.d.ts +2 -0
  653. package/dist/components/text-generate-effect/TextGenerateEffect.d.ts +9 -0
  654. package/dist/components/text-generate-effect/TextGenerateEffect.js +58 -0
  655. package/dist/components/text-generate-effect/index.d.ts +2 -0
  656. package/dist/components/text-reveal-card/TextRevealCard.d.ts +21 -0
  657. package/dist/components/text-reveal-card/TextRevealCard.js +107 -0
  658. package/dist/components/text-reveal-card/TextRevealStars.d.ts +25 -0
  659. package/dist/components/text-reveal-card/TextRevealStars.js +59 -0
  660. package/dist/components/text-reveal-card/index.d.ts +4 -0
  661. package/dist/components/text-roll/TextRoll.d.ts +43 -0
  662. package/dist/components/text-roll/TextRoll.js +242 -0
  663. package/dist/components/text-roll/index.d.ts +2 -0
  664. package/dist/components/text-roll/roll-transitions.d.ts +74 -0
  665. package/dist/components/text-roll/roll-transitions.js +31 -0
  666. package/dist/components/textarea/Textarea.d.ts +48 -0
  667. package/dist/components/textarea/Textarea.js +129 -0
  668. package/dist/components/textarea/index.d.ts +2 -0
  669. package/dist/components/thinking-indicator/ThinkingIndicator.d.ts +26 -0
  670. package/dist/components/thinking-indicator/ThinkingIndicator.js +60 -0
  671. package/dist/components/thinking-indicator/index.d.ts +2 -0
  672. package/dist/components/thread-list/ThreadList.d.ts +44 -0
  673. package/dist/components/thread-list/ThreadList.js +178 -0
  674. package/dist/components/thread-list/index.d.ts +2 -0
  675. package/dist/components/time-picker/TimePicker.d.ts +44 -0
  676. package/dist/components/time-picker/TimePicker.js +254 -0
  677. package/dist/components/time-picker/TimePickerPanel.d.ts +30 -0
  678. package/dist/components/time-picker/TimePickerPanel.js +94 -0
  679. package/dist/components/time-picker/index.d.ts +2 -0
  680. package/dist/components/time-picker/time-utils.d.ts +33 -0
  681. package/dist/components/time-picker/time-utils.js +65 -0
  682. package/dist/components/time-picker/types.d.ts +53 -0
  683. package/dist/components/time-picker/types.js +10 -0
  684. package/dist/components/timeline/Timeline.d.ts +18 -0
  685. package/dist/components/timeline/Timeline.js +96 -0
  686. package/dist/components/timeline/index.d.ts +2 -0
  687. package/dist/components/toast/Toast.d.ts +16 -0
  688. package/dist/components/toast/Toast.js +99 -0
  689. package/dist/components/toast/Toaster.d.ts +19 -0
  690. package/dist/components/toast/Toaster.js +147 -0
  691. package/dist/components/toast/index.d.ts +6 -0
  692. package/dist/components/toast/store.d.ts +102 -0
  693. package/dist/components/toast/store.js +118 -0
  694. package/dist/components/toggle/Toggle.d.ts +28 -0
  695. package/dist/components/toggle/Toggle.js +69 -0
  696. package/dist/components/toggle/index.d.ts +2 -0
  697. package/dist/components/toggle-group/ToggleGroup.d.ts +42 -0
  698. package/dist/components/toggle-group/ToggleGroup.js +150 -0
  699. package/dist/components/toggle-group/ToggleGroupItem.d.ts +21 -0
  700. package/dist/components/toggle-group/ToggleGroupItem.js +100 -0
  701. package/dist/components/toggle-group/index.d.ts +6 -0
  702. package/dist/components/toggle-group/types.d.ts +75 -0
  703. package/dist/components/toggle-group/types.js +7 -0
  704. package/dist/components/tool-call/ToolCall.d.ts +39 -0
  705. package/dist/components/tool-call/ToolCall.js +195 -0
  706. package/dist/components/tool-call/index.d.ts +2 -0
  707. package/dist/components/tool-timeline/ToolTimeline.d.ts +31 -0
  708. package/dist/components/tool-timeline/ToolTimeline.js +99 -0
  709. package/dist/components/tool-timeline/index.d.ts +2 -0
  710. package/dist/components/tooltip/Tooltip.d.ts +36 -0
  711. package/dist/components/tooltip/Tooltip.js +214 -0
  712. package/dist/components/tooltip/index.d.ts +2 -0
  713. package/dist/components/tracing-beam/TracingBeam.d.ts +11 -0
  714. package/dist/components/tracing-beam/TracingBeam.js +163 -0
  715. package/dist/components/tracing-beam/index.d.ts +2 -0
  716. package/dist/components/typing-indicator/TypingIndicator.d.ts +17 -0
  717. package/dist/components/typing-indicator/TypingIndicator.js +47 -0
  718. package/dist/components/typing-indicator/index.d.ts +2 -0
  719. package/dist/components/voice-input/VoiceInput.d.ts +60 -0
  720. package/dist/components/voice-input/VoiceInput.js +268 -0
  721. package/dist/components/voice-input/index.d.ts +2 -0
  722. package/dist/components/web-search/WebSearch.d.ts +37 -0
  723. package/dist/components/web-search/WebSearch.js +135 -0
  724. package/dist/components/web-search/index.d.ts +2 -0
  725. package/dist/index.d.ts +148 -0
  726. package/dist/index.js +489 -0
  727. package/dist/internals/Portal.d.ts +35 -0
  728. package/dist/internals/Portal.js +37 -0
  729. package/dist/internals/StreamText.d.ts +20 -0
  730. package/dist/internals/StreamText.js +25 -0
  731. package/dist/internals/ai-types.d.ts +117 -0
  732. package/dist/internals/anchor-position.d.ts +79 -0
  733. package/dist/internals/anchor-position.js +154 -0
  734. package/dist/internals/calendar-core.d.ts +26 -0
  735. package/dist/internals/calendar-core.js +57 -0
  736. package/dist/internals/diff.d.ts +38 -0
  737. package/dist/internals/diff.js +176 -0
  738. package/dist/internals/dismissable.d.ts +76 -0
  739. package/dist/internals/dismissable.js +105 -0
  740. package/dist/internals/dom/context.d.ts +16 -0
  741. package/dist/internals/dom/context.js +20 -0
  742. package/dist/internals/dom/ssr.d.ts +21 -0
  743. package/dist/internals/dom/ssr.js +21 -0
  744. package/dist/internals/dom/types.d.ts +9 -0
  745. package/dist/internals/dom/use-composed-refs.d.ts +15 -0
  746. package/dist/internals/dom/use-composed-refs.js +34 -0
  747. package/dist/internals/dom/use-element-ref.d.ts +11 -0
  748. package/dist/internals/dom/use-element-ref.js +12 -0
  749. package/dist/internals/dom/use-event-callback.d.ts +14 -0
  750. package/dist/internals/dom/use-event-callback.js +12 -0
  751. package/dist/internals/dom/use-inert-attribute.d.ts +26 -0
  752. package/dist/internals/dom/use-inert-attribute.js +22 -0
  753. package/dist/internals/dom/use-live-ref.d.ts +10 -0
  754. package/dist/internals/dom/use-live-ref.js +12 -0
  755. package/dist/internals/field.d.ts +136 -0
  756. package/dist/internals/field.js +33 -0
  757. package/dist/internals/float.d.ts +47 -0
  758. package/dist/internals/float.js +31 -0
  759. package/dist/internals/focus-trap.d.ts +82 -0
  760. package/dist/internals/focus-trap.js +145 -0
  761. package/dist/internals/host.d.ts +38 -0
  762. package/dist/internals/host.js +24 -0
  763. package/dist/internals/listbox.d.ts +101 -0
  764. package/dist/internals/listbox.js +171 -0
  765. package/dist/internals/markdown/Markdown.d.ts +22 -0
  766. package/dist/internals/markdown/Markdown.js +53 -0
  767. package/dist/internals/markdown/MarkdownInline.d.ts +5 -0
  768. package/dist/internals/markdown/MarkdownInline.js +40 -0
  769. package/dist/internals/markdown.d.ts +66 -0
  770. package/dist/internals/markdown.js +467 -0
  771. package/dist/internals/menu.d.ts +121 -0
  772. package/dist/internals/menu.js +217 -0
  773. package/dist/internals/motion/anchored.d.ts +104 -0
  774. package/dist/internals/motion/anchored.js +44 -0
  775. package/dist/internals/motion/animate.d.ts +92 -0
  776. package/dist/internals/motion/animate.js +84 -0
  777. package/dist/internals/motion/easing.d.ts +20 -0
  778. package/dist/internals/motion/easing.js +13 -0
  779. package/dist/internals/motion/haptics.d.ts +42 -0
  780. package/dist/internals/motion/haptics.js +29 -0
  781. package/dist/internals/motion/in-view.d.ts +67 -0
  782. package/dist/internals/motion/in-view.js +97 -0
  783. package/dist/internals/motion/media-query.d.ts +50 -0
  784. package/dist/internals/motion/media-query.js +54 -0
  785. package/dist/internals/motion/presence.d.ts +108 -0
  786. package/dist/internals/motion/presence.js +197 -0
  787. package/dist/internals/motion/presets.d.ts +34 -0
  788. package/dist/internals/motion/presets.js +19 -0
  789. package/dist/internals/motion/raf.d.ts +35 -0
  790. package/dist/internals/motion/raf.js +27 -0
  791. package/dist/internals/motion/stagger.d.ts +32 -0
  792. package/dist/internals/motion/stagger.js +15 -0
  793. package/dist/internals/motion/tokens.d.ts +97 -0
  794. package/dist/internals/motion/tokens.js +18 -0
  795. package/dist/internals/motion/transitions.d.ts +66 -0
  796. package/dist/internals/motion/transitions.js +41 -0
  797. package/dist/internals/motion/types.d.ts +17 -0
  798. package/dist/internals/relative-time.d.ts +25 -0
  799. package/dist/internals/relative-time.js +46 -0
  800. package/dist/internals/scroll-lock.d.ts +26 -0
  801. package/dist/internals/scroll-lock.js +65 -0
  802. package/dist/internals/use-anchor-position.d.ts +54 -0
  803. package/dist/internals/use-anchor-position.js +87 -0
  804. package/dist/internals/use-autoscroll.d.ts +43 -0
  805. package/dist/internals/use-autoscroll.js +128 -0
  806. package/dist/internals/use-copy.d.ts +54 -0
  807. package/dist/internals/use-copy.js +67 -0
  808. package/dist/internals/use-elapsed.d.ts +96 -0
  809. package/dist/internals/use-elapsed.js +195 -0
  810. package/dist/internals/use-float.d.ts +49 -0
  811. package/dist/internals/use-float.js +150 -0
  812. package/dist/internals/use-id.d.ts +22 -0
  813. package/dist/internals/use-id.js +20 -0
  814. package/dist/internals/use-text-stream.d.ts +94 -0
  815. package/dist/internals/use-text-stream.js +133 -0
  816. package/dist/internals/waveform-core.d.ts +33 -0
  817. package/dist/internals/waveform-core.js +39 -0
  818. package/dist/sound/SoundToggle.d.ts +23 -0
  819. package/dist/sound/SoundToggle.js +96 -0
  820. package/dist/sound/engine.d.ts +67 -0
  821. package/dist/sound/engine.js +370 -0
  822. package/dist/sound/index.d.ts +7 -0
  823. package/dist/sound/sound-feedback.d.ts +77 -0
  824. package/dist/sound/sound-feedback.js +152 -0
  825. package/dist/sound/sound.d.ts +98 -0
  826. package/dist/sound/sound.js +309 -0
  827. package/dist/sound/themes.d.ts +19 -0
  828. package/dist/sound/themes.js +355 -0
  829. package/dist/sound/types.d.ts +125 -0
  830. package/dist/sound/types.js +54 -0
  831. package/dist/sound/use-sound.d.ts +53 -0
  832. package/dist/sound/use-sound.js +82 -0
  833. package/dist/styles.css +7975 -0
  834. package/dist/utils.d.ts +3 -0
  835. package/dist/utils.js +8 -0
  836. package/package.json +96 -0
  837. package/tailwind.css +132 -0
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Menu keyboard-navigation core: which item holds **real DOM focus** as arrow
3
+ * keys, Home/End and typeahead move through a `role="menu"` surface.
4
+ *
5
+ * This is the counterpart to `listbox.ts`, and the difference between the two
6
+ * is the whole reason both exist. A listbox keeps focus on its input or
7
+ * trigger and points at the active row with `aria-activedescendant`; a menu
8
+ * moves focus onto the item itself. That is the WAI-ARIA menu pattern, and it
9
+ * is what assistive technology expects when it meets `role="menu"` — so a menu
10
+ * built on `aria-activedescendant` reads as broken even though nothing about
11
+ * it looks wrong. Consumers must not add `aria-activedescendant` to a surface
12
+ * driven by this module.
13
+ *
14
+ * Three guarantees, so `DropdownMenu`, `ContextMenu` and every submenu get
15
+ * them once rather than three times:
16
+ *
17
+ * - **Items navigate in DOM order, not registration order.** Mount order and
18
+ * document order diverge routinely — a conditional block, a list that
19
+ * reorders, a submenu that mounts before the item above it. Ordering is
20
+ * therefore resolved by `compareDocumentPosition` at navigation time, not
21
+ * by the order `register` happened to be called in. This is also what makes
22
+ * the promise survive React's child-before-parent effect ordering for free.
23
+ * - **Disabled items are skipped**, a consecutive run of them as a block, and
24
+ * movement terminates rather than spinning when every item is disabled.
25
+ * - **Typeahead** accumulates characters within a short window and resets
26
+ * after it, with a repeated character cycling through its matches — the
27
+ * same semantics as the listbox core, so the two feel identical to use.
28
+ *
29
+ * The focused item is tracked as an *element*, not an index: menus mutate
30
+ * their item list while open (a filtered list, a submenu opening), and an
31
+ * index captured before that mutation silently points at a different item
32
+ * afterwards. `focusedIndex` is derived from the element on read.
33
+ */
34
+ import type { RefCallback } from "react";
35
+ export interface MenuFocusOptions {
36
+ /** Whether arrow navigation wraps at the ends. Defaults to true. */
37
+ loop?: boolean;
38
+ /** Called when focus moves to an item, with the item's index and element. */
39
+ onFocusChange?: (index: number, element: HTMLElement) => void;
40
+ }
41
+ export interface MenuFocusState {
42
+ /**
43
+ * Index of the focused item in DOM order, or -1 when focus is not on an item.
44
+ *
45
+ * Computed on read from the live ordered list, exactly like the Svelte
46
+ * getter — so the value is correct on a fresh read and `document.activeElement`
47
+ * is never wrong. It is deliberately NOT React state: nothing re-renders when
48
+ * focus moves, because real DOM focus does the rendering through `:focus` /
49
+ * `:focus-visible`. Use `onFocusChange`, or opt into `useMenuFocusedIndex`
50
+ * when a component genuinely must render off the number.
51
+ */
52
+ readonly focusedIndex: number;
53
+ /** Registers an item element. Returns an unregister function; call it on destroy. */
54
+ register(element: HTMLElement): () => void;
55
+ /** Moves focus by delta, skipping disabled items. `delta === 0` is a no-op. */
56
+ move(delta: number): void;
57
+ /** Moves focus to the first or last enabled item. */
58
+ moveToEdge(edge: "first" | "last"): void;
59
+ /** Focuses a specific element, if it is registered and enabled. */
60
+ focusItem(element: HTMLElement): void;
61
+ /** Clears the focused item without moving DOM focus. */
62
+ clear(): void;
63
+ /**
64
+ * Advances typeahead with a printable character and focuses the match.
65
+ *
66
+ * Matches against the item's `data-typeahead-label` when it has one, and
67
+ * otherwise against its visible text — decorative `aria-hidden` content
68
+ * (icon glyphs, `<kbd>` shortcuts) is excluded either way. Set the
69
+ * attribute whenever the item knows its own label as a string; it is
70
+ * cheaper and more reliable than making this reconstruct it from the DOM.
71
+ */
72
+ typeahead(char: string): void;
73
+ /** Clears the typeahead buffer and any pending timer. Call from teardown. */
74
+ destroy(): void;
75
+ /**
76
+ * Added for React. Notifies on every `focusedElement` change, so
77
+ * `useMenuFocusedIndex` can read the index through `useSyncExternalStore`.
78
+ * The mutation source is outside React's knowledge — a `focusItem` from a
79
+ * `pointerenter`, a `typeahead` from a document keydown — which is exactly
80
+ * the case that API exists for.
81
+ */
82
+ subscribe(listener: () => void): () => void;
83
+ }
84
+ export declare function createMenuFocus(options?: MenuFocusOptions): MenuFocusState;
85
+ /**
86
+ * One store per mount, torn down on unmount.
87
+ *
88
+ * The options are handed to the factory as a getter object over live refs, so
89
+ * passing `loop` as a PLAIN VALUE behaves identically to the Svelte call sites'
90
+ * `get loop() { … }` — the factory reads it lazily at navigation time, and a
91
+ * re-render that changes it is honoured without rebuilding anything.
92
+ *
93
+ * The returned handle's identity NEVER changes, so it goes straight into a
94
+ * context value with no memo dance, and no item re-renders when focus moves.
95
+ * `destroy()` is still on the handle, but a consumer never has to call it: the
96
+ * unmount cleanup below closes the typeahead timer that the Svelte side's
97
+ * `DropdownMenuContent` forgets (divergence D-5).
98
+ */
99
+ export declare function useMenuFocus(options?: MenuFocusOptions): MenuFocusState;
100
+ /**
101
+ * A per-item callback ref — one line in each item component, replacing the
102
+ * Svelte side's per-item registration effect.
103
+ *
104
+ * Registration happens in the ref callback (commit phase) rather than an
105
+ * effect, so it survives React's detach-then-attach protocol: the previous
106
+ * registration is released before the new node registers. React 18 ref
107
+ * callbacks cannot return a cleanup — that is 19-only — so the unregister is
108
+ * held locally instead.
109
+ *
110
+ * Registration order is irrelevant: `orderedItems()` sorts by
111
+ * `compareDocumentPosition` at navigation time.
112
+ */
113
+ export declare function useMenuItemRef(menu: MenuFocusState): RefCallback<HTMLElement>;
114
+ /**
115
+ * Subscribes to the focused index so a component can render off it.
116
+ *
117
+ * Opt-in, and discouraged for the reason `focusedIndex`'s own doc comment
118
+ * gives: real DOM focus is what should drive rendering, through `:focus` /
119
+ * `:focus-visible`. Reach for this only when a component genuinely cannot.
120
+ */
121
+ export declare function useMenuFocusedIndex(menu: MenuFocusState): number;
@@ -0,0 +1,217 @@
1
+ "use client";
2
+ import { useEffect, useRef, useCallback } from "react";
3
+ import { useConstant } from "./dom/ssr.js";
4
+ import { useEventCallback } from "./dom/use-event-callback.js";
5
+ import { useLiveRef } from "./dom/use-live-ref.js";
6
+ const TYPEAHEAD_TIMEOUT_MS = 500;
7
+ function compareDocumentOrder(a, b) {
8
+ if (a === b) return 0;
9
+ return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
10
+ }
11
+ function visibleTextOf(node) {
12
+ if (node.nodeType === Node.TEXT_NODE) return node.textContent ?? "";
13
+ if (node.nodeType !== Node.ELEMENT_NODE) return "";
14
+ const element = node;
15
+ if (element.getAttribute("aria-hidden") === "true") return "";
16
+ let text = "";
17
+ for (const child of Array.from(element.childNodes)) text += visibleTextOf(child);
18
+ return text;
19
+ }
20
+ function isDisabled(element) {
21
+ if (element.getAttribute("aria-disabled") === "true") return true;
22
+ return "disabled" in element && element.disabled === true;
23
+ }
24
+ function createMenuFocus(options = {}) {
25
+ const registered = [];
26
+ let focusedElement = null;
27
+ let buffer = "";
28
+ let timer = null;
29
+ const listeners = /* @__PURE__ */ new Set();
30
+ function notify() {
31
+ for (const listener of listeners) listener();
32
+ }
33
+ function orderedItems() {
34
+ return registered.filter((element) => element.isConnected).sort(compareDocumentOrder);
35
+ }
36
+ function focusAt(items, index) {
37
+ const element = items[index];
38
+ if (!element) return;
39
+ focusedElement = element;
40
+ notify();
41
+ element.focus();
42
+ options.onFocusChange?.(index, element);
43
+ }
44
+ function findNext(items, from, direction, loop) {
45
+ const count = items.length;
46
+ let idx = from;
47
+ for (let attempts = 0; attempts < count; attempts++) {
48
+ idx += direction;
49
+ if (loop) {
50
+ idx = (idx % count + count) % count;
51
+ } else if (idx < 0 || idx >= count) {
52
+ return null;
53
+ }
54
+ const element = items[idx];
55
+ if (element && !isDisabled(element)) return idx;
56
+ }
57
+ return null;
58
+ }
59
+ function indexOfFocused(items) {
60
+ return focusedElement ? items.indexOf(focusedElement) : -1;
61
+ }
62
+ function register(element) {
63
+ if (!registered.includes(element)) registered.push(element);
64
+ return () => {
65
+ const at = registered.indexOf(element);
66
+ if (at !== -1) registered.splice(at, 1);
67
+ if (focusedElement === element) {
68
+ focusedElement = null;
69
+ notify();
70
+ }
71
+ };
72
+ }
73
+ function move(delta) {
74
+ if (delta === 0) return;
75
+ const items = orderedItems();
76
+ if (items.length === 0) return;
77
+ const loop = options.loop ?? true;
78
+ const direction = delta >= 0 ? 1 : -1;
79
+ const steps = Math.abs(delta);
80
+ const current = indexOfFocused(items);
81
+ const from = current === -1 ? direction === 1 ? -1 : items.length : current;
82
+ let found = null;
83
+ for (let i = 0; i < steps; i++) {
84
+ const next = findNext(items, found ?? from, direction, loop);
85
+ if (next === null) break;
86
+ found = next;
87
+ }
88
+ if (found !== null) focusAt(items, found);
89
+ }
90
+ function moveToEdge(edge) {
91
+ const items = orderedItems();
92
+ if (items.length === 0) return;
93
+ if (edge === "first") {
94
+ for (let i = 0; i < items.length; i++) {
95
+ if (!isDisabled(items[i])) {
96
+ focusAt(items, i);
97
+ return;
98
+ }
99
+ }
100
+ return;
101
+ }
102
+ for (let i = items.length - 1; i >= 0; i--) {
103
+ if (!isDisabled(items[i])) {
104
+ focusAt(items, i);
105
+ return;
106
+ }
107
+ }
108
+ }
109
+ function focusItem(element) {
110
+ const items = orderedItems();
111
+ const index = items.indexOf(element);
112
+ if (index === -1 || isDisabled(element)) return;
113
+ focusAt(items, index);
114
+ }
115
+ function clear() {
116
+ focusedElement = null;
117
+ notify();
118
+ }
119
+ function clearBuffer() {
120
+ buffer = "";
121
+ if (timer !== null) {
122
+ clearTimeout(timer);
123
+ timer = null;
124
+ }
125
+ }
126
+ function labelOf(element) {
127
+ const explicit = element.dataset.typeaheadLabel;
128
+ return (explicit ?? visibleTextOf(element)).trim().toLowerCase();
129
+ }
130
+ function typeahead(char) {
131
+ const items = orderedItems();
132
+ if (items.length === 0) return;
133
+ const lower = char.toLowerCase();
134
+ const isRepeatChar = buffer.length > 0 && [...buffer].every((c) => c === lower);
135
+ if (timer !== null) clearTimeout(timer);
136
+ timer = setTimeout(clearBuffer, TYPEAHEAD_TIMEOUT_MS);
137
+ if (isRepeatChar) {
138
+ buffer = lower;
139
+ const from = indexOfFocused(items);
140
+ for (let i = 1; i <= items.length; i++) {
141
+ const candidate = (from + i + items.length) % items.length;
142
+ const element = items[candidate];
143
+ if (isDisabled(element)) continue;
144
+ if (labelOf(element).startsWith(lower)) {
145
+ focusAt(items, candidate);
146
+ return;
147
+ }
148
+ }
149
+ return;
150
+ }
151
+ buffer += lower;
152
+ const query = buffer;
153
+ for (let i = 0; i < items.length; i++) {
154
+ const element = items[i];
155
+ if (isDisabled(element)) continue;
156
+ if (labelOf(element).startsWith(query)) {
157
+ focusAt(items, i);
158
+ return;
159
+ }
160
+ }
161
+ }
162
+ function destroy() {
163
+ clearBuffer();
164
+ }
165
+ function subscribe(listener) {
166
+ listeners.add(listener);
167
+ return () => {
168
+ listeners.delete(listener);
169
+ };
170
+ }
171
+ return {
172
+ get focusedIndex() {
173
+ return indexOfFocused(orderedItems());
174
+ },
175
+ register,
176
+ move,
177
+ moveToEdge,
178
+ focusItem,
179
+ clear,
180
+ typeahead,
181
+ destroy,
182
+ subscribe
183
+ };
184
+ }
185
+ function useMenuFocus(options = {}) {
186
+ const loop = useLiveRef(options.loop);
187
+ const onFocusChange = useEventCallback(options.onFocusChange);
188
+ const menu = useConstant(
189
+ () => createMenuFocus({
190
+ get loop() {
191
+ return loop.current;
192
+ },
193
+ onFocusChange
194
+ })
195
+ );
196
+ useEffect(() => {
197
+ return () => {
198
+ menu.destroy();
199
+ };
200
+ }, [menu]);
201
+ return menu;
202
+ }
203
+ function useMenuItemRef(menu) {
204
+ const unregister = useRef(null);
205
+ return useCallback(
206
+ (node) => {
207
+ unregister.current?.();
208
+ unregister.current = node ? menu.register(node) : null;
209
+ },
210
+ [menu]
211
+ );
212
+ }
213
+ export {
214
+ createMenuFocus,
215
+ useMenuFocus,
216
+ useMenuItemRef
217
+ };
@@ -0,0 +1,104 @@
1
+ /**
2
+ * The shared scale+opacity transition for floating surfaces — menus, selects,
3
+ * pickers, popovers, tooltips, hover cards. One rung, one curve, one
4
+ * geometry, so twelve panels stop each inventing their own.
5
+ *
6
+ * The name is a slight misnomer for the modal rung: a centred dialog is
7
+ * anchored to nothing, and spends this same function with its own two
8
+ * durations (`DURATIONS.base` in, `DURATIONS.exit` out) rather than the
9
+ * anchored defaults. One geometry in one place was worth more than a synonym,
10
+ * so the modal surfaces call `anchored` too and spell their rung at the call
11
+ * site where the diff can see it.
12
+ *
13
+ * Two pieces that are deliberately kept separate:
14
+ *
15
+ * 1. `anchored()` — a css-only transition (scale + opacity, nothing else). It
16
+ * never emits `transform-origin`.
17
+ * 2. `originFor()` — a pure lookup the CALLER writes as a static inline
18
+ * `style={{ transformOrigin }}`. Keeping the origin out of `css()` means it
19
+ * is inspectable in DevTools, survives a future exit transition, and is
20
+ * available to any CSS that wants to key off it — none of which is true
21
+ * of a value smuggled into a per-frame transition string.
22
+ *
23
+ * Why scale + opacity and nothing else: a panel that also translated would
24
+ * fight `anchor-position.ts`'s `position: fixed; left/top` writes on the same
25
+ * element (that module owns those three properties and touches neither
26
+ * `transform` nor `transform-origin`, so the two never collide as written).
27
+ * The travel is not lost, it moves into the origin: growing from the panel
28
+ * edge nearest the trigger reads as "this came out of that button" far more
29
+ * clearly than four pixels of slide ever did.
30
+ *
31
+ * SSR: nothing here touches `window` at module scope. `prefersReducedMotion()`
32
+ * does, but a transition body only ever runs in the browser.
33
+ */
34
+ import type { Side, Align } from "../anchor-position.js";
35
+ import type { TransitionSpec, TransitionDirection } from "./transitions.js";
36
+ /** Params for `anchored`. Every field is optional; the defaults ARE the
37
+ * anchored rung, so `anchored(node, { side: resolvedSide })` is the whole
38
+ * call site for eleven of the twelve panels. */
39
+ export interface AnchoredParams {
40
+ /** The RESOLVED side the surface was placed on — `useAnchorPosition`'s
41
+ * `onPlacement` value, never the requested one. Drives nothing but the
42
+ * caller's own `transform-origin`; kept here so one params object feeds
43
+ * both. Defaults to `"bottom"`, but callers always pass their own
44
+ * requested side as the seed. */
45
+ side?: Side;
46
+ /** Entrance duration (ms). Defaults to `DURATIONS.fast`. */
47
+ duration?: number;
48
+ /** Exit duration (ms). Defaults to `DURATIONS.fast`. */
49
+ exitDuration?: number;
50
+ /** Delay (ms), entrance only — an exit never waits. Defaults to 0. */
51
+ delay?: number;
52
+ /** `false` drops the scale term, leaving an opacity-only fade (Tooltip).
53
+ * Defaults to `true`. */
54
+ scale?: boolean;
55
+ /** Direction override, read fresh on every call, for a caller driving ONE
56
+ * bidirectional transition instance (which reports `direction: "both"`,
57
+ * and cannot distinguish enter from leave). Unset, direction comes from
58
+ * `options.direction`. */
59
+ entering?: boolean;
60
+ }
61
+ /**
62
+ * One-shot read of the user's motion preference.
63
+ *
64
+ * Browser-only, and safe because of where it is called from: a transition body
65
+ * never runs during SSR. NEVER call it at module scope, in a render path, or
66
+ * inside a memo — for a live, reactive answer use `useReducedMotion()` from
67
+ * `media-query.ts` instead. A listener would be pointless here: the value only
68
+ * matters at the instant a one-shot transition starts, and a preference that
69
+ * flips mid-flight should not retro-cancel an animation already on screen.
70
+ *
71
+ * `window.matchMedia` is resolved FRESH on every call, never memoised, for
72
+ * the same reason `media-query.ts` documents at length: a test that overrides
73
+ * `window.matchMedia` wholesale must be visible to the next call.
74
+ */
75
+ export declare function prefersReducedMotion(): boolean;
76
+ export declare function originFor(side: Side, align?: Align): string;
77
+ /**
78
+ * A css-only, direction-aware transition for an anchored floating surface.
79
+ * Entrance: `JS_EASINGS.out` over `DURATIONS.fast`, growing from the scale
80
+ * floor. Exit: `JS_EASINGS.in`, half the depth, and never delayed — a
81
+ * dismissal that waits before starting reads as an unresponsive UI.
82
+ *
83
+ * Reduced motion collapses `duration` (and `delay`) to 0, which makes
84
+ * `runTransition` skip `element.animate()` entirely rather than running a
85
+ * zero-length animation — the same fast path `animate.test.ts` pins down.
86
+ */
87
+ export declare function anchored(_node: Element, params?: AnchoredParams, options?: {
88
+ direction: TransitionDirection;
89
+ }): TransitionSpec;
90
+ /** The `data-state` values a transitioning surface reports. There is no
91
+ * "closed": a closed surface is not in the DOM. Deliberately two values, not
92
+ * three — a 150–300 ms entrance has nothing that needs to key off "opening",
93
+ * and two values means one static attribute plus two one-line handlers
94
+ * instead of four.
95
+ *
96
+ * The Svelte side pairs this type with a `markSurfaceState(event, state)`
97
+ * helper that writes `data-state` IMPERATIVELY from a transition event
98
+ * handler. That helper is NOT ported (divergence D-2): it exists solely
99
+ * because Svelte marks a closing `{#if}` branch inert and its scheduler skips
100
+ * inert effects, so a reactive attribute inside a closing block never reaches
101
+ * the DOM. React re-renders an exiting surface normally, so a port writes
102
+ * `data-state={presence.surfaceState}` as an ordinary attribute — same DOM,
103
+ * same CSS hooks, same two values. */
104
+ export type SurfaceState = "open" | "closing";
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { DURATIONS, JS_EASINGS } from "./tokens.js";
3
+ import { PRESETS } from "./presets.js";
4
+ import { REDUCED_MOTION_QUERY } from "./media-query.js";
5
+ function prefersReducedMotion() {
6
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
7
+ return window.matchMedia(REDUCED_MOTION_QUERY).matches;
8
+ }
9
+ const ORIGINS = {
10
+ bottom: { start: "left top", center: "center top", end: "right top" },
11
+ top: { start: "left bottom", center: "center bottom", end: "right bottom" },
12
+ left: { start: "right top", center: "right center", end: "right bottom" },
13
+ right: { start: "left top", center: "left center", end: "left bottom" }
14
+ };
15
+ function originFor(side, align = "center") {
16
+ return ORIGINS[side][align];
17
+ }
18
+ const ENTER_FLOOR = PRESETS.scale.scale;
19
+ const EXIT_FLOOR = 1 - (1 - ENTER_FLOOR) / 2;
20
+ function anchored(_node, params = {}, options) {
21
+ const entering = params.entering ?? options?.direction !== "out";
22
+ const reduced = prefersReducedMotion();
23
+ const duration = reduced ? 0 : entering ? params.duration ?? DURATIONS.fast : params.exitDuration ?? DURATIONS.fast;
24
+ const delay = reduced ? 0 : entering ? params.delay ?? 0 : 0;
25
+ const easing = entering ? JS_EASINGS.out : JS_EASINGS.in;
26
+ const floor = params.scale === false ? 1 : entering ? ENTER_FLOOR : EXIT_FLOOR;
27
+ return {
28
+ delay,
29
+ duration,
30
+ easing,
31
+ // `t` arrives ALREADY eased (the sampler evaluates `easing(i / n)`
32
+ // before calling `css`), so this interpolates linearly in `t` exactly
33
+ // like `transitions.ts` does. A floor of 1 emits no `transform` at all
34
+ // rather than a no-op `scale(1)`, which keeps an opacity-only panel
35
+ // from acquiring a compositing layer and a stacking context it never
36
+ // asked for.
37
+ css: (t) => floor === 1 ? `opacity: ${t}` : `opacity: ${t}; transform: scale(${floor + (1 - floor) * t})`
38
+ };
39
+ }
40
+ export {
41
+ anchored,
42
+ originFor,
43
+ prefersReducedMotion
44
+ };
@@ -0,0 +1,92 @@
1
+ /**
2
+ * The transition sampler — the one mechanism every `transition:`-driven
3
+ * component in this library runs through, reproduced from the framework's own
4
+ * `animate()` so the React port animates the SAME curve rather than a
5
+ * hand-matched approximation of it.
6
+ *
7
+ * The decisive fact behind the whole design: a css-only transition is already
8
+ * WAAPI. The framework samples `css(t, 1 - t)` at
9
+ * `n = Math.ceil(duration / (1000 / 60))` points, converts each string to a
10
+ * keyframe object and hands the array to `element.animate()`. Running that same
11
+ * algorithm against the same `css()` produces a byte-identical keyframe array
12
+ * and therefore a pixel-identical animation — fidelity is structural here, not
13
+ * aspirational. It also inherits, free: the `duration: 0` fast path reduced
14
+ * motion relies on, reversal from an in-flight position rather than a full
15
+ * restart, and testability through an `Element.prototype.animate` stub.
16
+ *
17
+ * The curve lives entirely in the SAMPLE POSITIONS (`t = t1 + delta *
18
+ * easing(i / n)`), never in a WAAPI `easing` option — which is exactly why
19
+ * every `css(t, u)` in `transitions.ts` and `anchored.ts` interpolates
20
+ * linearly in `t`: by the time `css` is called, `t` has already been eased.
21
+ *
22
+ * Two things the source has and this does not, both deliberate:
23
+ *
24
+ * - `tick`. `TransitionSpec` has no `tick` field (nothing in this library uses
25
+ * one), so the per-frame JS loop and the `reset()` handle it exists for are
26
+ * both gone with it.
27
+ * - The `overflow: hidden` inline-style workaround for a Safari < 18 bug. It
28
+ * triggers only when a sampled keyframe declares `overflow: hidden`, and no
29
+ * `css()` in this package emits `overflow` at all — porting it would ship a
30
+ * branch no test can reach.
31
+ *
32
+ * There is deliberately NO "the host cannot animate" `setTimeout` fallback:
33
+ * the source has none, and inventing one would put an untested code path into
34
+ * production. jsdom is handled by the `Element.prototype.animate` stub in
35
+ * `test-setup.ts`, which is a hard requirement of this module's suite.
36
+ *
37
+ * SSR: nothing here touches a browser global at module scope. `runTransition`
38
+ * itself is only ever called from a layout effect.
39
+ */
40
+ import type { TransitionSpec } from "./transitions.js";
41
+ /**
42
+ * One `css(t, u)` declaration string → one WAAPI keyframe object.
43
+ *
44
+ * Split on `;`, split each part at the FIRST `:`, and **break** — not
45
+ * `continue` — on a malformed part: a declaration missing its value ends the
46
+ * parse rather than being skipped, which is the source's behaviour and is what
47
+ * keeps a trailing `;` harmless.
48
+ */
49
+ export declare function cssToKeyframe(css: string): Keyframe;
50
+ /** The handle one transition leg hands back. The counterpart of a running leg
51
+ * is read (`t()`) and then torn down (`abort()`) by the leg that replaces it. */
52
+ export interface TransitionRun {
53
+ /** Current eased position in `css()`'s own `t` space: `1 - to` before the
54
+ * delay elapses, the interpolated position while the main animation runs,
55
+ * and `to` once it has finished. Read by a reversing counterpart so a
56
+ * reopen mid-close starts from where the close actually got to. */
57
+ t(): number;
58
+ /** Cancel without finishing. Also nulls the animation's `effect` (a
59
+ * Chromium leak) and replaces `onfinish` with a no-op, because a cancelled
60
+ * animation can still fire `onfinish` in rare cases. */
61
+ abort(): void;
62
+ /** Silence this run's `onFinish` without stopping it. Called on the
63
+ * counterpart the instant a new leg starts, so a superseded leg cannot
64
+ * unmount the node the new leg is animating back in. */
65
+ deactivate(): void;
66
+ }
67
+ /**
68
+ * Runs one transition leg on `element`, from its current position to `to`
69
+ * (`1` = visible, `0` = hidden), and calls `onFinish` when it lands.
70
+ *
71
+ * Order matters in five places, and every one of them is visible if broken:
72
+ *
73
+ * 1. `counterpart?.deactivate()` runs FIRST, before anything else.
74
+ * 2. A falsy `spec.duration` finishes SYNCHRONOUSLY and never calls
75
+ * `element.animate()` — the reduced-motion fast path, and the reason a
76
+ * reduced-motion close completes inside the same layout effect, before
77
+ * paint.
78
+ * 3. A leading dummy animation is ALWAYS created, even at `delay: 0`. Its
79
+ * keyframes pin the hidden state (`css(0, 1)`, twice) only for a fresh
80
+ * intro, and are empty otherwise. Pinning is what stops a DELAYED entrance
81
+ * painting one frame at rest first; keeping the dummy at `delay: 0` is what
82
+ * defers the real keyframes until the DOM has updated. The consequence for
83
+ * every caller: the main animation always starts ASYNCHRONOUSLY, in the
84
+ * dummy's `onfinish`.
85
+ * 4. Inside that `onfinish`: cancel the dummy, then READ `counterpart.t()`,
86
+ * then abort the counterpart — the read strictly before the abort, or a
87
+ * reversal restarts from the far end instead of from the in-flight
88
+ * position.
89
+ * 5. The sample loop runs `i = 0` to `i <= n` INCLUSIVE (n + 1 keyframes);
90
+ * `n` must be an integer or the `to` value is missed entirely.
91
+ */
92
+ export declare function runTransition(element: Element, spec: TransitionSpec, to: 0 | 1, counterpart: TransitionRun | undefined, onFinish: () => void): TransitionRun;
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { linear } from "./easing.js";
3
+ function noop() {
4
+ }
5
+ function cssPropertyToCamelcase(style) {
6
+ if (style === "float") return "cssFloat";
7
+ if (style === "offset") return "cssOffset";
8
+ if (style.startsWith("--")) return style;
9
+ const parts = style.split("-");
10
+ if (parts.length === 1) return parts[0] ?? style;
11
+ return (parts[0] ?? "") + parts.slice(1).map((word) => (word[0] ?? "").toUpperCase() + word.slice(1)).join("");
12
+ }
13
+ function cssToKeyframe(css) {
14
+ const keyframe = {};
15
+ const parts = css.split(";");
16
+ for (const part of parts) {
17
+ const [property, value] = part.split(":");
18
+ if (!property || value === void 0) break;
19
+ const formattedProperty = cssPropertyToCamelcase(property.trim());
20
+ keyframe[formattedProperty] = value.trim();
21
+ }
22
+ return keyframe;
23
+ }
24
+ function runTransition(element, spec, to, counterpart, onFinish) {
25
+ const isIntro = to === 1;
26
+ counterpart?.deactivate();
27
+ if (!spec.duration) {
28
+ onFinish();
29
+ return {
30
+ abort: noop,
31
+ deactivate: noop,
32
+ t: () => to
33
+ };
34
+ }
35
+ const { delay = 0, css, easing = linear } = spec;
36
+ const dummyKeyframes = [];
37
+ if (isIntro && counterpart === void 0) {
38
+ const styles = cssToKeyframe(css(0, 1));
39
+ dummyKeyframes.push(styles, styles);
40
+ }
41
+ let getT = () => 1 - to;
42
+ let finish = onFinish;
43
+ let animation = element.animate(dummyKeyframes, { duration: delay, fill: "forwards" });
44
+ animation.onfinish = () => {
45
+ animation.cancel();
46
+ const t1 = counterpart?.t() ?? 1 - to;
47
+ counterpart?.abort();
48
+ const delta = to - t1;
49
+ const duration = spec.duration * Math.abs(delta);
50
+ const keyframes = [];
51
+ if (duration > 0) {
52
+ const n = Math.ceil(duration / (1e3 / 60));
53
+ for (let i = 0; i <= n; i += 1) {
54
+ const t = t1 + delta * easing(i / n);
55
+ keyframes.push(cssToKeyframe(css(t, 1 - t)));
56
+ }
57
+ getT = () => {
58
+ const time = animation.currentTime;
59
+ if (typeof time !== "number" || !Number.isFinite(time)) return t1;
60
+ return t1 + delta * easing(time / duration);
61
+ };
62
+ }
63
+ animation = element.animate(keyframes, { duration, fill: "forwards" });
64
+ animation.onfinish = () => {
65
+ getT = () => to;
66
+ finish();
67
+ };
68
+ };
69
+ return {
70
+ abort: () => {
71
+ animation.cancel();
72
+ animation.effect = null;
73
+ animation.onfinish = noop;
74
+ },
75
+ deactivate: () => {
76
+ finish = noop;
77
+ },
78
+ t: () => getT()
79
+ };
80
+ }
81
+ export {
82
+ cssToKeyframe,
83
+ runTransition
84
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The two curves `JS_EASINGS` names, inlined because the framework's easing
3
+ * module cannot become a runtime dependency of this package (divergence D-7 in
4
+ * the internals contract). Closed forms, copied byte-for-byte — do NOT "clean
5
+ * up" the endpoint guards; they are the shape of the curve at exactly the
6
+ * points `css()` is sampled at.
7
+ *
8
+ * Pure data-shaped functions: no side effects, no browser globals, safe to
9
+ * import at module scope during SSR.
10
+ */
11
+ /** Departure curve. `t === 0` is guarded so the curve starts at exactly 0
12
+ * rather than at `2 ** -10`. */
13
+ export declare function expoIn(t: number): number;
14
+ /** Arrival curve. `t === 1` is guarded so the curve ends at exactly 1 rather
15
+ * than at `1 - 2 ** -10`. */
16
+ export declare function expoOut(t: number): number;
17
+ /** The identity curve. Not referenced by `JS_EASINGS`; exported for a caller
18
+ * that wants to opt a single transition out of easing entirely without
19
+ * hand-rolling `(t) => t` at the call site. */
20
+ export declare const linear: (t: number) => number;