Changelog
The same history ships in the package as CHANGELOG.md.
0.11.0
- Depends on
@zuilib/tokens(optional peer) instead of@zuilib/core: the editor only ever consumed the design tokens, never a component. Load@zuilib/tokens/styles.css(ortokens.csswithout Tailwind) where you previously loaded@zuilib/core/styles.css; without it the editor falls back to its built-in defaults - Documented that a Tailwind host must
@sourcethis package for the document-content classes (headings, lists, code) to be generated
0.10.1
- Table columns get the same rail as rows: a strip along the table's
top edge with a bar on the caret's column and a
+handle after the last column that snaps to column boundaries while hovered - Deleting moves onto the rails. The handle follows the pointer: near a
boundary it is a
+(insert; hover previews the line), over the middle of a row / column it is a−that removes it (hover tints what goes). The three row buttons added to the floating toolbar in 0.10.0 are gone - The layout toolbar now floats above the table, stacked over the column rail at the top-right corner
useMarkdownEditor():tableRowis nowtableCell({ row, column, rows, columns, hasHeader }); addsinsertTableColumn(position)anddeleteTableColumn(). Node helpers:$getTableCellPosition(was$getTableRowPosition),$insertTableColumnAt,$deleteTableColumnAt,$insertTableColumnNear,$deleteSelectedTableColumn,insertableColumnIndices,canDeleteColumn
0.10.0
- Table rows. Put the caret in a table and a row rail appears along
its left edge: a bar marks the caret's row, and a
+handle rests under the last row (click to append). Move over the rail and the handle snaps to the nearest row boundary; hovering it draws the insertion line across the table. Keyboard:⌘↩/Ctrl+Enterinserts below,⌘⇧↩above,⌘⇧⌫deletes the row, and Tab in the last cell appends a row instead of leaving the table - Rows follow GFM's shape: nothing is inserted above the header row, and deleting the header promotes the next row so the markdown keeps its divider; the last remaining row can't be deleted
useMarkdownEditor()adds row position andinsertTableRow(position)/deleteTableRow(). Node-level helpers$insertTableRowAt,$deleteTableRowAt,$insertTableRowNear,$deleteSelectedTableRow,insertableRowIndicesandcanDeleteRoware exported for custom toolbars- Rail and toolbar use the theme tokens (
--primary,--popover,--border,--shadow-medium); motion respectsprefers-reduced-motion
0.9.0
- Ink drawing style:
drawingStyle="ink"on the editor renders shapes as one seeded, pressure-varying pen stroke with misregistered fills and tapered connectors, and switches the canvas face to Recursive (casual axes) when the host loads it. Renderer-only: the drawing format is unchanged. Geometry helpers are exported (inkStroke,seedFrom, …)
0.8.0
- Syntax highlighting for fenced code blocks, driven by the package's
own grammars instead of Prism: JavaScript/TypeScript, Kotlin, Java, C/C++,
Python, Go, Rust, JSON, YAML, shell, SQL, CSS, HTML/XML, diff and
markdown. Colours are CSS custom properties (
--zui-code-<type>on.zui-code) with light and dark defaults; override them to retheme.registerCodeLanguage(grammar)adds a language from a data-only grammar;tokenizeCodeandcodeTokenizerare exported for reuse - Untagged code blocks are highlighted as
plainand export as a bare fence (previously they came back as```javascript).CODE_BLOCKis the exported transformer that does this - Unknown languages get the same line structure as known ones, so cursor movement and indentation behave identically
0.7.2
- Canvas properties are one colour setting (outline plus its matching
fill on boxes: plain, black, gray, red, green, blue, orange, purple)
shown inline in the tools row, only while the canvas is focused. Text on
dark or borderless cards picks a readable colour automatically. The same
names work as
colorin```diagramskeletons - Table settings and the canvas share three layout presets: compact, comfortable, full; the markdown markers are unchanged
- The floating table settings use the theme tokens (
--popover,--border,--shadow-medium) instead of fixed light/dark colours
0.7.1
- Fix: free
textshapes could not be typed into - Fix: selecting a shape no longer shifts the drawing (the properties row is always rendered with a fixed minimum height)
- Fix: keyboard shortcuts keep working after committing text;
Home/Endwork inside the inline text editor
0.7.0
Themed drawing canvas. The canvas chrome follows the host theme instead of shipping its own look.
- Tool row and contextual property row are a flat header in the editor's own toolbar idiom (in flow, no floating panels over the drawing)
- Every colour, radius, shadow and font of the canvas is a
--zui-drawing-*custom property defaulting to the core theme tokens, so light and dark mode come from the tokens; override them on.zui-drawing-canvasor an ancestor - Selection frame, handles, marquee, bind highlight and connector label
plates are drawn in
currentColor/ theme variables; the table selection tint uses--primarytoo --zui-drawing-dark-filterexposes the dark-mode inversion of the drawing area (noneopts out)
0.6.0
Text measure and text block width. Additive: with no configuration
the layout is unchanged.
- Measure (opt in):
measure="48rem"onMarkdownEditor/MarkdownEditor.Root, or--zui-text-editor-measure: 48remin a stylesheet. Text blocks are capped at the measure and centred; the pane itself is never capped and full-width blocks stop short of the outline BlockWidthgains'text':'full' | 'text' | 'content'.textaligns a table or drawing with the text column; without a measure it is visually identical tofull- Persistence: tables
<!-- width: text -->; drawings and skeletons"width":"text". Unknown width values are treated asfullso documents from newer versions still open - Insertion defaults:
defaultBlockWidth={{ table?, drawing? }}applies when a new table or drawing is inserted; the chosen width is written explicitly, evenfull - UI / headless: all three widths in the floating table toolbar and the
drawing toolbar;
useMarkdownEditor()gainsblockWidth/setBlockWidth;insertTable/insertDrawingaccept awidthoption.tableWidth/setTableWidthkeep working and are deprecated - CSS: zero-specificity
:where()layout rules;--zui-text-editor-gutter,--zui-text-editor-bleed, per-block--zui-text-editor-block-bleed; new block classes.zui-paragraph,.zui-heading/-1…-6,.zui-list,.zui-quote,.zui-code;.zui-drawing-canvas.is-text-width - New exports:
BLOCK_WIDTHS,isBlockWidth,BlockWidthDefaults,TableSettingsOptions,$isTableWidthExplicit
0.5.0
Diagram builder rewrite. The drawing canvas, its payload format and the authoring story for LLMs were rebuilt.
- Format v2 (breaking):
```drawingpayloads are now{"version":2,"canvasHeight":<px>,"canvasWidth"?:<px>,"width"?:"content","shapes":[...]}. No migration from version 1: anything that is not a version 2 payload renders as an empty canvas.triangleandpentagonare removed - Shapes: boxes
rect,ellipse,diamond,note,cylinder,cloud,queue,actor; connectorsarrow,line; freetext. Palette gains purple - Bindings are objects:
{ id, fixedPoint?: [fx, fy], mode?: "orbit" | "inside" }. Thesideshorthand exists only in the```diagramskeleton - Router:
routing: "elbow"is auto-routed, leaves the box perpendicular to the attach side, avoids every box and minimises bends - Editor UX: multi-select (shift-click, marquee), redesigned toolbar with a "more shapes" popover, contextual property bar, Copy as Mermaid
```diagramskeleton: coordinate-free JSON that the editor lays out and expands on import. New exportsexpandSkeleton,parseDrawingSkeleton,DRAWING_SKELETON_JSON_SCHEMA,DIAGRAM- Mermaid export:
drawingToMermaid(data, { direction? }) - Internal: drawing code moved into
src/drawing/; shape geometry is data-driven so the router, bindings, skeleton expansion and exporters run without a DOM
0.4.0
- Table density: compact / comfortable (default) / spacious row padding and font size, next to the width toggle
- The settings comment above a GFM table lists every non-default setting,
e.g.
<!-- width: content; density: compact --> useMarkdownEditor()gainstableDensity/setTableDensity; new exportsTableDensity,TableSettings,DEFAULT_TABLE_SETTINGS,$getTableSettings/$setTableSettings,$getTableDensity/$setTableDensity,parseTableSettingsMarker/formatTableSettingsMarker
0.3.1
- Block width for tables and drawings: full width or content width
(shrink to fit). Tables persist it as
<!-- width: content -->above the table; drawings as"width":"content"in the payload useMarkdownEditor()gainstableWidth/setTableWidth; new exportsBlockWidth,$getTableWidth,$setTableWidth,$getSelectedTable
0.3.0
- Custom toolbars: the
toolbarprop accepts a render function; compound componentsMarkdownEditor.Root/.Content/.Toolbar/.Outlineplus the button groups and primitives; theuseMarkdownEditor()headless hook - Undo / redo buttons (
HistoryButtons) - Internal:
LexicalComposeris mounted inedit-rawmode too, so hooks keep working across mode switches
0.2.1
DRAWING_FORMAT.md: authoritative spec of the drawing payload, written for programmatic / LLM consumption; ships in the npm package- New exports
DRAWING_DATA_JSON_SCHEMA,parseDrawingData,serializeDrawingData
0.2.0
- Outline (
outlineprop): docked, collapsible table-of-contents sidebar - Section folding (
foldableprop, default on): collapse everything under a heading; view-layer only
0.1.0
- Tables: GFM pipe tables round-trip through markdown; artifact-style
rendering; in-place editing; new peer deps
@lexical/tableand@lexical/utils - Toolbar (
toolbarprop, default on) - Drawing canvas: Excalidraw-style diagrams embedded as
```drawingfenced JSON blocks - Round-trip test suite
0.0.2 and earlier
- Markdown editor wrapping Lexical:
edit-md/edit-raw/viewmodes, markdown shortcuts, checklists, fenced code, YAML frontmatter block, controlledvalue/onChange