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

@ablogcms/notify

v3.2.28-beta.0

Published

管理画面のトースト通知状態管理

Readme

@ablogcms/notify

管理画面の通知(notify)ドメイン層。キュー・重複抑制・タイマー pause/resume を持つ store と、 notify() 公開 API、既定プレゼンター ToastPresenter(見た目は @ablogcms/components/toast)を提供する。 通知(notify)と表示コンポーネント(プレゼンター)は一対多の関係で分離されており、 NotificationContainerpresenter prop で表示形式を差し替えられる。

使い方

import { notify } from '@ablogcms/notify';

notify.info('保存しました');
notify.success('公開しました');
notify.danger('エラーが発生しました'); // 既定で自動消滅しない(duration: 0)
notify.warning('確認してください');

notify.success('削除しました', {
  description: 'ゴミ箱に移動しました。',
  action: { label: '元に戻す', onClick: ({ dismiss }) => { restore(); dismiss(); } },
});

notify.promise(uploadFile(), {
  loading: 'アップロード中…',
  success: 'アップロードが完了しました',
  error: (err) => `失敗しました: ${err.message}`,
});

notify.update(id, { type: 'success', title: '完了しました' });
notify.dismiss(id); // id 省略で全消し
  • notify(content, options?) / .success / .info / .warning / .danger: 通知を追加する(options.id を指定すると同 id の既存通知を更新する重複抑制になる)。
  • notify.promise(promise, { loading, success, error }): Promise の状態遷移に合わせて通知を更新する。
  • notify.update(id, options) / notify.dismiss(id?): 表示中の通知を更新・消去する。
  • options.autoHide / options.onHideduration / onClose@deprecated エイリアスとして 引き続き動作する。
  • NotificationContainer: 実際に通知を DOM へレンダリングするコンポーネント。ページに 1 度だけ マウントすれば、以降の notify.* 呼び出しに反応して表示される。presenter(既定 ToastPresenter)・ placementlimitdurationoverlaplabel を指定できる。