@vscode/markdown-editor 0.0.2-92 → 0.0.2-94

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
@@ -1248,6 +1248,7 @@ export declare class EditorView extends Disposable {
1248
1248
  private _readonlyToggleButton;
1249
1249
  private readonly _editContextSuspensions;
1250
1250
  private readonly _revealOcclusions;
1251
+ private _pendingTopReveal;
1251
1252
  private _caretRevealRaf;
1252
1253
  private _followedCaretBlock;
1253
1254
  private _followCaretAfterEdit;
@@ -1355,6 +1356,23 @@ export declare class EditorView extends Disposable {
1355
1356
  */
1356
1357
  suspendEditContextWhileFocused(element: HTMLElement): IDisposable;
1357
1358
  revealRangeInCenterIfOutsideViewport(range: OffsetRange, behavior?: ScrollBehavior): IDisposable;
1359
+ /**
1360
+ * Aligns an explicitly navigated range with the top of its nearest vertical
1361
+ * scroll viewport, even when the range is already partially or fully visible.
1362
+ * The alignment leaves {@link TOP_REVEAL_CONTEXT_INSET}px of navigation
1363
+ * context above the range, grown so the range also clears any chrome
1364
+ * registered through {@link registerRevealOcclusion} that covers the top of
1365
+ * that viewport. Outer vertical scrollers and the window keep nearest-edge
1366
+ * behavior so they do not jump, and horizontal scrolling stays nearest-edge.
1367
+ *
1368
+ * Explicit navigation also stops edit-driven caret following, so a later
1369
+ * block resize does not scroll back to where the caret was left behind.
1370
+ * Sticky chrome is remeasured once scrolling completes. User input, a newer
1371
+ * reveal, or disposal cancels that deferred correction.
1372
+ */
1373
+ revealRangeAtTop(range: OffsetRange, behavior?: ScrollBehavior): IDisposable;
1374
+ private _scheduleRangeReveal;
1375
+ private _scheduleTopRangeReveal;
1358
1376
  /**
1359
1377
  * Keeps the caret visible after an editor-driven text edit. The reveal is
1360
1378
  * deferred until the rebuilt document has been laid out and uses nearest-edge
@@ -1464,6 +1482,31 @@ export declare class EditorView extends Disposable {
1464
1482
  private _measurementAt;
1465
1483
  private _stopFollowingCaret;
1466
1484
  private _isRevealOccluded;
1485
+ /** Client rects of registered occlusions that are currently rendered and visible. */
1486
+ private _activeRevealOcclusions;
1487
+ /**
1488
+ * How far registered chrome covers the top of `viewport`, measured down from
1489
+ * `viewport.top`, across the columns `target` occupies. Clearing one occluder
1490
+ * can slide the target behind the next one, so the tested band is re-evaluated
1491
+ * until it settles; stacked chrome therefore reports the lowest connected
1492
+ * bottom edge. Returns 0 when nothing covers the top.
1493
+ */
1494
+ private _occludedTopHeight;
1495
+ /**
1496
+ * Vertical inset used to top-align `target` inside `viewport`. Defaults to
1497
+ * {@link TOP_REVEAL_CONTEXT_INSET}, and grows past registered chrome covering
1498
+ * the viewport top so the same breathing room is kept below that chrome.
1499
+ */
1500
+ private _topRevealInset;
1501
+ /**
1502
+ * `viewport` reduced to the area an explicitly navigated target may occupy:
1503
+ * registered top chrome is excluded, along with the breathing room below it.
1504
+ * Nearest-edge movement parks the target just inside the rect it is given, so
1505
+ * the inset has to be part of that rect; otherwise an outer scroller, or the
1506
+ * window, would leave the target grazing the chrome's bottom edge after the
1507
+ * nearest vertical viewport had already aligned it.
1508
+ */
1509
+ private _unoccludedViewport;
1467
1510
  }
1468
1511
 
1469
1512
  export declare interface EditorViewOptions extends BlockViewOptions {