motion-cart 0.1.0 → 0.1.5

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 (194) hide show
  1. package/README.md +33 -2
  2. package/dist/index.js +553 -257
  3. package/package.json +2 -2
  4. package/previews/advanced-interactions__add-to-cart.jpg +0 -0
  5. package/previews/advanced-interactions__add-to-cart.webm +0 -0
  6. package/previews/advanced-interactions__context-menu.jpg +0 -0
  7. package/previews/advanced-interactions__context-menu.webm +0 -0
  8. package/previews/advanced-interactions__cursor-image-hover.jpg +0 -0
  9. package/previews/advanced-interactions__cursor-image-hover.webm +0 -0
  10. package/previews/advanced-interactions__dots-morph-button.jpg +0 -0
  11. package/previews/advanced-interactions__dots-morph-button.webm +0 -0
  12. package/previews/advanced-interactions__ios-exposure-slider.jpg +0 -0
  13. package/previews/advanced-interactions__ios-exposure-slider.webm +0 -0
  14. package/previews/advanced-interactions__ios-pointer.jpg +0 -0
  15. package/previews/advanced-interactions__ios-pointer.webm +0 -0
  16. package/previews/advanced-interactions__magnetic-filings.jpg +0 -0
  17. package/previews/advanced-interactions__magnetic-filings.webm +0 -0
  18. package/previews/advanced-interactions__parallax-hover-card.jpg +0 -0
  19. package/previews/advanced-interactions__parallax-hover-card.webm +0 -0
  20. package/previews/advanced-interactions__pointer-collision.jpg +0 -0
  21. package/previews/advanced-interactions__pointer-collision.webm +0 -0
  22. package/previews/advanced-interactions__scroll-velocity-3d-planes.jpg +0 -0
  23. package/previews/advanced-interactions__scroll-velocity-3d-planes.webm +0 -0
  24. package/previews/advanced-interactions__smooth-tabs.jpg +0 -0
  25. package/previews/advanced-interactions__smooth-tabs.webm +0 -0
  26. package/previews/advanced-interactions__swipe-actions.jpg +0 -0
  27. package/previews/advanced-interactions__swipe-actions.webm +0 -0
  28. package/previews/cursor-effects__click-ripples.jpg +0 -0
  29. package/previews/cursor-effects__click-ripples.webm +0 -0
  30. package/previews/cursor-effects__cursor-distortion.jpg +0 -0
  31. package/previews/cursor-effects__cursor-distortion.webm +0 -0
  32. package/previews/cursor-effects__cursor-follower.jpg +0 -0
  33. package/previews/cursor-effects__cursor-follower.webm +0 -0
  34. package/previews/cursor-effects__cursor-spotlight.jpg +0 -0
  35. package/previews/cursor-effects__cursor-spotlight.webm +0 -0
  36. package/previews/cursor-effects__magnetic-elements.jpg +0 -0
  37. package/previews/cursor-effects__magnetic-elements.webm +0 -0
  38. package/previews/cursor-effects__particle-trail.jpg +0 -0
  39. package/previews/cursor-effects__particle-trail.webm +0 -0
  40. package/previews/data-numbers__activity-feed.jpg +0 -0
  41. package/previews/data-numbers__activity-feed.webm +0 -0
  42. package/previews/data-numbers__animated-counter.jpg +0 -0
  43. package/previews/data-numbers__animated-counter.webm +0 -0
  44. package/previews/data-numbers__counting-stats-row.jpg +0 -0
  45. package/previews/data-numbers__counting-stats-row.webm +0 -0
  46. package/previews/data-numbers__mini-bar-chart.jpg +0 -0
  47. package/previews/data-numbers__mini-bar-chart.webm +0 -0
  48. package/previews/data-numbers__revenue-card.jpg +0 -0
  49. package/previews/data-numbers__revenue-card.webm +0 -0
  50. package/previews/data-numbers__stats-grid.jpg +0 -0
  51. package/previews/data-numbers__stats-grid.webm +0 -0
  52. package/previews/gestures-interactions__hover-cards.jpg +0 -0
  53. package/previews/gestures-interactions__hover-cards.webm +0 -0
  54. package/previews/gestures-interactions__magnetic-button.jpg +0 -0
  55. package/previews/gestures-interactions__magnetic-button.webm +0 -0
  56. package/previews/gestures-interactions__swipe-to-delete.jpg +0 -0
  57. package/previews/gestures-interactions__swipe-to-delete.webm +0 -0
  58. package/previews/layout-navigation__animated-sidebar.jpg +0 -0
  59. package/previews/layout-navigation__animated-sidebar.webm +0 -0
  60. package/previews/layout-navigation__animated-tabs.jpg +0 -0
  61. package/previews/layout-navigation__animated-tabs.webm +0 -0
  62. package/previews/layout-navigation__expandable-cards.jpg +0 -0
  63. package/previews/layout-navigation__expandable-cards.webm +0 -0
  64. package/previews/layout-navigation__page-transitions.jpg +0 -0
  65. package/previews/layout-navigation__page-transitions.webm +0 -0
  66. package/previews/layout-navigation__shared-layout-modal.jpg +0 -0
  67. package/previews/layout-navigation__shared-layout-modal.webm +0 -0
  68. package/previews/lists-tables__animated-table.jpg +0 -0
  69. package/previews/lists-tables__animated-table.webm +0 -0
  70. package/previews/lists-tables__drag-to-reorder.jpg +0 -0
  71. package/previews/lists-tables__drag-to-reorder.webm +0 -0
  72. package/previews/lists-tables__staggered-list.jpg +0 -0
  73. package/previews/lists-tables__staggered-list.webm +0 -0
  74. package/previews/loading-states__circular-progress.jpg +0 -0
  75. package/previews/loading-states__circular-progress.webm +0 -0
  76. package/previews/loading-states__progress-bar.jpg +0 -0
  77. package/previews/loading-states__progress-bar.webm +0 -0
  78. package/previews/loading-states__pulsing-dots.jpg +0 -0
  79. package/previews/loading-states__pulsing-dots.webm +0 -0
  80. package/previews/loading-states__skeleton-shimmer.jpg +0 -0
  81. package/previews/loading-states__skeleton-shimmer.webm +0 -0
  82. package/previews/micro-interactions__animated-accordion.jpg +0 -0
  83. package/previews/micro-interactions__animated-accordion.webm +0 -0
  84. package/previews/micro-interactions__animated-badges.jpg +0 -0
  85. package/previews/micro-interactions__animated-badges.webm +0 -0
  86. package/previews/micro-interactions__animated-checkboxes.jpg +0 -0
  87. package/previews/micro-interactions__animated-checkboxes.webm +0 -0
  88. package/previews/micro-interactions__animated-search.jpg +0 -0
  89. package/previews/micro-interactions__animated-search.webm +0 -0
  90. package/previews/micro-interactions__command-palette.jpg +0 -0
  91. package/previews/micro-interactions__command-palette.webm +0 -0
  92. package/previews/micro-interactions__confetti-burst.jpg +0 -0
  93. package/previews/micro-interactions__confetti-burst.webm +0 -0
  94. package/previews/micro-interactions__floating-action-button.jpg +0 -0
  95. package/previews/micro-interactions__floating-action-button.webm +0 -0
  96. package/previews/micro-interactions__otp-input.jpg +0 -0
  97. package/previews/micro-interactions__otp-input.webm +0 -0
  98. package/previews/micro-interactions__segmented-control.jpg +0 -0
  99. package/previews/micro-interactions__segmented-control.webm +0 -0
  100. package/previews/micro-interactions__toggle-switch.jpg +0 -0
  101. package/previews/micro-interactions__toggle-switch.webm +0 -0
  102. package/previews/motion-premium__animate-number.jpg +0 -0
  103. package/previews/motion-premium__animate-number.webm +0 -0
  104. package/previews/motion-premium__animate-text.jpg +0 -0
  105. package/previews/motion-premium__animate-text.webm +0 -0
  106. package/previews/motion-premium__carousel.jpg +0 -0
  107. package/previews/motion-premium__carousel.webm +0 -0
  108. package/previews/motion-premium__coverflow-carousel.jpg +0 -0
  109. package/previews/motion-premium__coverflow-carousel.webm +0 -0
  110. package/previews/motion-premium__curtain-transitions.jpg +0 -0
  111. package/previews/motion-premium__curtain-transitions.webm +0 -0
  112. package/previews/motion-premium__magnetic-cursor-reticule.jpg +0 -0
  113. package/previews/motion-premium__magnetic-cursor-reticule.webm +0 -0
  114. package/previews/motion-premium__magnetic-pull.jpg +0 -0
  115. package/previews/motion-premium__magnetic-pull.webm +0 -0
  116. package/previews/motion-premium__pointer-compass.jpg +0 -0
  117. package/previews/motion-premium__pointer-compass.webm +0 -0
  118. package/previews/motion-premium__price-toggle.jpg +0 -0
  119. package/previews/motion-premium__price-toggle.webm +0 -0
  120. package/previews/motion-premium__scramble-headline.jpg +0 -0
  121. package/previews/motion-premium__scramble-headline.webm +0 -0
  122. package/previews/motion-premium__scramble-text.jpg +0 -0
  123. package/previews/motion-premium__scramble-text.webm +0 -0
  124. package/previews/motion-premium__square-cursor-reticule.jpg +0 -0
  125. package/previews/motion-premium__square-cursor-reticule.webm +0 -0
  126. package/previews/motion-premium__ticker-marquee.jpg +0 -0
  127. package/previews/motion-premium__ticker-marquee.webm +0 -0
  128. package/previews/motion-premium__typewriter.jpg +0 -0
  129. package/previews/motion-premium__typewriter.webm +0 -0
  130. package/previews/notifications__notification-bell.jpg +0 -0
  131. package/previews/notifications__notification-bell.webm +0 -0
  132. package/previews/notifications__notifications-panel.jpg +0 -0
  133. package/previews/notifications__notifications-panel.webm +0 -0
  134. package/previews/notifications__toast-stack.jpg +0 -0
  135. package/previews/notifications__toast-stack.webm +0 -0
  136. package/previews/preview-manifest.json +1 -0
  137. package/previews/scroll-animations__scroll-reveal.jpg +0 -0
  138. package/previews/scroll-animations__scroll-reveal.webm +0 -0
  139. package/previews/special-unique__3d-card-stack.jpg +0 -0
  140. package/previews/special-unique__3d-card-stack.webm +0 -0
  141. package/previews/special-unique__3d-coin-flip.jpg +0 -0
  142. package/previews/special-unique__3d-coin-flip.webm +0 -0
  143. package/previews/special-unique__3d-tilt-card.jpg +0 -0
  144. package/previews/special-unique__3d-tilt-card.webm +0 -0
  145. package/previews/special-unique__aurora-background.jpg +0 -0
  146. package/previews/special-unique__aurora-background.webm +0 -0
  147. package/previews/special-unique__elastic-grid.jpg +0 -0
  148. package/previews/special-unique__elastic-grid.webm +0 -0
  149. package/previews/special-unique__elastic-slider.jpg +0 -0
  150. package/previews/special-unique__elastic-slider.webm +0 -0
  151. package/previews/special-unique__flip-clock.jpg +0 -0
  152. package/previews/special-unique__flip-clock.webm +0 -0
  153. package/previews/special-unique__glitch-text.jpg +0 -0
  154. package/previews/special-unique__glitch-text.webm +0 -0
  155. package/previews/special-unique__glowing-orbs.jpg +0 -0
  156. package/previews/special-unique__glowing-orbs.webm +0 -0
  157. package/previews/special-unique__gravity-balls.jpg +0 -0
  158. package/previews/special-unique__gravity-balls.webm +0 -0
  159. package/previews/special-unique__heartbeat-monitor.jpg +0 -0
  160. package/previews/special-unique__heartbeat-monitor.webm +0 -0
  161. package/previews/special-unique__liquid-button.jpg +0 -0
  162. package/previews/special-unique__liquid-button.webm +0 -0
  163. package/previews/special-unique__magnetic-dock.jpg +0 -0
  164. package/previews/special-unique__magnetic-dock.webm +0 -0
  165. package/previews/special-unique__matrix-rain.jpg +0 -0
  166. package/previews/special-unique__matrix-rain.webm +0 -0
  167. package/previews/special-unique__morphing-blob.jpg +0 -0
  168. package/previews/special-unique__morphing-blob.webm +0 -0
  169. package/previews/special-unique__morphing-shapes.jpg +0 -0
  170. package/previews/special-unique__morphing-shapes.webm +0 -0
  171. package/previews/special-unique__particle-background.jpg +0 -0
  172. package/previews/special-unique__particle-background.webm +0 -0
  173. package/previews/special-unique__perspective-grid.jpg +0 -0
  174. package/previews/special-unique__perspective-grid.webm +0 -0
  175. package/previews/special-unique__radial-menu.jpg +0 -0
  176. package/previews/special-unique__radial-menu.webm +0 -0
  177. package/previews/special-unique__ripple-grid.jpg +0 -0
  178. package/previews/special-unique__ripple-grid.webm +0 -0
  179. package/previews/special-unique__signature-draw.jpg +0 -0
  180. package/previews/special-unique__signature-draw.webm +0 -0
  181. package/previews/special-unique__split-flap-display.jpg +0 -0
  182. package/previews/special-unique__split-flap-display.webm +0 -0
  183. package/previews/special-unique__spotlight-card.jpg +0 -0
  184. package/previews/special-unique__spotlight-card.webm +0 -0
  185. package/previews/special-unique__springy-text.jpg +0 -0
  186. package/previews/special-unique__springy-text.webm +0 -0
  187. package/previews/special-unique__tech-stack-orbit.jpg +0 -0
  188. package/previews/special-unique__tech-stack-orbit.webm +0 -0
  189. package/previews/special-unique__voice-waveform.jpg +0 -0
  190. package/previews/special-unique__voice-waveform.webm +0 -0
  191. package/previews/text-animations__gradient-text.jpg +0 -0
  192. package/previews/text-animations__gradient-text.webm +0 -0
  193. package/previews/text-animations__typewriter-effect.jpg +0 -0
  194. package/previews/text-animations__typewriter-effect.webm +0 -0
package/README.md CHANGED
@@ -15,8 +15,36 @@ target, and a Claude agent edits your real source while the preview hot-reloads.
15
15
 
16
16
  - A project that is a **clean git repo** (edits land on an isolated `motion-cart/session-*` branch).
17
17
  - An **already-running local dev server** for that project; pass its URL via `--dev-url` (loopback only).
18
- - The agent uses your existing **Claude Code login** (no separate API key needed). `--token`
19
- (or `MOTION_PLUS_TOKEN`) enables the live Motion AI Kit MCP.
18
+ ## Model provider (auth)
19
+
20
+ By default the agent uses your existing **Claude Code login** (no key needed). You can instead
21
+ point it at **any Anthropic-compatible gateway** — including **iO Bonzai** — with your own key.
22
+
23
+ **Set it once** (saved to `~/.motion-cart/config.json`, chmod 600) and every run reuses it:
24
+
25
+ ```bash
26
+ npx motion-cart config --base-url https://api-v2.bonzai.iodigital.com \
27
+ --api-key <your-bonzai-key> --model claude-4-5-sonnet
28
+ # then just:
29
+ npx motion-cart --target . --dev-url http://localhost:5173
30
+
31
+ npx motion-cart config # show current provider (key redacted)
32
+ npx motion-cart config --clear # reset to the Claude Code login
33
+ ```
34
+
35
+ Or pass per-run flags (these + `MOTION_CART_*` env override the saved config):
36
+
37
+ ```bash
38
+ npx motion-cart --target . --dev-url http://localhost:5173 \
39
+ --base-url https://api-v2.bonzai.iodigital.com --api-key <key> --model claude-4-5-sonnet
40
+ ```
41
+
42
+ `--base-url`/`--api-key`/`--model` map to `ANTHROPIC_BASE_URL` / `ANTHROPIC_AUTH_TOKEN` / model for
43
+ the agent. The gateway must expose the Anthropic **Messages** route (`<base-url>/v1/messages`) —
44
+ LiteLLM-based gateways like Bonzai do; a purely OpenAI-shaped endpoint won't work.
45
+
46
+ > Auth gotcha: an invalid `ANTHROPIC_API_KEY` in your shell **overrides** your Claude login and
47
+ > causes `401 Invalid bearer token`. `unset` it, or pass `--api-key`/`--base-url` explicitly.
20
48
 
21
49
  ## Flags
22
50
 
@@ -24,6 +52,9 @@ target, and a Claude agent edits your real source while the preview hot-reloads.
24
52
  |---|---|---|
25
53
  | `--dev-url` | (required) | URL of your running local dev server |
26
54
  | `--target` | cwd | project directory the agent edits |
55
+ | `--base-url` | `$MOTION_CART_BASE_URL` | custom Anthropic-compatible gateway (e.g. iO Bonzai) |
56
+ | `--api-key` | `$MOTION_CART_API_KEY` | API key for that gateway |
57
+ | `--model` | `$MOTION_CART_MODEL` | model id (e.g. `claude-4-5-sonnet`) |
27
58
  | `--port` | 7100 | control panel port |
28
59
  | `--proxy-port` | 7101 | injecting proxy port |
29
60
  | `--token` | `$MOTION_PLUS_TOKEN` | Motion+ token to enable the Motion MCP |