platejs 54.0.0-beta.2 → 54.0.0-beta.4

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 (255) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +56 -0
  3. package/dist/{AIChatRequestContext-BMVWhfPV.d.ts → AIChatRequestContext-DrUahdTc.d.ts} +2 -2
  4. package/dist/{BaseSuggestionPlugin-DBl3fqnm.d.ts → BaseSuggestionPlugin-_7Ka6nY3.d.ts} +7 -3
  5. package/dist/{PlateStatic-DhNv2ejp.d.ts → PlateStatic-D3Cb-QwH.d.ts} +7 -7
  6. package/dist/ai/index.d.ts +1 -1
  7. package/dist/ai/react/AIChatPlugin.js +113 -78
  8. package/dist/ai/react/CopilotPlugin.js +1 -1
  9. package/dist/ai/react/index.d.ts +23 -16
  10. package/dist/authored/index.d.ts +4 -4
  11. package/dist/code-block/codemirror/createCodeMirrorAdapter.js +12 -9
  12. package/dist/code-block/codemirror/index.d.ts +1 -1
  13. package/dist/{combobox-DkBGgyd3.d.ts → combobox-Dr0OYZIE.d.ts} +2 -2
  14. package/dist/{comparison-types-CYnJ35qU.d.ts → comparison-types-DdwE6mYq-BogsHoUO.d.ts} +10 -2
  15. package/dist/compiler/index.d.ts +2 -2
  16. package/dist/{core-BJG8l_mk.d.ts → core-BqR-fEDp.d.ts} +493 -116
  17. package/dist/diff/index.d.ts +2 -2
  18. package/dist/docs/ai.md +4 -3
  19. package/dist/docs/api/core/plate-components.md +0 -19
  20. package/dist/docs/api/core/plate-controller.md +5 -3
  21. package/dist/docs/api/core/plate-plugin.md +3 -0
  22. package/dist/docs/api/core/plate-store.md +3 -3
  23. package/dist/docs/api/core.md +45 -5
  24. package/dist/docs/api/dom.md +11 -4
  25. package/dist/docs/api/editor-transforms.md +2 -1
  26. package/dist/docs/api/react-hooks.md +45 -13
  27. package/dist/docs/authored-changes.md +9 -4
  28. package/dist/docs/basic-blocks.md +42 -29
  29. package/dist/docs/block-placeholder.md +4 -2
  30. package/dist/docs/blockquote.md +5 -3
  31. package/dist/docs/board.md +118 -10
  32. package/dist/docs/code-block.md +47 -0
  33. package/dist/docs/comment.md +2 -2
  34. package/dist/docs/discussion.md +1 -1
  35. package/dist/docs/document-model.md +15 -3
  36. package/dist/docs/docx.md +1 -1
  37. package/dist/docs/dom-coverage.md +5 -0
  38. package/dist/docs/editor.md +50 -4
  39. package/dist/docs/examples/editable-voids.md +2 -3
  40. package/dist/docs/external-text.md +2 -0
  41. package/dist/docs/field.md +370 -0
  42. package/dist/docs/find.md +9 -6
  43. package/dist/docs/form.md +2 -0
  44. package/dist/docs/heading.md +6 -0
  45. package/dist/docs/installation/manual.md +0 -4
  46. package/dist/docs/link.md +3 -3
  47. package/dist/docs/llms.txt +4 -2
  48. package/dist/docs/markdown.md +270 -14
  49. package/dist/docs/plugin-components.md +13 -10
  50. package/dist/docs/plugin-input-rules.md +66 -15
  51. package/dist/docs/prompt-editor.md +205 -0
  52. package/dist/docs/roots.md +8 -6
  53. package/dist/docs/rtl.md +6 -4
  54. package/dist/docs/selection.md +7 -4
  55. package/dist/docs/suggestion.md +1 -1
  56. package/dist/docs/toolbar.md +26 -30
  57. package/dist/docs/upload.md +106 -17
  58. package/dist/docx/export/index.d.ts +3 -3
  59. package/dist/docx/export/lib/docxStaticComponents.js +12 -2
  60. package/dist/docx/export/lib/exportDocx.js +46 -17
  61. package/dist/docx/export/lib/internal/xml-builder.js +11 -16
  62. package/dist/docx/export/lib/reviewPart.js +1 -1
  63. package/dist/docx/export/lib/reviewProjection.js +52 -10
  64. package/dist/docx/import/index.d.ts +4 -4
  65. package/dist/docx/paste/index.d.ts +4 -4
  66. package/dist/dom/index.d.ts +1 -6
  67. package/dist/dom/plite-dom.internal.js +2 -2
  68. package/dist/excalidraw/index.d.ts +3 -2
  69. package/dist/excalidraw/react/index.d.ts +3 -2
  70. package/dist/facade.js +2 -2
  71. package/dist/features/basic-nodes/lib/BaseBlockPlugins.js +13 -5
  72. package/dist/features/basic-nodes/lib/BaseHeadingPlugins.js +32 -10
  73. package/dist/features/board/index.d.ts +2 -2
  74. package/dist/features/board/lib/BaseBoardPlugin.js +14 -1
  75. package/dist/features/board/lib/boardStroke.internal.js +13 -1
  76. package/dist/features/board/lib/boardTypes.internal.js +16 -0
  77. package/dist/features/callout/index.d.ts +3 -2
  78. package/dist/features/code-block/lib/BaseCodeBlockPlugin.js +14 -5
  79. package/dist/features/combobox/index.d.ts +2 -2
  80. package/dist/features/comments/BaseCommentsPlugin.js +33 -17
  81. package/dist/features/comments/index.d.ts +1 -1
  82. package/dist/features/date/index.d.ts +3 -2
  83. package/dist/features/details/index.d.ts +3 -2
  84. package/dist/features/details/lib/BaseDetailsPlugin.js +25 -12
  85. package/dist/features/field/index.d.ts +2 -0
  86. package/dist/features/field/index.js +4 -0
  87. package/dist/features/field/lib/BaseFieldPlugin.js +360 -0
  88. package/dist/features/field/lib/applyFieldValues.js +188 -0
  89. package/dist/features/field/lib/fieldRules.internal.js +204 -0
  90. package/dist/features/find/index.d.ts +3 -2
  91. package/dist/features/footnote/index.d.ts +1 -1
  92. package/dist/features/ink/index.d.ts +1 -1
  93. package/dist/features/ink/lib/BaseInkPlugin.js +126 -103
  94. package/dist/features/ink/lib/inkCodec.internal.js +130 -0
  95. package/dist/features/ink/lib/inkGone.internal.js +229 -48
  96. package/dist/features/ink/lib/inkPlaces.internal.js +534 -64
  97. package/dist/features/layout/index.d.ts +1 -1
  98. package/dist/features/link/lib/BaseLinkPlugin.js +6 -4
  99. package/dist/features/lint/index.d.ts +3 -2
  100. package/dist/features/media/index.d.ts +2 -2
  101. package/dist/features/media/index.js +2 -2
  102. package/dist/features/media/lib/media/parseMediaUrl.js +11 -1
  103. package/dist/features/media/lib/media-embed/BaseMediaEmbedPlugin.js +206 -4
  104. package/dist/features/mention/index.d.ts +5 -4
  105. package/dist/features/suggestion/index.d.ts +1 -1
  106. package/dist/features/table/index.d.ts +1 -1
  107. package/dist/features/table/lib/BaseTablePlugin.js +64 -15
  108. package/dist/features/table/lib/internal/selection.js +4 -2
  109. package/dist/features/toc/index.d.ts +1 -1
  110. package/dist/features/upload/index.d.ts +2 -2
  111. package/dist/features/upload/lib/BaseUploadPlugin.js +464 -250
  112. package/dist/history/index.d.ts +2 -2
  113. package/dist/html/index.d.ts +3 -3
  114. package/dist/html/server/index.d.ts +1 -1
  115. package/dist/{htmlTypes-DjeFG3P8.d.ts → htmlTypes-eT2ZGDAj.d.ts} +2 -31
  116. package/dist/hyperscript/index.d.ts +1 -1
  117. package/dist/{index-DzD6BIFJ.d.ts → index-B33E1CRJ.d.ts} +295 -6
  118. package/dist/{index-Cl77E9yr.d.ts → index-B7moSod7.d.ts} +2 -2
  119. package/dist/{index-hsC_sOn2.d.ts → index-B8-5Sr7I.d.ts} +35 -5
  120. package/dist/{index-BiQerPJS.d.ts → index-B8QJDAmG.d.ts} +2 -2
  121. package/dist/{index-BBKGrsG3.d.ts → index-BTx5oK7k.d.ts} +1 -1
  122. package/dist/{index-iaZOhA76.d.ts → index-BWPcE4ac-Cto_IsNs.d.ts} +7 -1
  123. package/dist/{index-BU6k1Aev.d.ts → index-BXjLmx1n-CXk17buG.d.ts} +4781 -4584
  124. package/dist/{index-kLKMc-pI.d.ts → index-BXwU9QH6.d.ts} +2 -2
  125. package/dist/{index-DTgaSxKr.d.ts → index-BkwR-5hH.d.ts} +40 -4
  126. package/dist/{index-Bq3sdm3S.d.ts → index-BsV2McRr.d.ts} +5 -4
  127. package/dist/index-C9Fu-P4E.d.ts +773 -0
  128. package/dist/{index-D5W-p9bS.d.ts → index-Ca48r1ng.d.ts} +49 -4
  129. package/dist/{index-CcZbqPqk.d.ts → index-Cob_iBdu.d.ts} +116 -41
  130. package/dist/{index-Bxfvicyy.d.ts → index-CpY7Xnxw.d.ts} +4 -3
  131. package/dist/{index-BkR7-GLI.d.ts → index-DNQXzU-X.d.ts} +2 -2
  132. package/dist/{index-D1CFXA-i.d.ts → index-DPowErHa.d.ts} +471 -141
  133. package/dist/{index-DaM37gF6.d.ts → index-DShbzec2.d.ts} +38 -23
  134. package/dist/{index-DC_MNGyu.d.ts → index-DYdObeFQ.d.ts} +3 -3
  135. package/dist/{index-Bc2Yg_2j.d.ts → index-Dq3Jlj8O-BJ6NxZm0.d.ts} +2 -2
  136. package/dist/{index-CT7miqQN.d.ts → index-DwWQVwQt.d.ts} +29 -11
  137. package/dist/{index-xdmCBvlT.d.ts → index-JWgwL5l3.d.ts} +5 -2
  138. package/dist/{index-DLA2DUR2.d.ts → index-M781pyx9.d.ts} +4 -3
  139. package/dist/{index-DdIRduDG.d.ts → index-d7io3MzC.d.ts} +3 -2
  140. package/dist/index.d.ts +4 -4
  141. package/dist/{react/internal → internal}/penStroke.internal.js +1 -1
  142. package/dist/internal/plugin/OverridePlugin.js +101 -119
  143. package/dist/internal/plugin/collectPlateNodeMappings.js +5 -1
  144. package/dist/internal/plugin/pastedUploadFiles.js +4 -0
  145. package/dist/internal/plugin/resolvePlugin.js +1 -1
  146. package/dist/internal/plugin/resolvePlugins.js +3 -0
  147. package/dist/internal/plugin/uploadDrafts.js +6 -0
  148. package/dist/internal/utils/mergePlugins.js +1 -0
  149. package/dist/lib/plugins/element-id/ElementIdPlugin.js +14 -18
  150. package/dist/lib/plugins/html/HtmlPlugin.js +9 -0
  151. package/dist/lib/plugins/html/htmlSafety.js +1 -1
  152. package/dist/lib/plugins/input-rules/InputRulesPlugin.js +77 -28
  153. package/dist/lib/plugins/input-rules/inputRuleVeto.internal.js +16 -0
  154. package/dist/markdown/index.d.ts +2 -2
  155. package/dist/markdown/index.js +3 -1
  156. package/dist/markdown/lib/MarkdownPlugin.js +14 -11
  157. package/dist/markdown/lib/RawHtmlPlugin.js +26 -0
  158. package/dist/markdown/lib/deserializer/mdastToSlate.js +12 -2
  159. package/dist/markdown/lib/internal/markdownConversion.js +776 -74
  160. package/dist/markdown/lib/internal/markdownDiagnostics.js +18 -7
  161. package/dist/markdown/lib/internal/markdownFootnoteWriter.js +35 -0
  162. package/dist/markdown/lib/internal/markdownFrontmatter.js +102 -0
  163. package/dist/markdown/lib/internal/markdownIntrinsics.js +125 -43
  164. package/dist/markdown/lib/internal/markdownLine.js +5 -3
  165. package/dist/markdown/lib/internal/markdownMappings.js +19 -7
  166. package/dist/markdown/lib/internal/markdownOpenTail.js +381 -0
  167. package/dist/markdown/lib/internal/markdownRawHtml.js +353 -0
  168. package/dist/markdown/lib/internal/markdownSegments.js +57 -48
  169. package/dist/markdown/lib/internal/markdownTags.js +29 -9
  170. package/dist/markdown/lib/serializer/convertNodesSerialize.js +10 -8
  171. package/dist/markdown/lib/serializer/convertPhrasingSerialize.js +226 -0
  172. package/dist/markdown/lib/serializer/listToMdastTree.js +2 -0
  173. package/dist/math/index.d.ts +3 -2
  174. package/dist/math/react/index.d.ts +4 -3
  175. package/dist/migrations/index.d.ts +3 -3
  176. package/dist/migrations/migratePlateV54.js +4 -6
  177. package/dist/migrations/migratePlateV54RetiredMarks.internal.js +23 -8
  178. package/dist/migrations/migratePlateV54Suggestions.internal.js +2 -2
  179. package/dist/migrations/v53-manifest.internal.js +4 -0
  180. package/dist/pagination/index.d.ts +1 -1
  181. package/dist/pagination/react/index.d.ts +4 -4
  182. package/dist/react/components/EditorContentView.internal.js +42 -23
  183. package/dist/react/components/EditorProvider.js +5 -5
  184. package/dist/react/components/Plate.js +102 -128
  185. package/dist/react/components/PlateContainer.js +40 -32
  186. package/dist/react/components/PlateController.js +28 -16
  187. package/dist/react/components/PlateRoot.internal.js +3 -2
  188. package/dist/react/core.js +4 -4
  189. package/dist/react/features/board/BoardSurface.js +116 -87
  190. package/dist/react/features/board/boardClipboard.internal.js +15 -5
  191. package/dist/react/features/board/boardExport.internal.js +470 -0
  192. package/dist/react/features/board/boardGesture.internal.js +6 -3
  193. package/dist/react/features/board/boardIndex.internal.js +7 -18
  194. package/dist/react/features/board/boardPictureStyles.internal.js +415 -0
  195. package/dist/react/features/board/boardPictures.internal.js +19 -13
  196. package/dist/react/features/board/boardView.internal.js +190 -50
  197. package/dist/react/features/board/boardVoice.internal.js +10 -11
  198. package/dist/react/features/board/index.d.ts +108 -18
  199. package/dist/react/features/callout/index.d.ts +3 -2
  200. package/dist/react/features/combobox/index.d.ts +8 -8
  201. package/dist/react/features/comments/index.d.ts +6 -5
  202. package/dist/react/features/date/index.d.ts +4 -3
  203. package/dist/react/features/details/index.d.ts +4 -3
  204. package/dist/react/features/field/FieldPlugin.js +35 -0
  205. package/dist/react/features/field/index.d.ts +315 -0
  206. package/dist/react/features/field/index.js +2 -0
  207. package/dist/react/features/footnote/index.d.ts +7 -6
  208. package/dist/react/features/format-painter/index.d.ts +4 -3
  209. package/dist/react/features/ink/InkContent.js +313 -0
  210. package/dist/react/features/ink/index.d.ts +57 -33
  211. package/dist/react/features/ink/index.js +2 -2
  212. package/dist/react/features/ink/inkCapture.internal.js +39 -17
  213. package/dist/react/features/ink/inkInput.internal.js +1 -1
  214. package/dist/react/features/ink/inkLayout.internal.js +6 -3
  215. package/dist/react/features/ink/inkPaint.internal.js +78 -2
  216. package/dist/react/features/ink/inkPlacement.internal.js +332 -104
  217. package/dist/react/features/ink/inkWatch.internal.js +7 -5
  218. package/dist/react/features/layout/index.d.ts +5 -4
  219. package/dist/react/features/media/index.d.ts +5 -4
  220. package/dist/react/features/mention/index.d.ts +6 -5
  221. package/dist/react/features/resizable/Resizable.js +4 -6
  222. package/dist/react/features/resizable/index.d.ts +5 -5
  223. package/dist/react/features/suggestion/index.d.ts +6 -5
  224. package/dist/react/features/table/TablePlugin.js +4 -11
  225. package/dist/react/features/table/index.d.ts +10 -8
  226. package/dist/react/features/table/useTableResize.js +10 -1
  227. package/dist/react/features/toc/index.d.ts +2 -2
  228. package/dist/react/features/upload/index.d.ts +11 -6
  229. package/dist/react/index.d.ts +6 -6
  230. package/dist/react/index.js +4 -4
  231. package/dist/react/internal/plate-context.js +434 -188
  232. package/dist/react/plite-react.js +2 -2
  233. package/dist/react/plugins/navigation-feedback/NavigationFeedbackPlugin.js +12 -10
  234. package/dist/react/stores/plate/useEditor.js +32 -14
  235. package/dist/react/stores/plate/useEditorHistory.js +55 -0
  236. package/dist/react/stores/plate/useEditorSelector.js +79 -21
  237. package/dist/react/utils/BlockPlaceholderPlugin.js +5 -2
  238. package/dist/react/utils/pipeRenderElement.internal.js +1 -1
  239. package/dist/react/utils/pluginRenderElement.internal.js +1 -1
  240. package/dist/react/virtualized.d.ts +4 -4
  241. package/dist/{source-CNKy99Th.d.ts → source-BGohy8vH.d.ts} +4 -4
  242. package/dist/static/index.d.ts +18 -18
  243. package/dist/static/internal/renderStaticHtmlWithOverrides.js +2 -2
  244. package/dist/static/internal/staticPresentation.js +4 -4
  245. package/dist/static/internal/writeStaticSelectionClipboardData.js +7 -2
  246. package/dist/tabbable/index.d.ts +1 -1
  247. package/dist/tabbable/react/index.d.ts +3 -3
  248. package/dist/testing/index.d.ts +3 -3
  249. package/dist/yjs/index.d.ts +1 -1
  250. package/dist/yjs/react/index.d.ts +6 -6
  251. package/package.json +20 -2
  252. package/dist/markdown/lib/serializer/convertTextsSerialize.js +0 -163
  253. package/dist/react/components/EditorSelectionView.js +0 -40
  254. package/dist/react/features/ink/InkLayer.js +0 -218
  255. package/dist/react/internal/createPlateTargetScope.js +0 -62
@@ -1,9 +1,9 @@
1
1
  import { runEditorObserver } from "../../facade.js";
2
2
  import { failInvariant } from "../../internal/failInvariant.js";
3
3
  import { subscribePlateChangeCallbacks } from "../../internal/plugin/plateChangeHandlers.js";
4
- import { EditorReadOnlyProvider, useEditorViewState } from "../plite-react.js";
4
+ import { useEditorViewState } from "../plite-react.js";
5
5
  import { EditorRoot as EditorRoot$1 } from "../internal/plite-components.js";
6
- import { PlateModelContext, PlateScopeProvider, createPlateScope } from "../internal/plate-context.js";
6
+ import { PlateCaretScope, PlateModelContext, PlateReadOnlyContext } from "../internal/plate-context.js";
7
7
  import { getPlateDecorationSources } from "../../internal/plugin/getPlateDecorationSources.js";
8
8
  import { getPlateEditorInstanceKey } from "../internal/getPlateEditorInstanceKey.js";
9
9
  import { usePlateInstancesWarn } from "../internal/usePlateInstancesWarn.js";
@@ -13,7 +13,7 @@ import React from "react";
13
13
  import { c } from "react/compiler-runtime";
14
14
  //#region src/react/components/Plate.tsx
15
15
  function PlateInner(t0) {
16
- const $ = c(50);
16
+ const $ = c(42);
17
17
  const { authored, children, containerRef, editor, primary, readOnly, onCommit, onNodeChange, onSelectionChange, onTextChange, onValueChange } = t0;
18
18
  let t1;
19
19
  if ($[0] !== editor) {
@@ -22,121 +22,100 @@ function PlateInner(t0) {
22
22
  $[1] = t1;
23
23
  } else t1 = $[1];
24
24
  const currentEditor = t1;
25
- const [scope] = React.useState(createPlateScope);
26
- const editableRef = React.useRef(null);
25
+ usePlateModelRevision(currentEditor);
27
26
  let t2;
28
- if ($[2] !== containerRef || $[3] !== currentEditor) {
29
- t2 = {
27
+ if ($[2] !== currentEditor) {
28
+ t2 = getPlateDecorationSources(currentEditor);
29
+ $[2] = currentEditor;
30
+ $[3] = t2;
31
+ } else t2 = $[3];
32
+ const decorations = t2;
33
+ const editorReadOnly = useEditorViewState(currentEditor, _temp);
34
+ const plateReadOnly = readOnly ?? editorReadOnly;
35
+ let t3;
36
+ if ($[4] !== containerRef || $[5] !== currentEditor) {
37
+ t3 = {
30
38
  editor: currentEditor,
31
- containerRef,
32
- editableRef
39
+ containerRef
33
40
  };
34
- $[2] = containerRef;
35
- $[3] = currentEditor;
36
- $[4] = t2;
37
- } else t2 = $[4];
38
- const fallback = t2;
39
- usePlateModelRevision(currentEditor);
40
- let t3;
41
- if ($[5] !== currentEditor) {
42
- t3 = getPlateDecorationSources(currentEditor);
41
+ $[4] = containerRef;
43
42
  $[5] = currentEditor;
44
43
  $[6] = t3;
45
44
  } else t3 = $[6];
46
- const decorations = t3;
47
- const editorReadOnly = useEditorViewState(currentEditor, _temp);
48
- const plateReadOnly = readOnly ?? editorReadOnly;
49
- const t4 = primary ?? true;
45
+ const model = t3;
46
+ let t4;
47
+ if ($[7] !== editor?.read) {
48
+ t4 = editor?.read.lastCommit()?.version ?? 0;
49
+ $[7] = editor?.read;
50
+ $[8] = t4;
51
+ } else t4 = $[8];
52
+ const observerBaselineVersion = t4;
53
+ const lastObservedCommitVersion = React.useRef(observerBaselineVersion);
50
54
  let t5;
51
- if ($[7] !== containerRef || $[8] !== currentEditor || $[9] !== plateReadOnly || $[10] !== scope || $[11] !== t4) {
55
+ if ($[9] !== onCommit || $[10] !== onSelectionChange || $[11] !== onValueChange) {
52
56
  t5 = {
53
- editor: currentEditor,
54
- containerRef,
55
- primary: t4,
56
- readOnly: plateReadOnly,
57
- scope
58
- };
59
- $[7] = containerRef;
60
- $[8] = currentEditor;
61
- $[9] = plateReadOnly;
62
- $[10] = scope;
63
- $[11] = t4;
64
- $[12] = t5;
65
- } else t5 = $[12];
66
- const model = t5;
67
- let t6;
68
- if ($[13] !== editor?.read) {
69
- t6 = editor?.read.lastCommit()?.version ?? 0;
70
- $[13] = editor?.read;
71
- $[14] = t6;
72
- } else t6 = $[14];
73
- const observerBaselineVersion = t6;
74
- const lastObservedCommitVersion = React.useRef(observerBaselineVersion);
75
- let t7;
76
- if ($[15] !== onCommit || $[16] !== onSelectionChange || $[17] !== onValueChange) {
77
- t7 = {
78
57
  onCommit,
79
58
  onSelectionChange,
80
59
  onValueChange
81
60
  };
82
- $[15] = onCommit;
83
- $[16] = onSelectionChange;
84
- $[17] = onValueChange;
85
- $[18] = t7;
86
- } else t7 = $[18];
87
- const observersRef = React.useRef(t7);
61
+ $[9] = onCommit;
62
+ $[10] = onSelectionChange;
63
+ $[11] = onValueChange;
64
+ $[12] = t5;
65
+ } else t5 = $[12];
66
+ const observersRef = React.useRef(t5);
88
67
  const lastDocumentValueRef = React.useRef(void 0);
89
- let t8;
90
- let t9;
91
- if ($[19] !== onCommit || $[20] !== onSelectionChange || $[21] !== onValueChange) {
92
- t8 = () => {
68
+ let t6;
69
+ let t7;
70
+ if ($[13] !== onCommit || $[14] !== onSelectionChange || $[15] !== onValueChange) {
71
+ t6 = () => {
93
72
  observersRef.current = {
94
73
  onCommit,
95
74
  onSelectionChange,
96
75
  onValueChange
97
76
  };
98
77
  };
99
- t9 = [
78
+ t7 = [
100
79
  onCommit,
101
80
  onSelectionChange,
102
81
  onValueChange
103
82
  ];
104
- $[19] = onCommit;
105
- $[20] = onSelectionChange;
106
- $[21] = onValueChange;
107
- $[22] = t8;
108
- $[23] = t9;
83
+ $[13] = onCommit;
84
+ $[14] = onSelectionChange;
85
+ $[15] = onValueChange;
86
+ $[16] = t6;
87
+ $[17] = t7;
109
88
  } else {
110
- t8 = $[22];
111
- t9 = $[23];
89
+ t6 = $[16];
90
+ t7 = $[17];
112
91
  }
113
- React.useInsertionEffect(t8, t9);
114
- let t10;
115
- let t11;
116
- if ($[24] !== editor || $[25] !== onNodeChange || $[26] !== onTextChange) {
117
- t10 = () => subscribePlateChangeCallbacks(editor ?? failInvariant("Expected value to be defined"), {
92
+ React.useInsertionEffect(t6, t7);
93
+ let t8;
94
+ let t9;
95
+ if ($[18] !== editor || $[19] !== onNodeChange || $[20] !== onTextChange) {
96
+ t8 = () => subscribePlateChangeCallbacks(editor ?? failInvariant("Expected value to be defined"), {
118
97
  onNodeChange,
119
98
  onTextChange
120
99
  });
121
- t11 = [
100
+ t9 = [
122
101
  editor,
123
102
  onNodeChange,
124
103
  onTextChange
125
104
  ];
126
- $[24] = editor;
127
- $[25] = onNodeChange;
128
- $[26] = onTextChange;
129
- $[27] = t10;
130
- $[28] = t11;
105
+ $[18] = editor;
106
+ $[19] = onNodeChange;
107
+ $[20] = onTextChange;
108
+ $[21] = t8;
109
+ $[22] = t9;
131
110
  } else {
132
- t10 = $[27];
133
- t11 = $[28];
111
+ t8 = $[21];
112
+ t9 = $[22];
134
113
  }
135
- React.useLayoutEffect(t10, t11);
136
- let t12;
137
- let t13;
138
- if ($[29] !== editor || $[30] !== observerBaselineVersion) {
139
- t12 = () => {
114
+ React.useLayoutEffect(t8, t9);
115
+ let t10;
116
+ let t11;
117
+ if ($[23] !== editor || $[24] !== observerBaselineVersion) {
118
+ t10 = () => {
140
119
  const observedEditor = editor ?? failInvariant("Expected value to be defined");
141
120
  lastObservedCommitVersion.current = observerBaselineVersion;
142
121
  lastDocumentValueRef.current = observedEditor.read.value();
@@ -175,59 +154,54 @@ function PlateInner(t0) {
175
154
  if (latestCommit && latestCommit.version > lastObservedCommitVersion.current) observeCommit(latestCommit, observedEditor.read(_temp2));
176
155
  return unsubscribe;
177
156
  };
178
- t13 = [editor, observerBaselineVersion];
179
- $[29] = editor;
180
- $[30] = observerBaselineVersion;
181
- $[31] = t12;
182
- $[32] = t13;
157
+ t11 = [editor, observerBaselineVersion];
158
+ $[23] = editor;
159
+ $[24] = observerBaselineVersion;
160
+ $[25] = t10;
161
+ $[26] = t11;
183
162
  } else {
184
- t12 = $[31];
185
- t13 = $[32];
163
+ t10 = $[25];
164
+ t11 = $[26];
186
165
  }
187
- React.useLayoutEffect(t12, t13);
166
+ React.useLayoutEffect(t10, t11);
167
+ const t12 = primary ?? true;
168
+ let t13;
169
+ if ($[27] !== children || $[28] !== t12) {
170
+ t13 = /* @__PURE__ */ React.createElement(PlateCaretScope, { primary: t12 }, children);
171
+ $[27] = children;
172
+ $[28] = t12;
173
+ $[29] = t13;
174
+ } else t13 = $[29];
188
175
  let t14;
189
- if ($[33] !== children || $[34] !== fallback || $[35] !== plateReadOnly || $[36] !== scope) {
190
- t14 = /* @__PURE__ */ React.createElement(PlateScopeProvider, {
191
- scope,
192
- fallback,
193
- fallbackReadOnly: plateReadOnly
194
- }, children);
195
- $[33] = children;
196
- $[34] = fallback;
197
- $[35] = plateReadOnly;
198
- $[36] = scope;
199
- $[37] = t14;
200
- } else t14 = $[37];
176
+ if ($[30] !== model || $[31] !== t13) {
177
+ t14 = /* @__PURE__ */ React.createElement(PlateModelContext, { value: model }, t13);
178
+ $[30] = model;
179
+ $[31] = t13;
180
+ $[32] = t14;
181
+ } else t14 = $[32];
201
182
  let t15;
202
- if ($[38] !== model || $[39] !== t14) {
203
- t15 = /* @__PURE__ */ React.createElement(PlateModelContext, { value: model }, t14);
204
- $[38] = model;
205
- $[39] = t14;
206
- $[40] = t15;
207
- } else t15 = $[40];
183
+ if ($[33] !== plateReadOnly || $[34] !== t14) {
184
+ t15 = /* @__PURE__ */ React.createElement(PlateReadOnlyContext, { value: plateReadOnly }, t14);
185
+ $[33] = plateReadOnly;
186
+ $[34] = t14;
187
+ $[35] = t15;
188
+ } else t15 = $[35];
208
189
  let t16;
209
- if ($[41] !== plateReadOnly || $[42] !== t15) {
210
- t16 = /* @__PURE__ */ React.createElement(EditorReadOnlyProvider, { readOnly: plateReadOnly }, t15);
211
- $[41] = plateReadOnly;
212
- $[42] = t15;
213
- $[43] = t16;
214
- } else t16 = $[43];
215
- let t17;
216
- if ($[44] !== authored || $[45] !== currentEditor || $[46] !== decorations || $[47] !== plateReadOnly || $[48] !== t16) {
217
- t17 = /* @__PURE__ */ React.createElement(EditorRoot$1, {
190
+ if ($[36] !== authored || $[37] !== currentEditor || $[38] !== decorations || $[39] !== plateReadOnly || $[40] !== t15) {
191
+ t16 = /* @__PURE__ */ React.createElement(EditorRoot$1, {
218
192
  authored,
219
193
  decorations,
220
194
  editor: currentEditor,
221
195
  readOnly: plateReadOnly
222
- }, t16);
223
- $[44] = authored;
224
- $[45] = currentEditor;
225
- $[46] = decorations;
226
- $[47] = plateReadOnly;
227
- $[48] = t16;
228
- $[49] = t17;
229
- } else t17 = $[49];
230
- return t17;
196
+ }, t15);
197
+ $[36] = authored;
198
+ $[37] = currentEditor;
199
+ $[38] = decorations;
200
+ $[39] = plateReadOnly;
201
+ $[40] = t15;
202
+ $[41] = t16;
203
+ } else t16 = $[41];
204
+ return t16;
231
205
  }
232
206
  function _temp2(state) {
233
207
  return state.runtime.snapshot();
@@ -3,13 +3,13 @@ import { getCompiledPlatePlugin, getPlateRuntime } from "../../internal/plugin/c
3
3
  import { isEditOnly } from "../../internal/plugin/isEditOnlyDisabled.js";
4
4
  import { useEditorScrollElementRef, useEditorViewState, useOptionalEditorReadOnly } from "../plite-react.js";
5
5
  import { useComposedRef } from "../internal/react-helpers.js";
6
- import { useEditor, useEditorContainerRef } from "../stores/plate/useEditor.js";
6
+ import { PlateScopeContext, useAreaScope, usePlateScope, useScopeTarget } from "../internal/plate-context.js";
7
7
  import { usePlateModelRevision } from "../internal/usePlateModelRevision.js";
8
8
  import React from "react";
9
9
  import { c } from "react/compiler-runtime";
10
10
  //#region src/react/components/PlateContainer.tsx
11
11
  const EditorContainer = (t0) => {
12
- const $ = c(21);
12
+ const $ = c(25);
13
13
  let children;
14
14
  let props;
15
15
  if ($[0] !== t0) {
@@ -21,12 +21,12 @@ const EditorContainer = (t0) => {
21
21
  children = $[1];
22
22
  props = $[2];
23
23
  }
24
- const editor = useEditor();
24
+ const area = useAreaScope(usePlateScope());
25
+ const { containerRef, editor } = useScopeTarget(area) ?? failInvariant("EditorContainer requires an active Plate editor.");
25
26
  usePlateModelRevision(editor);
26
27
  const plateReadOnly = useOptionalEditorReadOnly();
27
28
  const editorReadOnly = useEditorViewState(editor, _temp);
28
29
  const readOnly = plateReadOnly ?? editorReadOnly;
29
- const containerRef = useEditorContainerRef();
30
30
  let t1;
31
31
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
32
32
  t1 = { fallback: true };
@@ -36,21 +36,28 @@ const EditorContainer = (t0) => {
36
36
  let afterContainer;
37
37
  let beforeContainer;
38
38
  let mainContainer;
39
- if ($[4] !== children || $[5] !== containerRef || $[6] !== editor || $[7] !== props || $[8] !== readOnly || $[9] !== ref) {
39
+ if ($[4] !== area || $[5] !== children || $[6] !== containerRef || $[7] !== editor || $[8] !== props || $[9] !== readOnly || $[10] !== ref) {
40
40
  afterContainer = null;
41
41
  beforeContainer = null;
42
42
  let t2;
43
- if ($[13] !== children || $[14] !== props || $[15] !== ref) {
44
- t2 = /* @__PURE__ */ React.createElement("div", {
45
- ref,
46
- ...props
47
- }, children);
48
- $[13] = children;
49
- $[14] = props;
50
- $[15] = ref;
43
+ if ($[14] !== area || $[15] !== children) {
44
+ t2 = /* @__PURE__ */ React.createElement(PlateScopeContext, { value: area }, children);
45
+ $[14] = area;
46
+ $[15] = children;
51
47
  $[16] = t2;
52
48
  } else t2 = $[16];
53
- mainContainer = t2;
49
+ let t3;
50
+ if ($[17] !== props || $[18] !== ref || $[19] !== t2) {
51
+ t3 = /* @__PURE__ */ React.createElement("div", {
52
+ ref,
53
+ ...props
54
+ }, t2);
55
+ $[17] = props;
56
+ $[18] = ref;
57
+ $[19] = t2;
58
+ $[20] = t3;
59
+ } else t3 = $[20];
60
+ mainContainer = t3;
54
61
  getPlateRuntime(editor).pluginCache.slots.beforeContainer.forEach((name) => {
55
62
  const plugin = getCompiledPlatePlugin(editor, name) ?? failInvariant("Expected value to be defined");
56
63
  if (isEditOnly(readOnly, plugin, "slots")) return;
@@ -63,28 +70,29 @@ const EditorContainer = (t0) => {
63
70
  const AfterContainer = plugin_0.slots.afterContainer ?? failInvariant("Expected value to be defined");
64
71
  afterContainer = /* @__PURE__ */ React.createElement(React.Fragment, null, afterContainer, /* @__PURE__ */ React.createElement(AfterContainer, { containerRef }));
65
72
  });
66
- $[4] = children;
67
- $[5] = containerRef;
68
- $[6] = editor;
69
- $[7] = props;
70
- $[8] = readOnly;
71
- $[9] = ref;
72
- $[10] = afterContainer;
73
- $[11] = beforeContainer;
74
- $[12] = mainContainer;
73
+ $[4] = area;
74
+ $[5] = children;
75
+ $[6] = containerRef;
76
+ $[7] = editor;
77
+ $[8] = props;
78
+ $[9] = readOnly;
79
+ $[10] = ref;
80
+ $[11] = afterContainer;
81
+ $[12] = beforeContainer;
82
+ $[13] = mainContainer;
75
83
  } else {
76
- afterContainer = $[10];
77
- beforeContainer = $[11];
78
- mainContainer = $[12];
84
+ afterContainer = $[11];
85
+ beforeContainer = $[12];
86
+ mainContainer = $[13];
79
87
  }
80
88
  let t2;
81
- if ($[17] !== afterContainer || $[18] !== beforeContainer || $[19] !== mainContainer) {
89
+ if ($[21] !== afterContainer || $[22] !== beforeContainer || $[23] !== mainContainer) {
82
90
  t2 = /* @__PURE__ */ React.createElement(React.Fragment, null, beforeContainer, mainContainer, afterContainer);
83
- $[17] = afterContainer;
84
- $[18] = beforeContainer;
85
- $[19] = mainContainer;
86
- $[20] = t2;
87
- } else t2 = $[20];
91
+ $[21] = afterContainer;
92
+ $[22] = beforeContainer;
93
+ $[23] = mainContainer;
94
+ $[24] = t2;
95
+ } else t2 = $[24];
88
96
  return t2;
89
97
  };
90
98
  EditorContainer.displayName = "EditorContainer";
@@ -1,27 +1,39 @@
1
- import { PlateControllerContext, PlateModelContext, PlateScopeProvider, createPlateScope } from "../internal/plate-context.js";
1
+ import { PlateControllerContext, PlateModelContext, PlatePickedContext, PlateScopeContext, createPlateController, underController } from "../internal/plate-context.js";
2
2
  import React from "react";
3
3
  import { c } from "react/compiler-runtime";
4
4
  //#region src/react/components/PlateController.tsx
5
- /** Share the mounted editor the user focused or pressed last with controls outside individual Plate providers. */
5
+ const pickNothing = () => null;
6
+ /**
7
+ * Give controls outside every `EditorRoot` what the `EditorRoot` used last gives
8
+ * its own controls outside its editing areas. Until one is used, that is the
9
+ * first `primary` one with a mounted `EditorContent`.
10
+ */
6
11
  function EditorController(t0) {
7
- const $ = c(6);
12
+ const $ = c(8);
8
13
  const { children } = t0;
9
- const [scope] = React.useState(createPlateScope);
14
+ const [controller] = React.useState(createPlateController);
15
+ const picked = React.useSyncExternalStore(controller.subscribe, controller.getSnapshot, pickNothing);
10
16
  let t1;
11
- if ($[0] !== children || $[1] !== scope) {
12
- t1 = /* @__PURE__ */ React.createElement(PlateModelContext, { value: null }, /* @__PURE__ */ React.createElement(PlateScopeProvider, { scope }, children));
17
+ if ($[0] !== children) {
18
+ t1 = /* @__PURE__ */ React.createElement(PlateModelContext, { value: null }, /* @__PURE__ */ React.createElement(PlateScopeContext, { value: underController }, children));
13
19
  $[0] = children;
14
- $[1] = scope;
15
- $[2] = t1;
16
- } else t1 = $[2];
20
+ $[1] = t1;
21
+ } else t1 = $[1];
17
22
  let t2;
18
- if ($[3] !== scope || $[4] !== t1) {
19
- t2 = /* @__PURE__ */ React.createElement(PlateControllerContext, { value: scope }, t1);
20
- $[3] = scope;
21
- $[4] = t1;
22
- $[5] = t2;
23
- } else t2 = $[5];
24
- return t2;
23
+ if ($[2] !== picked || $[3] !== t1) {
24
+ t2 = /* @__PURE__ */ React.createElement(PlatePickedContext, { value: picked }, t1);
25
+ $[2] = picked;
26
+ $[3] = t1;
27
+ $[4] = t2;
28
+ } else t2 = $[4];
29
+ let t3;
30
+ if ($[5] !== controller || $[6] !== t2) {
31
+ t3 = /* @__PURE__ */ React.createElement(PlateControllerContext, { value: controller }, t2);
32
+ $[5] = controller;
33
+ $[6] = t2;
34
+ $[7] = t3;
35
+ } else t3 = $[7];
36
+ return t3;
25
37
  }
26
38
  //#endregion
27
39
  export { EditorController };
@@ -2,7 +2,7 @@ import { withMountedPresentation } from "../../facade.js";
2
2
  import { failInvariant } from "../../internal/failInvariant.js";
3
3
  import { getCompiledPlatePlugin, getPlateRuntime } from "../../internal/plugin/compilePlateModel.js";
4
4
  import { EditorRoot, useEditorContext } from "../internal/plite-components.js";
5
- import { PlateMountedView, usePlateModel } from "../internal/plate-context.js";
5
+ import { PlateMountedView, PlateReadOnlyContext, usePlateModel } from "../internal/plate-context.js";
6
6
  import { getPlateDecorationSources } from "../../internal/plugin/getPlateDecorationSources.js";
7
7
  import { getPlateEditorInstanceKey } from "../internal/getPlateEditorInstanceKey.js";
8
8
  import { usePlateModelRevision } from "../internal/usePlateModelRevision.js";
@@ -20,7 +20,8 @@ function PlateRoot(t0) {
20
20
  const { children, editableRef: providedEditableRef, readOnly, root } = t0;
21
21
  const emptyEditableRef = React.useRef(null);
22
22
  const editableRef = providedEditableRef ?? emptyEditableRef;
23
- const { editor, readOnly: modelReadOnly } = usePlateModel();
23
+ const { editor } = usePlateModel();
24
+ const modelReadOnly = React.use(PlateReadOnlyContext);
24
25
  const rootView = useEditorContext();
25
26
  let t1;
26
27
  if ($[0] !== editor || $[1] !== rootView) {
@@ -28,20 +28,20 @@ import { SingleBlockPlugin } from "../utils/plugins/SingleBlockPlugin.js";
28
28
  import { SingleLinePlugin } from "../utils/plugins/SingleLinePlugin.js";
29
29
  import { TrailingBlockPlugin } from "../utils/plugins/TrailingBlockPlugin.js";
30
30
  import { ContentSlice, DocumentChange, EditorSchemaValidationError, ElementApi, LocationApi, NodeApi, PathApi, PluginPublicationError, PointApi, RangeApi, SelectionApi, SpanApi, TextApi, authoredVeto, compileEditorSchemaContract, createEditorView, decodeEditorEffect, defineCommand, defineEditorSchema, defineEffect, definePluginPoint, definePluginSlot, defineStateField, defineUpdateAnnotation, diffEditorSchemaContracts, documentReplacement, editorCommands, editorReads, encodeEditorEffect, getEditorRuntimeOwner, invertEffect, isEditor, locateAt, mapEffect, nodeWriteVeto, property, readEditorSchemaContract, readEditorSelection, restoreEditorSchemaContract, schema, screenReaderAnnouncementEffect, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, target, transfer, transferVeto, txLocate, txOnly, txSelection, valueCodecs } from "../core.js";
31
- import { ReactUpdatePolicy, installBrowserHandle, react, useAnnotation, useAnnotationStore, useAnnotations, useChildRoot, useContentRoot, useDropIndicator, useEditableClip, useEditorHistory, useEditorRootElement, useEditorRuntimeState, useEditorScrollElement, useEditorScrollElementRef, useEditorViewState, useElementPath, useElementSelected, useRootChrome, useRootEditor, useRootState, useRuntimeState, useSelectionGeometry, useSetStateField, useStateFieldValue } from "./plite-react.js";
31
+ import { ReactUpdatePolicy, installBrowserHandle, react, useAnnotation, useAnnotationStore, useAnnotations, useChildRoot, useContentRoot, useDropIndicator, useEditableClip, useEditorRootElement, useEditorRuntimeState, useEditorScrollElement, useEditorScrollElementRef, useEditorViewState, useElementPath, useElementSelected, useRootChrome, useRootEditor, useRootState, useRuntimeState, useSelectionGeometry, useSetStateField, useStateFieldValue } from "./plite-react.js";
32
32
  import { useComposedRef, useIsomorphicLayoutEffect } from "./internal/react-helpers.js";
33
33
  import { useEditableRef, useEditor, useEditorComposing, useEditorContainerRef, useEditorFocused, useEditorHasSelection, useEditorId, useEditorMounted, useEditorReadOnly, useEditorSelection, useEditorState, useEditorValue, useModelEditor, useOptionalEditor } from "./stores/plate/useEditor.js";
34
- import { EditorSelectionView } from "./components/EditorSelectionView.js";
35
34
  import { useEditorSelector } from "./stores/plate/useEditorSelector.js";
36
35
  import { NodeSelectionDrag, NodeSelectionHighlight } from "./components/NodeSelection.js";
37
36
  import { EditorRoot } from "./components/Plate.js";
37
+ import { EditorContainer } from "./components/PlateContainer.js";
38
38
  import { useElement } from "./stores/element/useElement.js";
39
39
  import { useElementSelector } from "./stores/element/useElementSelector.js";
40
40
  import { usePath } from "./stores/element/usePath.js";
41
+ import { useEditorHistory } from "./stores/plate/useEditorHistory.js";
41
42
  import { useEditorPluginStore, usePluginStore } from "./stores/plate/usePluginStore.js";
42
43
  import { useViewStore } from "./stores/plate/useViewStore.js";
43
44
  import { useFocusedLast } from "./stores/plate-controller/useFocusedLast.js";
44
- import { EditorContainer } from "./components/PlateContainer.js";
45
45
  import { EditorPreview } from "./components/PlateView.js";
46
46
  import { EditorElement, EditorLeaf, EditorText } from "./components/plate-nodes.js";
47
47
  import { EditorProvider } from "./components/EditorProvider.js";
@@ -56,4 +56,4 @@ import { useCreateEditor } from "./editor/useCreateEditor.js";
56
56
  import { BlockPlaceholderPlugin } from "./utils/BlockPlaceholderPlugin.js";
57
57
  import { useSelectionFragmentProp } from "./utils/useSelectionFragment.js";
58
58
  export * from "plitejs";
59
- export { AffinityPlugin, BaseParagraphPlugin, BlockPlaceholderPlugin, ContentSlice, DebugPlugin, DocumentChange, EditorContainer, EditorContent, EditorController, EditorElement, EditorError, EditorLeaf, EditorPreview, EditorProvider, EditorRoot, EditorSchemaValidationError, EditorSelectionView, EditorText, ElementApi, ElementIdPlugin, ElementStatePlugin, ExitBreakPlugin, HistoryPlugin, Hotkeys, HtmlPlugin, IS_APPLE, LocationApi, NavigationFeedbackPlugin, NodeApi, NodeSelectionDrag, NodeSelectionHighlight, PLUGINS, ParagraphPlugin, PathApi, PluginPublicationError, PointApi, RangeApi, ReactUpdatePolicy, SelectionApi, SingleBlockPlugin, SingleLinePlugin, SpanApi, TextApi, TrailingBlockPlugin, TransferPlugin, applyDeepToNodes, authoredVeto, compileEditorSchemaContract, createBlockFenceInputRule, createBlockStartInputRule, createEditor, createEditorView, createHotkey, createMarkInputRule, createTextSubstitutionInputRule, decodeEditorEffect, defaultsDeepToNodes, defineCommand, defineEditorSchema, defineEffect, defineInputRule, definePlugin, definePluginPoint, definePluginSlot, defineStateField, defineUpdateAnnotation, diffEditorSchemaContracts, documentReplacement, editorCommands, editorReads, encodeEditorEffect, getEditorRuntimeOwner, getFragmentProp, getInjectMatch, getPluginNodeClass, inputRuleVeto, installBrowserHandle, invertEffect, isDefined, isEditor, isHotkey, isNominalPluginDescriptor, isPluginElementClass, isPluginNodeClass, isUrl, locateAt, mapEffect, matchBlockStart, matchDelimitedInline, mergeDeepToNodes, nanoid, nodeWriteVeto, property, react, readEditorSchemaContract, readEditorSelection, restoreEditorSchemaContract, schema, screenReaderAnnouncementEffect, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, target, toReactPlugin, transfer, transferVeto, txLocate, txOnly, txSelection, useAnnotation, useAnnotationStore, useAnnotations, useChildRoot, useComposedRef, useContentRoot, useCreateEditor, useDropIndicator, useEditableClip, useEditableRef, useEditor, useEditorComposing, useEditorContainerRef, useEditorFocused, useEditorHasSelection, useEditorHistory, useEditorId, useEditorMounted, useEditorPluginStore, useEditorReadOnly, useEditorRootElement, useEditorRuntimeState, useEditorScrollElement, useEditorScrollElementRef, useEditorSelection, useEditorSelector, useEditorState, useEditorValue, useEditorViewState, useElement, useElementPath, useElementSelected, useElementSelector, useFocusedLast, useIsomorphicLayoutEffect, useModelEditor, useOptionalEditor, usePath, usePluginStore, useRootChrome, useRootEditor, useRootState, useRuntimeState, useSelectionFragmentProp, useSelectionGeometry, useSetStateField, useStateFieldValue, useViewStore, valueCodecs };
59
+ export { AffinityPlugin, BaseParagraphPlugin, BlockPlaceholderPlugin, ContentSlice, DebugPlugin, DocumentChange, EditorContainer, EditorContent, EditorController, EditorElement, EditorError, EditorLeaf, EditorPreview, EditorProvider, EditorRoot, EditorSchemaValidationError, EditorText, ElementApi, ElementIdPlugin, ElementStatePlugin, ExitBreakPlugin, HistoryPlugin, Hotkeys, HtmlPlugin, IS_APPLE, LocationApi, NavigationFeedbackPlugin, NodeApi, NodeSelectionDrag, NodeSelectionHighlight, PLUGINS, ParagraphPlugin, PathApi, PluginPublicationError, PointApi, RangeApi, ReactUpdatePolicy, SelectionApi, SingleBlockPlugin, SingleLinePlugin, SpanApi, TextApi, TrailingBlockPlugin, TransferPlugin, applyDeepToNodes, authoredVeto, compileEditorSchemaContract, createBlockFenceInputRule, createBlockStartInputRule, createEditor, createEditorView, createHotkey, createMarkInputRule, createTextSubstitutionInputRule, decodeEditorEffect, defaultsDeepToNodes, defineCommand, defineEditorSchema, defineEffect, defineInputRule, definePlugin, definePluginPoint, definePluginSlot, defineStateField, defineUpdateAnnotation, diffEditorSchemaContracts, documentReplacement, editorCommands, editorReads, encodeEditorEffect, getEditorRuntimeOwner, getFragmentProp, getInjectMatch, getPluginNodeClass, inputRuleVeto, installBrowserHandle, invertEffect, isDefined, isEditor, isHotkey, isNominalPluginDescriptor, isPluginElementClass, isPluginNodeClass, isUrl, locateAt, mapEffect, matchBlockStart, matchDelimitedInline, mergeDeepToNodes, nanoid, nodeWriteVeto, property, react, readEditorSchemaContract, readEditorSelection, restoreEditorSchemaContract, schema, screenReaderAnnouncementEffect, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, target, toReactPlugin, transfer, transferVeto, txLocate, txOnly, txSelection, useAnnotation, useAnnotationStore, useAnnotations, useChildRoot, useComposedRef, useContentRoot, useCreateEditor, useDropIndicator, useEditableClip, useEditableRef, useEditor, useEditorComposing, useEditorContainerRef, useEditorFocused, useEditorHasSelection, useEditorHistory, useEditorId, useEditorMounted, useEditorPluginStore, useEditorReadOnly, useEditorRootElement, useEditorRuntimeState, useEditorScrollElement, useEditorScrollElementRef, useEditorSelection, useEditorSelector, useEditorState, useEditorValue, useEditorViewState, useElement, useElementPath, useElementSelected, useElementSelector, useFocusedLast, useIsomorphicLayoutEffect, useModelEditor, useOptionalEditor, usePath, usePluginStore, useRootChrome, useRootEditor, useRootState, useRuntimeState, useSelectionFragmentProp, useSelectionGeometry, useSetStateField, useStateFieldValue, useViewStore, valueCodecs };