platejs 54.0.0-beta.15 → 54.0.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/{EditorStatic-ldAMJg-F.d.ts → EditorStatic-C2vnO5Wd.d.ts} +4 -4
  2. package/dist/ai/index.d.ts +1 -1
  3. package/dist/ai/react/index.d.ts +7 -7
  4. package/dist/authored/index.d.ts +4 -4
  5. package/dist/{authored-Cux94E76-fEDdP_BS.d.ts → authored-Bx55e8NK-B-3-7x2a.d.ts} +3 -3
  6. package/dist/clipboard-format-key-UUQwwD7--BvFhdd3c.d.ts +1 -0
  7. package/dist/code-block/codemirror/index.d.ts +2 -2
  8. package/dist/{comment-anchor.internal-Ck30WbG4.d.ts → comment-anchor.internal-BOS8OnAc.d.ts} +2 -2
  9. package/dist/compiler/index.d.ts +3 -3
  10. package/dist/{core-DoxvjG5W.d.ts → core-Cd7dbk4H.d.ts} +30 -4
  11. package/dist/core.js +2 -2
  12. package/dist/diff/index.d.ts +2 -2
  13. package/dist/docs/agents/mcp.md +26 -0
  14. package/dist/docs/agents/skills.md +3 -3
  15. package/dist/docs/agents.md +7 -2
  16. package/dist/docs/ai-agents.md +1 -1
  17. package/dist/docs/ai.md +1 -1
  18. package/dist/docs/api/utils.md +8 -9
  19. package/dist/docs/authored-changes.md +1 -1
  20. package/dist/docs/block-menu.md +1 -1
  21. package/dist/docs/block-placeholder.md +59 -53
  22. package/dist/docs/board.md +1 -1
  23. package/dist/docs/business/compliance-pdf.md +54 -0
  24. package/dist/docs/business/security-kernel.md +57 -0
  25. package/dist/docs/business/security-proof.md +57 -0
  26. package/dist/docs/business/verify.md +76 -0
  27. package/dist/docs/business.md +130 -0
  28. package/dist/docs/callout.md +2 -2
  29. package/dist/docs/code-block.md +5 -1
  30. package/dist/docs/collaboration.md +1 -1
  31. package/dist/docs/comment.md +1 -1
  32. package/dist/docs/comparison.md +128 -0
  33. package/dist/docs/components/toolbar-buttons.md +1 -1
  34. package/dist/docs/copilot.md +1 -1
  35. package/dist/docs/deck.md +1 -1
  36. package/dist/docs/details.md +1 -1
  37. package/dist/docs/diff.md +8 -9
  38. package/dist/docs/discussion.md +1 -1
  39. package/dist/docs/dnd.md +1 -1
  40. package/dist/docs/docx.md +47 -34
  41. package/dist/docs/equation.md +1 -1
  42. package/dist/docs/examples/collaboration-example.md +1 -1
  43. package/dist/docs/examples/export.md +1 -1
  44. package/dist/docs/examples/merge.md +3 -3
  45. package/dist/docs/examples/version-history.md +6 -6
  46. package/dist/docs/field.md +2 -2
  47. package/dist/docs/find.md +41 -15
  48. package/dist/docs/footnote.md +1 -1
  49. package/dist/docs/html.md +1 -1
  50. package/dist/docs/index.md +1 -1
  51. package/dist/docs/ink.md +12 -5
  52. package/dist/docs/installation/plate-ui.md +1 -1
  53. package/dist/docs/installation.md +1 -1
  54. package/dist/docs/license.md +59 -0
  55. package/dist/docs/link.md +2 -2
  56. package/dist/docs/lint.md +1 -1
  57. package/dist/docs/llms.txt +10 -3
  58. package/dist/docs/lock.md +6 -1
  59. package/dist/docs/markdown.md +1 -1
  60. package/dist/docs/media.md +1 -1
  61. package/dist/docs/mention.md +1 -1
  62. package/dist/docs/mobile.md +1 -1
  63. package/dist/docs/pagination.md +2 -2
  64. package/dist/docs/performance.md +3 -1
  65. package/dist/docs/prompt-editor.md +47 -12
  66. package/dist/docs/reference.md +2 -2
  67. package/dist/docs/roots.md +5 -5
  68. package/dist/docs/serializing.md +1 -1
  69. package/dist/docs/slash-command.md +6 -4
  70. package/dist/docs/static.md +1 -1
  71. package/dist/docs/suggestion.md +10 -9
  72. package/dist/docs/sync.md +1 -1
  73. package/dist/docs/table.md +39 -13
  74. package/dist/docs/toc.md +2 -2
  75. package/dist/docs/toolbar.md +1 -1
  76. package/dist/docs/unit-testing.md +1 -1
  77. package/dist/docs/upload.md +12 -8
  78. package/dist/docx/export/index.d.ts +14 -11
  79. package/dist/docx/export/lib/compileAst.js +296 -25
  80. package/dist/docx/export/lib/docxComments.js +38 -0
  81. package/dist/docx/export/lib/exportDocx.js +319 -27
  82. package/dist/docx/export/lib/ooxmlBuilder.js +663 -112
  83. package/dist/docx/export/lib/outputSafety.js +81 -5
  84. package/dist/docx/export/lib/reviewProjection.js +186 -18
  85. package/dist/docx/export/lib/sourceEnvelopePatcher.js +1169 -0
  86. package/dist/docx/export/lib/sourcePreservation.js +81 -5
  87. package/dist/docx/export/lib/wordStyles.js +4 -1
  88. package/dist/docx/import/index.d.ts +13 -6
  89. package/dist/docx/import/lib/docxComments.js +30 -9
  90. package/dist/docx/import/lib/importDocx.js +1003 -109
  91. package/dist/docx/import/lib/opcRelationships.js +2 -0
  92. package/dist/docx/import/lib/readWordDocument.js +516 -44
  93. package/dist/docx/import/lib/wordStyles.js +43 -8
  94. package/dist/docx/internal/diagnostics.js +2 -1
  95. package/dist/docx/internal/docxPackage.js +26 -10
  96. package/dist/docx/internal/pageLayout.js +313 -0
  97. package/dist/docx/internal/reviewPart.js +4 -2
  98. package/dist/docx/internal/source.js +1 -0
  99. package/dist/docx/internal/sourceEligibility.js +218 -23
  100. package/dist/docx/internal/sourceEnvelope.js +473 -0
  101. package/dist/docx/internal/tableBorders.js +79 -0
  102. package/dist/docx/internal/wordFields.js +40 -0
  103. package/dist/docx/paste/index.d.ts +4 -4
  104. package/dist/dom/index.d.ts +1 -1
  105. package/dist/facade.js +3 -3
  106. package/dist/features/board/index.d.ts +1 -1
  107. package/dist/features/callout/index.d.ts +1 -1
  108. package/dist/features/column/index.d.ts +1 -1
  109. package/dist/features/comments/comment-validation.internal.js +9 -2
  110. package/dist/features/comments/index.d.ts +2 -2
  111. package/dist/features/date/index.d.ts +3 -3
  112. package/dist/features/details/index.d.ts +3 -3
  113. package/dist/features/field/index.d.ts +1 -1
  114. package/dist/features/field/lib/BaseFieldPlugin.js +35 -3
  115. package/dist/features/find/index.d.ts +37 -17
  116. package/dist/features/find/lib/BaseFindPlugin.js +292 -53
  117. package/dist/features/footnote/index.d.ts +3 -3
  118. package/dist/features/footnote/lib/BaseFootnotePlugin.js +56 -47
  119. package/dist/features/ink/index.d.ts +1 -1
  120. package/dist/features/ink/lib/BaseInkPlugin.js +15 -11
  121. package/dist/features/lint/index.d.ts +3 -3
  122. package/dist/features/lock/index.d.ts +1 -1
  123. package/dist/features/media/index.d.ts +1 -1
  124. package/dist/features/mention/index.d.ts +1 -1
  125. package/dist/features/mention/lib/BaseMentionPlugin.js +17 -4
  126. package/dist/features/reference/index.d.ts +3 -3
  127. package/dist/features/table/index.d.ts +3 -3
  128. package/dist/features/table/lib/BaseTablePlugin.js +291 -47
  129. package/dist/features/table/lib/internal/axisMove.js +93 -1
  130. package/dist/features/table/lib/internal/tableCellHtml.js +11 -2
  131. package/dist/features/table/lib/internal/tabularText.js +104 -3
  132. package/dist/features/toc/index.d.ts +2 -2
  133. package/dist/features/toc/index.js +2 -2
  134. package/dist/features/toc/lib/BaseTocPlugin.js +43 -3
  135. package/dist/features/upload/index.d.ts +1 -1
  136. package/dist/history/index.d.ts +1 -1
  137. package/dist/html/index.d.ts +4 -4
  138. package/dist/html/server/index.d.ts +2 -2
  139. package/dist/{htmlConversion-CHcWrkh5.d.ts → htmlConversion-B_pxnQjT.d.ts} +2 -2
  140. package/dist/{htmlTypes-9HQ8p7c5.d.ts → htmlTypes-BNz6ylqQ.d.ts} +3 -3
  141. package/dist/hyperscript/index.d.ts +1 -1
  142. package/dist/{index-l9R_LyGx.d.ts → index-B3UDn5_N.d.ts} +21 -3
  143. package/dist/{index-BRwhNV78.d.ts → index-BBL9Mqec.d.ts} +3 -3
  144. package/dist/{index-CXJwwbAJ.d.ts → index-BLoL3-VF.d.ts} +3 -3
  145. package/dist/{index-eWzk-bcU.d.ts → index-BVFPEGBD.d.ts} +3 -3
  146. package/dist/{index-BujEk356.d.ts → index-BcrleRIo.d.ts} +2 -2
  147. package/dist/{index-C4KIDKwP.d.ts → index-BphzyHPD.d.ts} +3 -3
  148. package/dist/{index-Bm8V8SS4.d.ts → index-BxSXY0kj.d.ts} +5 -5
  149. package/dist/{index-BYv6zIL_-DWmaXzbX.d.ts → index-C3tSB92f-D0tqBxnQ.d.ts} +4 -4
  150. package/dist/{index-DsKfZoY4.d.ts → index-C7vqVA4I.d.ts} +4 -4
  151. package/dist/index-CNEotALg.d.ts +1 -0
  152. package/dist/{index-YNMmixU5.d.ts → index-COzkHycB.d.ts} +3 -3
  153. package/dist/{index-CAFKQNqu.d.ts → index-CQhh6Byb.d.ts} +3 -3
  154. package/dist/{index-Cj09P2Qp.d.ts → index-CTsfhXok.d.ts} +11 -3
  155. package/dist/{index-1JPYTyFo.d.ts → index-CvAdLvBh.d.ts} +3 -3
  156. package/dist/{index-lD9iIU3j.d.ts → index-D9mlOgk4.d.ts} +3 -3
  157. package/dist/index-DH5TuEJa.d.ts +3 -0
  158. package/dist/{index-B048Z6JD.d.ts → index-DPQEcaX7.d.ts} +7 -7
  159. package/dist/index-DPh3NMjm.d.ts +1 -0
  160. package/dist/{index-lgeYbG68.d.ts → index-DYqSYQxA.d.ts} +11 -3
  161. package/dist/{index-Zj4bj9bZ.d.ts → index-DhwbLtre.d.ts} +1 -1
  162. package/dist/index-Dpf8e1Y4.d.ts +208 -0
  163. package/dist/{index-CnumypT3-DGx8_6Ye.d.ts → index-Er5BwoQd-CULo8twl.d.ts} +2 -2
  164. package/dist/{index-UuSQ_p3c.d.ts → index-LCIv8Dt5.d.ts} +25 -13
  165. package/dist/{index-DTTSk3WQ-D0TA0B5z.d.ts → index-Y6ZYqjYI-C1ZpAURM.d.ts} +1 -1
  166. package/dist/{index-UrJ6V3_e.d.ts → index-opUVqmJA.d.ts} +2 -2
  167. package/dist/index.d.ts +4 -4
  168. package/dist/index.js +2 -2
  169. package/dist/markdown/index.d.ts +1 -1
  170. package/dist/math/index.d.ts +3 -3
  171. package/dist/math/react/index.d.ts +4 -4
  172. package/dist/migrations/index.d.ts +4 -4
  173. package/dist/pagination/index.d.ts +2 -2
  174. package/dist/pagination/index.js +26 -2
  175. package/dist/pagination/react/PaginationPlugin.js +11 -21
  176. package/dist/pagination/react/index.d.ts +86 -5
  177. package/dist/pagination/react/index.js +2 -2
  178. package/dist/{protocol-CYflJUT3-CRJPCqOO.d.ts → protocol-D7JsIu14-DYm2shgH.d.ts} +1 -1
  179. package/dist/react/authored/index.d.ts +4 -4
  180. package/dist/react/components/EditorRefEffect.internal.js +31 -16
  181. package/dist/react/core.js +3 -3
  182. package/dist/react/features/board/index.d.ts +5 -5
  183. package/dist/react/features/callout/index.d.ts +5 -5
  184. package/dist/react/features/column/index.d.ts +5 -5
  185. package/dist/react/features/combobox/index.d.ts +4 -4
  186. package/dist/react/features/comments/index.d.ts +6 -6
  187. package/dist/react/features/date/index.d.ts +4 -4
  188. package/dist/react/features/details/index.d.ts +4 -4
  189. package/dist/react/features/field/index.d.ts +14 -5
  190. package/dist/react/features/footnote/index.d.ts +4 -4
  191. package/dist/react/features/format-painter/index.d.ts +4 -4
  192. package/dist/react/features/ink/InkPlugin.js +27 -12
  193. package/dist/react/features/ink/index.d.ts +25 -8
  194. package/dist/react/features/ink/inkCapture.internal.js +126 -10
  195. package/dist/react/features/lock/index.d.ts +5 -5
  196. package/dist/react/features/media/index.d.ts +5 -5
  197. package/dist/react/features/mention/index.d.ts +4 -4
  198. package/dist/react/features/table/TablePlugin.js +2 -3
  199. package/dist/react/features/table/index.d.ts +269 -6
  200. package/dist/react/features/table/useTableControls.js +412 -161
  201. package/dist/react/features/toc/index.d.ts +2 -2
  202. package/dist/react/features/upload/index.d.ts +5 -5
  203. package/dist/react/index.d.ts +7 -7
  204. package/dist/react/index.js +3 -3
  205. package/dist/react/stores/plate/useEditor.js +36 -1
  206. package/dist/react/utils/BlockPlaceholderPlugin.js +22 -17
  207. package/dist/react/virtualized.d.ts +3 -3
  208. package/dist/refusal-CA1A2E_8-BvFhdd3c.d.ts +1 -0
  209. package/dist/{registerEditorTools-DoRs57-M.d.ts → registerEditorTools-BqW9lr_K.d.ts} +4 -4
  210. package/dist/root.js +2 -2
  211. package/dist/shared-room-Mvp6W5j0-BvFhdd3c.d.ts +1 -0
  212. package/dist/skills/plate/SKILL.md +2 -2
  213. package/dist/skills/plate/references/pricing.md +23 -6
  214. package/dist/skills/plate/references/setup.md +2 -2
  215. package/dist/skills/plate/references/testing.md +7 -0
  216. package/dist/{source-PTxjcq4_.d.ts → source-CVQeCWQ6.d.ts} +18 -8
  217. package/dist/static/index.d.ts +5 -5
  218. package/dist/{storage-CkRL-SHq-CBP6PGqr.d.ts → storage-C9UY_rG8-BEd5yMOY.d.ts} +2 -2
  219. package/dist/sync/cloudflare/index.d.ts +3 -3
  220. package/dist/sync/index.d.ts +4 -4
  221. package/dist/sync/postgres/index.d.ts +1 -1
  222. package/dist/sync/react/index.d.ts +6 -6
  223. package/dist/sync/server/index.d.ts +5 -5
  224. package/dist/tabbable/react/index.d.ts +4 -4
  225. package/dist/testing/index.d.ts +3 -3
  226. package/dist/{transport-2koNcrqA-Dp_RYE3n.d.ts → transport-LHPF4fmj-DrGlFZ_L.d.ts} +1 -1
  227. package/dist/{tx-only-x32UA-pQ-OQbgWQrN.d.ts → tx-only-BYWUDN_r-CyQXNQp-.d.ts} +564 -19
  228. package/dist/{widths-DN1W6m66.d.ts → widths-BmkP0i8h.d.ts} +365 -6
  229. package/package.json +3 -2
  230. package/LICENSE +0 -24
  231. package/dist/clipboard-format-key-B_rCped5-BJzbgrSZ.d.ts +0 -1
  232. package/dist/index-B-SGl9uM.d.ts +0 -1
  233. package/dist/index-BFkl1TNK.d.ts +0 -1
  234. package/dist/index-CfqQvdcO.d.ts +0 -3
  235. package/dist/index-h2HH9Rw8.d.ts +0 -57
  236. package/dist/refusal-VX2Y6Wmd-BJzbgrSZ.d.ts +0 -1
  237. package/dist/shared-room-BZxUmqjV-BJzbgrSZ.d.ts +0 -1
@@ -1,7 +1,7 @@
1
- import { $o as Range, Al as TransferPlugin, Cl as TransferIntent, El as TransferOutcome, Hc as StateFieldValueInput, O as DecorationAttributes, Oi as HistoryOutcome, Qa as Plugin, Sl as TransferInput, Wa as Path, Wl as Value, Xc as Text, Yi as NamedRootKey, _t as EditorDocumentValue, d as AnyEditor, fo as PluginDependencyContractReference, fs as RootKey, gi as Element$1, ja as NodeTarget, ma as NodeKey, mo as PluginDependencyReferenceFor, ti as EditorUpdatePolicy, tr as EditorSelectorDependencies, vl as TransferApi, yl as TransferCheck } from "./tx-only-x32UA-pQ-OQbgWQrN.js";
2
- import "./htmlTypes-9HQ8p7c5.js";
3
- import { N as DataTransferDiagnostic, S as DOMEditor, V as ViewportRect, c as DOMApi, d as DOMCoverageCopyPolicy, f as DOMCoverageMaterializeRangeRole, h as DOMCoverageSelectionPolicy, l as DOMClipboardApi, m as DOMCoverageReason, n as DOMPluginTypes, p as DOMCoverageMaterializeReason, r as DropIndicator, t as DOMPlugin, u as DOMCoverageBoundary } from "./index-BujEk356.js";
4
- import { o as Editor$2, st as BasePluginInput } from "./core-DoxvjG5W.js";
1
+ import { Aa as NodeKey, Ao as PluginDependencyReferenceFor, Cu as Value, Li as HistoryOutcome, Oo as PluginDependencyContractReference, Ql as TransferCheck, Ti as Element$1, Vs as RootKey, Zl as TransferApi, au as TransferOutcome, bt as EditorDocumentValue, cr as EditorSelectorDependencies, d as AnyEditor, da as NamedRootKey, hs as Range, k as DecorationAttributes, kl as Text, li as EditorUpdatePolicy, lu as TransferPlugin, mo as Plugin, nu as TransferIntent, oo as Path, qa as NodeTarget, tu as TransferInput, xl as StateFieldValueInput } from "./tx-only-BYWUDN_r-CyQXNQp-.js";
2
+ import "./htmlTypes-BNz6ylqQ.js";
3
+ import { N as DataTransferDiagnostic, S as DOMEditor, V as ViewportRect, c as DOMApi, d as DOMCoverageCopyPolicy, f as DOMCoverageMaterializeRangeRole, h as DOMCoverageSelectionPolicy, l as DOMClipboardApi, m as DOMCoverageReason, n as DOMPluginTypes, p as DOMCoverageMaterializeReason, r as DropIndicator, t as DOMPlugin, u as DOMCoverageBoundary } from "./index-BcrleRIo.js";
4
+ import { o as Editor$2, st as BasePluginInput } from "./core-Cd7dbk4H.js";
5
5
  import React$1, { CSSProperties, KeyboardEvent as KeyboardEvent$1, MouseEventHandler, ReactNode, Ref, RefObject, TextareaHTMLAttributes } from "react";
6
6
  type DecorationSlice = Readonly<{
7
7
  attributes: DecorationAttributes;
@@ -1,2 +1,2 @@
1
- import { $ as SyncServerAgentPresencePoint, A as EditorReadBlock, B as EditorToolResult, C as EditorCommentsListResult, D as EditorIdempotencyStore, E as EditorIdempotencyEntry, F as EditorToolAnnotation, G as createEditorAgent, H as EditorVisibilityPredicate, I as EditorToolCall, J as SyncServerAgentGrant, K as createSyncServerAgent, L as EditorToolDefinition, M as EditorReadResult, N as EditorReadSelection, O as EditorInkPassage, P as EditorSuggestionsListResult, Q as SyncServerAgentPresenceOptions, R as EditorToolErrorCode, S as EditorCommentThreadItem, T as EditorFindResult, U as EditorWriteReceipt, V as EditorVisibilityFilter, W as GetEditorToolsOptions, X as SyncServerAgentOptions, Y as SyncServerAgentHost, Z as SyncServerAgentPresenceInput, _ as EditorAgentPresence, a as HasEditableAISelectionRefs, b as EditorCommentAction, c as SerializeAISelectionMarkdownOptions, d as serializeAIEditContext, et as SyncServerAgentPresenceSelection, f as serializeAISelectionMarkdown, g as EditorAgentOptions, h as EditorAgentExecuteOptions, i as AILockedBlockRef, j as EditorReadInkResult, k as EditorInkPassageImage, l as SerializedAIEditContext, m as EditorAgentAccess, n as WebMCPProducerContext, nt as SyncServerAgentRunResult, o as LOCKED_BLOCK_PLACEHOLDER_TAG, p as EditorAgent, q as getEditorTools, r as registerEditorTools, s as SerializeAIEditContextOptions, t as RegisterEditorToolsOptions, tt as SyncServerAgentReceipt, u as hasEditableAISelection, v as EditorAgentPresenceState, w as EditorDebugResult, x as EditorCommentEntry, y as EditorAgentTraceEvent, z as EditorToolErrorResult } from "../registerEditorTools-DoRs57-M.js";
1
+ import { $ as SyncServerAgentPresencePoint, A as EditorReadBlock, B as EditorToolResult, C as EditorCommentsListResult, D as EditorIdempotencyStore, E as EditorIdempotencyEntry, F as EditorToolAnnotation, G as createEditorAgent, H as EditorVisibilityPredicate, I as EditorToolCall, J as SyncServerAgentGrant, K as createSyncServerAgent, L as EditorToolDefinition, M as EditorReadResult, N as EditorReadSelection, O as EditorInkPassage, P as EditorSuggestionsListResult, Q as SyncServerAgentPresenceOptions, R as EditorToolErrorCode, S as EditorCommentThreadItem, T as EditorFindResult, U as EditorWriteReceipt, V as EditorVisibilityFilter, W as GetEditorToolsOptions, X as SyncServerAgentOptions, Y as SyncServerAgentHost, Z as SyncServerAgentPresenceInput, _ as EditorAgentPresence, a as HasEditableAISelectionRefs, b as EditorCommentAction, c as SerializeAISelectionMarkdownOptions, d as serializeAIEditContext, et as SyncServerAgentPresenceSelection, f as serializeAISelectionMarkdown, g as EditorAgentOptions, h as EditorAgentExecuteOptions, i as AILockedBlockRef, j as EditorReadInkResult, k as EditorInkPassageImage, l as SerializedAIEditContext, m as EditorAgentAccess, n as WebMCPProducerContext, nt as SyncServerAgentRunResult, o as LOCKED_BLOCK_PLACEHOLDER_TAG, p as EditorAgent, q as getEditorTools, r as registerEditorTools, s as SerializeAIEditContextOptions, t as RegisterEditorToolsOptions, tt as SyncServerAgentReceipt, u as hasEditableAISelection, v as EditorAgentPresenceState, w as EditorDebugResult, x as EditorCommentEntry, y as EditorAgentTraceEvent, z as EditorToolErrorResult } from "../registerEditorTools-BqW9lr_K.js";
2
2
  export { AILockedBlockRef, EditorAgent, EditorAgentAccess, EditorAgentExecuteOptions, EditorAgentOptions, EditorAgentPresence, EditorAgentPresenceState, EditorAgentTraceEvent, EditorCommentAction, EditorCommentEntry, EditorCommentThreadItem, EditorCommentsListResult, EditorDebugResult, EditorFindResult, EditorIdempotencyEntry, EditorIdempotencyStore, EditorInkPassage, EditorInkPassageImage, EditorReadBlock, EditorReadInkResult, EditorReadResult, EditorReadSelection, EditorSuggestionsListResult, EditorToolAnnotation, EditorToolCall, EditorToolDefinition, EditorToolErrorCode, EditorToolErrorResult, EditorToolResult, EditorVisibilityFilter, EditorVisibilityPredicate, EditorWriteReceipt, GetEditorToolsOptions, HasEditableAISelectionRefs, LOCKED_BLOCK_PLACEHOLDER_TAG, RegisterEditorToolsOptions, SerializeAIEditContextOptions, SerializeAISelectionMarkdownOptions, SerializedAIEditContext, type SyncServerAgentGrant, type SyncServerAgentHost, type SyncServerAgentOptions, type SyncServerAgentPresenceInput, type SyncServerAgentPresenceOptions, type SyncServerAgentPresencePoint, type SyncServerAgentPresenceSelection, type SyncServerAgentReceipt, type SyncServerAgentRunResult, WebMCPProducerContext, createEditorAgent, createSyncServerAgent, getEditorTools, hasEditableAISelection, registerEditorTools, serializeAIEditContext, serializeAISelectionMarkdown };
@@ -1,10 +1,10 @@
1
- import { $o as Range, N as Descendant, Vl as TxDeclaredMethod, Wl as Value, fs as RootKey, ma as NodeKey } from "../../tx-only-x32UA-pQ-OQbgWQrN.js";
2
- import "../../htmlTypes-9HQ8p7c5.js";
3
- import { Ra as DefinitionOf, ao as NormalizePluginSelectors, fo as PluginReference, p as BasePlugin, uo as PluginDependency, xo as PluginSelectorMethods } from "../../core-DoxvjG5W.js";
4
- import { Tt as Plugin, ot as Editor } from "../../index-UuSQ_p3c.js";
5
- import { V as EditorVisibilityFilter, _ as EditorAgentPresence, g as EditorAgentOptions, i as AILockedBlockRef, p as EditorAgent, t as RegisterEditorToolsOptions } from "../../registerEditorTools-DoRs57-M.js";
6
- import { dt as RangeGeometry } from "../../EditorStatic-ldAMJg-F.js";
7
- import { T as MarkdownSliceParseResult, b as MarkdownPlaceholderParseResult, c as Unsafe, d as MarkdownDocumentParseResult, f as MarkdownEditorSerializeOptions, g as MarkdownParseLimits, j as MarkdownSyncPlugin, k as MarkdownStreamSnapshot, o as Handle, s as Join, w as MarkdownSerializeResult } from "../../index-C4KIDKwP.js";
1
+ import { Aa as NodeKey, Cu as Value, P as Descendant, Vs as RootKey, bu as TxDeclaredMethod, hs as Range } from "../../tx-only-BYWUDN_r-CyQXNQp-.js";
2
+ import "../../htmlTypes-BNz6ylqQ.js";
3
+ import { Ra as DefinitionOf, ao as NormalizePluginSelectors, fo as PluginReference, p as BasePlugin, uo as PluginDependency, xo as PluginSelectorMethods } from "../../core-Cd7dbk4H.js";
4
+ import { Dt as Plugin, ct as Editor } from "../../index-LCIv8Dt5.js";
5
+ import { V as EditorVisibilityFilter, _ as EditorAgentPresence, g as EditorAgentOptions, i as AILockedBlockRef, p as EditorAgent, t as RegisterEditorToolsOptions } from "../../registerEditorTools-BqW9lr_K.js";
6
+ import { dt as RangeGeometry } from "../../EditorStatic-C2vnO5Wd.js";
7
+ import { T as MarkdownSliceParseResult, b as MarkdownPlaceholderParseResult, c as Unsafe, d as MarkdownDocumentParseResult, f as MarkdownEditorSerializeOptions, g as MarkdownParseLimits, j as MarkdownSyncPlugin, k as MarkdownStreamSnapshot, o as Handle, s as Join, w as MarkdownSerializeResult } from "../../index-BphzyHPD.js";
8
8
  import React$1 from "react";
9
9
  /** Streaming draft landing mode for inline AI sessions. */
10
10
  type AIDraftMode = 'detached' | 'suggestion';
@@ -1,5 +1,5 @@
1
- import { f as AuthoredDocumentProjection, m as AuthoredProjectionRefusal, p as AuthoredProjectionDiagnostic } from "../tx-only-x32UA-pQ-OQbgWQrN.js";
2
- import { C as AuthoredView, D as isAuthoredRefusal, T as SplitGave, _ as AuthoredPlaceError, a as AuthoredChangeMember, b as AuthoredResult, c as AuthoredComparisonImportResult, d as AuthoredGroupPart, f as AuthoredGroupQuery, g as AuthoredPage, h as AuthoredOutcome, i as AuthoredChangeKind, l as AuthoredDecision, m as AuthoredOptions, n as AuthoredChangeDetails, o as AuthoredChangePart, p as AuthoredMark, r as AuthoredChangeGroup, s as AuthoredChangesDelta, t as AuthoredChange, u as AuthoredGroupDetails, v as AuthoredQuery, w as GaveWrite, x as AuthoredReview, y as AuthoredRefusal } from "../authored-Cux94E76-fEDdP_BS.js";
3
- import { n as projectAuthoredDocument, t as AuthoredFormatProjection } from "../index-UrJ6V3_e.js";
4
- import { n as suggestionColorOf, r as AuthoredPlugin, t as AUTHORED_COLOR_COUNT } from "../index-B048Z6JD.js";
1
+ import { f as AuthoredDocumentProjection, m as AuthoredProjectionRefusal, p as AuthoredProjectionDiagnostic } from "../tx-only-BYWUDN_r-CyQXNQp-.js";
2
+ import { C as AuthoredView, D as isAuthoredRefusal, T as SplitGave, _ as AuthoredPlaceError, a as AuthoredChangeMember, b as AuthoredResult, c as AuthoredComparisonImportResult, d as AuthoredGroupPart, f as AuthoredGroupQuery, g as AuthoredPage, h as AuthoredOutcome, i as AuthoredChangeKind, l as AuthoredDecision, m as AuthoredOptions, n as AuthoredChangeDetails, o as AuthoredChangePart, p as AuthoredMark, r as AuthoredChangeGroup, s as AuthoredChangesDelta, t as AuthoredChange, u as AuthoredGroupDetails, v as AuthoredQuery, w as GaveWrite, x as AuthoredReview, y as AuthoredRefusal } from "../authored-Bx55e8NK-B-3-7x2a.js";
3
+ import { n as projectAuthoredDocument, t as AuthoredFormatProjection } from "../index-opUVqmJA.js";
4
+ import { n as suggestionColorOf, r as AuthoredPlugin, t as AUTHORED_COLOR_COUNT } from "../index-DPQEcaX7.js";
5
5
  export { AUTHORED_COLOR_COUNT, type AuthoredChange, type AuthoredChangeDetails, type AuthoredChangeGroup, type AuthoredChangeKind, type AuthoredChangeMember, type AuthoredChangePart, type AuthoredChangesDelta, type AuthoredComparisonImportResult, type AuthoredDecision, type AuthoredDocumentProjection, type AuthoredFormatProjection, type AuthoredGroupDetails, type AuthoredGroupPart, type AuthoredGroupQuery, type AuthoredMark, type AuthoredOptions, type AuthoredOutcome, type AuthoredPage, AuthoredPlaceError, AuthoredPlugin, type AuthoredProjectionDiagnostic, type AuthoredProjectionRefusal, type AuthoredQuery, type AuthoredRefusal, type AuthoredResult, type AuthoredReview, type AuthoredView, type GaveWrite, type SplitGave, isAuthoredRefusal, projectAuthoredDocument, suggestionColorOf };
@@ -1,6 +1,6 @@
1
- import { $o as Range, Bi as Location, Go as PropertySetDescriptor, Mt as EditorJsonValue, Po as Point, Qa as Plugin, Qs as SchemaPropertyCopyPolicy, Ul as TxOnlyMethod, Vl as TxDeclaredMethod, Vo as PropertyJsonDescriptor, Wa as Path, ac as SchemaPropertyLandingPolicy, cc as SchemaPropertySplitPolicy, d as AnyEditor, ec as SchemaPropertyExclusiveGroup, jt as EditorJsonObject, lc as SchemaPropertyTypeChangePolicy, ma as NodeKey, mi as EditorViewOptions, mo as PluginDependencyReferenceFor, sc as SchemaPropertyRole, w as ContentSlice } from "./tx-only-x32UA-pQ-OQbgWQrN.js";
2
- import "./refusal-VX2Y6Wmd-BJzbgrSZ.js";
3
- import { r as Comparison } from "./index-CnumypT3-DGx8_6Ye.js";
1
+ import { Aa as NodeKey, Ao as PluginDependencyReferenceFor, Ci as EditorViewOptions, Dc as SchemaPropertyCopyPolicy, Ic as SchemaPropertyRole, Lc as SchemaPropertySplitPolicy, Lt as EditorJsonObject, Pc as SchemaPropertyLandingPolicy, Rc as SchemaPropertyTypeChangePolicy, Rt as EditorJsonValue, Su as TxOnlyMethod, T as ContentSlice, Xo as Point, bu as TxDeclaredMethod, d as AnyEditor, hs as Range, kc as SchemaPropertyExclusiveGroup, mo as Plugin, na as Location, oo as Path, rs as PropertyJsonDescriptor, ss as PropertySetDescriptor } from "./tx-only-BYWUDN_r-CyQXNQp-.js";
2
+ import "./refusal-CA1A2E_8-BvFhdd3c.js";
3
+ import { r as Comparison } from "./index-Er5BwoQd-CULo8twl.js";
4
4
  /** Outcome of proposing a validated document comparison as one native change. */
5
5
  type AuthoredComparisonImportResult = Readonly<{
6
6
  ids: readonly string[];
@@ -0,0 +1 @@
1
+ import "./tx-only-BYWUDN_r-CyQXNQp-.js";
@@ -1,5 +1,5 @@
1
- import "../../index-UuSQ_p3c.js";
2
- import { S as ExternalTextAdapter } from "../../EditorStatic-ldAMJg-F.js";
1
+ import "../../index-LCIv8Dt5.js";
2
+ import { S as ExternalTextAdapter } from "../../EditorStatic-C2vnO5Wd.js";
3
3
  import { Extension } from "@codemirror/state";
4
4
  type CodeBlockCodeMirrorConfig = Readonly<{
5
5
  language?: string;
@@ -1,5 +1,5 @@
1
- import { Yi as NamedRootKey } from "./tx-only-x32UA-pQ-OQbgWQrN.js";
2
- import "./core-DoxvjG5W.js";
1
+ import { da as NamedRootKey } from "./tx-only-BYWUDN_r-CyQXNQp-.js";
2
+ import "./core-Cd7dbk4H.js";
3
3
  /** One endpoint of a durable `CommentAnchor`, identified by stable block `elementId` and character offset. */
4
4
  type CommentAnchorEndpoint = Readonly<{
5
5
  elementId: string;
@@ -1,6 +1,6 @@
1
- import { Eu as readEditorSchemaContract, _n as EditorSchemaContractContentRoot, bn as EditorSchemaContractRoot, gn as EditorSchemaContractContentProgram, hn as EditorSchemaContractChangeKind, mn as EditorSchemaContractChange, ou as diffEditorSchemaContracts, pn as EditorSchemaContract, vn as EditorSchemaContractDiff, yn as EditorSchemaContractElement } from "../tx-only-x32UA-pQ-OQbgWQrN.js";
2
- import { h as EditorApplicationSchema } from "../htmlTypes-9HQ8p7c5.js";
3
- import { ft as EditorPropertyTypes, st as BasePluginInput, tt as EditorCompilation } from "../core-DoxvjG5W.js";
1
+ import { Cn as EditorSchemaContractContentProgram, Dn as EditorSchemaContractRoot, En as EditorSchemaContractElement, Ku as diffEditorSchemaContracts, Sn as EditorSchemaContractChangeKind, Tn as EditorSchemaContractDiff, _d as readEditorSchemaContract, bn as EditorSchemaContract, wn as EditorSchemaContractContentRoot, xn as EditorSchemaContractChange } from "../tx-only-BYWUDN_r-CyQXNQp-.js";
2
+ import { h as EditorApplicationSchema } from "../htmlTypes-BNz6ylqQ.js";
3
+ import { ft as EditorPropertyTypes, st as BasePluginInput, tt as EditorCompilation } from "../core-Cd7dbk4H.js";
4
4
  /**
5
5
  * Compile nominal plugins and optional application schema into immutable JSON data.
6
6
  * Evaluates configuration, API factories and validators without activating plugins
@@ -1,7 +1,7 @@
1
- import { $ as EditorCommandDispatch, $o as Range, $r as EditorUpdateContext, $s as SchemaPropertyDefinition, Al as TransferPlugin$1, As as SchemaElementFor, Bi as Location, Bo as PropertyEnumDescriptor, D as Decoration, Da as NodeSelection, Di as HistoryApi, Do as PluginTypeProvider, En as EditorSchemaElement, Eo as PluginReference$1, Es as SchemaContentRule, Et as EditorGenericMethod, Fn as EditorSchemaPlugin, Fs as SchemaElementProperty, Ft as EditorLifecycleErrorSink, Gn as EditorSchemaSourceProvider, Gr as EditorTransactionSpecBuilder, H as EditorAboveOptions, Hl as TxMethodDeclarations, Ht as EditorNodeGetOptions, In as EditorSchemaPluginProvider, Is as SchemaElementPropertyDefinition, Js as SchemaNodeTypeProvider, Jt as EditorPreviousOptions, Ki as MaximizeMode, Kl as WithNodeTarget, Kt as EditorNodesReadOptions, L as DescendantIn, Mo as PluginWitnessFor, Mt as EditorJsonValue, N as Descendant, Ni as InitialValue, Nt as EditorLevelsOptions, O as DecorationAttributes, Oo as PluginTypeProviderOf, Os as SchemaElement, Po as Point$1, Ps as SchemaElementPropertiesFor, Qa as Plugin, Qo as PropertyValueOptions, Ra as NodeTypeSelector, Ri as LeafPosition, Ro as PropertyBooleanDescriptor, Rt as EditorNextOptions, Sn as EditorSchemaDeclaration, Sr as EditorTextChangeContext, T as ContentSlice$1, Ta as NodeRemoveNodesOptions, Tn as EditorSchemaDerivedDefinition, U as EditorBlockOptions, Uc as StripTxOnly, Uo as PropertyNumberDescriptor, Ur as EditorTransactionSelectionApi, Us as SchemaElementTypes, Ut as EditorNodeTypeProvider, V as Editor$1, Vl as TxDeclaredMethod, Vo as PropertyJsonDescriptor, Wa as Path, Wl as Value, Wo as PropertyOptionsOf, Wt as EditorNodeUnsetOptions, Xa as PersistedSelection, Xc as Text$1, Xi as Node$1, Xs as SchemaPluginsOf, Yo as PropertyValueDescriptor, Zo as PropertyValueOf, Zs as SchemaProperty, _a as NodeMatch, _c as SchemaTextPropertyDefinition, _t as EditorDocumentValue, bc as SchemaTypesTarget, ci as EditorUpdateTransactionProvider, co as PluginContribution, do as PluginDefinitionInput, dt as EditorCoreStateView, ei as EditorUpdateMethods, en as EditorReadMethodRecord, er as EditorSelectionBlockOptions, fc as SchemaTarget, fi as EditorValueTypeProvider, fl as TextTarget, fo as PluginDependencyContractReference, fs as RootKey, gc as SchemaTextProperty, gi as Element$1, gl as TransactionSpec, go as PluginInstalledCapabilitiesOf, gs as SchemaContentDefault, gt as EditorDocumentRecords, hc as SchemaTextProperties, hs as SchemaContent, ht as EditorDirectUpdate, ia as NodeEntry, ic as SchemaPropertyKey, io as PluginCapabilities, j as DefinitionOf$1, ja as NodeTarget, jl as TransferRead, jr as EditorTransactionChangeContext, k as DecorationRefresh, ka as NodeSetNodesOptions, ks as SchemaElementConstructionPropertiesFor, kt as EditorInstalledUpdateGroups, la as NodeIn, li as EditorUpdateValueFromPlugin, mo as PluginDependencyReferenceFor, mr as EditorStateSelectionApi, nn as EditorReadMethods, oi as EditorUpdateTransaction, ol as TextInsertTextOptions, p as AuthoredProjectionDiagnostic, pc as SchemaText, pn as EditorSchemaContract, po as PluginDependencyReference, pr as EditorStateSchemaApi, ps as SchemaBlockContentOptions, qo as PropertyStringDescriptor, qs as SchemaKeyPrefix, qt as EditorParentOptions, ri as EditorUpdateResult, si as EditorUpdateTransactionOf, st as EditorCommitContext, tc as SchemaPropertyHandle, ti as EditorUpdatePolicy, tn as EditorReadMethodTree, ua as NodeInsertNodesOptions, uo as PluginDefinition, v as BlockInsertOptions$1, va as NodeMatchPredicate, vl as TransferApi, wi as ElementOf, wr as EditorToggleBlockOptions, xn as EditorSchemaContribution, xr as EditorStateViewProvider, xs as SchemaContentRootContribution, yc as SchemaTextPropertyOptions, yo as PluginPortal, yr as EditorStateView, zt as EditorNodeChangeContext } from "./tx-only-x32UA-pQ-OQbgWQrN.js";
2
- import { d as HtmlSerializeResult, f as HtmlSliceParseResult, g as StructuralPlainTextDiagnostic, h as EditorApplicationSchema, i as HtmlEditorParseOptions, r as HtmlDocumentParseResult, t as HtmlApi } from "./htmlTypes-9HQ8p7c5.js";
3
- import { B as ScrollMargin, M as DataTransferDecodeContext, P as DataTransferEncodeContext, R as ScrollIntoViewOptions, c as DOMApi, l as DOMClipboardApi, q as HotkeySpec } from "./index-BujEk356.js";
4
- import { a as HistoryStateApi, i as HistoryPlugin$1, o as HistoryTxApi } from "./index-Zj4bj9bZ.js";
1
+ import { $r as EditorTransactionSpecBuilder, $t as EditorNodesReadOptions, A as DecorationRefresh, Ac as SchemaPropertyHandle, Ao as PluginDependencyReferenceFor, Ar as EditorTextChangeContext, Bt as EditorLevelsOptions, Cc as SchemaNodeTypeProvider, Cu as Value, Do as PluginDefinitionInput, Dr as EditorStateView, E as ContentSlice$1, Ea as NodeInsertNodesOptions, Ec as SchemaProperty, Eo as PluginDefinition, Fo as PluginPortal, Ft as EditorInstalledUpdateGroups, Ga as NodeSetNodesOptions, Gc as SchemaText, Gl as TextTarget, Gs as SchemaContentDefault, Gt as EditorNextOptions, H as Editor$1, Hn as EditorSchemaPlugin, Ho as PluginReference$1, Hs as SchemaBlockContentOptions, Ht as EditorLifecycleErrorSink, Ii as HistoryApi, Jc as SchemaTextProperty, Ji as InitialValue, Jo as PluginWitnessFor, Kt as EditorNodeChangeContext, M as DefinitionOf$1, Mn as EditorSchemaDerivedDefinition, Mo as PluginInstalledCapabilitiesOf, Mr as EditorToggleBlockOptions, Na as NodeMatch, Nc as SchemaPropertyKey, Ni as ElementOf, Nn as EditorSchemaElement, O as Decoration, Oc as SchemaPropertyDefinition, On as EditorSchemaContribution, Oo as PluginDependencyContractReference, P as Descendant, Pa as NodeMatchPredicate, Qc as SchemaTypesTarget, Qn as EditorSchemaSourceProvider, R as DescendantIn, Rt as EditorJsonValue, Sc as SchemaKeyPrefix, Sl as StripTxOnly, Sr as EditorStateSelectionApi, Ta as NodeIn, Tc as SchemaPluginsOf, Ti as Element$1, Tu as WithNodeTarget, U as EditorAboveOptions, Ua as NodeSelection, Un as EditorSchemaPluginProvider, Uo as PluginTypeProvider, Va as NodeRemoveNodesOptions, Vs as RootKey, W as EditorBlockOptions, Wc as SchemaTarget, Wo as PluginTypeProviderOf, Ws as SchemaContent, Xo as Point$1, Xs as SchemaContentRootContribution, Xt as EditorNodeTypeProvider, Yc as SchemaTextPropertyDefinition, Yl as TransactionSpec, Yt as EditorNodeGetOptions, Zc as SchemaTextPropertyOptions, Zl as TransferApi, Zr as EditorTransactionSelectionApi, Zt as EditorNodeUnsetOptions, _i as EditorUpdateTransactionProvider, ac as SchemaElementFor, as as PropertyNumberDescriptor, ba as NodeEntry, bn as EditorSchemaContract, bo as PluginCapabilities, bt as EditorDocumentValue, bu as TxDeclaredMethod, ca as MaximizeMode, ci as EditorUpdateMethods, cn as EditorReadMethodTree, dc as SchemaElementPropertyDefinition, ds as PropertyValueDescriptor, ea as LeafPosition, en as EditorParentOptions, eo as NodeTypeSelector, es as PropertyBooleanDescriptor, fa as Node$1, fi as EditorUpdateResult, fo as PersistedSelection, gi as EditorUpdateTransactionOf, hi as EditorUpdateTransaction, hs as Range, ic as SchemaElementConstructionPropertiesFor, k as DecorationAttributes, kl as Text$1, kn as EditorSchemaDeclaration, ko as PluginDependencyReference, kr as EditorStateViewProvider, kt as EditorGenericMethod, lc as SchemaElementPropertiesFor, li as EditorUpdatePolicy, ln as EditorReadMethods, ls as PropertyStringDescriptor, lt as EditorCommitContext, lu as TransferPlugin$1, mo as Plugin, ms as PropertyValueOptions, mt as EditorCoreStateView, na as Location, ns as PropertyEnumDescriptor, oo as Path, os as PropertyOptionsOf, p as AuthoredProjectionDiagnostic, ps as PropertyValueOf, qa as NodeTarget, qc as SchemaTextProperties, rc as SchemaElement, rs as PropertyJsonDescriptor, si as EditorUpdateContext, sn as EditorReadMethodRecord, sr as EditorSelectionBlockOptions, tc as SchemaContentRule, tn as EditorPreviousOptions, tt as EditorCommandDispatch, uc as SchemaElementProperty, uu as TransferRead, v as BlockInsertOptions$1, vc as SchemaElementTypes, vi as EditorUpdateValueFromPlugin, vt as EditorDirectUpdate, wo as PluginContribution, xi as EditorValueTypeProvider, xr as EditorStateSchemaApi, xu as TxMethodDeclarations, yt as EditorDocumentRecords, zl as TextInsertTextOptions, zr as EditorTransactionChangeContext } from "./tx-only-BYWUDN_r-CyQXNQp-.js";
2
+ import { d as HtmlSerializeResult, f as HtmlSliceParseResult, g as StructuralPlainTextDiagnostic, h as EditorApplicationSchema, i as HtmlEditorParseOptions, r as HtmlDocumentParseResult, t as HtmlApi } from "./htmlTypes-BNz6ylqQ.js";
3
+ import { B as ScrollMargin, M as DataTransferDecodeContext, P as DataTransferEncodeContext, R as ScrollIntoViewOptions, c as DOMApi, l as DOMClipboardApi, q as HotkeySpec } from "./index-BcrleRIo.js";
4
+ import { a as HistoryStateApi, i as HistoryPlugin$1, o as HistoryTxApi } from "./index-DhwbLtre.js";
5
5
  import { Draft } from "mutative";
6
6
  import { BlockContent, Blockquote, Break, Code, DefinitionContent, Delete, Emphasis, FootnoteDefinition, FootnoteReference, Heading, Html, Image, InlineCode, Link, List, ListItem, Paragraph, PhrasingContent, RootContent, Strong, Table, TableCell, TableRow, Text, ThematicBreak } from "mdast";
7
7
  import { InlineMath, Math } from "mdast-util-math";
@@ -4991,6 +4991,18 @@ type DocxInline = DocxEncodedFragment | Readonly<{
4991
4991
  kind: 'footnoteReference';
4992
4992
  /** Footnote reference identifier matching a `footnoteDefinition`. */
4993
4993
  ref: string;
4994
+ }> | Readonly<{
4995
+ /** Passive Word dynamic field instruction (for example `'PAGE'`, `'NUMPAGES'`, `'REF Clause1'`, `'MERGEFIELD Name'`, `'DATE'`, `'SEQ Figure'`). */
4996
+ instruction: string;
4997
+ kind: 'wordField';
4998
+ /** Cached display text shown inside the field result. */
4999
+ text?: string;
5000
+ }> | Readonly<{
5001
+ kind: 'mention';
5002
+ /** Display label rendered after `@` when present. */
5003
+ label?: string;
5004
+ /** Stable mention target identifier (user ID, email, or entity ref). */
5005
+ ref: string;
4994
5006
  }>;
4995
5007
  /** Table cell in the DOCX export intermediate representation. */
4996
5008
  type DocxTableCell = Readonly<{
@@ -5140,6 +5152,8 @@ type DocxImportTableCell = Readonly<{
5140
5152
  colSpan?: number;
5141
5153
  header?: boolean;
5142
5154
  rowSpan?: number;
5155
+ /** Optional vertical alignment decoded from `w:vAlign`. */
5156
+ verticalAlign?: 'bottom' | 'center' | 'top';
5143
5157
  }>;
5144
5158
  /** Table row in the DOCX import intermediate representation. */
5145
5159
  type DocxImportTableRow = Readonly<{
@@ -5166,6 +5180,18 @@ type DocxImportInline = Readonly<{
5166
5180
  }> | Readonly<{
5167
5181
  checked: boolean;
5168
5182
  kind: 'checkbox';
5183
+ }> | Readonly<{
5184
+ /** Passive Word dynamic field instruction decoded from `w:fldSimple` or `w:fldChar`. */
5185
+ instruction: string;
5186
+ kind: 'wordField';
5187
+ /** Cached display text decoded from the field result. */
5188
+ text: string;
5189
+ }> | Readonly<{
5190
+ kind: 'mention';
5191
+ /** Display label decoded from `@label` when present. */
5192
+ label?: string;
5193
+ /** Stable mention target identifier decoded from the Word mention tag or `mailto:` anchor. */
5194
+ ref: string;
5169
5195
  }>;
5170
5196
  /** Block node in the DOCX import intermediate representation. */
5171
5197
  type DocxImportBlock = Readonly<{
package/dist/core.js CHANGED
@@ -20,6 +20,6 @@ import { PLUGINS } from "./utils/plate-keys.js";
20
20
  import { SingleBlockPlugin } from "./utils/plugins/SingleBlockPlugin.js";
21
21
  import { SingleLinePlugin } from "./utils/plugins/SingleLinePlugin.js";
22
22
  import { TrailingBlockPlugin } from "./utils/plugins/TrailingBlockPlugin.js";
23
- import { ContentSlice, DocumentChange, EditorSchemaValidationError, ElementApi, LocationApi, NodeApi, PathApi, PluginPublicationError, PointApi, RangeApi, SelectionApi, TextApi, authoredVeto, createEditorView, defineCommand, defineEditorSchema, defineEffect, definePluginCompartment, definePluginPoint, defineStateField, defineUpdateAnnotation, documentReplacement, editorCommands, editorReads, getEditorRuntimeOwner, isEditor, locateAt, nodeWriteVeto, property, schema, screenReaderAnnouncementEffect, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, target, transfer, transferVeto, txLocate, txOnly, txSelection } from "plitejs";
23
+ import { ContentSlice, DocumentChange, EditorIndexCycleError, EditorSchemaValidationError, ElementApi, LocationApi, NodeApi, PathApi, PluginPublicationError, PointApi, RangeApi, SelectionApi, TextApi, applyRecordCrdtOp, authoredVeto, compareFractionalKeys, compareRecordStamp, createEditorView, createRecordCrdtState, createRecordStamp, defineCommand, defineEditorSchema, defineEffect, defineIndex, definePluginCompartment, definePluginPoint, defineRecordSet, defineStateField, defineUpdateAnnotation, documentReplacement, editorCommands, editorReads, fractionalKeyBetween, fractionalKeysBetween, getEditorRuntimeOwner, isEditor, isValidFractionalKey, locateAt, materializeRecordCrdtState, mergeRecordCrdtState, nodeWriteVeto, property, schema, screenReaderAnnouncementEffect, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, target, transfer, transferVeto, txLocate, txOnly, txSelection } from "plitejs";
24
24
  export * from "plitejs";
25
- export { AffinityPlugin, BaseParagraphPlugin, ContentSlice, DebugPlugin, DocumentChange, EditorError, EditorSchemaValidationError, ElementApi, HistoryPlugin, HtmlPlugin, IS_APPLE, LocationApi, NodeApi, PLUGINS, PathApi, PluginPublicationError, PointApi, RangeApi, SelectionApi, SingleBlockPlugin, SingleLinePlugin, TextApi, TrailingBlockPlugin, TransferPlugin, authoredVeto, createBlockFenceInputRule, createEditor, createEditorView, createMarkInputRule, createTextSubstitutionInputRule, defineCommand, defineEditorSchema, defineEffect, defineInputRule, definePlugin, definePluginCompartment, definePluginPoint, defineStateField, defineUpdateAnnotation, documentReplacement, editorCommands, editorReads, getEditorRuntimeOwner, getFragmentProp, getInjectMatch, inputRuleVeto, isDefined, isEditor, isUrl, locateAt, matchBlockStart, matchDelimitedInline, nanoid, nodeWriteVeto, property, schema, screenReaderAnnouncementEffect, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, target, transfer, transferVeto, txLocate, txOnly, txSelection };
25
+ export { AffinityPlugin, BaseParagraphPlugin, ContentSlice, DebugPlugin, DocumentChange, EditorError, EditorIndexCycleError, EditorSchemaValidationError, ElementApi, HistoryPlugin, HtmlPlugin, IS_APPLE, LocationApi, NodeApi, PLUGINS, PathApi, PluginPublicationError, PointApi, RangeApi, SelectionApi, SingleBlockPlugin, SingleLinePlugin, TextApi, TrailingBlockPlugin, TransferPlugin, applyRecordCrdtOp, authoredVeto, compareFractionalKeys, compareRecordStamp, createBlockFenceInputRule, createEditor, createEditorView, createMarkInputRule, createRecordCrdtState, createRecordStamp, createTextSubstitutionInputRule, defineCommand, defineEditorSchema, defineEffect, defineIndex, defineInputRule, definePlugin, definePluginCompartment, definePluginPoint, defineRecordSet, defineStateField, defineUpdateAnnotation, documentReplacement, editorCommands, editorReads, fractionalKeyBetween, fractionalKeysBetween, getEditorRuntimeOwner, getFragmentProp, getInjectMatch, inputRuleVeto, isDefined, isEditor, isUrl, isValidFractionalKey, locateAt, matchBlockStart, matchDelimitedInline, materializeRecordCrdtState, mergeRecordCrdtState, nanoid, nodeWriteVeto, property, schema, screenReaderAnnouncementEffect, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, target, transfer, transferVeto, txLocate, txOnly, txSelection };
@@ -1,3 +1,3 @@
1
- import { _ as applyDiff, a as ComparisonDiagnostic, b as prepareDiff, c as ComparisonSpan, d as MergeConflictReason, f as MergeRegion, g as PreparedDiff, h as PrepareDiffResult, i as ComparisonCorrespondence, l as MergeConflict, m as MergeResult, n as ComparedChange, o as ComparisonEffect, p as MergeResolution, r as Comparison, s as ComparisonSnapshot, t as ApplyDiffResult, u as MergeConflictProperty, v as compare, y as merge } from "../index-CnumypT3-DGx8_6Ye.js";
2
- import "../index-B-SGl9uM.js";
1
+ import { _ as applyDiff, a as ComparisonDiagnostic, b as prepareDiff, c as ComparisonSpan, d as MergeConflictReason, f as MergeRegion, g as PreparedDiff, h as PrepareDiffResult, i as ComparisonCorrespondence, l as MergeConflict, m as MergeResult, n as ComparedChange, o as ComparisonEffect, p as MergeResolution, r as Comparison, s as ComparisonSnapshot, t as ApplyDiffResult, u as MergeConflictProperty, v as compare, y as merge } from "../index-Er5BwoQd-CULo8twl.js";
2
+ import "../index-CNEotALg.js";
3
3
  export { ApplyDiffResult, ComparedChange, Comparison, ComparisonCorrespondence, ComparisonDiagnostic, ComparisonEffect, ComparisonSnapshot, ComparisonSpan, MergeConflict, MergeConflictProperty, MergeConflictReason, MergeRegion, MergeResolution, MergeResult, PrepareDiffResult, PreparedDiff, applyDiff, compare, merge, prepareDiff };
@@ -34,6 +34,32 @@ For a new project, scaffold a starter directly:
34
34
  npx shadcn@latest create @plate/editor-basic --preset b0 --base base
35
35
  ```
36
36
 
37
+ ### Authenticated Pro and Business registries
38
+
39
+ Organizations on [Plate Pro](/docs/pro) or [Plate Business](/docs/business) can add the Bearer-authenticated `@plate-pro` and `@plate-business` registries to `components.json` so the shadcn MCP server inspects and installs paid slices with `PLATE_API_KEY`:
40
+
41
+ ```json
42
+ {
43
+ "registries": {
44
+ "@plate": "https://platejs.org/r/{style}/{name}.json",
45
+ "@plate-pro": {
46
+ "url": "https://api.platejs.org/r/{name}.json",
47
+ "headers": {
48
+ "Authorization": "Bearer ${PLATE_API_KEY}"
49
+ }
50
+ },
51
+ "@plate-business": {
52
+ "url": "https://api.platejs.org/r/business/{name}.json",
53
+ "headers": {
54
+ "Authorization": "Bearer ${PLATE_API_KEY}"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ See [Pro Installation](/docs/pro/installation) for API key setup and [Pricing](/pricing) for plan details.
62
+
37
63
  ## Configure your coding tool
38
64
 
39
65
  ### Cursor
@@ -12,7 +12,7 @@ Install from GitHub:
12
12
  npx skills add udecode/plate --skill plate
13
13
  ```
14
14
 
15
- Or install through well-known site discovery (use `https://beta.platejs.org` during v2 beta):
15
+ Or install through well-known site discovery (use `https://beta.platejs.org` during beta):
16
16
 
17
17
  ```bash
18
18
  npx skills add https://beta.platejs.org --skill plate
@@ -52,7 +52,7 @@ npx @platejs/cli sync @plate/callout
52
52
  | `references/ai-and-agents.md` | Wiring `platejs/ai` tools, draft sessions, WebMCP registration, and server-side sync agents. |
53
53
  | `references/testing.md` | Verifying selection, focus, IME, clipboard, and drag behavior in real browsers with `@platejs/test`. |
54
54
  | `references/report-a-bug.md` | Isolating a minimal reproduction without app code, searching open issues, and confirming before filing. |
55
- | `references/pricing.md` | Evaluating Free (MIT) vs Pro ($149/mo), Business ($499/mo), Enterprise, and Founding Plus (`/pricing.md`). |
55
+ | `references/pricing.md` | Evaluating Free (MIT) vs Pro ($1,490/yr), Business ($4,990/yr), Enterprise (Custom), and Founding Plus (`/pricing.md`). |
56
56
 
57
57
  ## Recommended workflow
58
58
 
@@ -68,4 +68,4 @@ When an agent hits a failure inside `platejs` rather than your app code, `refere
68
68
 
69
69
  ## Pro and Business
70
70
 
71
- Plate Pro ships `plate-deploy-cloudflare`, `plate-deploy-expo`, `plate-deploy-vercel`, and `plate-upgrade` through `plate skills sync` for 1-command self-host deployment, Expo EAS builds, and 3-way upgrades across customized Plate UI files. Plate Business adds the `plate-security-hardening` skill alongside `@plate-business/security-kernel`, `@plate-business/compliance-pdf`, `@plate-business/security-proof`, and `plate verify` CI. See [Pricing](/pricing).
71
+ Plate Pro ships `plate-deploy-cloudflare`, `plate-deploy-expo`, `plate-deploy-vercel`, and `plate-upgrade` through `plate skills sync` for 1-command self-host deployment, Expo EAS builds, and 3-way upgrades across customized Plate UI files. Plate Business adds the `plate-security-hardening` skill alongside [`@plate-business/security-kernel`](/docs/business/security-kernel), [`@plate-business/compliance-pdf`](/docs/business/compliance-pdf), [`@plate-business/security-proof`](/docs/business/security-proof), and `plate verify` CI. See [Pricing](/pricing).
@@ -13,7 +13,7 @@ Set up Plate UI in this Next.js project. It needs React 19.2+, Tailwind CSS v4,
13
13
  If the folder is empty, scaffold the starter first: npx shadcn@latest create https://beta.platejs.org/r/base-nova/editor-basic.json --preset b0 --base base --template next
14
14
 
15
15
  1. In an existing project, keep any already-installed platejs version, configure @plate in components.json, and add the basic editor: npx shadcn@latest add @plate/editor-basic
16
- If this is a new Plate v2 beta project, install platejs@beta so node_modules/platejs/dist/docs/llms.txt is available, and point @plate in components.json to "https://beta.platejs.org/r/{style}/{name}.json".
16
+ If this is a new Plate beta project, install platejs@beta so node_modules/platejs/dist/docs/llms.txt is available, and point @plate in components.json to "https://beta.platejs.org/r/{style}/{name}.json".
17
17
  2. Add a note to AGENTS.md, creating it if needed: before writing Plate editor code, read node_modules/platejs/dist/docs/llms.txt and the pages it lists so you target the installed version.
18
18
  3. If you support skills, run: npx skills add udecode/plate --skill plate
19
19
  4. Run the project typecheck and build and make sure both pass.
@@ -60,9 +60,14 @@ Pick the smallest surface that covers your task instead of loading the entire do
60
60
  | `/llms.txt` | Remote single-shot orientation: core loop, section bundles, `.md` URLs, and every `@plate/<name>` install command. |
61
61
  | `/llms-agents.txt`, `/llms-guides.txt`, `/llms-plugins.txt` | Section bundles for reading one whole lane in a single fetch. |
62
62
  | `/docs/<path>.md` (or `Accept: text/markdown`) | Targeted single-page Markdown for any guide, plugin, component, or example. |
63
+ | `/pricing.md` | Machine-readable Free (MIT), Pro, Business, and Enterprise pricing, deliverables, and buy-vs-build criteria. |
63
64
  | `/registry/changelog/index.json` & `components.json` | Machine-readable Plate UI update history for merging upstream copied UI changes safely. |
64
65
 
65
- Use [MCP Server](/docs/agents/mcp) to give coding tools direct access to `@plate` registry items, kits, and examples via the shadcn MCP server.
66
+ Use [MCP Server](/docs/agents/mcp) to give coding tools direct access to `@plate`, `@plate-pro`, and `@plate-business` registry items, kits, and examples via the shadcn MCP server.
67
+
68
+ ## Pro and Business
69
+
70
+ Every core package and the public `plate` skill stay MIT. [Plate Pro](/docs/pro) adds 24 `@plate-pro/*` slices plus 4 deploy and upgrade skills (`plate-deploy-cloudflare`, `plate-deploy-expo`, `plate-deploy-vercel`, `plate-upgrade`), and [Plate Business](/docs/business) adds `@plate-business/{security-kernel,compliance-pdf,security-proof}`, `plate-security-hardening`, and `plate verify` CI. Sync paid skills via `npx @platejs/cli skills sync` and compare tiers on [Pricing](/pricing) (`/pricing.md`).
66
71
 
67
72
  ## Connect a runtime agent to your editor
68
73
 
@@ -77,4 +77,4 @@ Add the backing `/api/ai/command` route and model credentials from [AI](/docs/ai
77
77
 
78
78
  ## Pro and Business
79
79
 
80
- Plate Pro ships `@plate-pro/collab-do` with a Streamable HTTP MCP agent room endpoint, `@plate-pro/context-chips` for multi-source `@` context expansion and parameterized commands, and `@plate-pro/ink-loop` for server-side handwriting review. Plate Business adds `@plate-business/security-kernel` for server-enforced propose-only agent grants, mutation budgets, and trace redaction, paired with `plate verify --suite ai-sandbox` CI. See [Pricing](/pricing).
80
+ Plate Pro ships [`@plate-pro/collab-do`](/docs/pro/slices/collab-do) with a Streamable HTTP MCP agent room endpoint, [`@plate-pro/context-chips`](/docs/pro/slices/context-chips) for multi-source `@` context expansion and parameterized commands, and [`@plate-pro/ink-loop`](/docs/pro/slices/ink-loop) for server-side handwriting review. Plate Business adds [`@plate-business/security-kernel`](/docs/business/security-kernel) for server-enforced propose-only agent grants, mutation budgets, and trace redaction, paired with `plate verify --suite ai-sandbox` CI. See [Pricing](/pricing).
package/dist/docs/ai.md CHANGED
@@ -827,4 +827,4 @@ Review states switch automatically inside `AIMenuItems`:
827
827
 
828
828
  ## Pro and Business
829
829
 
830
- Plate Pro ships `@plate-pro/collab-do` with a Streamable HTTP MCP agent room endpoint, `@plate-pro/context-chips` for multi-source `@` context expansion, and the `Potion v2` and `Paper v2` flagship templates. Plate Business adds `@plate-business/security-kernel` for server-enforced propose-only agent sandboxes, mutation budgets, and agent trace redaction, plus `plate verify --suite ai-sandbox` CI. See [Pricing](/pricing).
830
+ Plate Pro ships [`@plate-pro/collab-do`](/docs/pro/slices/collab-do) with a Streamable HTTP MCP agent room endpoint, [`@plate-pro/context-chips`](/docs/pro/slices/context-chips) for multi-source `@` context expansion, and the `Potion` and `Paper` flagship templates. Plate Business adds [`@plate-business/security-kernel`](/docs/business/security-kernel) for server-enforced propose-only agent sandboxes, mutation budgets, and agent trace redaction, plus `plate verify --suite ai-sandbox` CI. See [Pricing](/pricing).
@@ -123,20 +123,19 @@ Use the plugin guide pages for options and examples:
123
123
  | ------------------------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------- |
124
124
  | `BlockPlaceholderPlugin` | `PLUGINS.blockPlaceholder` | Tracks the current empty block and injects `placeholder` and optional `className` props into matching block components. |
125
125
 
126
- `BlockPlaceholderPlugin` defaults to paragraph placeholders and only targets a
127
- focused, editable, collapsed selection. Configure `placeholders` by plugin name
128
- and `query` by node/path.
126
+ `BlockPlaceholderPlugin` ships with a neutral `placeholder: null` default and
127
+ targets only a focused, editable, collapsed empty block. Configure `placeholder`
128
+ as a static string or a per-block resolver callback.
129
129
 
130
130
  ```tsx title="components/editor/block-placeholder.tsx"
131
- import { PLUGINS } from "platejs";
132
- import { BlockPlaceholderPlugin } from "platejs/react";
131
+ import { BlockPlaceholderPlugin } from 'platejs/react';
133
132
 
134
133
  export const blockPlaceholderPlugin = BlockPlaceholderPlugin.configure({
135
134
  initialState: {
136
- placeholders: {
137
- [PLUGINS.paragraph]: "Type something...",
138
- },
139
- query: ({ path }) => path.length === 1,
135
+ placeholder: ({ path, type }) =>
136
+ path.length === 1 && type === 'paragraph'
137
+ ? 'Type something...'
138
+ : undefined,
140
139
  },
141
140
  });
142
141
  ```
@@ -461,4 +461,4 @@ it, such as a document another tool wrote.
461
461
 
462
462
  ## Pro and Business
463
463
 
464
- Plate Pro ships `@plate-pro/change-requests` for Word `.docx` tracked-change intake and multi-author review helpers, `@plate-pro/floating-discussion` for margin review cards, and the `Paper v2` flagship template. Plate Business adds `@plate-business/security-kernel` for revision-pinned approval gates and crash-safe SHA-256 WORM audit logs. See [Pricing](/pricing).
464
+ Plate Pro ships [`@plate-pro/change-requests`](/docs/pro/slices/change-requests) for Word `.docx` tracked-change intake and multi-author review helpers, [`@plate-pro/floating-discussion`](/docs/pro/slices/floating-discussion) for margin review cards, and the `Paper` flagship template. Plate Business adds [`@plate-business/security-kernel`](/docs/business/security-kernel) for revision-pinned approval gates and crash-safe SHA-256 WORM audit logs. See [Pricing](/pricing).
@@ -73,4 +73,4 @@ separate selection package API.
73
73
 
74
74
  ## Pro and Business
75
75
 
76
- Plate Pro ships the `Potion v2` and `Paper v2` flagship templates with block menus wired alongside AI actions, block locks, drag and drop, and real-time sync. See [Pricing](/pricing).
76
+ Plate Pro ships the `Potion` and `Paper` flagship templates with block menus wired alongside AI actions, block locks, drag and drop, and real-time sync. See [Pricing](/pricing).
@@ -1,18 +1,18 @@
1
1
  # Block Placeholder
2
2
 
3
- Placeholder text for the active empty block.
3
+ Show contextual placeholder text on the active empty block.
4
4
 
5
- Block Placeholder publishes a transient `placeholder` attribute on the active empty block. It is block-level UI state, not stored document content. Use the editor-level `placeholder` prop for the globally empty editor state.
5
+ Block Placeholder publishes a transient `placeholder` attribute on the active empty block. It is view-local UI state, not stored document content. Use the editor-level `placeholder` prop on `EditorContent` for the globally empty editor state.
6
6
 
7
7
  _Example `block-placeholder-demo` in the Plate repository: `apps/www/src/registry/examples/demo.tsx`._
8
8
 
9
- _Click into an empty paragraph or heading to see its contextual placeholder disappear as you type._
9
+ _Click into the empty block and type #, >, or [] to see contextual placeholders disappear as you type._
10
10
 
11
11
  ## Features
12
12
 
13
- - Active-block placeholder text.
14
- - Per-type placeholder map through `placeholders`.
15
- - Root-level filtering through `query`.
13
+ - Active-block placeholder text resolved in O(1) from the collapsed selection.
14
+ - Static copy or a per-block resolver callback through `placeholder`.
15
+ - Contextual defaults for headings (`Heading 1` through `Heading 6`), toggles, task and list items, quotes, callouts, and paragraphs in `BlockPlaceholderKit`.
16
16
  - Custom placeholder styling through `className`.
17
17
  - Focus, read-only, composition, selection, and empty-editor guards.
18
18
 
@@ -20,7 +20,7 @@ _Click into an empty paragraph or heading to see its contextual placeholder disa
20
20
 
21
21
  ### Add the kit
22
22
 
23
- `BlockPlaceholderKit` configures `BlockPlaceholderPlugin` for paragraph blocks.
23
+ `BlockPlaceholderKit` configures `BlockPlaceholderPlugin` with contextual copy for headings, toggles, task and list items, quotes, callouts, columns, and root paragraphs while staying hidden inside table cells.
24
24
 
25
25
  _Registry item `block-placeholder`: `npx shadcn@latest add @plate/block-placeholder`._
26
26
 
@@ -36,13 +36,13 @@ export const editor = createEditor({
36
36
 
37
37
  ### Style the placeholder
38
38
 
39
- The registry kit uses a `before:` pseudo-element that reads the rendered `placeholder` attribute.
39
+ The registry kit uses a pointer-inert `before:` pseudo-element that reads the rendered `placeholder` attribute.
40
40
 
41
41
  ```tsx
42
42
  BlockPlaceholderPlugin.configure({
43
43
  initialState: {
44
44
  className:
45
- 'before:absolute before:cursor-text before:text-muted-foreground/80 before:content-[attr(placeholder)]',
45
+ 'before:pointer-events-none before:absolute before:text-muted-foreground/80 before:content-[attr(placeholder)] print:before:hidden',
46
46
  },
47
47
  });
48
48
  ```
@@ -50,11 +50,11 @@ BlockPlaceholderPlugin.configure({
50
50
  ## Ownership
51
51
 
52
52
  | Surface | Owner | What It Does |
53
- |---------|-------|--------------|
54
- | `BlockPlaceholderPlugin` | `platejs/react` | Tracks the current placeholder target per mounted view and publishes rendered block attributes. |
55
- | `BlockPlaceholderKit` | Registry | Configures the default paragraph placeholder and styling. |
56
- | `block-placeholder-demo` | Registry example | Shows the placeholder on an empty paragraph inside a non-empty editor. |
57
- | `Editor` `placeholder` prop | `platejs/react` | Covers the globally empty editor state. |
53
+ | --- | --- | --- |
54
+ | `BlockPlaceholderPlugin` | `platejs/react` | Tracks the active empty block per mounted view and publishes transient rendered attributes. |
55
+ | `BlockPlaceholderKit` | Registry | Configures contextual placeholder copy and pseudo-element styling. |
56
+ | `block-placeholder-demo` | Registry example | Shows contextual placeholders on empty blocks inside a live editor. |
57
+ | `EditorContent` `placeholder` prop | `platejs/react` | Covers the globally empty editor state. |
58
58
 
59
59
  The active target belongs to each mounted editor view and never enters plugin state or document data.
60
60
 
@@ -65,7 +65,6 @@ The active target belongs to each mounted editor view and never enters plugin st
65
65
  `BlockPlaceholderPlugin` is available from `platejs/react`.
66
66
 
67
67
  ```tsx
68
- import { PLUGINS } from 'platejs';
69
68
  import { BlockPlaceholderPlugin, createEditor } from 'platejs/react';
70
69
 
71
70
  export const editor = createEditor({
@@ -73,83 +72,90 @@ export const editor = createEditor({
73
72
  BlockPlaceholderPlugin.configure({
74
73
  initialState: {
75
74
  className:
76
- 'before:absolute before:cursor-text before:text-muted-foreground/80 before:content-[attr(placeholder)]',
77
- placeholders: {
78
- [PLUGINS.paragraph]: 'Type something...',
79
- },
80
- query: ({ path }) => path.length === 1,
75
+ 'before:pointer-events-none before:absolute before:text-muted-foreground/80 before:content-[attr(placeholder)] print:before:hidden',
76
+ placeholder: ({ path, type }) =>
77
+ path.length === 1 && type === 'paragraph'
78
+ ? 'Type something...'
79
+ : undefined,
81
80
  },
82
81
  }),
83
82
  ],
84
83
  });
85
84
  ```
86
85
 
87
- ### Add type-specific copy
86
+ ### Resolve contextual block copy
88
87
 
89
- Keys in `placeholders` are capability names. The plugin resolves each configured
90
- name against the editor's installed registry before matching the active block
91
- type. Application code should keep using descriptors with `editor.plugin`.
88
+ Pass a resolver callback to `placeholder` to inspect the active block (`node`), its `type`, its `path`, and the root-scoped `editor`. Return `undefined`, `null`, or `''` to hide the placeholder on a block.
92
89
 
93
90
  ```tsx
91
+ import { ElementApi } from 'platejs';
92
+ import { BlockPlaceholderPlugin } from 'platejs/react';
93
+
94
94
  BlockPlaceholderPlugin.configure({
95
95
  initialState: {
96
- placeholders: {
97
- [PLUGINS.paragraph]: 'Type something...',
98
- [PLUGINS.heading]: 'Untitled',
99
- [PLUGINS.blockquote]: 'Quote',
100
- [PLUGINS.codeBlock]: 'Code',
96
+ placeholder: ({ editor, node, path, type }) => {
97
+ if (type === 'heading') {
98
+ return `Heading ${typeof node.level === 'number' ? node.level : 1}`;
99
+ }
100
+ if (type === 'summary') {
101
+ return typeof node.level === 'number'
102
+ ? `Toggle heading ${node.level}`
103
+ : 'Toggle';
104
+ }
105
+ if (type !== 'paragraph') return;
106
+ if (node.listType === 'task') return 'To-do';
107
+ if (typeof node.listType === 'string') return 'List';
108
+ if (path.length === 1) return 'Type something...';
109
+
110
+ const parent = editor.read.nodes.parent(path)?.[0];
111
+
112
+ if (ElementApi.isElement(parent) && parent.type === 'blockquote') {
113
+ return 'Quote';
114
+ }
101
115
  },
102
116
  },
103
117
  });
104
118
  ```
105
119
 
120
+ For single-block editors where every empty block shares one label, pass a static string such as `placeholder: 'Type something...'`. Pass `placeholder: null` to disable a configured placeholder.
121
+
106
122
  ## Visibility rules
107
123
 
108
124
  The plugin shows a placeholder only when every gate passes.
109
125
 
110
126
  | Gate | Requirement |
111
- |------|-------------|
127
+ | --- | --- |
112
128
  | Editor mode | Not read-only and not composing. |
113
129
  | Focus | Editor is focused and has a selection. |
114
130
  | Selection | Selection is collapsed. |
115
131
  | Active block | `editor.read.nodes.block()` returns an empty block. |
116
- | Whole editor | The editor is not in its pristine single-empty-block state. Empty blocks with visible structural state, such as list metadata, still qualify, unless the editor's own `placeholder` already shows. |
117
- | Placeholder map | The block type matches one entry in `placeholders`. |
118
- | Query | `query({ editor, node, path, ...ctx })` returns `true`. |
119
-
120
- The default `query` returns `true` for root blocks only. The whole-editor guard
121
- checks the element's own properties and treats only `type` and compiled element
122
- properties declared with `role: "metadata"` as pristine metadata. When the editor content has a `placeholder`, that placeholder
123
- covers any single empty block, a list item included, so the block placeholder
124
- stays hidden and only one placeholder shows.
125
-
126
- ```tsx
127
- query: ({ path }) => path.length === 1
128
- ```
132
+ | Whole editor | When `EditorContent` has a `placeholder`, single-block empty editors (including single empty containers such as a blockquote or callout) show only the editor placeholder. Without an editor `placeholder`, a pristine single empty default block stays hidden while empty blocks with structural properties (such as a heading or list item) or nested containers qualify. |
133
+ | Resolver | `placeholder` resolves to a non-empty string. |
129
134
 
130
- Use `query` when placeholders should skip nested content, tables, columns, or app-specific containers.
135
+ The pristine-block check treats `type` and compiled element properties declared with `role: "metadata"` as empty-state metadata.
131
136
 
132
137
  ## Styling
133
138
 
134
139
  The plugin publishes two transient attributes on the target block:
135
140
 
136
141
  | Prop | Source |
137
- |------|--------|
138
- | `placeholder` | Resolved string from `placeholders`. |
142
+ | --- | --- |
143
+ | `placeholder` | Non-empty string resolved from `initialState.placeholder`. |
139
144
  | `className` | `initialState.className`. |
140
145
 
141
- Use CSS that reads `attr(placeholder)`. Tailwind arbitrary content works well for this because the placeholder text stays in the DOM attribute instead of document data.
146
+ Use CSS that reads `attr(placeholder)`. Tailwind arbitrary content keeps the placeholder text in the DOM attribute rather than stored document data.
142
147
 
143
148
  ```tsx
144
149
  className:
145
- 'before:absolute before:pointer-events-none before:text-muted-foreground/80 before:content-[attr(placeholder)]'
150
+ 'before:pointer-events-none before:absolute before:text-muted-foreground/80 before:content-[attr(placeholder)] print:before:hidden'
146
151
  ```
147
152
 
148
153
  ## API Reference
149
154
 
150
155
  | API | Package | Use |
151
- |-----|---------|-----|
152
- | `BlockPlaceholderPlugin` | `platejs/react` | Adds block placeholders through transient rendered attributes. |
153
- | `initialState.placeholders` | `Record<string, string>` | Maps plugin names to placeholder text. Package default: `{}`; copied `BlockPlaceholderKit` configures paragraph copy. |
154
- | `initialState.query` | `(context) => boolean` | Filters eligible blocks. Default: `({ path }) => path.length === 1`. |
155
- | `initialState.className` | `string` | Class applied to the block only while its placeholder is active. |
156
+ | --- | --- | --- |
157
+ | `BlockPlaceholderPlugin` | `platejs/react` | Adds active-block placeholders through transient rendered attributes. |
158
+ | `BlockPlaceholderContext` | `platejs/react` | Context object `{ editor, node, path, type }` passed to `BlockPlaceholderResolver`. |
159
+ | `BlockPlaceholderResolver` | `platejs/react` | Callback `(context: BlockPlaceholderContext) => string \| null \| undefined`. |
160
+ | `initialState.placeholder` | `string \| BlockPlaceholderResolver \| null` | Static copy for any active empty block or per-block resolver. Package default: `null`; copied `BlockPlaceholderKit` configures contextual copy. |
161
+ | `initialState.className` | `string \| null` | Class applied to the block only while its placeholder is active. Package default: `null`. |
@@ -726,4 +726,4 @@ The image shape, `boardImage`: an object block that holds at most one `image` el
726
726
 
727
727
  ## Pro and Business
728
728
 
729
- Plate Pro ships `@plate-pro/board-workspace`, a copy-owned visual canvas workspace combining `BaseBoardPlugin`, all seven shape plugins, `AuthoredPlugin`, confined headless and `SyncServer` board-agent tools (`board_read`, `board_edit` with `$ref` batch ops and propose-only mode), and ephemeral spatial canvas overlay projection (`board-agent-overlay`) wired for real-time sync with `@plate-pro/collab-do`. See [Pricing](/pricing).
729
+ Plate Pro ships [`@plate-pro/board-workspace`](/docs/pro/slices/board-workspace), a copy-owned visual canvas workspace combining `BaseBoardPlugin`, all seven shape plugins, `AuthoredPlugin`, confined headless and `SyncServer` board-agent tools (`board_read`, `board_edit` with `$ref` batch ops and propose-only mode), and ephemeral spatial canvas overlay projection (`board-agent-overlay`) wired for real-time sync with [`@plate-pro/collab-do`](/docs/pro/slices/collab-do). See [Pricing](/pricing).