@vscode/markdown-editor 0.0.2-121 → 0.0.2-123

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
@@ -241,11 +241,14 @@ indentation, marker, and separator cells, including an indented blank line
241
241
  following a list. `lists/mixed-prefix-spaces`, `lists/blank-continuation-spaces`,
242
242
  and `lists/nested-continuation-spaces` isolate these cases; browser tests verify
243
243
  each cell's geometry, clicking, arrow movement, and typing at four font sizes.
244
- Within a list paragraph, every continuation prefix occupies a source-mapped
245
- gutter ending at the text column, rather than adding indentation inside it.
246
- Quote prefixes and list indentation on the same line share that gutter.
244
+ Within a list paragraph, continuation whitespace takes no space while the block
245
+ is inactive. Activating the block reveals the source prefix inline so its spaces
246
+ indent the continuation text, rather than placing them in a left-hand gutter.
247
+ Quote prefixes and list indentation on the same line share that source span.
248
+ Whitespace remains source-mapped for clicking, navigation, and editing.
247
249
  The `lists/same-paragraph-continuation`, `lists/nested-same-paragraph-continuation`,
248
- and `lists/quoted-same-paragraph-continuation` fixtures show inactive and active
250
+ `lists/quoted-same-paragraph-continuation`, and
251
+ `lists/uneven-same-paragraph-continuation` fixtures show inactive and active
249
252
  states. Browser tests cover ordinary, ordered, task, nested and quoted lists,
250
253
  tabs, CRLF, hard breaks, wrapped lines, cross-line formatting/link labels,
251
254
  multiple continuation lines, prefix clicks, and caret movement.
@@ -290,20 +293,24 @@ The `HeadingSpacingH1` and `HeadingSpacingH2` fixtures compare first and later
290
293
  headings; browser tests cover their underline spacing across themes, widths,
291
294
  wrapped text, presentation modes, and active or inactive selections.
292
295
 
293
- An empty, unlocked document defaults to a collapsed selection at offset zero
294
- when opened, cleared externally, switched into editing presentation, or unlocked.
296
+ An empty, unlocked document in editing presentation always keeps a collapsed
297
+ selection at offset zero and its active typing block, including after Escape,
298
+ margin clicks, clicks below the document, and external selection clearing.
295
299
  This does not take keyboard focus: the caret blinks only while the editor is
296
- focused. Explicit deselection remains respected until the next document or mode
297
- transition. Reading and locked documents keep their existing selection behavior.
300
+ focused. Reading and locked documents keep their existing selection behavior.
298
301
  `EmptyEditing` captures the empty surface; browser tests verify actual blink
299
302
  cycles, blur, typing/deleting, and presentation/lock transitions.
300
303
 
301
304
  Escape clears an existing selection, including a collapsed caret, and cancels
302
- any pending empty paragraph. Open find/suggestion widgets and focused nested
305
+ any pending empty paragraph. The exception is an empty, unlocked editing
306
+ document: Escape keeps its caret and active block visible so typing can begin
307
+ immediately. Open find/suggestion widgets and focused nested
303
308
  controls handle Escape first. With no selection or pending paragraph, Escape
304
- remains available to the host. Clicking beside or below the document also clears
305
- selection: the editor fills a fixed-height host so its blank area receives the
306
- same pointer handling as the margins, without stretching the document itself.
309
+ remains available to the host. Clicking beside or below a non-empty document also
310
+ clears selection. The empty-document invariant is enforced by the view, not by
311
+ individual input handlers. The editor fills a fixed-height host so its blank
312
+ area receives the same pointer handling as the margins, without stretching the
313
+ document itself.
307
314
 
308
315
  Set `EditorViewOptions.highlightActiveBlock` to `false` to disable the active
309
316
  block's background and glow, or update the live `view.highlightActiveBlock`
package/dist/index.js CHANGED
@@ -5107,7 +5107,7 @@ function oo(n) {
5107
5107
  const s = t.mountNode.parentElement;
5108
5108
  if (!s)
5109
5109
  throw new Error("List continuation must have a mounted parent");
5110
- if (s.classList.contains("md-list-continuation-gutter"))
5110
+ if (s.classList.contains("md-list-continuation-source"))
5111
5111
  continue;
5112
5112
  let i = e;
5113
5113
  for (; i > 0; ) {
@@ -5117,7 +5117,7 @@ function oo(n) {
5117
5117
  i--;
5118
5118
  }
5119
5119
  const o = document.createElement("span");
5120
- o.className = "md-list-continuation-gutter", s.insertBefore(o, n[i].mountNode), z(o, n.slice(i, e + 1).map((r) => r.mountNode));
5120
+ o.className = "md-list-continuation-source", o.classList.toggle("md-list-continuation-leading", i === 0 && s.classList.contains("md-paragraph")), s.insertBefore(o, n[i].mountNode), z(o, n.slice(i, e + 1).map((r) => r.mountNode));
5121
5121
  }
5122
5122
  }
5123
5123
  class hs extends O {
@@ -7232,7 +7232,7 @@ class th extends W {
7232
7232
  this._register(M((e) => {
7233
7233
  if (this._model.presentation.read(e) !== "editing" || this._model.readonlyMode.read(e) || this._model.sourceText.read(e).value.length !== 0)
7234
7234
  return;
7235
- const t = this._model.selection.get();
7235
+ const t = this._model.selection.read(e);
7236
7236
  (t?.anchor !== 0 || t.active !== 0) && this._model.selection.set(y.collapsed(0), void 0);
7237
7237
  }));
7238
7238
  }