af-motion 0.0.0-stage → 1.0.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.
- package/CHANGELOG.md +33 -0
- package/LICENSE +201 -0
- package/README.md +203 -3
- package/RELEASE_NOTES.md +115 -0
- package/bin/af-motion.js +16 -0
- package/bin/mcp-server.js +21 -0
- package/dist/3d/adapter.d.ts +29 -0
- package/dist/3d/assets/cache.d.ts +71 -0
- package/dist/3d/assets/index.d.ts +10 -0
- package/dist/3d/assets/inspection.d.ts +19 -0
- package/dist/3d/assets/loaders.d.ts +30 -0
- package/dist/3d/assets/manager.d.ts +69 -0
- package/dist/3d/assets/scene-integration.d.ts +23 -0
- package/dist/3d/assets/types.d.ts +80 -0
- package/dist/3d/assets/validation.d.ts +12 -0
- package/dist/3d/camera/index.d.ts +7 -0
- package/dist/3d/camera/presets.d.ts +8 -0
- package/dist/3d/camera/transitions.d.ts +19 -0
- package/dist/3d/camera/types.d.ts +37 -0
- package/dist/3d/camera/validation.d.ts +9 -0
- package/dist/3d/capabilities.d.ts +11 -0
- package/dist/3d/composition/fallback.d.ts +20 -0
- package/dist/3d/composition/generation.d.ts +24 -0
- package/dist/3d/composition/index.d.ts +12 -0
- package/dist/3d/composition/quality.d.ts +35 -0
- package/dist/3d/composition/recipes.d.ts +34 -0
- package/dist/3d/composition/types.d.ts +88 -0
- package/dist/3d/composition/unified.d.ts +18 -0
- package/dist/3d/environment/index.d.ts +6 -0
- package/dist/3d/environment/presets.d.ts +8 -0
- package/dist/3d/environment/types.d.ts +36 -0
- package/dist/3d/environment/validation.d.ts +9 -0
- package/dist/3d/geometry/cache.d.ts +37 -0
- package/dist/3d/geometry/generators.d.ts +24 -0
- package/dist/3d/geometry/hash.d.ts +10 -0
- package/dist/3d/geometry/index.d.ts +9 -0
- package/dist/3d/geometry/three-adapter.d.ts +15 -0
- package/dist/3d/geometry/types.d.ts +120 -0
- package/dist/3d/geometry/validation.d.ts +6 -0
- package/dist/3d/index.d.ts +32 -0
- package/dist/3d/interaction/camera-controls.d.ts +58 -0
- package/dist/3d/interaction/index.d.ts +8 -0
- package/dist/3d/interaction/manager.d.ts +61 -0
- package/dist/3d/interaction/presets.d.ts +9 -0
- package/dist/3d/interaction/raycaster.d.ts +20 -0
- package/dist/3d/interaction/types.d.ts +78 -0
- package/dist/3d/lighting/index.d.ts +6 -0
- package/dist/3d/lighting/presets.d.ts +8 -0
- package/dist/3d/lighting/types.d.ts +31 -0
- package/dist/3d/lighting/validation.d.ts +17 -0
- package/dist/3d/materials/bridge.d.ts +11 -0
- package/dist/3d/materials/index.d.ts +7 -0
- package/dist/3d/materials/presets.d.ts +9 -0
- package/dist/3d/materials/types.d.ts +43 -0
- package/dist/3d/materials/validation.d.ts +9 -0
- package/dist/3d/morphing/animator.d.ts +19 -0
- package/dist/3d/morphing/correspondence.d.ts +32 -0
- package/dist/3d/morphing/geometry.d.ts +28 -0
- package/dist/3d/morphing/index.d.ts +16 -0
- package/dist/3d/morphing/interpolation.d.ts +45 -0
- package/dist/3d/morphing/morph.d.ts +18 -0
- package/dist/3d/morphing/presets.d.ts +31 -0
- package/dist/3d/morphing/react.d.ts +29 -0
- package/dist/3d/morphing/topology.d.ts +34 -0
- package/dist/3d/morphing/types.d.ts +138 -0
- package/dist/3d/morphing/validation.d.ts +19 -0
- package/dist/3d/optimization/analysis.d.ts +14 -0
- package/dist/3d/optimization/colliders.d.ts +16 -0
- package/dist/3d/optimization/geometry.d.ts +22 -0
- package/dist/3d/optimization/hierarchy.d.ts +14 -0
- package/dist/3d/optimization/index.d.ts +33 -0
- package/dist/3d/optimization/lod.d.ts +13 -0
- package/dist/3d/optimization/materials.d.ts +12 -0
- package/dist/3d/optimization/recommendations.d.ts +13 -0
- package/dist/3d/optimization/skeleton.d.ts +20 -0
- package/dist/3d/optimization/types.d.ts +252 -0
- package/dist/3d/physics/benchmark.d.ts +76 -0
- package/dist/3d/physics/body/inertia.d.ts +61 -0
- package/dist/3d/physics/collision/ccd.d.ts +26 -0
- package/dist/3d/physics/collision/narrowphase.d.ts +15 -0
- package/dist/3d/physics/collision/shapes.d.ts +45 -0
- package/dist/3d/physics/constraints/advanced.d.ts +40 -0
- package/dist/3d/physics/constraints/solver.d.ts +34 -0
- package/dist/3d/physics/constraints/types.d.ts +106 -0
- package/dist/3d/physics/events.d.ts +34 -0
- package/dist/3d/physics/index.d.ts +29 -0
- package/dist/3d/physics/material.d.ts +27 -0
- package/dist/3d/physics/math.d.ts +79 -0
- package/dist/3d/physics/soft/cloth.d.ts +12 -0
- package/dist/3d/physics/soft/collision.d.ts +12 -0
- package/dist/3d/physics/soft/gpu.d.ts +19 -0
- package/dist/3d/physics/soft/pbd.d.ts +20 -0
- package/dist/3d/physics/soft/rope.d.ts +16 -0
- package/dist/3d/physics/soft/soft-body.d.ts +12 -0
- package/dist/3d/physics/soft/types.d.ts +212 -0
- package/dist/3d/physics/solver/integrators.d.ts +25 -0
- package/dist/3d/physics/solver/types.d.ts +28 -0
- package/dist/3d/physics/spatial/spatial-hash.d.ts +51 -0
- package/dist/3d/physics/types.d.ts +579 -0
- package/dist/3d/physics/world.d.ts +106 -0
- package/dist/3d/r3f.d.ts +34 -0
- package/dist/3d/scene.d.ts +8 -0
- package/dist/3d/schema.d.ts +739 -0
- package/dist/3d/schemas/ai-integration.d.ts +201 -0
- package/dist/3d/schemas/correction.d.ts +11 -0
- package/dist/3d/schemas/index.d.ts +12 -0
- package/dist/3d/schemas/schemas.d.ts +361 -0
- package/dist/3d/schemas/serialization.d.ts +22 -0
- package/dist/3d/schemas/types.d.ts +199 -0
- package/dist/3d/schemas/validation.d.ts +33 -0
- package/dist/3d/scroll/controller.d.ts +32 -0
- package/dist/3d/scroll/index.d.ts +6 -0
- package/dist/3d/scroll/presets.d.ts +9 -0
- package/dist/3d/scroll/types.d.ts +53 -0
- package/dist/3d/terrain/biomes.d.ts +18 -0
- package/dist/3d/terrain/chunks.d.ts +20 -0
- package/dist/3d/terrain/erosion.d.ts +15 -0
- package/dist/3d/terrain/heightmap.d.ts +27 -0
- package/dist/3d/terrain/index.d.ts +18 -0
- package/dist/3d/terrain/materials.d.ts +20 -0
- package/dist/3d/terrain/noise.d.ts +25 -0
- package/dist/3d/terrain/physics.d.ts +34 -0
- package/dist/3d/terrain/terrain.d.ts +12 -0
- package/dist/3d/terrain/types.d.ts +235 -0
- package/dist/3d/terrain/vegetation.d.ts +14 -0
- package/dist/3d/types.d.ts +176 -0
- package/dist/3d/world/hydrology.d.ts +12 -0
- package/dist/3d/world/index.d.ts +15 -0
- package/dist/3d/world/lighting.d.ts +16 -0
- package/dist/3d/world/pipeline.d.ts +20 -0
- package/dist/3d/world/population.d.ts +12 -0
- package/dist/3d/world/presets.d.ts +11 -0
- package/dist/3d/world/streaming.d.ts +13 -0
- package/dist/3d/world/types.d.ts +272 -0
- package/dist/3d/world/world.d.ts +64 -0
- package/dist/backgrounds/advanced-gradient.d.ts +32 -0
- package/dist/backgrounds/atmospheric-backgrounds.d.ts +79 -0
- package/dist/backgrounds/aurora.d.ts +24 -0
- package/dist/backgrounds/cosmic-background.d.ts +31 -0
- package/dist/backgrounds/energy-effects.d.ts +78 -0
- package/dist/backgrounds/floating-orbs.d.ts +26 -0
- package/dist/backgrounds/fluid-backgrounds.d.ts +72 -0
- package/dist/backgrounds/geometric-backgrounds.d.ts +78 -0
- package/dist/backgrounds/gradient.d.ts +20 -0
- package/dist/backgrounds/grid.d.ts +22 -0
- package/dist/backgrounds/internal/canvas-lifecycle.d.ts +29 -0
- package/dist/backgrounds/noise.d.ts +20 -0
- package/dist/backgrounds/particle-background.d.ts +37 -0
- package/dist/backgrounds/particle-field.d.ts +22 -0
- package/dist/backgrounds/spotlight.d.ts +20 -0
- package/dist/backgrounds/wave.d.ts +22 -0
- package/dist/catalogue.d.ts +227 -0
- package/dist/catalogue.js +4 -0
- package/dist/chunks/catalogue-ZmbeEdRo.js +59850 -0
- package/dist/chunks/core-animation-CeiI_TEe.js +1394 -0
- package/dist/chunks/motion-choreography-DC6LWvDk.js +4089 -0
- package/dist/chunks/pointer-capture-lrnKAl2I.js +158 -0
- package/dist/chunks/safe-json-D5j34GEB.js +62 -0
- package/dist/chunks/scroll-velocity-BNUHaS0-.js +904 -0
- package/dist/cli/commands/doctor.d.ts +9 -0
- package/dist/cli/commands/example.d.ts +9 -0
- package/dist/cli/commands/info.d.ts +8 -0
- package/dist/cli/commands/init.d.ts +9 -0
- package/dist/cli/commands/presets.d.ts +10 -0
- package/dist/cli/commands/validate.d.ts +9 -0
- package/dist/cli/index.d.ts +22 -0
- package/dist/cli/types.d.ts +115 -0
- package/dist/cli/utils/safety.d.ts +11 -0
- package/dist/cli/utils/templates.d.ts +16 -0
- package/dist/cli/utils/terminal.d.ts +29 -0
- package/dist/cli.js +825 -0
- package/dist/core/adaptive-motion.d.ts +100 -0
- package/dist/core/adaptive-quality/controller.d.ts +61 -0
- package/dist/core/adaptive-quality/index.d.ts +13 -0
- package/dist/core/adaptive-quality/metrics.d.ts +33 -0
- package/dist/core/adaptive-quality/policies.d.ts +40 -0
- package/dist/core/adaptive-quality/profile.d.ts +58 -0
- package/dist/core/adaptive-quality/react.d.ts +57 -0
- package/dist/core/adaptive-quality/recommendation.d.ts +12 -0
- package/dist/core/adaptive-quality/resolution.d.ts +22 -0
- package/dist/core/adaptive-quality/types.d.ts +362 -0
- package/dist/core/advanced-motion/adapters.d.ts +20 -0
- package/dist/core/advanced-motion/controller.d.ts +52 -0
- package/dist/core/advanced-motion/index.d.ts +12 -0
- package/dist/core/advanced-motion/recipes.d.ts +16 -0
- package/dist/core/advanced-motion/timeline.d.ts +35 -0
- package/dist/core/advanced-motion/types.d.ts +174 -0
- package/dist/core/advanced-motion/validation.d.ts +11 -0
- package/dist/core/agent-workflows/agent-registry.d.ts +21 -0
- package/dist/core/agent-workflows/agents/accessibility-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/composition-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/design-to-motion-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/index.d.ts +13 -0
- package/dist/core/agent-workflows/agents/motion-intelligence-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/performance-agent.d.ts +9 -0
- package/dist/core/agent-workflows/agents/scene-generation-agent.d.ts +9 -0
- package/dist/core/agent-workflows/collaboration-planner.d.ts +38 -0
- package/dist/core/agent-workflows/collaboration-workflows.d.ts +83 -0
- package/dist/core/agent-workflows/communication.d.ts +29 -0
- package/dist/core/agent-workflows/conflict-resolver.d.ts +25 -0
- package/dist/core/agent-workflows/context.d.ts +36 -0
- package/dist/core/agent-workflows/execution-engine.d.ts +30 -0
- package/dist/core/agent-workflows/index.d.ts +20 -0
- package/dist/core/agent-workflows/orchestration-types.d.ts +144 -0
- package/dist/core/agent-workflows/orchestrator.d.ts +29 -0
- package/dist/core/agent-workflows/react.d.ts +71 -0
- package/dist/core/agent-workflows/shared-context.d.ts +36 -0
- package/dist/core/agent-workflows/task-planner.d.ts +42 -0
- package/dist/core/agent-workflows/templates.d.ts +14 -0
- package/dist/core/agent-workflows/tool-registry.d.ts +24 -0
- package/dist/core/agent-workflows/types.d.ts +167 -0
- package/dist/core/ai-ecosystem/capability-registry.d.ts +23 -0
- package/dist/core/ai-ecosystem/index.d.ts +13 -0
- package/dist/core/ai-ecosystem/pipeline.d.ts +19 -0
- package/dist/core/ai-ecosystem/provider.d.ts +19 -0
- package/dist/core/ai-ecosystem/types.d.ts +69 -0
- package/dist/core/ai-motion-intelligence/engine.d.ts +51 -0
- package/dist/core/ai-motion-intelligence/explanation-engine.d.ts +8 -0
- package/dist/core/ai-motion-intelligence/index.d.ts +15 -0
- package/dist/core/ai-motion-intelligence/intent-classifier.d.ts +14 -0
- package/dist/core/ai-motion-intelligence/knowledge-base.d.ts +12 -0
- package/dist/core/ai-motion-intelligence/provider.d.ts +31 -0
- package/dist/core/ai-motion-intelligence/quality-evaluator.d.ts +9 -0
- package/dist/core/ai-motion-intelligence/react.d.ts +14 -0
- package/dist/core/ai-motion-intelligence/recommendation-engine.d.ts +16 -0
- package/dist/core/ai-motion-intelligence/types.d.ts +134 -0
- package/dist/core/ai-motion-registry.d.ts +201 -0
- package/dist/core/animate.d.ts +57 -0
- package/dist/core/animation-intelligence/engine.d.ts +42 -0
- package/dist/core/animation-intelligence/index.d.ts +11 -0
- package/dist/core/animation-intelligence/intent.d.ts +15 -0
- package/dist/core/animation-intelligence/schema.d.ts +42 -0
- package/dist/core/animation-intelligence/scoring.d.ts +15 -0
- package/dist/core/animation-intelligence/types.d.ts +91 -0
- package/dist/core/animation-parallel.d.ts +37 -0
- package/dist/core/animation-presets.d.ts +56 -0
- package/dist/core/animation-sequence.d.ts +37 -0
- package/dist/core/animation-timeline.d.ts +46 -0
- package/dist/core/animation.d.ts +48 -0
- package/dist/core/built-in-palettes.d.ts +331 -0
- package/dist/core/choreography-intelligence/bridge.d.ts +43 -0
- package/dist/core/choreography-intelligence/generator.d.ts +11 -0
- package/dist/core/choreography-intelligence/index.d.ts +11 -0
- package/dist/core/choreography-intelligence/intent.d.ts +11 -0
- package/dist/core/choreography-intelligence/schema.d.ts +76 -0
- package/dist/core/choreography-intelligence/types.d.ts +87 -0
- package/dist/core/composition.d.ts +170 -0
- package/dist/core/configuration-corrector.d.ts +85 -0
- package/dist/core/design-intelligence.d.ts +199 -0
- package/dist/core/design-system.d.ts +206 -0
- package/dist/core/design-to-motion/design-analyzer.d.ts +13 -0
- package/dist/core/design-to-motion/engine.d.ts +34 -0
- package/dist/core/design-to-motion/generator.d.ts +16 -0
- package/dist/core/design-to-motion/index.d.ts +15 -0
- package/dist/core/design-to-motion/input-parser.d.ts +17 -0
- package/dist/core/design-to-motion/motion-planner.d.ts +11 -0
- package/dist/core/design-to-motion/presets.d.ts +11 -0
- package/dist/core/design-to-motion/react.d.ts +13 -0
- package/dist/core/design-to-motion/types.d.ts +221 -0
- package/dist/core/design-to-motion/validator.d.ts +13 -0
- package/dist/core/device-capabilities/classification.d.ts +25 -0
- package/dist/core/device-capabilities/detection.d.ts +27 -0
- package/dist/core/device-capabilities/graphics.d.ts +22 -0
- package/dist/core/device-capabilities/hardware.d.ts +27 -0
- package/dist/core/device-capabilities/index.d.ts +14 -0
- package/dist/core/device-capabilities/monitor.d.ts +19 -0
- package/dist/core/device-capabilities/react.d.ts +24 -0
- package/dist/core/device-capabilities/runtime.d.ts +11 -0
- package/dist/core/device-capabilities/scoring.d.ts +18 -0
- package/dist/core/device-capabilities/types.d.ts +171 -0
- package/dist/core/effect-composer.d.ts +41 -0
- package/dist/core/generation-pipeline.d.ts +135 -0
- package/dist/core/inertia.d.ts +30 -0
- package/dist/core/interactions/cursor-controller.d.ts +9 -0
- package/dist/core/interactions/custom-gestures.d.ts +28 -0
- package/dist/core/interactions/device-capabilities.d.ts +12 -0
- package/dist/core/interactions/drag-controller.d.ts +60 -0
- package/dist/core/interactions/errors.d.ts +13 -0
- package/dist/core/interactions/gesture-classifier.d.ts +43 -0
- package/dist/core/interactions/gesture-intelligence-controller.d.ts +9 -0
- package/dist/core/interactions/gesture-recognizers.d.ts +160 -0
- package/dist/core/interactions/gesture-sequence.d.ts +9 -0
- package/dist/core/interactions/index.d.ts +27 -0
- package/dist/core/interactions/input-normalizer.d.ts +8 -0
- package/dist/core/interactions/interaction-manager.d.ts +43 -0
- package/dist/core/interactions/keyboard-manager.d.ts +16 -0
- package/dist/core/interactions/magnetic-controller.d.ts +9 -0
- package/dist/core/interactions/magnetic-group.d.ts +11 -0
- package/dist/core/interactions/multitouch-controller.d.ts +62 -0
- package/dist/core/interactions/pointer-controller.d.ts +34 -0
- package/dist/core/interactions/pointer-tracker.d.ts +32 -0
- package/dist/core/interactions/prioritizer.d.ts +17 -0
- package/dist/core/interactions/touch-controller.d.ts +35 -0
- package/dist/core/interactions/types.d.ts +710 -0
- package/dist/core/layout/controller.d.ts +56 -0
- package/dist/core/layout/flip.d.ts +21 -0
- package/dist/core/layout/group.d.ts +46 -0
- package/dist/core/layout/index.d.ts +12 -0
- package/dist/core/layout/measure.d.ts +30 -0
- package/dist/core/layout/presets.d.ts +24 -0
- package/dist/core/layout/types.d.ts +189 -0
- package/dist/core/microinteractions/generator.d.ts +11 -0
- package/dist/core/microinteractions/index.d.ts +11 -0
- package/dist/core/microinteractions/intent.d.ts +11 -0
- package/dist/core/microinteractions/runtime.d.ts +25 -0
- package/dist/core/microinteractions/schema.d.ts +82 -0
- package/dist/core/microinteractions/types.d.ts +79 -0
- package/dist/core/motion-choreography.d.ts +163 -0
- package/dist/core/motion-dna.d.ts +129 -0
- package/dist/core/motion-path/animator.d.ts +13 -0
- package/dist/core/motion-path/engine.d.ts +27 -0
- package/dist/core/motion-path/follower.d.ts +8 -0
- package/dist/core/motion-path/index.d.ts +15 -0
- package/dist/core/motion-path/lut.d.ts +33 -0
- package/dist/core/motion-path/parser.d.ts +26 -0
- package/dist/core/motion-path/segments.d.ts +16 -0
- package/dist/core/motion-path/types.d.ts +178 -0
- package/dist/core/motion-path/vector3.d.ts +49 -0
- package/dist/core/motion-recipe.d.ts +171 -0
- package/dist/core/motion-states.d.ts +43 -0
- package/dist/core/motion-validation/consistency.d.ts +11 -0
- package/dist/core/motion-validation/index.d.ts +11 -0
- package/dist/core/motion-validation/optimizer.d.ts +11 -0
- package/dist/core/motion-validation/schema.d.ts +81 -0
- package/dist/core/motion-validation/types.d.ts +53 -0
- package/dist/core/motion-validation/validator.d.ts +11 -0
- package/dist/core/motion.d.ts +7 -0
- package/dist/core/natural-motion.d.ts +110 -0
- package/dist/core/palette-colors.d.ts +16 -0
- package/dist/core/palette-styles.d.ts +12 -0
- package/dist/core/palettes.d.ts +59 -0
- package/dist/core/performance-intelligence/conflicts.d.ts +21 -0
- package/dist/core/performance-intelligence/context.d.ts +48 -0
- package/dist/core/performance-intelligence/coordinator.d.ts +84 -0
- package/dist/core/performance-intelligence/decisions.d.ts +17 -0
- package/dist/core/performance-intelligence/history.d.ts +44 -0
- package/dist/core/performance-intelligence/index.d.ts +15 -0
- package/dist/core/performance-intelligence/policies.d.ts +59 -0
- package/dist/core/performance-intelligence/react.d.ts +78 -0
- package/dist/core/performance-intelligence/report.d.ts +16 -0
- package/dist/core/performance-intelligence/scoring.d.ts +16 -0
- package/dist/core/performance-intelligence/types.d.ts +203 -0
- package/dist/core/performance-optimizer/bottlenecks.d.ts +9 -0
- package/dist/core/performance-optimizer/index.d.ts +13 -0
- package/dist/core/performance-optimizer/optimizer.d.ts +43 -0
- package/dist/core/performance-optimizer/profiler.d.ts +38 -0
- package/dist/core/performance-optimizer/react.d.ts +55 -0
- package/dist/core/performance-optimizer/strategies.d.ts +22 -0
- package/dist/core/performance-optimizer/types.d.ts +227 -0
- package/dist/core/performance-optimizer/workers.d.ts +27 -0
- package/dist/core/physics/collision-constraints.d.ts +15 -0
- package/dist/core/physics/collision-detection.d.ts +93 -0
- package/dist/core/physics/collision-response.d.ts +24 -0
- package/dist/core/physics/collision-types.d.ts +381 -0
- package/dist/core/physics/collision-world.d.ts +11 -0
- package/dist/core/physics/composition-behaviors.d.ts +97 -0
- package/dist/core/physics/composition-choreography.d.ts +14 -0
- package/dist/core/physics/composition-engine.d.ts +25 -0
- package/dist/core/physics/composition-recipes.d.ts +46 -0
- package/dist/core/physics/composition-types.d.ts +265 -0
- package/dist/core/physics/composition-validation.d.ts +33 -0
- package/dist/core/physics/index.d.ts +37 -0
- package/dist/core/physics/inertia-animation.d.ts +11 -0
- package/dist/core/physics/inertia-math.d.ts +56 -0
- package/dist/core/physics/inertia-presets.d.ts +25 -0
- package/dist/core/physics/inertia-simulation.d.ts +11 -0
- package/dist/core/physics/inertia-types.d.ts +355 -0
- package/dist/core/physics/inertia-validation.d.ts +22 -0
- package/dist/core/physics/math.d.ts +99 -0
- package/dist/core/physics/presets.d.ts +28 -0
- package/dist/core/physics/simulation.d.ts +11 -0
- package/dist/core/physics/spring-animation.d.ts +11 -0
- package/dist/core/physics/spring-math.d.ts +47 -0
- package/dist/core/physics/spring-presets.d.ts +29 -0
- package/dist/core/physics/spring-simulation.d.ts +11 -0
- package/dist/core/physics/spring-types.d.ts +350 -0
- package/dist/core/physics/spring-validation.d.ts +22 -0
- package/dist/core/physics/stepper.d.ts +24 -0
- package/dist/core/physics/types.d.ts +280 -0
- package/dist/core/physics/validation.d.ts +62 -0
- package/dist/core/pointer-capture.d.ts +7 -0
- package/dist/core/reference-analysis/index.d.ts +10 -0
- package/dist/core/reference-analysis/interpreter.d.ts +12 -0
- package/dist/core/reference-analysis/planner.d.ts +15 -0
- package/dist/core/reference-analysis/specification.d.ts +14 -0
- package/dist/core/reference-analysis/types.d.ts +244 -0
- package/dist/core/resource-intelligence/cache.d.ts +43 -0
- package/dist/core/resource-intelligence/gpu.d.ts +19 -0
- package/dist/core/resource-intelligence/index.d.ts +16 -0
- package/dist/core/resource-intelligence/leaks.d.ts +13 -0
- package/dist/core/resource-intelligence/memory.d.ts +27 -0
- package/dist/core/resource-intelligence/pooling.d.ts +32 -0
- package/dist/core/resource-intelligence/pressure.d.ts +32 -0
- package/dist/core/resource-intelligence/react.d.ts +63 -0
- package/dist/core/resource-intelligence/registry.d.ts +33 -0
- package/dist/core/resource-intelligence/reports.d.ts +14 -0
- package/dist/core/resource-intelligence/types.d.ts +232 -0
- package/dist/core/scene-generation/engine.d.ts +31 -0
- package/dist/core/scene-generation/generator.d.ts +14 -0
- package/dist/core/scene-generation/index.d.ts +14 -0
- package/dist/core/scene-generation/input-parser.d.ts +24 -0
- package/dist/core/scene-generation/presets.d.ts +10 -0
- package/dist/core/scene-generation/react.d.ts +13 -0
- package/dist/core/scene-generation/scene-analyzer.d.ts +9 -0
- package/dist/core/scene-generation/scene-planner.d.ts +12 -0
- package/dist/core/scene-generation/types.d.ts +236 -0
- package/dist/core/scene-generation/validator.d.ts +18 -0
- package/dist/core/schema.d.ts +185 -0
- package/dist/core/scroll-intelligence/generator.d.ts +11 -0
- package/dist/core/scroll-intelligence/index.d.ts +11 -0
- package/dist/core/scroll-intelligence/intent.d.ts +11 -0
- package/dist/core/scroll-intelligence/runtime.d.ts +21 -0
- package/dist/core/scroll-intelligence/schema.d.ts +78 -0
- package/dist/core/scroll-intelligence/types.d.ts +85 -0
- package/dist/core/spring.d.ts +38 -0
- package/dist/core/svg-morph/animator.d.ts +10 -0
- package/dist/core/svg-morph/arc-to-cubic.d.ts +11 -0
- package/dist/core/svg-morph/index.d.ts +10 -0
- package/dist/core/svg-morph/interpolate.d.ts +23 -0
- package/dist/core/svg-morph/normalize.d.ts +34 -0
- package/dist/core/svg-morph/parser.d.ts +13 -0
- package/dist/core/svg-morph/shapes.d.ts +32 -0
- package/dist/core/svg-morph/types.d.ts +144 -0
- package/dist/core/transform.d.ts +27 -0
- package/dist/core/transitions/controller.d.ts +45 -0
- package/dist/core/transitions/engine.d.ts +26 -0
- package/dist/core/transitions/group-transition.d.ts +30 -0
- package/dist/core/transitions/index.d.ts +15 -0
- package/dist/core/transitions/presets.d.ts +16 -0
- package/dist/core/transitions/schema.d.ts +71 -0
- package/dist/core/transitions/shared-element-transition.d.ts +88 -0
- package/dist/core/transitions/shared-element.d.ts +84 -0
- package/dist/core/transitions/types.d.ts +185 -0
- package/dist/core/transitions/view-transition.d.ts +25 -0
- package/dist/core/typography/engine.d.ts +19 -0
- package/dist/core/typography/index.d.ts +15 -0
- package/dist/core/typography/path-motion.d.ts +24 -0
- package/dist/core/typography/presets.d.ts +14 -0
- package/dist/core/typography/properties.d.ts +19 -0
- package/dist/core/typography/segmenter.d.ts +32 -0
- package/dist/core/typography/stagger.d.ts +15 -0
- package/dist/core/typography/transitions.d.ts +11 -0
- package/dist/core/typography/types.d.ts +154 -0
- package/dist/core/utils/safe-json.d.ts +50 -0
- package/dist/core/visual-style-registry.d.ts +659 -0
- package/dist/easing/easings.d.ts +44 -0
- package/dist/effects/border-beam.d.ts +28 -0
- package/dist/effects/count-up.d.ts +30 -0
- package/dist/effects/cursor-trail.d.ts +23 -0
- package/dist/effects/drag.d.ts +41 -0
- package/dist/effects/draw-svg.d.ts +19 -0
- package/dist/effects/follow-pointer.d.ts +19 -0
- package/dist/effects/glow.d.ts +25 -0
- package/dist/effects/gradient-text.d.ts +22 -0
- package/dist/effects/hover-motion.d.ts +32 -0
- package/dist/effects/in-view.d.ts +14 -0
- package/dist/effects/magnetic.d.ts +40 -0
- package/dist/effects/morph-svg.d.ts +15 -0
- package/dist/effects/parallax.d.ts +42 -0
- package/dist/effects/pinch.d.ts +27 -0
- package/dist/effects/reveal.d.ts +33 -0
- package/dist/effects/ripple.d.ts +21 -0
- package/dist/effects/scroll-animate.d.ts +23 -0
- package/dist/effects/scroll-direction.d.ts +19 -0
- package/dist/effects/scroll-progress.d.ts +29 -0
- package/dist/effects/scroll-trigger.d.ts +22 -0
- package/dist/effects/scroll-velocity.d.ts +29 -0
- package/dist/effects/shine.d.ts +23 -0
- package/dist/effects/split-text.d.ts +17 -0
- package/dist/effects/spotlight.d.ts +24 -0
- package/dist/effects/stagger.d.ts +46 -0
- package/dist/effects/swipe.d.ts +27 -0
- package/dist/effects/text-highlight.d.ts +25 -0
- package/dist/effects/text-mask.d.ts +25 -0
- package/dist/effects/text-reveal.d.ts +28 -0
- package/dist/effects/text-scramble.d.ts +18 -0
- package/dist/effects/tilt.d.ts +42 -0
- package/dist/effects/typewriter.d.ts +26 -0
- package/dist/graphics/capabilities.d.ts +12 -0
- package/dist/graphics/composition/engine.d.ts +14 -0
- package/dist/graphics/composition/fallback.d.ts +13 -0
- package/dist/graphics/composition/index.d.ts +10 -0
- package/dist/graphics/composition/ordering.d.ts +29 -0
- package/dist/graphics/composition/quality.d.ts +24 -0
- package/dist/graphics/composition/schema.d.ts +156 -0
- package/dist/graphics/composition/types.d.ts +81 -0
- package/dist/graphics/composition/unified.d.ts +23 -0
- package/dist/graphics/effects/advanced/engine.d.ts +9 -0
- package/dist/graphics/effects/advanced/index.d.ts +1 -0
- package/dist/graphics/effects/composer.d.ts +9 -0
- package/dist/graphics/effects/distortion/engine.d.ts +9 -0
- package/dist/graphics/effects/distortion/index.d.ts +1 -0
- package/dist/graphics/effects/fluid/engine.d.ts +9 -0
- package/dist/graphics/effects/fluid/index.d.ts +1 -0
- package/dist/graphics/effects/index.d.ts +10 -0
- package/dist/graphics/effects/particles/engine.d.ts +9 -0
- package/dist/graphics/effects/particles/index.d.ts +2 -0
- package/dist/graphics/effects/particles/pool.d.ts +17 -0
- package/dist/graphics/effects/schema.d.ts +312 -0
- package/dist/graphics/effects/types.d.ts +85 -0
- package/dist/graphics/engine.d.ts +5 -0
- package/dist/graphics/environment/clouds.d.ts +28 -0
- package/dist/graphics/environment/environment.d.ts +50 -0
- package/dist/graphics/environment/fire-smoke.d.ts +32 -0
- package/dist/graphics/environment/fog.d.ts +28 -0
- package/dist/graphics/environment/index.d.ts +18 -0
- package/dist/graphics/environment/lightning.d.ts +33 -0
- package/dist/graphics/environment/rain.d.ts +33 -0
- package/dist/graphics/environment/snow.d.ts +30 -0
- package/dist/graphics/environment/types.d.ts +184 -0
- package/dist/graphics/environment/weather.d.ts +19 -0
- package/dist/graphics/environment/wind.d.ts +23 -0
- package/dist/graphics/fluid/flow-field.d.ts +74 -0
- package/dist/graphics/fluid/grid.d.ts +43 -0
- package/dist/graphics/fluid/index.d.ts +13 -0
- package/dist/graphics/fluid/interactions.d.ts +39 -0
- package/dist/graphics/fluid/rendering.d.ts +32 -0
- package/dist/graphics/fluid/simulation.d.ts +50 -0
- package/dist/graphics/fluid/solver.d.ts +19 -0
- package/dist/graphics/fluid/types.d.ts +186 -0
- package/dist/graphics/gpu-simulation/backends/backend.d.ts +24 -0
- package/dist/graphics/gpu-simulation/backends/cpu.d.ts +21 -0
- package/dist/graphics/gpu-simulation/backends/selection.d.ts +15 -0
- package/dist/graphics/gpu-simulation/backends/webgl2.d.ts +28 -0
- package/dist/graphics/gpu-simulation/backends/webgpu.d.ts +23 -0
- package/dist/graphics/gpu-simulation/capabilities.d.ts +14 -0
- package/dist/graphics/gpu-simulation/device.d.ts +17 -0
- package/dist/graphics/gpu-simulation/engine.d.ts +8 -0
- package/dist/graphics/gpu-simulation/index.d.ts +22 -0
- package/dist/graphics/gpu-simulation/ping-pong.d.ts +23 -0
- package/dist/graphics/gpu-simulation/pipeline.d.ts +18 -0
- package/dist/graphics/gpu-simulation/resource-manager.d.ts +8 -0
- package/dist/graphics/gpu-simulation/shaders.d.ts +50 -0
- package/dist/graphics/gpu-simulation/types.d.ts +288 -0
- package/dist/graphics/index.d.ts +23 -0
- package/dist/graphics/materials/glass.d.ts +22 -0
- package/dist/graphics/materials/index.d.ts +9 -0
- package/dist/graphics/materials/lighting.d.ts +22 -0
- package/dist/graphics/materials/presets.d.ts +28 -0
- package/dist/graphics/materials/schema.d.ts +574 -0
- package/dist/graphics/materials/surface.d.ts +13 -0
- package/dist/graphics/materials/types.d.ts +150 -0
- package/dist/graphics/particle-fields/composition.d.ts +32 -0
- package/dist/graphics/particle-fields/forces.d.ts +103 -0
- package/dist/graphics/particle-fields/index.d.ts +12 -0
- package/dist/graphics/particle-fields/interaction.d.ts +32 -0
- package/dist/graphics/particle-fields/spatial-index.d.ts +20 -0
- package/dist/graphics/particle-fields/system.d.ts +52 -0
- package/dist/graphics/particle-fields/types.d.ts +138 -0
- package/dist/graphics/particles/behaviors.d.ts +11 -0
- package/dist/graphics/particles/controller.d.ts +82 -0
- package/dist/graphics/particles/data-layout.d.ts +51 -0
- package/dist/graphics/particles/emitters.d.ts +24 -0
- package/dist/graphics/particles/index.d.ts +15 -0
- package/dist/graphics/particles/random.d.ts +25 -0
- package/dist/graphics/particles/rendering.d.ts +16 -0
- package/dist/graphics/particles/simulation.d.ts +23 -0
- package/dist/graphics/particles/types.d.ts +282 -0
- package/dist/graphics/renderer.d.ts +66 -0
- package/dist/graphics/resource-manager.d.ts +6 -0
- package/dist/graphics/schema.d.ts +177 -0
- package/dist/graphics/simulation/adapters.d.ts +36 -0
- package/dist/graphics/simulation/coordinator.d.ts +64 -0
- package/dist/graphics/simulation/index.d.ts +11 -0
- package/dist/graphics/simulation/optimizer.d.ts +101 -0
- package/dist/graphics/simulation/resource-manager.d.ts +40 -0
- package/dist/graphics/simulation/types.d.ts +126 -0
- package/dist/graphics/textures/cache.d.ts +29 -0
- package/dist/graphics/textures/canvas-utils.d.ts +31 -0
- package/dist/graphics/textures/engine.d.ts +34 -0
- package/dist/graphics/textures/generators.d.ts +29 -0
- package/dist/graphics/textures/index.d.ts +11 -0
- package/dist/graphics/textures/material-integration.d.ts +20 -0
- package/dist/graphics/textures/prng.d.ts +27 -0
- package/dist/graphics/textures/schema.d.ts +219 -0
- package/dist/graphics/textures/types.d.ts +80 -0
- package/dist/graphics/types.d.ts +152 -0
- package/dist/graphics/viewport.d.ts +32 -0
- package/dist/index.d.ts +132 -0
- package/dist/index.js +4921 -0
- package/dist/mcp/index.d.ts +12 -0
- package/dist/mcp/prompts.d.ts +9 -0
- package/dist/mcp/resources.d.ts +9 -0
- package/dist/mcp/server.d.ts +29 -0
- package/dist/mcp/tools.d.ts +9 -0
- package/dist/mcp/transport.d.ts +33 -0
- package/dist/mcp/types.d.ts +96 -0
- package/dist/presets.d.ts +176 -0
- package/dist/presets.js +3 -0
- package/dist/react.d.ts +5358 -0
- package/dist/react.js +7557 -0
- package/package.json +112 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes for **Auto Flow Motion (`af-motion` / AF Motion)** leading into V1 Release Readiness (`1.0.0`) are documented below.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## [1.0.0] — V1 Release Candidate
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **Core Motion Engine (`af-motion`)**: Web Animations and shared `requestAnimationFrame` progress engine (`animate`, `animateProgress`), damped physical spring and inertia solvers (`animateSpring`, `animateInertia`), custom easing registry (`easings`, `registerEasing`, `getEasing`, `removeEasing`), multi-track timeline choreography (`createTimeline`), layered transform composition (`magnetic`, `tilt`, `parallax`), scroll triggers/observers (`reveal`, `stagger`, `inView`, `scrollProgress`, `scrollVelocity`, `scrollTrigger`), canvas backgrounds (`aurora`, `particleField`), and 33 built-in semantic color palettes.
|
|
11
|
+
- **Optional React Bindings (`af-motion/react`)**: Framework-optional React integration providing hooks and components (`useAnimate`, `useInView`, `useMicrointeraction`, `useMotionAccessibility`, `Reveal`, `Interactive`, `AnimatedText`, `GlassSurface`) with Strict Mode and SSR compatibility.
|
|
12
|
+
- **Capability Catalogue, Styles & Intelligence (`af-motion/catalogue`)**: 19 visual design styles (`visualStyleRegistry`), 5 Motion DNA personality profiles (`precise`, `playful`, `elegant`, `energetic`, `editorial-flow`), AI capability registry (`aiMotionRegistry`), offline deterministic Design-to-Motion and AI Scene Generation engines, motion quality validation/optimization (`validateMotionConfig`, `optimizeMotion`), multi-agent task planner & safe tool registry, and MCP server (`createAFMotionMCPServer`, `StdioTransport`, `InMemoryTransport`).
|
|
13
|
+
- **Presets & Choreography (`af-motion/presets`)**: 39 standardized presets (`listPresets`, `getPreset`, `applyPreset`, `animatePreset`, `registerAnimationPreset`) and reusable choreography helpers.
|
|
14
|
+
- **Developer CLI (`af-motion`)**: Terminal tooling (`init`, `doctor`, `validate`, `presets`, `info`, `example`) exposed via `bin/af-motion.js` and `bin/mcp-server.js`.
|
|
15
|
+
- **Standalone Ecosystem Apps**: Internal interactive Studio (`studio/`), standalone interactive Documentation Hub (`docs/`), and standalone public Website (`website/`).
|
|
16
|
+
- **Shared Safety & Path Containment Helpers**: `src/core/utils/safe-json.ts` (prototype-key-stripping JSON parsing, circular reference guards, JSX/attribute/CSS/comment escaping, error path redaction) and `src/cli/utils/safety.ts` (workspace-root path containment).
|
|
17
|
+
|
|
18
|
+
### Security
|
|
19
|
+
- Enforced workspace-root path containment (`resolveSafeWorkspacePath`) across CLI file writes (`init`, `example`, `presets --out`), blocked prototype-polluting CLI flags (`--__proto__`, `--constructor`, `--prototype`), validated `--template`/`--lang`/`--format` allowlists, and serialized preset literals in TypeScript exports.
|
|
20
|
+
- Bounded MCP `StdioTransport` stdin buffer (`1 MB`), detached `stdin` listeners on `close()`, validated JSON-RPC `params` and tool arguments as plain objects, and stripped local OS filesystem paths from external MCP error messages.
|
|
21
|
+
- Enforced approval boundaries (`onApprovalRequired` / `approvalGranted`), bounded workflow sizes (`MAX_WORKFLOW_TASKS = 100`, `MAX_TASK_RETRIES = 5`), real timeout cutoffs inside execution and retry loops, `64 KB` message bus payload limits, `1000`-message history bounds, and safe identifier sanitization in `SafeToolRegistry`.
|
|
22
|
+
- Escaped JSX text, attributes, JS string literals, CSS values, and block comments in deterministic code generation; stripped `__proto__`, `constructor`, and `prototype` keys during JSON deserialization across 3D schemas, compositions, design systems, Motion DNA, choreographies, and visual style registries.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Fixed per-frame `THREE.AmbientLight`, `DirectionalLight`, and `PointLight` reallocation/scene-graph memory leak in `createThreeRendererAdapter` (`src/3d/adapter.ts`) so existing lights are updated and excess lights removed cleanly.
|
|
26
|
+
- Fixed WebGL cleanup lifecycle on `webglcontextlost` in `SceneCanvas` (`website/src/components/three/SceneCanvas.tsx`) and released temporary WebGL probe contexts via `WEBGL_lose_context` (`website/src/utils/webgl.ts`).
|
|
27
|
+
- Fixed syntax error `overflow-y auto;` in `studio/studio.css` preventing Studio production builds.
|
|
28
|
+
- Rejected `NaN`, `Infinity`, negative durations/repeats, array configs, and circular `transform` references cleanly inside `validateMotionConfig()`.
|
|
29
|
+
|
|
30
|
+
- Resolved overloaded `classifyMotionIntent()` signature ambiguity between `animation-intelligence` (natural language/component selection) and `ai-motion-intelligence` (configuration analysis) inside `af-motion/catalogue`.
|
|
31
|
+
|
|
32
|
+
### Documentation
|
|
33
|
+
- Fixed four non-existent public import references in `docs/components/interactive/ReactPlayground.tsx` (`prefersReducedMotion`) and `docs/data/docs-content.ts` (`cubicBezier`, `registerCustomPalette`, `createPBRMaterial`) to reference verified public exports (`isAccessible`, `registerEasing`/`getEasing`, `registerPalette`, `getMaterial3DPreset`/`validateMaterial3D`).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,203 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# AF Motion (Auto Flow Motion)
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
|
|
5
|
+
**Auto Flow Motion (AF Motion)** is a framework-independent JavaScript and TypeScript animation engine paired with optional React 19 bindings, spring and inertia physics, multi-track timelines, visual effects, 19 design styles, 33 curated palettes, 5 Motion DNA profiles, 3D/GPU tooling, deterministic AI Motion Intelligence, a developer CLI, and an offline Model Context Protocol (MCP) server.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Core Capabilities
|
|
10
|
+
|
|
11
|
+
- **Framework-Independent Core (`af-motion`)**: Web Animations API and shared `requestAnimationFrame` progress engine (`animate`, `animateProgress`), damped springs (`animateSpring`), inertia physics (`animateInertia`), custom easing registry (`easings`, `registerEasing`), multi-track timelines (`createTimeline`), layered transforms (`magnetic`, `tilt`, `parallax`), scroll triggers/observers (`reveal`, `stagger`, `inView`, `scrollProgress`, `scrollVelocity`, `scrollTrigger`), canvas backgrounds (`aurora`, `particleField`), and 33 semantic palettes.
|
|
12
|
+
- **Optional React Bindings (`af-motion/react`)**: Client hooks and components (`useAnimate`, `useInView`, `useMicrointeraction`, `useMotionAccessibility`, `Reveal`, `Interactive`, `AnimatedText`, `GlassSurface`) with zero React dependency leaked into core modules.
|
|
13
|
+
- **Presets & Choreography (`af-motion/presets`)**: `39` built-in motion presets (`listPresets`, `getPreset`, `applyPreset`, `animatePreset`, `registerAnimationPreset`) and synchronized cross-system choreography helpers.
|
|
14
|
+
- **Catalogue, Styles, 3D & Intelligence (`af-motion/catalogue`)**: `19` visual design styles, `5` Motion DNA personalities (`precise`, `playful`, `elegant`, `energetic`, `editorial-flow`), `validateMotionConfig()`, `optimizeMotion()`, offline deterministic Design-to-Motion and Scene Generation, safe agent workflow planning, 3D scene/GPU utilities, and `createAFMotionMCPServer`.
|
|
15
|
+
- **Developer CLI & MCP (`af-motion`, `af-motion-mcp`)**: Terminal commands (`init`, `doctor`, `validate`, `presets`, `info`, `example`) and stdio JSON-RPC 2.0 MCP server.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install af-motion
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`react` is an optional peer dependency (`^18.0.0 || ^19.0.0`). Vanilla JS/TS, Preset, Catalogue, CLI, and MCP workflows run without React installed.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
### Basic DOM Animation
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { animate } from "af-motion";
|
|
35
|
+
|
|
36
|
+
const controls = animate(
|
|
37
|
+
".card",
|
|
38
|
+
{ opacity: [0, 1], transform: ["translateY(16px)", "translateY(0px)"] },
|
|
39
|
+
{ duration: 360, easing: "easeOutCubic" }
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
// Supports pause(), resume(), reverse(), seek(), and cancel()
|
|
43
|
+
controls.cancel();
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### React Integration (`af-motion/react`)
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
"use client";
|
|
50
|
+
|
|
51
|
+
import { Interactive, Reveal, useAnimate } from "af-motion/react";
|
|
52
|
+
|
|
53
|
+
export function MotionCard() {
|
|
54
|
+
const { ref, animate } = useAnimate<HTMLDivElement>();
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<Reveal>
|
|
58
|
+
<Interactive>
|
|
59
|
+
<div
|
|
60
|
+
ref={ref}
|
|
61
|
+
onClick={() => animate({ opacity: [0.7, 1] }, { duration: 240 })}
|
|
62
|
+
>
|
|
63
|
+
Auto Flow Motion Card
|
|
64
|
+
</div>
|
|
65
|
+
</Interactive>
|
|
66
|
+
</Reveal>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Easing, Spring Physics & Timelines
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { animateSpring, createTimeline, registerEasing } from "af-motion";
|
|
75
|
+
|
|
76
|
+
registerEasing("smoothStep", (t) => t * t * (3 - 2 * t));
|
|
77
|
+
|
|
78
|
+
const spring = animateSpring({
|
|
79
|
+
from: 0,
|
|
80
|
+
to: 1,
|
|
81
|
+
config: { stiffness: 180, damping: 20, mass: 1 },
|
|
82
|
+
onUpdate: ({ position }) => console.log(position),
|
|
83
|
+
onComplete: () => console.log("settled"),
|
|
84
|
+
});
|
|
85
|
+
spring.cancel();
|
|
86
|
+
|
|
87
|
+
const timeline = createTimeline()
|
|
88
|
+
.addLabel("enter", 0)
|
|
89
|
+
.add({ target: ".hero", properties: { opacity: [0, 1] }, at: "enter" })
|
|
90
|
+
.add({
|
|
91
|
+
target: ".subtitle",
|
|
92
|
+
properties: { transform: ["translateY(12px)", "translateY(0px)"] },
|
|
93
|
+
at: { previous: "end", offset: -80 },
|
|
94
|
+
options: { duration: 400 },
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
timeline.play();
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Visual Effects & Cleanup
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import { inView, magneticElement, parallax, tilt } from "af-motion";
|
|
104
|
+
|
|
105
|
+
const mag = magneticElement(".cta-button", { strength: 0.25, distance: 120 });
|
|
106
|
+
const tlt = tilt(".preview-card");
|
|
107
|
+
const par = parallax(".layer", { speed: 0.2 });
|
|
108
|
+
const view = inView(".reveal-section", (el) => {
|
|
109
|
+
el.classList.add("is-visible");
|
|
110
|
+
return () => el.classList.remove("is-visible");
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// Idempotent listener & observer cleanup
|
|
114
|
+
mag.destroy();
|
|
115
|
+
tlt.destroy();
|
|
116
|
+
par.destroy();
|
|
117
|
+
view.destroy();
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Presets, Motion DNA & Palettes
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import { animatePreset, getMotionDNA, registerPalette } from "af-motion";
|
|
124
|
+
import { applyPreset, listPresets } from "af-motion/presets";
|
|
125
|
+
|
|
126
|
+
const dna = getMotionDNA("precise");
|
|
127
|
+
animatePreset(".panel", "slideUp", { duration: dna?.duration ?? 320 });
|
|
128
|
+
|
|
129
|
+
const allPresets = listPresets();
|
|
130
|
+
applyPreset(".hero-title", allPresets[0].name);
|
|
131
|
+
|
|
132
|
+
registerPalette({
|
|
133
|
+
name: "Brand Obsidian",
|
|
134
|
+
primary: "#38BDF8",
|
|
135
|
+
secondary: "#0F172A",
|
|
136
|
+
accent: "#F472B6",
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Catalogue, Validation, 3D/GPU & Offline AI Intelligence
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
import {
|
|
144
|
+
aiMotionRegistry,
|
|
145
|
+
createScene3D,
|
|
146
|
+
designToMotionEngine,
|
|
147
|
+
evaluateMotionQuality,
|
|
148
|
+
validateMotionConfig,
|
|
149
|
+
} from "af-motion/catalogue";
|
|
150
|
+
|
|
151
|
+
const searchResults = aiMotionRegistry.searchCapabilities({ term: "spring" });
|
|
152
|
+
|
|
153
|
+
const report = validateMotionConfig({
|
|
154
|
+
duration: 320,
|
|
155
|
+
properties: { opacity: [0, 1], transform: ["translateY(8px)", "translateY(0px)"] },
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
const quality = evaluateMotionQuality({
|
|
159
|
+
configuration: { duration: 320, properties: { opacity: [0, 1] } },
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
const scene = createScene3D({ id: "preview-3d", autoStart: false });
|
|
163
|
+
scene.destroy();
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## CLI & MCP Server
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Project tooling
|
|
172
|
+
npx af-motion init --template vanilla-ts
|
|
173
|
+
npx af-motion doctor
|
|
174
|
+
npx af-motion validate af-motion.config.json
|
|
175
|
+
npx af-motion presets
|
|
176
|
+
npx af-motion example spring --print
|
|
177
|
+
|
|
178
|
+
# Offline MCP server (stdio JSON-RPC 2.0)
|
|
179
|
+
npx af-motion-mcp
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Documentation, Release Notes & Source
|
|
185
|
+
|
|
186
|
+
- **Source & Issues**: [github.com/Spade-2006/af-motion](https://github.com/Spade-2006/af-motion)
|
|
187
|
+
- **Changelog**: [CHANGELOG.md](./CHANGELOG.md)
|
|
188
|
+
- **Release Notes**: [RELEASE_NOTES.md](./RELEASE_NOTES.md)
|
|
189
|
+
- **Interactive Docs App** (repository workspace): `npm run docs`
|
|
190
|
+
- **Public Website App** (repository workspace): `npm run website`
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Compatibility Information
|
|
195
|
+
|
|
196
|
+
- **Verified**: Node.js `v24.17.0` (`>=18.0.0` declared in `engines`), React `^19.3.1` (`StrictMode`, SSR `renderToString`, hydration), JSDOM `^26.1.0`, TypeScript `^7.0.2`.
|
|
197
|
+
- **Declared / Unverified Locally**: React `^18.0.0`, Node.js `18` LTS, Bun, Deno, Next.js App Router runtime, and live Chromium/Firefox/Safari WebGL2 browser execution.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
MIT © Satyansh Acharya
|
package/RELEASE_NOTES.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# AF Motion — V1 Release Notes (`v1.0.0`)
|
|
2
|
+
|
|
3
|
+
## Product Overview
|
|
4
|
+
|
|
5
|
+
**Auto Flow Motion (AF Motion)** (`af-motion`) is a framework-independent JavaScript and TypeScript animation engine paired with optional React bindings, physics solvers, 19 visual design styles, 33 built-in palettes, 5 Motion DNA profiles, 3D/GPU helpers, offline deterministic Motion Intelligence, a Model Context Protocol (MCP) server, and developer CLI tooling.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Package Entry Points
|
|
10
|
+
|
|
11
|
+
All public APIs are exposed through four official ESM subpaths (with zero runtime dependencies):
|
|
12
|
+
|
|
13
|
+
| Subpath | Runtime Exports | Purpose |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `af-motion` | 107 | Core WAAPI & frame engine (`animate`, `animateSpring`, `easings`, backgrounds, effects, palettes) |
|
|
16
|
+
| `af-motion/react` | 289 | Optional React hooks & components (`useAnimate`, `useMicrointeraction`, `useMotionAccessibility`, `Reveal`, `Interactive`) |
|
|
17
|
+
| `af-motion/catalogue` | 1,447 | Capabilities, visual styles, Motion DNA, validation, deterministic AI generation, agents, and MCP |
|
|
18
|
+
| `af-motion/presets` | 97 | 39 standardized presets & recipes (`listPresets`, `getPreset`, `applyPreset`) |
|
|
19
|
+
|
|
20
|
+
Additional executables:
|
|
21
|
+
- `af-motion` (`bin/af-motion.js`): Developer CLI (`init`, `doctor`, `validate`, `presets`, `info`, `example`)
|
|
22
|
+
- `af-motion-mcp` (`bin/mcp-server.js`): Offline stdio Model Context Protocol server
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Installation & Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install af-motion
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Core JavaScript / TypeScript
|
|
33
|
+
```ts
|
|
34
|
+
import { animate } from "af-motion";
|
|
35
|
+
|
|
36
|
+
const controls = animate(".card", { opacity: [0, 1], transform: ["translateY(16px)", "translateY(0px)"] }, {
|
|
37
|
+
duration: 360,
|
|
38
|
+
easing: "easeOutCubic",
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// Cancel cleanly if needed
|
|
42
|
+
controls.cancel();
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### React Integration
|
|
46
|
+
```tsx
|
|
47
|
+
"use client";
|
|
48
|
+
|
|
49
|
+
import { Interactive, Reveal, useAnimate } from "af-motion/react";
|
|
50
|
+
|
|
51
|
+
export function MotionCard() {
|
|
52
|
+
const { ref, animate } = useAnimate<HTMLDivElement>();
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Reveal>
|
|
56
|
+
<Interactive>
|
|
57
|
+
<div
|
|
58
|
+
ref={ref}
|
|
59
|
+
onClick={() => animate({ opacity: [0.6, 1] }, { duration: 240 })}
|
|
60
|
+
>
|
|
61
|
+
Interactive Card
|
|
62
|
+
</div>
|
|
63
|
+
</Interactive>
|
|
64
|
+
</Reveal>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Presets & Catalogue
|
|
70
|
+
```ts
|
|
71
|
+
import { applyPreset, listPresets } from "af-motion/presets";
|
|
72
|
+
import { aiMotionRegistry, validateMotionConfig } from "af-motion/catalogue";
|
|
73
|
+
|
|
74
|
+
const presets = listPresets();
|
|
75
|
+
applyPreset(".hero", presets[0].name);
|
|
76
|
+
|
|
77
|
+
const capabilities = aiMotionRegistry.searchCapabilities({ term: "spring" });
|
|
78
|
+
const validation = validateMotionConfig({ duration: 300, properties: { opacity: [0, 1] } });
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### CLI Tooling
|
|
82
|
+
```bash
|
|
83
|
+
npx af-motion init --template vanilla-ts
|
|
84
|
+
npx af-motion doctor
|
|
85
|
+
npx af-motion validate af-motion.config.json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Important API Notes
|
|
91
|
+
|
|
92
|
+
- **GPU-First Animation**: Animate composited properties (`transform`, `opacity`) where possible; `validateMotionConfig()` flags layout-triggering properties (`width`, `height`, `top`, `left`, `margin`) and accessibility hazards.
|
|
93
|
+
- **Reduced Motion**: `animate()` and `animateSpring()` respect `prefers-reduced-motion` by default (`respectReducedMotion: true`), completing immediately at endpoints when enabled.
|
|
94
|
+
- **Background-Tab Pacing**: Shared `requestAnimationFrame` loops pause automatically while `document.hidden === true`.
|
|
95
|
+
- **Node Built-in Isolation**: Core, React, Catalogue, and Presets subpaths contain zero Node built-ins for browser compatibility; CLI filesystem operations remain isolated in `bin/` and `dist/cli.js`.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Verified & Unverified Compatibility
|
|
100
|
+
|
|
101
|
+
- **Verified Environments**:
|
|
102
|
+
- `Node.js v24.17.0` (CLI, MCP, ESM package resolution, Vite builds, TypeScript `^7.0.2` compilation, 38 Vitest suites / 785 tests)
|
|
103
|
+
- `React ^19.3.1` (`StrictMode`, `renderToString` SSR, client hydration, unmount cleanup)
|
|
104
|
+
- `JSDOM ^26.1.0` (DOM animations, cancellation, observer cleanup with stubbed observers, `ThreeErrorBoundary` + 2D fallback)
|
|
105
|
+
- **Declared / Unverified Environments**:
|
|
106
|
+
- `React 18` (`^18.0.0` declared in `peerDependencies`, not executed locally)
|
|
107
|
+
- Live desktop/mobile browsers: `Chromium`, `Firefox`, `Safari/WebKit` (not verified in an interactive GPU browser session)
|
|
108
|
+
- `Bun`, `Deno`, `Node.js 18 LTS`, and full `Next.js` App Router server/client runtime (not installed/executed in this environment)
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Known Limitations
|
|
113
|
+
|
|
114
|
+
- Real-browser visual testing (WebGL2 shader frames, live WAAPI frame timing, pointer/scroll smoothness, and clipboard permission prompts across Chrome, Firefox, and Safari) should be run in CI/target browsers prior to public npm announcement.
|
|
115
|
+
- Two lazy function-level mutual reference pairs (`core/motion-choreography.ts <-> presets.ts`, `core/motion-recipe.ts <-> presets.ts`) remain intentionally in `src/`; runtime execution and Rollup/Vite bundling succeed cleanly.
|
package/bin/af-motion.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AF Motion CLI — Executable Binary Entrypoint
|
|
5
|
+
*
|
|
6
|
+
* Dispatches terminal commands to the AF Motion developer tooling engine.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { runCLI } from "../dist/cli.js";
|
|
10
|
+
|
|
11
|
+
runCLI(process.argv.slice(2)).then((code) => {
|
|
12
|
+
process.exit(code ?? 0);
|
|
13
|
+
}).catch((err) => {
|
|
14
|
+
console.error("Fatal CLI Error:", err);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AF Motion Model Context Protocol (MCP) Stdio Server
|
|
5
|
+
*
|
|
6
|
+
* Standalone executable entrypoint running the AF Motion MCP server over standard input/output.
|
|
7
|
+
* Compatible with Cursor, Claude Desktop, Claude Code, Antigravity, and Codex.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { createAFMotionMCPServer, StdioTransport } from "../dist/catalogue.js";
|
|
11
|
+
|
|
12
|
+
const transport = new StdioTransport();
|
|
13
|
+
const server = createAFMotionMCPServer({ transport });
|
|
14
|
+
|
|
15
|
+
const cleanup = async () => {
|
|
16
|
+
await server.close();
|
|
17
|
+
process.exit(0);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
process.on("SIGINT", cleanup);
|
|
21
|
+
process.on("SIGTERM", cleanup);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion 3D Renderer Adapters
|
|
3
|
+
*
|
|
4
|
+
* Implements framework-independent renderer adapters, including the optional
|
|
5
|
+
* Three.js adapter and the graceful fallback Null renderer adapter.
|
|
6
|
+
*/
|
|
7
|
+
import type { Renderer3DAdapter, Renderer3DConfig, Scene3DCapabilities } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Fallback Null Renderer Adapter used when WebGL or Three.js is unavailable.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createNullRenderer3DAdapter(): Renderer3DAdapter;
|
|
12
|
+
export interface ThreeAdapterOptions {
|
|
13
|
+
/** Optional custom or injected THREE library namespace */
|
|
14
|
+
readonly THREE?: any;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Check if Three.js is available either in global scope or provided options.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isThreeAvailable(customThree?: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Create an optional Three.js Renderer Adapter.
|
|
22
|
+
* Does not force Three.js into the core bundle. If Three.js is absent,
|
|
23
|
+
* falls back gracefully.
|
|
24
|
+
*/
|
|
25
|
+
export declare function createThreeRendererAdapter(options?: ThreeAdapterOptions): Renderer3DAdapter;
|
|
26
|
+
/**
|
|
27
|
+
* Create a suitable 3D renderer adapter based on configuration and available capabilities.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createRenderer3DAdapter(config?: Renderer3DConfig, capabilities?: Scene3DCapabilities): Renderer3DAdapter;
|