@vscode/markdown-editor 0.0.2-127 → 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 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
@@ -2298,8 +2298,9 @@ export declare class LengthReplacement {
2298
2298
  export declare class LinkAstNode extends AstNode {
2299
2299
  readonly url: string;
2300
2300
  readonly content: readonly InlineContentAstNode[];
2301
+ readonly title?: string | undefined;
2301
2302
  readonly kind = "link";
2302
- constructor(url: string, content: readonly InlineContentAstNode[]);
2303
+ constructor(url: string, content: readonly InlineContentAstNode[], title?: string | undefined);
2303
2304
  get children(): readonly AstNode[];
2304
2305
  mapChildren(m: ReadonlyMap<AstNode, AstNode>): AstNode;
2305
2306
  protected _localEquals(o: this): boolean;
@@ -2982,8 +2983,9 @@ declare interface ReplacedItem {
2982
2983
  }
2983
2984
 
2984
2985
  export declare class RichLink {
2986
+ private readonly _displayHints?;
2985
2987
  static create(options: RichLinkOptions): RichLink;
2986
- static mount(element: HTMLElement, authoredLabel: HTMLSpanElement): RichLink;
2988
+ static mount(element: HTMLElement, authoredLabel: HTMLSpanElement, displayHints?: RichLinkDisplayHints): RichLink;
2987
2989
  static clear(element: HTMLElement): void;
2988
2990
  readonly element: HTMLElement;
2989
2991
  readonly authoredLabel: HTMLSpanElement;
@@ -3001,10 +3003,16 @@ export declare class RichLink {
3001
3003
  private _setDefaultOrder;
3002
3004
  }
3003
3005
 
3006
+ declare interface RichLinkDisplayHints {
3007
+ readonly iconOnly?: boolean;
3008
+ readonly maxWidthChars?: number;
3009
+ }
3010
+
3004
3011
  export declare interface RichLinkOptions {
3005
3012
  readonly href: string;
3006
3013
  readonly authoredLabel: string;
3007
3014
  readonly presentation?: LinkPresentation;
3015
+ readonly displayHints?: RichLinkDisplayHints;
3008
3016
  }
3009
3017
 
3010
3018
  export declare const selectAll: SelectionCommand;