@mova-ui/react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +46 -0
  3. package/bin/mova.mjs +84 -0
  4. package/dist/hooks/use-mouse-position.d.ts +8 -0
  5. package/dist/hooks/use-reduced-motion.d.ts +1 -0
  6. package/dist/hooks/use-scroll-progress.d.ts +2 -0
  7. package/dist/hooks/use-stagger.d.ts +7 -0
  8. package/dist/hooks/use-web-haptics.d.ts +4 -0
  9. package/dist/index.d.ts +164 -0
  10. package/dist/index.js +4032 -0
  11. package/dist/lib/presets.d.ts +32 -0
  12. package/dist/lib/utils.d.ts +3 -0
  13. package/dist/styles.css +2 -0
  14. package/dist/ui/cursor/cursor-trail.d.ts +8 -0
  15. package/dist/ui/cursor/mouse-follow.d.ts +9 -0
  16. package/dist/ui/cursor/spotlight.d.ts +9 -0
  17. package/dist/ui/entrance/fade-down.d.ts +10 -0
  18. package/dist/ui/entrance/fade-in.d.ts +9 -0
  19. package/dist/ui/entrance/fade-up.d.ts +10 -0
  20. package/dist/ui/entrance/scale-in.d.ts +10 -0
  21. package/dist/ui/entrance/slide-left.d.ts +10 -0
  22. package/dist/ui/entrance/slide-right.d.ts +10 -0
  23. package/dist/ui/entrance/zoom-in.d.ts +11 -0
  24. package/dist/ui/hover/card-hover.d.ts +13 -0
  25. package/dist/ui/hover/glow-button.d.ts +10 -0
  26. package/dist/ui/hover/magnetic-button.d.ts +10 -0
  27. package/dist/ui/hover/tilt-card.d.ts +9 -0
  28. package/dist/ui/loading/accordion-loader.d.ts +2 -0
  29. package/dist/ui/loading/app-icon-load.d.ts +2 -0
  30. package/dist/ui/loading/apple-breathe.d.ts +2 -0
  31. package/dist/ui/loading/apple-equalizer.d.ts +2 -0
  32. package/dist/ui/loading/apple-icon-morph.d.ts +2 -0
  33. package/dist/ui/loading/apple-pulse-dots.d.ts +2 -0
  34. package/dist/ui/loading/apple-scale-pulse.d.ts +2 -0
  35. package/dist/ui/loading/apple-sound-wave.d.ts +2 -0
  36. package/dist/ui/loading/apple-text-reveal.d.ts +2 -0
  37. package/dist/ui/loading/apple-unlock.d.ts +4 -0
  38. package/dist/ui/loading/arc-tracer.d.ts +2 -0
  39. package/dist/ui/loading/bar-cascade.d.ts +2 -0
  40. package/dist/ui/loading/bar-sweep.d.ts +2 -0
  41. package/dist/ui/loading/bobbing-dots.d.ts +2 -0
  42. package/dist/ui/loading/bounce-dots.d.ts +2 -0
  43. package/dist/ui/loading/bouncing-bars.d.ts +2 -0
  44. package/dist/ui/loading/bouncing-dots.d.ts +2 -0
  45. package/dist/ui/loading/bouncing-lines.d.ts +2 -0
  46. package/dist/ui/loading/bouncing-square.d.ts +2 -0
  47. package/dist/ui/loading/breathe-ring.d.ts +2 -0
  48. package/dist/ui/loading/breathing-glow.d.ts +2 -0
  49. package/dist/ui/loading/breathing-square.d.ts +2 -0
  50. package/dist/ui/loading/circular-bars.d.ts +2 -0
  51. package/dist/ui/loading/classic-spinner.d.ts +2 -0
  52. package/dist/ui/loading/clock-spinner.d.ts +2 -0
  53. package/dist/ui/loading/comet-spinner.d.ts +2 -0
  54. package/dist/ui/loading/concentric-pulse.d.ts +2 -0
  55. package/dist/ui/loading/concentric-ring.d.ts +2 -0
  56. package/dist/ui/loading/concentric-squares.d.ts +2 -0
  57. package/dist/ui/loading/conveyor-loop.d.ts +2 -0
  58. package/dist/ui/loading/cross-spinner.d.ts +2 -0
  59. package/dist/ui/loading/cube-flip-spring.d.ts +2 -0
  60. package/dist/ui/loading/dash-ring.d.ts +2 -0
  61. package/dist/ui/loading/dashed-spiral.d.ts +2 -0
  62. package/dist/ui/loading/diamond-grid.d.ts +2 -0
  63. package/dist/ui/loading/diamond-rotate-spring.d.ts +2 -0
  64. package/dist/ui/loading/dot-spinner.d.ts +2 -0
  65. package/dist/ui/loading/dots-ring.d.ts +2 -0
  66. package/dist/ui/loading/double-ring.d.ts +2 -0
  67. package/dist/ui/loading/drop-dot.d.ts +2 -0
  68. package/dist/ui/loading/dual-arc.d.ts +2 -0
  69. package/dist/ui/loading/dynamic-island.d.ts +2 -0
  70. package/dist/ui/loading/elastic-bars.d.ts +2 -0
  71. package/dist/ui/loading/elastic-square.d.ts +2 -0
  72. package/dist/ui/loading/expanding-cross.d.ts +2 -0
  73. package/dist/ui/loading/face-id-scan.d.ts +2 -0
  74. package/dist/ui/loading/fade-arc.d.ts +2 -0
  75. package/dist/ui/loading/fade-dots.d.ts +2 -0
  76. package/dist/ui/loading/flip-square.d.ts +2 -0
  77. package/dist/ui/loading/floating-diamonds.d.ts +2 -0
  78. package/dist/ui/loading/fluid-bars.d.ts +2 -0
  79. package/dist/ui/loading/fluid-diamond.d.ts +2 -0
  80. package/dist/ui/loading/fluid-dot-orbit.d.ts +2 -0
  81. package/dist/ui/loading/fluid-skeleton.d.ts +2 -0
  82. package/dist/ui/loading/gears.d.ts +2 -0
  83. package/dist/ui/loading/glassmorphic-card.d.ts +2 -0
  84. package/dist/ui/loading/gradient-arc.d.ts +2 -0
  85. package/dist/ui/loading/grid-dots.d.ts +2 -0
  86. package/dist/ui/loading/haptic-ring.d.ts +2 -0
  87. package/dist/ui/loading/heartbeat.d.ts +2 -0
  88. package/dist/ui/loading/hexagon-spinner.d.ts +2 -0
  89. package/dist/ui/loading/hourglass.d.ts +2 -0
  90. package/dist/ui/loading/infinity-path.d.ts +2 -0
  91. package/dist/ui/loading/intersecting-rings.d.ts +2 -0
  92. package/dist/ui/loading/ios-spinner.d.ts +2 -0
  93. package/dist/ui/loading/line-spinner.d.ts +2 -0
  94. package/dist/ui/loading/liquid-dots.d.ts +2 -0
  95. package/dist/ui/loading/mac-terminal.d.ts +2 -0
  96. package/dist/ui/loading/magnetic-dots.d.ts +2 -0
  97. package/dist/ui/loading/minimal-triangle.d.ts +2 -0
  98. package/dist/ui/loading/morph-dot-ring.d.ts +2 -0
  99. package/dist/ui/loading/morph-loader.d.ts +8 -0
  100. package/dist/ui/loading/morphing-bars.d.ts +2 -0
  101. package/dist/ui/loading/morphing-infinity.d.ts +2 -0
  102. package/dist/ui/loading/morphing-ring.d.ts +2 -0
  103. package/dist/ui/loading/morphing-shape.d.ts +2 -0
  104. package/dist/ui/loading/newtons-cradle.d.ts +2 -0
  105. package/dist/ui/loading/offset-rings.d.ts +2 -0
  106. package/dist/ui/loading/orbiting-circles.d.ts +2 -0
  107. package/dist/ui/loading/orbiting-dot.d.ts +2 -0
  108. package/dist/ui/loading/origami-shape.d.ts +2 -0
  109. package/dist/ui/loading/pendulum.d.ts +2 -0
  110. package/dist/ui/loading/pulsating-dots.d.ts +2 -0
  111. package/dist/ui/loading/pulse-dot.d.ts +2 -0
  112. package/dist/ui/loading/pulse-dots.d.ts +2 -0
  113. package/dist/ui/loading/pulse-square.d.ts +2 -0
  114. package/dist/ui/loading/pulse.d.ts +8 -0
  115. package/dist/ui/loading/pumping-heart.d.ts +2 -0
  116. package/dist/ui/loading/radar-sweep.d.ts +4 -0
  117. package/dist/ui/loading/ring-sweep.d.ts +2 -0
  118. package/dist/ui/loading/ripple-effect.d.ts +2 -0
  119. package/dist/ui/loading/rotating-cross.d.ts +2 -0
  120. package/dist/ui/loading/rotating-triangle.d.ts +2 -0
  121. package/dist/ui/loading/shape-shift-grid.d.ts +2 -0
  122. package/dist/ui/loading/shimmer-line.d.ts +2 -0
  123. package/dist/ui/loading/siri-wave.d.ts +2 -0
  124. package/dist/ui/loading/skeleton-loader.d.ts +2 -0
  125. package/dist/ui/loading/skeleton.d.ts +7 -0
  126. package/dist/ui/loading/sliding-bars.d.ts +2 -0
  127. package/dist/ui/loading/smooth-dot-shift.d.ts +2 -0
  128. package/dist/ui/loading/smooth-ring.d.ts +2 -0
  129. package/dist/ui/loading/smooth-rounded-square.d.ts +2 -0
  130. package/dist/ui/loading/spinning-squares.d.ts +2 -0
  131. package/dist/ui/loading/spiral-spinner.d.ts +2 -0
  132. package/dist/ui/loading/spring-bars.d.ts +2 -0
  133. package/dist/ui/loading/spring-dot-matrix.d.ts +2 -0
  134. package/dist/ui/loading/spring-hexagon.d.ts +2 -0
  135. package/dist/ui/loading/spring-ring-expand.d.ts +2 -0
  136. package/dist/ui/loading/spring-text-pop.d.ts +2 -0
  137. package/dist/ui/loading/square-accordion.d.ts +2 -0
  138. package/dist/ui/loading/square-grid.d.ts +2 -0
  139. package/dist/ui/loading/square-snake.d.ts +2 -0
  140. package/dist/ui/loading/square-spinner.d.ts +2 -0
  141. package/dist/ui/loading/stacked-bar-pulse.d.ts +2 -0
  142. package/dist/ui/loading/swapping-dots.d.ts +2 -0
  143. package/dist/ui/loading/swirling-spinner.d.ts +2 -0
  144. package/dist/ui/loading/symmetric-wave.d.ts +2 -0
  145. package/dist/ui/loading/terminal-loader.d.ts +2 -0
  146. package/dist/ui/loading/text-blink.d.ts +2 -0
  147. package/dist/ui/loading/text-dots.d.ts +2 -0
  148. package/dist/ui/loading/text-morph.d.ts +2 -0
  149. package/dist/ui/loading/text-shimmer-wave.d.ts +2 -0
  150. package/dist/ui/loading/text-shimmer.d.ts +2 -0
  151. package/dist/ui/loading/trailing-dots.d.ts +2 -0
  152. package/dist/ui/loading/triple-dot-spinner.d.ts +2 -0
  153. package/dist/ui/loading/twin-orbit.d.ts +2 -0
  154. package/dist/ui/loading/typing-indicator.d.ts +2 -0
  155. package/dist/ui/loading/typing.d.ts +2 -0
  156. package/dist/ui/loading/wandering-cube.d.ts +2 -0
  157. package/dist/ui/loading/watch-spinner.d.ts +2 -0
  158. package/dist/ui/loading/wave-dots.d.ts +2 -0
  159. package/dist/ui/loading/wave-physics-loader.d.ts +3 -0
  160. package/dist/ui/loading/waveform-loader.d.ts +2 -0
  161. package/dist/ui/loading/zig-zag-pulse.d.ts +2 -0
  162. package/dist/ui/scroll/progress-indicator.d.ts +8 -0
  163. package/dist/ui/scroll/scroll-reveal.d.ts +11 -0
  164. package/dist/ui/scroll/sticky-reveal.d.ts +11 -0
  165. package/dist/ui/text/blur-text.d.ts +10 -0
  166. package/dist/ui/text/character-stagger.d.ts +10 -0
  167. package/dist/ui/text/text-reveal.d.ts +9 -0
  168. package/dist/ui/text/word-reveal.d.ts +9 -0
  169. package/dist/ui/toggles/classic-toggle.d.ts +2 -0
  170. package/dist/ui/transitions/page-transition.d.ts +9 -0
  171. package/package.json +27 -0
  172. package/registry/accordion-loader.json +8 -0
  173. package/registry/app-icon-load.json +8 -0
  174. package/registry/apple-breathe.json +8 -0
  175. package/registry/apple-equalizer.json +8 -0
  176. package/registry/apple-icon-morph.json +8 -0
  177. package/registry/apple-pulse-dots.json +8 -0
  178. package/registry/apple-scale-pulse.json +8 -0
  179. package/registry/apple-sound-wave.json +8 -0
  180. package/registry/apple-text-reveal.json +8 -0
  181. package/registry/apple-unlock.json +8 -0
  182. package/registry/arc-tracer.json +8 -0
  183. package/registry/bar-cascade.json +8 -0
  184. package/registry/bar-sweep.json +8 -0
  185. package/registry/blur-text.json +8 -0
  186. package/registry/bobbing-dots.json +8 -0
  187. package/registry/bounce-dots.json +8 -0
  188. package/registry/bouncing-bars.json +8 -0
  189. package/registry/bouncing-dots.json +8 -0
  190. package/registry/bouncing-lines.json +8 -0
  191. package/registry/bouncing-square.json +8 -0
  192. package/registry/breathe-ring.json +8 -0
  193. package/registry/breathing-glow.json +8 -0
  194. package/registry/breathing-square.json +8 -0
  195. package/registry/card-hover.json +8 -0
  196. package/registry/character-stagger.json +8 -0
  197. package/registry/circular-bars.json +8 -0
  198. package/registry/classic-spinner.json +8 -0
  199. package/registry/classic-toggle.json +8 -0
  200. package/registry/clock-spinner.json +8 -0
  201. package/registry/comet-spinner.json +8 -0
  202. package/registry/concentric-pulse.json +8 -0
  203. package/registry/concentric-ring.json +8 -0
  204. package/registry/concentric-squares.json +8 -0
  205. package/registry/conveyor-loop.json +8 -0
  206. package/registry/cross-spinner.json +8 -0
  207. package/registry/cube-flip-spring.json +8 -0
  208. package/registry/cursor-trail.json +8 -0
  209. package/registry/dash-ring.json +8 -0
  210. package/registry/dashed-spiral.json +8 -0
  211. package/registry/diamond-grid.json +8 -0
  212. package/registry/diamond-rotate-spring.json +8 -0
  213. package/registry/dot-spinner.json +8 -0
  214. package/registry/dots-ring.json +8 -0
  215. package/registry/double-ring.json +8 -0
  216. package/registry/drop-dot.json +8 -0
  217. package/registry/dual-arc.json +8 -0
  218. package/registry/dynamic-island.json +8 -0
  219. package/registry/elastic-bars.json +8 -0
  220. package/registry/elastic-square.json +8 -0
  221. package/registry/expanding-cross.json +8 -0
  222. package/registry/face-id-scan.json +8 -0
  223. package/registry/fade-arc.json +6 -0
  224. package/registry/fade-dots.json +8 -0
  225. package/registry/fade-down.json +8 -0
  226. package/registry/fade-in.json +8 -0
  227. package/registry/fade-up.json +8 -0
  228. package/registry/flip-square.json +8 -0
  229. package/registry/floating-diamonds.json +8 -0
  230. package/registry/fluid-bars.json +8 -0
  231. package/registry/fluid-diamond.json +8 -0
  232. package/registry/fluid-dot-orbit.json +8 -0
  233. package/registry/fluid-skeleton.json +8 -0
  234. package/registry/gears.json +8 -0
  235. package/registry/glassmorphic-card.json +8 -0
  236. package/registry/glow-button.json +8 -0
  237. package/registry/gradient-arc.json +8 -0
  238. package/registry/grid-dots.json +8 -0
  239. package/registry/haptic-ring.json +8 -0
  240. package/registry/heartbeat.json +8 -0
  241. package/registry/hexagon-spinner.json +8 -0
  242. package/registry/hourglass.json +8 -0
  243. package/registry/infinity-path.json +8 -0
  244. package/registry/intersecting-rings.json +8 -0
  245. package/registry/ios-spinner.json +8 -0
  246. package/registry/line-spinner.json +8 -0
  247. package/registry/liquid-dots.json +8 -0
  248. package/registry/mac-terminal.json +8 -0
  249. package/registry/magnetic-button.json +8 -0
  250. package/registry/magnetic-dots.json +8 -0
  251. package/registry/minimal-triangle.json +8 -0
  252. package/registry/morph-dot-ring.json +8 -0
  253. package/registry/morph-loader.json +8 -0
  254. package/registry/morphing-bars.json +8 -0
  255. package/registry/morphing-infinity.json +8 -0
  256. package/registry/morphing-ring.json +8 -0
  257. package/registry/morphing-shape.json +8 -0
  258. package/registry/mouse-follow.json +8 -0
  259. package/registry/newtons-cradle.json +8 -0
  260. package/registry/offset-rings.json +8 -0
  261. package/registry/orbiting-circles.json +8 -0
  262. package/registry/orbiting-dot.json +8 -0
  263. package/registry/origami-shape.json +8 -0
  264. package/registry/page-transition.json +8 -0
  265. package/registry/pendulum.json +8 -0
  266. package/registry/presets.json +6 -0
  267. package/registry/progress-indicator.json +8 -0
  268. package/registry/pulsating-dots.json +8 -0
  269. package/registry/pulse-dot.json +8 -0
  270. package/registry/pulse-dots.json +8 -0
  271. package/registry/pulse-square.json +8 -0
  272. package/registry/pulse.json +8 -0
  273. package/registry/pumping-heart.json +8 -0
  274. package/registry/radar-sweep.json +8 -0
  275. package/registry/ring-sweep.json +8 -0
  276. package/registry/ripple-effect.json +8 -0
  277. package/registry/rotating-cross.json +8 -0
  278. package/registry/rotating-triangle.json +8 -0
  279. package/registry/scale-in.json +8 -0
  280. package/registry/scroll-reveal.json +8 -0
  281. package/registry/shape-shift-grid.json +8 -0
  282. package/registry/shimmer-line.json +8 -0
  283. package/registry/siri-wave.json +8 -0
  284. package/registry/skeleton-loader.json +8 -0
  285. package/registry/skeleton.json +8 -0
  286. package/registry/slide-left.json +8 -0
  287. package/registry/slide-right.json +8 -0
  288. package/registry/sliding-bars.json +8 -0
  289. package/registry/smooth-dot-shift.json +8 -0
  290. package/registry/smooth-ring.json +6 -0
  291. package/registry/smooth-rounded-square.json +8 -0
  292. package/registry/spinning-squares.json +8 -0
  293. package/registry/spiral-spinner.json +8 -0
  294. package/registry/spotlight.json +8 -0
  295. package/registry/spring-bars.json +8 -0
  296. package/registry/spring-dot-matrix.json +8 -0
  297. package/registry/spring-hexagon.json +8 -0
  298. package/registry/spring-ring-expand.json +8 -0
  299. package/registry/spring-text-pop.json +8 -0
  300. package/registry/square-accordion.json +8 -0
  301. package/registry/square-grid.json +8 -0
  302. package/registry/square-snake.json +8 -0
  303. package/registry/square-spinner.json +8 -0
  304. package/registry/stacked-bar-pulse.json +8 -0
  305. package/registry/sticky-reveal.json +8 -0
  306. package/registry/swapping-dots.json +8 -0
  307. package/registry/swirling-spinner.json +8 -0
  308. package/registry/symmetric-wave.json +8 -0
  309. package/registry/terminal-loader.json +8 -0
  310. package/registry/text-blink.json +8 -0
  311. package/registry/text-dots.json +8 -0
  312. package/registry/text-morph.json +8 -0
  313. package/registry/text-reveal.json +8 -0
  314. package/registry/text-shimmer-wave.json +8 -0
  315. package/registry/text-shimmer.json +8 -0
  316. package/registry/tilt-card.json +8 -0
  317. package/registry/trailing-dots.json +8 -0
  318. package/registry/triple-dot-spinner.json +8 -0
  319. package/registry/twin-orbit.json +8 -0
  320. package/registry/typing-indicator.json +8 -0
  321. package/registry/typing.json +8 -0
  322. package/registry/use-mouse-position.json +6 -0
  323. package/registry/use-reduced-motion.json +6 -0
  324. package/registry/use-scroll-progress.json +6 -0
  325. package/registry/use-stagger.json +6 -0
  326. package/registry/use-web-haptics.json +6 -0
  327. package/registry/utils.json +9 -0
  328. package/registry/wandering-cube.json +8 -0
  329. package/registry/watch-spinner.json +8 -0
  330. package/registry/wave-dots.json +8 -0
  331. package/registry/wave-physics-loader.json +8 -0
  332. package/registry/waveform-loader.json +8 -0
  333. package/registry/word-reveal.json +8 -0
  334. package/registry/zig-zag-pulse.json +8 -0
  335. package/registry/zoom-in.json +8 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SYED SUBHAN UDDIN
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @mova-ui/react
2
+
3
+ **Make interfaces feel alive.**
4
+
5
+ Reusable React animation components and an offline, copy-source CLI. Documentation: https://mova.zeeland.studio
6
+
7
+ ## Use as a React library
8
+
9
+ ```sh
10
+ npm install @mova-ui/react react react-dom
11
+ ```
12
+
13
+ ```tsx
14
+ 'use client';
15
+ import { FadeIn, GlowButton, ClassicSpinner } from '@mova-ui/react';
16
+ import '@mova-ui/react/styles.css';
17
+
18
+ export function Example() {
19
+ return <FadeIn><GlowButton>Continue</GlowButton><ClassicSpinner /></FadeIn>;
20
+ }
21
+ ```
22
+
23
+ ESM with TypeScript declarations. React 18.2+ or 19; Node 20+ for the CLI. Animation and class utility dependencies are installed automatically. Bundlers can tree-shake unused exports. The library entry is marked `use client` for React Server Component frameworks.
24
+
25
+ The exported CSS contains the bundled components' Tailwind utility classes and theme tokens, **not** the website stylesheet or Tailwind preflight. Import it once; Tailwind is not required for the supplied styles. Its utility class names are global: applications that already use Tailwind may instead scan their installed package's JS or copied source using their own Tailwind configuration. Custom `className` values require your own CSS. Components include upstream demo defaults; check individual props before use. Motion accessibility behavior varies by component; applications should configure reduced-motion preferences and test accessibility for their use case.
26
+
27
+ ## Copy editable source
28
+
29
+ Run from a project root containing `package.json`:
30
+
31
+ ```sh
32
+ npx @mova-ui/react --help
33
+ npx @mova-ui/react list
34
+ npx @mova-ui/react add glow-button
35
+ npx @mova-ui/react add fade-in --dir src/components/mova
36
+ ```
37
+
38
+ The CLI copies TypeScript source, compiled `styles.css`, and `LICENSE.mova` to `src/components/mova` by default. It prints required dependencies (for example `npm install framer-motion`) but never installs packages, downloads component code, or edits project configuration. Import the copied CSS once, e.g. `import './components/mova/styles.css'` from `src/App.tsx`. Source uses React and, where needed, `framer-motion`, `clsx`, and `tailwind-merge`.
39
+
40
+ Existing files are protected. Use `--overwrite` only when you intend to replace them. Identical shared CSS/license files can be reused when adding another component. Absolute paths, parent traversal, symlink targets, Git metadata, and `node_modules` destinations are refused. This is a local developer tool, not a sandbox against another process concurrently mutating your project's directories.
41
+
42
+ `list` enumerates all packaged IDs, including loaders, text/entrance/hover/scroll/cursor effects, the page transition, a toggle, hooks, and utilities. The package is generated from the original reusable registry, not the documentation application; website-only chart/demo pages are not exported.
43
+
44
+ ## License and attribution
45
+
46
+ MIT. Derived from Amicro by SYED SUBHAN UDDIN. The original copyright and complete license are retained in `LICENSE` and in source installations. Mova packaging, CLI, and compatibility adjustments preserve that attribution.
package/bin/mova.mjs ADDED
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+ import { readdirSync, readFileSync, writeFileSync, lstatSync, realpathSync, mkdirSync, renameSync, unlinkSync, constants, openSync, closeSync } from 'node:fs';
3
+ import { resolve, dirname, join, isAbsolute, relative, sep } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { randomUUID } from 'node:crypto';
6
+ const pkg = resolve(dirname(fileURLToPath(import.meta.url)), '..');
7
+ const help = `Mova — Make interfaces feel alive.
8
+
9
+ Usage:
10
+ npx @mova-ui/react list
11
+ npx @mova-ui/react add <id> [--dir src/components/mova] [--overwrite]
12
+ npx @mova-ui/react --help
13
+
14
+ Run add from your project root (must contain package.json).
15
+ Copies bundled TypeScript source, compiled styles.css and the MIT license.
16
+ No downloads, package installation or project configuration changes are made.
17
+ Import the copied styles.css once in your app. Required dependencies are printed.
18
+ --dir must be a relative directory inside this project; symlinks are refused.
19
+ --overwrite explicitly replaces existing regular files (never symlinks).
20
+ `;
21
+ function stat(path) { try { return lstatSync(path); } catch (e) { if(e.code === 'ENOENT') return null; throw e; } }
22
+ function safePath(root, path) {
23
+ const rel = relative(root, path);
24
+ if (!rel || rel === '..' || rel.startsWith(`..${sep}`) || isAbsolute(rel)) throw new Error('Target must be inside this project');
25
+ let current = root;
26
+ const parts = rel.split(sep);
27
+ for (let i=0; i<parts.length; i++) {
28
+ current = join(current, parts[i]); const s = stat(current);
29
+ if (s?.isSymbolicLink()) throw new Error('Symlink targets are not allowed');
30
+ if (s && i < parts.length-1 && !s.isDirectory()) throw new Error('Target parent is not a directory');
31
+ if (s && i === parts.length-1 && !s.isFile()) throw new Error('Target is not a regular file');
32
+ }
33
+ }
34
+ function main(args) {
35
+ if (!args.length || (args.length === 1 && ['--help','-h'].includes(args[0]))) { console.log(help); return; }
36
+ if (args[0] === 'list' && args.length === 1) {
37
+ console.log(readdirSync(join(pkg, 'registry')).filter(f => f.endsWith('.json')).map(f => f.slice(0,-5)).sort().join('\n')); return;
38
+ }
39
+ if (args[0] !== 'add' || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(args[1] ?? '')) throw new Error('Use add <id>, list, or --help');
40
+ const id = args[1]; let dir = 'src/components/mova'; let overwrite = false;
41
+ for (let i=2;i<args.length;i++) {
42
+ if (args[i] === '--overwrite' && !overwrite) overwrite = true;
43
+ else if (args[i] === '--dir' && args[i+1] && !args[i+1].startsWith('--')) dir = args[++i];
44
+ else throw new Error(`Unknown or incomplete option: ${args[i]}`);
45
+ }
46
+ if (!dir || isAbsolute(dir) || dir.includes('\\') || dir.includes(':') || dir.split('/').some(p => p === '..' || p.startsWith('.git') || p === 'node_modules')) throw new Error('Directory must be a relative path inside this project');
47
+ const root = realpathSync(process.cwd());
48
+ if (!stat(join(root, 'package.json'))?.isFile()) throw new Error('Run add from a project root containing package.json');
49
+ JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
50
+ const registryFile = join(pkg, 'registry', `${id}.json`);
51
+ if (!stat(registryFile)?.isFile()) throw new Error(`Unknown component: ${id}. Run npx @mova-ui/react list`);
52
+ const item = JSON.parse(readFileSync(registryFile, 'utf8'));
53
+ if (!/^[a-z0-9-]+\.tsx?$/.test(item.file) || typeof item.content !== 'string') throw new Error('Invalid bundled registry entry');
54
+ const out = resolve(root, dir);
55
+ const files = [
56
+ { name: item.file, content: item.content },
57
+ { name: 'styles.css', content: readFileSync(join(pkg, 'dist/styles.css'), 'utf8') },
58
+ { name: 'LICENSE.mova', content: readFileSync(join(pkg, 'LICENSE'), 'utf8') }
59
+ ].map(f => ({...f, path: join(out, f.name)}));
60
+ // Preflight the entire operation before creating directories or replacing files.
61
+ for (const f of files) {
62
+ safePath(root, f.path);
63
+ const exists = stat(f.path);
64
+ f.skip = exists && f.name !== item.file && readFileSync(f.path, 'utf8') === f.content;
65
+ if (exists && !f.skip && !overwrite) throw new Error(`${relative(root, f.path)} already exists; use --overwrite to replace it`);
66
+ }
67
+ for (const f of files.filter(f => !f.skip)) {
68
+ mkdirSync(dirname(f.path), { recursive: true });
69
+ safePath(root, f.path);
70
+ if (!overwrite) {
71
+ const fd = openSync(f.path, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o644);
72
+ try { writeFileSync(fd, f.content); } finally { closeSync(fd); }
73
+ } else {
74
+ // Rename a new inode instead of following existing symlinks or hardlinks.
75
+ const temp = join(out, `.mova-${randomUUID()}.tmp`);
76
+ try { writeFileSync(temp, f.content, {flag:'wx',mode:0o644}); safePath(root, f.path); renameSync(temp, f.path); }
77
+ finally { if(stat(temp)) unlinkSync(temp); }
78
+ }
79
+ }
80
+ console.log(`Added ${id} to ${dir}\nImport '${dir}/styles.css' once in your app (adjust the relative import).`);
81
+ if (item.dependencies.length) console.log(`Dependencies: npm install ${item.dependencies.join(' ')}`);
82
+ console.log('Requires React 18.2+ or 19 and React DOM. MIT attribution is in LICENSE.mova.');
83
+ }
84
+ try { main(process.argv.slice(2)); } catch (error) { console.error(`Mova: ${error.message}`); process.exitCode = 1; }
@@ -0,0 +1,8 @@
1
+ import { RefObject } from 'react';
2
+ export interface MousePosition {
3
+ x: number;
4
+ y: number;
5
+ elementX: number;
6
+ elementY: number;
7
+ }
8
+ export declare function useMousePosition(ref?: RefObject<HTMLElement | null>): MousePosition;
@@ -0,0 +1 @@
1
+ export declare function useReducedMotion(): boolean;
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare function useScrollProgress(ref?: RefObject<HTMLElement | null>): number;
@@ -0,0 +1,7 @@
1
+ interface StaggerOptions {
2
+ baseDelay?: number;
3
+ staggerDelay?: number;
4
+ from?: 'first' | 'last' | 'center' | number;
5
+ }
6
+ export declare function useStagger(count: number, options?: StaggerOptions): number[];
7
+ export {};
@@ -0,0 +1,4 @@
1
+ export type HapticsType = 'light' | 'medium' | 'heavy' | 'success' | 'warning' | 'error';
2
+ export declare function useWebHaptics(): {
3
+ trigger: (type?: HapticsType) => boolean;
4
+ };
@@ -0,0 +1,164 @@
1
+ export * from './hooks/use-mouse-position.js';
2
+ export * from './hooks/use-reduced-motion.js';
3
+ export * from './hooks/use-scroll-progress.js';
4
+ export * from './hooks/use-stagger.js';
5
+ export * from './hooks/use-web-haptics.js';
6
+ export * from './lib/presets.js';
7
+ export * from './lib/utils.js';
8
+ export * from './ui/cursor/cursor-trail.js';
9
+ export * from './ui/cursor/mouse-follow.js';
10
+ export * from './ui/cursor/spotlight.js';
11
+ export * from './ui/entrance/fade-down.js';
12
+ export * from './ui/entrance/fade-in.js';
13
+ export * from './ui/entrance/fade-up.js';
14
+ export * from './ui/entrance/scale-in.js';
15
+ export * from './ui/entrance/slide-left.js';
16
+ export * from './ui/entrance/slide-right.js';
17
+ export * from './ui/entrance/zoom-in.js';
18
+ export * from './ui/hover/card-hover.js';
19
+ export * from './ui/hover/glow-button.js';
20
+ export * from './ui/hover/magnetic-button.js';
21
+ export * from './ui/hover/tilt-card.js';
22
+ export * from './ui/loading/accordion-loader.js';
23
+ export * from './ui/loading/app-icon-load.js';
24
+ export * from './ui/loading/apple-breathe.js';
25
+ export * from './ui/loading/apple-equalizer.js';
26
+ export * from './ui/loading/apple-icon-morph.js';
27
+ export * from './ui/loading/apple-pulse-dots.js';
28
+ export * from './ui/loading/apple-scale-pulse.js';
29
+ export * from './ui/loading/apple-sound-wave.js';
30
+ export * from './ui/loading/apple-text-reveal.js';
31
+ export * from './ui/loading/apple-unlock.js';
32
+ export * from './ui/loading/arc-tracer.js';
33
+ export * from './ui/loading/bar-cascade.js';
34
+ export * from './ui/loading/bar-sweep.js';
35
+ export * from './ui/loading/bobbing-dots.js';
36
+ export * from './ui/loading/bounce-dots.js';
37
+ export * from './ui/loading/bouncing-bars.js';
38
+ export * from './ui/loading/bouncing-dots.js';
39
+ export * from './ui/loading/bouncing-lines.js';
40
+ export * from './ui/loading/bouncing-square.js';
41
+ export * from './ui/loading/breathe-ring.js';
42
+ export * from './ui/loading/breathing-glow.js';
43
+ export * from './ui/loading/breathing-square.js';
44
+ export * from './ui/loading/circular-bars.js';
45
+ export * from './ui/loading/classic-spinner.js';
46
+ export * from './ui/loading/clock-spinner.js';
47
+ export * from './ui/loading/comet-spinner.js';
48
+ export * from './ui/loading/concentric-pulse.js';
49
+ export * from './ui/loading/concentric-ring.js';
50
+ export * from './ui/loading/concentric-squares.js';
51
+ export * from './ui/loading/conveyor-loop.js';
52
+ export * from './ui/loading/cross-spinner.js';
53
+ export * from './ui/loading/cube-flip-spring.js';
54
+ export * from './ui/loading/dash-ring.js';
55
+ export * from './ui/loading/dashed-spiral.js';
56
+ export * from './ui/loading/diamond-grid.js';
57
+ export * from './ui/loading/diamond-rotate-spring.js';
58
+ export * from './ui/loading/dot-spinner.js';
59
+ export * from './ui/loading/dots-ring.js';
60
+ export * from './ui/loading/double-ring.js';
61
+ export * from './ui/loading/drop-dot.js';
62
+ export * from './ui/loading/dual-arc.js';
63
+ export * from './ui/loading/dynamic-island.js';
64
+ export * from './ui/loading/elastic-bars.js';
65
+ export * from './ui/loading/elastic-square.js';
66
+ export * from './ui/loading/expanding-cross.js';
67
+ export * from './ui/loading/face-id-scan.js';
68
+ export * from './ui/loading/fade-arc.js';
69
+ export * from './ui/loading/fade-dots.js';
70
+ export * from './ui/loading/flip-square.js';
71
+ export * from './ui/loading/floating-diamonds.js';
72
+ export * from './ui/loading/fluid-bars.js';
73
+ export * from './ui/loading/fluid-diamond.js';
74
+ export * from './ui/loading/fluid-dot-orbit.js';
75
+ export * from './ui/loading/fluid-skeleton.js';
76
+ export * from './ui/loading/gears.js';
77
+ export * from './ui/loading/glassmorphic-card.js';
78
+ export * from './ui/loading/gradient-arc.js';
79
+ export * from './ui/loading/grid-dots.js';
80
+ export * from './ui/loading/haptic-ring.js';
81
+ export * from './ui/loading/heartbeat.js';
82
+ export * from './ui/loading/hexagon-spinner.js';
83
+ export * from './ui/loading/hourglass.js';
84
+ export * from './ui/loading/infinity-path.js';
85
+ export * from './ui/loading/intersecting-rings.js';
86
+ export * from './ui/loading/ios-spinner.js';
87
+ export * from './ui/loading/line-spinner.js';
88
+ export * from './ui/loading/liquid-dots.js';
89
+ export * from './ui/loading/mac-terminal.js';
90
+ export * from './ui/loading/magnetic-dots.js';
91
+ export * from './ui/loading/minimal-triangle.js';
92
+ export * from './ui/loading/morph-dot-ring.js';
93
+ export * from './ui/loading/morph-loader.js';
94
+ export * from './ui/loading/morphing-bars.js';
95
+ export * from './ui/loading/morphing-infinity.js';
96
+ export * from './ui/loading/morphing-ring.js';
97
+ export * from './ui/loading/morphing-shape.js';
98
+ export * from './ui/loading/newtons-cradle.js';
99
+ export * from './ui/loading/offset-rings.js';
100
+ export * from './ui/loading/orbiting-circles.js';
101
+ export * from './ui/loading/orbiting-dot.js';
102
+ export * from './ui/loading/origami-shape.js';
103
+ export * from './ui/loading/pendulum.js';
104
+ export * from './ui/loading/pulsating-dots.js';
105
+ export * from './ui/loading/pulse-dot.js';
106
+ export * from './ui/loading/pulse-dots.js';
107
+ export * from './ui/loading/pulse-square.js';
108
+ export * from './ui/loading/pulse.js';
109
+ export * from './ui/loading/pumping-heart.js';
110
+ export * from './ui/loading/radar-sweep.js';
111
+ export * from './ui/loading/ring-sweep.js';
112
+ export * from './ui/loading/ripple-effect.js';
113
+ export * from './ui/loading/rotating-cross.js';
114
+ export * from './ui/loading/rotating-triangle.js';
115
+ export * from './ui/loading/shape-shift-grid.js';
116
+ export * from './ui/loading/shimmer-line.js';
117
+ export * from './ui/loading/siri-wave.js';
118
+ export * from './ui/loading/skeleton-loader.js';
119
+ export * from './ui/loading/skeleton.js';
120
+ export * from './ui/loading/sliding-bars.js';
121
+ export * from './ui/loading/smooth-dot-shift.js';
122
+ export * from './ui/loading/smooth-ring.js';
123
+ export * from './ui/loading/smooth-rounded-square.js';
124
+ export * from './ui/loading/spinning-squares.js';
125
+ export * from './ui/loading/spiral-spinner.js';
126
+ export * from './ui/loading/spring-bars.js';
127
+ export * from './ui/loading/spring-dot-matrix.js';
128
+ export * from './ui/loading/spring-hexagon.js';
129
+ export * from './ui/loading/spring-ring-expand.js';
130
+ export * from './ui/loading/spring-text-pop.js';
131
+ export * from './ui/loading/square-accordion.js';
132
+ export * from './ui/loading/square-grid.js';
133
+ export * from './ui/loading/square-snake.js';
134
+ export * from './ui/loading/square-spinner.js';
135
+ export * from './ui/loading/stacked-bar-pulse.js';
136
+ export * from './ui/loading/swapping-dots.js';
137
+ export * from './ui/loading/swirling-spinner.js';
138
+ export * from './ui/loading/symmetric-wave.js';
139
+ export * from './ui/loading/terminal-loader.js';
140
+ export * from './ui/loading/text-blink.js';
141
+ export * from './ui/loading/text-dots.js';
142
+ export * from './ui/loading/text-morph.js';
143
+ export * from './ui/loading/text-shimmer-wave.js';
144
+ export * from './ui/loading/text-shimmer.js';
145
+ export * from './ui/loading/trailing-dots.js';
146
+ export * from './ui/loading/triple-dot-spinner.js';
147
+ export * from './ui/loading/twin-orbit.js';
148
+ export * from './ui/loading/typing-indicator.js';
149
+ export * from './ui/loading/typing.js';
150
+ export * from './ui/loading/wandering-cube.js';
151
+ export * from './ui/loading/watch-spinner.js';
152
+ export * from './ui/loading/wave-dots.js';
153
+ export * from './ui/loading/wave-physics-loader.js';
154
+ export * from './ui/loading/waveform-loader.js';
155
+ export * from './ui/loading/zig-zag-pulse.js';
156
+ export * from './ui/scroll/progress-indicator.js';
157
+ export * from './ui/scroll/scroll-reveal.js';
158
+ export * from './ui/scroll/sticky-reveal.js';
159
+ export * from './ui/text/blur-text.js';
160
+ export * from './ui/text/character-stagger.js';
161
+ export * from './ui/text/text-reveal.js';
162
+ export * from './ui/text/word-reveal.js';
163
+ export * from './ui/toggles/classic-toggle.js';
164
+ export * from './ui/transitions/page-transition.js';