fancy-ui-vue 0.2.0 → 0.4.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 (341) hide show
  1. package/PORTING.md +123 -2
  2. package/README.md +20 -15
  3. package/dist/components/accordion/Accordion.vue.d.ts +44 -0
  4. package/dist/components/accordion/Accordion.vue.js +88 -0
  5. package/dist/components/accordion/Accordion.vue2.js +4 -0
  6. package/dist/components/accordion/AccordionContent.vue.d.ts +25 -0
  7. package/dist/components/accordion/AccordionContent.vue.js +42 -0
  8. package/dist/components/accordion/AccordionContent.vue2.js +4 -0
  9. package/dist/components/accordion/AccordionItem.vue.d.ts +21 -0
  10. package/dist/components/accordion/AccordionItem.vue.js +66 -0
  11. package/dist/components/accordion/AccordionItem.vue2.js +4 -0
  12. package/dist/components/accordion/AccordionTrigger.vue.d.ts +24 -0
  13. package/dist/components/accordion/AccordionTrigger.vue.js +83 -0
  14. package/dist/components/accordion/AccordionTrigger.vue2.js +4 -0
  15. package/dist/components/accordion/accordion-core.d.ts +35 -0
  16. package/dist/components/accordion/accordion-core.js +44 -0
  17. package/dist/components/accordion/index.d.ts +11 -0
  18. package/dist/components/accordion/types.d.ts +45 -0
  19. package/dist/components/accordion/types.js +7 -0
  20. package/dist/components/alert-dialog/AlertDialog.vue.js +22 -3
  21. package/dist/components/animated-testimonials/AnimatedTestimonials.vue.js +3 -3
  22. package/dist/components/apple-card-carousel/AppleCard.vue.js +1 -1
  23. package/dist/components/autocomplete/Autocomplete.vue.js +1 -1
  24. package/dist/components/autocomplete/Autocomplete.vue2.js +22 -15
  25. package/dist/components/avatar/Avatar.vue.d.ts +27 -0
  26. package/dist/components/avatar/Avatar.vue.js +119 -0
  27. package/dist/components/avatar/Avatar.vue2.js +4 -0
  28. package/dist/components/avatar/avatar-core.d.ts +40 -0
  29. package/dist/components/avatar/avatar-core.js +57 -0
  30. package/dist/components/avatar/index.d.ts +2 -0
  31. package/dist/components/badge/Badge.vue.d.ts +21 -0
  32. package/dist/components/badge/Badge.vue.js +46 -0
  33. package/dist/components/badge/Badge.vue2.js +4 -0
  34. package/dist/components/badge/index.d.ts +2 -0
  35. package/dist/components/bento-grid/BentoFrame.vue.js +1 -1
  36. package/dist/components/bento-grid/BentoFrame.vue2.js +6 -5
  37. package/dist/components/bento-grid/BentoGrid.vue.js +1 -1
  38. package/dist/components/bento-grid/BentoGrid.vue2.js +12 -12
  39. package/dist/components/bento-grid/BentoGridCard.vue.js +6 -5
  40. package/dist/components/bento-grid/BentoGridItem.vue.js +6 -5
  41. package/dist/components/bg-falling-stars/FallingStarsBg.vue.d.ts +1 -1
  42. package/dist/components/bg-falling-stars/FallingStarsBg.vue.js +1 -1
  43. package/dist/components/bg-falling-stars/bg-falling-stars-core.d.ts +1 -1
  44. package/dist/components/bg-falling-stars/bg-falling-stars-core.js +47 -12
  45. package/dist/components/book/Book.vue.js +8 -9
  46. package/dist/components/book/BookDescription.vue.js +6 -5
  47. package/dist/components/book/BookHeader.vue.js +6 -5
  48. package/dist/components/book/BookTitle.vue.js +6 -5
  49. package/dist/components/box-reveal/BoxReveal.vue.js +6 -5
  50. package/dist/components/button/Button.vue.d.ts +6 -4
  51. package/dist/components/button/Button.vue.js +1 -1
  52. package/dist/components/button/Button.vue2.js +50 -22
  53. package/dist/components/card-3d/CardContainer.vue.js +1 -1
  54. package/dist/components/card-3d/CardItem.vue.js +1 -1
  55. package/dist/components/card-spotlight/CardSpotlight.vue.js +1 -1
  56. package/dist/components/chat-message/ChatMessageAction.vue.d.ts +4 -2
  57. package/dist/components/chat-message/ChatMessageAction.vue.js +4 -2
  58. package/dist/components/checkbox/Checkbox.vue.d.ts +2 -0
  59. package/dist/components/checkbox/Checkbox.vue.js +1 -1
  60. package/dist/components/checkbox/Checkbox.vue2.js +17 -7
  61. package/dist/components/collapsible/Collapsible.vue.d.ts +31 -0
  62. package/dist/components/collapsible/Collapsible.vue.js +60 -0
  63. package/dist/components/collapsible/Collapsible.vue2.js +4 -0
  64. package/dist/components/collapsible/CollapsibleContent.vue.d.ts +26 -0
  65. package/dist/components/collapsible/CollapsibleContent.vue.js +81 -0
  66. package/dist/components/collapsible/CollapsibleContent.vue2.js +4 -0
  67. package/dist/components/collapsible/CollapsibleTrigger.vue.d.ts +21 -0
  68. package/dist/components/collapsible/CollapsibleTrigger.vue.js +57 -0
  69. package/dist/components/collapsible/CollapsibleTrigger.vue2.js +4 -0
  70. package/dist/components/collapsible/collapsible-core.d.ts +47 -0
  71. package/dist/components/collapsible/collapsible-core.js +40 -0
  72. package/dist/components/collapsible/index.d.ts +8 -0
  73. package/dist/components/collapsible/types.d.ts +24 -0
  74. package/dist/components/collapsible/types.js +5 -0
  75. package/dist/components/combobox/Combobox.vue.js +1 -1
  76. package/dist/components/combobox/Combobox.vue2.js +24 -16
  77. package/dist/components/command-menu/CommandMenu.vue.d.ts +5 -0
  78. package/dist/components/command-menu/CommandMenu.vue.js +1 -1
  79. package/dist/components/command-menu/CommandMenu.vue2.js +5 -2
  80. package/dist/components/compare/Compare.vue.d.ts +15 -5
  81. package/dist/components/compare/Compare.vue.js +1 -1
  82. package/dist/components/compare/Compare.vue2.js +28 -13
  83. package/dist/components/composer/ComposerInput.vue.js +1 -1
  84. package/dist/components/composer/ComposerInput.vue2.js +11 -11
  85. package/dist/components/composer/ComposerModelPicker.vue.d.ts +4 -0
  86. package/dist/components/composer/ComposerModelPicker.vue.js +1 -1
  87. package/dist/components/composer/ComposerModelPicker.vue2.js +29 -15
  88. package/dist/components/composer/ComposerSubmit.vue.d.ts +2 -0
  89. package/dist/components/composer/ComposerSubmit.vue.js +16 -15
  90. package/dist/components/confetti/ConfettiButton.vue.d.ts +9 -2
  91. package/dist/components/confetti/ConfettiButton.vue.js +24 -6
  92. package/dist/components/container-text-flip/ContainerTextFlip.vue.js +1 -1
  93. package/dist/components/container-text-flip/ContainerTextFlip.vue2.js +12 -13
  94. package/dist/components/copy-button/CopyButton.vue.d.ts +5 -0
  95. package/dist/components/copy-button/CopyButton.vue.js +1 -1
  96. package/dist/components/copy-button/CopyButton.vue2.js +72 -11
  97. package/dist/components/datamosh-transition/DatamoshTransition.vue.d.ts +6 -2
  98. package/dist/components/datamosh-transition/DatamoshTransition.vue.js +7 -4
  99. package/dist/components/date-picker/DatePicker.vue.js +1 -1
  100. package/dist/components/date-picker/DatePicker.vue2.js +27 -21
  101. package/dist/components/dialog/Dialog.vue.js +20 -1
  102. package/dist/components/dialog/DialogSurface.vue.js +1 -1
  103. package/dist/components/dialog/DialogSurface.vue2.js +5 -2
  104. package/dist/components/dialog/types.d.ts +2 -0
  105. package/dist/components/direction-aware-hover/DirectionAwareHover.vue.js +1 -1
  106. package/dist/components/direction-aware-hover/DirectionAwareHover.vue2.js +9 -7
  107. package/dist/components/displacement-text/DisplacementText.vue.d.ts +4 -1
  108. package/dist/components/displacement-text/DisplacementText.vue.js +38 -11
  109. package/dist/components/displacement-text/displacement-text-core.d.ts +94 -4
  110. package/dist/components/displacement-text/displacement-text-core.js +287 -97
  111. package/dist/components/drawer/Drawer.vue.d.ts +5 -0
  112. package/dist/components/drawer/Drawer.vue.js +1 -1
  113. package/dist/components/drawer/Drawer.vue2.js +5 -2
  114. package/dist/components/dropdown-menu/DropdownMenuContent.vue.js +2 -1
  115. package/dist/components/dropdown-menu/DropdownMenuItem.vue.d.ts +4 -0
  116. package/dist/components/dropdown-menu/DropdownMenuItem.vue.js +17 -10
  117. package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +8 -0
  118. package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.js +28 -13
  119. package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts +4 -0
  120. package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.js +1 -1
  121. package/dist/components/dropdown-menu/DropdownMenuTrigger.vue2.js +20 -10
  122. package/dist/components/editorial-engine/EditorialEngine.vue.js +1 -1
  123. package/dist/components/editorial-engine/engine.js +13 -0
  124. package/dist/components/file-upload/FileUpload.vue.d.ts +2 -0
  125. package/dist/components/file-upload/FileUpload.vue.js +1 -1
  126. package/dist/components/file-upload/FileUpload.vue2.js +20 -10
  127. package/dist/components/fireworks-hdr/FireworksHdr.vue.js +2 -2
  128. package/dist/components/flickering-grid/FlickeringGrid.vue.d.ts +1 -1
  129. package/dist/components/flickering-grid/FlickeringGrid.vue.js +1 -1
  130. package/dist/components/flickering-grid/flickering-grid-core.d.ts +1 -1
  131. package/dist/components/flickering-grid/flickering-grid-core.js +51 -9
  132. package/dist/components/flip-card/FlipCard.vue.d.ts +3 -1
  133. package/dist/components/flip-card/FlipCard.vue.js +1 -1
  134. package/dist/components/flip-card/FlipCard.vue2.js +5 -3
  135. package/dist/components/fluid-cursor/FluidCursor.vue.js +37 -9
  136. package/dist/components/fluid-cursor/fluid-cursor-core.js +3 -3
  137. package/dist/components/fluid-cursor/webgpu-engine.js +3 -3
  138. package/dist/components/focus/Focus.vue.js +1 -1
  139. package/dist/components/focus/Focus.vue2.js +2 -2
  140. package/dist/components/follow-button/FollowButton.vue.d.ts +69 -0
  141. package/dist/components/follow-button/FollowButton.vue.js +7 -0
  142. package/dist/components/follow-button/FollowButton.vue2.js +239 -0
  143. package/dist/components/follow-button/follow-core.d.ts +83 -0
  144. package/dist/components/follow-button/follow-core.js +92 -0
  145. package/dist/components/follow-button/index.d.ts +2 -0
  146. package/dist/components/frosted-glass/FrostedGlass.vue.js +1 -1
  147. package/dist/components/glare-card/GlareCard.vue.js +1 -1
  148. package/dist/components/glare-card/GlareCard.vue2.js +4 -4
  149. package/dist/components/glowing-effect/GlowingEffect.vue.js +3 -3
  150. package/dist/components/glowing-effect/glowing-effect-core.js +4 -1
  151. package/dist/components/gradient-button/GradientButton.vue.d.ts +6 -4
  152. package/dist/components/gradient-button/GradientButton.vue.js +1 -1
  153. package/dist/components/gradient-button/GradientButton.vue2.js +13 -3
  154. package/dist/components/icon-button/IconButton.vue.d.ts +6 -4
  155. package/dist/components/icon-button/IconButton.vue.js +11 -8
  156. package/dist/components/image-trail-cursor/ImageTrailCursor.vue.js +17 -7
  157. package/dist/components/image-trail-cursor/trail-variants.js +3 -6
  158. package/dist/components/inline-citation/InlineCitation.vue.js +1 -1
  159. package/dist/components/inline-citation/InlineCitation.vue2.js +20 -14
  160. package/dist/components/input/Input.vue.js +1 -1
  161. package/dist/components/input/Input.vue2.js +18 -8
  162. package/dist/components/interactive-grid-pattern/InteractiveGridPattern.vue.js +1 -1
  163. package/dist/components/interactive-grid-pattern/InteractiveGridPattern.vue2.js +1 -1
  164. package/dist/components/interactive-hover-button/InteractiveHoverButton.vue.d.ts +6 -3
  165. package/dist/components/interactive-hover-button/InteractiveHoverButton.vue.js +1 -1
  166. package/dist/components/interactive-hover-button/InteractiveHoverButton.vue2.js +12 -2
  167. package/dist/components/letter-pullup/LetterPullup.vue.js +4 -4
  168. package/dist/components/line-hover-link/LineHoverLink.vue.js +1 -1
  169. package/dist/components/line-hover-link/LineHoverLink.vue2.js +5 -6
  170. package/dist/components/link/Link.vue.d.ts +4 -2
  171. package/dist/components/link/Link.vue.js +1 -1
  172. package/dist/components/link/Link.vue2.js +11 -8
  173. package/dist/components/magnetic-field/MagnetPuck.vue.d.ts +51 -0
  174. package/dist/components/magnetic-field/MagnetPuck.vue.js +7 -0
  175. package/dist/components/magnetic-field/MagnetPuck.vue2.js +191 -0
  176. package/dist/components/magnetic-field/MagneticField.vue.d.ts +39 -0
  177. package/dist/components/magnetic-field/MagneticField.vue.js +7 -0
  178. package/dist/components/magnetic-field/MagneticField.vue2.js +157 -0
  179. package/dist/components/magnetic-field/MagneticItem.vue.d.ts +28 -0
  180. package/dist/components/magnetic-field/MagneticItem.vue.js +7 -0
  181. package/dist/components/magnetic-field/MagneticItem.vue2.js +72 -0
  182. package/dist/components/magnetic-field/index.d.ts +10 -0
  183. package/dist/components/magnetic-field/magnetic-field-core.d.ts +163 -0
  184. package/dist/components/magnetic-field/magnetic-field-core.js +534 -0
  185. package/dist/components/magnetic-field/magnetic-field-source.d.ts +58 -0
  186. package/dist/components/magnetic-field/magnetic-field-source.js +58 -0
  187. package/dist/components/magnetic-field/types.d.ts +14 -0
  188. package/dist/components/magnetic-field/types.js +5 -0
  189. package/dist/components/mosaic-glow/MosaicGlow.vue.d.ts +6 -0
  190. package/dist/components/mosaic-glow/MosaicGlow.vue.js +53 -9
  191. package/dist/components/mosaic-glow/mosaic-glow-core.d.ts +30 -0
  192. package/dist/components/mosaic-glow/mosaic-glow-core.js +27 -0
  193. package/dist/components/mosaic-glow/mosaic-glow-hdr.d.ts +24 -0
  194. package/dist/components/mosaic-glow/mosaic-glow-hdr.js +200 -0
  195. package/dist/components/navbar/NavbarLink.vue.d.ts +4 -2
  196. package/dist/components/navbar/NavbarLink.vue.js +1 -1
  197. package/dist/components/navbar/NavbarLink.vue2.js +16 -13
  198. package/dist/components/navigation-menu/NavigationMenu.vue.js +6 -3
  199. package/dist/components/navigation-menu/NavigationMenuLink.vue.js +1 -1
  200. package/dist/components/navigation-menu/NavigationMenuLink.vue2.js +8 -8
  201. package/dist/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +15 -0
  202. package/dist/components/navigation-menu/NavigationMenuTrigger.vue.js +1 -1
  203. package/dist/components/navigation-menu/NavigationMenuTrigger.vue2.js +36 -15
  204. package/dist/components/neon-border/NeonBorder.vue.js +1 -1
  205. package/dist/components/neon-border/NeonBorder.vue2.js +10 -11
  206. package/dist/components/number-input/NumberInput.vue.js +1 -1
  207. package/dist/components/number-input/NumberInput.vue2.js +22 -12
  208. package/dist/components/password-input/PasswordInput.vue.js +1 -1
  209. package/dist/components/password-input/PasswordInput.vue2.js +18 -11
  210. package/dist/components/pixel-loader/PixelLoader.vue.js +1 -1
  211. package/dist/components/pixel-loader/PixelLoader.vue2.js +6 -6
  212. package/dist/components/pixel-scene/PixelScene.vue.d.ts +60 -0
  213. package/dist/components/pixel-scene/PixelScene.vue.js +184 -0
  214. package/dist/components/pixel-scene/PixelScene.vue2.js +4 -0
  215. package/dist/components/pixel-scene/index.d.ts +4 -0
  216. package/dist/components/pixel-scene/pixel-scene-core.d.ts +256 -0
  217. package/dist/components/pixel-scene/pixel-scene-core.js +878 -0
  218. package/dist/components/pixel-scene/pixel-scene-hdr.d.ts +68 -0
  219. package/dist/components/pixel-scene/pixel-scene-hdr.js +312 -0
  220. package/dist/components/pixel-scene/pixel-scene-scenes.d.ts +31 -0
  221. package/dist/components/pixel-scene/pixel-scene-scenes.js +1074 -0
  222. package/dist/components/popover/Popover.vue.d.ts +4 -0
  223. package/dist/components/popover/Popover.vue.js +1 -1
  224. package/dist/components/popover/Popover.vue2.js +8 -6
  225. package/dist/components/popover/PopoverContent.vue.js +6 -2
  226. package/dist/components/pulse-beam/PulseBeam.vue.d.ts +6 -2
  227. package/dist/components/pulse-beam/PulseBeam.vue.js +1 -1
  228. package/dist/components/pulse-beam/PulseBeam.vue2.js +7 -4
  229. package/dist/components/radio-group/RadioGroup.vue.js +12 -11
  230. package/dist/components/radio-group/RadioGroupItem.vue.d.ts +2 -0
  231. package/dist/components/radio-group/RadioGroupItem.vue.js +1 -1
  232. package/dist/components/radio-group/RadioGroupItem.vue2.js +20 -7
  233. package/dist/components/rainbow-button/RainbowButton.vue.d.ts +11 -2
  234. package/dist/components/rainbow-button/RainbowButton.vue.js +1 -1
  235. package/dist/components/rainbow-button/RainbowButton.vue2.js +35 -18
  236. package/dist/components/ripple-button/RippleButton.vue.d.ts +6 -4
  237. package/dist/components/ripple-button/RippleButton.vue.js +1 -1
  238. package/dist/components/ripple-button/RippleButton.vue2.js +10 -5
  239. package/dist/components/search-input/SearchInput.vue.js +1 -1
  240. package/dist/components/search-input/SearchInput.vue2.js +19 -9
  241. package/dist/components/select/Select.vue.d.ts +1 -1
  242. package/dist/components/select/Select.vue.js +1 -1
  243. package/dist/components/select/Select.vue2.js +25 -17
  244. package/dist/components/sheet/Sheet.vue.d.ts +5 -0
  245. package/dist/components/sheet/Sheet.vue.js +5 -2
  246. package/dist/components/shimmer-button/ShimmerButton.vue.d.ts +2 -2
  247. package/dist/components/shimmer-button/ShimmerButton.vue.js +1 -1
  248. package/dist/components/shimmer-button/ShimmerButton.vue2.js +14 -6
  249. package/dist/components/sidebar/SidebarItem.vue.d.ts +4 -2
  250. package/dist/components/sidebar/SidebarItem.vue.js +1 -1
  251. package/dist/components/sidebar/SidebarItem.vue2.js +4 -2
  252. package/dist/components/slider/Slider.vue.d.ts +4 -0
  253. package/dist/components/slider/Slider.vue.js +1 -1
  254. package/dist/components/slider/Slider.vue2.js +20 -8
  255. package/dist/components/sources/SourcesTrigger.vue.js +1 -1
  256. package/dist/components/sources/SourcesTrigger.vue2.js +11 -11
  257. package/dist/components/sparkles/sparkles-core.d.ts +1 -1
  258. package/dist/components/sparkles/sparkles-core.js +36 -2
  259. package/dist/components/story-thread/StoryNode.vue.d.ts +11 -0
  260. package/dist/components/story-thread/StoryNode.vue.js +7 -0
  261. package/dist/components/story-thread/StoryNode.vue2.js +23 -0
  262. package/dist/components/story-thread/StoryThread.vue.d.ts +56 -0
  263. package/dist/components/story-thread/StoryThread.vue.js +7 -0
  264. package/dist/components/story-thread/StoryThread.vue2.js +103 -0
  265. package/dist/components/story-thread/index.d.ts +5 -0
  266. package/dist/components/story-thread/story-thread-core.d.ts +119 -0
  267. package/dist/components/story-thread/story-thread-core.js +491 -0
  268. package/dist/components/story-thread/types.d.ts +1 -0
  269. package/dist/components/sun-switch/SunSwitch.vue.d.ts +61 -0
  270. package/dist/components/sun-switch/SunSwitch.vue.js +7 -0
  271. package/dist/components/sun-switch/SunSwitch.vue2.js +559 -0
  272. package/dist/components/sun-switch/index.d.ts +4 -0
  273. package/dist/components/sun-switch/pixel-wave-core.d.ts +82 -0
  274. package/dist/components/sun-switch/pixel-wave-core.js +508 -0
  275. package/dist/components/sun-switch/sun-switch-core.d.ts +251 -0
  276. package/dist/components/sun-switch/sun-switch-core.js +546 -0
  277. package/dist/components/sun-switch/sun-switch-hdr.d.ts +70 -0
  278. package/dist/components/sun-switch/sun-switch-hdr.js +311 -0
  279. package/dist/components/switch/Switch.vue.d.ts +2 -0
  280. package/dist/components/switch/Switch.vue.js +1 -1
  281. package/dist/components/switch/Switch.vue2.js +16 -6
  282. package/dist/components/tabs/TabsTrigger.vue.d.ts +6 -0
  283. package/dist/components/tabs/TabsTrigger.vue.js +1 -1
  284. package/dist/components/tabs/TabsTrigger.vue2.js +28 -15
  285. package/dist/components/terminal-block/TerminalBlock.vue.js +1 -1
  286. package/dist/components/terminal-block/TerminalBlock.vue2.js +10 -9
  287. package/dist/components/text-reveal-card/TextRevealCard.vue.js +1 -2
  288. package/dist/components/textarea/Textarea.vue.js +1 -1
  289. package/dist/components/textarea/Textarea.vue2.js +19 -12
  290. package/dist/components/tick-nav/TickNav.vue.d.ts +71 -0
  291. package/dist/components/tick-nav/TickNav.vue.js +7 -0
  292. package/dist/components/tick-nav/TickNav.vue2.js +285 -0
  293. package/dist/components/tick-nav/index.d.ts +3 -0
  294. package/dist/components/tick-nav/tick-nav-core.d.ts +102 -0
  295. package/dist/components/tick-nav/tick-nav-core.js +398 -0
  296. package/dist/components/tick-nav/tick-nav-hdr.d.ts +60 -0
  297. package/dist/components/tick-nav/tick-nav-hdr.js +284 -0
  298. package/dist/components/tick-nav/types.d.ts +13 -0
  299. package/dist/components/time-picker/TimePicker.vue.js +1 -1
  300. package/dist/components/time-picker/TimePicker.vue2.js +25 -17
  301. package/dist/components/toast/Toast.vue.js +1 -1
  302. package/dist/components/toast/Toast.vue2.js +16 -4
  303. package/dist/components/toast/index.d.ts +1 -1
  304. package/dist/components/toast/store.d.ts +23 -0
  305. package/dist/components/toast/store.js +35 -7
  306. package/dist/components/toggle/Toggle.vue.d.ts +12 -0
  307. package/dist/components/toggle/Toggle.vue.js +1 -1
  308. package/dist/components/toggle/Toggle.vue2.js +27 -11
  309. package/dist/components/toggle-group/ToggleGroup.vue.d.ts +11 -0
  310. package/dist/components/toggle-group/ToggleGroup.vue.js +1 -1
  311. package/dist/components/toggle-group/ToggleGroup.vue2.js +16 -3
  312. package/dist/components/toggle-group/ToggleGroupItem.vue.d.ts +6 -0
  313. package/dist/components/toggle-group/ToggleGroupItem.vue.js +1 -1
  314. package/dist/components/toggle-group/ToggleGroupItem.vue2.js +27 -14
  315. package/dist/components/tooltip/Tooltip.vue.js +13 -0
  316. package/dist/components/tracing-beam/TracingBeam.vue.d.ts +20 -1
  317. package/dist/components/tracing-beam/TracingBeam.vue.js +5 -164
  318. package/dist/components/tracing-beam/TracingBeam.vue2.js +168 -1
  319. package/dist/components/typing-indicator/TypingIndicator.vue.js +1 -1
  320. package/dist/components/typing-indicator/TypingIndicator.vue2.js +7 -6
  321. package/dist/index.d.ts +10 -0
  322. package/dist/index.js +466 -413
  323. package/dist/internals/anchor-position.js +3 -0
  324. package/dist/internals/call-listener.d.ts +11 -0
  325. package/dist/internals/call-listener.js +31 -0
  326. package/dist/internals/dismissable.d.ts +17 -0
  327. package/dist/internals/dismissable.js +44 -1
  328. package/dist/internals/env.d.ts +1 -0
  329. package/dist/internals/env.js +11 -0
  330. package/dist/internals/focus-trap.js +29 -4
  331. package/dist/internals/merge-ids.d.ts +6 -0
  332. package/dist/internals/merge-ids.js +11 -0
  333. package/dist/internals/motion/presence-core.d.ts +1 -1
  334. package/dist/sound/engine.js +23 -9
  335. package/dist/sound/themes.d.ts +4 -3
  336. package/dist/sound/themes.js +49 -211
  337. package/dist/sound/types.d.ts +9 -1
  338. package/dist/sound/types.js +2 -2
  339. package/dist/styles.css +1473 -571
  340. package/package.json +2 -2
  341. package/tailwind.css +9 -9
@@ -0,0 +1,103 @@
1
+ import { defineComponent, useTemplateRef, shallowRef, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, renderSlot } from "vue";
2
+ import { cn } from "../../utils.js";
3
+ import { sound } from "../../sound/sound.js";
4
+ import { useReducedMotion } from "../../internals/motion/use-media-query.js";
5
+ import { STORY_THREAD_DEFAULTS, createStoryThread } from "./story-thread-core.js";
6
+ const _hoisted_1 = ["aria-label"];
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{ name: "StoryThread", inheritAttrs: false },
9
+ __name: "StoryThread",
10
+ props: {
11
+ layout: { default: STORY_THREAD_DEFAULTS.layout },
12
+ segments: { default: () => [] },
13
+ lead: { default: STORY_THREAD_DEFAULTS.lead },
14
+ tension: { default: STORY_THREAD_DEFAULTS.tension },
15
+ dash: { default: STORY_THREAD_DEFAULTS.dash },
16
+ head: { type: Boolean, default: STORY_THREAD_DEFAULTS.head },
17
+ sound: { type: Boolean, default: false },
18
+ onReach: {},
19
+ ariaLabel: { default: "Story" },
20
+ class: { type: [Boolean, null, String, Object, Array] }
21
+ },
22
+ setup(__props) {
23
+ const props = __props;
24
+ const root = useTemplateRef("root");
25
+ const viewport = useTemplateRef("viewport");
26
+ const track = useTemplateRef("track");
27
+ const svg = useTemplateRef("svg");
28
+ const core = shallowRef(null);
29
+ const reduced = useReducedMotion();
30
+ function options() {
31
+ return {
32
+ layout: props.layout,
33
+ segments: props.segments,
34
+ lead: props.lead,
35
+ tension: props.tension,
36
+ dash: props.dash,
37
+ head: props.head,
38
+ reducedMotion: reduced.value
39
+ };
40
+ }
41
+ onMounted(() => {
42
+ if (!root.value || !viewport.value || !track.value || !svg.value) return;
43
+ core.value = createStoryThread(root.value, viewport.value, track.value, svg.value, {
44
+ ...options(),
45
+ onReach(id) {
46
+ if (props.sound) sound.play("tick", { volume: 0.5 });
47
+ props.onReach?.(id);
48
+ }
49
+ });
50
+ });
51
+ onBeforeUnmount(() => {
52
+ core.value?.destroy();
53
+ core.value = null;
54
+ });
55
+ watch(
56
+ [
57
+ () => props.layout,
58
+ () => props.segments,
59
+ () => props.lead,
60
+ () => props.tension,
61
+ () => props.dash,
62
+ () => props.head,
63
+ reduced
64
+ ],
65
+ () => core.value?.update(options()),
66
+ { flush: "post" }
67
+ );
68
+ return (_ctx, _cache) => {
69
+ return openBlock(), createElementBlock("div", {
70
+ ref_key: "root",
71
+ ref: root,
72
+ class: normalizeClass(unref(cn)("st-root", props.class)),
73
+ role: "region",
74
+ "aria-label": __props.ariaLabel,
75
+ tabindex: "0"
76
+ }, [
77
+ createElementVNode("div", {
78
+ ref_key: "viewport",
79
+ ref: viewport,
80
+ class: "st-viewport"
81
+ }, [
82
+ createElementVNode("div", {
83
+ ref_key: "track",
84
+ ref: track,
85
+ class: "st-track"
86
+ }, [
87
+ (openBlock(), createElementBlock("svg", {
88
+ ref_key: "svg",
89
+ ref: svg,
90
+ class: "st-svg",
91
+ "aria-hidden": "true",
92
+ focusable: "false"
93
+ }, null, 512)),
94
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
95
+ ], 512)
96
+ ], 512)
97
+ ], 10, _hoisted_1);
98
+ };
99
+ }
100
+ });
101
+ export {
102
+ _sfc_main as default
103
+ };
@@ -0,0 +1,5 @@
1
+ export { default as StoryThread } from "./StoryThread.vue";
2
+ export { default as StoryNode } from "./StoryNode.vue";
3
+ export type { StoryThreadProps } from "./StoryThread.vue";
4
+ export type { StoryNodeProps } from "./StoryNode.vue";
5
+ export type { StoryThreadSegment, StoryThreadLayout, StoryThreadDash } from "./types.js";
@@ -0,0 +1,119 @@
1
+ /**
2
+ * StoryThread engine — framework-free, byte-identical in the Svelte, React and
3
+ * Vue trees (see shared-cores.json).
4
+ *
5
+ * The component renders the markup; this module drives everything that moves:
6
+ *
7
+ * - the layout: horizontal (a sticky viewport whose track pans as the page
8
+ * scrolls vertically) or vertical (a plain stack),
9
+ * - the thread: one smooth curve per segment through the centres of the
10
+ * `[data-story-node]` anchors, drawn into the component's <svg> as a faint
11
+ * ghost plus a bright copy uncovered by a mask whose stroke-dashoffset
12
+ * follows the reading position,
13
+ * - the head: a glowing dot at the tip of every segment that is drawing,
14
+ * - the nodes: `data-reached` on each anchor the tip has passed,
15
+ * - the horizontal inputs: sideways wheel, mouse drag, arrow keys, and
16
+ * panning to whatever receives focus.
17
+ *
18
+ * Expected markup:
19
+ * root .st-root the scroll spacer (height set here)
20
+ * viewport .st-viewport sticky window onto the track
21
+ * track .st-track panned with translate3d
22
+ * svg .st-svg filled here, aria-hidden
23
+ * …content holding [data-story-node="<id>"] anchors
24
+ *
25
+ * Per-frame output goes straight to the DOM (attributes, `d`, transforms),
26
+ * never through framework state. No browser global is touched at import time.
27
+ */
28
+ export type StoryThreadAxis = "x" | "y";
29
+ export type StoryThreadLayout = "auto" | "horizontal" | "vertical";
30
+ export type StoryThreadDash = "dotted" | "dashed" | "solid";
31
+ export interface StoryThreadSegment {
32
+ /** Node ids the segment runs through, in order. */
33
+ nodes: string[];
34
+ /** Stroke and head colour of the drawn part. Any CSS colour. */
35
+ color?: string;
36
+ }
37
+ export interface StoryThreadPoint {
38
+ x: number;
39
+ y: number;
40
+ }
41
+ /** [start, end] of a segment along the scroll axis. */
42
+ export type StoryThreadSpan = [number, number];
43
+ export interface StoryThreadOptions {
44
+ layout: StoryThreadLayout;
45
+ /** Segments to draw; empty means one segment through every node in DOM order. */
46
+ segments: StoryThreadSegment[];
47
+ /** Where the tip sits in the viewport, 0..1 along the scroll axis. */
48
+ lead: number;
49
+ /** Curve tension, 0 (straight lines) .. 1. */
50
+ tension: number;
51
+ dash: StoryThreadDash;
52
+ /** Draw the glowing head at each segment's tip. */
53
+ head: boolean;
54
+ /** No smooth scrolling for the arrow keys. */
55
+ reducedMotion: boolean;
56
+ /** Called once each time the tip moves past a node going forward. */
57
+ onReach?: (id: string) => void;
58
+ }
59
+ export interface StoryThreadCore {
60
+ update(options: Partial<StoryThreadOptions>): void;
61
+ /** Re-read the nodes and the geometry (after content changed). */
62
+ refresh(): void;
63
+ destroy(): void;
64
+ }
65
+ export declare const STORY_THREAD_DEFAULTS: {
66
+ readonly layout: "auto";
67
+ readonly lead: 0.7;
68
+ readonly tension: 0.55;
69
+ readonly dash: "dotted";
70
+ readonly head: true;
71
+ };
72
+ /** Viewport size at which `layout="auto"` turns horizontal. */
73
+ export declare const STORY_THREAD_HORIZONTAL_QUERY = "(min-width: 900px) and (min-height: 520px)";
74
+ /**
75
+ * Cubic curve through `pts` with tangents flat along `axis`: each control
76
+ * point sits `tension` of the way to the neighbour along the scroll axis.
77
+ * Empty string under two points.
78
+ */
79
+ export declare function curvePath(pts: StoryThreadPoint[], axis: StoryThreadAxis, tension?: number): string;
80
+ /**
81
+ * The segments to draw: the given ones, or one through every node in
82
+ * document order. Ids that are not on the page are dropped; a segment left
83
+ * with fewer than two points is dropped too.
84
+ */
85
+ export declare function resolveSegments(segments: StoryThreadSegment[], order: string[], points: Record<string, StoryThreadPoint>): {
86
+ ids: string[];
87
+ points: StoryThreadPoint[];
88
+ color?: string;
89
+ }[];
90
+ /** A segment's extent along the scroll axis, from its first to its last point. */
91
+ export declare function segmentSpan(points: StoryThreadPoint[], axis: StoryThreadAxis): StoryThreadSpan;
92
+ /** Drawn fraction of a segment, 0..1, for the tip at `tip` along the axis. */
93
+ export declare function spanProgress(tip: number, span: StoryThreadSpan): number;
94
+ /** Where the tip is, along the axis, in track coordinates. */
95
+ export declare function tipPosition(pos: number, viewport: number, lead: number): number;
96
+ /**
97
+ * Tip of the thread in the horizontal layout. It starts `lead` of the way
98
+ * across the viewport and reaches the end of the track exactly when the pan
99
+ * does, so the last node is always drawn by the end of the story. A track
100
+ * that does not overflow is drawn whole.
101
+ */
102
+ export declare function panTip(pan: number, maxPan: number, viewportWidth: number, trackWidth: number, lead: number): number;
103
+ /** Height of the scroll spacer that lets vertical scrolling pan the whole track. */
104
+ export declare function spacerHeight(trackWidth: number, viewportWidth: number, viewportHeight: number): number;
105
+ /** Pan offset, px, for a reader who has scrolled `scrolled` px into the spacer. */
106
+ export declare function clampPan(scrolled: number, trackWidth: number, viewportWidth: number): number;
107
+ /** Scroll distance of one arrow-key press. */
108
+ export declare function keyStep(viewportWidth: number, dir: 1 | -1): number;
109
+ /** `stroke-dasharray` of the visible strokes; `null` draws a solid line. */
110
+ export declare function dashPattern(dash: StoryThreadDash): string | null;
111
+ /** Ids of the nodes the tip has passed (a node exactly at the tip counts). */
112
+ export declare function reachedIds(points: Record<string, StoryThreadPoint>, tip: number, axis: StoryThreadAxis): Set<string>;
113
+ /**
114
+ * Path length at which the curve reaches `at` along the axis, interpolated
115
+ * between samples `[length, axisCoordinate]` taken along the path. The curve
116
+ * is assumed to move forward along the axis, which it does when its nodes do.
117
+ */
118
+ export declare function lengthAtAxis(samples: [number, number][], at: number): number;
119
+ export declare function createStoryThread(root: HTMLElement, viewport: HTMLElement, track: HTMLElement, svg: SVGSVGElement, initial?: Partial<StoryThreadOptions>): StoryThreadCore;