@vscode/markdown-editor 0.0.2-9 → 0.0.2-91

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.
Files changed (75) hide show
  1. package/README.md +31 -0
  2. package/dist/commands.d.ts +65 -0
  3. package/dist/commands.js +159 -0
  4. package/dist/commands.js.map +1 -0
  5. package/dist/config-BGeaJqWk.js +286 -0
  6. package/dist/config-BGeaJqWk.js.map +1 -0
  7. package/dist/config.d.ts +10 -0
  8. package/dist/config.js +6 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/index.d.ts +1567 -127
  11. package/dist/index.js +6168 -2077
  12. package/dist/index.js.map +1 -1
  13. package/dist/markdown-editor.css +1 -0
  14. package/dist/stringEdit-CVDbCUBY.js +215 -0
  15. package/dist/stringEdit-CVDbCUBY.js.map +1 -0
  16. package/dist/web-editors.d.ts +297 -0
  17. package/dist/web-editors.js +7359 -0
  18. package/dist/web-editors.js.map +1 -0
  19. package/package.json +54 -16
  20. package/src/contrib/comments/commentInput.css +89 -0
  21. package/src/contrib/comments/commentWidget.css +60 -0
  22. package/src/contrib/find/find.css +347 -0
  23. package/src/view/editor.css +1157 -31
  24. package/src/view/themes/default.css +13 -4
  25. package/src/view/themes/github.css +16 -13
  26. package/src/view/themes/vscode-default.css +397 -0
  27. package/src/view/themes/{vscode.css → vscode-github.css} +124 -62
  28. package/dist/_observables/assert.d.ts +0 -2
  29. package/dist/_observables/deps.d.ts +0 -28
  30. package/dist/_observables/disposables.d.ts +0 -19
  31. package/dist/_observables/equals.d.ts +0 -32
  32. package/dist/_observables/index.d.ts +0 -2
  33. package/dist/_observables/observableInternal/base.d.ts +0 -172
  34. package/dist/_observables/observableInternal/changeTracker.d.ts +0 -44
  35. package/dist/_observables/observableInternal/commonFacade/cancellation.d.ts +0 -24
  36. package/dist/_observables/observableInternal/commonFacade/deps.d.ts +0 -24
  37. package/dist/_observables/observableInternal/debugLocation.d.ts +0 -21
  38. package/dist/_observables/observableInternal/debugName.d.ts +0 -33
  39. package/dist/_observables/observableInternal/experimental/deferUnobserve.d.ts +0 -16
  40. package/dist/_observables/observableInternal/experimental/reducer.d.ts +0 -37
  41. package/dist/_observables/observableInternal/experimental/utils.d.ts +0 -15
  42. package/dist/_observables/observableInternal/index.d.ts +0 -25
  43. package/dist/_observables/observableInternal/logging/consoleObservableLogger.d.ts +0 -40
  44. package/dist/_observables/observableInternal/logging/debugGetDependencyGraph.d.ts +0 -4
  45. package/dist/_observables/observableInternal/logging/debugger/debuggerRpc.d.ts +0 -4
  46. package/dist/_observables/observableInternal/logging/debugger/devToolsLogger.d.ts +0 -43
  47. package/dist/_observables/observableInternal/logging/debugger/rpc.d.ts +0 -41
  48. package/dist/_observables/observableInternal/logging/debugger/utils.d.ts +0 -13
  49. package/dist/_observables/observableInternal/logging/logging.d.ts +0 -30
  50. package/dist/_observables/observableInternal/map.d.ts +0 -18
  51. package/dist/_observables/observableInternal/observables/baseObservable.d.ts +0 -58
  52. package/dist/_observables/observableInternal/observables/constObservable.d.ts +0 -5
  53. package/dist/_observables/observableInternal/observables/derived.d.ts +0 -46
  54. package/dist/_observables/observableInternal/observables/derivedImpl.d.ts +0 -83
  55. package/dist/_observables/observableInternal/observables/lazyObservableValue.d.ts +0 -27
  56. package/dist/_observables/observableInternal/observables/observableFromEvent.d.ts +0 -37
  57. package/dist/_observables/observableInternal/observables/observableSignal.d.ts +0 -11
  58. package/dist/_observables/observableInternal/observables/observableSignalFromEvent.d.ts +0 -5
  59. package/dist/_observables/observableInternal/observables/observableValue.d.ts +0 -37
  60. package/dist/_observables/observableInternal/observables/observableValueOpts.d.ts +0 -8
  61. package/dist/_observables/observableInternal/reactions/autorun.d.ts +0 -56
  62. package/dist/_observables/observableInternal/reactions/autorunImpl.d.ts +0 -53
  63. package/dist/_observables/observableInternal/set.d.ts +0 -17
  64. package/dist/_observables/observableInternal/transaction.d.ts +0 -27
  65. package/dist/_observables/observableInternal/utils/promise.d.ts +0 -75
  66. package/dist/_observables/observableInternal/utils/runOnChange.d.ts +0 -7
  67. package/dist/_observables/observableInternal/utils/utils.d.ts +0 -43
  68. package/dist/_observables/observableInternal/utils/utilsCancellation.d.ts +0 -10
  69. package/dist/_observables/observableInternal/utils/valueWithChangeEvent.d.ts +0 -10
  70. package/dist/_observables/utils.d.ts +0 -15
  71. package/dist/observables.d.ts +0 -4
  72. package/dist/observables.js +0 -439
  73. package/dist/observables.js.map +0 -1
  74. package/dist/runOnChange-C00UIwqQ.js +0 -1538
  75. package/dist/runOnChange-C00UIwqQ.js.map +0 -1
@@ -1,3 +1,6 @@
1
+ @import '@vscode/codicons/dist/codicon.css';
2
+ @import '../contrib/find/find.css';
3
+
1
4
  /*
2
5
  * Base editor styles — ABSOLUTE MINIMUM.
3
6
  *
@@ -17,16 +20,29 @@
17
20
  * theme-agnostic and know nothing about VS Code. Where a value needs to vary
18
21
  * per theme, expose a local `--md-*` custom property WITH a sensible literal
19
22
  * fallback (e.g. `var(--md-cursor-background, #000)`) and let a theme file set
20
- * it. Only `themes/vscode.css` is permitted to read `--vscode-*` variables and
21
- * map them onto these `--md-*` properties.
23
+ * it. Only the `themes/vscode-*.css` themes are permitted to read `--vscode-*`
24
+ * variables and map them onto these `--md-*` properties.
22
25
  */
23
26
 
24
27
  .md-editor {
28
+ display: flow-root;
25
29
  outline: none;
26
30
  /* The editor paints its own cursor (`.md-cursor`); hide the native caret. */
27
31
  caret-color: transparent;
28
32
  }
29
33
 
34
+ .md-editor-a11y-status {
35
+ position: absolute;
36
+ width: 1px;
37
+ height: 1px;
38
+ padding: 0;
39
+ margin: -1px;
40
+ overflow: hidden;
41
+ clip: rect(0, 0, 0, 0);
42
+ white-space: nowrap;
43
+ border: 0;
44
+ }
45
+
30
46
  /*
31
47
  * The transient empty paragraph — the blank line conjured by pressing Enter at
32
48
  * the end of a paragraph (see `PendingParagraph` in the model). It is not part
@@ -42,12 +58,29 @@
42
58
  * overlays, which position themselves relative to this box, so it is the
43
59
  * positioning context. In limited-width mode the editor sets an inline
44
60
  * `max-width` here and the auto inline margins center it within the full-width
45
- * `.md-editor`.
61
+ * `.md-editor`. The block-start padding keeps every document clear of the top
62
+ * edge, independent of the first block's theme margins.
46
63
  */
47
64
  .md-editor-content {
65
+ --md-editor-content-inline-start-padding: 48px;
66
+ --md-readonly-toggle-width: 58px;
67
+ --md-readonly-toggle-height: 32px;
68
+ /* Leaves 16px of optical separation beyond the active block's 8px outset glow. */
69
+ --md-readonly-toggle-gap: 24px;
70
+ --md-readonly-toggle-inset: 4px;
71
+ --md-editor-content-inline-end-padding: var(--md-editor-content-inline-start-padding);
48
72
  position: relative;
49
73
  margin-inline: auto;
50
- padding: 48px;
74
+ padding-block: 24px 0;
75
+ padding-inline: var(--md-editor-content-inline-start-padding) var(--md-editor-content-inline-end-padding);
76
+ }
77
+
78
+ .md-editor-content-with-readonly-toggle {
79
+ --md-editor-content-inline-end-padding: calc(var(--md-readonly-toggle-width) + var(--md-readonly-toggle-gap) + var(--md-readonly-toggle-inset));
80
+ }
81
+
82
+ .md-editor-content-with-readonly-toggle>.md-document :is(.md-heading, .md-paragraph) {
83
+ overflow-wrap: anywhere;
51
84
  }
52
85
 
53
86
  .md-block-active {
@@ -56,6 +89,29 @@
56
89
  box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
57
90
  }
58
91
 
92
+ /*
93
+ * The whole-empty-document case. Markdown has no empty-paragraph node, so a
94
+ * document with no content parses to a single empty paragraph (see
95
+ * `_ensureBlocks` in the parser) which renders as a childless `<p>` of zero
96
+ * height. Give it one line's height so the editor presents an intentional,
97
+ * clickable empty editing surface — and so typing the first character causes no
98
+ * layout shift (a filled line is also one `lh` tall).
99
+ */
100
+ .md-paragraph:empty {
101
+ min-height: 1lh;
102
+ }
103
+
104
+ /*
105
+ * ...and never paint the active-block card over that zero-content line: with no
106
+ * text to size it, the card's background + 8px box-shadow glow would show up as
107
+ * a stray gray bar. The two extra classes outrank the base `.md-block-active`
108
+ * rule above in every theme (themes only remap `--md-block-active-background`).
109
+ */
110
+ .md-paragraph:empty.md-block-active {
111
+ background: transparent;
112
+ box-shadow: none;
113
+ }
114
+
59
115
  /*
60
116
  * Cursor mirrors the same open affordance as the underline below: the anchor's
61
117
  * pointer cursor appears exactly when a click would open the link. An inactive
@@ -87,6 +143,552 @@
87
143
  text-decoration: none;
88
144
  }
89
145
 
146
+ .md-rich-link {
147
+ display: inline-flex;
148
+ align-items: baseline;
149
+ max-width: min(100%, 52rem);
150
+ box-sizing: border-box;
151
+ gap: 0.24em;
152
+ padding: 1px 0.3em;
153
+ border: 1px solid color-mix(in srgb, var(--vscode-textLink-foreground, #0969da) 24%, transparent);
154
+ border-radius: 0.3em;
155
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
156
+ color: inherit;
157
+ font-size: 1em;
158
+ line-height: 1.25;
159
+ text-decoration: none;
160
+ vertical-align: baseline;
161
+ white-space: nowrap;
162
+ cursor: pointer;
163
+ --md-rich-link-success-color: var(--vscode-charts-green, #1f883d);
164
+ }
165
+
166
+ .md-rich-link:hover {
167
+ border-color: var(--vscode-focusBorder, color-mix(in srgb, currentColor 42%, transparent));
168
+ background: var(--vscode-button-secondaryHoverBackground, #e5e5e5);
169
+ text-decoration: none;
170
+ }
171
+
172
+ .md-rich-link:focus-visible {
173
+ outline: 1px solid var(--vscode-focusBorder, currentColor);
174
+ outline-offset: 1px;
175
+ }
176
+
177
+ .md-rich-link-icon {
178
+ flex: none;
179
+ align-self: center;
180
+ font-size: 0.92em;
181
+ color: color-mix(in srgb, var(--vscode-textLink-foreground, #0969da) 78%, currentColor);
182
+ }
183
+
184
+ .md-rich-link-label,
185
+ .md-rich-link-title,
186
+ .md-rich-link-detail {
187
+ overflow: hidden;
188
+ text-overflow: ellipsis;
189
+ }
190
+
191
+ .md-rich-link-label,
192
+ .md-rich-link-title {
193
+ flex: 0 1 auto;
194
+ min-width: 0;
195
+ color: var(--vscode-textLink-foreground, currentColor);
196
+ font-weight: 600;
197
+ }
198
+
199
+ .md-rich-link-title {
200
+ max-width: 200px;
201
+ }
202
+
203
+ .md-rich-link[data-md-rich-link-kind='session'] :is(.md-rich-link-label, .md-rich-link-title) {
204
+ max-width: 150px;
205
+ }
206
+
207
+ .md-rich-link-label[hidden],
208
+ .md-rich-link-title[hidden],
209
+ .md-rich-link-reference[hidden] {
210
+ display: none;
211
+ }
212
+
213
+ .md-rich-link-reference {
214
+ flex: none;
215
+ color: var(--vscode-descriptionForeground, color-mix(in srgb, currentColor 72%, transparent));
216
+ font-size: 0.92em;
217
+ }
218
+
219
+ .md-rich-link-detail {
220
+ flex: 1 1 auto;
221
+ min-width: 1.5em;
222
+ color: var(--vscode-descriptionForeground, color-mix(in srgb, currentColor 72%, transparent));
223
+ font-size: 0.92em;
224
+ }
225
+
226
+ .md-rich-link-detail::before {
227
+ content: '·';
228
+ margin-right: 0.28em;
229
+ }
230
+
231
+ .md-rich-link-status {
232
+ flex: none;
233
+ display: inline-flex;
234
+ align-self: center;
235
+ align-items: center;
236
+ gap: 0.22em;
237
+ margin-left: 0.04em;
238
+ color: var(--vscode-descriptionForeground, currentColor);
239
+ font-size: 0.86em;
240
+ font-weight: 600;
241
+ line-height: 1;
242
+ }
243
+
244
+ .md-rich-link-detail[hidden],
245
+ .md-rich-link-changes[hidden],
246
+ .md-rich-link-status[hidden] {
247
+ display: none;
248
+ }
249
+
250
+ .md-rich-link-changes {
251
+ flex: none;
252
+ display: inline-flex;
253
+ align-self: center;
254
+ gap: 0.28em;
255
+ font-size: 0.86em;
256
+ font-weight: 600;
257
+ line-height: 1;
258
+ }
259
+
260
+ .md-rich-link-changes::before,
261
+ .md-rich-link:not(
262
+ [data-md-rich-link-kind='issue'],
263
+ [data-md-rich-link-kind='pullRequest'],
264
+ [data-md-rich-link-kind='session']
265
+ ) .md-rich-link-primary-status::before {
266
+ content: '·';
267
+ color: var(--vscode-descriptionForeground, currentColor);
268
+ font-weight: 400;
269
+ }
270
+
271
+ .md-rich-link-insertions {
272
+ color: var(--vscode-charts-green, #1f883d);
273
+ }
274
+
275
+ .md-rich-link-deletions {
276
+ color: var(--vscode-charts-red, #cf222e);
277
+ }
278
+
279
+ .md-rich-link-status-icon {
280
+ flex: none;
281
+ align-self: center;
282
+ font-size: 1em;
283
+ }
284
+
285
+ .md-rich-link:is(
286
+ [data-md-rich-link-status='open'],
287
+ [data-md-rich-link-status='closed'],
288
+ [data-md-rich-link-status='merged'],
289
+ [data-md-rich-link-status='draft'],
290
+ [data-md-rich-link-status='notPlanned']
291
+ ) .md-rich-link-primary-status {
292
+ color: var(--md-rich-link-state-color);
293
+ }
294
+
295
+ .md-rich-link-secondary-status {
296
+ margin-left: 0.06em;
297
+ }
298
+
299
+ .md-rich-link-secondary-status::before {
300
+ content: '·';
301
+ margin-right: 0.08em;
302
+ color: var(--vscode-descriptionForeground, currentColor);
303
+ font-weight: 400;
304
+ }
305
+
306
+ .md-rich-link:is(
307
+ [data-md-rich-link-status='open'],
308
+ [data-md-rich-link-status='closed'],
309
+ [data-md-rich-link-status='merged'],
310
+ [data-md-rich-link-status='draft'],
311
+ [data-md-rich-link-status='notPlanned']
312
+ ) .md-rich-link-primary-status {
313
+ align-self: baseline;
314
+ padding: 0;
315
+ border: 0;
316
+ border-radius: 0;
317
+ background: transparent;
318
+ font-size: 1em;
319
+ line-height: inherit;
320
+ }
321
+
322
+ .md-rich-link[data-md-rich-link-status='success'] .md-rich-link-primary-status {
323
+ color: var(--vscode-charts-green, #1f883d);
324
+ }
325
+
326
+ .md-rich-link[data-md-rich-link-secondary-status='success'] .md-rich-link-secondary-status {
327
+ color: var(--md-rich-link-success-color);
328
+ }
329
+
330
+ .md-rich-link[data-md-rich-link-status='warning'] .md-rich-link-primary-status,
331
+ .md-rich-link[data-md-rich-link-secondary-status='warning'] .md-rich-link-secondary-status {
332
+ color: var(--vscode-editorWarning-foreground, #bf8700);
333
+ }
334
+
335
+ .md-rich-link[data-md-rich-link-status='error'] .md-rich-link-primary-status,
336
+ .md-rich-link[data-md-rich-link-secondary-status='error'] .md-rich-link-secondary-status {
337
+ color: var(--vscode-errorForeground, #cf222e);
338
+ }
339
+
340
+ .md-rich-link[data-md-rich-link-status='pending'] .md-rich-link-primary-status,
341
+ .md-rich-link[data-md-rich-link-secondary-status='pending'] .md-rich-link-secondary-status {
342
+ color: var(--vscode-editorWarning-foreground, #bf8700);
343
+ }
344
+
345
+ .md-rich-link[data-md-rich-link-kind='issue'] .md-rich-link-primary-status .md-rich-link-status-label,
346
+ .md-rich-link[data-md-rich-link-kind='pullRequest'] :is(
347
+ .md-rich-link-primary-status,
348
+ .md-rich-link-secondary-status
349
+ ) .md-rich-link-status-label {
350
+ display: none;
351
+ }
352
+
353
+ .md-rich-link[data-md-rich-link-status='open'] {
354
+ --md-rich-link-state-color: var(--vscode-charts-green, #1f883d);
355
+ }
356
+
357
+ .md-rich-link[data-md-rich-link-kind='issue'][data-md-rich-link-status='closed'],
358
+ .md-rich-link[data-md-rich-link-status='merged'] {
359
+ --md-rich-link-state-color: var(--vscode-charts-purple, #8250df);
360
+ }
361
+
362
+ .md-rich-link[data-md-rich-link-kind='pullRequest'][data-md-rich-link-status='closed'] {
363
+ --md-rich-link-state-color: var(--vscode-charts-red, #cf222e);
364
+ }
365
+
366
+ .md-rich-link[data-md-rich-link-status='draft'],
367
+ .md-rich-link[data-md-rich-link-status='notPlanned'] {
368
+ --md-rich-link-state-color: var(--vscode-descriptionForeground, #656d76);
369
+ }
370
+
371
+ .md-rich-link[data-md-rich-link-kind='pullRequest'][data-md-rich-link-secondary-status='error'] .md-rich-link-secondary-status {
372
+ color: var(--vscode-charts-red, var(--vscode-errorForeground, #cf222e));
373
+ }
374
+
375
+ .md-rich-link:is(
376
+ [data-md-rich-link-kind='issue'],
377
+ [data-md-rich-link-kind='pullRequest']
378
+ ) {
379
+ align-items: center;
380
+ gap: 4px;
381
+ padding: 1px 6px;
382
+ border-color: var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
383
+ border-radius: 4px;
384
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
385
+ color: var(--vscode-button-secondaryForeground, #242424);
386
+ font-size: 1em;
387
+ line-height: 1.25;
388
+ vertical-align: -0.5px;
389
+ }
390
+
391
+ .md-rich-link:is(
392
+ [data-md-rich-link-kind='issue'],
393
+ [data-md-rich-link-kind='pullRequest']
394
+ ):hover {
395
+ border-color: var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
396
+ background: var(--vscode-button-secondaryHoverBackground, #e5e5e5);
397
+ color: var(--vscode-button-secondaryForeground, #242424);
398
+ }
399
+
400
+ .md-rich-link:is(
401
+ [data-md-rich-link-kind='issue'],
402
+ [data-md-rich-link-kind='pullRequest']
403
+ ) .md-rich-link-reference {
404
+ display: none;
405
+ }
406
+
407
+ .md-rich-link:is(
408
+ [data-md-rich-link-kind='issue'],
409
+ [data-md-rich-link-kind='pullRequest']
410
+ ) :is(
411
+ .md-rich-link-label,
412
+ .md-rich-link-title,
413
+ .md-rich-link-primary-status,
414
+ .md-rich-link-secondary-status
415
+ ) {
416
+ align-self: center;
417
+ font-size: inherit;
418
+ line-height: inherit;
419
+ }
420
+
421
+ .md-rich-link:is(
422
+ [data-md-rich-link-kind='issue'],
423
+ [data-md-rich-link-kind='pullRequest']
424
+ ) :is(.md-rich-link-label, .md-rich-link-title) {
425
+ position: relative;
426
+ top: 0.25px;
427
+ max-width: 200px;
428
+ color: inherit;
429
+ font-weight: 400;
430
+ }
431
+
432
+ .md-rich-link:is(
433
+ [data-md-rich-link-kind='issue'],
434
+ [data-md-rich-link-kind='pullRequest']
435
+ ) .md-rich-link-status {
436
+ align-items: center;
437
+ height: 1.25em;
438
+ }
439
+
440
+ .md-rich-link:is(
441
+ [data-md-rich-link-kind='issue'],
442
+ [data-md-rich-link-kind='pullRequest']
443
+ ) .md-rich-link-status-icon {
444
+ display: inline-flex;
445
+ align-items: center;
446
+ justify-content: center;
447
+ width: 12px;
448
+ height: 12px;
449
+ font-size: 12px;
450
+ line-height: 12px;
451
+ }
452
+
453
+ .md-rich-link:is(
454
+ [data-md-rich-link-kind='issue'],
455
+ [data-md-rich-link-kind='pullRequest']
456
+ ) .md-rich-link-secondary-status::before {
457
+ align-self: center;
458
+ line-height: inherit;
459
+ }
460
+
461
+ .md-rich-link[data-md-rich-link-kind='session'] {
462
+ align-items: center;
463
+ gap: 4px;
464
+ padding: 1px 6px;
465
+ border-color: var(--vscode-chat-requestBorder, var(--vscode-input-border, color-mix(in srgb, currentColor 24%, transparent)));
466
+ border-radius: 4px;
467
+ background: var(--vscode-button-secondaryBackground, #f3f3f3);
468
+ color: var(--vscode-descriptionForeground, #656d76);
469
+ font-size: 1em;
470
+ font-weight: var(--vscode-agents-fontWeight-regular, 400);
471
+ line-height: 1.25;
472
+ vertical-align: baseline;
473
+ }
474
+
475
+ .md-rich-link[data-md-rich-link-kind='session']:hover {
476
+ border-color: var(--vscode-chat-requestBorder, var(--vscode-input-border, color-mix(in srgb, currentColor 24%, transparent)));
477
+ background: var(--vscode-toolbar-hoverBackground, color-mix(in srgb, currentColor 8%, transparent));
478
+ }
479
+
480
+ .md-rich-link[data-md-rich-link-kind='session'] :is(.md-rich-link-label, .md-rich-link-title) {
481
+ color: inherit;
482
+ font-weight: 400;
483
+ }
484
+
485
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-primary-status {
486
+ align-self: center;
487
+ align-items: center;
488
+ width: 12px;
489
+ height: 12px;
490
+ margin: 0;
491
+ padding: 0;
492
+ border: 0;
493
+ border-radius: 0;
494
+ background: transparent;
495
+ font-size: 1em;
496
+ line-height: inherit;
497
+ }
498
+
499
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-primary-status .md-rich-link-status-label {
500
+ display: none;
501
+ }
502
+
503
+ .md-rich-link[data-md-rich-link-kind='session'] .md-rich-link-status-icon:not(.monaco-pixel-spinner, [hidden]) {
504
+ display: inline-flex;
505
+ align-items: center;
506
+ justify-content: center;
507
+ width: 12px;
508
+ height: 12px;
509
+ font-size: 12px;
510
+ line-height: 12px;
511
+ }
512
+
513
+ .md-rich-link .md-rich-link-status-icon[hidden] {
514
+ display: none;
515
+ }
516
+
517
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='neutral'] .md-rich-link-primary-status,
518
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='success'] .md-rich-link-primary-status,
519
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='pending'] .md-rich-link-primary-status {
520
+ color: var(--vscode-descriptionForeground, #656d76);
521
+ }
522
+
523
+ .md-rich-link .monaco-pixel-spinner {
524
+ display: inline-grid;
525
+ grid-template-columns: repeat(2, 2px);
526
+ grid-template-rows: repeat(3, 2px);
527
+ column-gap: 2px;
528
+ row-gap: 2px;
529
+ place-content: center;
530
+ width: 16px;
531
+ height: 16px;
532
+ color: currentColor;
533
+ contain: layout style size paint;
534
+ isolation: isolate;
535
+ pointer-events: none;
536
+ transform: translateZ(0);
537
+ }
538
+
539
+ .md-rich-link[data-md-rich-link-kind='session'] .monaco-pixel-spinner {
540
+ width: 12px;
541
+ height: 12px;
542
+ }
543
+
544
+ .md-rich-link .monaco-pixel-spinner-dot {
545
+ display: block;
546
+ width: 2px;
547
+ height: 2px;
548
+ border-radius: 50%;
549
+ background-color: currentColor;
550
+ opacity: 0;
551
+ transform: translateY(-4px);
552
+ animation: monaco-pixel-spinner-dot-cycle 1820ms steps(6, jump-none) infinite;
553
+ }
554
+
555
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(1) {
556
+ animation-delay: 520ms;
557
+ }
558
+
559
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(2) {
560
+ animation-delay: 650ms;
561
+ }
562
+
563
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(3) {
564
+ animation-delay: 260ms;
565
+ }
566
+
567
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(4) {
568
+ animation-delay: 390ms;
569
+ }
570
+
571
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(5) {
572
+ animation-name: monaco-pixel-spinner-dot-cycle-long;
573
+ }
574
+
575
+ .md-rich-link .monaco-pixel-spinner-dot:nth-child(6) {
576
+ animation-name: monaco-pixel-spinner-dot-cycle-short;
577
+ animation-delay: 130ms;
578
+ }
579
+
580
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot {
581
+ opacity: 0.25;
582
+ transform: none;
583
+ animation: monaco-pixel-spinner-ring-pulse 1200ms steps(4, jump-none) infinite;
584
+ }
585
+
586
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(1) {
587
+ animation-delay: 0ms;
588
+ }
589
+
590
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(2) {
591
+ animation-delay: 200ms;
592
+ }
593
+
594
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(3) {
595
+ animation-delay: 1000ms;
596
+ }
597
+
598
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(4) {
599
+ animation-delay: 400ms;
600
+ }
601
+
602
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(5) {
603
+ animation-delay: 800ms;
604
+ }
605
+
606
+ .md-rich-link .monaco-pixel-spinner-ring .monaco-pixel-spinner-dot:nth-child(6) {
607
+ animation-delay: 600ms;
608
+ }
609
+
610
+ @keyframes monaco-pixel-spinner-dot-cycle {
611
+ 0% {
612
+ opacity: 0;
613
+ transform: translateY(-4px);
614
+ }
615
+ 9.34%, 57.14% {
616
+ opacity: 1;
617
+ transform: translateY(0);
618
+ }
619
+ 66.48%, 100% {
620
+ opacity: 0;
621
+ transform: translateY(7px);
622
+ }
623
+ }
624
+
625
+ @keyframes monaco-pixel-spinner-dot-cycle-long {
626
+ 0% {
627
+ opacity: 0;
628
+ transform: translateY(-4px);
629
+ }
630
+ 9.34%, 64.29% {
631
+ opacity: 1;
632
+ transform: translateY(0);
633
+ }
634
+ 73.63%, 100% {
635
+ opacity: 0;
636
+ transform: translateY(7px);
637
+ }
638
+ }
639
+
640
+ @keyframes monaco-pixel-spinner-dot-cycle-short {
641
+ 0% {
642
+ opacity: 0;
643
+ transform: translateY(-4px);
644
+ }
645
+ 9.34%, 50% {
646
+ opacity: 1;
647
+ transform: translateY(0);
648
+ }
649
+ 59.34%, 100% {
650
+ opacity: 0;
651
+ transform: translateY(7px);
652
+ }
653
+ }
654
+
655
+ @keyframes monaco-pixel-spinner-ring-pulse {
656
+ 0%, 100% {
657
+ opacity: 0.25;
658
+ transform: none;
659
+ }
660
+ 16.67% {
661
+ opacity: 1;
662
+ transform: none;
663
+ }
664
+ }
665
+
666
+ @media (prefers-reduced-motion: reduce) {
667
+ .md-rich-link .monaco-pixel-spinner-dot {
668
+ animation: none;
669
+ opacity: 1;
670
+ transform: translateY(0);
671
+ }
672
+ }
673
+
674
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='warning'] .md-rich-link-primary-status {
675
+ color: var(--vscode-list-warningForeground, #855f00);
676
+ }
677
+
678
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='warning'] {
679
+ border-color: var(--vscode-list-warningForeground, #855f00);
680
+ background-color: color-mix(in srgb, var(--vscode-list-warningForeground, #855f00) 12%, transparent);
681
+ color: var(--vscode-list-warningForeground, #855f00);
682
+ }
683
+
684
+ .md-rich-link[data-md-rich-link-kind='session'][data-md-rich-link-status='error'] .md-rich-link-primary-status {
685
+ color: var(--vscode-errorForeground, #cf222e);
686
+ }
687
+
688
+ .md-rich-link-unavailable {
689
+ border-style: dashed;
690
+ }
691
+
90
692
  .md-fence-spacer {
91
693
  visibility: hidden;
92
694
  font-family: 'Cascadia Code', 'Fira Code', monospace;
@@ -96,7 +698,13 @@
96
698
  .md-marker {
97
699
  color: #999;
98
700
  font-family: 'Cascadia Code', 'Fira Code', monospace;
99
- font-size: 0.85em;
701
+ /*
702
+ * Revealed source is painted a step smaller than body text. Published as a
703
+ * custom property because a gutter marker has to undo it to size its box
704
+ * against the body line box — see `.md-list-item-active>.md-marker-listItemMarker`.
705
+ */
706
+ --md-marker-font-scale: 0.85;
707
+ font-size: calc(1em * var(--md-marker-font-scale));
100
708
  display: inline;
101
709
  overflow: hidden;
102
710
  max-width: 100px;
@@ -122,6 +730,69 @@
122
730
  white-space: pre-wrap;
123
731
  }
124
732
 
733
+ /*
734
+ * An unhandled block: a construct the parser does not model (setext heading,
735
+ * an extension token). Its raw source is shown verbatim,
736
+ * styled like a code block but visibly flagged as "not understood" by a dashed
737
+ * warning border, so the content is preserved and editable rather than silently
738
+ * dropped.
739
+ *
740
+ * The wrapper is the non-scrolling box (border + block spacing); the inner
741
+ * `.md-unhandled-scroll` <pre> is the horizontal scroller.
742
+ */
743
+ .md-unhandled-block {
744
+ margin: 0.5em 0;
745
+ border: 1px dashed #d0a000;
746
+ border-radius: 4px;
747
+ }
748
+
749
+ /*
750
+ * Inner scroller. Beats the per-theme `.md-theme-* .md-code-block` box rules
751
+ * (same class count) via the extra `pre` type selector: no margin/border of its
752
+ * own (those live on the wrapper).
753
+ */
754
+ pre.md-unhandled-scroll.md-code-block {
755
+ margin: 0;
756
+ border: 0;
757
+ border-radius: 4px;
758
+ }
759
+
760
+ /*
761
+ * Complete block HTML comments are authoring metadata, not unsupported-syntax
762
+ * warnings. Keep them source-identifiable but quiet while reading, and reveal
763
+ * their exact whitespace when the block becomes active.
764
+ */
765
+ .md-html-comment {
766
+ margin: 0.125em 0 0.25em;
767
+ padding: 0.125em 0;
768
+ overflow: hidden;
769
+ color: var(--md-html-comment-foreground, #6e7378);
770
+ font-family: var(--md-html-comment-font-family, 'Cascadia Code', 'Fira Code', monospace);
771
+ font-size: 0.85em;
772
+ line-height: 1.5;
773
+ text-overflow: ellipsis;
774
+ white-space: nowrap;
775
+ transition: color 80ms ease-out;
776
+ }
777
+
778
+ .md-html-comment:not(.md-html-comment-source):hover {
779
+ color: var(--md-html-comment-hover-foreground, #45494e);
780
+ }
781
+
782
+ .md-html-comment-source {
783
+ overflow: visible;
784
+ text-overflow: clip;
785
+ white-space: pre-wrap;
786
+ }
787
+
788
+ .md-html-comment-syntax {
789
+ opacity: 0.6;
790
+ }
791
+
792
+ .md-html-comment-source .md-html-comment-syntax {
793
+ opacity: 1;
794
+ }
795
+
125
796
  /*
126
797
  * Visible whitespace indicators, shown only in the active/source view. The real
127
798
  * whitespace character stays in the DOM (so source ↔ DOM mapping and selection
@@ -221,15 +892,61 @@
221
892
  }
222
893
 
223
894
  /*
224
- * Glue (table cell pipes, the task `[x] ` source, source padding) keeps its
225
- * inline footprint when hidden so column widths and the checkbox gutter stay
226
- * identical between active and inactive states.
895
+ * Glue normally keeps its inline footprint when hidden so source padding and
896
+ * widget gutters stay identical between active and inactive states. Hidden
897
+ * table-cell glue is the exception below: leaving it in inline flow lets its
898
+ * invisible spaces wrap around long cell content.
227
899
  */
228
900
  .md-glue-hidden {
229
901
  display: inline;
230
902
  visibility: hidden;
231
903
  }
232
904
 
905
+ /*
906
+ * Inactive table pipes stay in the DOM/source tree, but leave layout and
907
+ * hit-testing entirely. Keeping an invisible rect either in the content flow or
908
+ * over the cell padding can create phantom lines or steal clicks from visible
909
+ * text. Hidden source offsets therefore collapse to the neighboring semantic
910
+ * seam, matching other display-none markers. Visible pipes retain the per-theme
911
+ * active/source layout.
912
+ */
913
+ .md-table td>.md-glue-tableCellGlue.md-glue-hidden {
914
+ display: none;
915
+ }
916
+
917
+ /*
918
+ * Active table: take each cell's TRAILING structural glue (the source space
919
+ * after the cell text, and — via the per-theme `right: 0` rule — the last
920
+ * column's closing `|`) out of the cell's inline flow. Left in flow, that glue
921
+ * wraps below long cell content (the same wrapping the hidden-glue note above
922
+ * describes), which makes the cell two lines tall: the browser's default
923
+ * `vertical-align: middle` then re-centres the other cells' single-line content
924
+ * in Y, their runs merge into one oversized VisualLine, and the caret — sized
925
+ * directly from that line box — grows far past the line height while the
926
+ * visible pipes drift apart row-to-row. Positioning the trailing glue
927
+ * absolutely removes it from wrapping flow while keeping its real client rects
928
+ * at the static (content-line) position, so caret placement, hit-testing,
929
+ * source mapping and injectivity are unchanged. `top`/`bottom: auto` keep it on
930
+ * that content line rather than the cell's top edge. This mirrors the inactive
931
+ * `display: none` above; the leading `| ` glue deliberately stays in flow (a
932
+ * relative glyph shift, per theme) so first-text X is preserved.
933
+ *
934
+ * `:not(:first-child)` restricts this to a genuine trailing glue: a non-empty
935
+ * cell emits leading + trailing glue, but an EMPTY cell parses to a single glue
936
+ * node that is simultaneously first and last child. That lone node is the
937
+ * cell's leading pipe, so it must stay in flow like every other leading pipe;
938
+ * excluding it keeps empty cells identical to their previous (base) behaviour.
939
+ */
940
+ .md-table.md-block-active td {
941
+ position: relative;
942
+ }
943
+
944
+ .md-table.md-block-active td>.md-glue-tableCellGlue:last-child:not(:first-child) {
945
+ position: absolute;
946
+ top: auto;
947
+ bottom: auto;
948
+ }
949
+
233
950
  /*
234
951
  * Inter-block glue: the run of blank lines between two top-level blocks. It is
235
952
  * mounted as the last inline child of the block that precedes it, so it sits at
@@ -266,15 +983,6 @@
266
983
  visibility: hidden;
267
984
  }
268
985
 
269
- /*
270
- * Table cell-glue pipes (`| `) keep their inline footprint when hidden so the
271
- * column widths stay identical active and inactive.
272
- */
273
- .md-marker-tableCellGlue.md-marker-hidden {
274
- display: inline;
275
- visibility: hidden;
276
- }
277
-
278
986
  /*
279
987
  * The code-block fences (```lang / ```) each sit on their own source line. When
280
988
  * hidden they keep their vertical footprint (visibility hidden, not display
@@ -309,6 +1017,48 @@
309
1017
  height: 16px;
310
1018
  }
311
1019
 
1020
+ /*
1021
+ * A wide table scrolls horizontally inside its wrapper (the block box) instead
1022
+ * of overflowing the page and scrolling the editor's fixed left gutter away.
1023
+ * The wrapper is the scroll viewport the selection/caret clipping measures (see
1024
+ * `BlockViewNode.scrollElement` / `blockViewportClip`); the inner `<table>`
1025
+ * keeps `width: auto` (theme-defined) so it sizes to its content and overflows.
1026
+ *
1027
+ * `width: fit-content` keeps the wrapper hugging the table's intrinsic width, so
1028
+ * a narrow table — and the active-block glow redirected onto the wrapper below —
1029
+ * stays as wide as the table (unchanged from before this wrapper existed).
1030
+ * `max-width: 100%` caps it at the content column, past which the table
1031
+ * overflows and scrolls locally. This is the standard responsive-table pattern
1032
+ * (cf. GitHub's own `width: max-content; max-width: 100%`).
1033
+ */
1034
+ .md-table-wrapper {
1035
+ overflow-x: auto;
1036
+ width: fit-content;
1037
+ max-width: 100%;
1038
+ }
1039
+
1040
+ /*
1041
+ * The active-block highlight is an *outset* glow (`box-shadow: 0 0 0 8px`).
1042
+ * Making the wrapper a scroll box (`overflow-x: auto`, which also forces
1043
+ * `overflow-y: auto`) clips descendant paint to its padding box, so the glow on
1044
+ * the inner active `<table>` would be cut off (the table has no horizontal
1045
+ * margin to give the shadow room). Render the generic active chrome on the
1046
+ * wrapper instead — a scroll box's own shadow is never clipped by its own
1047
+ * overflow, exactly like a code block carries the glow on its own scroller —
1048
+ * and drop it from the table, which keeps `md-block-active` purely for the
1049
+ * per-theme source-pipe styling.
1050
+ */
1051
+ .md-table-wrapper:has(> .md-table.md-block-active) {
1052
+ background: var(--md-block-active-background, #f8f8f8);
1053
+ border-radius: 4px;
1054
+ box-shadow: 0 0 0 8px var(--md-block-active-background, #f8f8f8);
1055
+ }
1056
+
1057
+ .md-table.md-block-active {
1058
+ background: none;
1059
+ box-shadow: none;
1060
+ }
1061
+
312
1062
  .md-selection-layer {
313
1063
  position: absolute;
314
1064
  top: 0;
@@ -424,9 +1174,26 @@
424
1174
 
425
1175
  .md-blockquote>.md-marker-blockQuoteMarker {
426
1176
  position: absolute;
427
- right: calc(100% - var(--md-blockquote-pad, 0px));
1177
+ right: calc(100% - var(--md-blockquote-pad, 0px) - 1ch);
428
1178
  top: auto;
1179
+ /*
1180
+ * Reserve the optional-space column so adding it cannot move the `>` glyph,
1181
+ * then shift and scale every active quote marker consistently to leave a
1182
+ * virtual gap before body text without consuming source width. These tuned
1183
+ * properties are shared by ordinary and marker-only quote lines.
1184
+ */
1185
+ --md-blockquote-marker-shift: -0.18ch;
1186
+ --md-blockquote-marker-scale: 0.9;
1187
+ display: inline-flex;
1188
+ min-width: 2ch;
1189
+ font-size: inherit;
1190
+ line-height: inherit;
1191
+ height: 1lh;
1192
+ align-items: center;
1193
+ text-align: left;
429
1194
  white-space: pre;
1195
+ transform: translateX(var(--md-blockquote-marker-shift)) scale(var(--md-blockquote-marker-scale));
1196
+ transform-origin: left center;
430
1197
  }
431
1198
 
432
1199
  /* Inactive: gone entirely (the gutter is empty, the text stays put). */
@@ -434,6 +1201,16 @@
434
1201
  display: none;
435
1202
  }
436
1203
 
1204
+ /* Collapsed block-gap newlines still need one flow box per marker-only line. */
1205
+ .md-blockquote-line-anchor {
1206
+ display: block;
1207
+ }
1208
+
1209
+ /* A trailing marker-only source line follows the preceding quoted line directly. */
1210
+ .md-blockquote-marker-only-line>.md-paragraph:last-of-type {
1211
+ margin-bottom: 0;
1212
+ }
1213
+
437
1214
  /* Code/math blocks scroll horizontally; their look is theme-defined. */
438
1215
  .md-code-block {
439
1216
  overflow-x: auto;
@@ -466,19 +1243,50 @@
466
1243
  * before the marker. Gutter-positioning keeps the marker out of the inline
467
1244
  * flow so toggling it never shifts the item's text horizontally.
468
1245
  *
469
- * `line-height: inherit` makes the marker share the item's line box (its own
470
- * `.md-marker` rule shrinks it to `line-height: 1`, which floats the glyph to
471
- * the top of the taller text line); matching the line box vertically centres
472
- * the `-` with the rendered text.
1246
+ * Vertical centring makes the marker box exactly the item's first line box and
1247
+ * centres the glyph in it. Getting that box right is the whole trick: an
1248
+ * inherited UNITLESS line-height is re-resolved against the element's own
1249
+ * font-size, so a marker shrunk by `--md-marker-font-scale` also gets a
1250
+ * proportionally shorter line box which, pinned at `top: 0`, floats the glyph
1251
+ * above the text. Dividing `1lh` by that same scale cancels the shrink exactly,
1252
+ * without touching the painted size and without a `transform` (which would
1253
+ * shrink the box the caret geometry is measured from).
473
1254
  */
474
1255
  .md-list-item-active>.md-marker-listItemMarker {
475
1256
  position: absolute;
476
1257
  right: 100%;
477
1258
  top: 0;
478
1259
  line-height: inherit;
1260
+ height: calc(1lh / var(--md-marker-font-scale));
1261
+ display: inline-flex;
1262
+ align-items: center;
1263
+ justify-content: flex-end;
479
1264
  white-space: pre;
480
1265
  }
481
1266
 
1267
+ /*
1268
+ * `display: inline-flex` above outranks the plain `.md-marker-hidden`
1269
+ * (`display: none`), so — exactly as for headings — re-hide the marker here for
1270
+ * the states that ask for it, otherwise the bullet could never be hidden.
1271
+ */
1272
+ .md-list-item-active>.md-marker-listItemMarker.md-marker-hidden {
1273
+ display: none;
1274
+ }
1275
+
1276
+ /*
1277
+ * An inactive ordered item uses the browser's native `::marker`. Match its
1278
+ * typography when revealing the source marker so switching the active item
1279
+ * does not change the number's width or horizontal position: an ordered marker
1280
+ * opts out of the muted size step entirely, which also makes the `1lh`
1281
+ * compensation above a no-op for it. Keep unordered source markers in the
1282
+ * standard muted monospace source style.
1283
+ */
1284
+ ol.md-list>.md-list-item-active>.md-marker-listItemMarker,
1285
+ ol.md-list>.md-list-item-active>.md-list-gutter>.md-marker-listItemMarker {
1286
+ font-family: inherit;
1287
+ --md-marker-font-scale: 1;
1288
+ }
1289
+
482
1290
  /*
483
1291
  * A nested item's source indentation precedes its bullet (`␣␣- text`). The
484
1292
  * indent glue and the bullet are mounted together in this gutter span, which is
@@ -511,6 +1319,25 @@
511
1319
  flex: 0 0 auto;
512
1320
  }
513
1321
 
1322
+ /*
1323
+ * A NESTED item's bullet is a flex child of the gutter, so the direct-child
1324
+ * rule above cannot reach it and it would otherwise stretch to the gutter's
1325
+ * full height with its glyph parked at the top. Centring is therefore done by
1326
+ * the gutter itself: it is statically positioned (hence aligned to the item's
1327
+ * first line), so making it one line box tall and centring its children puts
1328
+ * the bullet and the indentation dots on that line.
1329
+ *
1330
+ * The gutter carries body typography, so its `1lh` needs no compensation — and
1331
+ * the bullet inside keeps its own muted `font-size`, which is exactly what the
1332
+ * shrink-to-fit gutter reserves. Shrinking the bullet visually instead would
1333
+ * make the gutter reserve more width than the bullet paints and slide the whole
1334
+ * indentation column left.
1335
+ */
1336
+ .md-list-item-active>.md-list-gutter {
1337
+ height: 1lh;
1338
+ align-items: center;
1339
+ }
1340
+
514
1341
 
515
1342
  /*
516
1343
  * Re-attributed source indentation (the spaces after a line break that precede
@@ -523,6 +1350,16 @@
523
1350
  white-space: pre;
524
1351
  }
525
1352
 
1353
+ /*
1354
+ * A continuation-line indent inside a paragraph is source-only padding. When
1355
+ * inactive, the preceding soft-break newline already collapses to the single
1356
+ * rendered space Markdown requires; retaining the hidden indent would add the
1357
+ * tab/space run's width on top of it.
1358
+ */
1359
+ .md-paragraph>.md-glue-indent.md-glue-hidden {
1360
+ display: none;
1361
+ }
1362
+
526
1363
  /*
527
1364
  * A loose list item's later block (its second paragraph etc.) owns the source
528
1365
  * continuation indent that precedes it as its `leadingTrivia`. Like a nested
@@ -556,14 +1393,20 @@
556
1393
  }
557
1394
 
558
1395
  /*
559
- * Reserve the marker column after the `[x]`/`[ ]` source marker (the first glue
560
- * in a task item's paragraph) so the rendered checkbox widget overlaid on it has
561
- * a comfortable gap before the text. The fixed width applies in both active and
562
- * inactive states, so the first text character does not drift horizontally when
563
- * markers toggle (see the compare fixture's `checkMarkedTextX` assertion).
1396
+ * Reserve the marker column on the paragraph rather than only on its first
1397
+ * inline child. This gives every wrapped line the same content edge. The
1398
+ * source marker glue is positioned over that reserved column, as is the
1399
+ * rendered checkbox, so activating the item does not shift its text (see the
1400
+ * compare fixture's `checkMarkedTextX` assertion).
564
1401
  */
565
- .md-task-list-item .md-paragraph>.md-glue:first-child {
566
- display: inline-block;
1402
+ .md-task-list-item>.md-paragraph {
1403
+ padding-left: var(--md-task-marker-width);
1404
+ }
1405
+
1406
+ .md-task-list-item>.md-paragraph>.md-glue:first-child {
1407
+ position: absolute;
1408
+ top: 0;
1409
+ left: 0;
567
1410
  width: var(--md-task-marker-width);
568
1411
  }
569
1412
 
@@ -588,6 +1431,7 @@
588
1431
  position: absolute;
589
1432
  left: 0;
590
1433
  top: 0.25em;
1434
+ z-index: 1;
591
1435
  cursor: pointer;
592
1436
  transition: background-color 0.15s ease, border-color 0.15s ease;
593
1437
  }
@@ -600,8 +1444,8 @@
600
1444
  .md-checkbox:checked::after {
601
1445
  content: '';
602
1446
  position: absolute;
603
- left: 3px;
604
- top: 0px;
1447
+ left: 2.5px;
1448
+ top: -1px;
605
1449
  width: 5px;
606
1450
  height: 9px;
607
1451
  border: solid white;
@@ -613,6 +1457,39 @@
613
1457
  border-color: #888;
614
1458
  }
615
1459
 
1460
+ /*
1461
+ * The rotating "broken rounded-square" progress ring for an inactive task item
1462
+ * whose text begins with the hidden `:running:` marker (see
1463
+ * `ListItemViewData.isRunning`). Rendered as a conic-gradient ring — masked so
1464
+ * only the ring (not its center) paints — with a transparent gap that spins,
1465
+ * reading as a segmented spinner rather than a checked/unchecked box.
1466
+ */
1467
+ .md-checkbox-running,
1468
+ .md-checkbox-running:checked {
1469
+ padding: 2px;
1470
+ border: 0;
1471
+ border-radius: 4px;
1472
+ background: conic-gradient(
1473
+ transparent 0deg 42deg,
1474
+ #bbb 62deg 360deg
1475
+ );
1476
+ -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
1477
+ -webkit-mask-composite: xor;
1478
+ mask-composite: exclude;
1479
+ animation: md-checkbox-spin 0.8s linear infinite;
1480
+ opacity: 1;
1481
+ }
1482
+
1483
+ @keyframes md-checkbox-spin {
1484
+ to {
1485
+ transform: rotate(360deg);
1486
+ }
1487
+ }
1488
+
1489
+ .md-checkbox-running:hover {
1490
+ border-color: transparent;
1491
+ }
1492
+
616
1493
  .md-checkbox:checked:hover {
617
1494
  background-color: #3a73d4;
618
1495
  border-color: #3a73d4;
@@ -623,14 +1500,66 @@
623
1500
  opacity: 0.6;
624
1501
  }
625
1502
 
1503
+ .md-checkbox-running:disabled {
1504
+ opacity: 1;
1505
+ }
1506
+
1507
+ @media (prefers-reduced-motion: reduce) {
1508
+ .md-checkbox-running {
1509
+ animation: none !important;
1510
+ }
1511
+ }
1512
+
1513
+ /*
1514
+ * The `:running:` marker hidden from an inactive task item's rendered text
1515
+ * (see `TextViewData.hiddenPrefixLength`). It stays real, selectable source —
1516
+ * only visually hidden, per "Hidden markers remain real source" — so it takes
1517
+ * no layout space in either state.
1518
+ */
1519
+ .md-runner-marker {
1520
+ display: none;
1521
+ }
1522
+
626
1523
  .md-cursor {
627
1524
  position: absolute;
628
1525
  width: 2px;
629
1526
  background: var(--md-cursor-background, #000);
630
1527
  pointer-events: none;
1528
+ }
1529
+
1530
+ /*
1531
+ * The painted caret is only shown while the editor is genuinely focused — focus
1532
+ * rests inside it and its window is focused, mirrored onto the root as
1533
+ * `.md-focused`. When unfocused, hide the caret element but keep its layout box
1534
+ * (so caret geometry, selection and comment anchoring are unchanged) and stop
1535
+ * the blink. Adding the animation on focus restarts it from 0% (a solid caret).
1536
+ */
1537
+ .md-editor:not(.md-focused) .md-cursor {
1538
+ visibility: hidden;
1539
+ }
1540
+
1541
+ .md-editor.md-focused .md-cursor {
631
1542
  animation: md-cursor-blink 1s step-end infinite;
632
1543
  }
633
1544
 
1545
+ /*
1546
+ * Read-only mode retains the logical caret for selection and comment anchoring.
1547
+ * Hide only its painted element so unlocking can restore it in place.
1548
+ */
1549
+ .md-editor.md-readonly .md-cursor {
1550
+ visibility: hidden;
1551
+ }
1552
+
1553
+ .md-editor.md-readonly-editing-attempt {
1554
+ animation: md-readonly-editing-attempt 300ms ease-out;
1555
+ }
1556
+
1557
+ @keyframes md-readonly-editing-attempt {
1558
+ 50% {
1559
+ box-shadow: inset 0 0 0 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
1560
+ }
1561
+ }
1562
+
634
1563
  @keyframes md-cursor-blink {
635
1564
 
636
1565
  0%,
@@ -641,4 +1570,201 @@
641
1570
  50% {
642
1571
  opacity: 0;
643
1572
  }
1573
+ }
1574
+
1575
+ /*
1576
+ * Edit / read-only lock toggle.
1577
+ *
1578
+ * The asymmetric content padding reserves a real rail for the control:
1579
+ * button width + gap + edge inset. The zero-height sticky host spans the
1580
+ * document column and that rail, keeping the button beside (never over) the
1581
+ * rendered document as it scrolls. Colors use local `--md-readonly-*` custom
1582
+ * properties with literal fallbacks so this base file stays theme-agnostic
1583
+ * (themes may override them).
1584
+ */
1585
+ .md-readonly-toggle-host {
1586
+ position: sticky;
1587
+ top: 0;
1588
+ width: calc(100% + var(--md-editor-content-inline-end-padding));
1589
+ height: 0;
1590
+ z-index: 10;
1591
+ pointer-events: none;
1592
+ }
1593
+
1594
+ .md-readonly-toggle {
1595
+ position: absolute;
1596
+ top: 4px;
1597
+ right: var(--md-readonly-toggle-inset);
1598
+ pointer-events: auto;
1599
+ display: inline-grid;
1600
+ grid-template-columns: repeat(2, 24px);
1601
+ align-items: center;
1602
+ justify-items: center;
1603
+ gap: 2px;
1604
+ box-sizing: border-box;
1605
+ width: var(--md-readonly-toggle-width);
1606
+ height: var(--md-readonly-toggle-height);
1607
+ padding: 3px;
1608
+ overflow: hidden;
1609
+ direction: ltr;
1610
+ appearance: none;
1611
+ border-radius: 999px;
1612
+ border: 1px solid var(--md-readonly-border, #b8b8b8);
1613
+ background: var(--md-readonly-background, #f3f3f3);
1614
+ color: var(--md-readonly-foreground, #444444);
1615
+ font-size: 16px;
1616
+ line-height: 1;
1617
+ cursor: pointer;
1618
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
1619
+ transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
1620
+ }
1621
+
1622
+ /*
1623
+ * Below this width there is not enough document column for the side rail to be
1624
+ * useful. Give the host its own row and stop it from sticking, so neither long
1625
+ * unbreakable content nor later content scrolled through the viewport can ever
1626
+ * pass underneath the button.
1627
+ */
1628
+ .md-editor-narrow .md-readonly-toggle-host {
1629
+ position: relative;
1630
+ height: calc(var(--md-readonly-toggle-height) + var(--md-readonly-toggle-inset) + var(--md-readonly-toggle-inset));
1631
+ }
1632
+
1633
+ .md-readonly-toggle::after {
1634
+ content: '';
1635
+ position: absolute;
1636
+ z-index: 2;
1637
+ top: -8px;
1638
+ bottom: -8px;
1639
+ left: -30px;
1640
+ width: 24px;
1641
+ background: linear-gradient(90deg,
1642
+ transparent,
1643
+ var(--md-readonly-shine-edge, rgba(255, 255, 255, 0.16)) 24%,
1644
+ var(--md-readonly-shine, #ffffff) 50%,
1645
+ var(--md-readonly-shine-edge, rgba(255, 255, 255, 0.16)) 76%,
1646
+ transparent);
1647
+ box-shadow: 0 0 8px 2px var(--md-readonly-shine-glow, rgba(255, 255, 255, 0.58));
1648
+ opacity: 0;
1649
+ pointer-events: none;
1650
+ transform: skewX(-20deg);
1651
+ }
1652
+
1653
+ .md-readonly-toggle.md-readonly-toggle-shine::after {
1654
+ animation: md-readonly-toggle-shine 2s linear;
1655
+ will-change: transform, opacity;
1656
+ }
1657
+
1658
+ @keyframes md-readonly-toggle-shine {
1659
+ 0% {
1660
+ opacity: 0;
1661
+ transform: translateX(0) skewX(-20deg);
1662
+ }
1663
+
1664
+ 12%,
1665
+ 88% {
1666
+ opacity: 1;
1667
+ }
1668
+
1669
+ 100% {
1670
+ opacity: 0;
1671
+ transform: translateX(122px) skewX(-20deg);
1672
+ }
1673
+ }
1674
+
1675
+ .md-readonly-toggle:hover {
1676
+ border-color: var(--md-readonly-border-hover, #8d8d8d);
1677
+ background: var(--md-readonly-background-hover, #e9e9e9);
1678
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.1);
1679
+ }
1680
+
1681
+ .md-readonly-toggle:focus-visible {
1682
+ outline: 2px solid var(--md-readonly-accent, #4c8bf5);
1683
+ outline-offset: 1px;
1684
+ }
1685
+
1686
+ .md-readonly-toggle .md-readonly-toggle-indicator {
1687
+ position: absolute;
1688
+ top: 50%;
1689
+ left: 3px;
1690
+ width: 24px;
1691
+ height: 24px;
1692
+ border-radius: 50%;
1693
+ background: var(--md-readonly-accent, #4c8bf5);
1694
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
1695
+ transform: translate(26px, -50%);
1696
+ transition: background-color 0.12s ease, transform 0.16s ease;
1697
+ }
1698
+
1699
+ .md-readonly-toggle .md-readonly-toggle-icon {
1700
+ position: relative;
1701
+ z-index: 1;
1702
+ display: block;
1703
+ width: 16px;
1704
+ height: 16px;
1705
+ color: var(--md-readonly-foreground, #444444);
1706
+ opacity: 0.62;
1707
+ pointer-events: none;
1708
+ transition: color 0.12s ease, opacity 0.12s ease;
1709
+ }
1710
+
1711
+ .md-readonly-toggle:not(.md-readonly-toggle-locked) .md-readonly-toggle-icon-editing,
1712
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
1713
+ color: var(--md-readonly-accent-foreground, #ffffff);
1714
+ opacity: 1;
1715
+ }
1716
+
1717
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-indicator {
1718
+ transform: translate(0, -50%);
1719
+ }
1720
+
1721
+ @media (prefers-reduced-motion: reduce) {
1722
+
1723
+ .md-editor.md-readonly-editing-attempt,
1724
+ .md-readonly-toggle,
1725
+ .md-readonly-toggle .md-readonly-toggle-indicator,
1726
+ .md-readonly-toggle .md-readonly-toggle-icon,
1727
+ .md-readonly-toggle.md-readonly-toggle-shine::after {
1728
+ animation: none;
1729
+ transition: none;
1730
+ }
1731
+ }
1732
+
1733
+ @media (forced-colors: active) {
1734
+ .md-readonly-toggle {
1735
+ forced-color-adjust: none;
1736
+ border-color: ButtonText;
1737
+ background: ButtonFace;
1738
+ color: ButtonText;
1739
+ box-shadow: none;
1740
+ }
1741
+
1742
+ .md-readonly-toggle::after {
1743
+ display: none;
1744
+ }
1745
+
1746
+ .md-readonly-toggle:hover {
1747
+ border-color: Highlight;
1748
+ background: ButtonFace;
1749
+ box-shadow: none;
1750
+ }
1751
+
1752
+ .md-readonly-toggle:focus-visible {
1753
+ outline-color: Highlight;
1754
+ }
1755
+
1756
+ .md-readonly-toggle .md-readonly-toggle-indicator {
1757
+ background: Highlight;
1758
+ box-shadow: none;
1759
+ }
1760
+
1761
+ .md-readonly-toggle .md-readonly-toggle-icon {
1762
+ color: ButtonText;
1763
+ opacity: 1;
1764
+ }
1765
+
1766
+ .md-readonly-toggle:not(.md-readonly-toggle-locked) .md-readonly-toggle-icon-editing,
1767
+ .md-readonly-toggle.md-readonly-toggle-locked .md-readonly-toggle-icon-locked {
1768
+ color: HighlightText;
1769
+ }
644
1770
  }