# mimshwright/fease architecture

> Architecture diagram of the GitHub repository mimshwright/fease, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mimshwright/fease
- Repository: https://github.com/mimshwright/fease

## Overview

##### Main Architecture Components

a) Core Function Types (Top Level)
- Factory Functions
- Combinators
- Decorators
- Presets

b) Support Layer (Bottom Level)
- Utility Functions
- Types
- Testing Infrastructure

##### Component Relationships

- Rounded rectangles for utility/support modules
- Hexagons for entry points (index.ts)

b) Flow and Dependencies:
- How factory functions feed into combinators and decorators
- How presets utilize the other components
- Demonstrate the utility layer supporting all upper layers

##### Detailed Structure

Create sections showing:

a) Factory Functions (Group in one section):
- Bounce
- Circular
- Constant
- Discrete
- Elastic
- Exponential
- Overshoot
- Random
- Threshold
- Wave

b) Combinators (Group in one section):
- Add
- Difference
- MinMax
- Split
- Transition

c) Decorators (Group in one section):
- Ease
- Effects
- Limit
- Reflect
- Repeat
- Scale
- Shift
- Stepped
- Wavify

##### Integration Points

How components interact:
- How presets combine multiple components
- Demo application's consumption of the library

##### Additional Elements

Include:
- Version/build information
- External dependencies
- Demo application architecture

Remember to include notes about:
- Type safety (TypeScript implementation)
- Testing coverage
- Build/deployment pipeline
- Demo application structure

This will create a comprehensive visualization of the library's architecture while maintaining clarity about its purpose as an animation easing function library.

## Diagram (Mermaid)

```mermaid
graph TB
    classDef factory fill:#e1f5fe,stroke:#01579b
    classDef combinator fill:#e8f5e9,stroke:#1b5e20
    classDef decorator fill:#fff3e0,stroke:#e65100
    classDef preset fill:#f3e5f5,stroke:#4a148c
    classDef support fill:#f5f5f5,stroke:#212121
    classDef demo fill:#fbe9e7,stroke:#bf360c

    subgraph Factory["Factory Functions"]
        Bounce["Bounce"]:::factory
        Circular["Circular"]:::factory
        Constant["Constant"]:::factory
        Discrete["Discrete"]:::factory
        Elastic["Elastic"]:::factory
        Exponential["Exponential"]:::factory
        Overshoot["Overshoot"]:::factory
        Random["Random"]:::factory
        Threshold["Threshold"]:::factory
        Wave["Wave"]:::factory
    end

    subgraph Combinators["Combinators"]
        Add["Add"]:::combinator
        Difference["Difference"]:::combinator
        MinMax["MinMax"]:::combinator
        Split["Split"]:::combinator
        Transition["Transition"]:::combinator
    end

    subgraph Decorators["Decorators"]
        Ease["Ease"]:::decorator
        Effects["Effects"]:::decorator
        Limit["Limit"]:::decorator
        Reflect["Reflect"]:::decorator
        Repeat["Repeat"]:::decorator
        Scale["Scale"]:::decorator
        Shift["Shift"]:::decorator
        Stepped["Stepped"]:::decorator
        Wavify["Wavify"]:::decorator
    end

    subgraph Presets["Presets"]
        PresetBack["Back"]:::preset
        PresetBounce["Bounce"]:::preset
        PresetCirc["Circular"]:::preset
        PresetElastic["Elastic"]:::preset
        PresetExp["Exponential"]:::preset
        PresetWave["Waveform"]:::preset
    end

    subgraph Support["Support Layer"]
        Types["Types"]:::support
        Utils["Utility Functions"]:::support
        Testing["Testing Infrastructure"]:::support
    end

    subgraph Demo["Demo Application"]
        Main["Main Entry"]:::demo
        App["App Component"]:::demo
        Example["Example Component"]:::demo
        Graph["Graph Component"]:::demo
    end

    Factory --> Combinators
    Factory --> Decorators
    Combinators --> Presets
    Decorators --> Presets
    Support --> Factory
    Support --> Combinators
    Support --> Decorators
    Presets --> Demo

    click Bounce "https://github.com/mimshwright/fease/blob/main/src/factory/bounce.ts"
    click Circular "https://github.com/mimshwright/fease/blob/main/src/factory/circular.ts"
    click Constant "https://github.com/mimshwright/fease/blob/main/src/factory/constant.ts"
    click Discrete "https://github.com/mimshwright/fease/blob/main/src/factory/discrete.ts"
    click Elastic "https://github.com/mimshwright/fease/blob/main/src/factory/elastic.ts"
    click Exponential "https://github.com/mimshwright/fease/blob/main/src/factory/exponential.ts"
    click Overshoot "https://github.com/mimshwright/fease/blob/main/src/factory/overshoot.ts"
    click Random "https://github.com/mimshwright/fease/blob/main/src/factory/random.ts"
    click Threshold "https://github.com/mimshwright/fease/blob/main/src/factory/threshold.ts"
    click Wave "https://github.com/mimshwright/fease/blob/main/src/factory/wave.ts"
    
    click Add "https://github.com/mimshwright/fease/blob/main/src/combinator/add.ts"
    click Difference "https://github.com/mimshwright/fease/blob/main/src/combinator/difference.ts"
    click MinMax "https://github.com/mimshwright/fease/blob/main/src/combinator/minmax.ts"
    click Split "https://github.com/mimshwright/fease/blob/main/src/combinator/split.ts"
    click Transition "https://github.com/mimshwright/fease/blob/main/src/combinator/transition.ts"
    
    click Ease "https://github.com/mimshwright/fease/blob/main/src/decorator/ease.ts"
    click Effects "https://github.com/mimshwright/fease/blob/main/src/decorator/effects.ts"
    click Limit "https://github.com/mimshwright/fease/blob/main/src/decorator/limit.ts"
    click Reflect "https://github.com/mimshwright/fease/blob/main/src/decorator/reflect.ts"
    click Repeat "https://github.com/mimshwright/fease/blob/main/src/decorator/repeat.ts"
    click Scale "https://github.com/mimshwright/fease/blob/main/src/decorator/scale.ts"
    click Shift "https://github.com/mimshwright/fease/blob/main/src/decorator/shift.ts"
    click Stepped "https://github.com/mimshwright/fease/blob/main/src/decorator/stepped.ts"
    click Wavify "https://github.com/mimshwright/fease/blob/main/src/decorator/wavify.ts"
    
    click PresetBack "https://github.com/mimshwright/fease/blob/main/src/preset/back.ts"
    click PresetBounce "https://github.com/mimshwright/fease/blob/main/src/preset/bounce.ts"
    click PresetCirc "https://github.com/mimshwright/fease/blob/main/src/preset/circ.ts"
    click PresetElastic "https://github.com/mimshwright/fease/blob/main/src/preset/elastic.ts"
    click PresetExp "https://github.com/mimshwright/fease/blob/main/src/preset/exp.ts"
    click PresetWave "https://github.com/mimshwright/fease/blob/main/src/preset/waveform.ts"
    
    click Types "https://github.com/mimshwright/fease/blob/main/src/types.ts"
    click Utils "https://github.com/mimshwright/fease/tree/main/src/util/"
    click Testing "https://github.com/mimshwright/fease/blob/main/src/test/testUtil.ts"
    
    click Main "https://github.com/mimshwright/fease/blob/main/src/demo/main.tsx"
    click App "https://github.com/mimshwright/fease/blob/main/src/demo/App.tsx"
    click Example "https://github.com/mimshwright/fease/blob/main/src/demo/Example.tsx"
    click Graph "https://github.com/mimshwright/fease/blob/main/src/demo/Graph.tsx"
```
