
Product
Socket Brings Supply Chain Security to skills.sh
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.
@terrestris/legend-util
Advanced tools
A helper class for rendering legends.
npm i @terrestris/legend-util
In order to render a legend, you construct a legend renderer like this:
const renderer = new LegendRenderer({
maxColumnWidth: 300,
maxColumnHeight: 300,
overflow: 'auto',
styles: [style],
size: [600, 300]
});
renderer.render(someElement);
The styles property can contain a list of geostyler style objects that
each correspond to one legend rendered.
There are currently three modes. If constructed as above, the renderer will render multiple columns if needed, with a maximum width and height as specified. The columns will break on any legend element.
If the overflow property is set to 'group', the columns will break on
legend boundaries only, leaving the rest of the column empty if starting
on a new legend.
If the maxColumnHeight property is not set, the renderer will render just
one column with all the legends, thus ignoring the size parameter for the height.
If you want to contribute, you can build the project like this:
git clone https://github.com/terrestris/legend-utilcd legend-utilnpm iand then either
npm run build:devin order to get a development build or
npm run build:distin order to get a production build.
FAQs
A set of helper classes to render legends.
We found that @terrestris/legend-util demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 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.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.