platejs 54.0.0-beta.13 → 54.0.0-beta.14

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 (221) hide show
  1. package/dist/{EditorStatic-CKG5xM3y.d.ts → EditorStatic-eXOA489B.d.ts} +4 -4
  2. package/dist/ai/index.d.ts +2 -2
  3. package/dist/ai/lib/aiDraftSession.js +9 -7
  4. package/dist/ai/lib/aiPolicy.internal.js +43 -6
  5. package/dist/ai/lib/editorAgent.js +30 -21
  6. package/dist/ai/lib/editorAgentSync.internal.js +2 -2
  7. package/dist/ai/lib/lockedContext.js +5 -4
  8. package/dist/ai/react/copilotInline.internal.js +6 -5
  9. package/dist/ai/react/index.d.ts +7 -7
  10. package/dist/ai/react/useEditorAgent.js +14 -3
  11. package/dist/authored/index.d.ts +4 -4
  12. package/dist/{authored-CJL7S8qI-BxC9ip4d.d.ts → authored-qetvpvU--DSWESzxK.d.ts} +3 -3
  13. package/dist/clipboard-format-key-BBu85J9m-BLhtd159.d.ts +1 -0
  14. package/dist/code-block/codemirror/index.d.ts +2 -2
  15. package/dist/{comment-anchor.internal-DTBP1huU.d.ts → comment-anchor.internal-CoNK9gTD.d.ts} +2 -2
  16. package/dist/compiler/index.d.ts +3 -3
  17. package/dist/{core-CTB0OBoh.d.ts → core-By92GWYW.d.ts} +45 -20
  18. package/dist/diff/index.d.ts +2 -2
  19. package/dist/docs/agents/skills.md +6 -2
  20. package/dist/docs/agents.md +1 -1
  21. package/dist/docs/ai-agents.md +8 -4
  22. package/dist/docs/ai.md +5 -0
  23. package/dist/docs/api/plate.md +15 -7
  24. package/dist/docs/api/react-hooks.md +32 -2
  25. package/dist/docs/authored-changes.md +4 -0
  26. package/dist/docs/block-menu.md +4 -0
  27. package/dist/docs/board.md +4 -0
  28. package/dist/docs/callout.md +63 -9
  29. package/dist/docs/collaboration.md +6 -1
  30. package/dist/docs/combobox.md +9 -2
  31. package/dist/docs/comment.md +4 -0
  32. package/dist/docs/components/toolbar-buttons.md +1 -1
  33. package/dist/docs/copilot.md +4 -0
  34. package/dist/docs/deck.md +173 -0
  35. package/dist/docs/details.md +4 -0
  36. package/dist/docs/diff.md +4 -0
  37. package/dist/docs/discussion.md +4 -0
  38. package/dist/docs/dnd.md +4 -0
  39. package/dist/docs/docx.md +6 -0
  40. package/dist/docs/emoji.md +2 -2
  41. package/dist/docs/equation.md +4 -0
  42. package/dist/docs/examples/collaboration-example.md +4 -0
  43. package/dist/docs/examples/export.md +40 -28
  44. package/dist/docs/examples/merge.md +4 -0
  45. package/dist/docs/examples/version-history.md +4 -0
  46. package/dist/docs/field.md +4 -0
  47. package/dist/docs/footnote.md +4 -0
  48. package/dist/docs/format-painter.md +1 -1
  49. package/dist/docs/html.md +4 -0
  50. package/dist/docs/index.md +4 -0
  51. package/dist/docs/ink.md +6 -0
  52. package/dist/docs/installation/manual.md +2 -4
  53. package/dist/docs/installation/next.md +1 -3
  54. package/dist/docs/installation/plate-ui.md +6 -2
  55. package/dist/docs/installation/rsc.md +1 -1
  56. package/dist/docs/installation.md +4 -0
  57. package/dist/docs/link.md +4 -0
  58. package/dist/docs/llms.txt +3 -1
  59. package/dist/docs/lock.md +34 -2
  60. package/dist/docs/markdown.md +4 -0
  61. package/dist/docs/media.md +4 -0
  62. package/dist/docs/mention.md +5 -0
  63. package/dist/docs/pagination.md +4 -0
  64. package/dist/docs/prompt-editor.md +17 -1
  65. package/dist/docs/reference.md +192 -0
  66. package/dist/docs/roots.md +4 -0
  67. package/dist/docs/serializing.md +23 -0
  68. package/dist/docs/slash-command.md +58 -4
  69. package/dist/docs/static.md +29 -20
  70. package/dist/docs/suggestion.md +4 -0
  71. package/dist/docs/sync.md +4 -0
  72. package/dist/docs/table.md +31 -0
  73. package/dist/docs/toolbar.md +4 -0
  74. package/dist/docs/unit-testing.md +4 -0
  75. package/dist/docs/upload.md +4 -0
  76. package/dist/docx/export/index.d.ts +5 -5
  77. package/dist/docx/import/index.d.ts +5 -5
  78. package/dist/docx/paste/index.d.ts +4 -4
  79. package/dist/dom/index.d.ts +1 -1
  80. package/dist/features/basic-nodes/lib/BaseMarkPlugins.js +1 -1
  81. package/dist/features/basic-styles/lib/BaseFormattingPlugin.js +61 -28
  82. package/dist/features/basic-styles/lib/BaseStylePlugins.js +28 -7
  83. package/dist/features/board/index.d.ts +1 -1
  84. package/dist/features/callout/index.d.ts +2 -160
  85. package/dist/features/callout/lib/BaseCalloutPlugin.js +109 -9
  86. package/dist/features/column/index.d.ts +1 -1
  87. package/dist/features/comments/index.d.ts +2 -2
  88. package/dist/features/date/index.d.ts +3 -3
  89. package/dist/features/details/index.d.ts +3 -3
  90. package/dist/features/field/index.d.ts +1 -1
  91. package/dist/features/field/lib/BaseFieldPlugin.js +111 -53
  92. package/dist/features/field/lib/fieldCache.internal.js +9 -21
  93. package/dist/features/find/index.d.ts +3 -3
  94. package/dist/features/footnote/index.d.ts +3 -3
  95. package/dist/features/ink/index.d.ts +1 -1
  96. package/dist/features/link/lib/BaseLinkPlugin.js +5 -2
  97. package/dist/features/lint/index.d.ts +3 -3
  98. package/dist/features/list/lib/listKeyboard.internal.js +7 -2
  99. package/dist/features/lock/index.d.ts +1 -1
  100. package/dist/features/media/index.d.ts +1 -1
  101. package/dist/features/mention/index.d.ts +1 -1
  102. package/dist/features/reference/index.d.ts +236 -0
  103. package/dist/features/reference/index.js +2 -0
  104. package/dist/features/reference/lib/BaseReferencePlugin.js +589 -0
  105. package/dist/features/table/index.d.ts +2 -2
  106. package/dist/features/toc/index.d.ts +1 -1
  107. package/dist/features/upload/index.d.ts +1 -1
  108. package/dist/history/index.d.ts +1 -1
  109. package/dist/html/index.d.ts +4 -4
  110. package/dist/html/server/index.d.ts +2 -2
  111. package/dist/html/server/serverCssParser.internal.js +14 -25
  112. package/dist/html/server/serverCssStyle.internal.js +4 -7
  113. package/dist/{htmlConversion-Y-M6PLRi.d.ts → htmlConversion-CRnxMGw-.d.ts} +2 -2
  114. package/dist/{htmlTypes-CNhoCFjK.d.ts → htmlTypes-3laowz-3.d.ts} +3 -3
  115. package/dist/hyperscript/index.d.ts +1 -1
  116. package/dist/{index-B-8L9f6a2.d.ts → index-B3VOCxNR.d.ts} +5 -5
  117. package/dist/{index-B8JeECEk.d.ts → index-B9UlNijk.d.ts} +2 -2
  118. package/dist/{index-Bqva6PJc.d.ts → index-BJPT0Tv_.d.ts} +3 -3
  119. package/dist/{index-CWutqVQ_-BO-UgVeK.d.ts → index-BKPWmnLg-Bp_vItjr.d.ts} +1 -1
  120. package/dist/{index-BFWK852j.d.ts → index-BcD2RAB9.d.ts} +3 -3
  121. package/dist/{index-DhsryaAC.d.ts → index-C5Xw3JDc.d.ts} +1 -1
  122. package/dist/{index-BEXBAmJf.d.ts → index-CAshLTjV.d.ts} +3 -3
  123. package/dist/{index-qqrnWAk_.d.ts → index-CHlITvuq.d.ts} +7 -7
  124. package/dist/index-CKSwab_O.d.ts +1 -0
  125. package/dist/{index-DJhwDkfd.d.ts → index-CRQoHk18.d.ts} +3 -3
  126. package/dist/index-CyY3O6c7.d.ts +3 -0
  127. package/dist/index-D8EGVCeT.d.ts +305 -0
  128. package/dist/{index-B0R9sXv2-T1dxG9oM.d.ts → index-DAKucat0--VOaL_NN.d.ts} +4 -4
  129. package/dist/{index-UYpvOBXG.d.ts → index-DCTRNYwy.d.ts} +2 -2
  130. package/dist/{index-CXd5hwaH.d.ts → index-DQpHoxDX.d.ts} +1 -1
  131. package/dist/{index-BfJKfAwk.d.ts → index-DTd1D-BF.d.ts} +3 -3
  132. package/dist/index-DUhUT9bV.d.ts +1 -0
  133. package/dist/{index-B4aToRMv.d.ts → index-DXm_v0Qq.d.ts} +3 -3
  134. package/dist/{index-D3bhjdRz.d.ts → index-Djwcl0Ff.d.ts} +3 -3
  135. package/dist/{index-DYuqsDrP.d.ts → index-Dyw6BJx8.d.ts} +3 -3
  136. package/dist/{index-CLPMcGC5.d.ts → index-KG95XVaC.d.ts} +4 -4
  137. package/dist/{index-mcBtG6pK-CitQV9Bq.d.ts → index-LEcSTRgn-BR_p4GVY.d.ts} +2 -2
  138. package/dist/{index-D54VPeky.d.ts → index-k-wvVxKl.d.ts} +2 -2
  139. package/dist/{index-CHud6Aa-.d.ts → index-s34W6hUI.d.ts} +3 -3
  140. package/dist/{index-DXCdafUk.d.ts → index-wEkvA-wI.d.ts} +43 -20
  141. package/dist/index.d.ts +3 -3
  142. package/dist/internal/plugin/pluginInjectNodeProps.js +33 -5
  143. package/dist/internal/utils/urlPolicy.js +11 -1
  144. package/dist/lib/editor/withPlite.js +8 -6
  145. package/dist/lib/plugins/html/cssLexer.internal.js +126 -29
  146. package/dist/lib/plugins/html/cssSafety.internal.js +100 -0
  147. package/dist/lib/plugins/html/htmlDecode.internal.js +2 -2
  148. package/dist/lib/plugins/html/htmlMatcher.internal.js +1 -1
  149. package/dist/lib/plugins/html/htmlRules.internal.js +2 -13
  150. package/dist/lib/plugins/html/htmlSafety.js +17 -24
  151. package/dist/lib/plugins/html/htmlSerialize.internal.js +16 -2
  152. package/dist/lib/plugins/html/htmlStyleInline.internal.js +22 -23
  153. package/dist/lib/plugins/input-rules/inputRuleVeto.internal.js +27 -1
  154. package/dist/markdown/index.d.ts +1 -1
  155. package/dist/markdown/lib/internal/markdownAttributes.js +16 -7
  156. package/dist/markdown/lib/internal/markdownMappings.js +123 -16
  157. package/dist/markdown/lib/serializer/convertPhrasingSerialize.js +16 -1
  158. package/dist/math/index.d.ts +3 -3
  159. package/dist/math/react/index.d.ts +4 -4
  160. package/dist/migrations/index.d.ts +4 -4
  161. package/dist/migrations/migratePlateV54Urls.internal.js +63 -1
  162. package/dist/pagination/index.d.ts +1 -1
  163. package/dist/pagination/react/index.d.ts +3 -3
  164. package/dist/{protocol-CSuP7AWG-DAorqpaF.d.ts → protocol-Cp9xayOe-0OSfTMnt.d.ts} +1 -1
  165. package/dist/react/authored/index.d.ts +4 -4
  166. package/dist/react/components/PlateView.js +7 -1
  167. package/dist/react/features/board/index.d.ts +5 -5
  168. package/dist/react/features/callout/index.d.ts +93 -4
  169. package/dist/react/features/column/index.d.ts +5 -5
  170. package/dist/react/features/combobox/combobox.internal.js +35 -22
  171. package/dist/react/features/combobox/comboboxOwner.internal.js +29 -2
  172. package/dist/react/features/combobox/index.d.ts +8 -6
  173. package/dist/react/features/comments/index.d.ts +6 -6
  174. package/dist/react/features/date/index.d.ts +4 -4
  175. package/dist/react/features/details/index.d.ts +4 -4
  176. package/dist/react/features/field/FieldPlugin.js +2 -2
  177. package/dist/react/features/field/index.d.ts +5 -5
  178. package/dist/react/features/footnote/index.d.ts +4 -4
  179. package/dist/react/features/format-painter/FormatPainterPlugin.js +27 -34
  180. package/dist/react/features/format-painter/index.d.ts +4 -4
  181. package/dist/react/features/ink/index.d.ts +5 -5
  182. package/dist/react/features/lock/index.d.ts +5 -5
  183. package/dist/react/features/media/index.d.ts +5 -5
  184. package/dist/react/features/mention/index.d.ts +4 -4
  185. package/dist/react/features/table/index.d.ts +6 -6
  186. package/dist/react/features/toc/index.d.ts +2 -2
  187. package/dist/react/features/upload/index.d.ts +5 -5
  188. package/dist/react/index.d.ts +6 -6
  189. package/dist/react/virtualized.d.ts +3 -3
  190. package/dist/refusal-CwFxNUf7-BLhtd159.d.ts +1 -0
  191. package/dist/{registerEditorTools-Cl-o_Wnq.d.ts → registerEditorTools-D_3hPpTx.d.ts} +16 -8
  192. package/dist/shared-room-26tNRhZE-BLhtd159.d.ts +1 -0
  193. package/dist/skills/plate/SKILL.md +4 -3
  194. package/dist/skills/plate/references/ai-and-agents.md +2 -2
  195. package/dist/skills/plate/references/pricing.md +3 -3
  196. package/dist/skills/plate/references/setup.md +6 -0
  197. package/dist/skills/plate/references/ui-and-sync.md +4 -3
  198. package/dist/{source-DUP5aKcT.d.ts → source-BW7JD_oS.d.ts} +3 -3
  199. package/dist/static/index.d.ts +23 -9
  200. package/dist/static/internal/staticPendingMedia.internal.js +2 -1
  201. package/dist/static/internal/staticPresentation.js +1 -0
  202. package/dist/static/renderStaticHtml.js +85 -39
  203. package/dist/{storage-EzfLDqRy-Cu4DQ-Rf.d.ts → storage-C7xSH1I5-BJLoUfo9.d.ts} +2 -2
  204. package/dist/sync/cloudflare/index.d.ts +3 -3
  205. package/dist/sync/index.d.ts +4 -4
  206. package/dist/sync/postgres/index.d.ts +1 -1
  207. package/dist/sync/react/index.d.ts +6 -6
  208. package/dist/sync/server/index.d.ts +5 -5
  209. package/dist/tabbable/react/index.d.ts +4 -4
  210. package/dist/testing/index.d.ts +3 -3
  211. package/dist/{transport-DAforzBt-BFwAhC-N.d.ts → transport-B-ON68Y4-DCfT5-eN.d.ts} +1 -1
  212. package/dist/utils/plate-keys.js +1 -0
  213. package/dist/{widths-BjIZxtaJ.d.ts → widths-9NNziDRW.d.ts} +5 -5
  214. package/package.json +9 -2
  215. package/dist/clipboard-format-key-D9rnh20X-CR00YA0H.d.ts +0 -1
  216. package/dist/index-CKAkaSJK.d.ts +0 -3
  217. package/dist/index-CxyK4HrT.d.ts +0 -1
  218. package/dist/index-zcb_RtZC.d.ts +0 -1
  219. package/dist/refusal-DCzeB9nD-CR00YA0H.d.ts +0 -1
  220. package/dist/shared-room-Bg8qMvm1-CR00YA0H.d.ts +0 -1
  221. /package/dist/{tx-only-CWT-IURY-BqIFhy44.d.ts → tx-only-sIj7BcYh-BMFkGMuq.d.ts} +0 -0
@@ -0,0 +1,173 @@
1
+ # Deck
2
+
3
+ Present structured documents and board frames as a live slide deck with speaker notes and 16:9 print export.
4
+
5
+ _Example `deck-demo` in the Plate repository: `apps/www/src/registry/examples/deck-demo.tsx`._
6
+
7
+ _Open Present deck from the toolbar to step through heading slides, board frames, speaker notes, and the slide overview._
8
+
9
+ ## Features
10
+
11
+ - Projects headings (`h1` and `h2`), horizontal rules (`horizontalRule`), and embedded `board` frames (`boardFrame`) directly into slides with no separate presentation format or document migration.
12
+ - Extracts speaker notes before rendering audience slides, keeping notes out of the audience stage across `details` blocks, `callout` blocks (`variant: 'speaker-notes'`), board sticky notes, and trailing `Notes: <Frame>` disclosure blocks.
13
+ - Hides slides and sub-sections prefixed with `[draft]` or `[hidden]` (along with nested headings, boards, frames, and footnote definitions inside hidden sections) and prunes orphaned footnote definitions.
14
+ - Presents a full-screen 16:9 stage with keyboard navigation, slide overview grid (`O` or `G`), blackout (`B` or `.`), fullscreen toggle (`F`), and a single-screen speaker notes drawer (`S`) with a timer and next-slide preview.
15
+ - Syncs presenter and audience browser tabs through `createDeckSyncChannel` (`BroadcastChannel` with `localStorage` fallback).
16
+ - Prints slides to 16:9 PDF through `printDeck`, defaulting to accepted content when `AuthoredPlugin` is installed so pending suggestions never leak into handouts.
17
+
18
+ ## Kit usage
19
+
20
+ ### Installation
21
+
22
+ The `deck` registry item installs the pure slide projector, full-screen presenter stage, and toolbar menu into your project.
23
+
24
+ _Registry item `deck`: `npx shadcn@latest add @plate/deck`._
25
+
26
+ - `deck-projection.ts`: pure `projectDeck` function that splits documents and board frames into typed slides while stripping speaker notes and hidden sections.
27
+ - `deck-presenter.tsx`: `DeckPresenter`, `DEFAULT_DECK_PRESENTATION`, `createDeckSyncChannel`, and `printDeck`.
28
+ - `deck-toolbar-button.tsx`: `DeckToolbarButton` dropdown menu for launching Present deck, Present board frames, and Print slides (PDF).
29
+
30
+ ### Add toolbar button
31
+
32
+ Render `DeckToolbarButton` inside your editor toolbar. It reads the active editor from `Plate` context and opens `DeckPresenter` in a portal.
33
+
34
+ ```tsx
35
+ import { DeckToolbarButton } from '@/components/editor/deck-toolbar-button';
36
+ import { FixedToolbar } from '@/components/editor/fixed-toolbar';
37
+ import { ToolbarGroup } from '@/components/editor/toolbar';
38
+
39
+ export function MyToolbar() {
40
+ return (
41
+ <FixedToolbar>
42
+ <ToolbarGroup>
43
+ <DeckToolbarButton />
44
+ </ToolbarGroup>
45
+ </FixedToolbar>
46
+ );
47
+ }
48
+ ```
49
+
50
+ ## Manual usage
51
+
52
+ Control presentation mode directly with `DeckPresenter`, or call `projectDeck` to build a custom slide strip or export pipeline.
53
+
54
+ ```tsx
55
+ 'use client';
56
+
57
+ import * as React from 'react';
58
+ import { useModelEditor } from 'platejs/react';
59
+
60
+ import {
61
+ DEFAULT_DECK_PRESENTATION,
62
+ DeckPresenter,
63
+ printDeck,
64
+ } from '@/components/editor/deck-presenter';
65
+
66
+ export function CustomDeckControls() {
67
+ const editor = useModelEditor();
68
+ const [open, setOpen] = React.useState(false);
69
+
70
+ return (
71
+ <>
72
+ <button type="button" onClick={() => setOpen(true)}>
73
+ Present
74
+ </button>
75
+ <button
76
+ type="button"
77
+ onClick={() => {
78
+ void printDeck(editor, {
79
+ presentation: DEFAULT_DECK_PRESENTATION,
80
+ });
81
+ }}
82
+ >
83
+ Print 16:9 PDF
84
+ </button>
85
+ <DeckPresenter
86
+ channelId="team-review"
87
+ editor={editor}
88
+ onOpenChange={setOpen}
89
+ open={open}
90
+ />
91
+ </>
92
+ );
93
+ }
94
+ ```
95
+
96
+ ## Slide boundaries
97
+
98
+ `projectDeck(document, options)` derives slides without mutating the source document:
99
+
100
+ - `splitBy: 'auto'` (default): starts a new slide on every top-level `horizontalRule`, every top-level heading whose level is in `headingLevels` (defaults to `[1, 2]`), and every visible `boardFrame` inside an embedded `board`.
101
+ - `splitBy: 'headings'`: splits only on top-level headings in `headingLevels`.
102
+ - `splitBy: 'hr'`: splits only on top-level `horizontalRule` blocks.
103
+ - `splitBy: 'frames'`: projects only visible `boardFrame` slides from boards in the document.
104
+
105
+ Board frame slides render each kept member shape relative to the frame origin in canonical board paint order, excluding off-frame scratchpad shapes and frame wrapper chrome.
106
+
107
+ ## Speaker notes and hidden slides
108
+
109
+ Notes are extracted into `slide.notesText` and `slide.notesBlocks`, then removed from the audience slide AST before rendering:
110
+
111
+ - A `details` block whose first `summary` child matches `Speaker notes`, `Presenter notes`, `Notes`, or `备注` (case-insensitive).
112
+ - A `callout` block with `variant: 'speaker-notes'`.
113
+ - A board sticky note (`boardNote`) inside a frame whose text begins with `Speaker notes:`, `Presenter notes:`, `Notes:`, or `备注:`.
114
+ - A trailing `details` block after a framed board whose `summary` matches `Notes: <Frame Title>` (or `Speaker notes: <Frame Title>` / `备注: <Frame Title>`), which attaches to the matching board frame slide.
115
+
116
+ Any heading or board frame title starting with `[draft]` or `[hidden]` (case-insensitive) is omitted from the projected deck, along with lower-level sub-headings, nested headings inside containers, embedded boards, and footnote definitions inside that section.
117
+
118
+ ## Keyboard shortcuts
119
+
120
+ Shortcuts are active while `DeckPresenter` is open and focus is not inside an editable field.
121
+
122
+ | Key | Action |
123
+ | --- | --- |
124
+ | `ArrowRight`, `ArrowDown`, `PageDown`, `Space`, `N` | Next slide |
125
+ | `ArrowLeft`, `ArrowUp`, `PageUp`, `P` | Previous slide |
126
+ | `Home` / `End` | First / last slide |
127
+ | `S` | Toggle speaker notes drawer |
128
+ | `O`, `G` | Toggle slide overview grid |
129
+ | `B`, `.` | Toggle blackout screen |
130
+ | `F` | Toggle browser fullscreen |
131
+ | `Escape` | Close active overlay or exit presenter |
132
+
133
+ ## API Reference
134
+
135
+ ### `projectDeck(document, options?)`
136
+
137
+ Projects a Plate document (`{ children, roots? }`) into a `DeckProjection` (`{ slides, stats, title }`).
138
+
139
+ | Option | Type | Default | Description |
140
+ | --- | --- | --- | --- |
141
+ | `splitBy` | `'auto' \| 'headings' \| 'hr' \| 'frames'` | `'auto'` | Controls which boundaries start new slides. |
142
+ | `headingLevels` | `readonly number[]` | `[1, 2]` | Heading levels that start a slide in `'auto'` and `'headings'` modes. |
143
+ | `frameOrder` | `'spatial' \| 'stored'` | `'spatial'` | Orders board frames left-to-right by row (`'spatial'`) or document order (`'stored'`). |
144
+ | `defaultStageSize` | `{ width: number; height: number }` | `{ width: 1280, height: 720 }` | Target stage size in pixels for document slides. |
145
+ | `includeHidden` | `boolean` | `false` | Keeps `[draft]` and `[hidden]` slides when `true`. |
146
+ | `title` | `string` | First visible slide title | Overrides the projected deck title. |
147
+ | `getHeadingLevel` | `(node: DeckJsonNode) => number \| null` | Built-in heading resolver | Resolves heading levels for custom schemas. |
148
+ | `isHiddenSlide` | `(candidate: DeckHiddenSlideCandidate) => boolean` | `[draft]` / `[hidden]` prefix | Custom predicate for hidden slides and frames. |
149
+ | `isSpeakerNote` | `(node: DeckJsonNode, context: DeckSpeakerNoteContext) => boolean` | Built-in note matchers | Custom predicate for speaker note blocks and stickies. |
150
+ | `types` | `Partial<DeckNodeTypes>` | Standard Plate keys | Overrides node type names for custom schemas. |
151
+
152
+ ### `DeckPresenter`
153
+
154
+ Full-screen modal portal stage that renders projected slides with `EditorStatic`.
155
+
156
+ | Prop | Type | Default | Description |
157
+ | --- | --- | --- | --- |
158
+ | `open` | `boolean` | Required | Controls whether the presentation overlay is mounted. |
159
+ | `onOpenChange` | `(open: boolean) => void` | Required | Called when the presenter closes via button or `Escape`. |
160
+ | `editor` | `Editor` | Context editor | Optional editor instance when rendered outside `EditorRoot`. |
161
+ | `presentation` | `readonly BasePluginInput[]` | `DEFAULT_DECK_PRESENTATION` | Static plugin kit passed to `EditorStatic`. |
162
+ | `projection` | `'accepted' \| 'proposed'` | `'accepted'` | Authored-change view used when `AuthoredPlugin` is active. |
163
+ | `options` | `ProjectDeckOptions` | `{}` | Options forwarded to `projectDeck`. |
164
+ | `channelId` | `string` | `undefined` | Enables cross-tab slide and blackout sync through `createDeckSyncChannel`. |
165
+ | `initialSlideId` | `string` | First slide | Slide id to display when opening the presenter. |
166
+
167
+ ### `printDeck(editor, options?)`
168
+
169
+ Renders the projected deck into a hidden 16:9 print iframe, waits for fonts and images, triggers `window.print()`, and cleans up on `afterprint`. Accepts all `ProjectDeckOptions` plus `includeNotes`, `presentation`, and `projection` (defaults to `'accepted'`).
170
+
171
+ ## Pro and Business
172
+
173
+ Plate Pro ships `@plate-pro/deck` for self-hosted HTML and print slide exports, presenter-to-audience HTTP follow rooms on Cloudflare Durable Objects, and `plate-deploy-cloudflare` Worker recipes. Plate Business adds `@plate-business/security-kernel` for fail-closed speaker-note and section RBAC stripping, forensic slide watermarks, zero-network redacted 16:9 PDF export, and hash-chained WORM audit logs, verified in CI by `plate verify --suite sync-security`. See [Pricing](/pricing).
@@ -322,3 +322,7 @@ _Verified by 11 automated tests._
322
322
  - [x] Keeps the caret on the visible Summary after deleting the selected block following closed Details (`EDIT-DETAILS-BS-AFTER-CLOSED-001`)
323
323
  - [x] Keeps the first of the whole paragraphs deleted after closed Details, with the caret in it (`EDIT-DETAILS-BS-AFTER-CLOSED-001`)
324
324
  - [x] Returns Backspace after closed Details to its visible summary (`EDIT-DETAILS-BS-AFTER-CLOSED-001`)
325
+
326
+ ## Pro and Business
327
+
328
+ Plate Pro ships `@plate-pro/procedures` for collapsible procedure branches combining `DetailsKit`, `CalloutKit`, and `FieldKit` with canonical SHA-256 revision pinning and Stop-Step DAG enforcement. See [Pricing](/pricing).
package/dist/docs/diff.md CHANGED
@@ -104,3 +104,7 @@ See the interactive [Merge demo](/docs/examples/merge) for `<MergeView>` conflic
104
104
 
105
105
  - Use `platejs/diff` when the user compares saved snapshots or merges diverged drafts and applies the chosen result directly in one undoable step.
106
106
  - Use [Authored Changes](/docs/authored-changes) (`AuthoredPlugin.api.proposeComparison(...)`) and [Suggestions](/docs/suggestion) when edits must stay inside the document as attributed review marks for collaborative accept/reject workflows.
107
+
108
+ ## Pro and Business
109
+
110
+ Plate Pro ships `@plate-pro/change-requests` for Word `.docx` tracked-change intake (propose-over-current and direct redline modes with `lossy-content` diagnostics) and headless multi-author change-request review helpers built on `platejs/diff` and `AuthoredPlugin`. See [Pricing](/pricing).
@@ -178,3 +178,7 @@ Install the copied kit in the editor plugin list. It includes `CommentKit` and t
178
178
  ### `DiscussionSlots`
179
179
 
180
180
  For custom composition, pass the complete value to `CommentsPlugin.configure({ slots: DiscussionSlots })`. It owns the shared discussion index, block triggers, review cards, and Floating Discussion together.
181
+
182
+ ## Pro and Business
183
+
184
+ Plate Pro ships `@plate-pro/floating-discussion` for wide-screen margin comment and authored-suggestion columns with collision-free vertical card layout, plus the `Potion v2` and `Paper v2` flagship templates. See [Pricing](/pricing).
package/dist/docs/dnd.md CHANGED
@@ -346,3 +346,7 @@ Takes the same input as `move` and keeps the source.
346
346
  ### DOM drag API
347
347
 
348
348
  [`editor.api.dom.drag.start`](/docs/api/dom#drag-and-drop), `editor.api.dom.drag.indicate` and `editor.api.dom.drag.resolveTarget` drive a drag from code, such as a custom handle that is not a native draggable.
349
+
350
+ ## Pro and Business
351
+
352
+ Plate Pro ships the `Potion v2` and `Paper v2` flagship templates with block drag handles, multi-column drop layouts, and cross-browser Playwright checks in `@plate-pro/playwright-suite`. See [Pricing](/pricing).
package/dist/docs/docx.md CHANGED
@@ -265,6 +265,8 @@ In detached mode, `formats.docx.encode` receives `readPlugin()` returning `undef
265
265
 
266
266
  Choose `accepted` to omit pending changes, `proposed` to apply them, or `review` to write Word tracked-change markup. Accepted and proposed exports warn about the pending changes they decided.
267
267
 
268
+ To produce a clean external copy without comments, pending suggestions, review XML parts, or retained source packages, pass `projection: 'accepted'` and omit both `comments` and `source`. The copied `ExportToolbarButton` provides a **Clean copy** switch in its Word export popover wired to this exact export path.
269
+
268
270
  A review file contains what Word displays: text, comments, and tracked revisions with their authors. It also stores each main-root top-level block that holds a pending change, with the document's review records, in a custom XML part, and binds each block to its Word paragraphs with a bookmark when that block compiles once on its own without sharing an enclosing table or container with a foreign root or another main block (blocks that cannot bind safely fall back to Word tracked revisions). Importing the file restores the bound blocks Word left unchanged, as [Import tracked revisions](#import-tracked-revisions) describes. Named roots emitted by a plugin's `formats.docx` encoder (using `contentRoot(slot)` and `encodeBlocks`) export their text, comments, and tracked revisions to Word, while unrendered named roots and document metadata are omitted. To keep named roots and document metadata intact for round-trip, save `editor.read.value()` as JSON beside the file, as [Serializing](/docs/serializing) describes.
269
271
 
270
272
  ### Define DOCX mappings
@@ -512,3 +514,7 @@ exportDocx(
512
514
  A successful result (`ok: true`) contains `blob` and `readonly DocxWarningDiagnostic[]` (warnings only). A failed result (`ok: false`) contains a nonempty error-first diagnostic tuple (`readonly [DocxErrorDiagnostic, ...DocxDiagnostic[]]`) and no `blob`. `platejs/docx/export` exports `DocxDiagnostic`, `DocxErrorDiagnostic`, and `DocxWarningDiagnostic`.
513
515
 
514
516
  See [Authored Changes](/docs/authored-changes) for the editor's accepted, proposed, and review projections.
517
+
518
+ ## Pro and Business
519
+
520
+ Plate Pro ships `@plate-pro/change-requests` for Word `.docx` tracked-change intake (`propose` and `direct` redline modes with `lossy-content` diagnostics) and `@plate-pro/disclosure` for clean audience DOCX exports. See [Pricing](/pricing).
@@ -63,7 +63,7 @@ _Registry item `emoji-toolbar-button`: `npx shadcn@latest add @plate/emoji-toolb
63
63
 
64
64
  | Layer | Owner | What It Does |
65
65
  |-------|-------|--------------|
66
- | `emoji` | Registry | Defines `EmojiPlugin` (with closing-colon `:shortcode:` input rule) and `EmojiCombobox` (with its `:` trigger policy and code veto). |
66
+ | `emoji` | Registry | Defines `EmojiPlugin` (with closing-colon `:shortcode:` input rule) and `EmojiCombobox` (with its `:` trigger policy). |
67
67
  | `emoji-data` | Registry | Loads Emojibase once, joins GitHub shortcodes, ranks searches, and stores browser-local frequent picks and skin tone. |
68
68
  | `emoji-picker` | Registry UI | Owns the popover, category tabs, search results, frimousse grid, skin tone selector, and frequent picks. |
69
69
  | `emoji-toolbar-button` | Registry UI | Opens `EmojiPicker` from the toolbar and inserts the pick. |
@@ -128,7 +128,7 @@ input rule.
128
128
  |------|--------|
129
129
  | Type `:` | `EmojiCombobox` `trigger` prop. |
130
130
  | Previous character must match `/^\s?$/` | Start of block or whitespace by default. |
131
- | Not inside code | `triggerQuery` refuses code blocks and inline code; Plate's input-rule veto blocks closing-colon conversion in both. |
131
+ | Not inside code | Plate's `inputRuleVeto` blocks both the `:` popup and closing-colon conversion inside code blocks and inline code. |
132
132
  | Type the shortcode | `queryPattern` admits letters, digits, `_`, `+`, `-` and `:`; a space closes the popup. |
133
133
  | Close with `:` | `EmojiPlugin`'s input rule replaces an exact loaded shortcode such as `:smile:` immediately, undoable in one step. |
134
134
  | Search emoji data | The `:` popup calls `useEmojiSearch(query)`, applies the persisted skin tone, and displays each match's `:shortcode:`. |
@@ -279,3 +279,7 @@ _Verified by 4 automated tests._
279
279
  - [x] DeleteBackward from the next block selects the equation instead of deleting through it (`EDIT-MATH-BLOCK-BS-START-001`)
280
280
  - [x] Undo and redo after saving a new block equation keep its editor closed and take one step per press (`EDIT-MATH-REDO-001`)
281
281
  - [x] Undo and redo after saving a new inline equation keep its editor closed and take one step per press (`EDIT-MATH-INLINE-UNDO-001`)
282
+
283
+ ## Pro and Business
284
+
285
+ Plate Pro ships `@plate-pro/docs-press` for Typst `.typ` and CSS `@page` PDF publishing of documents containing equations, plus the `Potion v2` and `Paper v2` flagship templates. See [Pricing](/pricing).
@@ -46,3 +46,7 @@ Type in either editor to see remote document and cursor updates. Click **Go offl
46
46
  ## Related
47
47
 
48
48
  - [Sync](/docs/sync) covers server setup, `webSocketTransport`, Cloudflare Durable Objects, kept-conflict review, and React hooks.
49
+
50
+ ## Pro and Business
51
+
52
+ Plate Pro ships `@plate-pro/collab-do` for production Cloudflare Durable Object rooms with D1 projection, plus the `Potion v2` and `Paper v2` flagship templates. Plate Business adds `@plate-business/security-kernel` for wire-level read redaction and WORM audit trails. See [Pricing](/pricing).
@@ -2,37 +2,45 @@
2
2
 
3
3
  Export a Plate document to HTML, Markdown, Word, clipboard Markdown, or print.
4
4
 
5
- The registry `export-toolbar-button` downloads the current document as HTML,
6
- Markdown, or Word, copies Markdown to the clipboard, or prints through the
7
- browser's print and Save as PDF dialog. The demo mounts it in the fixed toolbar.
5
+ The registry `export-toolbar-button` opens an anchored export popover to
6
+ download the current document as Word, HTML, or Markdown, copy Markdown to the
7
+ clipboard, or print through the browser's print and Save as PDF dialog. The
8
+ demo mounts it in the fixed toolbar.
8
9
 
9
10
  ## Demo
10
11
 
11
12
  _Example `export-demo` in the Plate repository: `apps/www/src/registry/examples/export-demo.tsx`._
12
13
 
13
- _Click Export to serialize the current document to HTML, Markdown, or printable output._
14
+ _Open Export to pick a format, toggle Clean copy or Word layout options, and download or copy Markdown._
14
15
 
15
16
  ## Toolbar source
16
17
 
17
18
  Install the [Export Toolbar Button](/docs/components/export-toolbar-button)
18
- component to add the menu to an editor toolbar.
19
+ component to add the export popover to an editor toolbar.
19
20
 
20
21
  _Registry item `export-toolbar-button`: `npx shadcn@latest add @plate/export-toolbar-button`._
21
22
 
22
23
  Pass an optional `filename` prop to override the download stem and HTML title.
23
- Without `filename`, the button names downloads after the first heading in the
24
+ Without `filename`, the popover names downloads after the first heading in the
24
25
  exported projection (using `proposed` for `review` exports) and falls back to
25
- `document`.
26
+ `document`. A live summary line above the footer previews the filename and
27
+ included metadata before export.
26
28
 
27
29
  ## Export formats
28
30
 
29
- | Action | Implementation | Output |
30
- | -------------------- | -------------- | ------ |
31
- | Export as HTML | `renderStaticHtml(model, { component: EditorStatic, presentation: BaseEditorKit, projection })` from `platejs/static` | `<stem>.html` |
32
- | Export as Markdown | `model.plugin(MarkdownPlugin).api.serialize({ projection })` (shown when `MarkdownPlugin` is installed) | `<stem>.md` |
33
- | Export as Word | `exportDocx(model, { projection, source, styles })` from `platejs/docx/export` (omits `styles` when `source` is retained for `review`) | `<stem>.docx` |
34
- | Copy as Markdown | `model.plugin(MarkdownPlugin).api.serialize({ projection })` written via `navigator.clipboard.writeText` (shown when `MarkdownPlugin` is installed) | Clipboard text |
35
- | Print / Save as PDF | `renderStaticHtml(...)` rendered in a light-mode hidden iframe with `@page` margins and `window.print()` | Browser print dialog |
31
+ | Format / Action | Implementation | Output |
32
+ | ------------------- | -------------- | ------ |
33
+ | Word (`.docx`) | `exportDocx(model, { comments, pageNumber, pageSize, projection, source, styles })` from `platejs/docx/export` (omits `styles` when `source` is retained for `review`) | `<stem>.docx` |
34
+ | PDF / Print | `renderStaticHtml(...)` rendered in a light-mode hidden iframe with `@page` size and margins decoded from persisted `PaginationPlugin` `layout.page` settings (falling back to `@page { margin: 16mm; }` when unset) and `window.print()` | Browser print dialog |
35
+ | Markdown (`.md`) | `model.plugin(MarkdownPlugin).api.serialize({ projection })` (shown when `MarkdownPlugin` is installed) | `<stem>.md` |
36
+ | HTML (`.html`) | `renderStaticHtml(model, { component: EditorStatic, presentation: BaseEditorKit, projection })` from `platejs/static` | `<stem>.html` |
37
+ | Copy MD | `model.plugin(MarkdownPlugin).api.serialize({ projection })` written via `navigator.clipboard.writeText` (footer button when `MarkdownPlugin` is installed; forces `projection: 'accepted'` while Word **Clean copy** is enabled) | Clipboard text |
38
+
39
+ When **Word (.docx)** is selected, the popover shows Word-specific controls:
40
+
41
+ - **Clean copy**: forces `projection: 'accepted'`, skips `toDocxComments`, and omits retained Word source packages so external copies contain accepted text only.
42
+ - **Page size**: defaults to **Original** when a retained Word source is present (keeping exact byte-for-byte reuse on unchanged documents) or **Letter** otherwise, with **Letter** and **A4** presets.
43
+ - **Page numbers**: enables `pageNumber: true` to add a page-number footer.
36
44
 
37
45
  Every format captures the same complete document and explicit authored
38
46
  projection from `useModelEditor()`. Export reads model content rather than the
@@ -53,23 +61,23 @@ prints on white paper regardless of the app's dark mode setting.
53
61
 
54
62
  ## Suggestions
55
63
 
56
- When the document has unresolved [suggestions](/docs/suggestion), the menu shows
57
- an **Unresolved suggestions** choice:
64
+ When the document has unresolved [suggestions](/docs/suggestion) and **Clean
65
+ copy** is off, the popover shows a **Suggestions** selector:
58
66
 
59
- | Choice | Projection | Result |
60
- | ------------------------- | ---------- | ------------------------------------------- |
61
- | Include suggested changes | `proposed` | The document with pending suggestions applied |
62
- | Exclude suggested changes | `accepted` | The document without pending suggestions |
67
+ | Choice | Projection | Formats | Result |
68
+ | --------------- | ---------- | ------------------- | -------------------------------------------------- |
69
+ | Track changes | `review` | Word | Writes pending suggestions as Word tracked changes |
70
+ | Include changes | `proposed` | All formats | The document with pending suggestions applied |
71
+ | Exclude changes | `accepted` | All formats | The document without pending suggestions |
63
72
 
64
- The initial choice follows the mounted view. HTML, Markdown, Word, Copy as
65
- Markdown, and Print / Save as PDF use the same choice. **Export as Word with
66
- tracked changes** uses `review`, which writes pending suggestions as Word
67
- revisions. A conflict has no faithful Word revision, so review export returns an
68
- error until the conflict is resolved.
73
+ Word defaults to **Track changes** (`review`), while HTML, Markdown, and PDF /
74
+ Print follow the mounted view. A conflict has no faithful Word revision, so
75
+ review export returns an error until the conflict is resolved.
69
76
 
70
- Without unresolved suggestions, Word export uses `review`. A retained,
71
- unchanged imported DOCX can then be returned byte for byte. Each exporter
72
- returns diagnostics, which the menu presents as warning or error toasts.
77
+ Without unresolved suggestions, Word export uses `review` when **Clean copy**
78
+ is off. A retained, unchanged imported DOCX with default **Original** page size
79
+ and **Page numbers** off returns byte for byte. Each exporter returns
80
+ diagnostics, which the popover presents as warning or error toasts.
73
81
 
74
82
  ## DOCX presentation
75
83
 
@@ -84,3 +92,7 @@ _Registry item `docx-export`: `npx shadcn@latest add @plate/docx-export`._
84
92
  - [Markdown](/docs/markdown) covers Markdown serialization.
85
93
  - [Static Rendering](/docs/static) covers static rendering and HTML serialization.
86
94
  - [Authored Changes](/docs/authored-changes) covers visible HTML/Markdown projections, authored JSON, and DOCX review.
95
+
96
+ ## Pro and Business
97
+
98
+ Plate Pro ships `@plate-pro/docs-press` for `/llms.txt`, `.md`, CSS `@page`, and Typst PDF publishing workers, plus `@plate-pro/disclosure` for clean audience exports across DOCX, HTML, Markdown, plain text, and JSON. Plate Business adds `@plate-business/compliance-pdf` for zero-network AST-redacted compliance PDFs with forensic watermarks and signed SHA-256 attestations. See [Pricing](/pricing).
@@ -44,3 +44,7 @@ if (result.kind === "ready") {
44
44
  If the live document changes in an unrelated paragraph while you review conflicts, deterministic conflict IDs keep your existing choices intact. If the live document changes before `applyDiff` runs, `applyDiff` returns `{ kind: "stale" }` without overwriting newer edits.
45
45
 
46
46
  See [Version History](/docs/examples/version-history) for two-way revision comparison and selective restore, or [Authored Changes](/docs/authored-changes) to review changes as tracked suggestions instead of applying them directly.
47
+
48
+ ## Pro and Business
49
+
50
+ Plate Pro ships `@plate-pro/change-requests` for Word `.docx` tracked-change intake and multi-author change-request review helpers built on `platejs/diff` and `AuthoredPlugin`. See [Pricing](/pricing).
@@ -70,3 +70,7 @@ const reloaded = createEditor({
70
70
  The fresh editor starts with empty local undo and redo stacks. If the document has comments, save `comments.anchors()` with the same revision, keep thread rows in your tables, and load both through `initialComments: { anchors, threads }`; document undo does not rewind the discussion.
71
71
 
72
72
  See [Authored Changes](/docs/authored-changes) to propose and review changes as suggestions instead of applying them directly.
73
+
74
+ ## Pro and Business
75
+
76
+ Plate Pro ships `@plate-pro/change-requests` for multi-author change-request review and Word `.docx` redline intake. Plate Business adds `@plate-business/security-kernel` for revision-pinned approval gates and crash-safe SHA-256 WORM audit logs. See [Pricing](/pricing).
@@ -677,3 +677,7 @@ Plain text, through `serializePlainText` from `platejs`, writes the same text as
677
677
  | `FIELD_TESTS` | `platejs/field` | The tests a condition may use on each kind. |
678
678
  | `FieldAccess` | `platejs/field/react` | Live editor access state (`locked`, `waitsForReview`) returned alongside `FieldRead` by `useFieldRead`. |
679
679
  | `FieldElement`, `FieldSettings`, `FieldPatch`, `FieldRead`, `FieldCondition`, `FieldConditionTest`, `FieldProblem`, `FieldKind`, `FieldTest`, `FieldValue`, `FieldOption`, `FieldSubmission`, `FieldRefusal`, `FieldApplyResult`, `FieldAnswer` | `platejs/field` | Field types. |
680
+
681
+ ## Pro and Business
682
+
683
+ Plate Pro ships `@plate-pro/procedures` for conditional workflow branch gating built on `platejs/field`. Plate Business adds `@plate-business/security-kernel` for server-enforced section and field ACL redaction on sync rooms and exports. See [Pricing](/pricing).
@@ -534,3 +534,7 @@ _Verified by 4 automated tests._
534
534
  - [Markdown](/docs/markdown)
535
535
  - [Navigation Feedback](/docs/navigation-feedback)
536
536
  - [Editor Methods](/docs/editor-methods)
537
+
538
+ ## Pro and Business
539
+
540
+ For cross-document citations with live backlinks and quote drift checks, Plate Pro ships `@plate-pro/sources`, plus `@plate-pro/docs-press` for Typst and CSS `@page` PDF publishing with footnotes. See [Pricing](/pricing).
@@ -117,7 +117,7 @@ export function PainterButton() {
117
117
  | A link | The source's link is not copied. A painted link keeps its `url`. |
118
118
  | A target that cannot hold part of the look | Each text and block takes every copied style it can hold where it sits, and skips the rest. |
119
119
  | Suggesting mode | Records the change as suggestions. |
120
- | Touch or pen | Paints nothing. The brush stays armed. |
120
+ | Touch or pen | Tap paints the word under the tap; touch long-press selection paints the selected range. Cancelled touch scrolls leave the brush armed. |
121
121
  | A read-only view | Paints nothing, and `Mod+Alt+V` and `Escape` do nothing. Only the brush button puts an armed brush down. |
122
122
  | `Escape` | Puts an armed brush down in an editable view. With the brush down, `Escape` reaches other handlers. |
123
123
 
package/dist/docs/html.md CHANGED
@@ -415,3 +415,7 @@ Direct parse options require `plugins` and accept `schema`, `limits`,
415
415
  `plugins` and accept `schema`, `projection`, and `lossPolicy`. Installed editor
416
416
  methods omit `plugins` and `schema` because the plugin captures them from the
417
417
  editor.
418
+
419
+ ## Pro and Business
420
+
421
+ Plate Pro ships `@plate-pro/docs-press` for CSS `@page` print stylesheets and self-hosted PDF workers, plus `@plate-pro/disclosure` for clean audience HTML exports. Plate Business adds `@plate-business/compliance-pdf` for zero-network AST-redacted HTML-to-PDF rendering with forensic watermarks and signed SHA-256 attestations. See [Pricing](/pricing).
@@ -54,6 +54,10 @@ Building with Claude Code, Codex, or Cursor? Open [Agents](/docs/agents) for the
54
54
  - [Plugins](/docs/plugins): Compose blocks, marks, tables, mentions, collaboration, AI, and Markdown or DOCX codecs.
55
55
  - [Components](/docs/components): Inspect copied editor containers, toolbars, toolbar buttons, and node elements.
56
56
 
57
+ ## Pro and Business
58
+
59
+ Every `platejs` package, plugin, codec, and copied UI kit stays MIT open source. For teams shipping full workspaces faster, Plate Pro adds the `Potion v2` and `Paper v2` flagship templates, copy-owned `@plate-pro/*` slices, and self-host deploy and upgrade skills. For regulated apps, Plate Business adds self-hosted `@plate-business/security-kernel`, `@plate-business/compliance-pdf`, and `plate verify` CI on your own infrastructure. See [Pricing](/pricing).
60
+
57
61
  ## Credits
58
62
 
59
63
  - [shadcn/ui](https://ui.shadcn.com/): Open-code component model and CLI.
package/dist/docs/ink.md CHANGED
@@ -8,6 +8,8 @@ _Turn on Draw to sketch or highlight over text and images, then click Send to pa
8
8
 
9
9
  Open [the full-page Ink demo](/blocks/ink-demo) to test drawing over text and media, blended highlighters, stylus eraser-end erasing, atomic delete and undo, and 1-tap Send to `AgentChat` with local persistence. The demo saves its document and comment threads under one local storage key. Configure your AI Gateway API key in Settings (or `AI_GATEWAY_API_KEY` on the server) before sending ink to the agent.
10
10
 
11
+ To see client-side handwriting synthesis on top of `InkPlugin`, open [the PenGPT notebook demo](/blocks/pengpt-demo) (`npx shadcn@latest add @plate/pengpt`), which adds a ruled `PenSheetPlugin` canvas and runs a 6 MB handwriting model in a browser Web Worker.
12
+
11
13
  ## Features
12
14
 
13
15
  - Floating bottom `InkDock` with Pen, Highlighter, Eraser, and Lasso tools, an Okabe-Ito colorblind-safe pen palette plus an adaptive `"Ink"` (`currentColor`) swatch, a custom color picker, a non-blocking width and **Finger draws** flyout, a 3-state **Dim** toggle (`hide`, `dim`, `show`) for addressed ink, a 1-tap author-scoped **Send** button with round tracking and `"Sent"` feedback, an optional host-registered **Approve** button (`registerInkApproveHandler`), and a collapse toggle. Brush colors and widths persist per editor across toggles while tool state stays per mounted view.
@@ -260,3 +262,7 @@ Headless plugin (`platejs/ink`) that uses core element IDs and owns the `ink-mar
260
262
  | `registerInkSendHandler(editor, handler)`, `registerInkApproveHandler(editor, handler)` | `ink-dock.tsx` | Reactive host hooks that enable the dock's **Send** and optional **Approve** actions without coupling `InkDock` to a specific chat or workflow component. |
261
263
  | `createEditorAgent` / `useEditorAgent({ ink: true })` | `platejs/ai`, `platejs/ai/react` | Opts into `<prefix>_read_ink` (`author?`, `roundId?`, `includePrior?`, returning `clusters`, `suggestions`, and pure-JS `svg` when Canvas 2D PNGs are absent, or `code: 'denied'` when `BaseInkPlugin` is uninstalled), `<prefix>_set_ink_digitized` (`roundId?`, `changeIds?`, `threadIds?`), and `<prefix>_comment` (`kind?: 'answer' \| 'note' \| 'question'` and `CommentInvalidReason` errors). Bridges mounted `InkPlugin.api.images` in React and strips raw PNG data URLs from WebMCP tool outputs. |
262
264
  | `createSyncServerAgent(server, { ink: true, ... })` | `platejs/ai` | Enables synchronous single-revision `<prefix>_read_ink` (returning pure-JS `svg`, `clusters`, `suggestions`, and `blockRevisions`) and `<prefix>_set_ink_digitized` on an authoritative sync room under `access: 'suggest'` or `'edit'` (edit-only; anchored comments stay client-side until synced comment records land). |
265
+
266
+ ## Pro and Business
267
+
268
+ Plate Pro ships `@plate-pro/ink-loop` for an end-to-end handwriting annotation and server-side AI review room built on `BaseInkPlugin`, `createSyncServerAgent({ ink: true })`, and `@plate-pro/collab-do`, plus `@plate-pro/playwright-suite` for automated Ink draw-and-send browser proofs. See [Pricing](/pricing).
@@ -331,9 +331,7 @@ export default function App() {
331
331
  <div style={{ padding: '8px 0' }}>
332
332
  <button
333
333
  onClick={() => {
334
- editor.update((tx) => {
335
- tx.value.replace({ children: initialValue });
336
- });
334
+ editor.update.value.replace({ children: initialValue });
337
335
  }}
338
336
  style={{
339
337
  padding: '4px 8px',
@@ -381,7 +379,7 @@ You've now set up a basic Plate editor manually! From here, you can:
381
379
  * For a quick start with pre-built components, consider using [Plate UI](/docs/installation/plate-ui)
382
380
  * Or continue styling manually using CSS, CSS-in-JS libraries, or your preferred styling solution
383
381
  * **[Add Plugins](/docs/plugins):** Plate has a rich ecosystem of plugins for features like tables, mentions, images, lists, and more. Install their packages (e.g., `platejs`) and add them to your `plugins` array.
384
- * **[Build a Toolbar](/docs/toolbar):** Create React components for toolbar buttons that use the [Editor Transforms](/docs/api/editor-transforms) to apply formatting (e.g., `editor.update.bold.toggle()`, `editor.plugin(HeadingPlugin).update.toggle({ level: 1 })`). You can also use the editor state with the [Editor API](/docs/api).
382
+ * **[Build a Toolbar](/docs/toolbar):** Create React components for toolbar buttons that use the [Editor Transforms](/docs/api/editor-transforms) to apply formatting (e.g., `editor.update.bold.toggle()`, `editor.plugin(HeadingPlugin).update.toggle({ level: 1 })`). You can also use the editor state with the [Editor API](/docs/api/editor-api).
385
383
  * **Learn More:**
386
384
  * [Editor Configuration](/docs/editor)
387
385
  * [Plugin Configuration](/docs/plugin)
@@ -330,9 +330,7 @@ function MyEditor({ value }: { value: Value }) {
330
330
  <ToolbarButton
331
331
  className="px-2"
332
332
  onClick={() => {
333
- editor.update((tx) => {
334
- tx.value.replace({ children: initialValue });
335
- });
333
+ editor.update.value.replace({ children: initialValue });
336
334
  }}
337
335
  >
338
336
  Reset
@@ -257,8 +257,8 @@ Finally, Plate UI includes more advanced editor components as overlays, menus, b
257
257
  # Install a menu for AI features
258
258
  npx shadcn@latest add @plate/ai-menu
259
259
 
260
- # Install a draggable component for reordering blocks
261
- npx shadcn@latest add @plate/dnd
260
+ # Install a floating toolbar for text selections
261
+ npx shadcn@latest add @plate/floating-toolbar
262
262
  ```
263
263
 
264
264
  These components are typically included as part of their respective Feature Kits but can be installed individually for custom setups.
@@ -298,3 +298,7 @@ See [Upload Files](/docs/upload) before accepting upload requests.
298
298
 
299
299
  Each `platejs` release ships docs that match its version. See
300
300
  [Agents](/docs/agents) to point your coding agent at them.
301
+
302
+ ## Pro and Business
303
+
304
+ Plate Pro delivers copy-owned `@plate-pro/*` shadcn slices, the `Potion v2` and `Paper v2` flagship templates, and the `plate-upgrade` skill for repeatable upgrades across customized Plate UI files with zero private `.npmrc` packages. See [Pricing](/pricing).
@@ -30,8 +30,8 @@ Create an editor in the Server Component and render it with
30
30
 
31
31
  ```tsx title="app/documents/page.tsx" showLineNumbers
32
32
  import { createEditor, type Value } from 'platejs';
33
- import { EditorStatic } from 'platejs/static';
34
33
 
34
+ import { EditorStatic } from '@/components/editor/editor-static';
35
35
  import { BaseEditorKit } from '@/components/editor/plugins-static';
36
36
 
37
37
  const value: Value = [
@@ -65,3 +65,7 @@ Once the editor runs, use these docs to customize it:
65
65
  - [Plugin](/docs/plugin) explains plugin configuration.
66
66
  - [Plugin Components](/docs/plugin-components) explains node and mark rendering.
67
67
  - [Troubleshooting](/docs/troubleshooting) covers common setup issues.
68
+
69
+ ## Pro and Business
70
+
71
+ Need a full collaborative workspace or repeatable upgrades across customized Plate UI files? Plate Pro provides the `Potion v2` and `Paper v2` flagship templates, copy-owned `@plate-pro/*` slices, and the `plate-deploy-cloudflare`, `plate-deploy-vercel`, and `plate-upgrade` coding-agent skills. See [Pricing](/pricing).
package/dist/docs/link.md CHANGED
@@ -284,3 +284,7 @@ link.api.triggerInsert({ focused: true });
284
284
  link.api.submit();
285
285
  link.api.unlink();
286
286
  ```
287
+
288
+ ## Pro and Business
289
+
290
+ For cross-document links that survive page renames, Plate Pro ships `@plate-pro/sources` with a D1 and in-memory backlink index, cycle-guarded transclusion, and workspace citation drift checks alongside the `Potion v2` and `Paper v2` flagship templates. See [Pricing](/pricing).
@@ -1,4 +1,4 @@
1
- # Plate docs for platejs@54.0.0-beta.13
1
+ # Plate docs for platejs@54.0.0-beta.14
2
2
 
3
3
  These pages match the installed `platejs` version. A `/docs/<path>` link in a page is the file `<path>.md` in this folder when the list below names it, and `/docs` is `index.md`. Read the pages your task needs before you write editor code.
4
4
 
@@ -55,6 +55,7 @@ These pages match the installed `platejs` version. A `/docs/<path>` link in a pa
55
55
  - [Copilot](copilot.md): Streaming inline AI text completions with rich ghost text.
56
56
  - [Date](date.md) (`platejs/date`): Inline void date elements with one authored string value.
57
57
  - [Debugging](debugging.md): Debugging in Plate.
58
+ - [Deck](deck.md): Present structured documents and board frames as a live slide deck with speaker notes and 16:9 print export.
58
59
  - [Decorations and annotations](decorations.md): Paint transient ranges and retain application-owned range identities.
59
60
  - [Details](details.md) (`platejs/details`): Add collapsible disclosure blocks with editable summary headers.
60
61
  - [Diff & Merge](diff.md) (`platejs/diff`): Compare immutable Plate documents, resolve three-way merge conflicts, and apply checked diffs in one undoable step.
@@ -124,6 +125,7 @@ These pages match the installed `platejs` version. A `/docs/<path>` link in a pa
124
125
  - [Plugin Shortcuts](plugin-shortcuts.md): Configure keyboard shortcuts on Plate plugins.
125
126
  - [Plugin Configuration](plugin.md): Configure and customize Plate plugins, schema, state, and lifecycle hooks.
126
127
  - [Prompt Editor](prompt-editor.md): Build chat message inputs with inline @ mention chips that send on Enter.
128
+ - [Reference](reference.md) (`platejs/reference`): Insert rename-safe wikilinks, backlinks, hover transclusion cards, and version-pinned citations.
127
129
  - [Releases](releases.md): Browse package release notes and Plate UI registry changelog updates.
128
130
  - [Roots](roots.md): Use extra roots for headers, footers, synced blocks, captions, and other editable regions.
129
131
  - [Right-to-left](rtl.md): Edit Arabic, Hebrew and other right-to-left documents.