CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

motiondivision/motion

Scanned commit f5838ce47b dated 2026-10-02 — last upstream commit. Generated by codevetter 1.15.0 on 2026-10-02.

github.com/motiondivision/motion ↗ · 1825 files · 6.1 MB

Motion An open source animation library for JavaScript, React and Vue bash React / JavaScript npm install motion Vue npm install motion-v Table of Contents 1.

Deep analysis by cli:codex via the codex CLI on 2026-10-02 (415s) — every claim below links to its cited source files. Source inspection; upstream code and tests were not executed.

Overview

Motion is a TypeScript animation library for JavaScript and React developers, distributed through the public motion package and implemented across framer-motion, motion-dom, and motion-utils. It combines imperative animation, React components and hooks, gestures, scroll-linked effects, layout projection, browser view transitions, and optional GPU-object adapters. Its distinctive architecture shares motion values and rendering infrastructure between declarative React usage and imperative DOM animation, choosing browser-native animation or JavaScript execution according to capabilities and options. This brief describes inspected source at commit f5838ce47b323ce2713cb2effc5afaa5b6120a44; it is a bounded investigation, not an exhaustive audit.

System map

The repository ships animation packages rather than a hosted application backend. Public entrypoints delegate to implementations spread across React orchestration, a shared DOM engine, and foundational utilities. Development applications provide browser fixtures for HTML, React, React 19, and Next.js. Runtime state is held in motion values, effect caches, component refs, and projection trees; release tooling separately writes artifacts and contacts external systems.

Feature catalog

The user-facing surface is primarily importable APIs consumed by application developers. React offers animated HTML and SVG components, interaction props, lazy feature loading, and motion-value hooks. Imperative APIs target values, selectors, objects, sequences, layout changes, and browser view-transition layers. Optional adapters extend the same animation machinery to Three.js and vgpu subjects.

Data flow

Inputs enter through component props, imperative subjects and keyframes, selectors, or browser events. Subject resolution and option normalization feed motion values, keyframe resolvers, and animation playback objects. Rendering is scheduled through ordered frame phases or delegated to browser animation APIs. Completion and cleanup update group controls, effect bindings, and retained React children; the separately inspected release path writes changelog artifacts.

Behavior traces

Three principal flows were followed across concrete source files: playground startup, imperative DOM animation, and scroll-driven playback. Additional traces cover React component mounting, scoped cleanup, exit completion, and browser view transitions. These traces describe execution order and material branches observed in source. They do not report runtime verification.

Testing signals

Tests and CI were inspected, not executed; no passing result, coverage percentage, or runtime performance result is asserted. The repository combines co-located Jest tests, React browser tests in Cypress, and Playwright browser suites. Inspected tests exercise registry precedence, presence initialization, playback controls, scroll parity, and React view transitions. Inspection was bounded, and browser support checks, project selection, and CI wiring limit what test existence establishes.

Risk map

The observations below identify sensitive boundaries and change hotspots, not confirmed vulnerabilities. Release scripts have filesystem and network effects outside the animation runtime. Animation correctness depends on browser capability detection, shared rendering ownership, lifecycle ordering, and bundle/context identity. Two retention and CSP concerns are explicitly labeled hypotheses requiring targeted verification.

Extension points

Extension mechanisms exist at subject dispatch, renderer construction, feature loading, and animation scheduling boundaries. The effect API is the clearest public adapter mechanism and already supports GPU integrations. React features are enabled through a shared definition table and supplied as bundles. Development fixture discovery and package export maps provide separate extension surfaces for tests and distribution.

Contributor handoff

Begin with the actual public entrypoint and follow ownership into the implementation package before editing. The inspected tests and CI were not executed, and the inventory is bounded rather than exhaustive coverage. Preserve package compatibility, shared state ownership, frame timing, and browser fallback branches. Future execution should use repository-defined checks only when authorized, with release and external-write commands treated separately.

Languages

LanguageFilesShare of source
TypeScript123397%
HTML307docs/config
Markdown170docs/config
JSON52docs/config
JavaScript403%
CSS6docs/config
YAML4docs/config

Start reading here

Probable source entrypoint: packages/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

packages/ (900 files)

Source layout — packages/

PathFiles
packages/config/2
packages/motion/30
packages/motion-dom/66
packages/motion-utils/57

Repository structure

Top-level pathFiles
packages/900
dev/731
plans/144
tests/16
.agents/5
.github/4
scripts/3
.devcontainer/2

Docs found: AGENTS.mdCLAUDE.mdCONTRIBUTING.mdLICENSE.mdREADME.md

Package

package.json — motion-one v0.0.0, 55 declared dependencies.

@cypress/webpack-preprocessor@gsap/react@playwright/test@rollup/plugin-alias@rollup/plugin-node-resolve@rollup/plugin-replace@rollup/plugin-terser@testing-library/dom@testing-library/jest-dom@testing-library/react@types/jest@types/node

CI & config entrypoints

Structural health signals

Average score 8.5/10 across 96 analyzed source files; 5 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history