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

@gotipe/migration

v0.1.1

Published

Convert ProseMirror/Tiptap, Lexical and Slate JSON into GoTipe documents without loading those editors.

Readme

@gotipe/migration

Convert serialized ProseMirror/Tiptap, Lexical and Slate JSON into a GoTipe Document. No source-editor runtime is loaded.

import { defineExtension } from '@gotipe/core';
import { markdownRawNodeSpec } from '@gotipe/markdown';
import { convertProseMirrorToGoTipe } from '@gotipe/migration';

// Register with your extensions: preserved source content arrives in `markdownRaw` blocks.
export const MarkdownRaw = defineExtension({ name: 'markdownRaw', nodes: [markdownRawNodeSpec] });

const result = convertProseMirrorToGoTipe(sourceJSON);
if (editor.validate(result.document)) editor.setContent(result.document);
console.log(result.warnings, result.preserved, result.unmapped);

Common paragraphs, headings, lists (including nested and checked lists), links, text marks, raw code, images and tables are mapped to GoTipe's document model. Tiptap camelCase and ProseMirror snake_case node names are accepted. Image and link URLs remain data; conversion does not fetch them.

The document holds only the block types, attributes and nesting that GoTipe's own extensions declare (read from @gotipe/core/extensions), so it passes editor.validate() with the stock presets. Source fields without a GoTipe attribute (Tiptap colwidth, paragraph alignment, Lexical indent and version, image titles, a flattened paragraph's ID…) are listed in result.unmapped with the ID of the block that holds them and their source path; values that differ from the source editor's defaults also produce one warning per field. The first paragraph of a list item, quote or table cell becomes its text; list items outside a list get one. A table cell holds text only, so its other paragraphs, headings and lists become lines of its text (• , 1. , ☐ /☑ markers, two spaces per nesting level, marks kept); each list or heading is reported in unmapped as the block it would have been, and the table stays editable.

Unknown nodes, inline elements and marks are preserved as an entire source subtree in a markdownRaw block (kind: "json") containing JSON. They produce a warning and an entry in result.preserved; skippedNodes remains zero. Where the schema allows no raw block (a table cell, a quote), the nearest ancestor that can be one is preserved instead. This keeps content recoverable but does not pretend that a custom widget has become an editable GoTipe widget. strict: true throws the exported UnsupportedContent (with the source path) before returning a result. Applications can provide blockTypeMap and markTypeMap for custom schemas: a GoTipe type gets the attributes its schema declares, a type of the application's own gets the source attributes unchanged, and its extension must declare them.

onWarning receives each warning when the conversion has finished. Existing unique nonempty block IDs are kept; duplicates receive new IDs and a warning. createId can supply an application's ID factory. Inputs are cloned and checked for non-JSON values, cycles and invalid node shapes, and bounded: 1,000,000 nodes, nodes nested 128 levels, JSON nested 512 levels, 16 Mi values and 32 Mi UTF-16 code units of text. Malformed JSON structures throw in both modes.

The checked-in fixtures follow the public serialized contracts documented by Tiptap, Lexical's text format flags, and Slate's node model. Slate permits application-defined schemas; the built-in names are conventions, not a claim that every custom Slate application shares one schema.