@vscode/markdown-editor 0.0.2-1 → 0.0.2-100

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 +67 -0
  3. package/dist/commands.js +183 -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 +1901 -112
  11. package/dist/index.js +7073 -1969
  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 +60 -15
  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 +1316 -44
  24. package/src/view/themes/default.css +13 -4
  25. package/src/view/themes/github.css +16 -18
  26. package/src/view/themes/vscode-default.css +397 -0
  27. package/src/view/themes/vscode-github.css +393 -0
  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 -463
  73. package/dist/observables.js.map +0 -1
  74. package/dist/runOnChange-owE1SMC0.js +0 -1514
  75. package/dist/runOnChange-owE1SMC0.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;
@@ -29,7 +30,7 @@
29
30
  .md-theme-default .md-code-block {
30
31
  background: #f4f4f4;
31
32
  border-radius: 4px;
32
- padding: 12px 16px;
33
+ padding: 8px 12px;
33
34
  margin: 0.5em 0;
34
35
  }
35
36
 
@@ -121,9 +122,14 @@
121
122
  --md-list-indent-step: 24px;
122
123
  }
123
124
 
125
+ .md-theme-default .md-table-wrapper {
126
+ /* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
127
+ with siblings as before; the inner table has no margin of its own. */
128
+ margin: 0.5em 0;
129
+ }
130
+
124
131
  .md-theme-default .md-table {
125
132
  border-collapse: collapse;
126
- margin: 0.5em 0;
127
133
  width: auto;
128
134
  }
129
135
 
@@ -201,6 +207,9 @@
201
207
  * box) so the right outline is a straight line. Absolute removes it from flow,
202
208
  * but it is the trailing node so no text shifts; the leading pipe still fixes
203
209
  * first-text X and the row stays one line tall, keeping the compare invariants.
210
+ * `top: auto` keeps the pipe on the content line (the shared editor.css rule
211
+ * also takes trailing glue out of flow); the previous `top: 0` floated it to
212
+ * the cell's top edge, misaligning it with the leading pipes on wrapping rows.
204
213
  */
205
214
  .md-theme-default .md-table.md-block-active td:last-child {
206
215
  position: relative;
@@ -209,7 +218,7 @@
209
218
  .md-theme-default .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
210
219
  position: absolute;
211
220
  right: 0;
212
- top: 0;
221
+ top: auto;
213
222
  }
214
223
 
215
224
  /*
@@ -220,7 +229,7 @@
220
229
  .md-theme-default .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
221
230
  position: absolute;
222
231
  right: 0;
223
- top: 0;
232
+ top: auto;
224
233
  }
225
234
 
226
235
  .md-theme-default code {
@@ -14,12 +14,12 @@
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;
20
21
  line-height: 1.5;
21
22
  color: #1f2328;
22
- max-width: 800px;
23
23
  word-wrap: break-word;
24
24
  }
25
25
 
@@ -67,14 +67,8 @@
67
67
  .github-markdown-theme .md-blockquote {
68
68
  margin: 0 0 16px 0;
69
69
  padding: 0 1em;
70
- /*
71
- * The left padding the `>` gutter hangs in (matches padding-left: 1em at
72
- * the 16px blockquote font). Must be an absolute length, not `1em`: the
73
- * marker positions itself with this var inside its own (smaller, 0.85em)
74
- * font context, so an `em` value would resolve against the marker's
75
- * font-size and pull the `>` ~2px out of alignment with the text.
76
- */
77
- --md-blockquote-pad: 16px;
70
+ /* Matches padding-left; `em` is safe because shared marker geometry inherits font size. */
71
+ --md-blockquote-pad: 1em;
78
72
  color: #59636e;
79
73
  border-left: 0.25em solid #d1d9e0;
80
74
  }
@@ -100,10 +94,6 @@
100
94
  text-decoration: none;
101
95
  }
102
96
 
103
- .github-markdown-theme a:hover {
104
- text-decoration: underline;
105
- }
106
-
107
97
  /* GitHub uses a 600 weight for bold, not the browser default 700. */
108
98
  .github-markdown-theme strong {
109
99
  font-weight: 600;
@@ -125,7 +115,7 @@
125
115
  .github-markdown-theme .md-code-block {
126
116
  margin-top: 0;
127
117
  margin-bottom: 16px;
128
- padding: 10px 16px;
118
+ padding: 8px 12px;
129
119
  font-size: 85%;
130
120
  line-height: 1.45;
131
121
  background-color: #f6f8fa;
@@ -202,10 +192,15 @@
202
192
  line-height: 1;
203
193
  }
204
194
 
205
- .github-markdown-theme .md-table {
206
- border-collapse: collapse;
195
+ .github-markdown-theme .md-table-wrapper {
196
+ /* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
197
+ with siblings as before; the inner table has no margin of its own. */
207
198
  margin-top: 0;
208
199
  margin-bottom: 16px;
200
+ }
201
+
202
+ .github-markdown-theme .md-table {
203
+ border-collapse: collapse;
209
204
  width: auto;
210
205
  }
211
206
 
@@ -285,6 +280,9 @@
285
280
  * box) so the right outline is a straight line. Absolute removes it from flow,
286
281
  * but it is the trailing node so no text shifts; the leading pipe still fixes
287
282
  * first-text X and the row stays one line tall, keeping the compare invariants.
283
+ * `top: auto` keeps the pipe on the content line (the shared editor.css rule
284
+ * also takes trailing glue out of flow); the previous `top: 0` floated it to
285
+ * the cell's top edge, misaligning it with the leading pipes on wrapping rows.
288
286
  */
289
287
  .github-markdown-theme .md-table.md-block-active td:last-child {
290
288
  position: relative;
@@ -293,7 +291,7 @@
293
291
  .github-markdown-theme .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
294
292
  position: absolute;
295
293
  right: 0;
296
- top: 0;
294
+ top: auto;
297
295
  }
298
296
 
299
297
  /*
@@ -304,5 +302,5 @@
304
302
  .github-markdown-theme .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
305
303
  position: absolute;
306
304
  right: 0;
307
- top: 0;
305
+ top: auto;
308
306
  }
@@ -0,0 +1,397 @@
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-html-comment-foreground: var(--vscode-descriptionForeground, #616161);
53
+ --md-html-comment-hover-foreground: var(--vscode-editor-foreground, #1f2328);
54
+ --md-html-comment-font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
55
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
56
+ --md-readonly-background: var(--vscode-button-secondaryBackground,
57
+ var(--vscode-editorWidget-background, #f3f3f3));
58
+ --md-readonly-background-hover: var(--vscode-button-secondaryHoverBackground,
59
+ var(--vscode-button-secondaryBackground,
60
+ var(--vscode-editorWidget-background, #e9e9e9)));
61
+ --md-readonly-foreground: var(--vscode-button-secondaryForeground,
62
+ var(--vscode-editorWidget-foreground, #444));
63
+ --md-readonly-border: var(--vscode-button-secondaryBorder,
64
+ var(--vscode-button-border,
65
+ var(--vscode-contrastBorder, var(--vscode-editorWidget-border, #b8b8b8))));
66
+ --md-readonly-border-hover: var(--vscode-button-secondaryBorder,
67
+ var(--vscode-button-border,
68
+ var(--vscode-contrastBorder, var(--vscode-editorWidget-border, #8d8d8d))));
69
+ --md-readonly-accent: var(--vscode-button-background, rgb(45, 92, 180));
70
+ --md-readonly-accent-foreground: var(--vscode-button-foreground, #fff);
71
+ --md-find-widget-background: var(--vscode-editorWidget-background, #f3f3f3);
72
+ --md-find-widget-foreground: var(--vscode-editorWidget-foreground, #222);
73
+ --md-find-widget-border: var(--vscode-editorWidget-border, #c8c8c8);
74
+ --md-find-widget-shadow: var(--vscode-widget-shadow, rgba(0, 0, 0, 0.2));
75
+ --md-find-input-background: var(--vscode-input-background, #fff);
76
+ --md-find-input-foreground: var(--vscode-input-foreground, #222);
77
+ --md-find-placeholder-foreground: var(--vscode-input-placeholderForeground, #767676);
78
+ --md-find-input-caret: var(--vscode-editorCursor-foreground, currentColor);
79
+ --md-find-input-border: var(--vscode-input-border, #cecece);
80
+ --md-find-count-foreground: var(--vscode-editorWidget-foreground, #222);
81
+ --md-find-focus-border: var(--vscode-focusBorder, #007fd4);
82
+ --md-find-button-hover-background: var(--vscode-inputOption-hoverBackground, rgba(128, 128, 128, 0.18));
83
+ --md-find-disabled-foreground: var(--vscode-disabledForeground, rgba(97, 97, 97, 0.5));
84
+ --md-find-editor-background: var(--vscode-editor-background, #ffffff);
85
+ --md-find-match-background: var(--vscode-editor-findMatchHighlightBackground, rgba(234, 92, 0, 0.33));
86
+ --md-find-current-background: var(--vscode-editor-findMatchBackground, #a8ac94);
87
+ --md-find-current-border: var(--vscode-editor-findMatchBorder,
88
+ color-mix(in srgb, var(--vscode-editorWidget-foreground, #616161) 55%,
89
+ var(--vscode-editor-findMatchBackground, #a8ac94)));
90
+ --md-find-option-background: var(--vscode-inputOption-activeBackground, #007acc);
91
+ --md-find-option-border: color-mix(in srgb,
92
+ var(--vscode-focusBorder, #007acc) 70%,
93
+ var(--vscode-inputOption-activeForeground, #000000));
94
+ --md-find-option-foreground: var(--vscode-inputOption-activeForeground, #fff);
95
+ --md-find-error-border: var(--vscode-inputValidation-errorBorder, #be1100);
96
+ --md-find-error-foreground: var(--vscode-errorForeground, #a1260d);
97
+ --md-separator-color: color-mix(in srgb,
98
+ var(--vscode-textSeparator-foreground, #d1d9e0) 60%, transparent);
99
+ --md-inline-code-background: color-mix(in srgb,
100
+ var(--vscode-textPreformat-background, #818b981f) 60%, transparent);
101
+ }
102
+
103
+ .vscode-high-contrast .md-editor.md-theme-vscode-default,
104
+ .vscode-high-contrast-light .md-editor.md-theme-vscode-default {
105
+ --md-separator-color: var(--vscode-textSeparator-foreground, currentColor);
106
+ --md-inline-code-background: var(--vscode-textPreformat-background, #818b981f);
107
+ }
108
+
109
+ .md-theme-vscode-default .md-heading {
110
+ margin-top: 24px;
111
+ margin-bottom: 16px;
112
+ font-weight: 600;
113
+ line-height: 1.25;
114
+ }
115
+
116
+ .md-theme-vscode-default h1.md-heading {
117
+ font-size: 1.75em;
118
+ padding-bottom: 0.3em;
119
+ border-bottom: 1px solid var(--md-separator-color);
120
+ }
121
+
122
+ .md-theme-vscode-default h2.md-heading {
123
+ font-size: 1.4em;
124
+ padding-bottom: 0.3em;
125
+ border-bottom: 1px solid var(--md-separator-color);
126
+ }
127
+
128
+ .md-theme-vscode-default h3.md-heading {
129
+ font-size: 1.2em;
130
+ }
131
+
132
+ .md-theme-vscode-default h4.md-heading {
133
+ font-size: 1em;
134
+ }
135
+
136
+ .md-theme-vscode-default h5.md-heading {
137
+ font-size: 0.875em;
138
+ }
139
+
140
+ .md-theme-vscode-default h6.md-heading {
141
+ font-size: 0.85em;
142
+ }
143
+
144
+ .md-theme-vscode-default .md-paragraph {
145
+ margin-top: 0;
146
+ margin-bottom: 16px;
147
+ }
148
+
149
+ /*
150
+ * Preview blockquotes keep the normal foreground color (no dimming) and use a
151
+ * thick 5px rule with the VS Code blockquote surface tint.
152
+ */
153
+ .md-theme-vscode-default .md-blockquote {
154
+ margin: 0 0 16px 0;
155
+ padding: 0 16px 0 12px;
156
+ /* The left padding the `>` gutter hangs in (matches padding-left). */
157
+ --md-blockquote-pad: 12px;
158
+ background-color: var(--vscode-textBlockQuote-background, transparent);
159
+ border-left: 5px solid var(--vscode-textBlockQuote-border, #d1d9e0);
160
+ border-radius: 2px;
161
+ }
162
+
163
+ .md-theme-vscode-default .md-list {
164
+ margin-top: 0;
165
+ margin-bottom: 16px;
166
+ padding-left: 2em;
167
+ /* The per-level indentation step the list gutter fills (matches padding-left). */
168
+ --md-list-indent-step: 2em;
169
+ }
170
+
171
+ /* Preview renders thematic breaks as a thin 1px rule rather than a thick bar. */
172
+ .md-theme-vscode-default .md-thematic-break {
173
+ height: 0;
174
+ padding: 0;
175
+ margin: 24px 0;
176
+ border: 0;
177
+ border-bottom: 1px solid var(--md-separator-color);
178
+ }
179
+
180
+ .md-theme-vscode-default a {
181
+ color: var(--vscode-textLink-foreground, #0969da);
182
+ text-decoration: none;
183
+ }
184
+
185
+ .md-theme-vscode-default a:hover {
186
+ text-decoration: underline;
187
+ }
188
+
189
+ .md-theme-vscode-default strong {
190
+ font-weight: 600;
191
+ }
192
+
193
+ /*
194
+ * Inline code. Preview keeps inline code at the body font size (1em) on a
195
+ * softened VS Code preformat surface, with only a small inset — no GitHub-style
196
+ * badge.
197
+ */
198
+ .md-theme-vscode-default :not(pre)>code {
199
+ font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
200
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
201
+ font-size: 1em;
202
+ line-height: 1.357em;
203
+ padding: 1px 3px;
204
+ margin: 0;
205
+ color: var(--vscode-textPreformat-foreground, inherit);
206
+ background-color: var(--md-inline-code-background);
207
+ border-radius: 4px;
208
+ white-space: break-spaces;
209
+ }
210
+
211
+ /* Fenced code block: framed by a 1px border, preview-style. */
212
+ .md-theme-vscode-default .md-code-block {
213
+ margin-top: 0;
214
+ margin-bottom: 16px;
215
+ padding: 6px 10px;
216
+ line-height: 1.357;
217
+ background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
218
+ border: 1px solid var(--vscode-widget-border, #d1d9e0);
219
+ border-radius: 3px;
220
+ }
221
+
222
+ .md-theme-vscode-default .md-code-block code {
223
+ font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
224
+ 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
225
+ padding: 0;
226
+ background-color: transparent;
227
+ border-radius: 0;
228
+ }
229
+
230
+ /*
231
+ * Syntax-highlight token colors. Driven by `--md-tok-*` custom properties so
232
+ * the explorer (or any embedder) can supply a palette matched to the active
233
+ * color theme. Fallbacks are the VS Code light theme palette.
234
+ */
235
+ .md-theme-vscode-default .md-code-block .tok-keyword {
236
+ color: var(--md-tok-keyword, #0000ff);
237
+ }
238
+
239
+ .md-theme-vscode-default .md-code-block .tok-string {
240
+ color: var(--md-tok-string, #a31515);
241
+ }
242
+
243
+ .md-theme-vscode-default .md-code-block .tok-comment {
244
+ color: var(--md-tok-comment, #008000);
245
+ }
246
+
247
+ .md-theme-vscode-default .md-code-block .tok-number {
248
+ color: var(--md-tok-number, #098658);
249
+ }
250
+
251
+ .md-theme-vscode-default .md-code-block .tok-regexp {
252
+ color: var(--md-tok-regexp, #811f3f);
253
+ }
254
+
255
+ .md-theme-vscode-default .md-code-block .tok-type {
256
+ color: var(--md-tok-type, #267f99);
257
+ }
258
+
259
+ .md-theme-vscode-default .md-code-block .tok-annotation {
260
+ color: var(--md-tok-annotation, #267f99);
261
+ }
262
+
263
+ .md-theme-vscode-default .md-code-block .tok-tag {
264
+ color: var(--md-tok-tag, #800000);
265
+ }
266
+
267
+ .md-theme-vscode-default .md-code-block .tok-attribute {
268
+ color: var(--md-tok-attribute, #e50000);
269
+ }
270
+
271
+ .md-theme-vscode-default .md-code-block .tok-delimiter {
272
+ color: var(--md-tok-delimiter, inherit);
273
+ }
274
+
275
+ /*
276
+ * Display math has no container styling (KaTeX renders it inline-centered).
277
+ * Keep only the block spacing; horizontal scroll comes from the base sheet.
278
+ */
279
+ .md-theme-vscode-default .md-math-block {
280
+ margin-top: 0;
281
+ margin-bottom: 16px;
282
+ }
283
+
284
+ /*
285
+ * KaTeX renders inline math at 1.21em with its own (larger) line-height, which
286
+ * would inflate the surrounding line box. Collapse it so the rendered math fits
287
+ * the text line and the paragraph height stays identical active vs inactive.
288
+ */
289
+ .md-theme-vscode-default .md-inline-math .katex {
290
+ line-height: 1;
291
+ }
292
+
293
+ .md-theme-vscode-default .md-table-wrapper {
294
+ /* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
295
+ with siblings as before; the inner table has no margin of its own. */
296
+ margin-top: 0;
297
+ margin-bottom: 16px;
298
+ }
299
+
300
+ .md-theme-vscode-default .md-table {
301
+ border-collapse: collapse;
302
+ width: auto;
303
+ }
304
+
305
+ .md-theme-vscode-default .md-table th,
306
+ .md-theme-vscode-default .md-table td {
307
+ padding: 5px 10px;
308
+ border: 1px solid var(--vscode-editorWidget-border, #d1d9e0);
309
+ text-align: left;
310
+ }
311
+
312
+ /*
313
+ * The editor renders every cell as <td> in a flat <table> of <tr> (no
314
+ * <thead>/<tbody>/<th>). Row order is: header, delimiter row, body rows.
315
+ */
316
+ .md-theme-vscode-default .md-table tr:first-child td {
317
+ font-weight: 600;
318
+ padding-top: 10px;
319
+ padding-bottom: 10px;
320
+ }
321
+
322
+ /* Active: reclaim the header's extra spacing to host the delimiter row. */
323
+ .md-theme-vscode-default .md-table.md-block-active tr:first-child td {
324
+ padding-top: 2px;
325
+ padding-bottom: 2px;
326
+ }
327
+
328
+ .md-theme-vscode-default .md-table tr:nth-child(even):not(.md-table-delimiter-row) {
329
+ background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
330
+ }
331
+
332
+ /*
333
+ * The delimiter row (`| --- | --- |`) is editor source shown only while
334
+ * editing; render it borderless with no vertical padding so it occupies just
335
+ * the compact space reclaimed from the header.
336
+ */
337
+ .md-theme-vscode-default .md-table-delimiter-row td {
338
+ border: 0;
339
+ padding: 0 10px;
340
+ background: transparent;
341
+ }
342
+
343
+ /*
344
+ * Active table: the source `|` pipes ARE the outline. Drop the HTML cell
345
+ * borders (kept as transparent so the 1px box geometry — and thus the table's
346
+ * height and first-text X — is unchanged) and clear the zebra fill so the
347
+ * table reads as plain source.
348
+ */
349
+ .md-theme-vscode-default .md-table.md-block-active td {
350
+ border-color: transparent;
351
+ }
352
+
353
+ .md-theme-vscode-default .md-table.md-block-active tr:nth-child(even):not(.md-table-delimiter-row) td {
354
+ background-color: transparent;
355
+ }
356
+
357
+ /*
358
+ * Shift each cell's leading pipe onto its left gridline (where the border was)
359
+ * and the last cell's closing pipe onto the right gridline. `position:
360
+ * relative` moves only the painted glyph by the cell's horizontal padding;
361
+ * siblings and the glue's reserved width are untouched, so active/inactive
362
+ * height and first-text X stay pixel-identical.
363
+ */
364
+ .md-theme-vscode-default .md-table.md-block-active td>.md-glue-tableCellGlue:first-child,
365
+ .md-theme-vscode-default .md-table.md-block-active .md-table-delimiter-row td>.md-marker-tableDelimiter {
366
+ position: relative;
367
+ left: -10px;
368
+ }
369
+
370
+ /*
371
+ * The last cell's closing `|` floats right after the (left-aligned) cell text.
372
+ * Pin it to the column's right gridline (the cell's border edge, 10px past the
373
+ * content box) so the right outline is a straight line. `top: auto` keeps the
374
+ * pipe on the content line (the shared editor.css rule takes it out of flow);
375
+ * the previous `top: 0` floated it to the cell's top edge, so on tall/wrapping
376
+ * rows it no longer lined up with the in-flow leading pipes.
377
+ */
378
+ .md-theme-vscode-default .md-table.md-block-active td:last-child {
379
+ position: relative;
380
+ }
381
+
382
+ .md-theme-vscode-default .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
383
+ position: absolute;
384
+ right: 0;
385
+ top: auto;
386
+ }
387
+
388
+ /*
389
+ * The delimiter row's last cell carries its closing `|` as a separate
390
+ * `tableDelimiterClose` marker; pin it to the same right gridline as the body
391
+ * rows' closing pipe so the last column's outline stays straight.
392
+ */
393
+ .md-theme-vscode-default .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
394
+ position: absolute;
395
+ right: 0;
396
+ top: auto;
397
+ }