MCPcopy Index your code
hub / github.com/ctrl-freaks/freezeframe.js

github.com/ctrl-freaks/freezeframe.js @v5.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.0.2 ↗ · + Follow
790 symbols 2,596 edges 42 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Freezeframe.js

npm version Coverage Status Size License: MIT

Freezeframe.js is a library that pauses animated .gifs and enables them to animate on mouse hover / mouse click / touch event, or triggered manually.

http://ctrl-freaks.github.io/freezeframe.js/

v5 - TypeScript

Freezeframe is now written in / supports TypeScript! The library will still support usage in JavaScript, but if your project uses TypeScript, you'll have access to Freezeframe's type definitions, improved input validation, and depending on your IDE/text editor, autocompletion/intellisense.

To get started using freezeframe 5:

npm install freezeframe@5.0.1
npm install vue-freezeframe@5.0.1
npm install react-freezeframe@5.0.1

Version 5+ is built with modern development in mind. It's transpiled from TypeScript to JavaScript, and it should work in all modern browsers, but we are no longer supporting older browsers, or the jquery plugin.

If you need to support older browsers (and don't need TypeScript), try v4.x:

npm install freezeframe@4.1.3

If you want to use freezeframe as a jquery plugin, check out freezeframe v3.0.10.

Packages / Documentation

This is a lerna.js monorepo, containing the following packages, each with their own docs:

How it works

For the curious, we are able to pause animated gifs by writing their data to a canvas element. Only the first frame of the animation can be written to the canvas, so we now have a frozen version of the gif.

Unfortunately, browser security prevents reading the actual data of the image if it is hosted on a different domain, which prevents us from being able to truly "pause" the gif on the true current frame. Supporting gifs on other domains is a requirement for this project, so the only frame you can pause on is the first frame.

Contributing

  • Fork or clone the repository
  • Install lerna globally (optional)
npm install -g lerna
  • Install the monorepo dependencies
npm install
  • Install the sub-package dependencies
npm run bootstrap
  • Run tests for all sub-packages
npm test
  • Run build for all sub-packages
npm run build

Then, submit your PR for review.

License

freezeframe.js is released under the terms of the MIT License.

Thanks

Extension points exported contracts — how you extend this code

FreezeframeOptions (Interface)
(no doc)
packages/freezeframe/types/index.ts
Element (Interface)
(no doc)
packages/vue-freezeframe/src/shims-tsx.d.ts
Freeze (Interface)
(no doc)
packages/freezeframe/types/index.ts
ElementClass (Interface)
(no doc)
packages/vue-freezeframe/src/shims-tsx.d.ts
FreezeframeEvent (Interface)
(no doc)
packages/freezeframe/types/index.ts
IntrinsicElements (Interface)
(no doc)
packages/vue-freezeframe/src/shims-tsx.d.ts

Core symbols most depended-on inside this repo

n
called by 537
docs/vue/js/chunk-vendors.2b71c6e7.js
o
called by 244
docs/vue/js/chunk-vendors.2b71c6e7.js
r
called by 165
docs/vue/js/chunk-vendors.2b71c6e7.js
i
called by 96
docs/vue/js/chunk-vendors.2b71c6e7.js
o
called by 93
docs/react/static/js/2.ada667ba.chunk.js
r
called by 57
docs/vue/js/app.55389ff2.js
a
called by 52
docs/vue/js/chunk-vendors.2b71c6e7.js
s
called by 50
docs/vue/js/chunk-vendors.2b71c6e7.js

Shape

Function 686
Method 87
Class 10
Interface 6
Enum 1

Languages

TypeScript100%

Modules by API surface

docs/react/static/js/2.ada667ba.chunk.js316 symbols
docs/vue/js/chunk-vendors.2b71c6e7.js314 symbols
docs/freezeframe.min.js49 symbols
docs/react/static/js/main.28540dbd.chunk.js29 symbols
packages/freezeframe/src/index.ts27 symbols
packages/freezeframe/src/utils/index.ts12 symbols
packages/react-freezeframe/src/components/ReactFreezeframe.tsx9 symbols
packages/react-freezeframe/src/Demo.tsx9 symbols
docs/vue/js/app.55389ff2.js5 symbols
packages/freezeframe/types/index.ts4 symbols
packages/freezeframe/src/templates.ts4 symbols
packages/vue-freezeframe/src/shims-tsx.d.ts3 symbols

For agents

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

⬇ download graph artifact