platejs 54.0.0-beta.2 → 54.0.0-beta.3
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-DY104TqL.d.ts} +2 -2
- package/dist/{BaseSuggestionPlugin-DBl3fqnm.d.ts → BaseSuggestionPlugin-Deo6n6Fs.d.ts} +7 -3
- package/dist/{PlateStatic-DhNv2ejp.d.ts → PlateStatic-CJX5bKuv.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-DAOYWuvC.d.ts} +2 -2
- package/dist/{comparison-types-CYnJ35qU.d.ts → comparison-types-Dt-unJZY-DCddmbSD.d.ts} +10 -2
- package/dist/compiler/index.d.ts +2 -2
- package/dist/{core-BJG8l_mk.d.ts → core-ClHasORr.d.ts} +433 -95
- 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 +4 -2
- package/dist/docs/api/core/plate-plugin.md +3 -0
- package/dist/docs/api/core/plate-store.md +3 -3
- package/dist/docs/api/dom.md +14 -4
- package/dist/docs/api/editor-transforms.md +2 -1
- package/dist/docs/api/react-hooks.md +25 -11
- package/dist/docs/authored-changes.md +5 -2
- package/dist/docs/basic-blocks.md +42 -29
- package/dist/docs/blockquote.md +5 -3
- package/dist/docs/board.md +63 -8
- package/dist/docs/code-block.md +47 -0
- package/dist/docs/discussion.md +1 -1
- package/dist/docs/docx.md +1 -1
- package/dist/docs/dom-coverage.md +5 -0
- 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 +176 -8
- package/dist/docs/plugin-components.md +13 -10
- package/dist/docs/plugin-input-rules.md +4 -12
- 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 +29 -5
- package/dist/docx/export/lib/reviewPart.js +1 -1
- package/dist/docx/export/lib/reviewProjection.js +10 -8
- 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/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 +10 -10
- package/dist/features/field/index.d.ts +2 -0
- package/dist/features/field/index.js +2 -0
- package/dist/features/field/lib/BaseFieldPlugin.js +414 -0
- package/dist/features/field/lib/fieldRules.internal.js +42 -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 +533 -62
- 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 +1 -1
- package/dist/features/media/lib/media/parseMediaUrl.js +11 -1
- package/dist/features/media/lib/media-embed/BaseMediaEmbedPlugin.js +6 -2
- 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 +14 -8
- 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-cg_cWsaN.d.ts} +2 -31
- package/dist/hyperscript/index.d.ts +1 -1
- package/dist/{index-D1CFXA-i.d.ts → index-8WO2vI0U.d.ts} +475 -143
- package/dist/{index-DaM37gF6.d.ts → index-B5mYEawV.d.ts} +37 -21
- package/dist/{index-Bq3sdm3S.d.ts → index-BZWFoUXt.d.ts} +5 -4
- package/dist/{index-DdIRduDG.d.ts → index-C0POz7rg.d.ts} +3 -2
- package/dist/{index-Bxfvicyy.d.ts → index-C1_JIhL4.d.ts} +4 -3
- package/dist/{index-DC_MNGyu.d.ts → index-C35V_hj0.d.ts} +3 -3
- package/dist/{index-kLKMc-pI.d.ts → index-C6ql9pKw.d.ts} +2 -2
- package/dist/{index-hsC_sOn2.d.ts → index-C9DiGDVj.d.ts} +35 -5
- package/dist/{index-DTgaSxKr.d.ts → index-CLsEe3LY.d.ts} +40 -4
- package/dist/{index-CT7miqQN.d.ts → index-CdOLsPaW.d.ts} +29 -9
- package/dist/{index-DLA2DUR2.d.ts → index-CktYvOgk.d.ts} +4 -3
- package/dist/{index-BBKGrsG3.d.ts → index-Cmuluh6f.d.ts} +1 -1
- package/dist/{index-BiQerPJS.d.ts → index-CzLwBZpY.d.ts} +2 -2
- package/dist/{index-DzD6BIFJ.d.ts → index-D3-2iM1b.d.ts} +7 -5
- package/dist/{index-Cl77E9yr.d.ts → index-DKOFvteF.d.ts} +2 -2
- package/dist/{index-iaZOhA76.d.ts → index-DPWyk3lG-DOYwohXO.d.ts} +1 -1
- package/dist/index-DQnjqtQa.d.ts +678 -0
- package/dist/{index-CcZbqPqk.d.ts → index-Do9pj1GK.d.ts} +73 -39
- package/dist/{index-BU6k1Aev.d.ts → index-DpltOCot-A2b3p3Eb.d.ts} +4735 -4586
- package/dist/{index-Bc2Yg_2j.d.ts → index-HPYawTae-BCUQLEWF.d.ts} +2 -2
- package/dist/{index-BkR7-GLI.d.ts → index-baQOK89E.d.ts} +2 -2
- package/dist/{index-D5W-p9bS.d.ts → index-oIJAZxc2.d.ts} +49 -4
- package/dist/{index-xdmCBvlT.d.ts → index-r7yb77Wy.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 +8 -2
- 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 +5 -15
- package/dist/lib/plugins/input-rules/inputRuleVeto.internal.js +16 -0
- package/dist/markdown/index.d.ts +2 -2
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/lib/MarkdownPlugin.js +16 -9
- package/dist/markdown/lib/RawHtmlPlugin.js +24 -0
- package/dist/markdown/lib/deserializer/mdastToSlate.js +12 -2
- package/dist/markdown/lib/internal/markdownConversion.js +773 -74
- package/dist/markdown/lib/internal/markdownDiagnostics.js +18 -7
- 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 +314 -0
- package/dist/markdown/lib/internal/markdownSegments.js +57 -48
- package/dist/markdown/lib/internal/markdownTags.js +22 -8
- 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/pagination/index.d.ts +1 -1
- package/dist/pagination/react/index.d.ts +4 -4
- package/dist/react/components/EditorContentView.internal.js +17 -8
- package/dist/react/components/EditorProvider.js +5 -5
- package/dist/react/components/Plate.js +103 -122
- 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/boardGesture.internal.js +6 -3
- package/dist/react/features/board/boardIndex.internal.js +7 -18
- package/dist/react/features/board/boardPictures.internal.js +19 -13
- package/dist/react/features/board/boardView.internal.js +184 -49
- package/dist/react/features/board/boardVoice.internal.js +10 -11
- package/dist/react/features/board/index.d.ts +64 -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 +34 -0
- package/dist/react/features/field/index.d.ts +312 -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 -29
- 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 +331 -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 +8 -7
- 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 +425 -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 +66 -21
- 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-aUwpNnAw.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,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Mo as PluginReference, Tt as EditorDocumentValue, Xn as EditorSchemaRepairCode, j as ContentSlice, m as AuthoredProjectionDiagnostic, nr as EditorSchemaValidationDiagnostic, ru as Value, xs as RootKey } from "./index-DpltOCot-A2b3p3Eb.js";
|
|
2
|
+
import { h as EditorApplicationSchema } from "./htmlTypes-cg_cWsaN.js";
|
|
3
|
+
import { Ga as DefinitionOf, _ as BasePlugin, u as Editor } from "./core-ClHasORr.js";
|
|
4
4
|
import { Association, Blockquote, Break, Code, Emphasis, Heading, Html, Image, InlineCode, Link, List, ListItem, Nodes, Paragraph, Parents, PhrasingContent, Root, Strong, TableCell, TableRow, Text, ThematicBreak } from "mdast";
|
|
5
5
|
import "mdast-util-math";
|
|
6
6
|
import { MdxJsxFlowElement, MdxJsxTextElement } from "mdast-util-mdx";
|
|
7
7
|
import { Node, Point } from "unist";
|
|
8
8
|
import { Options } from "remark-stringify";
|
|
9
9
|
import { Processor, Transformer } from "unified";
|
|
10
|
+
import "parse5";
|
|
10
11
|
type MarkdownParseLimits = Readonly<{
|
|
11
12
|
maxBytes: number;
|
|
12
13
|
maxDepth: number;
|
|
@@ -40,7 +41,27 @@ type PolicyDiagnostic<T extends object> = Readonly<T & {
|
|
|
40
41
|
}> | Readonly<T & {
|
|
41
42
|
severity: 'warning';
|
|
42
43
|
}>;
|
|
43
|
-
|
|
44
|
+
/**
|
|
45
|
+
* A Markdown file's leading front matter block, stored at
|
|
46
|
+
* `meta['markdown.frontmatter']`: its format and the text between its fences,
|
|
47
|
+
* with LF line endings.
|
|
48
|
+
*/
|
|
49
|
+
type MarkdownFrontmatter = Readonly<{
|
|
50
|
+
format: 'toml' | 'yaml';
|
|
51
|
+
value: string;
|
|
52
|
+
}>;
|
|
53
|
+
type MarkdownDiagnostic = AuthoredProjectionDiagnostic | PolicyDiagnostic<{
|
|
54
|
+
code: 'markdown-frontmatter-omitted';
|
|
55
|
+
impact: 'lossy';
|
|
56
|
+
message: string;
|
|
57
|
+
/**
|
|
58
|
+
* `shape` when the stored block is not an object whose keys are exactly
|
|
59
|
+
* a string `format` and a string `value`, `format` when the format is
|
|
60
|
+
* neither `yaml` nor `toml`, and `unreadable` when the written block
|
|
61
|
+
* would not read back as the same value.
|
|
62
|
+
*/
|
|
63
|
+
reason: 'format' | 'shape' | 'unreadable';
|
|
64
|
+
}> | Readonly<{
|
|
44
65
|
actual: number;
|
|
45
66
|
code: 'markdown-inline-blocks';
|
|
46
67
|
message: string;
|
|
@@ -158,8 +179,12 @@ type MarkdownParsePolicy = Readonly<{
|
|
|
158
179
|
lossPolicy?: 'allow' | 'reject';
|
|
159
180
|
/**
|
|
160
181
|
* The source is an unfinished stream prefix, such as a streaming AI answer.
|
|
161
|
-
* A trailing tag that has not finished arriving is hidden
|
|
162
|
-
*
|
|
182
|
+
* A trailing tag that has not finished arriving is hidden. `parse`,
|
|
183
|
+
* `parseSlice` and `parseInline` also show a bold, italic or strikethrough
|
|
184
|
+
* run that has not closed yet styled as it will read once it closes, and
|
|
185
|
+
* hide up to three trailing `*`, `_`, `~` or `\` characters in all until
|
|
186
|
+
* the next characters decide them, so a later chunk can take back styling a
|
|
187
|
+
* preview showed. Use a final parse once the stream completes.
|
|
163
188
|
*/
|
|
164
189
|
partial?: boolean;
|
|
165
190
|
}>;
|
|
@@ -193,6 +218,13 @@ type MarkdownSerializeOptions = MarkdownSerializePolicy & Readonly<{
|
|
|
193
218
|
type MarkdownEditorSerializeOptions<V extends Value = Value> = MarkdownSerializePolicy & Readonly<{
|
|
194
219
|
document?: EditorDocumentValue<V>;
|
|
195
220
|
}>;
|
|
221
|
+
/**
|
|
222
|
+
* The front matter block that a Markdown document parse stored on the
|
|
223
|
+
* document, or `undefined` when the stored value is missing or is not a
|
|
224
|
+
* `MarkdownFrontmatter`. The block comes back as stored; a document serialize
|
|
225
|
+
* is what checks that it can be written.
|
|
226
|
+
*/
|
|
227
|
+
declare const getMarkdownFrontmatter: (document: EditorDocumentValue) => MarkdownFrontmatter | undefined;
|
|
196
228
|
/**
|
|
197
229
|
* Get an identifier from an association to match it to others.
|
|
198
230
|
*
|
|
@@ -570,20 +602,6 @@ type ContainerPhrasing = (parent: PhrasingParents, info: Info) => string;
|
|
|
570
602
|
* Tracker.
|
|
571
603
|
*/
|
|
572
604
|
type CreateTracker = (info: TrackFields) => Tracker;
|
|
573
|
-
/**
|
|
574
|
-
* Whether to encode things — with fields representing the surrounding of a
|
|
575
|
-
* whole.
|
|
576
|
-
*/
|
|
577
|
-
interface EncodeSurrounding {
|
|
578
|
-
/**
|
|
579
|
-
* Whether to encode after.
|
|
580
|
-
*/
|
|
581
|
-
after: boolean;
|
|
582
|
-
/**
|
|
583
|
-
* Whether to encode before.
|
|
584
|
-
*/
|
|
585
|
-
before: boolean;
|
|
586
|
-
}
|
|
587
605
|
/**
|
|
588
606
|
* Enter something.
|
|
589
607
|
*
|
|
@@ -631,7 +649,9 @@ type Handlers = Record<Nodes['type'], Handle>;
|
|
|
631
649
|
* @returns
|
|
632
650
|
* Serialized markdown representing `node`.
|
|
633
651
|
*/
|
|
634
|
-
type Handle = (
|
|
652
|
+
type Handle = (
|
|
653
|
+
// type-coverage:ignore-next-line
|
|
654
|
+
node: any, parent: Parents | undefined, state: State, Info: Info) => string;
|
|
635
655
|
/**
|
|
636
656
|
* Pad serialized markdown.
|
|
637
657
|
*
|
|
@@ -745,7 +765,10 @@ interface Options$1 {
|
|
|
745
765
|
*/
|
|
746
766
|
closeAtx?: boolean | null | undefined;
|
|
747
767
|
/**
|
|
748
|
-
*
|
|
768
|
+
* Preferred marker to use for emphasis (default: `'*'`).
|
|
769
|
+
*
|
|
770
|
+
* The other marker is sometimes used, to form for example emphasis next to
|
|
771
|
+
* or inside of other emphasis (`*a*_b_`).
|
|
749
772
|
*/
|
|
750
773
|
emphasis?: '*' | '_' | null | undefined;
|
|
751
774
|
/**
|
|
@@ -822,7 +845,10 @@ interface Options$1 {
|
|
|
822
845
|
*/
|
|
823
846
|
setext?: boolean | null | undefined;
|
|
824
847
|
/**
|
|
825
|
-
*
|
|
848
|
+
* Preferred marker to use for strong (default: `'*'`).
|
|
849
|
+
*
|
|
850
|
+
* The other marker is sometimes used, to form for example strong next to or
|
|
851
|
+
* inside of other strong (`**a**__b__`).
|
|
826
852
|
*/
|
|
827
853
|
strong?: '*' | '_' | null | undefined;
|
|
828
854
|
/**
|
|
@@ -855,6 +881,14 @@ type PhrasingParents = Parents extends {
|
|
|
855
881
|
* Configuration for `safe`
|
|
856
882
|
*/
|
|
857
883
|
interface SafeConfig extends SafeFields {
|
|
884
|
+
/**
|
|
885
|
+
* Node directly after the value (optional).
|
|
886
|
+
*/
|
|
887
|
+
afterNode?: Nodes | undefined;
|
|
888
|
+
/**
|
|
889
|
+
* Node directly before the value (optional).
|
|
890
|
+
*/
|
|
891
|
+
beforeNode?: Nodes | undefined;
|
|
858
892
|
/**
|
|
859
893
|
* Extra characters that *must* be encoded (as character references) instead
|
|
860
894
|
* of escaped (character escapes) (optional).
|
|
@@ -909,18 +943,6 @@ interface State {
|
|
|
909
943
|
* Get an identifier from an association to match it to others.
|
|
910
944
|
*/
|
|
911
945
|
associationId: AssociationId;
|
|
912
|
-
/**
|
|
913
|
-
* Info on whether to encode the surrounding of *attention*.
|
|
914
|
-
*
|
|
915
|
-
* Whether attention (emphasis, strong, strikethrough) forms
|
|
916
|
-
* depends on the characters inside and outside them.
|
|
917
|
-
* The characters inside can be handled by *attention* itself.
|
|
918
|
-
* However the outside characters are already handled.
|
|
919
|
-
* Or handled afterwards.
|
|
920
|
-
* This field can be used to signal from *attention* that some parent
|
|
921
|
-
* function (practically `containerPhrasing`) has to handle the surrounding.
|
|
922
|
-
*/
|
|
923
|
-
attentionEncodeSurroundingInfo: EncodeSurrounding | undefined;
|
|
924
946
|
/**
|
|
925
947
|
* List marker currently in use.
|
|
926
948
|
*/
|
|
@@ -1054,17 +1076,25 @@ interface Unsafe {
|
|
|
1054
1076
|
* This is internal and must not be defined.
|
|
1055
1077
|
*/
|
|
1056
1078
|
_compiled?: RegExp | null | undefined;
|
|
1079
|
+
/**
|
|
1080
|
+
* `character` is bad when these nodes are after it (optional).
|
|
1081
|
+
*/
|
|
1082
|
+
afterNode?: Array<Nodes['type']> | Nodes['type'] | null | undefined;
|
|
1057
1083
|
/**
|
|
1058
1084
|
* `character` is bad when this is after it (optional).
|
|
1059
1085
|
*/
|
|
1060
1086
|
after?: string | null | undefined;
|
|
1061
1087
|
/**
|
|
1062
|
-
* `character` is bad at a break (
|
|
1088
|
+
* `character` is bad at a break (potentially w/ `before` between)
|
|
1089
|
+
* (optional).
|
|
1063
1090
|
*/
|
|
1064
1091
|
atBreak?: boolean | null | undefined;
|
|
1065
1092
|
/**
|
|
1066
|
-
* `character` is bad when
|
|
1067
|
-
|
|
1093
|
+
* `character` is bad when these nodes are before it (optional).
|
|
1094
|
+
*/
|
|
1095
|
+
beforeNode?: Array<Nodes['type']> | Nodes['type'] | null | undefined;
|
|
1096
|
+
/**
|
|
1097
|
+
* `character` is bad when this is before it (optional).
|
|
1068
1098
|
*/
|
|
1069
1099
|
before?: string | null | undefined;
|
|
1070
1100
|
/**
|
|
@@ -1079,6 +1109,10 @@ interface Unsafe {
|
|
|
1079
1109
|
* Constructs where this is fine again (optional).
|
|
1080
1110
|
*/
|
|
1081
1111
|
notInConstruct?: Array<ConstructName> | ConstructName | null | undefined;
|
|
1112
|
+
/**
|
|
1113
|
+
* Compile the regex with `u` (default: `false`).
|
|
1114
|
+
*/
|
|
1115
|
+
unicode?: boolean | null | undefined;
|
|
1082
1116
|
}
|
|
1083
1117
|
type MarkdownPluginState = {
|
|
1084
1118
|
/** Mark keys serialized as plain text. */
|
|
@@ -1181,4 +1215,4 @@ type MarkdownEditor<E = Editor, V extends Value = Value> = E & {
|
|
|
1181
1215
|
markdown: MarkdownApi<V>;
|
|
1182
1216
|
};
|
|
1183
1217
|
};
|
|
1184
|
-
export {
|
|
1218
|
+
export { MarkdownSerializeResult as C, MarkdownSyncPlugin as D, MarkdownSyncPluggable as E, MarkdownSyncTransformer as O, MarkdownSerializePolicy as S, MarkdownSourceLocation as T, MarkdownModelLocation as _, MarkdownPluginState as a, MarkdownParsePolicy as b, Handle as c, getMarkdownFrontmatter as d, MarkdownDiagnostic as f, MarkdownFrontmatter as g, MarkdownErrorDiagnostic as h, MarkdownPlugin as i, MarkdownWarningDiagnostic as k, Join as l, MarkdownEditorSerializeOptions as m, MarkdownDefinition as n, parseMarkdown as o, MarkdownDocumentParseResult as p, MarkdownEditor as r, serializeMarkdown as s, MarkdownApi as t, Unsafe as u, MarkdownParseLimits as v, MarkdownSliceParseResult as w, MarkdownSerializeOptions as x, MarkdownParseOptions as y };
|