npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

leafer-x-sss

v0.0.3

Published

A LeaferJS map

Readme

leafer-x-minimap

轻量的 Minimap 插件,为 leaferjs 提供鹰眼迷你地图。

输入图片说明

demo 链接:http://minimap.scory.top

安装

npm install leafer-x-minimap
# or
pnpm add leafer-x-minimap

快速开始

import { App } from 'leafer'
import { LeaferMap } from "leafer-x-minimap";

const app = App({ /* ... */ });

// 初始化鹰眼图
const map = new LeaferMap({
  target: app.tree, // 控制 tree 层
  width: 200,
  height: 150,
  bgColor: "#1E2125",
  stroke: "#7D69EF",
  fill: "#cccccc",
  strokeWidth: 2,
});

// 设置位置
map.x = 20;
map.y = 20;

// 添加到 Sky 层 (HUD)
--------------------
app.sky.add(map);
// 或者自定义挂载view
const leafer = new Leafer({
  view: "*",
});
leafer.add(map);
--------------------

app.destroy();
</script>

配置项 (Options)

| 选项 | 类型 | 默认值 | 描述 | | :----------- | :------------------- | :---------- | :------------------------------------ | | target | ILeafer | Group | 必填 | 需要监控/控制的 Leafer 实例或 Group。 | | width | number | 200 | 鹰眼图的宽度。 | | height | number | 150 | 鹰眼图的高度。 | | bgColor | string | #ffffff | 鹰眼图的背景颜色。 | | fill | string | undefined | 内容预览图形的填充颜色。 | | stroke | string | #409EFF | 视口矩形边框的颜色。 | | strokeWidth | number | 2 | 视口矩形边框的宽度。 | | showTags?: | string[] | [] | 显示的 tag 类型 | | hiddenTags?: | string[] | [] | 隐藏的 tag 类型 |

方法 (Methods)

  • map.open(): 显示鹰眼图并启用交互。
  • map.close(): 隐藏鹰眼图并禁用交互。
  • map.destroy(): 清理资源并移除事件监听。