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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { ComposableEffect } from "./effect-composer.js";
|
|
2
|
+
import type { MotionChoreographyAction, MotionChoreographyControls } from "./motion-choreography.js";
|
|
3
|
+
/** Registers the choreography engine to eliminate circular module dependencies between recipe and choreography. */
|
|
4
|
+
export declare function registerChoreographyEngine(engine: (actions: readonly MotionChoreographyAction[]) => MotionChoreographyControls): void;
|
|
5
|
+
import type { MotionDNA, MotionDNAOverrides } from "./motion-dna.js";
|
|
6
|
+
import type { AnimateTarget } from "./animate.js";
|
|
7
|
+
import type { MotionPresetOverrides } from "../presets.js";
|
|
8
|
+
export declare const RECIPE_SCHEMA_VERSION = "1.0.0";
|
|
9
|
+
export interface MotionRecipeContext {
|
|
10
|
+
/** Resolves DNA declared by the recipe with per-use overrides. */
|
|
11
|
+
motionDNA(name: string, overrides?: MotionDNAOverrides): MotionDNA;
|
|
12
|
+
}
|
|
13
|
+
export interface MotionRecipeDefinition<Parameters extends object> {
|
|
14
|
+
/** DNA names this recipe is allowed to resolve. */
|
|
15
|
+
motionDNA?: readonly string[];
|
|
16
|
+
/** Builds effect entries that run for the recipe's lifetime. */
|
|
17
|
+
effects?: (parameters: Readonly<Parameters>, context: MotionRecipeContext) => readonly ComposableEffect[];
|
|
18
|
+
/** Builds the ordered choreography to execute for this recipe. */
|
|
19
|
+
choreography?: (parameters: Readonly<Parameters>, context: MotionRecipeContext) => readonly MotionChoreographyAction[];
|
|
20
|
+
}
|
|
21
|
+
export interface MotionRecipe<Parameters extends object> {
|
|
22
|
+
readonly definition: MotionRecipeDefinition<Parameters>;
|
|
23
|
+
}
|
|
24
|
+
export interface MotionRecipeControls {
|
|
25
|
+
/** Resolves when the recipe's choreography completes; undefined for effect-only recipes. */
|
|
26
|
+
readonly finished?: Promise<void>;
|
|
27
|
+
/** Pauses choreography animations and effects that expose pause controls. */
|
|
28
|
+
pause(): void;
|
|
29
|
+
/** Resumes choreography animations and effects that expose resume controls. */
|
|
30
|
+
resume(): void;
|
|
31
|
+
/** Stops the choreography and cleans up all recipe effects. Safe to repeat. */
|
|
32
|
+
destroy(): void;
|
|
33
|
+
/** Alias for destroy(). */
|
|
34
|
+
cancel(): void;
|
|
35
|
+
/** Optional play control when underlying engine supports forward playback. */
|
|
36
|
+
play?(): void;
|
|
37
|
+
/** Optional reverse control when recipe is a pure reversible sequence. */
|
|
38
|
+
reverse?(): void;
|
|
39
|
+
/** Optional seek control when recipe is a pure seekable sequence. */
|
|
40
|
+
seek?(progress: number): void;
|
|
41
|
+
}
|
|
42
|
+
export interface RecipeStepBase {
|
|
43
|
+
readonly label?: string;
|
|
44
|
+
readonly delay?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface RecipePresetStep extends RecipeStepBase {
|
|
47
|
+
readonly type?: "preset";
|
|
48
|
+
readonly preset: string;
|
|
49
|
+
readonly target?: AnimateTarget | string;
|
|
50
|
+
readonly duration?: number;
|
|
51
|
+
readonly easing?: string | ((t: number) => number);
|
|
52
|
+
readonly overrides?: MotionPresetOverrides;
|
|
53
|
+
}
|
|
54
|
+
export interface RecipeParallelStep extends RecipeStepBase {
|
|
55
|
+
readonly type: "parallel";
|
|
56
|
+
readonly steps: readonly RecipeStep[];
|
|
57
|
+
}
|
|
58
|
+
export interface RecipeSequenceStep extends RecipeStepBase {
|
|
59
|
+
readonly type: "sequence";
|
|
60
|
+
readonly steps: readonly RecipeStep[];
|
|
61
|
+
}
|
|
62
|
+
export interface RecipeNestedStep extends RecipeStepBase {
|
|
63
|
+
readonly type: "recipe";
|
|
64
|
+
readonly recipe: string | DeclarativeMotionRecipe;
|
|
65
|
+
readonly targets?: Record<string, AnimateTarget>;
|
|
66
|
+
readonly overrides?: MotionPresetOverrides;
|
|
67
|
+
}
|
|
68
|
+
export type RecipeStep = RecipePresetStep | RecipeParallelStep | RecipeSequenceStep | RecipeNestedStep;
|
|
69
|
+
export interface RecipeParameterSchema {
|
|
70
|
+
readonly name: string;
|
|
71
|
+
readonly type: string;
|
|
72
|
+
readonly description: string;
|
|
73
|
+
readonly required?: boolean;
|
|
74
|
+
readonly default?: unknown;
|
|
75
|
+
}
|
|
76
|
+
export interface DeclarativeMotionRecipe {
|
|
77
|
+
readonly id: string;
|
|
78
|
+
readonly name: string;
|
|
79
|
+
readonly description: string;
|
|
80
|
+
readonly category?: string;
|
|
81
|
+
readonly tags?: readonly string[];
|
|
82
|
+
readonly requiredTargets?: readonly string[];
|
|
83
|
+
readonly defaultOptions?: MotionPresetOverrides;
|
|
84
|
+
readonly structure?: "sequence" | "parallel";
|
|
85
|
+
readonly steps: readonly RecipeStep[];
|
|
86
|
+
readonly parameters?: readonly RecipeParameterSchema[];
|
|
87
|
+
}
|
|
88
|
+
export type RecipeTargetMap = Record<string, AnimateTarget>;
|
|
89
|
+
export interface RecipeRunOptions {
|
|
90
|
+
/** Named target bindings or a default fallback target. */
|
|
91
|
+
readonly targets?: RecipeTargetMap | AnimateTarget;
|
|
92
|
+
/** Recipe-level timing/animation option overrides. */
|
|
93
|
+
readonly overrides?: MotionPresetOverrides;
|
|
94
|
+
/** Step-specific overrides keyed by step label or index string. */
|
|
95
|
+
readonly stepOverrides?: Record<string, MotionPresetOverrides>;
|
|
96
|
+
}
|
|
97
|
+
export interface RecipeValidationError {
|
|
98
|
+
readonly parameter?: string;
|
|
99
|
+
readonly message: string;
|
|
100
|
+
}
|
|
101
|
+
export interface RecipeValidationResult {
|
|
102
|
+
readonly valid: boolean;
|
|
103
|
+
readonly errors: readonly RecipeValidationError[];
|
|
104
|
+
}
|
|
105
|
+
export interface RecipesDocument {
|
|
106
|
+
readonly $schema: string;
|
|
107
|
+
readonly version: string;
|
|
108
|
+
readonly totalRecipes: number;
|
|
109
|
+
readonly recipes: readonly DeclarativeMotionRecipe[];
|
|
110
|
+
}
|
|
111
|
+
export declare const BUILT_IN_MOTION_RECIPES: readonly DeclarativeMotionRecipe[];
|
|
112
|
+
/**
|
|
113
|
+
* Returns all registered motion recipes (built-in and custom).
|
|
114
|
+
*/
|
|
115
|
+
export declare function listRecipes(): readonly DeclarativeMotionRecipe[];
|
|
116
|
+
/**
|
|
117
|
+
* Looks up a recipe by its ID or friendly name.
|
|
118
|
+
*/
|
|
119
|
+
export declare function getRecipe(idOrName: string): DeclarativeMotionRecipe | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Searches recipes by keyword query matching ID, name, description, category, or tags.
|
|
122
|
+
*/
|
|
123
|
+
export declare function searchRecipes(query: string): readonly DeclarativeMotionRecipe[];
|
|
124
|
+
/**
|
|
125
|
+
* Registers a new custom declarative recipe. Built-in IDs and names are reserved.
|
|
126
|
+
*/
|
|
127
|
+
export declare function registerRecipe(recipe: DeclarativeMotionRecipe): void;
|
|
128
|
+
/**
|
|
129
|
+
* Removes a custom motion recipe. Built-in recipes cannot be removed.
|
|
130
|
+
*/
|
|
131
|
+
export declare function removeRecipe(idOrName: string): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Validates a declarative recipe definition against structure, preset existence, and circular references.
|
|
134
|
+
*/
|
|
135
|
+
export declare function validateRecipe(recipe: unknown, visitedRecipeIds?: Set<string>): RecipeValidationResult;
|
|
136
|
+
/**
|
|
137
|
+
* Validates run options against recipe requirements (e.g. required targets).
|
|
138
|
+
*/
|
|
139
|
+
export declare function validateRecipeRunOptions(recipeIdOrRecipe: string | DeclarativeMotionRecipe, options: unknown): RecipeValidationResult;
|
|
140
|
+
/**
|
|
141
|
+
* Runs a declarative recipe against target bindings and optional overrides.
|
|
142
|
+
*/
|
|
143
|
+
export declare function runRecipe(recipeIdOrRecipe: string | DeclarativeMotionRecipe, options?: RecipeRunOptions): MotionRecipeControls;
|
|
144
|
+
/**
|
|
145
|
+
* Creates and registers or freezes a declarative motion recipe.
|
|
146
|
+
*/
|
|
147
|
+
export declare function composeRecipe(recipe: DeclarativeMotionRecipe): DeclarativeMotionRecipe;
|
|
148
|
+
/**
|
|
149
|
+
* Exports a recipe definition as a JSON string.
|
|
150
|
+
*/
|
|
151
|
+
export declare function exportRecipeJson(recipeIdOrRecipe: string | DeclarativeMotionRecipe, pretty?: boolean): string;
|
|
152
|
+
/**
|
|
153
|
+
* Exports all registered recipes as a versioned document.
|
|
154
|
+
*/
|
|
155
|
+
export declare function exportRecipesDocument(): RecipesDocument;
|
|
156
|
+
/**
|
|
157
|
+
* Imports and validates a recipe definition from a JSON string.
|
|
158
|
+
*/
|
|
159
|
+
export declare function importRecipeFromJson(json: string): DeclarativeMotionRecipe;
|
|
160
|
+
/**
|
|
161
|
+
* Overload 1: Programmatic builder recipe with effects/choreography callbacks.
|
|
162
|
+
* Overload 2: Declarative motion recipe definition.
|
|
163
|
+
*/
|
|
164
|
+
export declare function createMotionRecipe<Parameters extends object>(definition: MotionRecipeDefinition<Parameters>): MotionRecipe<Parameters>;
|
|
165
|
+
export declare function createMotionRecipe(definition: DeclarativeMotionRecipe): DeclarativeMotionRecipe;
|
|
166
|
+
/**
|
|
167
|
+
* Overload 1: Runs a programmatic recipe with parameter object.
|
|
168
|
+
* Overload 2: Runs a declarative recipe with target bindings and overrides.
|
|
169
|
+
*/
|
|
170
|
+
export declare function runMotionRecipe<Parameters extends object>(recipe: MotionRecipe<Parameters>, parameters: Parameters): MotionRecipeControls;
|
|
171
|
+
export declare function runMotionRecipe(recipe: DeclarativeMotionRecipe | string, options?: RecipeRunOptions): MotionRecipeControls;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AnimateTarget, AnimationValue, DOMAnimationOptions } from "./animate.js";
|
|
2
|
+
import type { MotionDNAOverrides } from "./motion-dna.js";
|
|
3
|
+
export interface MotionStateDefinition {
|
|
4
|
+
/** CSS property values that define this state. */
|
|
5
|
+
readonly values: Readonly<Record<string, AnimationValue>>;
|
|
6
|
+
/** Per-state animation options. */
|
|
7
|
+
readonly options?: DOMAnimationOptions;
|
|
8
|
+
/** Optional Motion DNA identity for transitions to this state. */
|
|
9
|
+
readonly motionDNA?: {
|
|
10
|
+
name: string;
|
|
11
|
+
overrides?: MotionDNAOverrides;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export type MotionStateDefinitions = Readonly<Record<string, MotionStateDefinition>>;
|
|
15
|
+
export interface MotionStateTransitionOptions extends DOMAnimationOptions {
|
|
16
|
+
/** Optional Motion DNA identity applied to this transition. */
|
|
17
|
+
motionDNA?: {
|
|
18
|
+
name: string;
|
|
19
|
+
overrides?: MotionDNAOverrides;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface MotionStateTransitionControls {
|
|
23
|
+
readonly finished: Promise<void>;
|
|
24
|
+
cancel(): void;
|
|
25
|
+
}
|
|
26
|
+
export interface MotionStateControls {
|
|
27
|
+
readonly currentState: string | undefined;
|
|
28
|
+
/** Transitions from the currently rendered styles to a named state. */
|
|
29
|
+
transitionTo(name: string, options?: MotionStateTransitionOptions): MotionStateTransitionControls;
|
|
30
|
+
/** Cancels an active transition, restores styles captured at creation, and destroys the controller. */
|
|
31
|
+
destroy(): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Creates a named visual-state controller. Each transition starts at the current rendered CSS
|
|
35
|
+
* value and delegates interpolation, reduced-motion handling, and scheduling to `animate()`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createMotionStates(target: AnimateTarget, definitions: MotionStateDefinitions, options?: {
|
|
38
|
+
initialState?: string;
|
|
39
|
+
motionDNA?: {
|
|
40
|
+
name: string;
|
|
41
|
+
overrides?: MotionDNAOverrides;
|
|
42
|
+
};
|
|
43
|
+
}): MotionStateControls;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Consistency Intelligence Engine
|
|
3
|
+
*
|
|
4
|
+
* Evaluates motion consistency across durations, easings, Visual Style,
|
|
5
|
+
* Motion DNA, and cross-system choreography.
|
|
6
|
+
*/
|
|
7
|
+
import type { MotionConsistencyReport } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Evaluates holistic motion consistency across multiple components, transitions, or scenes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function evaluateMotionConsistency(configs?: readonly any[]): MotionConsistencyReport;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Motion Validation & Optimization Module
|
|
3
|
+
*
|
|
4
|
+
* Unified validation engine, accessibility intelligence, performance optimization,
|
|
5
|
+
* consistency analysis, and AI capability discovery.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./types.js";
|
|
8
|
+
export * from "./validator.js";
|
|
9
|
+
export * from "./optimizer.js";
|
|
10
|
+
export * from "./consistency.js";
|
|
11
|
+
export * from "./schema.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Performance & Accessibility Optimizer
|
|
3
|
+
*
|
|
4
|
+
* Safe, behavior-preserving optimization engine converting layout-triggering styles
|
|
5
|
+
* into GPU-accelerated transforms, dampening excessive filters, and ensuring accessibility.
|
|
6
|
+
*/
|
|
7
|
+
import type { MotionOptimizationOptions, MotionOptimizationResult } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Optimizes a motion configuration according to the specified safety level.
|
|
10
|
+
*/
|
|
11
|
+
export declare function optimizeMotion<T = any>(config: T, options?: MotionOptimizationOptions): MotionOptimizationResult<T>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Motion Validation Schema & AI Motion Registry Integration
|
|
3
|
+
*
|
|
4
|
+
* Machine-readable capability definitions and discovery helpers for
|
|
5
|
+
* motion validation, accessibility checking, and performance optimization.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MOTION_VALIDATION_CAPABILITY: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
category: "optimization";
|
|
11
|
+
description: string;
|
|
12
|
+
tags: string[];
|
|
13
|
+
version: string;
|
|
14
|
+
features: string[];
|
|
15
|
+
parameters: ({
|
|
16
|
+
name: string;
|
|
17
|
+
kind: "positional";
|
|
18
|
+
type: string;
|
|
19
|
+
required: boolean;
|
|
20
|
+
description: string;
|
|
21
|
+
} | {
|
|
22
|
+
name: string;
|
|
23
|
+
kind: "optional";
|
|
24
|
+
type: string;
|
|
25
|
+
required: boolean;
|
|
26
|
+
description: string;
|
|
27
|
+
})[];
|
|
28
|
+
supportedTargets: string[];
|
|
29
|
+
signature: {
|
|
30
|
+
importStatement: string;
|
|
31
|
+
invocation: string;
|
|
32
|
+
exampleCode: string;
|
|
33
|
+
};
|
|
34
|
+
controls: string[];
|
|
35
|
+
callbacks: never[];
|
|
36
|
+
reducedMotion: "static-fallback";
|
|
37
|
+
compatibility: {
|
|
38
|
+
browser: boolean;
|
|
39
|
+
ssr: boolean;
|
|
40
|
+
requiresCanvas: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare function getMotionValidationCapability(): {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
category: "optimization";
|
|
47
|
+
description: string;
|
|
48
|
+
tags: string[];
|
|
49
|
+
version: string;
|
|
50
|
+
features: string[];
|
|
51
|
+
parameters: ({
|
|
52
|
+
name: string;
|
|
53
|
+
kind: "positional";
|
|
54
|
+
type: string;
|
|
55
|
+
required: boolean;
|
|
56
|
+
description: string;
|
|
57
|
+
} | {
|
|
58
|
+
name: string;
|
|
59
|
+
kind: "optional";
|
|
60
|
+
type: string;
|
|
61
|
+
required: boolean;
|
|
62
|
+
description: string;
|
|
63
|
+
})[];
|
|
64
|
+
supportedTargets: string[];
|
|
65
|
+
signature: {
|
|
66
|
+
importStatement: string;
|
|
67
|
+
invocation: string;
|
|
68
|
+
exampleCode: string;
|
|
69
|
+
};
|
|
70
|
+
controls: string[];
|
|
71
|
+
callbacks: never[];
|
|
72
|
+
reducedMotion: "static-fallback";
|
|
73
|
+
compatibility: {
|
|
74
|
+
browser: boolean;
|
|
75
|
+
ssr: boolean;
|
|
76
|
+
requiresCanvas: boolean;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export declare function registerMotionValidationCapability(registry: {
|
|
80
|
+
registerCapability: (cap: any, opts?: any) => void;
|
|
81
|
+
}): void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Unified Motion Optimization & Validation Contracts
|
|
3
|
+
*
|
|
4
|
+
* Framework-independent contracts for validating animation configurations,
|
|
5
|
+
* accessibility compliance, performance profiling, and consistency analysis.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MOTION_VALIDATION_VERSION = "1.0.0";
|
|
8
|
+
export type ValidationSeverity = "error" | "warning" | "info";
|
|
9
|
+
export type ValidationIssueCategory = "layout-thrashing" | "expensive-filter" | "excessive-duration" | "excessive-intensity" | "reduced-motion-violation" | "accessibility-risk" | "seizure-risk" | "property-conflict" | "timing-inconsistency" | "dna-contradiction" | "unsupported-capability" | "lifecycle-risk";
|
|
10
|
+
export interface MotionValidationIssue {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly severity: ValidationSeverity;
|
|
13
|
+
readonly category: ValidationIssueCategory;
|
|
14
|
+
readonly property?: string;
|
|
15
|
+
readonly path?: string;
|
|
16
|
+
readonly message: string;
|
|
17
|
+
readonly suggestedFix?: string;
|
|
18
|
+
readonly autoFixable: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface MotionValidationResult {
|
|
21
|
+
readonly valid: boolean;
|
|
22
|
+
readonly score: number;
|
|
23
|
+
readonly accessibilityScore: number;
|
|
24
|
+
readonly performanceScore: number;
|
|
25
|
+
readonly consistencyScore: number;
|
|
26
|
+
readonly issues: readonly MotionValidationIssue[];
|
|
27
|
+
readonly summary: string;
|
|
28
|
+
}
|
|
29
|
+
export type OptimizationLevel = "safe" | "balanced" | "aggressive";
|
|
30
|
+
export interface MotionOptimizationOptions {
|
|
31
|
+
readonly level?: OptimizationLevel;
|
|
32
|
+
readonly deviceTier?: "low" | "medium" | "high";
|
|
33
|
+
readonly reducedMotion?: boolean;
|
|
34
|
+
readonly targetFPS?: 30 | 60 | 120;
|
|
35
|
+
}
|
|
36
|
+
export interface MotionOptimizationResult<T = any> {
|
|
37
|
+
readonly optimizedConfig: T;
|
|
38
|
+
readonly originalConfig: T;
|
|
39
|
+
readonly level: OptimizationLevel;
|
|
40
|
+
readonly appliedOptimizations: readonly string[];
|
|
41
|
+
readonly remainingTradeoffs: readonly string[];
|
|
42
|
+
readonly validationBefore: MotionValidationResult;
|
|
43
|
+
readonly validationAfter: MotionValidationResult;
|
|
44
|
+
}
|
|
45
|
+
export interface MotionConsistencyReport {
|
|
46
|
+
readonly consistencyScore: number;
|
|
47
|
+
readonly durationHarmonic: boolean;
|
|
48
|
+
readonly easingAligned: boolean;
|
|
49
|
+
readonly dnaAligned: boolean;
|
|
50
|
+
readonly styleAligned: boolean;
|
|
51
|
+
readonly issues: readonly MotionValidationIssue[];
|
|
52
|
+
readonly recommendations: readonly string[];
|
|
53
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Unified Motion Validator
|
|
3
|
+
*
|
|
4
|
+
* Deterministic validation engine detecting layout thrashing, performance bottlenecks,
|
|
5
|
+
* accessibility hazards (seizures, reduced motion), and Motion DNA contradictions.
|
|
6
|
+
*/
|
|
7
|
+
import type { MotionValidationResult } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Validates a motion configuration object, plan, or transition specification.
|
|
10
|
+
*/
|
|
11
|
+
export declare function validateMotionConfig(config: any): MotionValidationResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** True when the user prefers reduced motion. Safe where `matchMedia` is missing. */
|
|
2
|
+
export declare function prefersReducedMotion(): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Calls `listener` when the reduced-motion preference changes. Returns an unsubscribe
|
|
5
|
+
* function; both are no-ops where `matchMedia` change events are unavailable.
|
|
6
|
+
*/
|
|
7
|
+
export declare function onReducedMotionChange(listener: (reduced: boolean) => void): () => void;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion Natural-Language-to-Motion Interpretation Engine
|
|
3
|
+
*
|
|
4
|
+
* Framework-independent interpretation layer that parses natural-language motion prompts
|
|
5
|
+
* and produces structured, validated, machine-readable AF Motion specifications.
|
|
6
|
+
*/
|
|
7
|
+
import type { AIMotionRegistry } from "./ai-motion-registry.js";
|
|
8
|
+
import { type ConfigurationValidationResult, type ReducedMotionBehavior, type SchemaCapabilityCategory } from "./schema.js";
|
|
9
|
+
export type MotionTriggerType = "load" | "scroll" | "hover" | "click" | "inView" | "pointer";
|
|
10
|
+
export interface MotionTargetSpecification {
|
|
11
|
+
readonly selector?: string;
|
|
12
|
+
readonly semanticRole?: string;
|
|
13
|
+
readonly description?: string;
|
|
14
|
+
readonly isCollection: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface MotionScrollOptions {
|
|
17
|
+
readonly once?: boolean;
|
|
18
|
+
readonly threshold?: number | number[];
|
|
19
|
+
readonly rootMargin?: string;
|
|
20
|
+
readonly axis?: "y" | "x";
|
|
21
|
+
}
|
|
22
|
+
export interface MotionInteractionOptions {
|
|
23
|
+
readonly strength?: number;
|
|
24
|
+
readonly distance?: number;
|
|
25
|
+
readonly radius?: number;
|
|
26
|
+
readonly hoverScale?: number;
|
|
27
|
+
readonly returnSpeed?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface MotionStaggerOptions {
|
|
30
|
+
readonly delay: number;
|
|
31
|
+
readonly from?: "start" | "first" | "center" | "end" | "last" | "edges" | "random";
|
|
32
|
+
}
|
|
33
|
+
export interface MotionAccessibilitySpecification {
|
|
34
|
+
readonly respectReducedMotion: boolean;
|
|
35
|
+
readonly reducedMotion: ReducedMotionBehavior;
|
|
36
|
+
readonly fallbackProperties?: Readonly<Record<string, unknown>>;
|
|
37
|
+
readonly screenReaderAnnounce?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface MotionAlternativeRecommendation {
|
|
40
|
+
readonly capabilityId: string;
|
|
41
|
+
readonly category: string;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly confidence: number;
|
|
44
|
+
readonly reason: string;
|
|
45
|
+
}
|
|
46
|
+
export interface MotionSpecification {
|
|
47
|
+
readonly id: string;
|
|
48
|
+
readonly prompt: string;
|
|
49
|
+
readonly capabilityId: string;
|
|
50
|
+
readonly matchedCapabilities: readonly string[];
|
|
51
|
+
readonly category: SchemaCapabilityCategory;
|
|
52
|
+
readonly target: MotionTargetSpecification;
|
|
53
|
+
readonly properties: Readonly<Record<string, unknown>>;
|
|
54
|
+
readonly duration?: number;
|
|
55
|
+
readonly delay?: number;
|
|
56
|
+
readonly easing?: string;
|
|
57
|
+
readonly stagger?: MotionStaggerOptions;
|
|
58
|
+
readonly trigger: MotionTriggerType;
|
|
59
|
+
readonly scroll?: MotionScrollOptions;
|
|
60
|
+
readonly interaction?: MotionInteractionOptions;
|
|
61
|
+
readonly motionDNA?: string;
|
|
62
|
+
readonly designSystem?: string;
|
|
63
|
+
readonly accessibility: MotionAccessibilitySpecification;
|
|
64
|
+
readonly schemaId?: string;
|
|
65
|
+
readonly parameters: Readonly<Record<string, unknown>>;
|
|
66
|
+
readonly metadata: {
|
|
67
|
+
readonly extractedModifiers: readonly string[];
|
|
68
|
+
readonly confidenceScore: number;
|
|
69
|
+
readonly intent: string;
|
|
70
|
+
readonly [key: string]: unknown;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export interface MotionInterpretationResult {
|
|
74
|
+
readonly success: boolean;
|
|
75
|
+
readonly confidence: number;
|
|
76
|
+
readonly specification?: MotionSpecification;
|
|
77
|
+
readonly alternatives: readonly MotionAlternativeRecommendation[];
|
|
78
|
+
readonly validation?: ConfigurationValidationResult;
|
|
79
|
+
readonly warnings: readonly string[];
|
|
80
|
+
readonly intent: {
|
|
81
|
+
readonly action: string;
|
|
82
|
+
readonly target: string;
|
|
83
|
+
readonly modifiers: readonly string[];
|
|
84
|
+
readonly trigger: MotionTriggerType;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Registers the global AI Motion Registry resolver to maintain zero circular dependencies with catalogue.
|
|
89
|
+
*/
|
|
90
|
+
export declare function setDefaultRegistryResolver(resolver: () => AIMotionRegistry | undefined): void;
|
|
91
|
+
/**
|
|
92
|
+
* Resolves the effective registry from options or global resolver.
|
|
93
|
+
*/
|
|
94
|
+
export declare function getEffectiveRegistry(options?: InterpretOptions): AIMotionRegistry | undefined;
|
|
95
|
+
export interface InterpretOptions {
|
|
96
|
+
readonly registry?: AIMotionRegistry;
|
|
97
|
+
readonly context?: {
|
|
98
|
+
readonly defaultTarget?: string;
|
|
99
|
+
readonly motionDNA?: string;
|
|
100
|
+
readonly designSystem?: string;
|
|
101
|
+
readonly preferredCategory?: string;
|
|
102
|
+
};
|
|
103
|
+
readonly validate?: boolean;
|
|
104
|
+
readonly minConfidence?: number;
|
|
105
|
+
readonly strictTarget?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Interprets a natural-language motion request into a structured AF Motion specification.
|
|
109
|
+
*/
|
|
110
|
+
export declare function interpretMotionPrompt(prompt: string, options?: InterpretOptions): MotionInterpretationResult;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface PaletteColorOptions {
|
|
2
|
+
/** Registered built-in/custom palette to use, or "active" to follow activation changes. */
|
|
3
|
+
palette?: string | "active";
|
|
4
|
+
/** Explicit colors take precedence over palette colors. */
|
|
5
|
+
colors?: readonly string[];
|
|
6
|
+
/** Colors to use when no active palette is available. */
|
|
7
|
+
fallback?: readonly string[];
|
|
8
|
+
}
|
|
9
|
+
export type PaletteColorsListener = (colors: readonly string[]) => void;
|
|
10
|
+
/** Resolves explicit colors or a registered palette into an immutable effect-ready color list. */
|
|
11
|
+
export declare function resolvePaletteColors(options: PaletteColorOptions): readonly string[];
|
|
12
|
+
/**
|
|
13
|
+
* Subscribes to active-palette changes when `palette` is "active".
|
|
14
|
+
* Named palettes and explicit color lists are static and return an inert unsubscribe function.
|
|
15
|
+
*/
|
|
16
|
+
export declare function subscribeToPaletteColors(options: PaletteColorOptions, listener: PaletteColorsListener): () => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SemanticColorToken } from "./palettes.js";
|
|
2
|
+
/** CSS custom properties use the stable `--af-motion-color-<token>` naming convention. */
|
|
3
|
+
export declare const PALETTE_CSS_VARIABLES: Readonly<Record<SemanticColorToken, string>>;
|
|
4
|
+
export interface ApplyActivePaletteOptions {
|
|
5
|
+
/** Update the element whenever the active palette changes. */
|
|
6
|
+
readonly subscribe?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type PaletteStyleCleanup = () => void;
|
|
9
|
+
/** Apply a registered palette's semantic tokens as inline CSS custom properties. */
|
|
10
|
+
export declare function applyPalette(target: HTMLElement, name: string): PaletteStyleCleanup;
|
|
11
|
+
/** Apply the active palette, optionally following later active-palette changes. */
|
|
12
|
+
export declare function applyActivePalette(target: HTMLElement, options?: ApplyActivePaletteOptions): PaletteStyleCleanup;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface SemanticColorTokens {
|
|
2
|
+
readonly primary: string;
|
|
3
|
+
readonly secondary: string;
|
|
4
|
+
readonly accent: string;
|
|
5
|
+
readonly background: string;
|
|
6
|
+
readonly surface: string;
|
|
7
|
+
readonly text: string;
|
|
8
|
+
readonly muted: string;
|
|
9
|
+
readonly border: string;
|
|
10
|
+
readonly success: string;
|
|
11
|
+
readonly warning: string;
|
|
12
|
+
readonly error: string;
|
|
13
|
+
readonly info: string;
|
|
14
|
+
}
|
|
15
|
+
export type SemanticColorToken = keyof SemanticColorTokens;
|
|
16
|
+
export interface PaletteColorNames {
|
|
17
|
+
readonly primary: string;
|
|
18
|
+
readonly secondary: string;
|
|
19
|
+
readonly accent: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ColorPalette {
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly tokens: SemanticColorTokens;
|
|
24
|
+
readonly colorNames?: PaletteColorNames;
|
|
25
|
+
}
|
|
26
|
+
export interface PaletteInput {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly primary: string;
|
|
29
|
+
readonly secondary: string;
|
|
30
|
+
readonly accent: string;
|
|
31
|
+
readonly overrides?: Partial<SemanticColorTokens>;
|
|
32
|
+
readonly colorNames?: PaletteColorNames;
|
|
33
|
+
}
|
|
34
|
+
export type PaletteDefinition = ColorPalette | PaletteInput;
|
|
35
|
+
export type PaletteChangeListener = (palette: ColorPalette | undefined) => void;
|
|
36
|
+
export interface PaletteRegistryApi {
|
|
37
|
+
/** Retrieves a registered palette, or undefined when the name is unknown. */
|
|
38
|
+
get(name: string): ColorPalette | undefined;
|
|
39
|
+
/** Returns the names of registered custom palettes. */
|
|
40
|
+
list(): readonly string[];
|
|
41
|
+
/** Registers a palette. Names must be unique. */
|
|
42
|
+
register(palette: PaletteDefinition): void;
|
|
43
|
+
/** Removes a registered custom palette. */
|
|
44
|
+
remove(name: string): boolean;
|
|
45
|
+
/** Activates a registered palette and notifies subscribers when it changes. */
|
|
46
|
+
activate(name: string): void;
|
|
47
|
+
/** Returns the active palette, or undefined when none is active. */
|
|
48
|
+
getActive(): ColorPalette | undefined;
|
|
49
|
+
/** Subscribes to active-palette changes and returns an unsubscribe function. */
|
|
50
|
+
subscribe(listener: PaletteChangeListener): () => void;
|
|
51
|
+
}
|
|
52
|
+
export declare function registerPalette(palette: PaletteDefinition): void;
|
|
53
|
+
export declare function getPalette(name: string): ColorPalette | undefined;
|
|
54
|
+
export declare function listPalettes(): readonly string[];
|
|
55
|
+
export declare function activatePalette(name: string): void;
|
|
56
|
+
export declare function getActivePalette(): ColorPalette | undefined;
|
|
57
|
+
export declare function subscribeToPaletteChanges(listener: PaletteChangeListener): () => void;
|
|
58
|
+
export declare function removePalette(name: string): boolean;
|
|
59
|
+
export declare const paletteRegistry: Readonly<PaletteRegistryApi>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AF Motion — Performance Conflict Resolver
|
|
3
|
+
*
|
|
4
|
+
* Discovers and resolves competing or contradictory decisions across subsystems,
|
|
5
|
+
* enforcing stability invariants, cooldown hysteresis, and policy precedence.
|
|
6
|
+
*/
|
|
7
|
+
import type { PerformanceDecision, ConflictResolutionResult } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Resolves conflicts between proposed performance decisions.
|
|
10
|
+
*
|
|
11
|
+
* Guarantees:
|
|
12
|
+
* 1. "reduce_quality" and "increase_quality" never co-occur (downgrade wins under distress).
|
|
13
|
+
* 2. High memory pressure always suppresses "increase_quality".
|
|
14
|
+
* 3. High-priority safety actions supersede lower-priority cosmetic adjustments.
|
|
15
|
+
* 4. Deduplicates decisions targeting identical strategies or presets.
|
|
16
|
+
*
|
|
17
|
+
* @param decisions Candidate performance decisions
|
|
18
|
+
* @param precedence Optional resolution precedence ("safety" | "performance" | "quality")
|
|
19
|
+
* @returns Conflict resolution result with detected conflicts and filtered decisions
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolvePerformanceConflicts(decisions: readonly PerformanceDecision[], precedence?: "safety" | "performance" | "quality"): ConflictResolutionResult;
|