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.
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES.md +56 -0
- package/dist/{AIChatRequestContext-BMVWhfPV.d.ts → AIChatRequestContext-DrUahdTc.d.ts} +2 -2
- package/dist/{BaseSuggestionPlugin-DBl3fqnm.d.ts → BaseSuggestionPlugin-_7Ka6nY3.d.ts} +7 -3
- package/dist/{PlateStatic-DhNv2ejp.d.ts → PlateStatic-D3Cb-QwH.d.ts} +7 -7
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/react/AIChatPlugin.js +113 -78
- package/dist/ai/react/CopilotPlugin.js +1 -1
- package/dist/ai/react/index.d.ts +23 -16
- package/dist/authored/index.d.ts +4 -4
- package/dist/code-block/codemirror/createCodeMirrorAdapter.js +12 -9
- package/dist/code-block/codemirror/index.d.ts +1 -1
- package/dist/{combobox-DkBGgyd3.d.ts → combobox-Dr0OYZIE.d.ts} +2 -2
- package/dist/{comparison-types-CYnJ35qU.d.ts → comparison-types-DdwE6mYq-BogsHoUO.d.ts} +10 -2
- package/dist/compiler/index.d.ts +2 -2
- package/dist/{core-BJG8l_mk.d.ts → core-BqR-fEDp.d.ts} +493 -116
- package/dist/diff/index.d.ts +2 -2
- package/dist/docs/ai.md +4 -3
- package/dist/docs/api/core/plate-components.md +0 -19
- package/dist/docs/api/core/plate-controller.md +5 -3
- package/dist/docs/api/core/plate-plugin.md +3 -0
- package/dist/docs/api/core/plate-store.md +3 -3
- package/dist/docs/api/core.md +45 -5
- package/dist/docs/api/dom.md +11 -4
- package/dist/docs/api/editor-transforms.md +2 -1
- package/dist/docs/api/react-hooks.md +45 -13
- package/dist/docs/authored-changes.md +9 -4
- package/dist/docs/basic-blocks.md +42 -29
- package/dist/docs/block-placeholder.md +4 -2
- package/dist/docs/blockquote.md +5 -3
- package/dist/docs/board.md +118 -10
- package/dist/docs/code-block.md +47 -0
- package/dist/docs/comment.md +2 -2
- package/dist/docs/discussion.md +1 -1
- package/dist/docs/document-model.md +15 -3
- package/dist/docs/docx.md +1 -1
- package/dist/docs/dom-coverage.md +5 -0
- package/dist/docs/editor.md +50 -4
- package/dist/docs/examples/editable-voids.md +2 -3
- package/dist/docs/external-text.md +2 -0
- package/dist/docs/field.md +370 -0
- package/dist/docs/find.md +9 -6
- package/dist/docs/form.md +2 -0
- package/dist/docs/heading.md +6 -0
- package/dist/docs/installation/manual.md +0 -4
- package/dist/docs/link.md +3 -3
- package/dist/docs/llms.txt +4 -2
- package/dist/docs/markdown.md +270 -14
- package/dist/docs/plugin-components.md +13 -10
- package/dist/docs/plugin-input-rules.md +66 -15
- package/dist/docs/prompt-editor.md +205 -0
- package/dist/docs/roots.md +8 -6
- package/dist/docs/rtl.md +6 -4
- package/dist/docs/selection.md +7 -4
- package/dist/docs/suggestion.md +1 -1
- package/dist/docs/toolbar.md +26 -30
- package/dist/docs/upload.md +106 -17
- package/dist/docx/export/index.d.ts +3 -3
- package/dist/docx/export/lib/docxStaticComponents.js +12 -2
- package/dist/docx/export/lib/exportDocx.js +46 -17
- package/dist/docx/export/lib/internal/xml-builder.js +11 -16
- package/dist/docx/export/lib/reviewPart.js +1 -1
- package/dist/docx/export/lib/reviewProjection.js +52 -10
- package/dist/docx/import/index.d.ts +4 -4
- package/dist/docx/paste/index.d.ts +4 -4
- package/dist/dom/index.d.ts +1 -6
- package/dist/dom/plite-dom.internal.js +2 -2
- package/dist/excalidraw/index.d.ts +3 -2
- package/dist/excalidraw/react/index.d.ts +3 -2
- package/dist/facade.js +2 -2
- package/dist/features/basic-nodes/lib/BaseBlockPlugins.js +13 -5
- package/dist/features/basic-nodes/lib/BaseHeadingPlugins.js +32 -10
- package/dist/features/board/index.d.ts +2 -2
- package/dist/features/board/lib/BaseBoardPlugin.js +14 -1
- package/dist/features/board/lib/boardStroke.internal.js +13 -1
- package/dist/features/board/lib/boardTypes.internal.js +16 -0
- package/dist/features/callout/index.d.ts +3 -2
- package/dist/features/code-block/lib/BaseCodeBlockPlugin.js +14 -5
- package/dist/features/combobox/index.d.ts +2 -2
- package/dist/features/comments/BaseCommentsPlugin.js +33 -17
- package/dist/features/comments/index.d.ts +1 -1
- package/dist/features/date/index.d.ts +3 -2
- package/dist/features/details/index.d.ts +3 -2
- package/dist/features/details/lib/BaseDetailsPlugin.js +25 -12
- package/dist/features/field/index.d.ts +2 -0
- package/dist/features/field/index.js +4 -0
- package/dist/features/field/lib/BaseFieldPlugin.js +360 -0
- package/dist/features/field/lib/applyFieldValues.js +188 -0
- package/dist/features/field/lib/fieldRules.internal.js +204 -0
- package/dist/features/find/index.d.ts +3 -2
- package/dist/features/footnote/index.d.ts +1 -1
- package/dist/features/ink/index.d.ts +1 -1
- package/dist/features/ink/lib/BaseInkPlugin.js +126 -103
- package/dist/features/ink/lib/inkCodec.internal.js +130 -0
- package/dist/features/ink/lib/inkGone.internal.js +229 -48
- package/dist/features/ink/lib/inkPlaces.internal.js +534 -64
- package/dist/features/layout/index.d.ts +1 -1
- package/dist/features/link/lib/BaseLinkPlugin.js +6 -4
- package/dist/features/lint/index.d.ts +3 -2
- package/dist/features/media/index.d.ts +2 -2
- package/dist/features/media/index.js +2 -2
- package/dist/features/media/lib/media/parseMediaUrl.js +11 -1
- package/dist/features/media/lib/media-embed/BaseMediaEmbedPlugin.js +206 -4
- package/dist/features/mention/index.d.ts +5 -4
- package/dist/features/suggestion/index.d.ts +1 -1
- package/dist/features/table/index.d.ts +1 -1
- package/dist/features/table/lib/BaseTablePlugin.js +64 -15
- package/dist/features/table/lib/internal/selection.js +4 -2
- package/dist/features/toc/index.d.ts +1 -1
- package/dist/features/upload/index.d.ts +2 -2
- package/dist/features/upload/lib/BaseUploadPlugin.js +464 -250
- package/dist/history/index.d.ts +2 -2
- package/dist/html/index.d.ts +3 -3
- package/dist/html/server/index.d.ts +1 -1
- package/dist/{htmlTypes-DjeFG3P8.d.ts → htmlTypes-eT2ZGDAj.d.ts} +2 -31
- package/dist/hyperscript/index.d.ts +1 -1
- package/dist/{index-DzD6BIFJ.d.ts → index-B33E1CRJ.d.ts} +295 -6
- package/dist/{index-Cl77E9yr.d.ts → index-B7moSod7.d.ts} +2 -2
- package/dist/{index-hsC_sOn2.d.ts → index-B8-5Sr7I.d.ts} +35 -5
- package/dist/{index-BiQerPJS.d.ts → index-B8QJDAmG.d.ts} +2 -2
- package/dist/{index-BBKGrsG3.d.ts → index-BTx5oK7k.d.ts} +1 -1
- package/dist/{index-iaZOhA76.d.ts → index-BWPcE4ac-Cto_IsNs.d.ts} +7 -1
- package/dist/{index-BU6k1Aev.d.ts → index-BXjLmx1n-CXk17buG.d.ts} +4781 -4584
- package/dist/{index-kLKMc-pI.d.ts → index-BXwU9QH6.d.ts} +2 -2
- package/dist/{index-DTgaSxKr.d.ts → index-BkwR-5hH.d.ts} +40 -4
- package/dist/{index-Bq3sdm3S.d.ts → index-BsV2McRr.d.ts} +5 -4
- package/dist/index-C9Fu-P4E.d.ts +773 -0
- package/dist/{index-D5W-p9bS.d.ts → index-Ca48r1ng.d.ts} +49 -4
- package/dist/{index-CcZbqPqk.d.ts → index-Cob_iBdu.d.ts} +116 -41
- package/dist/{index-Bxfvicyy.d.ts → index-CpY7Xnxw.d.ts} +4 -3
- package/dist/{index-BkR7-GLI.d.ts → index-DNQXzU-X.d.ts} +2 -2
- package/dist/{index-D1CFXA-i.d.ts → index-DPowErHa.d.ts} +471 -141
- package/dist/{index-DaM37gF6.d.ts → index-DShbzec2.d.ts} +38 -23
- package/dist/{index-DC_MNGyu.d.ts → index-DYdObeFQ.d.ts} +3 -3
- package/dist/{index-Bc2Yg_2j.d.ts → index-Dq3Jlj8O-BJ6NxZm0.d.ts} +2 -2
- package/dist/{index-CT7miqQN.d.ts → index-DwWQVwQt.d.ts} +29 -11
- package/dist/{index-xdmCBvlT.d.ts → index-JWgwL5l3.d.ts} +5 -2
- package/dist/{index-DLA2DUR2.d.ts → index-M781pyx9.d.ts} +4 -3
- package/dist/{index-DdIRduDG.d.ts → index-d7io3MzC.d.ts} +3 -2
- package/dist/index.d.ts +4 -4
- package/dist/{react/internal → internal}/penStroke.internal.js +1 -1
- package/dist/internal/plugin/OverridePlugin.js +101 -119
- package/dist/internal/plugin/collectPlateNodeMappings.js +5 -1
- package/dist/internal/plugin/pastedUploadFiles.js +4 -0
- package/dist/internal/plugin/resolvePlugin.js +1 -1
- package/dist/internal/plugin/resolvePlugins.js +3 -0
- package/dist/internal/plugin/uploadDrafts.js +6 -0
- package/dist/internal/utils/mergePlugins.js +1 -0
- package/dist/lib/plugins/element-id/ElementIdPlugin.js +14 -18
- package/dist/lib/plugins/html/HtmlPlugin.js +9 -0
- package/dist/lib/plugins/html/htmlSafety.js +1 -1
- package/dist/lib/plugins/input-rules/InputRulesPlugin.js +77 -28
- package/dist/lib/plugins/input-rules/inputRuleVeto.internal.js +16 -0
- package/dist/markdown/index.d.ts +2 -2
- package/dist/markdown/index.js +3 -1
- package/dist/markdown/lib/MarkdownPlugin.js +14 -11
- package/dist/markdown/lib/RawHtmlPlugin.js +26 -0
- package/dist/markdown/lib/deserializer/mdastToSlate.js +12 -2
- package/dist/markdown/lib/internal/markdownConversion.js +776 -74
- package/dist/markdown/lib/internal/markdownDiagnostics.js +18 -7
- package/dist/markdown/lib/internal/markdownFootnoteWriter.js +35 -0
- package/dist/markdown/lib/internal/markdownFrontmatter.js +102 -0
- package/dist/markdown/lib/internal/markdownIntrinsics.js +125 -43
- package/dist/markdown/lib/internal/markdownLine.js +5 -3
- package/dist/markdown/lib/internal/markdownMappings.js +19 -7
- package/dist/markdown/lib/internal/markdownOpenTail.js +381 -0
- package/dist/markdown/lib/internal/markdownRawHtml.js +353 -0
- package/dist/markdown/lib/internal/markdownSegments.js +57 -48
- package/dist/markdown/lib/internal/markdownTags.js +29 -9
- package/dist/markdown/lib/serializer/convertNodesSerialize.js +10 -8
- package/dist/markdown/lib/serializer/convertPhrasingSerialize.js +226 -0
- package/dist/markdown/lib/serializer/listToMdastTree.js +2 -0
- package/dist/math/index.d.ts +3 -2
- package/dist/math/react/index.d.ts +4 -3
- package/dist/migrations/index.d.ts +3 -3
- package/dist/migrations/migratePlateV54.js +4 -6
- package/dist/migrations/migratePlateV54RetiredMarks.internal.js +23 -8
- package/dist/migrations/migratePlateV54Suggestions.internal.js +2 -2
- package/dist/migrations/v53-manifest.internal.js +4 -0
- package/dist/pagination/index.d.ts +1 -1
- package/dist/pagination/react/index.d.ts +4 -4
- package/dist/react/components/EditorContentView.internal.js +42 -23
- package/dist/react/components/EditorProvider.js +5 -5
- package/dist/react/components/Plate.js +102 -128
- package/dist/react/components/PlateContainer.js +40 -32
- package/dist/react/components/PlateController.js +28 -16
- package/dist/react/components/PlateRoot.internal.js +3 -2
- package/dist/react/core.js +4 -4
- package/dist/react/features/board/BoardSurface.js +116 -87
- package/dist/react/features/board/boardClipboard.internal.js +15 -5
- package/dist/react/features/board/boardExport.internal.js +470 -0
- package/dist/react/features/board/boardGesture.internal.js +6 -3
- package/dist/react/features/board/boardIndex.internal.js +7 -18
- package/dist/react/features/board/boardPictureStyles.internal.js +415 -0
- package/dist/react/features/board/boardPictures.internal.js +19 -13
- package/dist/react/features/board/boardView.internal.js +190 -50
- package/dist/react/features/board/boardVoice.internal.js +10 -11
- package/dist/react/features/board/index.d.ts +108 -18
- package/dist/react/features/callout/index.d.ts +3 -2
- package/dist/react/features/combobox/index.d.ts +8 -8
- package/dist/react/features/comments/index.d.ts +6 -5
- package/dist/react/features/date/index.d.ts +4 -3
- package/dist/react/features/details/index.d.ts +4 -3
- package/dist/react/features/field/FieldPlugin.js +35 -0
- package/dist/react/features/field/index.d.ts +315 -0
- package/dist/react/features/field/index.js +2 -0
- package/dist/react/features/footnote/index.d.ts +7 -6
- package/dist/react/features/format-painter/index.d.ts +4 -3
- package/dist/react/features/ink/InkContent.js +313 -0
- package/dist/react/features/ink/index.d.ts +57 -33
- package/dist/react/features/ink/index.js +2 -2
- package/dist/react/features/ink/inkCapture.internal.js +39 -17
- package/dist/react/features/ink/inkInput.internal.js +1 -1
- package/dist/react/features/ink/inkLayout.internal.js +6 -3
- package/dist/react/features/ink/inkPaint.internal.js +78 -2
- package/dist/react/features/ink/inkPlacement.internal.js +332 -104
- package/dist/react/features/ink/inkWatch.internal.js +7 -5
- package/dist/react/features/layout/index.d.ts +5 -4
- package/dist/react/features/media/index.d.ts +5 -4
- package/dist/react/features/mention/index.d.ts +6 -5
- package/dist/react/features/resizable/Resizable.js +4 -6
- package/dist/react/features/resizable/index.d.ts +5 -5
- package/dist/react/features/suggestion/index.d.ts +6 -5
- package/dist/react/features/table/TablePlugin.js +4 -11
- package/dist/react/features/table/index.d.ts +10 -8
- package/dist/react/features/table/useTableResize.js +10 -1
- package/dist/react/features/toc/index.d.ts +2 -2
- package/dist/react/features/upload/index.d.ts +11 -6
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +4 -4
- package/dist/react/internal/plate-context.js +434 -188
- package/dist/react/plite-react.js +2 -2
- package/dist/react/plugins/navigation-feedback/NavigationFeedbackPlugin.js +12 -10
- package/dist/react/stores/plate/useEditor.js +32 -14
- package/dist/react/stores/plate/useEditorHistory.js +55 -0
- package/dist/react/stores/plate/useEditorSelector.js +79 -21
- package/dist/react/utils/BlockPlaceholderPlugin.js +5 -2
- package/dist/react/utils/pipeRenderElement.internal.js +1 -1
- package/dist/react/utils/pluginRenderElement.internal.js +1 -1
- package/dist/react/virtualized.d.ts +4 -4
- package/dist/{source-CNKy99Th.d.ts → source-BGohy8vH.d.ts} +4 -4
- package/dist/static/index.d.ts +18 -18
- package/dist/static/internal/renderStaticHtmlWithOverrides.js +2 -2
- package/dist/static/internal/staticPresentation.js +4 -4
- package/dist/static/internal/writeStaticSelectionClipboardData.js +7 -2
- package/dist/tabbable/index.d.ts +1 -1
- package/dist/tabbable/react/index.d.ts +3 -3
- package/dist/testing/index.d.ts +3 -3
- package/dist/yjs/index.d.ts +1 -1
- package/dist/yjs/react/index.d.ts +6 -6
- package/package.json +20 -2
- package/dist/markdown/lib/serializer/convertTextsSerialize.js +0 -163
- package/dist/react/components/EditorSelectionView.js +0 -40
- package/dist/react/features/ink/InkLayer.js +0 -218
- 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 {
|
|
4
|
+
import { useEditorViewState } from "../plite-react.js";
|
|
5
5
|
import { EditorRoot as EditorRoot$1 } from "../internal/plite-components.js";
|
|
6
|
-
import {
|
|
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(
|
|
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
|
-
|
|
26
|
-
const editableRef = React.useRef(null);
|
|
25
|
+
usePlateModelRevision(currentEditor);
|
|
27
26
|
let t2;
|
|
28
|
-
if ($[2] !==
|
|
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
|
-
$[
|
|
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
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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 ($[
|
|
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
|
-
$[
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
86
|
-
} else
|
|
87
|
-
const observersRef = React.useRef(
|
|
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
|
|
90
|
-
let
|
|
91
|
-
if ($[
|
|
92
|
-
|
|
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
|
-
|
|
78
|
+
t7 = [
|
|
100
79
|
onCommit,
|
|
101
80
|
onSelectionChange,
|
|
102
81
|
onValueChange
|
|
103
82
|
];
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
83
|
+
$[13] = onCommit;
|
|
84
|
+
$[14] = onSelectionChange;
|
|
85
|
+
$[15] = onValueChange;
|
|
86
|
+
$[16] = t6;
|
|
87
|
+
$[17] = t7;
|
|
109
88
|
} else {
|
|
110
|
-
|
|
111
|
-
|
|
89
|
+
t6 = $[16];
|
|
90
|
+
t7 = $[17];
|
|
112
91
|
}
|
|
113
|
-
React.useInsertionEffect(
|
|
114
|
-
let
|
|
115
|
-
let
|
|
116
|
-
if ($[
|
|
117
|
-
|
|
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
|
-
|
|
100
|
+
t9 = [
|
|
122
101
|
editor,
|
|
123
102
|
onNodeChange,
|
|
124
103
|
onTextChange
|
|
125
104
|
];
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
105
|
+
$[18] = editor;
|
|
106
|
+
$[19] = onNodeChange;
|
|
107
|
+
$[20] = onTextChange;
|
|
108
|
+
$[21] = t8;
|
|
109
|
+
$[22] = t9;
|
|
131
110
|
} else {
|
|
132
|
-
|
|
133
|
-
|
|
111
|
+
t8 = $[21];
|
|
112
|
+
t9 = $[22];
|
|
134
113
|
}
|
|
135
|
-
React.useLayoutEffect(
|
|
136
|
-
let
|
|
137
|
-
let
|
|
138
|
-
if ($[
|
|
139
|
-
|
|
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
|
-
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
157
|
+
t11 = [editor, observerBaselineVersion];
|
|
158
|
+
$[23] = editor;
|
|
159
|
+
$[24] = observerBaselineVersion;
|
|
160
|
+
$[25] = t10;
|
|
161
|
+
$[26] = t11;
|
|
183
162
|
} else {
|
|
184
|
-
|
|
185
|
-
|
|
163
|
+
t10 = $[25];
|
|
164
|
+
t11 = $[26];
|
|
186
165
|
}
|
|
187
|
-
React.useLayoutEffect(
|
|
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 ($[
|
|
190
|
-
t14 = /* @__PURE__ */ React.createElement(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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 ($[
|
|
203
|
-
t15 = /* @__PURE__ */ React.createElement(
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
} else t15 = $[
|
|
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 ($[
|
|
210
|
-
t16 = /* @__PURE__ */ React.createElement(
|
|
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
|
-
},
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
} else
|
|
230
|
-
return
|
|
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 {
|
|
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(
|
|
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
|
|
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] !==
|
|
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 ($[
|
|
44
|
-
t2 = /* @__PURE__ */ React.createElement(
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
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] =
|
|
67
|
-
$[5] =
|
|
68
|
-
$[6] =
|
|
69
|
-
$[7] =
|
|
70
|
-
$[8] =
|
|
71
|
-
$[9] =
|
|
72
|
-
$[10] =
|
|
73
|
-
$[11] =
|
|
74
|
-
$[12] =
|
|
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 = $[
|
|
77
|
-
beforeContainer = $[
|
|
78
|
-
mainContainer = $[
|
|
84
|
+
afterContainer = $[11];
|
|
85
|
+
beforeContainer = $[12];
|
|
86
|
+
mainContainer = $[13];
|
|
79
87
|
}
|
|
80
88
|
let t2;
|
|
81
|
-
if ($[
|
|
89
|
+
if ($[21] !== afterContainer || $[22] !== beforeContainer || $[23] !== mainContainer) {
|
|
82
90
|
t2 = /* @__PURE__ */ React.createElement(React.Fragment, null, beforeContainer, mainContainer, afterContainer);
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
} else t2 = $[
|
|
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,
|
|
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
|
-
|
|
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(
|
|
12
|
+
const $ = c(8);
|
|
8
13
|
const { children } = t0;
|
|
9
|
-
const [
|
|
14
|
+
const [controller] = React.useState(createPlateController);
|
|
15
|
+
const picked = React.useSyncExternalStore(controller.subscribe, controller.getSnapshot, pickNothing);
|
|
10
16
|
let t1;
|
|
11
|
-
if ($[0] !== children
|
|
12
|
-
t1 = /* @__PURE__ */ React.createElement(PlateModelContext, { value: null }, /* @__PURE__ */ React.createElement(
|
|
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] =
|
|
15
|
-
|
|
16
|
-
} else t1 = $[2];
|
|
20
|
+
$[1] = t1;
|
|
21
|
+
} else t1 = $[1];
|
|
17
22
|
let t2;
|
|
18
|
-
if ($[
|
|
19
|
-
t2 = /* @__PURE__ */ React.createElement(
|
|
20
|
-
$[
|
|
21
|
-
$[
|
|
22
|
-
$[
|
|
23
|
-
} else t2 = $[
|
|
24
|
-
|
|
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
|
|
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) {
|
package/dist/react/core.js
CHANGED
|
@@ -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,
|
|
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,
|
|
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 };
|