@meowdown/core 0.82.0 → 0.83.1

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/dist/index.d.ts CHANGED
@@ -13,7 +13,6 @@ import "prosemirror-flat-list";
13
13
  import { render } from "katex";
14
14
  import { XPost, YouTubeVideo } from "@post-embed/types";
15
15
  import { VirtualElement } from "@floating-ui/dom";
16
- //#region src/extensions/frontmatter.d.ts
17
16
  /**
18
17
  * The raw YAML frontmatter body, stored verbatim (the text between the opening
19
18
  * and closing `---` fences, without a trailing newline).
@@ -23,8 +22,6 @@ import { VirtualElement } from "@floating-ui/dom";
23
22
  * - any other string is the body, which may contain newlines.
24
23
  */
25
24
  type Frontmatter = string | null;
26
- //#endregion
27
- //#region src/extensions/list.d.ts
28
25
  /**
29
26
  * The marker for a list item.
30
27
  *
@@ -47,8 +44,6 @@ interface MeowdownListAttrs extends ListAttrs {
47
44
  taskMarker?: TaskMarker | undefined;
48
45
  markerGap?: number | undefined;
49
46
  }
50
- //#endregion
51
- //#region src/extensions/table-column-align.d.ts
52
47
  /**
53
48
  * Column alignment of a GFM table, encoded by the delimiter row: `:--` for
54
49
  * left, `:-:` for center, `--:` for right.
@@ -84,8 +79,6 @@ type TableColumnAlignCommandsExtension = Extension<{
84
79
  };
85
80
  }>;
86
81
  type TableColumnAlignExtension = Union<[TableCellAlignExtension, TableHeaderCellAlignExtension, PlainExtension, TableColumnAlignCommandsExtension]>;
87
- //#endregion
88
- //#region src/extensions/code-block.d.ts
89
82
  type CodeBlockFenceStyle = 'tilde' | 'indented' | 'dollar';
90
83
  interface MeowdownCodeBlockAttrs extends CodeBlockAttrs$1 {
91
84
  /**
@@ -102,8 +95,6 @@ interface MeowdownCodeBlockAttrs extends CodeBlockAttrs$1 {
102
95
  */
103
96
  fenceLength?: number | null | undefined;
104
97
  }
105
- //#endregion
106
- //#region src/extensions/horizontal-rule.d.ts
107
98
  interface MeowdownHorizontalRuleAttrs {
108
99
  /**
109
100
  * The literal markdown marker of a thematic break, e.g. `***`, `___`, or
@@ -117,8 +108,6 @@ type HorizontalRuleMarkerExtension = Extension<{
117
108
  };
118
109
  }>;
119
110
  type MeowdownHorizontalRuleExtension = Union<[HorizontalRuleSpecExtension, HorizontalRuleCommandsExtension, HorizontalRuleMarkerExtension]>;
120
- //#endregion
121
- //#region src/extensions/html-comment.d.ts
122
111
  interface MeowdownHTMLCommentAttrs {
123
112
  /**
124
113
  * The literal markdown comment, including its delimiters, e.g.
@@ -152,8 +141,6 @@ type HTMLCommentExtension = Extension<{
152
141
  * invisible marker the cursor steps over rather than a block the user edits.
153
142
  */
154
143
  export declare function defineHTMLComment(): HTMLCommentExtension;
155
- //#endregion
156
- //#region src/extensions/inline-marks.d.ts
157
144
  /**
158
145
  * Attributes of the `mdImage` mark, derived from either `![alt](src "title")`
159
146
  * (plus an optional trailing size comment) or a resolved wiki image embed.
@@ -298,14 +285,10 @@ type MdPackAttrs = {
298
285
  revealInFocus?: null | undefined;
299
286
  revealInHide?: null | undefined;
300
287
  };
301
- //#endregion
302
- //#region src/utils/range.d.ts
303
288
  interface PositionRange {
304
289
  from: number;
305
290
  to: number;
306
291
  }
307
- //#endregion
308
- //#region src/extensions/get-link-unit-at.d.ts
309
292
  interface LinkUnitBase {
310
293
  state: EditorState;
311
294
  /**
@@ -357,8 +340,6 @@ type LinkUnit = (LinkUnitBase & {
357
340
  * the `mdLinkUri` run locates the `( )` body.
358
341
  */
359
342
  export declare function getLinkUnitAt(state: EditorState, pos: number): LinkUnit | undefined;
360
- //#endregion
361
- //#region src/extensions/link-commands.d.ts
362
343
  interface LinkAttrs {
363
344
  href?: string | undefined;
364
345
  title?: string | undefined;
@@ -407,8 +388,6 @@ interface LinkEditOptions {
407
388
  }
408
389
  type LinkEditHandler = (options: LinkEditOptions) => void;
409
390
  export declare function defineLinkEditKeymap(onLinkEdit: LinkEditHandler): PlainExtension;
410
- //#endregion
411
- //#region src/extensions/pending-replacement.d.ts
412
391
  /**
413
392
  * Where an accepted replacement lands relative to the source range.
414
393
  */
@@ -476,8 +455,6 @@ type PendingReplacementHandler = (event: PendingReplacementEvent) => void;
476
455
  * render the preview and know whether the stage was accepted or discarded.
477
456
  */
478
457
  export declare function definePendingReplacementHandler(handler: PendingReplacementHandler): PlainExtension;
479
- //#endregion
480
- //#region src/extensions/exit-boundary.d.ts
481
458
  /**
482
459
  * Payload for {@link ExitBoundaryHandler}.
483
460
  */
@@ -501,8 +478,6 @@ type ExitBoundaryHandler = (options: ExitBoundaryOptions) => boolean | void;
501
478
  * Call `onExitBoundary` when an arrow key press would leave the document boundary.
502
479
  */
503
480
  export declare function defineExitBoundaryHandler(getExitBoundaryHandler?: (state: EditorState) => ExitBoundaryHandler | undefined): PlainExtension;
504
- //#endregion
505
- //#region src/extensions/file-paste.d.ts
506
481
  type FilePasteHandler = (file: File) => string | undefined | Promise<string | undefined>;
507
482
  type FileSaveErrorHandler = (error: unknown, file: File) => void;
508
483
  /**
@@ -538,8 +513,6 @@ export declare function buildFileMarkdown(file: {
538
513
  * other file. Multiple files insert one link per line, in DataTransfer order.
539
514
  */
540
515
  export declare function defineFilePaste(getOptions?: (state: EditorState) => FilePasteOptions | undefined): PlainExtension;
541
- //#endregion
542
- //#region src/extensions/file-view.d.ts
543
516
  /**
544
517
  * Metadata a host resolves for one file link, shown on its pill.
545
518
  */
@@ -577,8 +550,6 @@ export declare function getFileKind(href: string): string;
577
550
  * clicks are reported through `defineFileClickHandler`.
578
551
  */
579
552
  export declare function defineFileView(getOptions?: (state: EditorState) => FileViewOptions): PlainExtension;
580
- //#endregion
581
- //#region src/extensions/file-click.d.ts
582
553
  /**
583
554
  * Payload for {@link FileClickHandler}.
584
555
  */
@@ -609,8 +580,6 @@ type FileClickHandler = (payload: FileClickPayload) => void;
609
580
  * click does (e.g. open the file in the OS default app).
610
581
  */
611
582
  export declare function defineFileClickHandler(getOnClick?: (state: EditorState) => FileClickHandler | undefined): PlainExtension;
612
- //#endregion
613
- //#region src/extensions/image-click.d.ts
614
583
  /**
615
584
  * Payload for {@link ImageClickHandler}.
616
585
  */
@@ -653,8 +622,6 @@ type ImageClickHandler = (payload: ImageClickPayload) => void;
653
622
  * (such as a lightbox).
654
623
  */
655
624
  export declare function defineImageClickHandler(getOnClick?: (state: EditorState) => ImageClickHandler | undefined): PlainExtension;
656
- //#endregion
657
- //#region src/extensions/link-click.d.ts
658
625
  interface LinkClickPayload {
659
626
  href: string;
660
627
  /**
@@ -678,8 +645,6 @@ type LinkCopyHandler = (payload: LinkCopyPayload) => void;
678
645
  * is the originating `MouseEvent` or `KeyboardEvent`.
679
646
  */
680
647
  export declare function defineLinkClickHandler(getOnClick?: (state: EditorState) => LinkClickHandler | undefined): PlainExtension;
681
- //#endregion
682
- //#region src/extensions/tag-click.d.ts
683
648
  interface TagClickPayload {
684
649
  /**
685
650
  * The tag name, without the leading `#`.
@@ -703,8 +668,6 @@ type TagClickHandler = (payload: TagClickPayload) => void;
703
668
  * without the leading `#`.
704
669
  */
705
670
  export declare function defineTagClickHandler(getOnClick?: (state: EditorState) => TagClickHandler | undefined): PlainExtension;
706
- //#endregion
707
- //#region src/extensions/wikilink-click.d.ts
708
671
  interface WikilinkHit {
709
672
  from: number;
710
673
  to: number;
@@ -729,8 +692,6 @@ type WikilinkClickHandler = (payload: WikilinkClickPayload) => void;
729
692
  * `MouseEvent` or `KeyboardEvent`.
730
693
  */
731
694
  export declare function defineWikilinkClickHandler(getOnClick?: (state: EditorState) => WikilinkClickHandler | undefined): PlainExtension;
732
- //#endregion
733
- //#region src/extensions/follow-link.d.ts
734
695
  interface FollowLinkHandlers {
735
696
  onWikilinkClick?: WikilinkClickHandler | undefined;
736
697
  onTagClick?: TagClickHandler | undefined;
@@ -754,8 +715,6 @@ interface FollowLinkHandlers {
754
715
  * itself.
755
716
  */
756
717
  export declare function defineFollowLinkHandler(getHandlers?: (state: EditorState) => FollowLinkHandlers): PlainExtension;
757
- //#endregion
758
- //#region src/extensions/post-embed.d.ts
759
718
  type XPostResolver = Resolver<XPost>;
760
719
  type YouTubeVideoResolver = Resolver<YouTubeVideo>;
761
720
  export declare const defaultResolveXPost: XPostResolver;
@@ -778,8 +737,6 @@ type PostEmbedSnapshot = {
778
737
  * snapshot is exactly what the card needs.
779
738
  */
780
739
  export declare function parsePostEmbedSnapshot(value: unknown): PostEmbedSnapshot | undefined;
781
- //#endregion
782
- //#region src/extensions/image.d.ts
783
740
  /**
784
741
  * Maps a markdown `src` to a displayable URL, or `undefined` to skip rendering
785
742
  * that image. May return a `Promise` when the answer needs data that is not
@@ -827,14 +784,10 @@ export declare function defaultResolveImageUrl(src: string): string | undefined;
827
784
  * plain Markdown.
828
785
  */
829
786
  export declare function defineImage(getOptions?: (state: EditorState) => ImageOptions | undefined): PlainExtension;
830
- //#endregion
831
- //#region src/extensions/mark-chunk.d.ts
832
787
  /**
833
788
  * Contiguous range with a uniform inline-mark set.
834
789
  */
835
790
  type MarkChunk = readonly [from: number, to: number, marks: readonly Mark[]];
836
- //#endregion
837
- //#region src/extensions/reference-links.d.ts
838
791
  interface ReferenceDefinition {
839
792
  key: string;
840
793
  href: string;
@@ -847,8 +800,6 @@ interface ReferenceDefinitionIndex {
847
800
  }
848
801
  export declare function isReferenceDefinitionNode(node: EditorNode, parent: EditorNode | null, index: number): boolean;
849
802
  export declare function collectReferenceDefinitions(doc: EditorNode): ReferenceDefinitionIndex;
850
- //#endregion
851
- //#region src/extensions/wiki-embed.d.ts
852
803
  /**
853
804
  * The parsed source payload of an Obsidian-style `![[target]]` embed.
854
805
  */
@@ -932,8 +883,6 @@ export declare function formatSizedWikiEmbed(target: string, width: number, heig
932
883
  * Last path component of a target, with a note heading/block fragment removed.
933
884
  */
934
885
  export declare function wikiEmbedBasename(target: string): string;
935
- //#endregion
936
- //#region src/extensions/wikilink.d.ts
937
886
  /**
938
887
  * What {@link WikilinkResolver} sees for one `[[...]]` wikilink.
939
888
  */
@@ -971,8 +920,6 @@ type WikilinkResolver = (link: WikilinkPayload) => WikilinkResolution | undefine
971
920
  interface WikilinkOptions {
972
921
  resolveWikilink?: WikilinkResolver | undefined;
973
922
  }
974
- //#endregion
975
- //#region src/extensions/inline-text-to-mark-chunks.d.ts
976
923
  /**
977
924
  * What {@link FileLinkResolver} sees for one `[label](url)` link.
978
925
  */
@@ -1050,8 +997,6 @@ text: string,
1050
997
  */
1051
998
  options?: InlineMarkOptions): MarkChunk[];
1052
999
  export declare function inlineTextToMarkChunksWithContext(marks: TypedMarkBuilders, text: string, options?: InlineMarkOptions, context?: InlineMarkContext): MarkChunk[];
1053
- //#endregion
1054
- //#region src/extensions/mark-mode.d.ts
1055
1000
  /**
1056
1001
  * Controls how markdown syntax characters are rendered and how the clipboard's
1057
1002
  * `text/plain` treats the inline layer (see `definePlainTextSerializer`).
@@ -1061,8 +1006,6 @@ export declare function inlineTextToMarkChunksWithContext(marks: TypedMarkBuilde
1061
1006
  * - 'show': syntax chars always visible (dim grey); copy keeps them.
1062
1007
  */
1063
1008
  type MarkMode = 'hide' | 'focus' | 'show';
1064
- //#endregion
1065
- //#region src/extensions/x-post-media-click.d.ts
1066
1009
  /**
1067
1010
  * Receives the `meowdown-embed-media-click` event of an X post card. Its
1068
1011
  * `detail` holds the activated photo or video, its sibling items, and the
@@ -1075,8 +1018,6 @@ type XPostMediaClickHandler = (event: XPostMediaClickEvent) => void;
1075
1018
  * card.
1076
1019
  */
1077
1020
  export declare function defineXPostMediaClickHandler(getOnClick?: (state: EditorState) => XPostMediaClickHandler | undefined): PlainExtension;
1078
- //#endregion
1079
- //#region src/extensions/youtube-video-click.d.ts
1080
1021
  /**
1081
1022
  * Receives the `meowdown-embed-youtube-click` event of a YouTube card. Its
1082
1023
  * `detail` holds the video, the player URL, and the rendered thumbnail
@@ -1088,8 +1029,6 @@ type YouTubeVideoClickHandler = (event: YouTubeVideoClickEvent) => void;
1088
1029
  * Call `onClick` when the user activates the poster of a YouTube card.
1089
1030
  */
1090
1031
  export declare function defineYouTubeVideoClickHandler(getOnClick?: (state: EditorState) => YouTubeVideoClickHandler | undefined): PlainExtension;
1091
- //#endregion
1092
- //#region src/extensions/editor-config-types.d.ts
1093
1032
  interface EditorConfig extends InlineMarkOptions, FollowLinkHandlers, FilePasteOptions, FileViewOptions, ImageOptions {
1094
1033
  markMode?: MarkMode | undefined;
1095
1034
  onExitBoundary?: ExitBoundaryHandler | undefined;
@@ -1144,8 +1083,6 @@ interface EditorConfig extends InlineMarkOptions, FollowLinkHandlers, FilePasteO
1144
1083
  ariaLabel?: string | undefined;
1145
1084
  editorClassName?: string | undefined;
1146
1085
  }
1147
- //#endregion
1148
- //#region src/extensions/extension.d.ts
1149
1086
  declare function defineEditorExtensionImpl(options: EditorExtensionOptions): import("@prosekit/core").Union<readonly [import("@prosekit/core").Extension<{
1150
1087
  Nodes: import("@prosekit/core").SimplifyDeeper<{
1151
1088
  paragraph: import("@prosekit/pm/model").Attrs;
@@ -1158,6 +1095,7 @@ declare function defineEditorExtensionImpl(options: EditorExtensionOptions): imp
1158
1095
  Nodes: {
1159
1096
  doc: {
1160
1097
  frontmatter?: Frontmatter | undefined;
1098
+ frontmatterTight?: boolean | undefined;
1161
1099
  };
1162
1100
  };
1163
1101
  }>, import("@prosekit/extensions/text").TextExtension, import("@prosekit/core").Union<readonly [import("@prosekit/extensions/blockquote").BlockquoteSpecExtension, import("@prosekit/extensions/blockquote").BlockquoteCommandsExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension]>, import("@prosekit/core").Union<readonly [import("@prosekit/extensions/list").ListSpecExtension, import("@prosekit/core").PlainExtension, import("@prosekit/extensions/list").ListCommandsExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").Extension<{
@@ -1213,7 +1151,11 @@ declare function defineEditorExtensionImpl(options: EditorExtensionOptions): imp
1213
1151
  Nodes: {
1214
1152
  tableHeaderCell: import("@prosekit/pm/model").Attrs;
1215
1153
  };
1216
- }>]>, TableColumnAlignExtension, import("@prosekit/core").PlainExtension, import("@prosekit/extensions/table").TableCommandsExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension]>, import("@prosekit/core").Union<readonly [import("@prosekit/extensions/code-block").CodeBlockSpecExtension, import("@prosekit/core").PlainExtension, import("@prosekit/extensions/code-block").CodeBlockCommandsExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").Extension<{
1154
+ }>]>, TableColumnAlignExtension, import("@prosekit/core").PlainExtension, import("@prosekit/extensions/table").TableCommandsExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension]>, import("@prosekit/core").Union<readonly [import("@prosekit/extensions/code-block").CodeBlockSpecExtension, import("@prosekit/core").Extension<{
1155
+ Nodes: {
1156
+ codeBlock: import("@prosekit/extensions/code-block").CodeBlockAttrs;
1157
+ };
1158
+ }>, import("@prosekit/core").PlainExtension, import("@prosekit/extensions/code-block").CodeBlockCommandsExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").Extension<{
1217
1159
  Nodes: {
1218
1160
  codeBlock: {
1219
1161
  fenceStyle?: CodeBlockFenceStyle | null | undefined;
@@ -1331,16 +1273,12 @@ type EditorExtension = ReturnType<typeof defineEditorExtensionImpl>;
1331
1273
  type EditorExtensionOptions = EditorConfig;
1332
1274
  export declare function defineEditorExtension(options?: EditorExtensionOptions): EditorExtension;
1333
1275
  type TypedEditor = Editor<EditorExtension>;
1334
- //#endregion
1335
- //#region src/extensions/schema.d.ts
1336
1276
  type TypedNodeBuilders = ExtractNodeBuilders<EditorExtension>;
1337
1277
  type TypedMarkBuilders = ExtractMarkBuilders<EditorExtension>;
1338
1278
  /**
1339
1279
  * Typed mark builders bound to the shared schema.
1340
1280
  */
1341
1281
  export declare const getMarkBuilders: () => TypedMarkBuilders;
1342
- //#endregion
1343
- //#region src/converters/md-to-pm.d.ts
1344
1282
  /**
1345
1283
  * Options for {@link markdownToDoc}.
1346
1284
  */
@@ -1369,8 +1307,6 @@ interface MarkdownToDocOptions {
1369
1307
  * inline-code characters survive verbatim.
1370
1308
  */
1371
1309
  export declare function markdownToDoc(markdown: string, options?: MarkdownToDocOptions): ProseMirrorNode;
1372
- //#endregion
1373
- //#region src/converters/pm-to-md.d.ts
1374
1310
  /**
1375
1311
  * Options for {@link docToMarkdown}.
1376
1312
  */
@@ -1384,8 +1320,6 @@ interface DocToMarkdownOptions {
1384
1320
  * Convert persisted editor content to Markdown through the shared block serializer.
1385
1321
  */
1386
1322
  export declare function docToMarkdown(node: ProseMirrorNode, options?: DocToMarkdownOptions): string;
1387
- //#endregion
1388
- //#region src/extensions/backspace-empty-first-block.d.ts
1389
1323
  /**
1390
1324
  * Nothing sits before the document's first block, so Backspace in an empty
1391
1325
  * first paragraph has nothing to join and does nothing. When this extension is
@@ -1393,16 +1327,12 @@ export declare function docToMarkdown(node: ProseMirrorNode, options?: DocToMark
1393
1327
  * the document moves up one line.
1394
1328
  */
1395
1329
  export declare function defineBackspaceEmptyFirstBlock(enabled?: (state: EditorState) => boolean): PlainExtension;
1396
- //#endregion
1397
- //#region src/extensions/bullet-after-heading.d.ts
1398
1330
  /**
1399
1331
  * "Type a title, press Return, start bullets." When this extension is applied,
1400
1332
  * pressing Enter at the end of the document's first heading (the title line)
1401
1333
  * drops the caret into a fresh empty bullet instead of a plain paragraph.
1402
1334
  */
1403
1335
  export declare function defineBulletAfterHeading(enabled?: (state: EditorState) => boolean): PlainExtension;
1404
- //#endregion
1405
- //#region src/extensions/code-block-highlight.d.ts
1406
1336
  /**
1407
1337
  * Adds syntax highlighting to `codeBlock` nodes, parsing each block with the
1408
1338
  * matching CodeMirror/Lezer grammar (loaded on demand from
@@ -1421,8 +1351,6 @@ type CodeToken = readonly [from: number, to: number, classes: string];
1421
1351
  * must load on demand. Returns `[]` for an empty or unsupported language.
1422
1352
  */
1423
1353
  export declare function getCodeTokens(code: string, language: string): CodeToken[] | Promise<CodeToken[]>;
1424
- //#endregion
1425
- //#region src/extensions/code-block-languages.d.ts
1426
1354
  type LanguageItem = {
1427
1355
  label: string;
1428
1356
  value: string;
@@ -1431,17 +1359,11 @@ type LanguageItem = {
1431
1359
  * A list of languages for code block syntax-highlight.
1432
1360
  */
1433
1361
  export declare const codeBlockLanguages: ReadonlyArray<LanguageItem>;
1434
- //#endregion
1435
- //#region src/extensions/editor-config-getter.d.ts
1436
1362
  /**
1437
1363
  * Read the current configuration. Callback values are live, not historical state snapshots.
1438
1364
  */
1439
1365
  export declare function getEditorConfig(state: EditorState): Readonly<EditorConfig>;
1440
- //#endregion
1441
- //#region src/extensions/editor-config.d.ts
1442
1366
  export declare function updateEditorConfig(editor: Pick<Editor, 'state' | 'view' | 'mounted' | 'updateState'>, patch: Partial<EditorConfig>): void;
1443
- //#endregion
1444
- //#region src/extensions/embed-paste.d.ts
1445
1367
  /**
1446
1368
  * Auto-embed a pasted tweet or YouTube link. When the clipboard holds exactly
1447
1369
  * one such URL, the link is rewritten to `![](url)`, which the image pipeline
@@ -1449,8 +1371,6 @@ export declare function updateEditorConfig(editor: Pick<Editor, 'state' | 'view'
1449
1371
  * or install this standalone extension.
1450
1372
  */
1451
1373
  export declare function defineEmbedPaste(enabled?: (state: EditorState) => boolean): PlainExtension;
1452
- //#endregion
1453
- //#region src/extensions/key-bindings.d.ts
1454
1374
  /**
1455
1375
  * Human-readable descriptions of the editor's formatting and heading shortcuts.
1456
1376
  */
@@ -1483,14 +1403,10 @@ export declare const EDITOR_KEY_BINDINGS: {
1483
1403
  readonly 'Mod-Shift-ArrowDown': "Select to the document end";
1484
1404
  readonly Escape: "Collapse the selection";
1485
1405
  };
1486
- //#endregion
1487
- //#region src/extensions/mark-hover.d.ts
1488
1406
  interface MarkHoverHit<Payload> {
1489
1407
  payload: Payload;
1490
1408
  element: HTMLElement;
1491
1409
  }
1492
- //#endregion
1493
- //#region src/extensions/link-hover.d.ts
1494
1410
  type LinkHoverHandler = (hit: MarkHoverHit<LinkUnit> | undefined) => void;
1495
1411
  interface LinkHoverOptions {
1496
1412
  /**
@@ -1513,8 +1429,6 @@ export declare function defineLinkHoverHandler(onHoverChange: LinkHoverHandler,
1513
1429
  * pending hover cannot reopen the UI.
1514
1430
  */
1515
1431
  export declare function dismissLinkHover(state: EditorState): void;
1516
- //#endregion
1517
- //#region src/extensions/link-paste.d.ts
1518
1432
  /**
1519
1433
  * Paste a URL over selected text to wrap the selection as a Markdown link
1520
1434
  * `[selected text](url)`. Only fires when the clipboard holds exactly one URL
@@ -1529,8 +1443,6 @@ export declare function dismissLinkHover(state: EditorState): void;
1529
1443
  * standalone extension.
1530
1444
  */
1531
1445
  export declare function defineLinkPaste(enabled?: (state: EditorState) => boolean): PlainExtension;
1532
- //#endregion
1533
- //#region src/extensions/link-preview.d.ts
1534
1446
  /**
1535
1447
  * Metadata a host application can supply for a web link.
1536
1448
  */
@@ -1545,43 +1457,29 @@ interface LinkPreview {
1545
1457
  * instead of cancelling in-flight work.
1546
1458
  */
1547
1459
  type LinkPreviewResolver = (href: string) => LinkPreview | undefined | Promise<LinkPreview | undefined>;
1548
- //#endregion
1549
- //#region src/extensions/mark-names.d.ts
1550
1460
  declare const MARK_NAMES: readonly ["mdWikilink", "mdImage", "mdFile", "mdMath", "mdMark", "mdEm", "mdStrong", "mdCode", "mdLinkText", "mdLinkUri", "mdLinkTitle", "mdDel", "mdHighlight", "mdTag", "mdPack"];
1551
1461
  type MarkName = (typeof MARK_NAMES)[number];
1552
1462
  export declare function isMarkOfType(mark: Mark, name: MarkName): boolean;
1553
- //#endregion
1554
- //#region src/extensions/math.d.ts
1555
1463
  /**
1556
1464
  * Inline math rendering: a KaTeX preview on the `mdMath` mark.
1557
1465
  */
1558
1466
  export declare function defineMath(): PlainExtension;
1559
- //#endregion
1560
- //#region src/extensions/node-names.d.ts
1561
1467
  /**
1562
1468
  * Every ProseMirror node name the editor schema knows about.
1563
1469
  */
1564
1470
  declare const NODE_NAMES: readonly ["doc", "text", "paragraph", "heading", "blockquote", "list", "codeBlock", "horizontalRule", "htmlComment", "table", "tableRow", "tableCell", "tableHeaderCell"];
1565
1471
  type NodeName = (typeof NODE_NAMES)[number];
1566
1472
  export declare function isNodeOfType(node: ProseMirrorNode, name: NodeName): boolean;
1567
- //#endregion
1568
- //#region src/extensions/readonly.d.ts
1569
1473
  export declare function defineReadonly(getReadonly?: (state: EditorState) => boolean): PlainExtension;
1570
- //#endregion
1571
- //#region src/extensions/substitution.d.ts
1572
1474
  /**
1573
1475
  * Apply the editor's automatic plain-text substitutions.
1574
1476
  */
1575
1477
  export declare function defineSubstitution(enabled?: (state: EditorState) => boolean): PlainExtension;
1576
- //#endregion
1577
- //#region src/extensions/table.d.ts
1578
1478
  /**
1579
1479
  * Whether the selection sits inside a table cell (data or header). Useful for
1580
1480
  * gating block-creating UI, since cells hold inline content only.
1581
1481
  */
1582
1482
  export declare function isSelectionInTableCell(state: EditorState): boolean;
1583
- //#endregion
1584
- //#region src/extensions/view-attributes.d.ts
1585
1483
  /**
1586
1484
  * Add DOM attributes to the editable root. `class` and `style` values from
1587
1485
  * every such extension are combined, so applying this more than once adds
@@ -1592,8 +1490,6 @@ export declare function defineViewAttributes(attributes: {
1592
1490
  } | ((state: EditorState) => {
1593
1491
  [name: string]: string;
1594
1492
  })): PlainExtension;
1595
- //#endregion
1596
- //#region src/extensions/virtual-caret.d.ts
1597
1493
  /**
1598
1494
  * Draws the caret as an overlay element and hides the native caret via CSS
1599
1495
  * (`caret-color: transparent`). The native DOM selection stays fully alive,
@@ -1611,8 +1507,6 @@ export declare function defineViewAttributes(attributes: {
1611
1507
  * content.
1612
1508
  */
1613
1509
  export declare function defineVirtualCaret(layer: HTMLElement): PlainExtension;
1614
- //#endregion
1615
- //#region src/extensions/wikilink-hover.d.ts
1616
1510
  /**
1617
1511
  * A wikilink currently under the pointer.
1618
1512
  */
@@ -1637,32 +1531,22 @@ type WikilinkHoverHandler = (hit: WikilinkHoverHit | undefined) => void;
1637
1531
  * changes target. Moving among descendants of one label is de-duplicated.
1638
1532
  */
1639
1533
  export declare function defineWikilinkHoverHandler(onHoverChange: WikilinkHoverHandler, openDelay?: number, closeDelay?: number): PlainExtension;
1640
- //#endregion
1641
- //#region src/extensions/wikilink-trigger.d.ts
1642
1534
  /**
1643
1535
  * Binds `Mod-Shift-k` to open the wikilink menu, and `[` to wrap a selected
1644
1536
  * phrase into an open wikilink (`[[phrase`) with the menu searching it.
1645
1537
  */
1646
1538
  export declare function defineWikilinkTrigger(enabled?: (state: EditorState) => boolean): PlainExtension;
1647
- //#endregion
1648
- //#region src/utils/composition.d.ts
1649
1539
  export declare function getIsComposing(): boolean;
1650
- //#endregion
1651
- //#region src/utils/display-text.d.ts
1652
1540
  /**
1653
1541
  * The textblock as its live-preview marks display it: syntax runs are
1654
1542
  * omitted and each atom unit is replaced by its display text.
1655
1543
  */
1656
1544
  export declare function getTextblockDisplayText(textblock: ProseMirrorNode): string;
1657
- //#endregion
1658
- //#region src/utils/format-file-size.d.ts
1659
1545
  /**
1660
1546
  * Format a byte count for display on a file pill: decimal units (1 KB =
1661
1547
  * 1000 B, matching macOS Finder), one decimal below 10, integers otherwise.
1662
1548
  */
1663
1549
  export declare function formatFileSize(bytes: number): string;
1664
- //#endregion
1665
- //#region src/utils/is-mod-event.d.ts
1666
1550
  /**
1667
1551
  * Whether the platform's mod key is held on `event`: `Command` on Apple, `Ctrl` elsewhere.
1668
1552
  */
@@ -1670,11 +1554,7 @@ export declare function isModEvent(event: MouseEvent | KeyboardEvent | TouchEven
1670
1554
  metaKey: boolean;
1671
1555
  ctrlKey: boolean;
1672
1556
  }): boolean;
1673
- //#endregion
1674
- //#region src/utils/katex-chunk.d.ts
1675
1557
  type KaTeXRender = typeof render;
1676
- //#endregion
1677
- //#region src/utils/katex.d.ts
1678
1558
  /**
1679
1559
  * Load KaTeX's render function on first use and cache it. Most documents
1680
1560
  * contain no math, so the library stays out of the initial bundle.
@@ -1687,8 +1567,6 @@ export declare function loadKaTeX(): Promise<KaTeXRender>;
1687
1567
  * render.
1688
1568
  */
1689
1569
  export declare function renderMathInto(katexRender: KaTeXRender, element: HTMLElement, formula: string, displayMode: boolean): void;
1690
- //#endregion
1691
- //#region src/utils/selected-text.d.ts
1692
1570
  /**
1693
1571
  * The current selection as Markdown: block structure (list markers, headings,
1694
1572
  * blockquotes) is serialized, and inline Markdown syntax is already literal
@@ -1697,8 +1575,6 @@ export declare function renderMathInto(katexRender: KaTeXRender, element: HTMLEl
1697
1575
  * consumers (e.g. an AI prompt) see the same Markdown the user would.
1698
1576
  */
1699
1577
  export declare function getSelectedText(state: EditorState): string;
1700
- //#endregion
1701
- //#region src/utils/virtual-element.d.ts
1702
1578
  /**
1703
1579
  * Returns a Floating-UI virtual element tracking a document range.
1704
1580
  *
@@ -1707,8 +1583,6 @@ export declare function getSelectedText(state: EditorState): string;
1707
1583
  * no longer resolves; those return the last known rect instead of throwing.
1708
1584
  */
1709
1585
  export declare function getVirtualElementFromRange(view: EditorView, range: PositionRange): VirtualElement;
1710
- //#endregion
1711
- //#region src/converters/paragraph.d.ts
1712
1586
  /**
1713
1587
  * Build one paragraph without interpreting block-opening Markdown.
1714
1588
  */
@@ -1717,5 +1591,4 @@ export declare function paragraphMarkdownToDoc(markdown: string, nodes?: TypedNo
1717
1591
  * Flatten textblocks into one paragraph's source content.
1718
1592
  */
1719
1593
  export declare function docToParagraphMarkdown(doc: ProseMirrorNode): string;
1720
- //#endregion
1721
1594
  export { type AcceptPendingReplacementOptions, type CodeBlockAttrs, type CodeBlockFenceStyle, type CodeToken, type DocToMarkdownOptions, type EditorConfig, type EditorExtension, type EditorExtensionOptions, type ExitBoundaryHandler, type ExitBoundaryOptions, type FileClickHandler, type FileClickPayload, type FileInfo, type FileInfoResolver, type FileLinkOptions, type FileLinkPayload, type FileLinkResolver, type FilePasteHandler, type FilePasteOptions, type FileSaveErrorHandler, type FileViewOptions, type FollowLinkHandlers, type ImageClickHandler, type ImageClickPayload, type ImageOptions, type ImageUrlResolver, type InlineMarkContext, type InlineMarkOptions, type KaTeXRender, type LanguageItem, type LinkAttrs, type LinkClickHandler, type LinkClickPayload, type LinkCopyHandler, type LinkCopyPayload, type LinkEditHandler, type LinkEditOptions, type LinkHoverHandler, type LinkHoverOptions, type LinkPreview, type LinkPreviewResolver, type LinkUnit, type ListMarker, type MarkChunk, type MarkMode, type MarkName, type MarkdownToDocOptions, type MdFileAttrs, type MdImageAttrs, type MdLinkTextAttrs, type MdMathAttrs, type MdWikilinkAttrs, type MeowdownCodeBlockAttrs, type MeowdownHTMLCommentAttrs, type MeowdownListAttrs, type MeowdownTableCellAttrs, type NodeName, type ParsedWikiEmbed, type PendingReplacement, type PendingReplacementEvent, type PendingReplacementHandler, type PendingReplacementMode, type PendingReplacementOutcome, type PlaceholderOptions, type PositionRange, type PostEmbedSnapshot, Priority, type ReferenceDefinition, type ReferenceDefinitionIndex, type ReferenceDefinitions, type SearchStatus, type SearchStatusHandler, type StartPendingReplacementOptions, type TableColumnAlign, type TagClickHandler, type TagClickPayload, type TypedEditor, type TypedMarkBuilders, type VirtualElement, type WikiEmbedOptions, type WikiEmbedResolution, type WikiEmbedResolver, type WikilinkClickHandler, type WikilinkClickPayload, type WikilinkHoverHandler, type WikilinkHoverHit, type WikilinkOptions, type WikilinkPayload, type WikilinkResolution, type WikilinkResolver, type XPostMediaClickHandler, type XPostResolver, type YouTubeVideoClickHandler, type YouTubeVideoResolver, defineCodeBlockPreviewPlugin, definePlaceholder, defineSearchStatusHandler, getSearchStatus, isCodeBlockPreviewHiddenDecoration, withPriority };