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

@scml/types

v1.0.7

Published

Unified TypeScript type definitions for the SugarCube 2 Mod Loader ecosystem

Readme

@scml/types

Unified TypeScript type definitions for the SugarCube 2 Mod Loader ecosystem. This package does not fetch upstream source on its own; it aggregates .d.ts output from other packages in the monorepo and exposes a single entry point plus subpath exports.

Documentation

Features

  • Aggregated types: Copies each sub-package’s type-dist/ (e.g. sugarcube-2-ModLoader, Addons/Mods/Hooks) into this package’s type-dist/<package-name>/
  • Global types: Generates a single global.d.ts from each package’s global-data.js, extending global interfaces such as Window
  • Subpath exports: Exposes each sub-package’s modules via separate export paths in package.json exports for on-demand imports
  • Type alias replacement: At build time, applies @scml/utils’s typeAliasReverce to all declaration files under type-dist

Installation

pnpm add @scml/types
# or
npm i @scml/types

Usage

Main entry (global types)

Import the main entry to get the extended global types (e.g. Window augmentations):

import "@scml/types";
// You then get the Window and other global types declared in each package’s global-data

Subpath exports (per-module imports)

For specific module types, use the corresponding subpath:

import type { ModLoader } from "@scml/types/sugarcube-2-ModLoader/ModLoader";
import type { AddonPlugin } from "@scml/types/sugarcube-2-ModLoader/AddonPlugin";
import type { ConflictChecker } from "@scml/types/Addon_ConflictChecker/ConflictChecker";
import type { TweeReplacer } from "@scml/types/Mod_TweeReplacer/TweeReplacer";
// See package.json "exports" for all available paths

All available subpaths are listed in package.json under exports. They follow patterns like:

  • @scml/types/sugarcube-2-ModLoader/<module-name>
  • @scml/types/Addon_ConflictChecker/<module-name>
  • @scml/types/Addon_ImageLoaderHook2BeautySelector/<module-name>
  • … and other Addon / Mod / Hook packages

Build

This package depends on other packages in the monorepo being built first (each producing its own type-dist/). From the repo root, run:

pnpm build

This package’s build (pnpm run buildtsx src/build.ts) does the following:

  1. Clears and recreates type-dist/
  2. generateGlobal: Copies each sub-package’s type-dist, reads each package’s global-data.js, and writes type-dist/global.d.ts
  3. runReplace: Applies type-alias reverse replacement to type-dist/**/*.d.ts
  4. generateExports: Generates this package’s package.json exports from constant.ts’s allTypes and each sub-package’s package.json exports

Scripts

| Command | Description | | -------------------- | ------------------------------------------------------- | | pnpm run build | Generate type-dist/ and update package.json exports | | pnpm run typecheck | tsc --noEmit | | pnpm run publint | Run publint |

Packages included in the bundle

The list in src/constant.ts (allTypes) controls which packages are aggregated. Currently:

  • sugarcube-2-ModLoader (Mod Loader core)
  • Addon_*: ConflictChecker, ImageLoaderHook2BeautySelector, ModdedClothes, ModdedFeats, ModdedHair, ModuleCssReplacer, TweeReplacerLinker
  • AddonMod_*: BeautySelector, I18nScriptList, I18nTweeList, TweePrefixPostfix
  • AddonModTimeWrapper
  • GameOriginalImagePackMod
  • Hook_*: ImgLoader, MacroRng
  • Mod_*: CheckDoLCompressorDictionaries, CheckGameVersion, CoTCheckGameVersion, Diff3WayMerge, i18n, I18nTweeReplacer, LoaderGui, ReplacePatch, SubUiAngularJs, SweetAlert2, TweeReplacer

To add or remove a package, update allTypes in constant.ts and run pnpm run build again.

Publishing and files

  • Published files: files includes only type-dist and README.md
  • Types entry: types points to ./type-dist/global.d.ts

License

MIT