@vscode/markdown-editor 0.0.2-126 → 0.0.2-128
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 +12 -0
- package/dist/index.d.ts +14 -4
- package/dist/index.js +1736 -1687
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/view/editor.css +3 -4
package/README.md
CHANGED
|
@@ -99,6 +99,18 @@ See [Editing property tests](docs/editing-properties.md) for the interactive
|
|
|
99
99
|
assertion fixtures, CI contracts, deterministic editing corpus, and the
|
|
100
100
|
red/green/visual evidence required for layout fixes.
|
|
101
101
|
|
|
102
|
+
### Rich link display hints (experimental)
|
|
103
|
+
|
|
104
|
+
Inline Markdown link titles can opt into two rendering experiments:
|
|
105
|
+
|
|
106
|
+
- `[commit](commit:1234567 "md:max-width=32")` bounds the entire pill to `32ch`.
|
|
107
|
+
- `[commit](commit:1234567 "md:icon-only")` shows only the resource icon, retaining
|
|
108
|
+
its tooltip, accessible name, keyboard activation and original destination.
|
|
109
|
+
|
|
110
|
+
Only these complete title values are interpreted as hints; other titles do not
|
|
111
|
+
change pill rendering. The source title and URL remain editable and unchanged.
|
|
112
|
+
These are fixture-driven experiments, not an extension contribution API.
|
|
113
|
+
|
|
102
114
|
### Automatic links
|
|
103
115
|
|
|
104
116
|
Bare HTTP(S) URLs, `www.` addresses, and email addresses are detected using GFM
|
package/dist/index.d.ts
CHANGED
|
@@ -85,14 +85,16 @@ declare interface AstVisualizationNode {
|
|
|
85
85
|
* commands even when the browser's default has been prevented.
|
|
86
86
|
*
|
|
87
87
|
* Hosts can supply a paste callback to read images or other clipboard formats.
|
|
88
|
-
* It receives the original context
|
|
88
|
+
* It receives the original context, whether Shift requested plain text, and
|
|
89
|
+
* native clipboard data when a paste event supplied it. Context menus focus a
|
|
90
|
+
* temporary editable target so native paste works with EditContext roots too.
|
|
89
91
|
* The callback owns asynchronous errors and stale-selection checks. It does
|
|
90
92
|
* not override copy/cut or clipboard handling in nested native inputs.
|
|
91
93
|
*/
|
|
92
94
|
export declare class AsyncClipboardStrategy implements IClipboardStrategy {
|
|
93
95
|
private readonly _clipboard;
|
|
94
96
|
private readonly _paste?;
|
|
95
|
-
constructor(_clipboard?: Clipboard, _paste?: ((context: IClipboardContext, plainText: boolean) => Promise<void>) | undefined);
|
|
97
|
+
constructor(_clipboard?: Clipboard, _paste?: ((context: IClipboardContext, plainText: boolean, nativeData?: NativeClipboardData) => Promise<void>) | undefined);
|
|
96
98
|
writeText(text: string): Promise<void>;
|
|
97
99
|
connect(context: IClipboardContext): IDisposable;
|
|
98
100
|
}
|
|
@@ -2296,8 +2298,9 @@ export declare class LengthReplacement {
|
|
|
2296
2298
|
export declare class LinkAstNode extends AstNode {
|
|
2297
2299
|
readonly url: string;
|
|
2298
2300
|
readonly content: readonly InlineContentAstNode[];
|
|
2301
|
+
readonly title?: string | undefined;
|
|
2299
2302
|
readonly kind = "link";
|
|
2300
|
-
constructor(url: string, content: readonly InlineContentAstNode[]);
|
|
2303
|
+
constructor(url: string, content: readonly InlineContentAstNode[], title?: string | undefined);
|
|
2301
2304
|
get children(): readonly AstNode[];
|
|
2302
2305
|
mapChildren(m: ReadonlyMap<AstNode, AstNode>): AstNode;
|
|
2303
2306
|
protected _localEquals(o: this): boolean;
|
|
@@ -2980,8 +2983,9 @@ declare interface ReplacedItem {
|
|
|
2980
2983
|
}
|
|
2981
2984
|
|
|
2982
2985
|
export declare class RichLink {
|
|
2986
|
+
private readonly _displayHints?;
|
|
2983
2987
|
static create(options: RichLinkOptions): RichLink;
|
|
2984
|
-
static mount(element: HTMLElement, authoredLabel: HTMLSpanElement): RichLink;
|
|
2988
|
+
static mount(element: HTMLElement, authoredLabel: HTMLSpanElement, displayHints?: RichLinkDisplayHints): RichLink;
|
|
2985
2989
|
static clear(element: HTMLElement): void;
|
|
2986
2990
|
readonly element: HTMLElement;
|
|
2987
2991
|
readonly authoredLabel: HTMLSpanElement;
|
|
@@ -2999,10 +3003,16 @@ export declare class RichLink {
|
|
|
2999
3003
|
private _setDefaultOrder;
|
|
3000
3004
|
}
|
|
3001
3005
|
|
|
3006
|
+
declare interface RichLinkDisplayHints {
|
|
3007
|
+
readonly iconOnly?: boolean;
|
|
3008
|
+
readonly maxWidthChars?: number;
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3002
3011
|
export declare interface RichLinkOptions {
|
|
3003
3012
|
readonly href: string;
|
|
3004
3013
|
readonly authoredLabel: string;
|
|
3005
3014
|
readonly presentation?: LinkPresentation;
|
|
3015
|
+
readonly displayHints?: RichLinkDisplayHints;
|
|
3006
3016
|
}
|
|
3007
3017
|
|
|
3008
3018
|
export declare const selectAll: SelectionCommand;
|