Skip to content

v54.0.0-beta.11 (2026-11-30)

Pre-release
Pre-release

Choose a tag to compare

@zbeyens zbeyens released this 30 Nov 13:39

@platejs/cli

Patch Changes

  • 49d5e7a by @zbeyens – Map plitejs/sync/postgres imports to platejs/sync/postgres in plate codemod plite-to-plate

@platejs/test

Published @platejs/test@54.0.0-beta.11.

platejs

Patch Changes

  • 21832ea by @zbeyens –

    • Replace HorizontalRuleRules.markdown({ variant }) with one HorizontalRuleRules.markdown({ variants }) rule defaulting to ['-', '_', '*'] (---, ___ , *** ).
    • Land the caret in an editable block after inserting or upserting a horizontal rule with { select: true }, keeping the divider selected when no writable block can follow.
    • Add initialState.levels to BaseHeadingPlugin (default [1, 2, 3, 4, 5, 6]), honored by canSetLevel, insert, upsert, setLevel, toggle, and HeadingRules.markdown(), and fix toggle to promote mixed selections before resetting.
    • Allow BaseBlockquotePlugin Shift+Tab (untab) to lift direct non-code-block children such as headings, lift only direct quote children on Shift+Tab, empty Enter, and Backspace at block start, run untab at lower priority than code blocks, and return boolean from wrap and untab with atomic wrap preflight.

    Migration: Replace separate HorizontalRuleRules.markdown({ variant }) entries with one call:

    HorizontalRulePlugin.configure({
      component: HrElement,
      inputRules: [HorizontalRuleRules.markdown()],
    });
  • 41d3b85 by @zbeyens –

    • Allow moving paragraphs inside and between board notes in SyncPlugin shared rooms while keeping whole-shape moves blocked.
    • Export BoardShownStyle and BoardShownStyles from platejs/board/react.
    • Remove inline paint from [data-board-select-box] and [data-board-frame-preview] previews and derive unreadable-image placeholder and transparent-canvas export colors from the host theme.
    • Validate positive finite height on BaseBoardPlugin (reporting invalid data-editor-html-board-height attributes on HTML decode) and 3-tuple finite points on BaseBoardStrokePlugin.
    • Fix multi-board restack, named-root paste into an empty board, locked-shape Cut clipboard preflight, extreme-zoom ellipse outlines, and single-writer BoardShape cursor/resize attributes.

    Migration:

    • Schema fingerprint (validationVersion: 1 on board.height): Validating board.height as a positive finite number changes the derived full-board schema fingerprint from fnv1a64:27af7e408a220c1c to fnv1a64:8600a0f12413723e:
      • Apps with a named schema (schema: { id, version }): bump schema.version, pass a migrate handler to createSyncServer (and schema.migrations for stored envelopes) that clamps or deletes any non-positive or non-finite board.height (or returns valid documents unchanged), and let the server promote existing rooms automatically.
      • Apps storing { document, schema } envelopes on the default derived identity: reopen each document through createEditor and save a fresh envelope.
      • Apps storing bare document JSON: ensure every board element's height is a positive finite number (or omit it for the 480 default).
      • Populated sync rooms on the default derived identity: start a new room seeded with the validated document.
  • d89a2e2 by @zbeyens –

    • Prevent OverridePlugin from deleting empty read-only blocks beside selectable block voids on Backspace/Delete
    • Fall through instead of swallowing Enter/Backspace when a rules lift action produces no change
  • 2f93384 by @zbeyens – Harden useExcalidrawSync and upgrade the @excalidraw/excalidraw peer to ^0.18.1

    • Require @excalidraw/excalidraw@^0.18.1 (patching Mermaid XSS CVE-2025-54881 via @excalidraw/mermaid-to-excalidraw@2.2.2 / mermaid@11) and declare react-dom on platejs/excalidraw/react.
    • Replace excalidraw.restore with restoreElements and restoreAppState on useExcalidrawSync, and add refresh to its api parameter so the hook owns scroll-offset alignment automatically.
    • Pin body-portaled Excalidraw dialogs to the viewport in useExcalidrawSync so Export, Help, and Command Palette modals stay visible on scrolled pages, and flush Excalidraw layout breakpoints on container resize.
    • Skip full serializeAsJSON on unchanged pan, zoom, hover, and selection events, and re-project the stored scene if the editor vetoes a canvas write.

    Migration: Upgrade @excalidraw/excalidraw to 0.18.1 or newer. Callers passing the @excalidraw/excalidraw module and ExcalidrawImperativeAPI to useExcalidrawSync need no call-site change; hand-built mocks must provide restoreElements, restoreAppState, and refresh.

  • 95dacda by @zbeyens – Make BaseMentionPlugin stateless and preserve marks on markable-inline voids across HTML, Markdown, and DOCX

    • Remove unused TMentionItemBase and MentionPluginState (initialState.insertSpaceAfterMention); pass { trailingSpace: true } in MentionInsertOptions on insert() instead
    • Reject blank label values in BaseMentionPlugin schema (validationVersion: 1, updating compiled schema fingerprints) and omit blank labels on insert and decode
    • Preserve marks on markable-inline void elements across HTML serialization, Markdown mention links, and DOCX export (reporting unmapped schema marks under lossPolicy: 'reject')
  • 710ea6d by @zbeyens –

    • Add pure readFields(document, options?) to platejs/field for inspecting template and document fields without creating an editor.
    • Return structured refusals instead of throwing when untrusted JSON inputs are passed to applyFieldValues, startFieldValues, fieldSubmission, readFieldAnswers, or readFields.
    • Export FieldAccess from platejs/field/react and return locked and waitsForReview from useFieldRead(fieldId).
    • Refuse mirrored field fills atomically when any same-name sibling or its enclosing block holds a pending authored deletion.
    • Fall back to option value in plain-text field formatting when an option label is blank or whitespace.
  • fd660ce by @zbeyens –

    • Unify handwritten ink with platejs/ai and platejs/ai/react: add opt-in ink?: boolean on getEditorTools, createEditorAgent, useEditorAgent, and registerEditorTools exposing <prefix>_read_ink and <prefix>_set_ink_digitized with visibility, hidden-descendant, lock, preview, draft, revision (expectedRevisions), and idempotency replay checks, plus optional question?: string metadata on <prefix>_comment (exposed on <prefix>_list_comments and rejected on threadId replies).
    • Simplify platejs/ink and platejs/ink/react: inline InkBlockInput into InkMarkInput, remove the uncalled read.range and InkRangeInput APIs, require live block: string on InkPassage (omitting non-live blocks and gating api.images saved-geometry fast path on matching live copies), split sibling highlight (data-ink-highlights, --ink-highlight-blend) and stroke (data-ink-strokes) SVG layers without an isolating zIndex on [data-ink-layer], and add stylus eraser-end dragging (button === 5 / buttons & 32) across active draw tools.
  • 79a1ba7 by @zbeyens – Remove unreachable projection, policy, ComparisonEvidence, ComparisonSnapshot.fingerprint, ComparisonCorrespondence.id, and dead lineage diagnostic codes (expired-lineage, identity-hint-rejected, incompatible-schema) from platejs/diff, and validate snapshot payloads directly in AuthoredPlugin.api.proposeComparison.

    Migration: Remove projection from compare(...) calls (project authored documents first with projectAuthoredDocument from platejs/authored) and stop reading comparison.policy, snapshot.projection, snapshot.fingerprint, change.evidence, correspondence.evidence, or correspondence.id.

  • fb1a962 by @zbeyens – Emit styles.table.header.backgroundColor in a Word table look style so plain header cells keep their Word shading without leaking backgroundColor onto imported Plate cells

  • 0163690 by @zbeyens –

    • Preserve table column widths, positive marginLeft, row heights, direct cell/row/table shading, and explicit or hidden (nil) cell borders in importDocx and exportDocx.
    • Decode Word Table of Contents content controls and TOC fields into toc blocks in importDocx, and wrap exported toc blocks in an editor:toc content control for lossless round-trips.
    • Preserve normalized column widths, row heights, positive table indentation, cell shading, and explicit borders when pasting tables from Microsoft Word or Excel via WordPastePlugin.
    • Validate limits (maxBytes, maxNodes, maxDepth) as positive safe integers throwing TypeError across HTML and Markdown parsing and streaming APIs.
    • Preserve the editor value type V in HtmlApi<V>.serialize({ document }).
  • 8aa43dc by @zbeyens –

    • Maintain locked content-root lookups incrementally across property, structural, and board reshaping commits
    • Read active transaction drafts in BaseLockPlugin.read, veto locked ancestors and childRoots during structural writes, and insert schema default blocks with structured refusal errors on insertBreak
    • Update useIsLocked and useIsOwnLocked on document replacement and return false safely when LockPlugin is not installed
  • 77f4cbe by @zbeyens –

    • Guard plugin schema property handle lookups against Object.prototype keys such as constructor
    • Preserve schema.content.elements(...) defaults and content.default.properties during Plate model lowering
  • af08a8e by @zbeyens –

    • Remove editor.read.ranges.project and ProjectedRangeSegment re-export
  • bdb0124 by @zbeyens – Remove valueCodecs, StateFieldCollabPolicy, SerializedEditorValue, and SerializedEditorEffect re-exports and expose opaque EditorStateField, EditorEffectType, and EditorUpdateAnnotation handles

    Migration:

    • Replace valueCodecs presets with direct inline persist: { decode, encode, version } declarations on defineStateField and defineEffect.
    • Update explicit generic annotations from EditorStateField<T, TEncoded, TCollab> to EditorStateField<T>, and from EditorEffectType<T, TEncoded, THistory> / EditorEffect<T, TEncoded, THistory> to EditorEffectType<T, THistory> / EditorEffect<T, THistory>.
    • Remove collab from defineEffect options, remove StateFieldCollabPolicy, SerializedEditorValue, and SerializedEditorEffect type imports, and seed initial field values through defineStateField({ initial }) or tx.setField(field, value) instead of field.serialize(...) or field.effect.
  • 49d5e7a by @zbeyens –

    • Add platejs/sync/postgres re-exporting postgresStorage, postgresSyncSchemaSql, and PostgreSQL adapter types
    • Re-export SYNC_MAX_ENTRY_META_BYTES, SyncDocumentSnapshot, SyncGetDocumentOptions, SyncJoinRefusal, SyncSubmitRefusal, SyncReceipt, and updated server hook/storage types across platejs/sync and platejs/sync/server
    • Accept initial?: SyncDocumentSnapshot on SyncPlugin and SyncReactPlugin for SSR hydration
    • Add policyCode, grantMeta, and expiresAt support to createSyncServerAgent in platejs/ai
  • ee4dfda by @zbeyens – Fix a BaseIndentPlugin correction crash on top-level paragraphs when indentMax: 0 is configured, narrow plugin correction and transform input-rule tx types to match their runtime transaction surfaces, and strip nested txOnly controls on state.transaction portals.

plitejs

Patch Changes

  • d89a2e2 by @zbeyens –

    • Guard void-boundary backward delete against read-only elements, write vetoes, isolating/void targets, and schema containment across both commands and tx.text.deleteBackward()
    • Preserve named-root selection on start-of-block breaks, NodeSelection node transforms, and struck-content break/soft-break landing
    • Guard transposeCharacter against NodeSelection and read-only targets
    • Fix grid-edge insertNodes/splitNodes landing, whole-document [grid, p, grid] landing, cell-end void range removal, and required-remainder caret placement on top-level whole-block deletion
  • 41d3b85 by @zbeyens –

    • Reconcile named-root value updates in the mounted browser handle without mutating immutable element id properties.
  • 83a379e by @zbeyens –

    • Fix tx.history(), tx.history.hasUndo(), tx.history.hasRedo(), and tx.history.pending() inside active editor.update((tx) => ...) transactions (and strip txOnly controls in editor.read.transaction specs)
    • Avoid bumping editor.read.history().revision on skipped or remote commits when both undo and redo stacks are empty
  • 79a1ba7 by @zbeyens – Remove unreachable projection, policy, ComparisonEvidence, ComparisonSnapshot.fingerprint, ComparisonCorrespondence.id, and dead lineage diagnostic codes (expired-lineage, identity-hint-rejected, incompatible-schema) from plitejs/diff, and validate snapshot payloads directly in editor.api.authored.proposeComparison.

    Migration: Remove projection from compare(...) calls (project authored documents first with projectAuthoredDocument from plitejs/authored) and stop reading comparison.policy, snapshot.projection, snapshot.fingerprint, change.evidence, correspondence.evidence, or correspondence.id.

  • 77f4cbe by @zbeyens –

    • Isolate speculative assignFreshNodeKey and setNodeKey writes inside the active overlay and keep overlay-backed snapshot indexes out of the global cache
    • Fix read-value isolation for frozen containers holding mutable built-ins, array expando properties, and Date/Map/Set/SharedArrayBuffer values nested past depth 16
    • Enforce contentMarks: false in string-key editor.read.schema.getProperty reads and reject voids and mixed block/inline siblings in canPlaceAtPath on undeclared parents
    • Bound reserved element ID minting retries and throw when a generator produces undefined or exhausts fresh IDs instead of returning an empty string or falling back to fill.*
    • Omit structure from SchemaTextBlockOptions, reject forbidden keys (including explicit undefined and union branches) on schema.element.textBlock, make schema.content namespace-only, preserve schema descendant lookup on ReadValue<V>, and add optional per-root typing to EditorDocumentValue<V, TRoots>
  • 8aa43dc by @zbeyens –

    • Pass live EditorCoreStateView as the second argument to nodeWriteVeto contributors
    • Publish and swallow EditorRefusalError cleanly when dispatchCommand runs outside an active transaction
  • 7061453 by @zbeyens –

    • Evaluate plugin.api(...) once per publication on the main editor instead of twice, keeping the same API object identity across activation callbacks and post-commit reads while preserving per-view evaluation on createEditorView
    • Treat inline array literals with equal ordered plugin sequences in definePluginCompartment().of([...]) and tx.plugins.reconfigure as no-op swaps instead of re-publishing the configuration
  • af08a8e by @zbeyens –

    • Deliver subscribeCommit and plugin on.commit notifications in commit-version FIFO order during re-entrant updates
    • Fix sameResult comparison for frozen plain objects containing text or children properties
    • Route usePath and useElementSelected through the shared selector store and isolate duplicate detached projection node keys
    • Remove editor.read.ranges.project and ProjectedRangeSegment
  • 7fc27f7 by @felixfeng33 – Forward the third options argument in editor.update.plugins.reconfigure(compartment, input, options) so schema migrations run during direct plugin reconfiguration.

  • bdb0124 by @zbeyens – Narrow EditorStateField, EditorEffectType, and EditorUpdateAnnotation into frozen opaque handles, remove valueCodecs, defineEffect({ collab }), StateFieldCollabPolicy, SerializedEditorValue, SerializedEditorEffect, and field.effect, and treat decoded undefined uniformly as absent

    • Narrow EditorStateField<TValue>, EditorEffectType<TValue, THistory>, and EditorUpdateAnnotation<TValue> to frozen opaque handles (key plus name on state fields) without exposing internal runtime callbacks (serialize, deserialize, compare, initial, persist, history, collab, reduce, effect, invert, map, combine), and drop the TEncoded type argument from EditorEffect<TValue, THistory>
    • Remove valueCodecs, defineEffect({ collab }), StateFieldCollabPolicy, SerializedEditorValue, and SerializedEditorEffect from plitejs
    • Treat persist.decode and legacyDecoders returning undefined uniformly as absent (initial) across cold load, late install, captured views, persisted completion, TransactionSpec replay, and tx.value.replace

    Migration:

    • Replace { ...valueCodecs.string, version: 1 } and other valueCodecs presets with direct inline persist: { decode, encode, version } declarations on defineStateField and defineEffect.
    • Update explicit generic annotations from EditorStateField<T, TEncoded, TCollab> to EditorStateField<T>, and from EditorEffectType<T, TEncoded, THistory> / EditorEffect<T, TEncoded, THistory> to EditorEffectType<T, THistory> / EditorEffect<T, THistory>.
    • Remove collab from defineEffect options and remove imports of StateFieldCollabPolicy, SerializedEditorValue, and SerializedEditorEffect.
    • Seed default field values through defineStateField({ initial }) or tx.setField(field, value) instead of meta: { [field.key]: field.serialize(...) }, and update fields with tx.setField(field, value) instead of reading field.effect.
  • 49d5e7a by @zbeyens –

    • Update SyncStorage with monotonic (epoch, head, revision) CAS fencing (settle now returns SyncSettleResult, checkpoints returns CheckpointMeta[], reset accepts optional expected and returns SyncRoomUpdateResult, and peek(), readSnapshot(), and updateSchema() are required for custom adapters), immutable writer marks/receipts, and automatic legacy Durable Object SQLite migration in plitejs/sync/cloudflare
    • Add lineage-ordered named schema evolution (updateSchema and migrate), OutboxHead.schema kept recovery, and public unload / checkpointEvery options on createSyncServer
    • Add SyncGrant.meta, async onAdmit policy admission ('policy' + code), two-mode projectRead with turn-free fail-closed server.getDocument, ordered out-of-turn onSettled/onRefused observers, and retentionMs/onBeforeCompact history archival
    • Add dependency-free plitejs/sync/postgres exporting postgresStorage and postgresSyncSchemaSql
    • Add optional SSR hydration via initial?: SyncDocumentSnapshot on sync() and digest verification in hello
  • ee4dfda by @zbeyens – Make tx.roots() callable inside transactions, spec builders, and editor.can dry runs to read draft roots without mutating committed root caches. Isolate throwing post-commit admission, guard publication, and queued notification callbacks so committed listeners and afterCommit still run, enforce allowlisted editor.update bounds for changes, plugins, records, and roots, and strip nested txOnly controls recursively in spec builders and dry runs.

Full changelog: v54.0.0-beta.10...v54.0.0-beta.11