platejs 54.0.0-beta.4 → 54.0.0-beta.6

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 (166) hide show
  1. package/dist/{AIChatRequestContext-DrUahdTc.d.ts → AIChatRequestContext-BYpGufVe.d.ts} +2 -2
  2. package/dist/{BaseSuggestionPlugin-_7Ka6nY3.d.ts → BaseSuggestionPlugin-C52LR8RN.d.ts} +4 -4
  3. package/dist/{PlateStatic-D3Cb-QwH.d.ts → PlateStatic-DMClx-tH.d.ts} +3 -3
  4. package/dist/ai/index.d.ts +1 -1
  5. package/dist/ai/react/index.d.ts +9 -9
  6. package/dist/authored/index.d.ts +3 -3
  7. package/dist/code-block/codemirror/index.d.ts +1 -1
  8. package/dist/{combobox-Dr0OYZIE.d.ts → combobox-DgYdu5mZ.d.ts} +2 -2
  9. package/dist/{comparison-types-DdwE6mYq-BogsHoUO.d.ts → comparison-types-DBQFu7Rt-DYc2TC2H.d.ts} +1 -1
  10. package/dist/compiler/index.d.ts +2 -2
  11. package/dist/{core-BqR-fEDp.d.ts → core-CQKT9eNc.d.ts} +6 -6
  12. package/dist/diff/index.d.ts +2 -2
  13. package/dist/docs/annotations.md +4 -2
  14. package/dist/docs/api/anchor.md +15 -0
  15. package/dist/docs/api/core/plate-components.md +12 -4
  16. package/dist/docs/api/core.md +4 -3
  17. package/dist/docs/api/dom.md +5 -3
  18. package/dist/docs/api/range.md +17 -0
  19. package/dist/docs/authored-changes.md +3 -3
  20. package/dist/docs/board.md +2 -1
  21. package/dist/docs/comment.md +3 -1
  22. package/dist/docs/editor.md +5 -2
  23. package/dist/docs/field.md +279 -33
  24. package/dist/docs/installation/plate-ui.md +40 -14
  25. package/dist/docs/link.md +1 -1
  26. package/dist/docs/llms.txt +1 -1
  27. package/dist/docs/media.md +88 -2
  28. package/dist/docs/migration/plite-to-plate.md +105 -4
  29. package/dist/docs/plugin-input-rules.md +4 -3
  30. package/dist/docs/plugin-methods.md +3 -1
  31. package/dist/docs/roots.md +33 -10
  32. package/dist/docs/selection.md +5 -0
  33. package/dist/docs/suggestion.md +2 -2
  34. package/dist/docs/toolbar.md +11 -2
  35. package/dist/docx/export/index.d.ts +3 -3
  36. package/dist/docx/export/lib/internal/unit-conversion.js +1 -1
  37. package/dist/docx/export/lib/internal/xml-builder.js +1 -1
  38. package/dist/docx/import/index.d.ts +4 -4
  39. package/dist/docx/paste/index.d.ts +4 -4
  40. package/dist/dom/index.d.ts +1 -1
  41. package/dist/excalidraw/index.d.ts +3 -3
  42. package/dist/excalidraw/react/index.d.ts +3 -3
  43. package/dist/facade.js +2 -2
  44. package/dist/features/board/index.d.ts +1 -1
  45. package/dist/features/board/lib/boardShape.internal.js +1 -1
  46. package/dist/features/callout/index.d.ts +3 -3
  47. package/dist/features/code-block/lib/BaseCodeBlockPlugin.js +14 -18
  48. package/dist/features/combobox/index.d.ts +2 -2
  49. package/dist/features/comments/BaseCommentsPlugin.js +6 -2
  50. package/dist/features/comments/index.d.ts +1 -1
  51. package/dist/features/date/index.d.ts +3 -3
  52. package/dist/features/details/index.d.ts +3 -3
  53. package/dist/features/field/index.d.ts +2 -2
  54. package/dist/features/field/index.js +3 -3
  55. package/dist/features/field/lib/BaseFieldPlugin.js +109 -40
  56. package/dist/features/field/lib/applyFieldValues.js +313 -83
  57. package/dist/features/field/lib/fieldRules.internal.js +92 -4
  58. package/dist/features/find/index.d.ts +3 -3
  59. package/dist/features/footnote/index.d.ts +1 -1
  60. package/dist/features/ink/index.d.ts +1 -1
  61. package/dist/features/ink/lib/BaseInkPlugin.js +28 -31
  62. package/dist/features/ink/lib/inkCodec.internal.js +16 -1
  63. package/dist/features/ink/lib/inkGone.internal.js +1 -1
  64. package/dist/features/ink/lib/inkMatch.internal.js +35 -11
  65. package/dist/features/ink/lib/inkPlaces.internal.js +8 -3
  66. package/dist/features/layout/index.d.ts +1 -1
  67. package/dist/features/lint/index.d.ts +3 -3
  68. package/dist/features/list/lib/listIndex.internal.js +1 -1
  69. package/dist/features/list/lib/listNumbering.internal.js +1 -1
  70. package/dist/features/media/index.d.ts +1 -1
  71. package/dist/features/media/lib/media-embed/BaseMediaEmbedPlugin.js +1 -1
  72. package/dist/features/mention/index.d.ts +5 -5
  73. package/dist/features/suggestion/BaseSuggestionPlugin.js +3 -2
  74. package/dist/features/suggestion/index.d.ts +5 -4
  75. package/dist/features/suggestion/suggestionColorOf.js +5 -4
  76. package/dist/features/table/index.d.ts +1 -1
  77. package/dist/features/table/lib/internal/selection.js +1 -1
  78. package/dist/features/toc/index.d.ts +1 -1
  79. package/dist/features/upload/index.d.ts +1 -1
  80. package/dist/history/index.d.ts +2 -2
  81. package/dist/html/index.d.ts +3 -3
  82. package/dist/html/server/index.d.ts +1 -1
  83. package/dist/{htmlTypes-eT2ZGDAj.d.ts → htmlTypes-8IFX0ezP.d.ts} +1 -1
  84. package/dist/hyperscript/index.d.ts +1 -1
  85. package/dist/{index-C9Fu-P4E.d.ts → index-AOVPovEr.d.ts} +156 -18
  86. package/dist/{index-BTx5oK7k.d.ts → index-B4oeyc99.d.ts} +1 -1
  87. package/dist/{index-BXwU9QH6.d.ts → index-BAz_KJSV.d.ts} +2 -2
  88. package/dist/{index-B8-5Sr7I.d.ts → index-BBsiQIzw.d.ts} +2 -2
  89. package/dist/{index-DNQXzU-X.d.ts → index-BIP1GoWI.d.ts} +1 -1
  90. package/dist/{index-B8QJDAmG.d.ts → index-BTFrh2Cz.d.ts} +2 -2
  91. package/dist/{index-M781pyx9.d.ts → index-BapA_uvI.d.ts} +4 -4
  92. package/dist/{index-DPowErHa.d.ts → index-BbsVGwn8.d.ts} +22 -15
  93. package/dist/{index-DShbzec2.d.ts → index-BcuSI8EM.d.ts} +6 -3
  94. package/dist/{index-DwWQVwQt.d.ts → index-BfHCmKG3.d.ts} +41 -16
  95. package/dist/{index-BWPcE4ac-Cto_IsNs.d.ts → index-BvQzYVAW-Jvz2iG8B.d.ts} +1 -1
  96. package/dist/{index-BkwR-5hH.d.ts → index-C-5w6252.d.ts} +3 -3
  97. package/dist/{index-JWgwL5l3.d.ts → index-Cp0QfjUV.d.ts} +3 -3
  98. package/dist/{index-B7moSod7.d.ts → index-CrUMAwqm.d.ts} +5 -1
  99. package/dist/{index-B33E1CRJ.d.ts → index-D2w_9_tb.d.ts} +3 -3
  100. package/dist/{index-DYdObeFQ.d.ts → index-DE1Mcccg.d.ts} +3 -3
  101. package/dist/{index-CpY7Xnxw.d.ts → index-DFMkcY5V.d.ts} +4 -4
  102. package/dist/{index-BXjLmx1n-CXk17buG.d.ts → index-DHt8nZQ6-NUTahb8N.d.ts} +111 -70
  103. package/dist/{index-BsV2McRr.d.ts → index-DM6z4D7q.d.ts} +5 -5
  104. package/dist/{index-Cob_iBdu.d.ts → index-DUk2VZ_1.d.ts} +3 -3
  105. package/dist/{index-d7io3MzC.d.ts → index-DbPoiwq_.d.ts} +3 -3
  106. package/dist/{index-Ca48r1ng.d.ts → index-Dh7pWHZo.d.ts} +3 -3
  107. package/dist/{index-Dq3Jlj8O-BJ6NxZm0.d.ts → index-PDROnF1G-Ds_dbJsr.d.ts} +1 -1
  108. package/dist/index.d.ts +3 -3
  109. package/dist/internal/penStroke.internal.js +28 -3
  110. package/dist/internal/plugin/OverridePlugin.js +2 -0
  111. package/dist/internal/plugin/compilePlateModel.js +2 -8
  112. package/dist/internal/plugin/pluginStore.js +0 -3
  113. package/dist/internal/plugin/resolvePlugins.js +1 -1
  114. package/dist/internal/utils/vscodeClipboard.js +11 -0
  115. package/dist/lib/plugin/createPluginContext.internal.js +2 -3
  116. package/dist/lib/plugins/html/HtmlPlugin.js +1 -0
  117. package/dist/markdown/index.d.ts +1 -1
  118. package/dist/markdown/lib/MarkdownPlugin.js +2 -1
  119. package/dist/markdown/lib/internal/markdownRawHtml.js +1 -1
  120. package/dist/markdown/lib/serializer/convertNodesSerialize.js +1 -1
  121. package/dist/markdown/lib/serializer/listToMdastTree.js +1 -1
  122. package/dist/math/index.d.ts +3 -3
  123. package/dist/math/react/index.d.ts +4 -4
  124. package/dist/migrations/index.d.ts +3 -3
  125. package/dist/pagination/index.d.ts +1 -1
  126. package/dist/pagination/react/index.d.ts +2 -2
  127. package/dist/react/features/board/BoardShape.js +351 -130
  128. package/dist/react/features/board/boardIndex.internal.js +2 -1
  129. package/dist/react/features/board/boardInk.internal.js +2 -13
  130. package/dist/react/features/board/index.d.ts +55 -43
  131. package/dist/react/features/board/index.js +2 -2
  132. package/dist/react/features/callout/index.d.ts +3 -3
  133. package/dist/react/features/combobox/index.d.ts +5 -5
  134. package/dist/react/features/comments/index.d.ts +6 -6
  135. package/dist/react/features/date/index.d.ts +4 -4
  136. package/dist/react/features/details/index.d.ts +4 -4
  137. package/dist/react/features/field/index.d.ts +20 -5
  138. package/dist/react/features/footnote/index.d.ts +7 -7
  139. package/dist/react/features/format-painter/index.d.ts +4 -4
  140. package/dist/react/features/ink/InkContent.js +56 -18
  141. package/dist/react/features/ink/InkPlugin.js +52 -5
  142. package/dist/react/features/ink/index.d.ts +312 -16
  143. package/dist/react/features/ink/inkCapture.internal.js +36 -9
  144. package/dist/react/features/ink/inkMeasure.internal.js +1 -1
  145. package/dist/react/features/ink/inkPaint.internal.js +17 -7
  146. package/dist/react/features/ink/inkPick.internal.js +218 -0
  147. package/dist/react/features/ink/inkPlacement.internal.js +8 -3
  148. package/dist/react/features/ink/inkWatch.internal.js +1 -1
  149. package/dist/react/features/layout/index.d.ts +5 -5
  150. package/dist/react/features/media/index.d.ts +5 -5
  151. package/dist/react/features/mention/index.d.ts +6 -6
  152. package/dist/react/features/suggestion/index.d.ts +6 -6
  153. package/dist/react/features/table/index.d.ts +5 -5
  154. package/dist/react/features/toc/index.d.ts +2 -2
  155. package/dist/react/features/upload/index.d.ts +5 -5
  156. package/dist/react/index.d.ts +5 -5
  157. package/dist/react/internal/rendered-attributes.js +1 -1
  158. package/dist/react/virtualized.d.ts +2 -2
  159. package/dist/{source-BGohy8vH.d.ts → source-D5CyclpX.d.ts} +3 -3
  160. package/dist/static/index.d.ts +5 -5
  161. package/dist/tabbable/index.d.ts +1 -1
  162. package/dist/tabbable/react/index.d.ts +3 -3
  163. package/dist/testing/index.d.ts +2 -2
  164. package/dist/yjs/index.d.ts +1 -1
  165. package/dist/yjs/react/index.d.ts +5 -5
  166. package/package.json +2 -2
@@ -22,6 +22,7 @@ _Example `media-demo` in the Plate repository: `apps/www/src/registry/examples/d
22
22
  - Editable captions
23
23
  - Resizable elements
24
24
  - Embed URLs are normalized into `url` and `provider`, with an optional `sourceUrl` preserved for reversible editing.
25
+ - Paste a video or post link alone on an empty line to embed it above that line.
25
26
 
26
27
  ### Upload
27
28
  - **Multiple upload methods**:
@@ -150,9 +151,49 @@ For local file uploads, add `UploadPlugin` separately as shown in
150
151
  [Upload files](/docs/upload).
151
152
 
152
153
  <Callout type="info">
153
- **Note:** In Markdown, an image with only `url`, `alt`, and `title` is written as `![alt](url "title")`. An image with other properties, such as `width`, uses `<img src="…" />`, and a captioned image uses `<figure>` with `<img />` and `<figcaption>`. Video, audio, file, and embed use their own tags, such as `<video src="…">Caption</video>`; embeds keep the canonical `src` and `provider`, plus an optional `sourceUrl` so edits remain reversible. A caption must be one Markdown paragraph. Allowlisted provider snippets (e.g. YouTube, Tweet) are reduced to canonical URLs on paste. Raw `<script>` or custom embed chrome is out of scope — add your own rules if you need to preserve it.
154
+ **Note:** In Markdown, an image with only `url`, `alt`, and `title` is written as `![alt](url "title")`. An image with other properties, such as `width`, uses `<img src="…" />`, and a captioned image uses `<figure>` with `<img />` and `<figcaption>`. Video, audio, file, and embed use their own tags, such as `<video src="…">Caption</video>`; embeds keep the canonical `src` and `provider`, plus an optional `sourceUrl` so edits remain reversible. A caption must be one Markdown paragraph. `update.insert` takes the `src` out of an `<iframe>` snippet, and a provider link pasted alone on an empty line embeds through [`MediaEmbedRules`](#input-rules). Raw `<script>` and custom embed chrome are out of scope. Add your own rules to keep them.
154
155
  </Callout>
155
156
 
157
+ ### Input rules
158
+
159
+ `MediaKit` enables the paste embed rule. To enable it on your own `MediaEmbedPlugin`:
160
+
161
+ ```tsx
162
+ import { MediaEmbedRules } from 'platejs/media';
163
+ import { MediaEmbedPlugin } from 'platejs/media/react';
164
+ import { createEditor } from 'platejs/react';
165
+ import { MediaEmbedElement } from '@/components/editor/media-embed';
166
+
167
+ const editor = createEditor({
168
+ plugins: [
169
+ // ...otherPlugins,
170
+ MediaEmbedPlugin.configure({
171
+ component: MediaEmbedElement,
172
+ inputRules: [MediaEmbedRules.autoEmbed({ variant: 'paste' })],
173
+ }),
174
+ ],
175
+ });
176
+ ```
177
+
178
+ - `MediaEmbedRules.autoEmbed({ variant: 'paste' })`: Embeds a YouTube, Vimeo, Dailymotion, Youku, Coub or X (Twitter) link pasted alone into an empty paragraph. The paste lands first, as a link under the link plugin's paste rule or as plain text without it. Then, as its own undo step, the embed goes in above that paragraph, which stays empty and keeps the caret. One undo gives back what the paste landed, and a second gives the empty line.
179
+
180
+ The paste stays as it landed, a link or plain text, when:
181
+
182
+ - other text shares the line, or a line break follows the link;
183
+ - the paragraph is not bare, such as a list item, heading, indented or aligned paragraph, toggle title or caption, or the caret is in a code block;
184
+ - the paste replaces a selected range, or the clipboard holds an exact Plate slice or no plain text;
185
+ - the link is a Vimeo link with an `h` parameter, such as the player URL in Vimeo's embed code, because the embed would drop it;
186
+ - the view proposes changes, as in Suggesting mode;
187
+ - in `EditorKit`, a space or tab sits before or after the link, because the kit's Markdown or HTML paste then replaces the line. A leading tab or four leading spaces land a code block.
188
+
189
+ When the clipboard's HTML holds only the link, as an anchor with no attribute but
190
+ `href` and no text but the URL, the HTML paste drops the space or tab around it,
191
+ and the link embeds.
192
+ An empty paragraph inside a quote, table cell, column or details body embeds.
193
+ In another root, the paste embeds when it goes through a view of that root,
194
+ made with `createEditorView(editor, { root })`. A paste through the main
195
+ editor into another root stays a link.
196
+
156
197
  ### Captions
157
198
 
158
199
  Every image, audio, video, file, and embed is a non-void object element.
@@ -313,7 +354,7 @@ inline children store captions.
313
354
  </APIOptions>
314
355
  </API>
315
356
 
316
- `UploadPlugin` handles pasted image files. `ImagePlugin` inserts a pasted image URL as an image when no earlier paste rule takes it. In `EditorKit`, the link kit's `LinkRules.autolink({ variant: 'paste' })` rule runs first and takes any valid URL, image URLs included, as a link.
357
+ `UploadPlugin` handles pasted image files. `ImagePlugin` inserts a pasted image URL as an image when no earlier paste rule takes it. In `EditorKit`, the link kit's `LinkRules.autolink({ variant: 'paste' })` rule runs first and takes any valid URL, image URLs included, as a link. When that link is a provider link pasted alone on an empty line, `MediaEmbedRules.autoEmbed({ variant: 'paste' })` then embeds it above the line.
317
358
 
318
359
  ### `VideoPlugin`
319
360
 
@@ -340,6 +381,8 @@ inline children store captions. Extends `MediaPluginState`.
340
381
 
341
382
  Plugin for non-void object media embed elements whose
342
383
  direct inline children store captions. Extends `MediaPluginState`.
384
+ Its paste rule, [`MediaEmbedRules.autoEmbed`](#mediaembedrulesautoembed), ships
385
+ from `platejs/media`.
343
386
 
344
387
  ### `UploadPlugin`
345
388
 
@@ -378,6 +421,49 @@ like a pasted one, without landing rules or vetoes.
378
421
 
379
422
  ## API
380
423
 
424
+ ### `MediaEmbedRules.autoEmbed`
425
+
426
+ Returns a [follow-up paste rule](/docs/plugin-input-rules#follow-up-paste-rules)
427
+ for `MediaEmbedPlugin`'s `inputRules`.
428
+
429
+ <API name="MediaEmbedRules.autoEmbed">
430
+ <APIParameters>
431
+ <APIItem name="options.variant" type="'paste'">
432
+ Embeds a provider link pasted alone into an empty paragraph, as
433
+ [Input rules](#input-rules) describes.
434
+ </APIItem>
435
+ <APIItem name="options.enabled" type="(context) => boolean" optional>
436
+ Policy gate, evaluated before the rule matches.
437
+ </APIItem>
438
+ <APIItem name="options.priority" type="number" optional>
439
+ Sort order among the editor's paste rules.
440
+ </APIItem>
441
+ </APIParameters>
442
+ </API>
443
+
444
+ The rule reads one `http` or `https` link with only spaces or tabs around it.
445
+ The embed stores the provider's name in `provider`, its player URL in `url` and
446
+ its canonical link in `sourceUrl`. X stores `twitter` as its `provider` and its
447
+ canonical link as its `url`:
448
+
449
+ | Provider | Accepted links | `url` | `sourceUrl` |
450
+ | --- | --- | --- | --- |
451
+ | YouTube | `youtube.com/watch?v=<id>`, `/shorts/<id>`, `/embed/<id>` and `/live/<id>`, and `youtu.be/<id>` | `https://www.youtube.com/embed/<id>` | `https://www.youtube.com/watch?v=<id>` |
452
+ | Vimeo | `vimeo.com/<id>` and `player.vimeo.com/video/<id>`, without an `h` parameter | `https://player.vimeo.com/video/<id>` | `https://vimeo.com/<id>` |
453
+ | Dailymotion | `dailymotion.com/video/<id>` and `dai.ly/<id>` | `https://www.dailymotion.com/embed/video/<id>` | `https://www.dailymotion.com/video/<id>` |
454
+ | Youku | `v.youku.com/v_show/id_<id>.html` | `https://player.youku.com/embed/<id>` | `https://v.youku.com/v_show/id_<id>.html` |
455
+ | Coub | `coub.com/view/<id>` and `coub.com/embed/<id>` | `https://coub.com/embed/<id>` | `https://coub.com/view/<id>` |
456
+ | X (Twitter) | `/<user>/status/<id>` and `/i/web/status/<id>` on `x.com` and `twitter.com`, with an optional `/photo/<n>` or `/video/<n>` | `https://x.com/i/status/<id>` | none |
457
+
458
+ Links on `youtube.com`, `vimeo.com`, `dailymotion.com`, `coub.com`, `x.com` and
459
+ `twitter.com` also match with `www.`, `m.` or `mobile.`. A YouTube `t` or
460
+ `start` time in the query, or a `t` time in the fragment, goes on `sourceUrl` as
461
+ `&t=` with its value as given. When that value reads as a positive number of
462
+ seconds, such as `90` or `1m30s`, `url` also gets `?start=` with those seconds.
463
+
464
+ A YouTube playlist, a Vimeo `showcase`, `channels`, `album` or `groups` link, and a link with
465
+ more path after its id stay links.
466
+
381
467
  ### Upload tasks
382
468
 
383
469
  | Operation | Contract |
@@ -16,11 +16,23 @@ Use feature packages only for the nodes, marks, or behavior you add to the
16
16
  editor. Plate UI users should start with [Plate UI](/docs/installation/plate-ui)
17
17
  instead of rebuilding every component by hand.
18
18
 
19
+ ## Unchanged Imports
20
+
21
+ Plate re-exports Plite's document model with the same bindings. Unless
22
+ [Renamed And Dropped Names](#renamed-and-dropped-names) lists a value, change
23
+ only its import path: `plitejs` becomes `platejs`, and `plitejs/<entrypoint>`
24
+ becomes `platejs/<entrypoint>`. `editor.read`, `editor.update`, `tx`, `NodeApi`
25
+ and the rest of the document API work as before. `platejs/diff`,
26
+ `platejs/history`, `platejs/hyperscript`, `platejs/pagination`,
27
+ `platejs/testing`, `platejs/yjs` and `platejs/yjs/react` re-export their Plite
28
+ entrypoint whole.
29
+
19
30
  ## Migration Map
20
31
 
21
32
  | Plite surface | Plate surface |
22
33
  | --- | --- |
23
- | `useEditor()` from `plitejs/react` | `useCreateEditor({ ... })` in React components, or `createEditor({ ... })` in factories and tests. |
34
+ | `useEditor(options)` from `plitejs/react`, which creates an editor | `useCreateEditor(options)` in React components, or `createEditor(options)` in factories and tests. Plate's `useEditor()` returns the editor from context. |
35
+ | `useEditorContext()` | `useEditor()`. |
24
36
  | `<EditorRoot>` plus `<Editable>` | `<EditorRoot>` plus `<EditorContent>`. |
25
37
  | `renderElement` / `renderLeaf` switch statements | Plugin components through `.configure({ component })`. |
26
38
  | Plite plugins | Constructor `api`, `read`, `selectors`, `update`, native Plite fields, and format mappings built by `defineFormats`. |
@@ -39,7 +51,7 @@ import { EditorRoot, EditorContent, useCreateEditor } from 'platejs/react';
39
51
 
40
52
  const initialValue = [
41
53
  {
42
- children: [{ text: 'Hello EditorRoot.' }],
54
+ children: [{ text: 'Hello world.' }],
43
55
  type: 'paragraph',
44
56
  },
45
57
  ];
@@ -121,13 +133,13 @@ const editor = createEditor({
121
133
  Put a reusable document command under the plugin's `update` contribution. The
122
134
  command is available inside `editor.update(...)` under the plugin name.
123
135
 
124
- ```tsx title="components/editor/limit-exclamation-plugin.tsx" showLineNumbers
136
+ ```tsx title="components/editor/signature-plugin.tsx" showLineNumbers
125
137
  import { definePlugin } from 'platejs/react';
126
138
 
127
139
  export const SignaturePlugin = definePlugin('signature', {
128
140
  update: ({ tx }) => ({
129
141
  insert() {
130
- tx.text.insert(' - EditorRoot');
142
+ tx.text.insert(' - Signed');
131
143
  },
132
144
  }),
133
145
  });
@@ -243,6 +255,95 @@ export const editor = createEditor({
243
255
  });
244
256
  ```
245
257
 
258
+ ## Renamed And Dropped Names
259
+
260
+ These tables list each Plite value that Plate drops, renames, or exports under
261
+ the same name with a different contract, and the types an app imports with
262
+ them. Every other value keeps its binding, as
263
+ [Unchanged Imports](#unchanged-imports) says.
264
+
265
+ ### Editor And Plugins
266
+
267
+ | Plite | Plate | Notes |
268
+ | --- | --- | --- |
269
+ | `useEditor(options, deps)` | `useCreateEditor(options, deps)` | Plate's `useEditor()` takes no arguments and returns the editor from context. |
270
+ | `useEditorContext()` | `useEditor()` | |
271
+ | `useOptionalEditorContext()` | `useOptionalEditor()` | |
272
+ | `useCaretEditor()` | `useEditor()` outside `EditorContent` | Outside every editing area, `useEditor()` returns the editor of the root that holds the caret. |
273
+ | `createEditor(options)` | `createEditor(options)` from `platejs`, or from `platejs/react` in React | The options are the same except `clipboardFormatKey`, which Plate refuses. |
274
+ | `definePlugin(name, definition)` | `definePlugin(name, definition)` from `platejs`, or from `platejs/react` in React | The definition fields are the same. The result is a Plate plugin with `.configure()` and `.extend()`, and a `name` key inside the definition throws. |
275
+ | `useCommand(command, options)` | `editor.update.command(command, input)`, with the editor from `useEditor()` | Plate has no `root` or `focus` option for a command. |
276
+
277
+ ### Rendering
278
+
279
+ | Plite | Plate | Notes |
280
+ | --- | --- | --- |
281
+ | `Editable` | `EditorContent` | Move `renderElement`, `renderLeaf`, `renderText`, `renderPlaceholder` and `renderVoid` into plugin components. The other props carry over. |
282
+ | `PagedEditable` from `plitejs/pagination/react` | `PagedEditorContent` from `platejs/pagination/react` | The render props move into plugin components, as with `EditorContent`. |
283
+ | `VirtualizedEditable` from `plitejs/react/virtualized` | `VirtualizedEditorContent` from `platejs/react/virtualized` | The render props move into plugin components, as with `EditorContent`. |
284
+ | `EditorPlaceholder` | `placeholder` on `EditorContent`, or `BlockPlaceholderPlugin` for empty blocks | Plate has no `renderPlaceholder`. |
285
+ | `EditorRoot` | `EditorRoot` | `onValueChange` receives the whole document value, `{ children, ... }`, instead of the children array. Plate's `EditorRoot` has no `authorId`, `decorations`, `document` or `root` prop. Pass `userId` to `createEditor`, decorate through a plugin's `decorate`, and set `root` on `EditorContent`. To render another document, create an editor for it with `createEditor({ initialValue })`. |
286
+ | `EditorElement`, `EditorLeaf`, `EditorText` | `EditorElement`, `EditorLeaf`, `EditorText` | Plate's take the props a plugin component receives, so spread them: `<EditorElement {...props}>`. Plite's read the node from context. |
287
+ | `EditorReadOnlyProvider` | `readOnly` on `EditorRoot` or `EditorContent` | |
288
+ | `useClaimEditableDOMCommit`, `setDOMTextSyncRendererCapability`, `setRetainedTextFlowRendererCapability` | None | Plate's renderers call them for every plugin component. |
289
+
290
+ ### Hooks
291
+
292
+ | Plite | Plate | Notes |
293
+ | --- | --- | --- |
294
+ | `useEditorSelector(selector, options)` | `useEditorSelector(selector, options)` | The options are `equalityFn` and `shouldUpdate` only. The hook follows the editor of the root that holds the caret. |
295
+ | `useEditorState(selector, options)` | `useEditorState(selector, options)` | There is no `deferred` option. |
296
+ | `useEditorSelection`, `useEditorFocused`, `useEditorComposing`, `useEditorReadOnly` | The same names | The calls are the same. Plate reads the selected editing area. |
297
+ | `useOptionalEditorReadOnly()` | `useEditorReadOnly()` | Plate always returns a boolean. |
298
+ | `useEditorHistory(options)` | `useEditorHistory(options)` | The options are the same. |
299
+ | `useElement<MyElement>()` | `useElement(MyPlugin)` | `useElement()` without arguments still returns the nearest element, and throws outside an element component. |
300
+ | `useOptionalElement()` | None | Call `useElement()` inside an element plugin's component. |
301
+ | `useNodeSelector(selector)` | `useElementSelector(selector)` inside an element component | The selector receives the element. Plate has no hook that selects a node by key. |
302
+ | `useTextSelector(selector)` | None | A text plugin component receives its `text` in props. |
303
+ | `useEditorEditableElement()` | `useEditableRef()` | The ref is `null` before mount and does not rerender when the element mounts. `useEditorMounted()` returns a boolean. |
304
+
305
+ ### Types
306
+
307
+ | Plite | Plate | Notes |
308
+ | --- | --- | --- |
309
+ | `EditableProps` | `EditorContentProps` | Plate's `EditableProps` is an internal renderer type. |
310
+ | `PagedEditableProps`, `VirtualizedEditableProps` | `PagedEditorContentProps`, `VirtualizedEditorContentProps` | |
311
+ | `UseEditorOptions` | `CreateEditorOptions` | |
312
+ | `EditorSelectorOptions`, `EditorStateSelectorOptions` | `UseEditorSelectorOptions`, `UseEditorStateOptions` | |
313
+ | `EditorRootProps`, `ValueChangeContext` | The same names | `value` is the whole document value. |
314
+ | `NodeProps` from `plitejs/react` | `NodeProps` from `platejs` | `NodeProps` from `platejs/react` types the props a plugin injects into its node. |
315
+ | `Editor`, `Plugin` | The same names | Plate's take other type parameters, and `Plugin` is the type of a Plate plugin. |
316
+ | `ReactPlugin` | `RuntimeReactPlugin` | |
317
+
318
+ ### DOM
319
+
320
+ `platejs/dom` keeps `ariaKeyShortcuts`, `dataTransferFormats`, `domCommands`,
321
+ `DOMResolutionError`, `isHotkey`, `usesAppleDOMHotkeys` and
322
+ `writeDataTransferFragment`. The other `plitejs/dom` values map as follows.
323
+
324
+ | Plite | Plate | Notes |
325
+ | --- | --- | --- |
326
+ | `DOMEditor.focus(editor)` and the other `DOMEditor` methods | `editor.api.dom.focus()` and the other `editor.api.dom` methods | Drop the editor argument. |
327
+ | `getEditorDOMRoot(editor)` | `editor.api.dom.root()` | |
328
+ | `dom` | None | `createEditor` from `platejs/react` installs Plate's DOM plugin. A headless editor adds `DOMPlugin` from `platejs`. |
329
+ | `getDOMClipboardFormatKey`, `writeDOMFragmentData`, `writeDOMRangeData`, `cleanDOMClipboardContents` | `editor.api.dom.clipboard` and a plugin's `dataTransferFormats` | |
330
+ | `Hotkeys` | `Hotkeys` from `platejs` | Plate's set has other members. |
331
+ | `createCompiledHotkeyMatcher`, `Key` | `isHotkey`, or a plugin's `shortcuts` | |
332
+ | `readDOMSelectionRange`, `writeDOMSelection` | None | `EditorContent` reads and writes the DOM selection. |
333
+ | `isEditor`, `isElement`, `isLeaf`, `isNode`, `isString`, `isText`, `isVoid`, `getElements`, `getNodeDataAttributeKeys`, `keyToDataAttribute` | None | They read Plite's DOM data attributes. `isEditor` from `platejs` is a different function that checks an editor object. |
334
+ | `getSelection`, `getActiveElement`, `getDefaultView`, `isDOMNode`, `isDOMElement`, `isDOMText`, `isDOMSelection`, `hasShadowRoot`, `closestShadowAware`, `containsShadowAware`, `isAfter`, `isBefore`, `normalizeDOMPoint`, `isPlainTextOnlyPaste`, `CAN_USE_DOM`, `isGeckoDOMHost`, `TRIPLE_CLICK` | None | Use the DOM API. |
335
+ | `DOMCoverage`, `isTrackedMutation`, `applyStringDiff`, `mergeStringDiffs`, `normalizeStringDiff`, `normalizePoint`, `normalizeRange`, `targetRange`, `verifyDiffState` | None | `EditorContent` owns DOM coverage, mutation tracking and Android input diffs. |
336
+
337
+ ### Review And Annotations
338
+
339
+ | Plite | Plate | Notes |
340
+ | --- | --- | --- |
341
+ | `authored({ authorId })` from `plitejs/authored` | `AuthoredPlugin` from `platejs/authored` in `plugins` | The author is the editor's `userId`, or the `authorId` of a view from `createEditorView`. |
342
+ | `authoredRecords` | None | `AuthoredPlugin` installs it. |
343
+ | `createAuthoredPlugin` | None | It is Plite's test helper with fixed ids and clock. |
344
+ | `AuthoredPlugin` type | `typeof AuthoredPlugin` | Plate's `AuthoredPlugin` is the plugin value. |
345
+ | `createAnnotationStore` from `plitejs/annotations` | `useAnnotationStore(editor, annotations, options)` from `platejs/react` | Plate has no headless annotation store. The annotation types move to `platejs/react`. |
346
+
246
347
  ## Related
247
348
 
248
349
  - [Editor](/docs/editor) for editor creation options.
@@ -388,7 +388,7 @@ export const LinkInputRulesPlugin = LinkPlugin.configure({
388
388
  ```
389
389
 
390
390
  - `LinkRules.markdown()` handles `[label](https://...)`.
391
- - `LinkRules.autolink({ variant: 'paste' })` turns a pasted URL into a link.
391
+ - `LinkRules.autolink({ variant: 'paste' })` turns a pasted URL into a link. When the media kit's `MediaEmbedRules.autoEmbed({ variant: 'paste' })` is installed, a YouTube, Vimeo, Dailymotion, Youku, Coub or X link pasted alone on an empty line lands as a link. Then an embed of that link goes in above the line, and the line empties, as [Media](/docs/media#input-rules) describes.
392
392
  - `LinkRules.autolink({ variant: 'space' })` detects a URL when you type a trailing space.
393
393
  - `LinkRules.autolink({ variant: 'break' })` detects a URL when you press Enter.
394
394
 
@@ -631,7 +631,7 @@ Matching cannot mutate the editor.
631
631
 
632
632
  | Field | Returns |
633
633
  | ----- | ------- |
634
- | `editor` | A read-only editor projection with `read` and read-only plugin portals |
634
+ | `editor` | A read-only editor projection with `read`, `key` and read-only plugin portals; `editor.key(node)` returns a node's stable key, as the full editor's `editor.key` does |
635
635
  | `isCollapsed` | Whether the selection is collapsed |
636
636
  | `plugin` | The descriptor that owns the rule; use `editor.plugin(plugin).schema` for persisted identity. |
637
637
  | `getBlockEntry()` | The current block's `NodeEntry`, or `undefined` |
@@ -699,7 +699,8 @@ and makes rules harder to compose.
699
699
  An `insertData` rule can declare `followUp` instead of `apply`. A follow-up rule
700
700
  leaves the paste alone and runs after it, as its own undo step. One undo takes
701
701
  back the follow-up's change and keeps the paste. A second undo takes back the
702
- paste when history saved nothing between the two.
702
+ paste when history saved nothing between the two. `MediaEmbedRules.autoEmbed`
703
+ from `platejs/media` is one; see [Media](/docs/media#mediaembedrulesautoembed).
703
704
 
704
705
  ```ts
705
706
  import { defineInputRule, NodeApi } from 'platejs';
@@ -292,7 +292,9 @@ editor.update.highlight.clear({ at: bodyBlock }); // clears one primary-document
292
292
 
293
293
  A call whose targets sit in two roots throws before the method runs.
294
294
  `txSelection` and `txOnly` methods, and a call that passes a function, run in
295
- the caller's root.
295
+ the caller's root. A `txLocate` method called with a node key or live node that
296
+ no root holds does nothing and returns `undefined`, even when the call passes a
297
+ function.
296
298
 
297
299
  ## Declare feature format mappings
298
300
 
@@ -274,18 +274,41 @@ const SyncedBlock = ({ attributes, element, slots }) => (
274
274
  );
275
275
  ```
276
276
 
277
+ Undo and redo keys pressed in an editable move focus to the view that made the
278
+ step, when that view shows another root inside the same `<Editable>`. Type in
279
+ the second of two copies of a synced block, click the page and press Mod+Z.
280
+ Focus goes to the second copy, and the caret goes back to where it was before
281
+ that typing. Focus stays where the key was pressed when the view that made the
282
+ step is gone, hidden or read-only, when that view is outside the `<Editable>`,
283
+ or when the step's selection ran from one view into another. It also stays for
284
+ a step whose plugin history effect settles after the replay, such as creating a
285
+ comment thread. A history control from `useEditorHistory`, an external control
286
+ wired to history and the browser handle's `undo()` never move focus to the view
287
+ that made the step.
288
+
277
289
  A root whose blocks are selected as whole objects, such as a board's shapes,
278
290
  can give focus to an element of its own instead of its editable. Pass
279
- `nodeSelectionFocus`, a ref to that element. That element takes focus when the
280
- editor moves focus into the root, as after an undo or on a call to
281
- `editor.api.dom.focus()`, while there is no selection or a node selection holds
282
- only the root's top-level blocks. It does not take focus while the editor shows
283
- a caret or a text selection, and a click that selects an object in the root
284
- focuses the editable. Keep the element mounted across renders. When the render
285
- that follows a focus call replaces it, focus falls to the page. Unless the
286
- element is a control, such as a button, the editor reads no keys from it, so it
287
- must handle the keys it needs, such as undo and redo through the `onKeyDown` of
288
- `useEditorHistory`.
291
+ `nodeSelectionFocus`, a ref to that element, and give the element
292
+ `contentEditable={false}`. That element takes focus when the editor moves focus
293
+ into the root, as after an undo, on a click that selects an object in the root
294
+ or on a call to `editor.api.dom.focus()`. It takes focus only while no range is
295
+ shown into the root and the root's own selection is none or a node selection of
296
+ its top-level blocks. A node selection the root kept while the caret was in
297
+ another root becomes the selection again once the element holds focus, so a key
298
+ the element handles acts on it. It does not come back when the element's focus
299
+ handler leaves focus on another element, asks for focus elsewhere or changes the
300
+ selection. A focus call made inside an update or a read focuses the editable
301
+ instead. Keep the element mounted across renders. When the render that follows
302
+ a focus call replaces it, focus falls to the page. An element that inherits
303
+ editing runs the editable's own focus handler, which in Firefox moves focus to
304
+ the editable. Unless the element is a control, such as a button, the editor
305
+ reads no keys from it, so it must handle the keys it needs, such as undo and
306
+ redo through the `onKeyDown` of `useEditorHistory`. An undo or redo key leaves
307
+ focus where it was pressed when the view that made the step, or the view where
308
+ the key was pressed, renders inside a slot that passes `nodeSelectionFocus`. So
309
+ an undo pressed in the document of a step made on a board leaves focus and the
310
+ caret in the document. An undo pressed on the board of a step made in the
311
+ document leaves them on the board.
289
312
 
290
313
  ```tsx
291
314
  const Board = ({ attributes, children, slots }) => {
@@ -60,6 +60,11 @@ editor.update.selection.setNodes([imagePath], { mode: 'object' });
60
60
  editor.read.selection.nodeMode(); // 'object'
61
61
  ```
62
62
 
63
+ Press `Escape` to leave a node selection. The editor collapses it to a caret at
64
+ the end of the focus block, or right after a selected object. A menu, toolbar
65
+ or plugin keydown handler that handles `Escape` first keeps the selection, and
66
+ so does a read-only editor.
67
+
63
68
  Use [Editor Methods](/docs/editor-methods) for editor access inside React and
64
69
  [Selection API](/docs/api/selection) for the complete query and
65
70
  validation contracts.
@@ -6,7 +6,7 @@ _Registry item `suggestion-demo`: `npx shadcn@latest add @plate/suggestion-demo`
6
6
 
7
7
  The demo starts in Suggestion mode with a proposed insertion and deletion. Open a paragraph's discussion button to accept or reject its card, or choose **Accept all suggestions** or **Reject all suggestions** in the mode menu, then try undo and redo. Switch to Editing to keep the pending changes visible while ordinary edits apply directly, or type in Suggestion mode to propose an edit.
8
8
 
9
- Typing or pasting inside struck text lands after the pending deletion, and a word confirmed with an input method splits the deletion around it. In Suggestion mode the new text is a proposed insertion of its own; in Editing mode it applies directly. Deleting struck text in Editing mode leaves it to its pending deletion.
9
+ Typing inside struck text, or confirming a word with an input method there, lands at the caret and splits the pending deletion around it. Pasting inside struck text lands after the pending deletion, and typing in a line deleted whole lands at the end of the line before. In Suggestion mode the new text is a proposed insertion of its own; in Editing mode it applies directly. In Editing mode, deleting or typing over a selection that holds another author's whole pending deletion accepts that deletion, as Google Docs does, and one Undo brings both back. A selection that holds only part of the deletion leaves it pending, and so does any edit in a shared room or a Yjs document. Dragging struck text in Suggestion mode lands it as your insertion and leaves its old place struck, as Google Docs does.
10
10
 
11
11
  <PackageInfo>
12
12
 
@@ -303,7 +303,7 @@ const editor = createEditor({
303
303
  editor.plugin(AuthoredPlugin).api.setView({ intent: 'propose' });
304
304
  ```
305
305
 
306
- Marked text and elements expose `data-editor-authored-change`, `data-editor-authored-kind`, `data-editor-authored-author`, `data-editor-authored-groups`, and `data-editor-authored-color`. Each holds a space-separated list, except `color`, which holds the palette slot, 0 to 6, of the card the element paints. A pending deletion has `delete` in its `kind`. Add application styles against these attributes through the plugin's `render.contentAttributes`. Static presets can configure `BaseSuggestionPlugin` with a server-safe attribute object; `SuggestionKit` supplies the live default styles.
306
+ Marked text and elements expose `data-editor-authored-change`, `data-editor-authored-kind`, `data-editor-authored-author`, `data-editor-authored-groups`, and `data-editor-authored-color`. Each holds a space-separated list, except `color`, which holds the palette slot, 0 to 6, of the author whose change the element paints, so each author paints one color whatever card holds the change. A pending deletion has `delete` in its `kind`. Add application styles against these attributes through the plugin's `render.contentAttributes`. Static presets can configure `BaseSuggestionPlugin` with a server-safe attribute object; `SuggestionKit` supplies the live default styles.
307
307
 
308
308
  ## Discussion review
309
309
 
@@ -9,7 +9,7 @@ _Example `basic-nodes-demo` in the Plate repository: `apps/www/src/registry/exam
9
9
  ## Features
10
10
 
11
11
  - **Fixed Toolbar**: Persistent toolbar above the editor's scrollable content
12
- - **Floating Toolbar**: Contextual toolbar that appears on text selection
12
+ - **Floating Toolbar**: Contextual toolbar that appears on text selection, docked above the keyboard on touch screens
13
13
  - **Customizable Buttons**: Add, remove, and reorder toolbar buttons
14
14
  - **Responsive Design**: Adapts to different screen sizes and content
15
15
  - **Plugin Integration**: Uses Plate plugins and copied UI components
@@ -107,6 +107,15 @@ back. A scroll area that does not clip the toolbar does not hide it, such as a
107
107
  wide code block or a static scroll panel when the toolbar is positioned against
108
108
  an element outside the panel.
109
109
 
110
+ On a touch screen, the floating toolbar docks as a bar along the bottom of the
111
+ visible page, above the on-screen keyboard, and shows while the editor has
112
+ focus. A phone opens its own Copy and Paste menu above the selection, and a page
113
+ cannot move that menu, so a toolbar at the selection and that menu would cover
114
+ each other. When the bar would cover the caret, it scrolls the caret above itself. A
115
+ screen counts as touch when its primary pointer is coarse, as the
116
+ `(pointer: coarse)` media query reports; a mouse or trackpad screen keeps the
117
+ floating toolbar at any width.
118
+
110
119
  ### Customizing fixed toolbar buttons
111
120
 
112
121
  The `FixedToolbarButtons` component contains the default set of buttons for the fixed toolbar.
@@ -280,7 +289,7 @@ Plugin that renders a fixed toolbar before the editor scroll container.
280
289
 
281
290
  ### `FloatingToolbarKit`
282
291
 
283
- Plugin that renders a floating toolbar that appears on text selection.
292
+ Plugin that renders a floating toolbar that appears on text selection, or a bar above the keyboard on touch screens.
284
293
 
285
294
  <API name="FloatingToolbarKit">
286
295
  <APIOptions>
@@ -1,6 +1,6 @@
1
- import { st as BasePluginInput, u as Editor } from "../../core-BqR-fEDp.js";
2
- import { n as EditorStaticProps } from "../../PlateStatic-D3Cb-QwH.js";
3
- import { n as DocxComment, r as DocxDiagnostic, t as DocxSource } from "../../source-BGohy8vH.js";
1
+ import { st as BasePluginInput, u as Editor } from "../../core-CQKT9eNc.js";
2
+ import { n as EditorStaticProps } from "../../PlateStatic-DMClx-tH.js";
3
+ import { n as DocxComment, r as DocxDiagnostic, t as DocxSource } from "../../source-D5CyclpX.js";
4
4
  type UnitValue = number | string;
5
5
  type Margins = {
6
6
  bottom?: UnitValue;
@@ -21,4 +21,4 @@ const pixelToPoint = (pixelValue) => HIPToPoint(pixelToHIP(pixelValue));
21
21
  const pointToEIP = (PointValue) => Math.round(PointValue * 8);
22
22
  const pixelToEIP = (pixelValue) => pointToEIP(pixelToPoint(pixelValue));
23
23
  //#endregion
24
- export { EMUToTWIP, HIPToPoint, TWIPToEMU, TWIPToHIP, cmRegex, cmToInch, cmToTWIP, inchRegex, inchToPoint, inchToTWIP, percentageRegex, pixelRegex, pixelToEIP, pixelToEMU, pixelToHIP, pixelToPoint, pixelToTWIP, pointRegex, pointToEIP, pointToHIP, pointToTWIP };
24
+ export { TWIPToEMU, cmRegex, cmToTWIP, inchRegex, inchToTWIP, percentageRegex, pixelRegex, pixelToEIP, pixelToEMU, pixelToHIP, pixelToTWIP, pointRegex, pointToEIP, pointToHIP, pointToTWIP };
@@ -1800,4 +1800,4 @@ const buildDrawing = (inlineOrAnchored, graphicType, attributes) => {
1800
1800
  return drawingFragment;
1801
1801
  };
1802
1802
  //#endregion
1803
- export { REVIEW_RUN_NAMESPACE, buildBold, buildDrawing, buildImage, buildIndentation, buildItalics, buildLineBreak, buildList, buildParagraph, buildTable, buildTextElement, buildUnderline, defineNamedStyles, getImageDimensions, hex3Regex, hex3ToHex, hexRegex, hslRegex, hslToHex, imageToBase64, inheritParagraphStyle, isIndented, isValidUrl, narrowedWidth, quoteScope, rgbRegex, rgbToHex };
1803
+ export { REVIEW_RUN_NAMESPACE, buildBold, buildDrawing, buildImage, buildIndentation, buildItalics, buildLineBreak, buildList, buildParagraph, buildTable, buildTextElement, buildUnderline, defineNamedStyles, imageToBase64, inheritParagraphStyle, isIndented, narrowedWidth, quoteScope };
@@ -1,7 +1,7 @@
1
- import { Fo as PluginReference, Tt as EditorDocumentValue, su as Value } from "../../index-BXjLmx1n-CXk17buG.js";
2
- import { h as EditorApplicationSchema } from "../../htmlTypes-eT2ZGDAj.js";
3
- import "../../core-BqR-fEDp.js";
4
- import { a as DocxImportLimits, i as DocxErrorDiagnostic, n as DocxComment, o as DocxSourceLocation, r as DocxDiagnostic, s as DocxWarningDiagnostic, t as DocxSource } from "../../source-BGohy8vH.js";
1
+ import { Fo as PluginReference, Tt as EditorDocumentValue, su as Value } from "../../index-DHt8nZQ6-NUTahb8N.js";
2
+ import { h as EditorApplicationSchema } from "../../htmlTypes-8IFX0ezP.js";
3
+ import "../../core-CQKT9eNc.js";
4
+ import { a as DocxImportLimits, i as DocxErrorDiagnostic, n as DocxComment, o as DocxSourceLocation, r as DocxDiagnostic, s as DocxWarningDiagnostic, t as DocxSource } from "../../source-D5CyclpX.js";
5
5
  type DocxImportOptions<TRetainSource extends boolean = false> = Readonly<{
6
6
  limits?: Partial<DocxImportLimits>;
7
7
  lossPolicy?: 'allow' | 'reject';
@@ -1,7 +1,7 @@
1
- import { su as Value } from "../../index-BXjLmx1n-CXk17buG.js";
2
- import { a as HtmlEditorSerializeOptions, d as HtmlSerializeResult, f as HtmlSliceParseResult, i as HtmlEditorParseOptions, r as HtmlDocumentParseResult } from "../../htmlTypes-eT2ZGDAj.js";
3
- import { Co as PluginReference, _ as BasePlugin, xo as PluginDependency } from "../../core-BqR-fEDp.js";
4
- import "../../index-DYdObeFQ.js";
1
+ import { su as Value } from "../../index-DHt8nZQ6-NUTahb8N.js";
2
+ import { a as HtmlEditorSerializeOptions, d as HtmlSerializeResult, f as HtmlSliceParseResult, i as HtmlEditorParseOptions, r as HtmlDocumentParseResult } from "../../htmlTypes-8IFX0ezP.js";
3
+ import { Co as PluginReference, _ as BasePlugin, xo as PluginDependency } from "../../core-CQKT9eNc.js";
4
+ import "../../index-DE1Mcccg.js";
5
5
  /** Normalizes Word clipboard payloads before the installed HTML parser runs. */
6
6
  declare const WordPastePlugin: BasePlugin<Readonly<{
7
7
  readonly dependencies: readonly [PluginReference<"html"> & PluginDependency<Readonly<{
@@ -1,2 +1,2 @@
1
- import { A as DataTransferSnapshot, B as domCommands, C as DOMVisualPointOptions, D as DataTransferFormat, E as DataTransferEncodeContext, F as KeyboardEventLike, H as usesAppleDOMHotkeys, I as ScrollIntoViewOptions, L as ScrollIntoViewTarget, M as HotkeyMatchOptions, N as HotkeyPlatform, O as DataTransferFormatPhase, P as HotkeySpec, R as ariaKeyShortcuts, S as DOMVisualPoint, T as DataTransferDiagnostic, U as writeDataTransferFragment, V as isHotkey, _ as DOMRange, b as DOMStaticRange, f as DOMElement, g as DOMPoint, i as DOMClipboardApi, k as DataTransferSchemaClaim, n as ClipboardSliceWrite, p as DOMNode, r as DOMApi, t as ClipboardSliceRead, v as DOMResolutionError, w as DataTransferDecodeContext, x as DOMText, y as DOMSelection, z as dataTransferFormats } from "../index-DShbzec2.js";
1
+ import { A as DataTransferSnapshot, B as domCommands, C as DOMVisualPointOptions, D as DataTransferFormat, E as DataTransferEncodeContext, F as KeyboardEventLike, H as usesAppleDOMHotkeys, I as ScrollIntoViewOptions, L as ScrollIntoViewTarget, M as HotkeyMatchOptions, N as HotkeyPlatform, O as DataTransferFormatPhase, P as HotkeySpec, R as ariaKeyShortcuts, S as DOMVisualPoint, T as DataTransferDiagnostic, U as writeDataTransferFragment, V as isHotkey, _ as DOMRange, b as DOMStaticRange, f as DOMElement, g as DOMPoint, i as DOMClipboardApi, k as DataTransferSchemaClaim, n as ClipboardSliceWrite, p as DOMNode, r as DOMApi, t as ClipboardSliceRead, v as DOMResolutionError, w as DataTransferDecodeContext, x as DOMText, y as DOMSelection, z as dataTransferFormats } from "../index-BcuSI8EM.js";
2
2
  export { type ClipboardSliceRead, type ClipboardSliceWrite, type DOMApi, type DOMClipboardApi, type DOMElement, type DOMNode, type DOMPoint, type DOMRange, DOMResolutionError, type DOMSelection, type DOMStaticRange, type DOMText, type DOMVisualPoint, type DOMVisualPointOptions, type DataTransferDecodeContext, type DataTransferDiagnostic, type DataTransferEncodeContext, type DataTransferFormat, type DataTransferFormatPhase, type DataTransferSchemaClaim, type DataTransferSnapshot, type HotkeyMatchOptions, type HotkeyPlatform, type HotkeySpec, type KeyboardEventLike, type ScrollIntoViewOptions, type ScrollIntoViewTarget, ariaKeyShortcuts, dataTransferFormats, domCommands, isHotkey, usesAppleDOMHotkeys, writeDataTransferFragment };
@@ -1,6 +1,6 @@
1
- import { Ht as EditorJsonValue, ji as ElementOf, ts as PropertyJsonDescriptor } from "../index-BXjLmx1n-CXk17buG.js";
2
- import "../htmlTypes-eT2ZGDAj.js";
3
- import { _ as BasePlugin } from "../core-BqR-fEDp.js";
1
+ import { Ht as EditorJsonValue, ji as ElementOf, ts as PropertyJsonDescriptor } from "../index-DHt8nZQ6-NUTahb8N.js";
2
+ import "../htmlTypes-8IFX0ezP.js";
3
+ import { _ as BasePlugin } from "../core-CQKT9eNc.js";
4
4
  type ExcalidrawElementData = {
5
5
  elements: readonly EditorJsonValue[];
6
6
  files?: Readonly<Record<string, EditorJsonValue>>;
@@ -1,6 +1,6 @@
1
- import { Ht as EditorJsonValue, ts as PropertyJsonDescriptor } from "../../index-BXjLmx1n-CXk17buG.js";
2
- import "../../htmlTypes-eT2ZGDAj.js";
3
- import { At as Plugin } from "../../index-DPowErHa.js";
1
+ import { Ht as EditorJsonValue, ts as PropertyJsonDescriptor } from "../../index-DHt8nZQ6-NUTahb8N.js";
2
+ import "../../htmlTypes-8IFX0ezP.js";
3
+ import { At as Plugin } from "../../index-BbsVGwn8.js";
4
4
  import { ExcalidrawImperativeAPI } from "@excalidraw/excalidraw/types";
5
5
  declare const ExcalidrawPlugin: Plugin<Readonly<{}> & Readonly<{
6
6
  name: "excalidraw";
package/dist/facade.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { ContentSlice, DocumentChange, EditorSchemaValidationError, ElementApi, NodeApi, PathApi, PointApi, RangeApi, SelectionApi, TextApi, createEditor, defineEditorSchema, definePlugin as defineRuntimePlugin, definePluginPoint, editorCommands, editorReads, getEditorRuntimeOwner, locateAt, property, readEditorSelection, schema, target, transfer, txLocate, txSelection } from "plitejs";
2
- import { EDITOR_DOCUMENT_FIELDS as EDITOR_DOCUMENT_FIELDS$1, EditorRefusalError, MAIN_ROOT_KEY, afterActiveTransactionEnds, assertDetachedSelectionSupported, assertEditorDocumentContainers, attachTransactionSpecAfterCommit, canPlaceBlocksAtPath, canonicalRecordJson, claimsHistoryReplay, completePersistedDocumentFields, configureAuthoredView, containsCompleteEditorSchema, createAuthoredEditorView, createDetachedEditorSchema as createDetachedEditorSchema$1, createEditorOwner, fitSlicePlacements, getActiveCommandEditor, getActiveEditorTransaction, getActiveEditorUpdateId, getActiveEditorUpdateTags, getAuthoredUpdateView, getCaretOwner, getCarriedCaretEditor, getCompiledEditorSchema as getCompiledEditorSchema$1, getCompiledEditorSchemaFromApi, getCompiledPropertyCandidates, getDocumentValueNode, getEditorAuthoredDocumentCapability as getEditorAuthoredDocumentCapability$1, getEditorCommitNode, getEditorCommitSnapshot, getEditorCommitValue, getEditorDocumentShapeIssueMessage, getEditorRuntimeRootKeys, getEditorUpdateRoot, getInstalledPlugin, getPluginContributions, getReaderRange, getRecordSetVersion, getSchemaElementSourceReference, getSelectionDOMRange, getSnapshotVersion, getTextSearchScope, getValueRecords, getViewAuthor, getViewPresentation as getViewPresentation$1, holdsCaret, isAuthorId, isDocumentView, isEditorPublishingCommit, isEnvelopeInput as isEnvelopeInput$1, isPlugin as isRuntimePlugin, landNodePropertiesAt, mapDetachedSelectionThroughChange, mapSemanticUpdateMethodArguments, markRootViewUsed, normalizeSetValues, notifyObservers, placeElementAt, preserveCompiledSchemaPropertyIdentity, projectEditorView, readAuthoredView, readCaretViewIn, readDocumentRange, readDocumentRecord as readDocumentRecord$1, readEditorCommitHistoryEntry, readElementById, readElementPropertyWrites, readPersistedEnvelope as readPersistedEnvelope$1, readRecord, readRootEntries, readRootViewUse, readShownDocument, readShownPreview, readShownRecords, readShownViewUse, readStoredEditorDocument, readViewPage, recordSetChanges, recordSetIds, registerEditorTransactionGuard, rejectEditorRecord, repairEditorValue, reportEditorLifecycleError as reportEditorLifecycleError$1, runEditorObserver, sameResult, scheduleAfterCommitNotification, setEditorStateViewTransform, setEditorTransactionViewTransform, setSelectionAsView, shouldMergeNodesRemovePrevNode, snapshotEditorJsonValue, subscribeCaretTarget, subscribeEditorViewState, subscribeShownViewUse, txStored, vetoesWrite, withDocumentViewRead, withEditorUpdateRootScope, withMountedPresentation, withStoredAuthoredRead, withTransactionSpecDraftRead } from "plitejs/internal";
3
- export { ContentSlice, DocumentChange, EDITOR_DOCUMENT_FIELDS$1 as EDITOR_DOCUMENT_FIELDS, EditorRefusalError, EditorSchemaValidationError, ElementApi, MAIN_ROOT_KEY, NodeApi, PathApi, PointApi, RangeApi, SelectionApi, TextApi, afterActiveTransactionEnds, assertDetachedSelectionSupported, assertEditorDocumentContainers, attachTransactionSpecAfterCommit, canPlaceBlocksAtPath, canonicalRecordJson, claimsHistoryReplay, completePersistedDocumentFields, configureAuthoredView, containsCompleteEditorSchema, createAuthoredEditorView, createDetachedEditorSchema$1 as createDetachedEditorSchema, createEditor, createEditorOwner, defineEditorSchema, definePluginPoint, defineRuntimePlugin, editorCommands, editorReads, fitSlicePlacements, getActiveCommandEditor, getActiveEditorTransaction, getActiveEditorUpdateId, getActiveEditorUpdateTags, getAuthoredUpdateView, getCaretOwner, getCarriedCaretEditor, getCompiledEditorSchema$1 as getCompiledEditorSchema, getCompiledEditorSchemaFromApi, getCompiledPropertyCandidates, getDocumentValueNode, getEditorAuthoredDocumentCapability$1 as getEditorAuthoredDocumentCapability, getEditorCommitNode, getEditorCommitSnapshot, getEditorCommitValue, getEditorDocumentShapeIssueMessage, getEditorRuntimeOwner, getEditorRuntimeRootKeys, getEditorUpdateRoot, getInstalledPlugin, getPluginContributions, getReaderRange, getRecordSetVersion, getSchemaElementSourceReference, getSelectionDOMRange, getSnapshotVersion, getTextSearchScope, getValueRecords, getViewAuthor, getViewPresentation$1 as getViewPresentation, holdsCaret, isAuthorId, isDocumentView, isEditorPublishingCommit, isEnvelopeInput$1 as isEnvelopeInput, isRuntimePlugin, landNodePropertiesAt, locateAt, mapDetachedSelectionThroughChange, mapSemanticUpdateMethodArguments, markRootViewUsed, normalizeSetValues, notifyObservers, placeElementAt, preserveCompiledSchemaPropertyIdentity, projectEditorView, property, readAuthoredView, readCaretViewIn, readDocumentRange, readDocumentRecord$1 as readDocumentRecord, readEditorCommitHistoryEntry, readEditorSelection, readElementById, readElementPropertyWrites, readPersistedEnvelope$1 as readPersistedEnvelope, readRecord, readRootEntries, readRootViewUse, readShownDocument, readShownPreview, readShownRecords, readShownViewUse, readStoredEditorDocument, readViewPage, recordSetChanges, recordSetIds, registerEditorTransactionGuard, rejectEditorRecord, repairEditorValue, reportEditorLifecycleError$1 as reportEditorLifecycleError, runEditorObserver, sameResult, scheduleAfterCommitNotification, schema, setEditorStateViewTransform, setEditorTransactionViewTransform, setSelectionAsView, shouldMergeNodesRemovePrevNode, snapshotEditorJsonValue, subscribeCaretTarget, subscribeEditorViewState, subscribeShownViewUse, target, transfer, txLocate, txSelection, txStored, vetoesWrite, withDocumentViewRead, withEditorUpdateRootScope, withMountedPresentation, withStoredAuthoredRead, withTransactionSpecDraftRead };
2
+ import { EDITOR_DOCUMENT_FIELDS as EDITOR_DOCUMENT_FIELDS$1, EditorRefusalError, MAIN_ROOT_KEY, afterActiveTransactionEnds, assertDetachedSelectionSupported, assertEditorDocumentContainers, attachTransactionSpecAfterCommit, canPlaceBlocksAtPath, canonicalRecordJson, claimsHistoryReplay, completePersistedDocumentFields, configureAuthoredView, containsCompleteEditorSchema, createAuthoredEditorView, createDetachedEditorSchema as createDetachedEditorSchema$1, createEditorOwner, fitSlicePlacements, getActiveCommandEditor, getActiveEditorTransaction, getActiveEditorUpdateId, getActiveEditorUpdateTags, getAnchorRuntimeId, getAuthoredUpdateView, getCaretOwner, getCarriedCaretEditor, getCompiledEditorSchema as getCompiledEditorSchema$1, getCompiledEditorSchemaFromApi, getCompiledPropertyCandidates, getDocumentValueNode, getEditorAuthoredDocumentCapability as getEditorAuthoredDocumentCapability$1, getEditorCommitNode, getEditorCommitSnapshot, getEditorCommitValue, getEditorDocumentShapeIssueMessage, getEditorRuntimeRootKeys, getEditorUpdateRoot, getInstalledPlugin, getMutationVersion, getPluginContributions, getReaderRange, getRecordSetVersion, getSchemaElementSourceReference, getSelectionDOMRange, getSnapshotVersion, getTextSearchScope, getValueRecords, getViewAuthor, getViewPresentation as getViewPresentation$1, holdsCaret, isAuthorId, isDocumentView, isEditorPublishingCommit, isEnvelopeInput as isEnvelopeInput$1, isPlugin as isRuntimePlugin, landNodePropertiesAt, mapDetachedSelectionThroughChange, mapSemanticUpdateMethodArguments, markRootViewUsed, normalizeSetValues, notifyObservers, placeElementAt, preserveCompiledSchemaPropertyIdentity, projectEditorView, readAuthoredView, readCaretViewIn, readDocumentRange, readDocumentRecord as readDocumentRecord$1, readEditorCommitHistoryEntry, readElementById, readElementPropertyWrites, readPersistedEnvelope as readPersistedEnvelope$1, readRecord, readRootEntries, readRootViewUse, readShownDocument, readShownPreview, readShownRecords, readShownViewUse, readStoredEditorDocument, readViewPage, recordSetChanges, recordSetIds, registerEditorTransactionGuard, rejectEditorRecord, repairEditorValue, reportEditorLifecycleError as reportEditorLifecycleError$1, restoreAnchor, runEditorObserver, sameResult, scheduleAfterCommitNotification, setEditorStateViewTransform, setEditorTransactionViewTransform, setSelectionAsView, shouldMergeNodesRemovePrevNode, snapshotEditorJsonValue, subscribeCaretTarget, subscribeEditorViewState, subscribeShownViewUse, txStored, vetoesWrite, withDocumentViewRead, withEditorUpdateRootScope, withMountedPresentation, withStoredAuthoredRead, withTransactionSpecDraftRead } from "plitejs/internal";
3
+ export { ContentSlice, DocumentChange, EDITOR_DOCUMENT_FIELDS$1 as EDITOR_DOCUMENT_FIELDS, EditorRefusalError, EditorSchemaValidationError, ElementApi, MAIN_ROOT_KEY, NodeApi, PathApi, PointApi, RangeApi, SelectionApi, TextApi, afterActiveTransactionEnds, assertDetachedSelectionSupported, assertEditorDocumentContainers, attachTransactionSpecAfterCommit, canPlaceBlocksAtPath, canonicalRecordJson, claimsHistoryReplay, completePersistedDocumentFields, configureAuthoredView, containsCompleteEditorSchema, createAuthoredEditorView, createDetachedEditorSchema$1 as createDetachedEditorSchema, createEditor, createEditorOwner, defineEditorSchema, definePluginPoint, defineRuntimePlugin, editorCommands, editorReads, fitSlicePlacements, getActiveCommandEditor, getActiveEditorTransaction, getActiveEditorUpdateId, getActiveEditorUpdateTags, getAnchorRuntimeId, getAuthoredUpdateView, getCaretOwner, getCarriedCaretEditor, getCompiledEditorSchema$1 as getCompiledEditorSchema, getCompiledEditorSchemaFromApi, getCompiledPropertyCandidates, getDocumentValueNode, getEditorAuthoredDocumentCapability$1 as getEditorAuthoredDocumentCapability, getEditorCommitNode, getEditorCommitSnapshot, getEditorCommitValue, getEditorDocumentShapeIssueMessage, getEditorRuntimeOwner, getEditorRuntimeRootKeys, getEditorUpdateRoot, getInstalledPlugin, getMutationVersion, getPluginContributions, getReaderRange, getRecordSetVersion, getSchemaElementSourceReference, getSelectionDOMRange, getSnapshotVersion, getTextSearchScope, getValueRecords, getViewAuthor, getViewPresentation$1 as getViewPresentation, holdsCaret, isAuthorId, isDocumentView, isEditorPublishingCommit, isEnvelopeInput$1 as isEnvelopeInput, isRuntimePlugin, landNodePropertiesAt, locateAt, mapDetachedSelectionThroughChange, mapSemanticUpdateMethodArguments, markRootViewUsed, normalizeSetValues, notifyObservers, placeElementAt, preserveCompiledSchemaPropertyIdentity, projectEditorView, property, readAuthoredView, readCaretViewIn, readDocumentRange, readDocumentRecord$1 as readDocumentRecord, readEditorCommitHistoryEntry, readEditorSelection, readElementById, readElementPropertyWrites, readPersistedEnvelope$1 as readPersistedEnvelope, readRecord, readRootEntries, readRootViewUse, readShownDocument, readShownPreview, readShownRecords, readShownViewUse, readStoredEditorDocument, readViewPage, recordSetChanges, recordSetIds, registerEditorTransactionGuard, rejectEditorRecord, repairEditorValue, reportEditorLifecycleError$1 as reportEditorLifecycleError, restoreAnchor, runEditorObserver, sameResult, scheduleAfterCommitNotification, schema, setEditorStateViewTransform, setEditorTransactionViewTransform, setSelectionAsView, shouldMergeNodesRemovePrevNode, snapshotEditorJsonValue, subscribeCaretTarget, subscribeEditorViewState, subscribeShownViewUse, target, transfer, txLocate, txSelection, txStored, vetoesWrite, withDocumentViewRead, withEditorUpdateRootScope, withMountedPresentation, withStoredAuthoredRead, withTransactionSpecDraftRead };
@@ -1,2 +1,2 @@
1
- import { A as BoardShapeEntry, C as BoardArrowEnd, D as BoardArrowEntry, F as BoardPlace, I as BoardRestackDirection, M as BoardShapePlace, O as BoardFrameEntry, R as BoardSize, S as BoardArrowAnchor, T as BoardArrowSide, _ as BaseBoardFramePlugin, a as BoardElement, b as BoardArrowElement, d as BoardNoteElement, f as BaseBoardImagePlugin, g as BoardGeoElement, h as BoardGeo, i as BoardDefinition, j as BoardFramePlace, k as BoardMemberEntry, m as BaseBoardGeoPlugin, n as BoardStrokeElement, p as BoardImageElement, r as BaseBoardPlugin, s as BoardStrokePath, t as BaseBoardStrokePlugin, u as BaseBoardNotePlugin, v as BoardFrameElement, w as BoardArrowEnds, x as BoardArrowEndInput, y as BaseBoardArrowPlugin, z as defineBoardShape } from "../../index-Ca48r1ng.js";
1
+ import { A as BoardShapeEntry, C as BoardArrowEnd, D as BoardArrowEntry, F as BoardPlace, I as BoardRestackDirection, M as BoardShapePlace, O as BoardFrameEntry, R as BoardSize, S as BoardArrowAnchor, T as BoardArrowSide, _ as BaseBoardFramePlugin, a as BoardElement, b as BoardArrowElement, d as BoardNoteElement, f as BaseBoardImagePlugin, g as BoardGeoElement, h as BoardGeo, i as BoardDefinition, j as BoardFramePlace, k as BoardMemberEntry, m as BaseBoardGeoPlugin, n as BoardStrokeElement, p as BoardImageElement, r as BaseBoardPlugin, s as BoardStrokePath, t as BaseBoardStrokePlugin, u as BaseBoardNotePlugin, v as BoardFrameElement, w as BoardArrowEnds, x as BoardArrowEndInput, y as BaseBoardArrowPlugin, z as defineBoardShape } from "../../index-Dh7pWHZo.js";
2
2
  export { BaseBoardArrowPlugin, BaseBoardFramePlugin, BaseBoardGeoPlugin, BaseBoardImagePlugin, BaseBoardNotePlugin, BaseBoardPlugin, BaseBoardStrokePlugin, type BoardArrowAnchor, BoardArrowElement, type BoardArrowEnd, BoardArrowEndInput, type BoardArrowEnds, type BoardArrowEntry, type BoardArrowSide, BoardDefinition, BoardElement, BoardFrameElement, type BoardFrameEntry, type BoardFramePlace, BoardGeo, BoardGeoElement, BoardImageElement, type BoardMemberEntry, BoardNoteElement, type BoardPlace, type BoardRestackDirection, type BoardShapeEntry, type BoardShapePlace, type BoardSize, BoardStrokeElement, type BoardStrokePath, defineBoardShape };
@@ -190,4 +190,4 @@ const defineBoardShape = (name, { properties, size, styles }) => {
190
190
  }).extend(boardShapeStage(size));
191
191
  };
192
192
  //#endregion
193
- export { BOARD_GEOS, BOARD_GEO_DEFAULT, BOARD_GEO_SIZE, BOARD_GEO_TYPE, BOARD_NOTE_SIZE, BOARD_SHAPES_SLOT, appendBoardMember, boardShapesOf, boardShapesRootOf, defineBoardShape, definedProps, isBoardGeo, isBoardPlace, isBoardSize, isStackingKey, restackKeys, shapeSelectionMode, stackingKeyAboveLayer, stackingKeysBetween, topKeyInLayer };
193
+ export { BOARD_GEOS, BOARD_GEO_DEFAULT, BOARD_GEO_SIZE, BOARD_GEO_TYPE, BOARD_NOTE_SIZE, BOARD_SHAPES_SLOT, appendBoardMember, boardShapesOf, boardShapesRootOf, defineBoardShape, definedProps, isBoardGeo, isBoardPlace, isBoardSize, isStackingKey, restackKeys, shapeSelectionMode, stackingKeyAboveLayer, stackingKeysBetween };
@@ -1,6 +1,6 @@
1
- import { Ht as EditorJsonValue, fs as PropertyValueOptions, ji as ElementOf, ss as PropertyStringDescriptor } from "../../index-BXjLmx1n-CXk17buG.js";
2
- import "../../htmlTypes-eT2ZGDAj.js";
3
- import { _ as BasePlugin } from "../../core-BqR-fEDp.js";
1
+ import { Ht as EditorJsonValue, fs as PropertyValueOptions, ji as ElementOf, ss as PropertyStringDescriptor } from "../../index-DHt8nZQ6-NUTahb8N.js";
2
+ import "../../htmlTypes-8IFX0ezP.js";
3
+ import { _ as BasePlugin } from "../../core-CQKT9eNc.js";
4
4
  declare const BaseCalloutPlugin: BasePlugin<Readonly<{
5
5
  formats: true;
6
6
  rules: true;