@vscode/markdown-editor 0.0.2-120 → 0.0.2-122
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 +19 -12
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/web-editors.d.ts +5 -1
- package/dist/web-editors.js +15 -6
- package/dist/web-editors.js.map +1 -1
- package/package.json +2 -2
- package/src/view/editor.css +16 -2
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,
|
|
245
|
-
|
|
246
|
-
|
|
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
|
-
|
|
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
|
|
294
|
-
|
|
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.
|
|
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.
|
|
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
|
|
305
|
-
selection
|
|
306
|
-
|
|
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-
|
|
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-
|
|
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 {
|
|
@@ -5360,7 +5360,7 @@ class An extends O {
|
|
|
5360
5360
|
const f = h ? h.snapshot.get().getTokens(v.ofLength(o.length)).tokens : void 0;
|
|
5361
5361
|
let m, p, g;
|
|
5362
5362
|
if (l) {
|
|
5363
|
-
l.element.classList.add("md-block", "md-code-block");
|
|
5363
|
+
l.element.classList.add("md-block", "md-code-block", "md-embedded-code-editor");
|
|
5364
5364
|
const w = l.estimateHeight?.(a.text);
|
|
5365
5365
|
w !== void 0 && (l.element.style.boxSizing = "border-box", l.element.style.minHeight = `${w}px`), l.onEdit = (b) => {
|
|
5366
5366
|
const C = a.sourceOffset === 0 ? b : new T(
|
|
@@ -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.
|
|
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
|
}
|