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

@edv4h/usketch-plugin-deep-link

v0.2.6

Published

選択した shape や表示位置を **URL で共有**するためのプラグイン。Figma の `?node-id=...`(選択ノードへのリンク)に相当する体験を提供する。

Downloads

4,280

Readme

@edv4h/usketch-plugin-deep-link

選択した shape や表示位置を URL で共有するためのプラグイン。Figma の ?node-id=...(選択ノードへのリンク)に相当する体験を提供する。

URL スキーム

?shape=<id>[,<id>...]   選択(複数対応・ライブ同期)
?x=<n>&y=<n>&zoom=<n>   厳密なカメラ位置(「この表示へのリンク」用)
  • 選択はライブ同期: shape を選ぶと history.replaceState?shape= が更新される(履歴は汚さない)。
  • カメラは明示スナップショット: pan のたびに書き込むとチラつくため、encodeDeepLink で 現在の viewport を含めた URL をコピーしたときだけ付与する。
  • 読込時は URL を解析し、対象 shape を選択してフォーカスする。shape が CRDT 同期でまだ 届いていない場合は shape:added を購読して出現までリトライする(タイムアウトあり)。カメラ 指定があれば自動フレーミングより優先して厳密復元する。

使い方

import { createDeepLinkPlugin } from "@edv4h/usketch-plugin-deep-link";

// createApp は非同期。
const app = await createApp({ store, plugins: [createDeepLinkPlugin()] });

「この表示へのリンク」を作る側(共有ダイアログ等)は encodeDeepLink を利用する:

import { encodeDeepLink } from "@edv4h/usketch-plugin-deep-link";

const search = encodeDeepLink(window.location.search, {
	shapeIds: [...store.getSelection()],
	camera: store.getViewport(),
});
const url = `${window.location.origin}${window.location.pathname}${search}`;

エクスポート

  • createDeepLinkPlugin() — プラグイン本体。
  • encodeDeepLink(search, state) / decodeDeepLink(search) — URL ⇄ 状態の純粋関数。
  • applyDeepLink(store, search, onDone?) — 読込時の選択+フォーカス適用(同期待ち込み)。
  • frameShapes(store, ids, opts?) — 指定 shape 群へビューポートを合わせる(回転対応・ズーム上限)。