@vscode/markdown-editor 0.0.2-25 → 0.0.2-26
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
|
@@ -2298,11 +2298,14 @@ export declare abstract class StackedCommentsPresenter extends Disposable implem
|
|
|
2298
2298
|
private readonly _layer;
|
|
2299
2299
|
private readonly _entries;
|
|
2300
2300
|
private _order;
|
|
2301
|
+
private _pendingRevealCommentId;
|
|
2301
2302
|
constructor(model: CommentsModel, view: EditorView, context?: CommentsPresenterContext | undefined);
|
|
2302
2303
|
/** Build the card DOM for a comment. Called once per new comment. */
|
|
2303
2304
|
protected abstract createWidget(comment: Comment_2): StackWidget;
|
|
2305
|
+
revealComment(id: string): void;
|
|
2304
2306
|
private _reconcile;
|
|
2305
2307
|
private _relayout;
|
|
2308
|
+
private _revealPendingComment;
|
|
2306
2309
|
}
|
|
2307
2310
|
|
|
2308
2311
|
/** The minimal widget contract a subclass must produce. */
|
package/dist/index.js
CHANGED
|
@@ -6232,6 +6232,10 @@ class is extends U {
|
|
|
6232
6232
|
_layer;
|
|
6233
6233
|
_entries = /* @__PURE__ */ new Map();
|
|
6234
6234
|
_order = [];
|
|
6235
|
+
_pendingRevealCommentId;
|
|
6236
|
+
revealComment(e) {
|
|
6237
|
+
this._pendingRevealCommentId = e, this._revealPendingComment();
|
|
6238
|
+
}
|
|
6235
6239
|
_reconcile(e) {
|
|
6236
6240
|
this._order = e.map((s) => s.id);
|
|
6237
6241
|
const t = new Set(this._order);
|
|
@@ -6246,7 +6250,14 @@ class is extends U {
|
|
|
6246
6250
|
}
|
|
6247
6251
|
_relayout() {
|
|
6248
6252
|
const e = this._order.map((t) => this._entries.get(t)).filter((t) => t !== void 0).map((t) => ({ element: t.widget.element, rects: t.rects.get() }));
|
|
6249
|
-
qr(this.view, e);
|
|
6253
|
+
qr(this.view, e), this._revealPendingComment();
|
|
6254
|
+
}
|
|
6255
|
+
_revealPendingComment() {
|
|
6256
|
+
const e = this._pendingRevealCommentId;
|
|
6257
|
+
if (!e)
|
|
6258
|
+
return;
|
|
6259
|
+
const t = this._entries.get(e)?.widget.element;
|
|
6260
|
+
!t || t.style.visibility === "hidden" || (this._pendingRevealCommentId = void 0, t.scrollIntoView({ block: "center", inline: "nearest" }));
|
|
6250
6261
|
}
|
|
6251
6262
|
}
|
|
6252
6263
|
const Ur = /^([a-z0-9]+)/i;
|
|
@@ -6572,7 +6583,7 @@ class tc extends is {
|
|
|
6572
6583
|
const xc = {
|
|
6573
6584
|
connected: "Connected lines (original)",
|
|
6574
6585
|
vscode: "VS Code cards",
|
|
6575
|
-
"vscode-v2": "Markdown cards (
|
|
6586
|
+
"vscode-v2": "Markdown cards (V3)"
|
|
6576
6587
|
}, yc = {
|
|
6577
6588
|
connected: (n, e) => new $r(n, e),
|
|
6578
6589
|
vscode: (n, e, t) => new Xr(n, e, t),
|