@vscode/markdown-editor 0.0.2-40 → 0.0.2-41
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 +36 -7
- package/dist/index.js +2200 -2092
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/view/editor.css +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare interface AnnotatedRange {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/** Every concrete node kind, for exhaustive consumer-side dispatch. */
|
|
27
|
-
export declare type AnyAstNode = TextAstNode | MarkerAstNode | GlueAstNode | ThematicBreakAstNode | StrongAstNode | EmphasisAstNode | StrikethroughAstNode | InlineCodeAstNode | InlineMathAstNode | LinkAstNode | ImageAstNode | HeadingAstNode | ParagraphAstNode | CodeBlockAstNode | MathBlockAstNode | BlockQuoteAstNode | ListAstNode | ListItemAstNode | TableAstNode | TableRowAstNode | TableCellAstNode | DocumentAstNode | UnhandledBlockAstNode;
|
|
27
|
+
export declare type AnyAstNode = TextAstNode | MarkerAstNode | GlueAstNode | ThematicBreakAstNode | StrongAstNode | EmphasisAstNode | StrikethroughAstNode | InlineCodeAstNode | InlineMathAstNode | LinkAstNode | ImageAstNode | HeadingAstNode | ParagraphAstNode | FrontMatterAstNode | CodeBlockAstNode | MathBlockAstNode | BlockQuoteAstNode | ListAstNode | ListItemAstNode | TableAstNode | TableRowAstNode | TableCellAstNode | DocumentAstNode | UnhandledBlockAstNode;
|
|
28
28
|
|
|
29
29
|
declare type AnyViewData = DocumentViewData | BlockViewData | InlineViewData | ListItemViewData | TableRowViewData | TableCellViewData | MarkerViewData | GlueViewData | DiffHunkViewData | DiffDecorationViewData;
|
|
30
30
|
|
|
@@ -88,7 +88,7 @@ export declare class AsyncClipboardStrategy implements IClipboardStrategy {
|
|
|
88
88
|
connect(context: IClipboardContext): IDisposable;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
export declare type BlockAstNode = HeadingAstNode | ParagraphAstNode | CodeBlockAstNode | MathBlockAstNode | ThematicBreakAstNode | BlockQuoteAstNode | ListAstNode | TableAstNode | UnhandledBlockAstNode;
|
|
91
|
+
export declare type BlockAstNode = HeadingAstNode | ParagraphAstNode | FrontMatterAstNode | CodeBlockAstNode | MathBlockAstNode | ThematicBreakAstNode | BlockQuoteAstNode | ListAstNode | TableAstNode | UnhandledBlockAstNode;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* A block-level node. Every block may carry a {@link leadingTrivia} glue — the
|
|
@@ -154,7 +154,7 @@ declare class BlockQuoteViewData {
|
|
|
154
154
|
constructor(ast: BlockQuoteAstNode, content: readonly AnyViewData[]);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
declare type BlockViewData = HeadingViewData | ParagraphViewData | CodeBlockViewData | MathBlockViewData | ThematicBreakViewData | BlockQuoteViewData | ListViewData | TableViewData | UnhandledBlockViewData;
|
|
157
|
+
declare type BlockViewData = HeadingViewData | ParagraphViewData | FrontMatterViewData | CodeBlockViewData | MathBlockViewData | ThematicBreakViewData | BlockQuoteViewData | ListViewData | TableViewData | UnhandledBlockViewData;
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* Base view node for everything the editor renders, generic over the
|
|
@@ -1418,6 +1418,34 @@ export declare function findWordDeleteBoundaryLeft(text: string, offset: number,
|
|
|
1418
1418
|
|
|
1419
1419
|
export declare function findWordDeleteBoundaryRight(text: string, offset: number, config?: WordNavigationConfig): number;
|
|
1420
1420
|
|
|
1421
|
+
/**
|
|
1422
|
+
* A leading YAML front matter block. The YAML value is intentionally opaque:
|
|
1423
|
+
* only the two fences and the exact source between them are modeled.
|
|
1424
|
+
*/
|
|
1425
|
+
export declare class FrontMatterAstNode extends BlockAstNodeBase {
|
|
1426
|
+
readonly content: readonly (MarkerAstNode | GlueAstNode)[];
|
|
1427
|
+
readonly leadingTrivia?: GlueAstNode | undefined;
|
|
1428
|
+
readonly kind = "frontMatter";
|
|
1429
|
+
constructor(content: readonly (MarkerAstNode | GlueAstNode)[], leadingTrivia?: GlueAstNode | undefined);
|
|
1430
|
+
get children(): readonly AstNode[];
|
|
1431
|
+
get openFence(): MarkerAstNode | undefined;
|
|
1432
|
+
get closeFence(): MarkerAstNode | undefined;
|
|
1433
|
+
get value(): MarkerAstNode | undefined;
|
|
1434
|
+
mapChildren(m: ReadonlyMap<AstNode, AstNode>): AstNode;
|
|
1435
|
+
withLeadingTrivia(trivia: GlueAstNode | undefined): FrontMatterAstNode;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
declare class FrontMatterViewData {
|
|
1439
|
+
readonly ast: FrontMatterAstNode;
|
|
1440
|
+
/** Active: render both fences; inactive: render only the opaque YAML value. */
|
|
1441
|
+
readonly showMarkup: boolean;
|
|
1442
|
+
readonly content: readonly AnyViewData[];
|
|
1443
|
+
readonly kind = "frontMatter";
|
|
1444
|
+
constructor(ast: FrontMatterAstNode,
|
|
1445
|
+
/** Active: render both fences; inactive: render only the opaque YAML value. */
|
|
1446
|
+
showMarkup: boolean, content: readonly AnyViewData[]);
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1421
1449
|
export declare function getAnnotatedSource(node: AstNode, source: string, offset?: number): string;
|
|
1422
1450
|
|
|
1423
1451
|
/** Non-semantic syntactic glue: whitespace, padding, table pipes. */
|
|
@@ -1545,6 +1573,7 @@ export declare interface IDefaultMonarchGrammars {
|
|
|
1545
1573
|
python: unknown;
|
|
1546
1574
|
rust: unknown;
|
|
1547
1575
|
shell: unknown;
|
|
1576
|
+
yaml: unknown;
|
|
1548
1577
|
}
|
|
1549
1578
|
|
|
1550
1579
|
/**
|
|
@@ -1700,8 +1729,8 @@ export declare const insertParagraph: EditCommand;
|
|
|
1700
1729
|
* - paragraph / heading / thematic break — the "rich text" thing: at the
|
|
1701
1730
|
* block's end arm a transient empty paragraph (see {@link SmartEnterResult});
|
|
1702
1731
|
* elsewhere split into two paragraphs (`\n\n`).
|
|
1703
|
-
* - code
|
|
1704
|
-
* staying inside the
|
|
1732
|
+
* - fenced code / front matter — insert a newline that preserves the current
|
|
1733
|
+
* line's indentation, staying inside the fences.
|
|
1705
1734
|
* - block quote — continue the quote (`\n> `); an empty quote line exits it.
|
|
1706
1735
|
* - list — continue the list with the next marker (incrementing ordered
|
|
1707
1736
|
* numbers, re-emitting task checkboxes); an empty item exits the list.
|
|
@@ -2637,8 +2666,8 @@ declare interface UnchangedItem {
|
|
|
2637
2666
|
}
|
|
2638
2667
|
|
|
2639
2668
|
/**
|
|
2640
|
-
* A block whose token type the parser does not understand (a setext heading
|
|
2641
|
-
*
|
|
2669
|
+
* A block whose token type the parser does not understand (a setext heading or
|
|
2670
|
+
* any future/extension construct). Rather than dropping the
|
|
2642
2671
|
* span — which would demote its text to invisible glue — the parser captures the
|
|
2643
2672
|
* whole source range verbatim as a single {@link MarkerAstNode} of kind
|
|
2644
2673
|
* `content` and records the originating micromark {@link tokenType}, so the view
|