Which library does Node-RED use for its diagrams?

I'm a software developer, I use Node-RED for home automation, and I'm really impressed with the UI.

Does Node-RED use an underlying npm library for its node dragging, dropping, and connecting, or is the entire thing part of this application?

I poked through the package.json but nothing stuck out at me. The closest open-source library I've seen that does something reasonably similar is Drawflow.

The editor is a SVG application based on D3. It's inner details come from view.js and the surrounding directories in the source tree.

To answer directly, no, there isn't a separate npm module or reusable library. It's all part of the editor and developed by us.