MCPcopy
hub / github.com/stevenpetryk/mafs

github.com/stevenpetryk/mafs @v0.21.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.21.0 ↗
295 symbols 719 edges 170 files 5 documented · 2%
README

Mafs

Mafs is a set of opinionated React components for creating math visualizations.

Visit the docs →


Development

Development is done inside of the Next.js documentation site, which directly imports Mafs components from src/. To start the development server, run:

pnpm install
pnpm start

The version of pnpm in use can be viewed by checking the packageManager field of package.json. Using corepack to install pnpm will keep this up-to-date automatically. Mafs pins pnpm to a precise version to avoid spurious pnpm-lock.yaml changes.

Then visit localhost:3000.

Tests

Mafs uses unit, end-to-end, and visual regression testing to ensure consistency between updates. It takes literal screenshots of components as rendered by the browser, and compares them to a known "correct" screenshot. Two of the browsers may require a Mac to run (Safari and iOS Safari).

All examples on the documentation site are visually tested automatically—the test file is autogenerated.

pnpm test      # run both suites
pnpm test:unit # to run just the Jest tests
pnpm test:e2e  # to run Playwright (end-to-end and visual tests)
pnpm test -- --update-snapshots # to update the visual test baselines

Extension points exported contracts — how you extend this code

EllipseProps (Interface)
(no doc)
src/display/Ellipse.tsx
PaneContextShape (Interface)
(no doc)
src/context/PaneContext.tsx
StopwatchArguments (Interface)
(no doc)
src/animation/useStopwatch.ts
PaneVisualizerProps (Interface)
(no doc)
src/debug/ViewportInfo.tsx
UseMovablePointArguments (Interface)
(no doc)
src/interaction/useMovablePoint.tsx
Docgen (Interface)
(no doc)
docs/components/PropTable.tsx
PolyBaseProps (Interface)
(no doc)
src/display/PolyBase.tsx
SpanContextShape (Interface)
(no doc)
src/context/SpanContext.tsx

Core symbols most depended-on inside this repo

useMovablePoint
called by 53
src/interaction/useMovablePoint.tsx
round
called by 29
src/math.ts
useTransformContext
called by 20
src/context/TransformContext.tsx
range
called by 15
src/math.ts
usePaneContext
called by 10
src/context/PaneContext.tsx
clamp
called by 8
src/math.ts
matrixCreate
called by 7
src/vec.ts
pointToString
called by 6
src/display/Plot/PlotUtils.tsx

Shape

Function 245
Interface 49
Enum 1

Languages

TypeScript100%

Modules by API surface

src/vec.ts21 symbols
docs/components/PropTable.tsx11 symbols
docs/components/icons.tsx10 symbols
src/display/Plot/PlotUtils.tsx8 symbols
src/display/Plot/VectorField.tsx7 symbols
docs/components/guide-examples/examples/BezierCurves.tsx5 symbols
src/math.ts4 symbols
src/interaction/useMovable.tsx4 symbols
src/display/Coordinates/Cartesian.tsx4 symbols
src/display/Coordinates/Axes.tsx4 symbols
src/animation/useStopwatch.ts4 symbols
scripts/build.ts4 symbols

Dependencies from manifests, versioned

@eslint/js9.13.0 · 1×
@microsoft/api-extractor7.40.2 · 1×
@playwright/experimental-ct-react1.48.0 · 1×
@playwright/test1.48.0 · 1×
@radix-ui/react-icons1.3.0 · 1×
@stackblitz/sdk1.11.0 · 1×
@swc/core1.3.76 · 1×
@swc/jest0.2.29 · 1×
@types/fs-extra11.0.1 · 1×
@types/jest29.5.3 · 1×
@types/jest-environment-puppeteer5.0.3 · 1×

For agents

$ claude mcp add mafs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact