
Security News
Microsoft Releases Open Source Toolkit for AI Agent Runtime Security
Microsoft has released an open source toolkit for enforcing runtime security policies on AI agents as adoption accelerates faster than governance controls.
@codeleap/lottie-editor
Advanced tools
Edit lottie files programmatically. Made with tinycolor2 and a lot of recursion.
Currently only supports editing colors.
import fs from 'fs'
import { LottieAnimation } from '@codeleap/lottie-editor'
// This can be any lottie json
const json = JSON.parse(fs.readFileSync('./animation.json').toString())
const animation = new LottieAnimation(json)
const firstColorPath = Object.keys(animation.colors)[0]
// Will output something like assets.0.layers.0.shapes.0.it.1.c.k. This is the path of a single color inside lottie's json
console.log(firstColorPath)
// This is a tinycolor object. All of it's methods (such as toRgbString()) are available.
console.log(animation.colors[firstColorPath]._color?.toRgbString())
// You can use any color like string supported by tinycolor2 in the place of #ff0000
animation.colors[firstColorPath].color = '#ff0000'
// This will set the colors in lottie's format inside animation.animationData
animation.saveColors()
// Additionally, now the lottie object includes metadata about it's colors. Useful for inspecting colors inside animations in vscode if you save the file
console.log('animationData.colors', animation.animationData?.colors)
// In react, you may simply pass animation.animationData to <Lottie /> and the colors will be correct
// When this file is rendered by lottie, it will have the colors you altered
fs.writeFileSync('./animation-red.json', JSON.stringify(animation.animationData), {
encoding: 'utf-8'
})
FAQs
Edit lottie files programatically
The npm package @codeleap/lottie-editor receives a total of 2 weekly downloads. As such, @codeleap/lottie-editor popularity was classified as not popular.
We found that @codeleap/lottie-editor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Microsoft has released an open source toolkit for enforcing runtime security policies on AI agents as adoption accelerates faster than governance controls.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.