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

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 (77) hide show
  1. package/README.md +571 -0
  2. package/dist/commands.d.ts +67 -0
  3. package/dist/commands.js +185 -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 +1964 -155
  11. package/dist/index.js +8134 -2188
  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 +301 -0
  17. package/dist/web-editors.js +7368 -0
  18. package/dist/web-editors.js.map +1 -0
  19. package/package.json +66 -17
  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/contrib/rename/rename.css +73 -0
  24. package/src/contrib/suggest/suggest.css +109 -0
  25. package/src/view/editor.css +1608 -66
  26. package/src/view/themes/default.css +21 -4
  27. package/src/view/themes/github.css +25 -13
  28. package/src/view/themes/vscode-default.css +407 -0
  29. package/src/view/themes/{vscode.css → vscode-github.css} +134 -62
  30. package/dist/_observables/assert.d.ts +0 -2
  31. package/dist/_observables/deps.d.ts +0 -28
  32. package/dist/_observables/disposables.d.ts +0 -19
  33. package/dist/_observables/equals.d.ts +0 -32
  34. package/dist/_observables/index.d.ts +0 -2
  35. package/dist/_observables/observableInternal/base.d.ts +0 -172
  36. package/dist/_observables/observableInternal/changeTracker.d.ts +0 -44
  37. package/dist/_observables/observableInternal/commonFacade/cancellation.d.ts +0 -24
  38. package/dist/_observables/observableInternal/commonFacade/deps.d.ts +0 -24
  39. package/dist/_observables/observableInternal/debugLocation.d.ts +0 -21
  40. package/dist/_observables/observableInternal/debugName.d.ts +0 -33
  41. package/dist/_observables/observableInternal/experimental/deferUnobserve.d.ts +0 -16
  42. package/dist/_observables/observableInternal/experimental/reducer.d.ts +0 -37
  43. package/dist/_observables/observableInternal/experimental/utils.d.ts +0 -15
  44. package/dist/_observables/observableInternal/index.d.ts +0 -25
  45. package/dist/_observables/observableInternal/logging/consoleObservableLogger.d.ts +0 -40
  46. package/dist/_observables/observableInternal/logging/debugGetDependencyGraph.d.ts +0 -4
  47. package/dist/_observables/observableInternal/logging/debugger/debuggerRpc.d.ts +0 -4
  48. package/dist/_observables/observableInternal/logging/debugger/devToolsLogger.d.ts +0 -43
  49. package/dist/_observables/observableInternal/logging/debugger/rpc.d.ts +0 -41
  50. package/dist/_observables/observableInternal/logging/debugger/utils.d.ts +0 -13
  51. package/dist/_observables/observableInternal/logging/logging.d.ts +0 -30
  52. package/dist/_observables/observableInternal/map.d.ts +0 -18
  53. package/dist/_observables/observableInternal/observables/baseObservable.d.ts +0 -58
  54. package/dist/_observables/observableInternal/observables/constObservable.d.ts +0 -5
  55. package/dist/_observables/observableInternal/observables/derived.d.ts +0 -46
  56. package/dist/_observables/observableInternal/observables/derivedImpl.d.ts +0 -83
  57. package/dist/_observables/observableInternal/observables/lazyObservableValue.d.ts +0 -27
  58. package/dist/_observables/observableInternal/observables/observableFromEvent.d.ts +0 -37
  59. package/dist/_observables/observableInternal/observables/observableSignal.d.ts +0 -11
  60. package/dist/_observables/observableInternal/observables/observableSignalFromEvent.d.ts +0 -5
  61. package/dist/_observables/observableInternal/observables/observableValue.d.ts +0 -37
  62. package/dist/_observables/observableInternal/observables/observableValueOpts.d.ts +0 -8
  63. package/dist/_observables/observableInternal/reactions/autorun.d.ts +0 -56
  64. package/dist/_observables/observableInternal/reactions/autorunImpl.d.ts +0 -53
  65. package/dist/_observables/observableInternal/set.d.ts +0 -17
  66. package/dist/_observables/observableInternal/transaction.d.ts +0 -27
  67. package/dist/_observables/observableInternal/utils/promise.d.ts +0 -75
  68. package/dist/_observables/observableInternal/utils/runOnChange.d.ts +0 -7
  69. package/dist/_observables/observableInternal/utils/utils.d.ts +0 -43
  70. package/dist/_observables/observableInternal/utils/utilsCancellation.d.ts +0 -10
  71. package/dist/_observables/observableInternal/utils/valueWithChangeEvent.d.ts +0 -10
  72. package/dist/_observables/utils.d.ts +0 -15
  73. package/dist/observables.d.ts +0 -4
  74. package/dist/observables.js +0 -439
  75. package/dist/observables.js.map +0 -1
  76. package/dist/runOnChange-C00UIwqQ.js +0 -1538
  77. package/dist/runOnChange-C00UIwqQ.js.map +0 -1
@@ -12,6 +12,7 @@
12
12
  */
13
13
 
14
14
  .md-editor.md-theme-default {
15
+ color-scheme: light;
15
16
  font-family: system-ui, -apple-system, sans-serif;
16
17
  font-size: 16px;
17
18
  line-height: 1.6;
@@ -26,13 +27,21 @@
26
27
  margin: 0.5em 0;
27
28
  }
28
29
 
30
+ .md-theme-default .md-code-block-container {
31
+ margin: 0.5em 0;
32
+ }
33
+
29
34
  .md-theme-default .md-code-block {
30
35
  background: #f4f4f4;
31
36
  border-radius: 4px;
32
- padding: 12px 16px;
37
+ padding: 8px 12px;
33
38
  margin: 0.5em 0;
34
39
  }
35
40
 
41
+ .md-theme-default .md-code-block-container > .md-code-block {
42
+ margin: 0;
43
+ }
44
+
36
45
  .md-theme-default .md-code-block code {
37
46
  font-family: 'Cascadia Code', 'Fira Code', monospace;
38
47
  font-size: 14px;
@@ -121,9 +130,14 @@
121
130
  --md-list-indent-step: 24px;
122
131
  }
123
132
 
133
+ .md-theme-default .md-table-wrapper {
134
+ /* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
135
+ with siblings as before; the inner table has no margin of its own. */
136
+ margin: 0.5em 0;
137
+ }
138
+
124
139
  .md-theme-default .md-table {
125
140
  border-collapse: collapse;
126
- margin: 0.5em 0;
127
141
  width: auto;
128
142
  }
129
143
 
@@ -201,6 +215,9 @@
201
215
  * box) so the right outline is a straight line. Absolute removes it from flow,
202
216
  * but it is the trailing node so no text shifts; the leading pipe still fixes
203
217
  * first-text X and the row stays one line tall, keeping the compare invariants.
218
+ * `top: auto` keeps the pipe on the content line (the shared editor.css rule
219
+ * also takes trailing glue out of flow); the previous `top: 0` floated it to
220
+ * the cell's top edge, misaligning it with the leading pipes on wrapping rows.
204
221
  */
205
222
  .md-theme-default .md-table.md-block-active td:last-child {
206
223
  position: relative;
@@ -209,7 +226,7 @@
209
226
  .md-theme-default .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
210
227
  position: absolute;
211
228
  right: 0;
212
- top: 0;
229
+ top: auto;
213
230
  }
214
231
 
215
232
  /*
@@ -220,7 +237,7 @@
220
237
  .md-theme-default .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
221
238
  position: absolute;
222
239
  right: 0;
223
- top: 0;
240
+ top: auto;
224
241
  }
225
242
 
226
243
  .md-theme-default code {
@@ -14,6 +14,7 @@
14
14
  */
15
15
 
16
16
  .md-editor.github-markdown-theme {
17
+ color-scheme: light;
17
18
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans',
18
19
  Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
19
20
  font-size: 16px;
@@ -66,14 +67,8 @@
66
67
  .github-markdown-theme .md-blockquote {
67
68
  margin: 0 0 16px 0;
68
69
  padding: 0 1em;
69
- /*
70
- * The left padding the `>` gutter hangs in (matches padding-left: 1em at
71
- * the 16px blockquote font). Must be an absolute length, not `1em`: the
72
- * marker positions itself with this var inside its own (smaller, 0.85em)
73
- * font context, so an `em` value would resolve against the marker's
74
- * font-size and pull the `>` ~2px out of alignment with the text.
75
- */
76
- --md-blockquote-pad: 16px;
70
+ /* Matches padding-left; `em` is safe because shared marker geometry inherits font size. */
71
+ --md-blockquote-pad: 1em;
77
72
  color: #59636e;
78
73
  border-left: 0.25em solid #d1d9e0;
79
74
  }
@@ -117,16 +112,25 @@
117
112
  }
118
113
 
119
114
  /* Fenced code block. */
115
+ .github-markdown-theme .md-code-block-container {
116
+ margin-top: 0;
117
+ margin-bottom: 16px;
118
+ }
119
+
120
120
  .github-markdown-theme .md-code-block {
121
121
  margin-top: 0;
122
122
  margin-bottom: 16px;
123
- padding: 10px 16px;
123
+ padding: 8px 12px;
124
124
  font-size: 85%;
125
125
  line-height: 1.45;
126
126
  background-color: #f6f8fa;
127
127
  border-radius: 6px;
128
128
  }
129
129
 
130
+ .github-markdown-theme .md-code-block-container > .md-code-block {
131
+ margin: 0;
132
+ }
133
+
130
134
  .github-markdown-theme .md-code-block code {
131
135
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
132
136
  'Liberation Mono', monospace;
@@ -197,10 +201,15 @@
197
201
  line-height: 1;
198
202
  }
199
203
 
200
- .github-markdown-theme .md-table {
201
- border-collapse: collapse;
204
+ .github-markdown-theme .md-table-wrapper {
205
+ /* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
206
+ with siblings as before; the inner table has no margin of its own. */
202
207
  margin-top: 0;
203
208
  margin-bottom: 16px;
209
+ }
210
+
211
+ .github-markdown-theme .md-table {
212
+ border-collapse: collapse;
204
213
  width: auto;
205
214
  }
206
215
 
@@ -280,6 +289,9 @@
280
289
  * box) so the right outline is a straight line. Absolute removes it from flow,
281
290
  * but it is the trailing node so no text shifts; the leading pipe still fixes
282
291
  * first-text X and the row stays one line tall, keeping the compare invariants.
292
+ * `top: auto` keeps the pipe on the content line (the shared editor.css rule
293
+ * also takes trailing glue out of flow); the previous `top: 0` floated it to
294
+ * the cell's top edge, misaligning it with the leading pipes on wrapping rows.
283
295
  */
284
296
  .github-markdown-theme .md-table.md-block-active td:last-child {
285
297
  position: relative;
@@ -288,7 +300,7 @@
288
300
  .github-markdown-theme .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
289
301
  position: absolute;
290
302
  right: 0;
291
- top: 0;
303
+ top: auto;
292
304
  }
293
305
 
294
306
  /*
@@ -299,5 +311,5 @@
299
311
  .github-markdown-theme .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
300
312
  position: absolute;
301
313
  right: 0;
302
- top: 0;
314
+ top: auto;
303
315
  }
@@ -0,0 +1,407 @@
1
+ /*
2
+ * VS Code markdown theme — default preview variant (`md-theme-vscode-default`).
3
+ *
4
+ * One of two `--vscode-*`-variable-driven themes. This variant mirrors VS
5
+ * Code's own markdown *preview* stylesheet
6
+ * (`markdown-language-features/media/markdown.css`): a 14px base with a 22px
7
+ * line box, headings underlined with a 1px rule, a 5px blockquote bar, and
8
+ * code blocks framed by a 1px border on the editor's code-block background.
9
+ * Its heading scale is moderately reduced to better fit narrower editor panes.
10
+ * The sibling `vscode-github.css` (`md-theme-vscode-github`) instead mirrors
11
+ * GitHub's layout (16px base, badge-style inline code, zebra tables).
12
+ *
13
+ * Both themes are *variable-driven*: every color is `var(--vscode-*, …)` so the
14
+ * editor adopts whatever VS Code color theme is active WITHOUT the editor
15
+ * knowing anything about VS Code. They share the same `--md-tok-*` token
16
+ * palette, so only layout/typography differs between the two.
17
+ *
18
+ * Apply it via the editor `classNames` option:
19
+ *
20
+ * new EditorView(model, { classNames: ['md-theme-vscode-default'] });
21
+ *
22
+ * In a real webview VS Code injects the `--vscode-*` custom properties onto the
23
+ * document root and sets a body theme class, so this theme just works. In the
24
+ * Component Explorer the same variables are supplied by a snapshot stylesheet
25
+ * scoped under a `.vscode-theme.<id>` wrapper (see `fixture/vscodeThemes`).
26
+ *
27
+ * Fallbacks: each `var()` carries a light-palette fallback so the theme stays
28
+ * legible even with no `--vscode-*` variables present at all. Every selector is
29
+ * scoped under the theme class, so importing this file never affects the global
30
+ * page or any editor that did not opt in.
31
+ */
32
+
33
+ .md-editor.md-theme-vscode-default {
34
+ font-family: var(--markdown-font-family, -apple-system, BlinkMacSystemFont,
35
+ 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif);
36
+ font-size: var(--markdown-font-size, 14px);
37
+ line-height: var(--markdown-line-height, 1.572);
38
+ color: var(--vscode-editor-foreground, #1f2328);
39
+ word-wrap: break-word;
40
+ /*
41
+ * Active-block highlight (defined theme-agnostically in editor.css) follows
42
+ * the VS Code surface color so it stays a subtle inset on both light and
43
+ * dark color themes instead of a fixed light-grey box.
44
+ */
45
+ --md-block-active-background: var(--vscode-editorWidget-background, #f8f8f8);
46
+ /*
47
+ * Cursor color: editor.css paints `.md-cursor` with `--md-cursor-background`
48
+ * (theme-agnostic, black fallback); map it to the VS Code cursor color so it
49
+ * stays visible on dark color themes.
50
+ */
51
+ --md-cursor-background: var(--vscode-editorCursor-foreground, #000);
52
+ --md-whitespace-foreground: var(--vscode-editorWhitespace-foreground, #b0b0b0);
53
+ --md-html-comment-foreground: var(--vscode-descriptionForeground, #616161);
54
+ --md-html-comment-hover-foreground: var(--vscode-editor-foreground, #1f2328);
55
+ --md-html-comment-font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
56
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
57
+ --md-readonly-background: var(--vscode-button-secondaryBackground,
58
+ var(--vscode-editorWidget-background, #f3f3f3));
59
+ --md-readonly-background-hover: var(--vscode-button-secondaryHoverBackground,
60
+ var(--vscode-button-secondaryBackground,
61
+ var(--vscode-editorWidget-background, #e9e9e9)));
62
+ --md-readonly-foreground: var(--vscode-button-secondaryForeground,
63
+ var(--vscode-editorWidget-foreground, #444));
64
+ --md-readonly-border: var(--vscode-button-secondaryBorder,
65
+ var(--vscode-button-border,
66
+ var(--vscode-contrastBorder, var(--vscode-editorWidget-border, #b8b8b8))));
67
+ --md-readonly-border-hover: var(--vscode-button-secondaryBorder,
68
+ var(--vscode-button-border,
69
+ var(--vscode-contrastBorder, var(--vscode-editorWidget-border, #8d8d8d))));
70
+ --md-readonly-accent: var(--vscode-button-background, rgb(45, 92, 180));
71
+ --md-readonly-accent-foreground: var(--vscode-button-foreground, #fff);
72
+ --md-find-widget-background: var(--vscode-editorWidget-background, #f3f3f3);
73
+ --md-find-widget-foreground: var(--vscode-editorWidget-foreground, #222);
74
+ --md-find-widget-border: var(--vscode-editorWidget-border, #c8c8c8);
75
+ --md-find-widget-shadow: var(--vscode-widget-shadow, rgba(0, 0, 0, 0.2));
76
+ --md-find-input-background: var(--vscode-input-background, #fff);
77
+ --md-find-input-foreground: var(--vscode-input-foreground, #222);
78
+ --md-find-placeholder-foreground: var(--vscode-input-placeholderForeground, #767676);
79
+ --md-find-input-caret: var(--vscode-editorCursor-foreground, currentColor);
80
+ --md-find-input-border: var(--vscode-input-border, #cecece);
81
+ --md-find-count-foreground: var(--vscode-editorWidget-foreground, #222);
82
+ --md-find-focus-border: var(--vscode-focusBorder, #007fd4);
83
+ --md-find-button-hover-background: var(--vscode-inputOption-hoverBackground, rgba(128, 128, 128, 0.18));
84
+ --md-find-disabled-foreground: var(--vscode-disabledForeground, rgba(97, 97, 97, 0.5));
85
+ --md-find-editor-background: var(--vscode-editor-background, #ffffff);
86
+ --md-find-match-background: var(--vscode-editor-findMatchHighlightBackground, rgba(234, 92, 0, 0.33));
87
+ --md-find-current-background: var(--vscode-editor-findMatchBackground, #a8ac94);
88
+ --md-find-current-border: var(--vscode-editor-findMatchBorder,
89
+ color-mix(in srgb, var(--vscode-editorWidget-foreground, #616161) 55%,
90
+ var(--vscode-editor-findMatchBackground, #a8ac94)));
91
+ --md-find-option-background: var(--vscode-inputOption-activeBackground, #007acc);
92
+ --md-find-option-border: color-mix(in srgb,
93
+ var(--vscode-focusBorder, #007acc) 70%,
94
+ var(--vscode-inputOption-activeForeground, #000000));
95
+ --md-find-option-foreground: var(--vscode-inputOption-activeForeground, #fff);
96
+ --md-find-error-border: var(--vscode-inputValidation-errorBorder, #be1100);
97
+ --md-find-error-foreground: var(--vscode-errorForeground, #a1260d);
98
+ --md-separator-color: color-mix(in srgb,
99
+ var(--vscode-textSeparator-foreground, #d1d9e0) 60%, transparent);
100
+ --md-inline-code-background: color-mix(in srgb,
101
+ var(--vscode-textPreformat-background, #818b981f) 60%, transparent);
102
+ }
103
+
104
+ .vscode-high-contrast .md-editor.md-theme-vscode-default,
105
+ .vscode-high-contrast-light .md-editor.md-theme-vscode-default {
106
+ --md-separator-color: var(--vscode-textSeparator-foreground, currentColor);
107
+ --md-inline-code-background: var(--vscode-textPreformat-background, #818b981f);
108
+ }
109
+
110
+ .md-theme-vscode-default .md-heading {
111
+ margin-top: 24px;
112
+ margin-bottom: 16px;
113
+ font-weight: 600;
114
+ line-height: 1.25;
115
+ }
116
+
117
+ .md-theme-vscode-default h1.md-heading {
118
+ font-size: 1.75em;
119
+ padding-bottom: 0.3em;
120
+ border-bottom: 1px solid var(--md-separator-color);
121
+ }
122
+
123
+ .md-theme-vscode-default h2.md-heading {
124
+ font-size: 1.4em;
125
+ padding-bottom: 0.3em;
126
+ border-bottom: 1px solid var(--md-separator-color);
127
+ }
128
+
129
+ .md-theme-vscode-default h3.md-heading {
130
+ font-size: 1.2em;
131
+ }
132
+
133
+ .md-theme-vscode-default h4.md-heading {
134
+ font-size: 1em;
135
+ }
136
+
137
+ .md-theme-vscode-default h5.md-heading {
138
+ font-size: 0.875em;
139
+ }
140
+
141
+ .md-theme-vscode-default h6.md-heading {
142
+ font-size: 0.85em;
143
+ }
144
+
145
+ .md-theme-vscode-default .md-paragraph {
146
+ margin-top: 0;
147
+ margin-bottom: 16px;
148
+ }
149
+
150
+ /*
151
+ * Preview blockquotes keep the normal foreground color (no dimming) and use a
152
+ * thick 5px rule with the VS Code blockquote surface tint.
153
+ */
154
+ .md-theme-vscode-default .md-blockquote {
155
+ margin: 0 0 16px 0;
156
+ padding: 0 16px 0 12px;
157
+ /* The left padding the `>` gutter hangs in (matches padding-left). */
158
+ --md-blockquote-pad: 12px;
159
+ background-color: var(--vscode-textBlockQuote-background, transparent);
160
+ border-left: 5px solid var(--vscode-textBlockQuote-border, #d1d9e0);
161
+ border-radius: 2px;
162
+ }
163
+
164
+ .md-theme-vscode-default .md-list {
165
+ margin-top: 0;
166
+ margin-bottom: 16px;
167
+ padding-left: 2em;
168
+ /* The per-level indentation step the list gutter fills (matches padding-left). */
169
+ --md-list-indent-step: 2em;
170
+ }
171
+
172
+ /* Preview renders thematic breaks as a thin 1px rule rather than a thick bar. */
173
+ .md-theme-vscode-default .md-thematic-break {
174
+ height: 0;
175
+ padding: 0;
176
+ margin: 24px 0;
177
+ border: 0;
178
+ border-bottom: 1px solid var(--md-separator-color);
179
+ }
180
+
181
+ .md-theme-vscode-default a {
182
+ color: var(--vscode-textLink-foreground, #0969da);
183
+ text-decoration: none;
184
+ }
185
+
186
+ .md-theme-vscode-default a:hover {
187
+ text-decoration: underline;
188
+ }
189
+
190
+ .md-theme-vscode-default strong {
191
+ font-weight: 600;
192
+ }
193
+
194
+ /*
195
+ * Inline code. Preview keeps inline code at the body font size (1em) on a
196
+ * softened VS Code preformat surface, with only a small inset — no GitHub-style
197
+ * badge.
198
+ */
199
+ .md-theme-vscode-default :not(pre)>code {
200
+ font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
201
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
202
+ font-size: 1em;
203
+ line-height: 1.357em;
204
+ padding: 1px 3px;
205
+ margin: 0;
206
+ color: var(--vscode-textPreformat-foreground, inherit);
207
+ background-color: var(--md-inline-code-background);
208
+ border-radius: 4px;
209
+ white-space: break-spaces;
210
+ }
211
+
212
+ /* Fenced code block: framed by a 1px border, preview-style. */
213
+ .md-theme-vscode-default .md-code-block-container {
214
+ margin-top: 0;
215
+ margin-bottom: 16px;
216
+ }
217
+
218
+ .md-theme-vscode-default .md-code-block {
219
+ margin-top: 0;
220
+ margin-bottom: 16px;
221
+ padding: 6px 10px;
222
+ line-height: 1.357;
223
+ background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
224
+ border: 1px solid var(--vscode-widget-border, #d1d9e0);
225
+ border-radius: 3px;
226
+ }
227
+
228
+ .md-theme-vscode-default .md-code-block-container > .md-code-block {
229
+ margin: 0;
230
+ }
231
+
232
+ .md-theme-vscode-default .md-code-block code {
233
+ font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
234
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
235
+ padding: 0;
236
+ background-color: transparent;
237
+ border-radius: 0;
238
+ }
239
+
240
+ /*
241
+ * Syntax-highlight token colors. Driven by `--md-tok-*` custom properties so
242
+ * the explorer (or any embedder) can supply a palette matched to the active
243
+ * color theme. Fallbacks are the VS Code light theme palette.
244
+ */
245
+ .md-theme-vscode-default .md-code-block .tok-keyword {
246
+ color: var(--md-tok-keyword, #0000ff);
247
+ }
248
+
249
+ .md-theme-vscode-default .md-code-block .tok-string {
250
+ color: var(--md-tok-string, #a31515);
251
+ }
252
+
253
+ .md-theme-vscode-default .md-code-block .tok-comment {
254
+ color: var(--md-tok-comment, #008000);
255
+ }
256
+
257
+ .md-theme-vscode-default .md-code-block .tok-number {
258
+ color: var(--md-tok-number, #098658);
259
+ }
260
+
261
+ .md-theme-vscode-default .md-code-block .tok-regexp {
262
+ color: var(--md-tok-regexp, #811f3f);
263
+ }
264
+
265
+ .md-theme-vscode-default .md-code-block .tok-type {
266
+ color: var(--md-tok-type, #267f99);
267
+ }
268
+
269
+ .md-theme-vscode-default .md-code-block .tok-annotation {
270
+ color: var(--md-tok-annotation, #267f99);
271
+ }
272
+
273
+ .md-theme-vscode-default .md-code-block .tok-tag {
274
+ color: var(--md-tok-tag, #800000);
275
+ }
276
+
277
+ .md-theme-vscode-default .md-code-block .tok-attribute {
278
+ color: var(--md-tok-attribute, #e50000);
279
+ }
280
+
281
+ .md-theme-vscode-default .md-code-block .tok-delimiter {
282
+ color: var(--md-tok-delimiter, inherit);
283
+ }
284
+
285
+ /*
286
+ * Display math has no container styling (KaTeX renders it inline-centered).
287
+ * Keep only the block spacing; horizontal scroll comes from the base sheet.
288
+ */
289
+ .md-theme-vscode-default .md-math-block {
290
+ margin-top: 0;
291
+ margin-bottom: 16px;
292
+ }
293
+
294
+ /*
295
+ * KaTeX renders inline math at 1.21em with its own (larger) line-height, which
296
+ * would inflate the surrounding line box. Collapse it so the rendered math fits
297
+ * the text line and the paragraph height stays identical active vs inactive.
298
+ */
299
+ .md-theme-vscode-default .md-inline-math .katex {
300
+ line-height: 1;
301
+ }
302
+
303
+ .md-theme-vscode-default .md-table-wrapper {
304
+ /* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
305
+ with siblings as before; the inner table has no margin of its own. */
306
+ margin-top: 0;
307
+ margin-bottom: 16px;
308
+ }
309
+
310
+ .md-theme-vscode-default .md-table {
311
+ border-collapse: collapse;
312
+ width: auto;
313
+ }
314
+
315
+ .md-theme-vscode-default .md-table th,
316
+ .md-theme-vscode-default .md-table td {
317
+ padding: 5px 10px;
318
+ border: 1px solid var(--vscode-editorWidget-border, #d1d9e0);
319
+ text-align: left;
320
+ }
321
+
322
+ /*
323
+ * The editor renders every cell as <td> in a flat <table> of <tr> (no
324
+ * <thead>/<tbody>/<th>). Row order is: header, delimiter row, body rows.
325
+ */
326
+ .md-theme-vscode-default .md-table tr:first-child td {
327
+ font-weight: 600;
328
+ padding-top: 10px;
329
+ padding-bottom: 10px;
330
+ }
331
+
332
+ /* Active: reclaim the header's extra spacing to host the delimiter row. */
333
+ .md-theme-vscode-default .md-table.md-block-active tr:first-child td {
334
+ padding-top: 2px;
335
+ padding-bottom: 2px;
336
+ }
337
+
338
+ .md-theme-vscode-default .md-table tr:nth-child(even):not(.md-table-delimiter-row) {
339
+ background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
340
+ }
341
+
342
+ /*
343
+ * The delimiter row (`| --- | --- |`) is editor source shown only while
344
+ * editing; render it borderless with no vertical padding so it occupies just
345
+ * the compact space reclaimed from the header.
346
+ */
347
+ .md-theme-vscode-default .md-table-delimiter-row td {
348
+ border: 0;
349
+ padding: 0 10px;
350
+ background: transparent;
351
+ }
352
+
353
+ /*
354
+ * Active table: the source `|` pipes ARE the outline. Drop the HTML cell
355
+ * borders (kept as transparent so the 1px box geometry — and thus the table's
356
+ * height and first-text X — is unchanged) and clear the zebra fill so the
357
+ * table reads as plain source.
358
+ */
359
+ .md-theme-vscode-default .md-table.md-block-active td {
360
+ border-color: transparent;
361
+ }
362
+
363
+ .md-theme-vscode-default .md-table.md-block-active tr:nth-child(even):not(.md-table-delimiter-row) td {
364
+ background-color: transparent;
365
+ }
366
+
367
+ /*
368
+ * Shift each cell's leading pipe onto its left gridline (where the border was)
369
+ * and the last cell's closing pipe onto the right gridline. `position:
370
+ * relative` moves only the painted glyph by the cell's horizontal padding;
371
+ * siblings and the glue's reserved width are untouched, so active/inactive
372
+ * height and first-text X stay pixel-identical.
373
+ */
374
+ .md-theme-vscode-default .md-table.md-block-active td>.md-glue-tableCellGlue:first-child,
375
+ .md-theme-vscode-default .md-table.md-block-active .md-table-delimiter-row td>.md-marker-tableDelimiter {
376
+ position: relative;
377
+ left: -10px;
378
+ }
379
+
380
+ /*
381
+ * The last cell's closing `|` floats right after the (left-aligned) cell text.
382
+ * Pin it to the column's right gridline (the cell's border edge, 10px past the
383
+ * content box) so the right outline is a straight line. `top: auto` keeps the
384
+ * pipe on the content line (the shared editor.css rule takes it out of flow);
385
+ * the previous `top: 0` floated it to the cell's top edge, so on tall/wrapping
386
+ * rows it no longer lined up with the in-flow leading pipes.
387
+ */
388
+ .md-theme-vscode-default .md-table.md-block-active td:last-child {
389
+ position: relative;
390
+ }
391
+
392
+ .md-theme-vscode-default .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
393
+ position: absolute;
394
+ right: 0;
395
+ top: auto;
396
+ }
397
+
398
+ /*
399
+ * The delimiter row's last cell carries its closing `|` as a separate
400
+ * `tableDelimiterClose` marker; pin it to the same right gridline as the body
401
+ * rows' closing pipe so the last column's outline stays straight.
402
+ */
403
+ .md-theme-vscode-default .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
404
+ position: absolute;
405
+ right: 0;
406
+ top: auto;
407
+ }