@vscode/markdown-editor 0.0.2-131 → 0.0.2-133

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
@@ -22,6 +22,10 @@ not the published editor's runtime dependencies or Component Explorer's renderer
22
22
 
23
23
  ## Embedded editor presentation
24
24
 
25
+ `EditorView` calls the embedded editor factory's optional `layout()` hook after
26
+ measuring the document. The virtualized iframe factory uses it to keep retained
27
+ iframes aligned when edits move their placeholders without resizing them.
28
+
25
29
  Iframe editor descriptors can opt into host-owned presentation controls:
26
30
 
27
31
  ```ts
package/dist/index.d.ts CHANGED
@@ -2034,6 +2034,8 @@ declare interface IEmbeddedCodeEditorFactory {
2034
2034
  * back to the default (highlighting / {@link BlockViewOptions.renderCustomCodeBlock}).
2035
2035
  */
2036
2036
  create(language: string, infoString: string, initialContent: string): IEmbeddedCodeEditor | undefined;
2037
+ /** Reposition overlays after the document's layout has been measured. */
2038
+ layout?(): void;
2037
2039
  }
2038
2040
 
2039
2041
  /**
package/dist/index.js CHANGED
@@ -7559,7 +7559,7 @@ class Yd extends W {
7559
7559
  )
7560
7560
  });
7561
7561
  }
7562
- this.measuredLayout.setMeasurements(i, r);
7562
+ this.measuredLayout.setMeasurements(i, r), this._options?.embeddedCodeEditorFactory?.layout?.();
7563
7563
  }
7564
7564
  /**
7565
7565
  * Paint the diff highlights via the CSS Custom Highlight API: green over the