@vscode/markdown-editor 0.0.2-27 → 0.0.2-29
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 +27 -0
- package/dist/index.js +268 -215
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/view/editor.css +14 -0
- package/src/view/themes/vscode-default.css +14 -6
package/dist/index.d.ts
CHANGED
|
@@ -1165,6 +1165,16 @@ export declare class EditorView extends Disposable {
|
|
|
1165
1165
|
/** The current view-data tree (AST overlaid with selection flags), for debugging. */
|
|
1166
1166
|
private readonly _viewData;
|
|
1167
1167
|
get viewData(): IObservable<DocumentViewData | undefined>;
|
|
1168
|
+
/**
|
|
1169
|
+
* Whether the editor is genuinely focused: focus rests somewhere inside the
|
|
1170
|
+
* editor subtree *and* its window is focused. Mirrored onto the root as
|
|
1171
|
+
* `.md-focused`, which gates the painted caret — the blinking cursor is only
|
|
1172
|
+
* shown while this is `true`, so it never blinks in an unfocused editor or
|
|
1173
|
+
* after the window loses focus. Only the caret's visibility is affected; the
|
|
1174
|
+
* logical selection and caret geometry ({@link caretRect}) are unchanged.
|
|
1175
|
+
*/
|
|
1176
|
+
private readonly _focused;
|
|
1177
|
+
get focused(): IObservable<boolean>;
|
|
1168
1178
|
/**
|
|
1169
1179
|
* Caret rect (editor-local coordinates) for the transient empty paragraph, or
|
|
1170
1180
|
* `undefined` when none is armed. Set each frame from the synthetic
|
|
@@ -1209,6 +1219,15 @@ export declare class EditorView extends Disposable {
|
|
|
1209
1219
|
* a plain click, but an active link only opens with the modifier held.
|
|
1210
1220
|
*/
|
|
1211
1221
|
private _setupModifierTracking;
|
|
1222
|
+
/**
|
|
1223
|
+
* Tracks whether the editor is genuinely focused and mirrors it onto the
|
|
1224
|
+
* root as `.md-focused` so CSS can gate the painted caret. "Focused" means
|
|
1225
|
+
* focus rests somewhere inside the editor subtree *and* the window itself is
|
|
1226
|
+
* focused; either condition failing (focus moving elsewhere, or the window
|
|
1227
|
+
* losing focus) hides the blinking caret while leaving the logical selection
|
|
1228
|
+
* and caret geometry intact.
|
|
1229
|
+
*/
|
|
1230
|
+
private _setupFocusTracking;
|
|
1212
1231
|
/**
|
|
1213
1232
|
* Renders the edit/read-only mode toggle. It flips the model's
|
|
1214
1233
|
* {@link EditorModel.readonlyMode}: when locked (read-only) every block stays
|
|
@@ -1223,6 +1242,14 @@ export declare class EditorView extends Disposable {
|
|
|
1223
1242
|
/** Draws attention to the mode toggle after text input is attempted while locked. */
|
|
1224
1243
|
showReadonlyEditingAttempt(): void;
|
|
1225
1244
|
focus(): void;
|
|
1245
|
+
/**
|
|
1246
|
+
* Focuses the editor when it opens, but only if doing so will not steal
|
|
1247
|
+
* focus from an explicit user target: the window must already be focused and
|
|
1248
|
+
* no other element may have claimed focus yet. Returns whether focus was
|
|
1249
|
+
* taken. Intended for the single editable editor on open; a no-op for a
|
|
1250
|
+
* background window or when the user has already focused something else.
|
|
1251
|
+
*/
|
|
1252
|
+
tryAutoFocus(): boolean;
|
|
1226
1253
|
/**
|
|
1227
1254
|
* Own point→offset resolution. When `true` (the default),
|
|
1228
1255
|
* {@link resolveOffsetFromPoint} ignores the platform DOM hit-test
|