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

margin-notes

v0.1.6

Published

An embeddable margin-notes component for Solid

Downloads

1,497

Readme

Solid Margin Notes

A reference application for learning how to build small, interoperable Solid applications with the Muze software stack.

This repository exists before the accompanying book does. The application is intended to reveal the real design problems first, so that Building Software on Solid Ground can explain solutions that have already survived implementation.

Relationship to the books

  • Programming for Wizards explains why Muze is betting on Solid, linked data, replaceable applications, and user-controlled software.
  • Building Software on Solid Ground will explain how to build that kind of software.
  • This repository is the working reference implementation used to discover and test the material for the second book.
  • The margin-notes component is the concrete example from Programming for Wizards: private reader notes first, stable passage addresses, linked meanings, user-owned storage, and deliberate sharing.

Product in one paragraph

The project will provide an embeddable margin-notes component that a site can load with a script tag. Readers can attach notes to stable parts of a page, keep them in browser storage, optionally store them in their Solid Pod, combine their private notes with public note collections, and submit selected notes to a configurable inbox. The component must remain useful outside the original book website.

Current status

Implementation has started with a local-first slice, the first fixed-resource Solid storage slice, and the first SimplySolid workspace-backed storage path. The current code exposes the margin-notes package, mounts a SimplyFlow app through MarginNotes.mount(config), attaches quiet note affordances to host-supplied anchors, opens the Cobalt editor, and saves/restores OLDMed annotation subjects through a local-first SimplySolid notes resource.

The current storage shape uses OLDM-style prefix$predicate property names and full IRIs for class/datatype values. The default notes resource has an IndexedDB local replica and can attach a discovered Solid Turtle resource as its remote replica when the reader connects. createSolidResourceStore({ resourceUrl, solid }) remains available as a narrow fixed-resource Turtle adapter used through the same workspace as default local storage. The automated tests now cover the annotation model, local store, Turtle-backed Solid resource store, executable host contract used by the component, local-first create/restore/edit/delete, Solid connect/sync, and keyboard-access paths against the mounted public API.

The package name is margin-notes.

The browser build selects @muze-labs/oldm-turtle for parsing, writing and patches through the application composition in src/oldm.js. Build-time resolution applies that choice to the app and its Solid dependencies; the shared @muze-nl/oldm package still defaults to N3. The build rejects N3 in the browser bundle. npm test uses the same backend selection, and npm run test:turtle compares both backends independently. See the comparison. The distributed bundle remains readable; a host such as the book can minify it.

Guiding principles

  1. Build the application before writing the tutorial around it.
  2. Keep the data independent from the application.
  3. Use native linked data rather than mapping it into a closed application model.
  4. Preserve facts the application does not understand.
  5. Keep storage, transport, presentation, and application policy separate.
  6. Make Solid optional at first, but do not create a second data model for local storage.
  7. Prefer small replaceable parts over a framework that owns the whole application.
  8. Treat errors, permissions, partial data, and network failure as ordinary states.
  9. Clearly distinguish Solid standards, established conventions, Muze conventions, and experiments.
  10. Record unexpected design discoveries while they are still fresh.
  11. Treat the application as evidence for SimplySolid, not as a reason to implement its roadmap in advance.
  12. Distinguish designed, required, implemented, and application-validated capabilities.
  13. Warn before accepting changes that move away from the Programming for Wizards touchstone.

Repository map

Immediate next step

Continue the slice in docs/CURRENT_SLICE.md: validate the local-first SimplySolid connect/sync path against either a real disposable Solid server or an explicit reason that fake-client evidence is enough for the current teaching step.

Licence

MIT. Copyright muze.nl.

Current storage contract

All stores exchange Turtle. The workspace owns native OLDM graphs and persistence; annotation code supplies vocabulary, timestamps, and native RDF fragment nodes with ordered annotation Collections. The Cobalt RDF bridge keeps Turtle dependencies out of Cobalt. Host-provided load({ key }) returns Turtle or null, and save({ key, value }) receives Turtle. No old JSON-document migration is run. Use MarginNotes.mount(config) and storeKey; the previous class/create API and storageKey alias have been removed. getNotesForAnchor() returns native nodes; re-read them after reload or sync.