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
package/dist/history/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
1
|
+
import { D as CarriedRun } from "../index-BXjLmx1n-CXk17buG.js";
|
|
2
|
+
import { a as HistoryJSON, c as HistoryPluginTypeProvider, d as HistoryTxApi, f as history, i as HistoryControlTx, l as HistoryPluginTypes, n as History, o as HistoryOptions, r as HistoryBatchJSON, s as HistoryPlugin, t as Batch, u as HistoryStateApi } from "../index-DNQXzU-X.js";
|
|
3
3
|
export { Batch, type CarriedRun, History, HistoryBatchJSON, HistoryControlTx, HistoryJSON, HistoryOptions, HistoryPlugin, HistoryPluginTypeProvider, HistoryPluginTypes, HistoryStateApi, HistoryTxApi, history };
|
package/dist/html/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as HtmlEditorSerializeOptions, c as HtmlParseLimits, d as HtmlSerializeResult, f as HtmlSliceParseResult, i as HtmlEditorParseOptions, l as HtmlParseOptions, m as HtmlWarningDiagnostic, n as HtmlDiagnostic, o as HtmlErrorDiagnostic, p as HtmlSourceLocation, r as HtmlDocumentParseResult, s as HtmlModelLocation, t as HtmlApi, u as HtmlSerializeOptions } from "../htmlTypes-
|
|
2
|
-
import { Br as HtmlPlugin, F as HtmlMatchValue, I as HtmlMatcher, L as HtmlNodeSpec, M as HtmlAttributes, N as HtmlContentToken, P as HtmlElementPatch, Vr as decodeHtmlDataTransfer, z as HtmlWrapperSpec } from "../core-
|
|
3
|
-
import { n as serializeHtml, t as parseHtml } from "../index-
|
|
1
|
+
import { a as HtmlEditorSerializeOptions, c as HtmlParseLimits, d as HtmlSerializeResult, f as HtmlSliceParseResult, i as HtmlEditorParseOptions, l as HtmlParseOptions, m as HtmlWarningDiagnostic, n as HtmlDiagnostic, o as HtmlErrorDiagnostic, p as HtmlSourceLocation, r as HtmlDocumentParseResult, s as HtmlModelLocation, t as HtmlApi, u as HtmlSerializeOptions } from "../htmlTypes-eT2ZGDAj.js";
|
|
2
|
+
import { Br as HtmlPlugin, F as HtmlMatchValue, I as HtmlMatcher, L as HtmlNodeSpec, M as HtmlAttributes, N as HtmlContentToken, P as HtmlElementPatch, Vr as decodeHtmlDataTransfer, z as HtmlWrapperSpec } from "../core-BqR-fEDp.js";
|
|
3
|
+
import { n as serializeHtml, t as parseHtml } from "../index-DYdObeFQ.js";
|
|
4
4
|
export { type HtmlApi, type HtmlAttributes, type HtmlContentToken, type HtmlDiagnostic, type HtmlDocumentParseResult, type HtmlEditorParseOptions, type HtmlEditorSerializeOptions, type HtmlElementPatch, type HtmlErrorDiagnostic, type HtmlMatchValue, type HtmlMatcher, type HtmlModelLocation, type HtmlNodeSpec, type HtmlParseLimits, type HtmlParseOptions, HtmlPlugin, type HtmlSerializeOptions, type HtmlSerializeResult, type HtmlSliceParseResult, type HtmlSourceLocation, type HtmlWarningDiagnostic, type HtmlWrapperSpec, decodeHtmlDataTransfer, parseHtml, serializeHtml };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as HtmlParseLimits, l as HtmlParseOptions, m as HtmlWarningDiagnostic, n as HtmlDiagnostic, o as HtmlErrorDiagnostic, p as HtmlSourceLocation, r as HtmlDocumentParseResult, s as HtmlModelLocation } from "../../htmlTypes-
|
|
1
|
+
import { c as HtmlParseLimits, l as HtmlParseOptions, m as HtmlWarningDiagnostic, n as HtmlDiagnostic, o as HtmlErrorDiagnostic, p as HtmlSourceLocation, r as HtmlDocumentParseResult, s as HtmlModelLocation } from "../../htmlTypes-eT2ZGDAj.js";
|
|
2
2
|
declare const parseHtml: (source: string, options: HtmlParseOptions) => HtmlDocumentParseResult;
|
|
3
3
|
export { type HtmlDiagnostic, type HtmlDocumentParseResult, type HtmlErrorDiagnostic, type HtmlModelLocation, type HtmlParseLimits, type HtmlParseOptions, type HtmlSourceLocation, type HtmlWarningDiagnostic, parseHtml };
|
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** Stable runtime schema-validation failure categories. */
|
|
3
|
-
type EditorSchemaValidationCode = 'exclusive-property-conflict' | 'invalid-content' | 'invalid-document' | 'invalid-json' | 'invalid-node' | 'invalid-property-value' | 'invalid-root' | 'missing-property' | 'property-target-mismatch' | 'unknown-element' | 'unknown-property';
|
|
4
|
-
/** Compiled property candidates relevant to one validation failure. */
|
|
5
|
-
type EditorSchemaValidationPropertyContext = Readonly<{
|
|
6
|
-
/** Contributing plugin names, sorted and deduplicated. */
|
|
7
|
-
plugins: readonly string[];
|
|
8
|
-
/** Stable compiled property IDs, in the same order as `targets`. */
|
|
9
|
-
ids: readonly string[];
|
|
10
|
-
/** Exact property key encountered in the document. */
|
|
11
|
-
key: string;
|
|
12
|
-
placement: 'element' | 'text';
|
|
13
|
-
/** Candidate targets aligned with `ids`; `null` means universal. */
|
|
14
|
-
targets: ReadonlyArray<SchemaTarget | null>;
|
|
15
|
-
}>;
|
|
16
|
-
/** One immutable, path-aware runtime schema validation failure. */
|
|
17
|
-
type EditorSchemaValidationDiagnostic = Readonly<{
|
|
18
|
-
/** Element ancestor types, immediate parent first. */
|
|
19
|
-
ancestorTypes?: readonly string[];
|
|
20
|
-
code: EditorSchemaValidationCode;
|
|
21
|
-
message: string;
|
|
22
|
-
/** Type of the invalid element, or `text` for a text node. */
|
|
23
|
-
nodeType?: string;
|
|
24
|
-
parentType?: string;
|
|
25
|
-
/** Path inside `root`. */
|
|
26
|
-
path: readonly number[];
|
|
27
|
-
property?: EditorSchemaValidationPropertyContext;
|
|
28
|
-
/** `null` means the implicit primary root. */
|
|
29
|
-
root: string | null;
|
|
30
|
-
}>;
|
|
1
|
+
import { As as SchemaContentPrefixSlot, Es as SchemaContent, Fo as PluginReference, Hn as EditorSchemaOverrideInput, Tt as EditorDocumentValue, Ui as InternalEditorSchemaApi, cc as SchemaProperty, j as ContentSlice, m as AuthoredProjectionDiagnostic, rr as EditorSchemaValidationDiagnostic, su as Value, uc as SchemaPropertyDefinition, ws as RootKey } from "./index-BXjLmx1n-CXk17buG.js";
|
|
31
2
|
type EditorSchemaIdentity = Readonly<{
|
|
32
3
|
id: string;
|
|
33
4
|
version: number;
|
|
@@ -224,4 +195,4 @@ type HtmlApi<V extends Value = Value> = Readonly<{
|
|
|
224
195
|
parseSlice: (source: string, options?: HtmlEditorParseOptions) => HtmlSliceParseResult<V>;
|
|
225
196
|
serialize: (options?: HtmlEditorSerializeOptions) => HtmlSerializeResult;
|
|
226
197
|
}>;
|
|
227
|
-
export {
|
|
198
|
+
export { HtmlEditorSerializeOptions as a, HtmlParseLimits as c, HtmlSerializeResult as d, HtmlSliceParseResult as f, EditorApplicationSchema as h, HtmlEditorParseOptions as i, HtmlParseOptions as l, HtmlWarningDiagnostic as m, HtmlDiagnostic as n, HtmlErrorDiagnostic as o, HtmlSourceLocation as p, HtmlDocumentParseResult as r, HtmlModelLocation as s, HtmlApi as t, HtmlSerializeOptions as u };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as createEditorFixture, c as jsx, i as createEditor, n as HyperscriptEditorFixture, o as createHyperscript, r as HyperscriptShorthands, s as createText, t as HyperscriptCreators } from "../index-Dq3Jlj8O-BJ6NxZm0.js";
|
|
2
2
|
export { type HyperscriptCreators, type HyperscriptEditorFixture, type HyperscriptShorthands, createEditor, createEditorFixture, createHyperscript, createText, jsx };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./htmlTypes-
|
|
3
|
-
import { Ct as PluginTransaction,
|
|
1
|
+
import { Ca as NodeKey, Ci as Element, H as Descendant, Ht as EditorJsonValue, f as AnyEditor, fs as PropertyValueOptions, iu as TxDeclaredMethod, ji as ElementOf, rs as PropertyNumberDescriptor, si as EditorUpdateContext, ss as PropertyStringDescriptor, su as Value, ts as PropertyJsonDescriptor, zs as SchemaElement } from "./index-BXjLmx1n-CXk17buG.js";
|
|
2
|
+
import "./htmlTypes-eT2ZGDAj.js";
|
|
3
|
+
import { Ct as PluginTransaction, Hr as BaseInputRule, La as ElementWith, Wa as BasePluginDefinition, _ as BasePlugin, b as BasePluginDefinitionInput, c as PLUGINS, ci as InsertDataInputRuleReadContext, ct as BlockInsertOptions, d as InferBaseEditorPlugins, f as InternalBaseEditorWithInstalledPlugins, lt as BlockUpsertOptions, mt as InternalInstalledSchemaDefinitionsProvider, qa as DefinitionOf, qr as DefinedInsertDataFollowUpInputRule, y as BasePluginContext } from "./core-BqR-fEDp.js";
|
|
4
4
|
declare const mediaElementProperties: {
|
|
5
5
|
width: PropertyJsonDescriptor<string | number, {
|
|
6
6
|
readonly validate: (value: unknown) => value is number | string;
|
|
@@ -939,8 +939,10 @@ type MediaEmbedPluginState = MediaPluginState & {
|
|
|
939
939
|
transformUrl: (url: string) => string;
|
|
940
940
|
};
|
|
941
941
|
/**
|
|
942
|
-
*
|
|
943
|
-
*
|
|
942
|
+
* Embeds third-party media. Links to YouTube, Vimeo, Dailymotion, Youku and
|
|
943
|
+
* Coub videos are stored as each provider's player URL, and X (Twitter) post
|
|
944
|
+
* links as the post URL. Any other URL is stored as `transformUrl` returns it;
|
|
945
|
+
* the default takes the `src` out of a pasted `<iframe>` snippet.
|
|
944
946
|
*/
|
|
945
947
|
declare const BaseMediaEmbedPlugin: BasePlugin<Readonly<{
|
|
946
948
|
readonly __pluginWritableProperties: Readonly<{
|
|
@@ -1077,6 +1079,293 @@ declare const BaseMediaEmbedPlugin: BasePlugin<Readonly<{
|
|
|
1077
1079
|
upsert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockUpsertOptions) => boolean>;
|
|
1078
1080
|
};
|
|
1079
1081
|
}>> & Readonly<Record<never, never>>;
|
|
1082
|
+
/** Input rules that turn a pasted provider link into a media embed. */
|
|
1083
|
+
declare const MediaEmbedRules: {
|
|
1084
|
+
/**
|
|
1085
|
+
* A provider link pasted alone on an empty paragraph becomes a media embed
|
|
1086
|
+
* above that paragraph, as its own undo step after the paste. The paragraph
|
|
1087
|
+
* stays, empty.
|
|
1088
|
+
*/
|
|
1089
|
+
autoEmbed: ({ variant: _, ...options }: {
|
|
1090
|
+
variant: 'paste';
|
|
1091
|
+
} & BaseInputRule<InsertDataInputRuleReadContext>) => DefinedInsertDataFollowUpInputRule<{
|
|
1092
|
+
id: string;
|
|
1093
|
+
key: NodeKey;
|
|
1094
|
+
linkType: string | undefined;
|
|
1095
|
+
paragraphType: string;
|
|
1096
|
+
provider: string;
|
|
1097
|
+
root: string | undefined;
|
|
1098
|
+
view: AnyEditor<any, any>;
|
|
1099
|
+
}, InternalBaseEditorWithInstalledPlugins<Value, InferBaseEditorPlugins<BasePlugin<Readonly<{
|
|
1100
|
+
readonly __pluginWritableProperties: Readonly<{
|
|
1101
|
+
descriptor: PropertyStringDescriptor<PropertyValueOptions<string>>;
|
|
1102
|
+
key: "provider";
|
|
1103
|
+
localId: "provider";
|
|
1104
|
+
ownerName: "mediaEmbed";
|
|
1105
|
+
placement: "element";
|
|
1106
|
+
unaliased: true;
|
|
1107
|
+
value: string;
|
|
1108
|
+
}> | Readonly<{
|
|
1109
|
+
descriptor: PropertyStringDescriptor<{
|
|
1110
|
+
readonly validate: (value: unknown) => value is string;
|
|
1111
|
+
readonly validationVersion: 1;
|
|
1112
|
+
}>;
|
|
1113
|
+
key: "sourceUrl";
|
|
1114
|
+
localId: "sourceUrl";
|
|
1115
|
+
ownerName: "mediaEmbed";
|
|
1116
|
+
placement: "element";
|
|
1117
|
+
unaliased: true;
|
|
1118
|
+
value: string;
|
|
1119
|
+
}> | Readonly<{
|
|
1120
|
+
descriptor: PropertyStringDescriptor<{
|
|
1121
|
+
readonly required: true;
|
|
1122
|
+
readonly validate: (value: unknown) => value is string;
|
|
1123
|
+
readonly validationVersion: 1;
|
|
1124
|
+
}>;
|
|
1125
|
+
key: "url";
|
|
1126
|
+
localId: "url";
|
|
1127
|
+
ownerName: "mediaEmbed";
|
|
1128
|
+
placement: "element";
|
|
1129
|
+
unaliased: true;
|
|
1130
|
+
value: string;
|
|
1131
|
+
}> | Readonly<{
|
|
1132
|
+
descriptor: PropertyJsonDescriptor<string | number, {
|
|
1133
|
+
readonly validate: (value: unknown) => value is number | string;
|
|
1134
|
+
readonly validationVersion: 1;
|
|
1135
|
+
} & Readonly<{
|
|
1136
|
+
default?: string | number | undefined;
|
|
1137
|
+
generate?: (() => string | number) | undefined;
|
|
1138
|
+
omitDefault?: boolean;
|
|
1139
|
+
required?: boolean;
|
|
1140
|
+
}> & Readonly<{
|
|
1141
|
+
validate: (value: unknown) => value is string | number;
|
|
1142
|
+
validationVersion: number;
|
|
1143
|
+
}>>;
|
|
1144
|
+
key: "width";
|
|
1145
|
+
localId: "width";
|
|
1146
|
+
ownerName: "mediaEmbed";
|
|
1147
|
+
placement: "element";
|
|
1148
|
+
unaliased: true;
|
|
1149
|
+
value: string | number;
|
|
1150
|
+
}>;
|
|
1151
|
+
readonly schema: {
|
|
1152
|
+
readonly element: Readonly<{
|
|
1153
|
+
readonly object: true;
|
|
1154
|
+
readonly properties: {
|
|
1155
|
+
readonly width: PropertyJsonDescriptor<string | number, {
|
|
1156
|
+
readonly validate: (value: unknown) => value is number | string;
|
|
1157
|
+
readonly validationVersion: 1;
|
|
1158
|
+
} & Readonly<{
|
|
1159
|
+
default?: string | number | undefined;
|
|
1160
|
+
generate?: (() => string | number) | undefined;
|
|
1161
|
+
omitDefault?: boolean;
|
|
1162
|
+
required?: boolean;
|
|
1163
|
+
}> & Readonly<{
|
|
1164
|
+
validate: (value: unknown) => value is string | number;
|
|
1165
|
+
validationVersion: number;
|
|
1166
|
+
}>>;
|
|
1167
|
+
readonly url: PropertyStringDescriptor<{
|
|
1168
|
+
readonly required: true;
|
|
1169
|
+
readonly validate: (value: unknown) => value is string;
|
|
1170
|
+
readonly validationVersion: 1;
|
|
1171
|
+
}>;
|
|
1172
|
+
readonly provider: PropertyStringDescriptor<PropertyValueOptions<string>>;
|
|
1173
|
+
readonly sourceUrl: PropertyStringDescriptor<{
|
|
1174
|
+
readonly validate: (value: unknown) => value is string;
|
|
1175
|
+
readonly validationVersion: 1;
|
|
1176
|
+
}>;
|
|
1177
|
+
};
|
|
1178
|
+
} & {
|
|
1179
|
+
content: Readonly<{
|
|
1180
|
+
allowed: Readonly<{
|
|
1181
|
+
kind: 'any';
|
|
1182
|
+
rules: readonly [Readonly<{
|
|
1183
|
+
kind: 'text';
|
|
1184
|
+
}>, Readonly<{
|
|
1185
|
+
group: 'inline';
|
|
1186
|
+
kind: 'group';
|
|
1187
|
+
}>];
|
|
1188
|
+
}>;
|
|
1189
|
+
prefix?: readonly Readonly<{
|
|
1190
|
+
element: string | Readonly<{
|
|
1191
|
+
source: string;
|
|
1192
|
+
type: string;
|
|
1193
|
+
}>;
|
|
1194
|
+
properties?: Readonly<Record<string, EditorJsonValue>>;
|
|
1195
|
+
}>[] | undefined;
|
|
1196
|
+
} & Readonly<{
|
|
1197
|
+
default: 'text';
|
|
1198
|
+
min: 1;
|
|
1199
|
+
}> & Readonly<{
|
|
1200
|
+
'~schema.content.rule'?: Readonly<{
|
|
1201
|
+
kind: 'any';
|
|
1202
|
+
rules: readonly [Readonly<{
|
|
1203
|
+
kind: 'text';
|
|
1204
|
+
}>, Readonly<{
|
|
1205
|
+
group: 'inline';
|
|
1206
|
+
kind: 'group';
|
|
1207
|
+
}>];
|
|
1208
|
+
}> | undefined;
|
|
1209
|
+
}>>;
|
|
1210
|
+
}>;
|
|
1211
|
+
};
|
|
1212
|
+
readonly name: "mediaEmbed";
|
|
1213
|
+
readonly api: {
|
|
1214
|
+
insertUrl: (getUrl: () => string | null | undefined | Promise<string | null | undefined>, options?: BlockInsertOptions & {
|
|
1215
|
+
caption?: MediaInsertInput['caption'];
|
|
1216
|
+
}) => Promise<boolean>;
|
|
1217
|
+
normalizeUrl: (url: string) => MediaUrlProperties | undefined;
|
|
1218
|
+
};
|
|
1219
|
+
readonly commands: true;
|
|
1220
|
+
readonly formats: true;
|
|
1221
|
+
readonly initialState: {
|
|
1222
|
+
readonly isUrl: ((text: string) => boolean) | null;
|
|
1223
|
+
readonly transformUrl: ((url: string) => string) & ((url: string) => string);
|
|
1224
|
+
};
|
|
1225
|
+
readonly update: {
|
|
1226
|
+
insert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockInsertOptions) => boolean>;
|
|
1227
|
+
setUrl: TxDeclaredMethod<(input: {
|
|
1228
|
+
element: Element;
|
|
1229
|
+
url: string;
|
|
1230
|
+
}) => boolean>;
|
|
1231
|
+
upsert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockUpsertOptions) => boolean>;
|
|
1232
|
+
};
|
|
1233
|
+
}>> & Readonly<Record<never, never>>>, InternalInstalledSchemaDefinitionsProvider<InferBaseEditorPlugins<BasePlugin<Readonly<{
|
|
1234
|
+
readonly __pluginWritableProperties: Readonly<{
|
|
1235
|
+
descriptor: PropertyStringDescriptor<PropertyValueOptions<string>>;
|
|
1236
|
+
key: "provider";
|
|
1237
|
+
localId: "provider";
|
|
1238
|
+
ownerName: "mediaEmbed";
|
|
1239
|
+
placement: "element";
|
|
1240
|
+
unaliased: true;
|
|
1241
|
+
value: string;
|
|
1242
|
+
}> | Readonly<{
|
|
1243
|
+
descriptor: PropertyStringDescriptor<{
|
|
1244
|
+
readonly validate: (value: unknown) => value is string;
|
|
1245
|
+
readonly validationVersion: 1;
|
|
1246
|
+
}>;
|
|
1247
|
+
key: "sourceUrl";
|
|
1248
|
+
localId: "sourceUrl";
|
|
1249
|
+
ownerName: "mediaEmbed";
|
|
1250
|
+
placement: "element";
|
|
1251
|
+
unaliased: true;
|
|
1252
|
+
value: string;
|
|
1253
|
+
}> | Readonly<{
|
|
1254
|
+
descriptor: PropertyStringDescriptor<{
|
|
1255
|
+
readonly required: true;
|
|
1256
|
+
readonly validate: (value: unknown) => value is string;
|
|
1257
|
+
readonly validationVersion: 1;
|
|
1258
|
+
}>;
|
|
1259
|
+
key: "url";
|
|
1260
|
+
localId: "url";
|
|
1261
|
+
ownerName: "mediaEmbed";
|
|
1262
|
+
placement: "element";
|
|
1263
|
+
unaliased: true;
|
|
1264
|
+
value: string;
|
|
1265
|
+
}> | Readonly<{
|
|
1266
|
+
descriptor: PropertyJsonDescriptor<string | number, {
|
|
1267
|
+
readonly validate: (value: unknown) => value is number | string;
|
|
1268
|
+
readonly validationVersion: 1;
|
|
1269
|
+
} & Readonly<{
|
|
1270
|
+
default?: string | number | undefined;
|
|
1271
|
+
generate?: (() => string | number) | undefined;
|
|
1272
|
+
omitDefault?: boolean;
|
|
1273
|
+
required?: boolean;
|
|
1274
|
+
}> & Readonly<{
|
|
1275
|
+
validate: (value: unknown) => value is string | number;
|
|
1276
|
+
validationVersion: number;
|
|
1277
|
+
}>>;
|
|
1278
|
+
key: "width";
|
|
1279
|
+
localId: "width";
|
|
1280
|
+
ownerName: "mediaEmbed";
|
|
1281
|
+
placement: "element";
|
|
1282
|
+
unaliased: true;
|
|
1283
|
+
value: string | number;
|
|
1284
|
+
}>;
|
|
1285
|
+
readonly schema: {
|
|
1286
|
+
readonly element: Readonly<{
|
|
1287
|
+
readonly object: true;
|
|
1288
|
+
readonly properties: {
|
|
1289
|
+
readonly width: PropertyJsonDescriptor<string | number, {
|
|
1290
|
+
readonly validate: (value: unknown) => value is number | string;
|
|
1291
|
+
readonly validationVersion: 1;
|
|
1292
|
+
} & Readonly<{
|
|
1293
|
+
default?: string | number | undefined;
|
|
1294
|
+
generate?: (() => string | number) | undefined;
|
|
1295
|
+
omitDefault?: boolean;
|
|
1296
|
+
required?: boolean;
|
|
1297
|
+
}> & Readonly<{
|
|
1298
|
+
validate: (value: unknown) => value is string | number;
|
|
1299
|
+
validationVersion: number;
|
|
1300
|
+
}>>;
|
|
1301
|
+
readonly url: PropertyStringDescriptor<{
|
|
1302
|
+
readonly required: true;
|
|
1303
|
+
readonly validate: (value: unknown) => value is string;
|
|
1304
|
+
readonly validationVersion: 1;
|
|
1305
|
+
}>;
|
|
1306
|
+
readonly provider: PropertyStringDescriptor<PropertyValueOptions<string>>;
|
|
1307
|
+
readonly sourceUrl: PropertyStringDescriptor<{
|
|
1308
|
+
readonly validate: (value: unknown) => value is string;
|
|
1309
|
+
readonly validationVersion: 1;
|
|
1310
|
+
}>;
|
|
1311
|
+
};
|
|
1312
|
+
} & {
|
|
1313
|
+
content: Readonly<{
|
|
1314
|
+
allowed: Readonly<{
|
|
1315
|
+
kind: 'any';
|
|
1316
|
+
rules: readonly [Readonly<{
|
|
1317
|
+
kind: 'text';
|
|
1318
|
+
}>, Readonly<{
|
|
1319
|
+
group: 'inline';
|
|
1320
|
+
kind: 'group';
|
|
1321
|
+
}>];
|
|
1322
|
+
}>;
|
|
1323
|
+
prefix?: readonly Readonly<{
|
|
1324
|
+
element: string | Readonly<{
|
|
1325
|
+
source: string;
|
|
1326
|
+
type: string;
|
|
1327
|
+
}>;
|
|
1328
|
+
properties?: Readonly<Record<string, EditorJsonValue>>;
|
|
1329
|
+
}>[] | undefined;
|
|
1330
|
+
} & Readonly<{
|
|
1331
|
+
default: 'text';
|
|
1332
|
+
min: 1;
|
|
1333
|
+
}> & Readonly<{
|
|
1334
|
+
'~schema.content.rule'?: Readonly<{
|
|
1335
|
+
kind: 'any';
|
|
1336
|
+
rules: readonly [Readonly<{
|
|
1337
|
+
kind: 'text';
|
|
1338
|
+
}>, Readonly<{
|
|
1339
|
+
group: 'inline';
|
|
1340
|
+
kind: 'group';
|
|
1341
|
+
}>];
|
|
1342
|
+
}> | undefined;
|
|
1343
|
+
}>>;
|
|
1344
|
+
}>;
|
|
1345
|
+
};
|
|
1346
|
+
readonly name: "mediaEmbed";
|
|
1347
|
+
readonly api: {
|
|
1348
|
+
insertUrl: (getUrl: () => string | null | undefined | Promise<string | null | undefined>, options?: BlockInsertOptions & {
|
|
1349
|
+
caption?: MediaInsertInput['caption'];
|
|
1350
|
+
}) => Promise<boolean>;
|
|
1351
|
+
normalizeUrl: (url: string) => MediaUrlProperties | undefined;
|
|
1352
|
+
};
|
|
1353
|
+
readonly commands: true;
|
|
1354
|
+
readonly formats: true;
|
|
1355
|
+
readonly initialState: {
|
|
1356
|
+
readonly isUrl: ((text: string) => boolean) | null;
|
|
1357
|
+
readonly transformUrl: ((url: string) => string) & ((url: string) => string);
|
|
1358
|
+
};
|
|
1359
|
+
readonly update: {
|
|
1360
|
+
insert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockInsertOptions) => boolean>;
|
|
1361
|
+
setUrl: TxDeclaredMethod<(input: {
|
|
1362
|
+
element: Element;
|
|
1363
|
+
url: string;
|
|
1364
|
+
}) => boolean>;
|
|
1365
|
+
upsert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockUpsertOptions) => boolean>;
|
|
1366
|
+
};
|
|
1367
|
+
}>> & Readonly<Record<never, never>>>>, readonly []>>;
|
|
1368
|
+
};
|
|
1080
1369
|
type MediaEmbedDefinition = DefinitionOf<typeof BaseMediaEmbedPlugin>;
|
|
1081
1370
|
type MediaEmbedElement = ElementOf<typeof BaseMediaEmbedPlugin>;
|
|
1082
|
-
export {
|
|
1371
|
+
export { MediaUrlProperties as A, FileElement as C, MediaInsertInput as D, ImageInsertInput as E, defineMediaPlugin as F, mediaElementProperties as I, ResizableElement as M, VideoElement as N, MediaPluginState as O, VideoPluginState as P, BaseVideoPlugin as S, FilePluginState as T, AlignedMediaInsertInput as _, MediaEmbedRules as a, BaseAudioPlugin as b, VIDEO_PROVIDERS as c, parseTwitterUrl as d, parseVideoUrl as f, ImagePluginState as g, ImageElement as h, MediaEmbedPluginState as i, ProviderMediaInsertInput as j, MediaUrlKind as k, parseIframeUrl as l, ImageDefinition as m, MediaEmbedDefinition as n, EmbedUrlData as o, BaseImagePlugin as p, MediaEmbedElement as r, EmbedUrlParser as s, BaseMediaEmbedPlugin as t, parseMediaUrl as u, AudioElement as v, FileInsertInput as w, BaseFilePlugin as x, AudioPluginState as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { So as PluginFactoryTypeProvider, oo as Plugin, ps as Range, xo as PluginFactoryTypeLambda } from "./index-BXjLmx1n-CXk17buG.js";
|
|
2
2
|
import * as Y from "yjs";
|
|
3
3
|
/**
|
|
4
4
|
* Update policies for host adapters that import canonical `DocumentChange`
|
|
@@ -181,4 +181,4 @@ interface YjsFactoryType extends PluginFactoryTypeLambda {
|
|
|
181
181
|
declare function createYjsDescriptor<const TOptions extends YjsPluginOptions>(options: TOptions): YjsPluginForOptions<TOptions>;
|
|
182
182
|
/** Create one Yjs binding descriptor for an app-owned document. */
|
|
183
183
|
declare const yjs: typeof createYjsDescriptor & PluginFactoryTypeProvider<YjsFactoryType>;
|
|
184
|
-
export {
|
|
184
|
+
export { YjsBaseApi as a, YjsPluginOptions as c, YjsRemoteCursorData as d, YjsUpdatePolicy as f, YjsAwarenessState as i, YjsPresenceApi as l, YjsAwarenessChange as n, YjsCursorDataSchema as o, yjs as p, YjsAwarenessLike as r, YjsInitialReadiness as s, YjsAdmissionStatus as t, YjsRemoteCursor as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { h as TwoWayComparison } from "./comparison-types-
|
|
1
|
+
import { $a as Path, Ca as NodeKey, Ht as EditorJsonValue, Ji as Location, M as ContentSlice$1, Si as EditorViewOptions, Tt as EditorDocumentValue, as as PropertySetDescriptor, bc as SchemaPropertyTypeChangePolicy, bo as PluginDependencyReferenceFor, dc as SchemaPropertyExclusiveGroup, f as AnyEditor, gc as SchemaPropertyLandingPolicy, h as AuthoredProjectionRefusal, iu as TxDeclaredMethod, lc as SchemaPropertyCopyPolicy, oo as Plugin, ou as TxOnlyMethod, p as AuthoredDocumentProjection, ps as Range, qo as Point, su as Value, ts as PropertyJsonDescriptor, vc as SchemaPropertyRole, yc as SchemaPropertySplitPolicy } from "./index-BXjLmx1n-CXk17buG.js";
|
|
2
|
+
import { h as TwoWayComparison } from "./comparison-types-DdwE6mYq-BogsHoUO.js";
|
|
3
3
|
type FormatWrite = Readonly<{
|
|
4
4
|
kind: 'remove';
|
|
5
5
|
}> | Readonly<{
|
|
@@ -249,8 +249,8 @@ type AuthoredChange = Readonly<{
|
|
|
249
249
|
/** One semantic part of a change, derived only when its details are read. */
|
|
250
250
|
type AuthoredChangePart = Readonly<{
|
|
251
251
|
action: 'delete' | 'insert' | 'replace';
|
|
252
|
-
after: ContentSlice | null;
|
|
253
|
-
before: ContentSlice | null;
|
|
252
|
+
after: ContentSlice$1 | null;
|
|
253
|
+
before: ContentSlice$1 | null;
|
|
254
254
|
kind: 'content';
|
|
255
255
|
range: Range;
|
|
256
256
|
}> | Readonly<{
|
|
@@ -274,6 +274,27 @@ type AuthoredChangeDetails = Readonly<{
|
|
|
274
274
|
change: AuthoredChange;
|
|
275
275
|
parts: readonly AuthoredChangePart[];
|
|
276
276
|
}>;
|
|
277
|
+
/**
|
|
278
|
+
* One line of a card: a change's part, except that a property change reads
|
|
279
|
+
* once per card, without the text or element it formats.
|
|
280
|
+
*/
|
|
281
|
+
type AuthoredGroupPart = Exclude<AuthoredChangePart, Readonly<{
|
|
282
|
+
kind: 'properties';
|
|
283
|
+
}>> | Readonly<{
|
|
284
|
+
after: Readonly<Record<string, unknown>>;
|
|
285
|
+
before: Readonly<Record<string, unknown>>;
|
|
286
|
+
kind: 'properties';
|
|
287
|
+
}>;
|
|
288
|
+
/**
|
|
289
|
+
* What a card shows, read across its changes in document order: a deletion
|
|
290
|
+
* and a touching insertion from the next change read as one replacement, and
|
|
291
|
+
* equal property changes read once.
|
|
292
|
+
*/
|
|
293
|
+
type AuthoredGroupDetails = Readonly<{
|
|
294
|
+
/** The changes read, in document order. */
|
|
295
|
+
changes: readonly AuthoredChange[];
|
|
296
|
+
parts: readonly AuthoredGroupPart[];
|
|
297
|
+
}>;
|
|
277
298
|
/**
|
|
278
299
|
* Adjacent pending changes by one author that one card shows, such as a
|
|
279
300
|
* deletion and the insertion that replaces it. Its id is its oldest change by
|
|
@@ -392,6 +413,15 @@ type AuthoredRead = {
|
|
|
392
413
|
*/
|
|
393
414
|
changes: (query?: AuthoredQuery) => AuthoredPage;
|
|
394
415
|
details: (id: string) => AuthoredChangeDetails | null;
|
|
416
|
+
/**
|
|
417
|
+
* What the card holding a pending change shows, from its first `limit`
|
|
418
|
+
* changes in document order, or all of them without one. Null when the id
|
|
419
|
+
* names no pending change. A limit that is not a positive safe integer
|
|
420
|
+
* throws.
|
|
421
|
+
*/
|
|
422
|
+
groupDetails: (changeId: string, options?: Readonly<{
|
|
423
|
+
limit?: number;
|
|
424
|
+
}>) => AuthoredGroupDetails | null;
|
|
395
425
|
/**
|
|
396
426
|
* The cards touching a place of the document the view shows, in document
|
|
397
427
|
* order. On a preview `at` is a node's key or path, as `AuthoredQuery.at`
|
|
@@ -525,4 +555,4 @@ declare function projectAuthoredDocument(document: EditorDocumentValue, options:
|
|
|
525
555
|
* the projection keeps none of its content.
|
|
526
556
|
*/
|
|
527
557
|
declare const projectAuthoredRange: (document: EditorDocumentValue, projected: EditorDocumentValue, range: Range) => Range | null;
|
|
528
|
-
export {
|
|
558
|
+
export { projectAuthoredDocument as C, AuthoredView as S, proposeAuthoredComparison as T, AuthoredPlugin as _, AuthoredChangePart as a, AuthoredResult as b, AuthoredDecision as c, AuthoredGroupPart as d, AuthoredMark as f, AuthoredPlaceError as g, AuthoredPage as h, AuthoredChangeKind as i, AuthoredFormatProjection as l, AuthoredOutcome as m, AuthoredChangeDetails as n, AuthoredChangesDelta as o, AuthoredOptions as p, AuthoredChangeGroup as r, AuthoredComparisonImportResult as s, AuthoredChange as t, AuthoredGroupDetails as u, AuthoredQuery as v, projectAuthoredRange as w, AuthoredReview as x, AuthoredRefusal as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as Editor } from "./core-
|
|
1
|
+
import { $a as Path, aa as Node } from "./index-BXjLmx1n-CXk17buG.js";
|
|
2
|
+
import { u as Editor } from "./core-BqR-fEDp.js";
|
|
3
3
|
import { FocusableElement } from "tabbable";
|
|
4
4
|
type TabbableEntry = {
|
|
5
5
|
domNode: FocusableElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ca as NodeKey, ps as Range, s as Anchor } from "./index-BXjLmx1n-CXk17buG.js";
|
|
2
2
|
type ViewSourcePhase = 'project' | 'read' | 'resolve';
|
|
3
3
|
/** Diagnostic emitted when an optional view source is deactivated. */
|
|
4
4
|
type ViewSourceError = Readonly<{
|
|
@@ -41,6 +41,12 @@ type AnnotationRefreshOptions = Readonly<{
|
|
|
41
41
|
reason?: 'annotation' | 'external' | 'refresh';
|
|
42
42
|
}>;
|
|
43
43
|
type AnnotationStoreOptions = Readonly<{
|
|
44
|
+
/**
|
|
45
|
+
* Resolve an annotation whose range covers no letter and no whole void to
|
|
46
|
+
* `range: null`. It still follows the nodes its range touches, so an edit
|
|
47
|
+
* there that brings content back resolves it again.
|
|
48
|
+
*/
|
|
49
|
+
hideEmpty?: boolean;
|
|
44
50
|
id?: string;
|
|
45
51
|
onError?: ViewSourceErrorSink;
|
|
46
52
|
}>;
|