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

@gallery-engine/suite

v0.1.1

Published

Suite 是 Gallery Engine 的一站式入口包。它聚合 `core`、`layouts`、`animations`、`preview`、`plugins` 和 `shared` 的稳定命名 API,适合应用项目快速接入。🌟

Readme

@gallery-engine/suite

Suite 是 Gallery Engine 的一站式入口包。它聚合 corelayoutsanimationspreviewpluginsshared 的稳定命名 API,适合应用项目快速接入。🌟

Installation

pnpm add @gallery-engine/suite

也可以使用 npm:

npm install @gallery-engine/suite

如果你非常关注 bundle 体积或只需要少量能力,可以继续安装单独子包,例如 @gallery-engine/core@gallery-engine/layouts

Basic Usage

import {
  Gallery,
  GridLayout,
  PreviewEngine,
  WatermarkPlugin,
  createImageCache
} from "@gallery-engine/suite";
import type { GalleryImage } from "@gallery-engine/suite";

const images: readonly GalleryImage[] = [
  {
    id: "a",
    src: "/images/a.jpg",
    width: 1200,
    height: 800
  }
];

const gallery = new Gallery({
  container: "#gallery",
  images
});

gallery.use(
  new WatermarkPlugin({
    text: "Gallery Engine"
  })
);

gallery.init();

const layout = new GridLayout({
  columns: 3,
  gap: 16
});

const layoutResult = layout.calculate(images, {
  containerWidth: 960
});

const preview = new PreviewEngine({
  items: images,
  onChange: (state) => {
    console.log(state.item?.id);
  }
});

const cache = createImageCache();

cache.set(images[0].src, images[0]);
preview.open(0);

console.log(layoutResult.items);

Namespace Imports

Suite 也保留了命名空间导出,方便你按领域组织代码并避免命名冲突。🗂️

import { Core, Layouts, Plugins } from "@gallery-engine/suite";

const gallery = new Core.Gallery({
  container: "#gallery",
  images: []
});

const masonry = new Layouts.MasonryLayout({
  minColumnWidth: 260
});

gallery.use(new Plugins.WatermarkPlugin({ text: "Demo" }));

console.log(masonry.name);

What Is Included

  • Core: Gallery, EventBus, Renderer, ImageLoader, VirtualEngine, PluginManager 等。
  • Layouts: GridLayout, MasonryLayout, JustifiedLayout, LayoutRegistry
  • Animations: AnimationEngine, 内置动画 presets, FlipAnimation
  • Preview: PreviewEngine, ZoomManager, FullscreenManager
  • Plugins: WatermarkPlugin, DownloadPlugin, AiTagsPlugin, AiSearchPlugin
  • Shared: CacheManager, createImageCache

Notes

  • @gallery-engine/suite 不实现额外运行时逻辑,只做稳定 API 聚合。
  • 所有导出都是命名导出,没有默认导出。
  • 推荐业务应用使用 suite 起步,底层库或体积敏感场景使用子包。