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

@haklex/rich-ext-nested-doc

v0.0.85

Published

Nested document extension for haklex rich editor

Downloads

2,814

Readme

@haklex/rich-ext-nested-doc

Nested document extension for embedding sub-documents as card blocks.

Installation

pnpm add @haklex/rich-ext-nested-doc

Peer Dependencies

| Package | Version | | --- | --- | | @lexical/react | ^0.41.0 | | lexical | ^0.41.0 | | lucide-react | ^0.574.0 | | react | >= 19 | | react-dom | >= 19 |

Usage

Register nodes in your editor config

import { nestedDocEditNodes } from '@haklex/rich-ext-nested-doc'

const editorConfig = {
  nodes: [...nestedDocEditNodes],
}

For static/read-only rendering:

import { nestedDocNodes } from '@haklex/rich-ext-nested-doc/static'

const staticConfig = {
  nodes: [...nestedDocNodes],
}

Use the nested doc plugin

import { NestedDocPlugin } from '@haklex/rich-ext-nested-doc'

function EditorPlugins() {
  return <NestedDocPlugin />
}

Insert a nested document programmatically

import { INSERT_NESTED_DOC_COMMAND } from '@haklex/rich-ext-nested-doc'

editor.dispatchCommand(INSERT_NESTED_DOC_COMMAND, { docId: '...' })

Provide the dialog editor context

import { NestedDocDialogEditorProvider, useNestedDocDialogEditor } from '@haklex/rich-ext-nested-doc'

function App() {
  return (
    <NestedDocDialogEditorProvider>
      <Editor />
    </NestedDocDialogEditorProvider>
  )
}

Use renderers and decorators

import { NestedDocEditDecorator } from '@haklex/rich-ext-nested-doc'
import { NestedDocRenderer, NestedDocStaticDecorator } from '@haklex/rich-ext-nested-doc/static'

Markdown transformer

import { NESTED_DOC_BLOCK_TRANSFORMER } from '@haklex/rich-ext-nested-doc'

const transformers = [NESTED_DOC_BLOCK_TRANSFORMER]

Import styles

import '@haklex/rich-ext-nested-doc/style.css'

Exports

Nodes

  • NestedDocNode -- static (read-only) node
  • NestedDocEditNode -- edit node with interactive UI
  • $createNestedDocNode() / $isNestedDocNode() -- Lexical helpers
  • nestedDocNodes -- array of static nodes for config registration
  • nestedDocEditNodes -- array of edit nodes for config registration

Renderers / Decorators

  • NestedDocRenderer -- static renderer
  • NestedDocEditDecorator -- edit-mode decorator
  • NestedDocStaticDecorator -- static-mode decorator

Plugin

  • NestedDocPlugin -- editor plugin for nested doc insertion
  • INSERT_NESTED_DOC_COMMAND -- Lexical command for programmatic insertion

Context

  • NestedDocDialogEditorProvider -- context provider for nested doc dialog editor
  • useNestedDocDialogEditor -- hook to access nested doc dialog editor context

Transformers

  • NESTED_DOC_BLOCK_TRANSFORMER -- Markdown block transformer

Types

  • Serialized node types and payload interfaces are exported for type-safe usage.

Sub-path Exports

| Path | Description | | --- | --- | | @haklex/rich-ext-nested-doc | Full exports (edit + static) | | @haklex/rich-ext-nested-doc/static | Static-only (no heavy UI deps) | | @haklex/rich-ext-nested-doc/style.css | Stylesheet |

Part of Haklex

This package is part of the Haklex rich editor ecosystem.

License

MIT