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

@typix-editor/extension-table

v5.0.1

Published

Table extension for Typix — full-featured tables with cell merge, scroll shadow, and rich commands

Readme

@typix-editor/extension-table

Full-featured table support with cell merging, background colors, tab navigation, and horizontal scroll.

Installation

npm install @typix-editor/extension-table
# or
pnpm add @typix-editor/extension-table

Usage

import { TableExtension } from "@typix-editor/extension-table"
import { createTypix } from "@typix-editor/core"

const editor = createTypix({
  extensions: [
    TableExtension({
      hasCellMerge: true,
      hasCellBackgroundColor: true,
      defaultRows: 3,
      defaultColumns: 3,
    }),
  ],
})

// Insert a 4×5 table with headers
editor.chain().insertTable({ rows: 4, columns: 5, includeHeaders: true }).run()

// Row operations
editor.chain().insertRowAbove().run()
editor.chain().insertRowBelow().run()
editor.chain().deleteRow().run()

// Column operations
editor.chain().insertColumnLeft().run()
editor.chain().insertColumnRight().run()
editor.chain().deleteColumn().run()

// Cell styling
editor.chain().setCellBackgroundColor({ color: "#f0f0f0" }).run()

Configuration

| Option | Type | Default | Description | |--------|------|---------|-------------| | disabled | boolean | false | Temporarily disable all table behaviors | | hasCellMerge | boolean | true | Enable cell merging (colspan/rowspan) | | hasCellBackgroundColor | boolean | true | Enable per-cell background colors | | hasTabHandler | boolean | true | Enable Tab key navigation between cells | | hasHorizontalScroll | boolean | true | Wrap tables in a scrollable container | | hasNestedTables | boolean | false | Allow nested tables (experimental) | | scrollShadow | boolean | true | Add CSS modifier classes for scroll shadow indicators | | scrollableWrapperClass | string | "typix-table-scrollable-wrapper" | CSS class for the scrollable wrapper | | defaultRows | number | 3 | Default row count when inserting a table | | defaultColumns | number | 3 | Default column count when inserting a table |

Commands

| Command | Payload | Description | |---------|---------|-------------| | insertTable | { rows?, columns?, includeHeaders? } | Insert a new table at the current selection | | insertRowAbove | — | Insert a row above the focused cell | | insertRowBelow | — | Insert a row below the focused cell | | insertColumnLeft | — | Insert a column to the left of the focused cell | | insertColumnRight | — | Insert a column to the right of the focused cell | | deleteRow | — | Delete the row of the focused cell | | deleteColumn | — | Delete the column of the focused cell | | deleteTable | — | Delete the entire table | | unmergeCells | — | Unmerge a merged cell back into individual cells | | toggleHeaderRow | — | Toggle header state for the first row | | toggleHeaderColumn | — | Toggle header state for the first column | | clearCellContents | — | Clear content of the focused cell | | clearRowContents | — | Clear all cells in the focused row | | clearColumnContents | — | Clear all cells in the focused column | | duplicateRow | — | Duplicate the focused row below | | duplicateColumn | — | Duplicate the focused column to the right | | setCellBackgroundColor | { color: string \| null } | Set background color of the focused cell | | setRowBackgroundColor | { color: string \| null } | Set background color of all cells in the row | | setColumnBackgroundColor | { color: string \| null } | Set background color of all cells in the column |

Nodes

| Node | Description | |------|-------------| | TableNode | Table container element | | TableRowNode | A row in the table | | TableCellNode | An individual table cell |

API

Exported Types

  • TableConfig — Extension configuration interface.
  • SerializedTableNode / SerializedTableRowNode / SerializedTableCellNode — JSON serialization shapes.
  • TableCellHeaderStates — Header state enum.
  • TableMapType / TableMapValueType / TableDOMCell — Table utility types.
  • InsertTableCommandPayload / InsertTableCommandPayloadHeaders — Command payload types.

Functions

  • $createTableNode() — Create a new table node.
  • $createTableRowNode() — Create a new table row node.
  • $createTableCellNode() — Create a new table cell node.
  • $createTableNodeWithDimensions(rows, columns, includeHeaders) — Create a pre-sized table.
  • $isTableNode(node) — Type guard for TableNode.
  • $isTableRowNode(node) — Type guard for TableRowNode.
  • $isTableCellNode(node) — Type guard for TableCellNode.
  • $isTableSelection(selection) — Type guard for table selection.
  • $insertTableRowAtSelection() / $deleteTableRowAtSelection() — Row mutation helpers.
  • $insertTableColumnAtSelection() / $deleteTableColumnAtSelection() — Column mutation helpers.
  • $mergeCells() / $unmergeCell() — Cell merge utilities.
  • $getTableCellNodeFromLexicalNode(node) — Find the table cell containing a node.
  • $computeTableMap(table) — Compute the full table grid map.

Commands

  • INSERT_TABLE_COMMAND — Lexical command for direct dispatch.