@vscode/markdown-editor 0.0.2-7 → 0.0.2-70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/commands.d.ts +65 -0
- package/dist/commands.js +159 -0
- package/dist/commands.js.map +1 -0
- package/dist/config-BGeaJqWk.js +286 -0
- package/dist/config-BGeaJqWk.js.map +1 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +1490 -116
- package/dist/index.js +6170 -2006
- package/dist/index.js.map +1 -1
- package/dist/markdown-editor.css +1 -0
- package/dist/stringEdit-CVDbCUBY.js +215 -0
- package/dist/stringEdit-CVDbCUBY.js.map +1 -0
- package/dist/web-editors.d.ts +282 -0
- package/dist/web-editors.js +7240 -0
- package/dist/web-editors.js.map +1 -0
- package/package.json +60 -17
- package/src/contrib/comments/commentInput.css +150 -0
- package/src/contrib/comments/comments.css +129 -0
- package/src/contrib/commentsVscode/vscodeCommentWidgetV2.css +171 -0
- package/src/contrib/find/find.css +347 -0
- package/src/view/editor.css +555 -25
- package/src/view/themes/default.css +13 -4
- package/src/view/themes/github.css +16 -13
- package/src/view/themes/vscode-default.css +397 -0
- package/src/view/themes/vscode-github.css +393 -0
- package/dist/_observables/assert.d.ts +0 -2
- package/dist/_observables/deps.d.ts +0 -28
- package/dist/_observables/disposables.d.ts +0 -19
- package/dist/_observables/equals.d.ts +0 -32
- package/dist/_observables/index.d.ts +0 -2
- package/dist/_observables/observableInternal/base.d.ts +0 -172
- package/dist/_observables/observableInternal/changeTracker.d.ts +0 -44
- package/dist/_observables/observableInternal/commonFacade/cancellation.d.ts +0 -24
- package/dist/_observables/observableInternal/commonFacade/deps.d.ts +0 -24
- package/dist/_observables/observableInternal/debugLocation.d.ts +0 -21
- package/dist/_observables/observableInternal/debugName.d.ts +0 -33
- package/dist/_observables/observableInternal/experimental/deferUnobserve.d.ts +0 -16
- package/dist/_observables/observableInternal/experimental/reducer.d.ts +0 -37
- package/dist/_observables/observableInternal/experimental/utils.d.ts +0 -15
- package/dist/_observables/observableInternal/index.d.ts +0 -25
- package/dist/_observables/observableInternal/logging/consoleObservableLogger.d.ts +0 -40
- package/dist/_observables/observableInternal/logging/debugGetDependencyGraph.d.ts +0 -4
- package/dist/_observables/observableInternal/logging/debugger/debuggerRpc.d.ts +0 -4
- package/dist/_observables/observableInternal/logging/debugger/devToolsLogger.d.ts +0 -43
- package/dist/_observables/observableInternal/logging/debugger/rpc.d.ts +0 -41
- package/dist/_observables/observableInternal/logging/debugger/utils.d.ts +0 -13
- package/dist/_observables/observableInternal/logging/logging.d.ts +0 -30
- package/dist/_observables/observableInternal/map.d.ts +0 -18
- package/dist/_observables/observableInternal/observables/baseObservable.d.ts +0 -58
- package/dist/_observables/observableInternal/observables/constObservable.d.ts +0 -5
- package/dist/_observables/observableInternal/observables/derived.d.ts +0 -46
- package/dist/_observables/observableInternal/observables/derivedImpl.d.ts +0 -83
- package/dist/_observables/observableInternal/observables/lazyObservableValue.d.ts +0 -27
- package/dist/_observables/observableInternal/observables/observableFromEvent.d.ts +0 -37
- package/dist/_observables/observableInternal/observables/observableSignal.d.ts +0 -11
- package/dist/_observables/observableInternal/observables/observableSignalFromEvent.d.ts +0 -5
- package/dist/_observables/observableInternal/observables/observableValue.d.ts +0 -37
- package/dist/_observables/observableInternal/observables/observableValueOpts.d.ts +0 -8
- package/dist/_observables/observableInternal/reactions/autorun.d.ts +0 -56
- package/dist/_observables/observableInternal/reactions/autorunImpl.d.ts +0 -53
- package/dist/_observables/observableInternal/set.d.ts +0 -17
- package/dist/_observables/observableInternal/transaction.d.ts +0 -27
- package/dist/_observables/observableInternal/utils/promise.d.ts +0 -75
- package/dist/_observables/observableInternal/utils/runOnChange.d.ts +0 -7
- package/dist/_observables/observableInternal/utils/utils.d.ts +0 -43
- package/dist/_observables/observableInternal/utils/utilsCancellation.d.ts +0 -10
- package/dist/_observables/observableInternal/utils/valueWithChangeEvent.d.ts +0 -10
- package/dist/_observables/utils.d.ts +0 -15
- package/dist/observables.d.ts +0 -4
- package/dist/observables.js +0 -439
- package/dist/observables.js.map +0 -1
- package/dist/runOnChange-C00UIwqQ.js +0 -1538
- package/dist/runOnChange-C00UIwqQ.js.map +0 -1
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* VS Code markdown theme — GitHub layout variant (`md-theme-vscode-github`).
|
|
3
|
+
*
|
|
4
|
+
* One of two `--vscode-*`-variable-driven themes. This variant keeps the
|
|
5
|
+
* GitHub-style layout/typography (larger 16px base, 1.5 line-height, badge-
|
|
6
|
+
* style inline code, zebra tables); the sibling `vscode-default.css`
|
|
7
|
+
* (`md-theme-vscode-default`) mirrors VS Code's own markdown *preview*
|
|
8
|
+
* (`markdown-language-features/media/markdown.css`: 14px base, code blocks with
|
|
9
|
+
* a 1px border, 5px blockquote rule). Both consume the same `--vscode-*`
|
|
10
|
+
* variables and `--md-tok-*` token palette, so only layout/typography differs.
|
|
11
|
+
*
|
|
12
|
+
* A *variable-driven* theme: every color is expressed as `var(--vscode-*, …)`
|
|
13
|
+
* so the editor adopts whatever VS Code color theme is active (dark, light,
|
|
14
|
+
* high-contrast, or any custom theme) WITHOUT the editor knowing anything
|
|
15
|
+
* about VS Code. The editor only references variable NAMES — a documented
|
|
16
|
+
* contract — and bundles no VS Code CSS.
|
|
17
|
+
*
|
|
18
|
+
* Apply it via the editor `classNames` option:
|
|
19
|
+
*
|
|
20
|
+
* new EditorView(model, { classNames: ['md-theme-vscode-github'] });
|
|
21
|
+
*
|
|
22
|
+
* In a real webview VS Code injects the `--vscode-*` custom properties onto
|
|
23
|
+
* the document root and sets a body theme class, so this theme just works. In
|
|
24
|
+
* the Component Explorer the same variables are supplied by a snapshot
|
|
25
|
+
* stylesheet scoped under a `.vscode-theme.<id>` wrapper (see
|
|
26
|
+
* `fixture/vscodeThemes`). Either way the cascade reaches this theme's rules.
|
|
27
|
+
*
|
|
28
|
+
* Fallbacks: each `var()` carries a light-palette fallback so the theme stays
|
|
29
|
+
* legible even with no `--vscode-*` variables present at all.
|
|
30
|
+
*
|
|
31
|
+
* Layout/typography mirrors the GitHub theme (the basis of the production VS
|
|
32
|
+
* Code markdown editor); only the colors are swapped for variables. Every
|
|
33
|
+
* selector is scoped under the theme class, so importing this file never
|
|
34
|
+
* affects the global page or any editor that did not opt in.
|
|
35
|
+
*
|
|
36
|
+
* Syntax-token colors are exposed as `--md-tok-*` custom properties (with
|
|
37
|
+
* light-palette fallbacks). Real VS Code derives token colors from the live
|
|
38
|
+
* tokenizer's color map (baked in per token), NOT from `--vscode-*`; the
|
|
39
|
+
* Component Explorer supplies a matching `--md-tok-*` palette per color theme.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
.md-editor.md-theme-vscode-github {
|
|
43
|
+
font-family: var(--markdown-font-family, -apple-system, BlinkMacSystemFont,
|
|
44
|
+
'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif);
|
|
45
|
+
font-size: var(--markdown-font-size, 16px);
|
|
46
|
+
line-height: var(--markdown-line-height, 1.5);
|
|
47
|
+
color: var(--vscode-editor-foreground, #1f2328);
|
|
48
|
+
word-wrap: break-word;
|
|
49
|
+
/*
|
|
50
|
+
* Active-block highlight (defined theme-agnostically in editor.css) follows
|
|
51
|
+
* the VS Code surface color so it stays a subtle inset on both light and
|
|
52
|
+
* dark color themes instead of a fixed light-grey box.
|
|
53
|
+
*/
|
|
54
|
+
--md-block-active-background: var(--vscode-editorWidget-background, #f8f8f8);
|
|
55
|
+
/*
|
|
56
|
+
* Cursor color: editor.css paints `.md-cursor` with `--md-cursor-background`
|
|
57
|
+
* (theme-agnostic, black fallback); map it to the VS Code cursor color so it
|
|
58
|
+
* stays visible on dark color themes.
|
|
59
|
+
*/
|
|
60
|
+
--md-cursor-background: var(--vscode-editorCursor-foreground, #000);
|
|
61
|
+
--md-html-comment-foreground: var(--vscode-descriptionForeground, #59636e);
|
|
62
|
+
--md-html-comment-hover-foreground: var(--vscode-editor-foreground, #1f2328);
|
|
63
|
+
--md-html-comment-font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
|
|
64
|
+
'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
|
|
65
|
+
--md-readonly-background: var(--vscode-button-secondaryBackground,
|
|
66
|
+
var(--vscode-editorWidget-background, #f3f3f3));
|
|
67
|
+
--md-readonly-background-hover: var(--vscode-button-secondaryHoverBackground,
|
|
68
|
+
var(--vscode-button-secondaryBackground,
|
|
69
|
+
var(--vscode-editorWidget-background, #e9e9e9)));
|
|
70
|
+
--md-readonly-foreground: var(--vscode-button-secondaryForeground,
|
|
71
|
+
var(--vscode-editorWidget-foreground, #444));
|
|
72
|
+
--md-readonly-border: var(--vscode-button-secondaryBorder,
|
|
73
|
+
var(--vscode-button-border,
|
|
74
|
+
var(--vscode-contrastBorder, var(--vscode-editorWidget-border, #b8b8b8))));
|
|
75
|
+
--md-readonly-border-hover: var(--vscode-button-secondaryBorder,
|
|
76
|
+
var(--vscode-button-border,
|
|
77
|
+
var(--vscode-contrastBorder, var(--vscode-editorWidget-border, #8d8d8d))));
|
|
78
|
+
--md-readonly-accent: var(--vscode-button-background, rgb(45, 92, 180));
|
|
79
|
+
--md-readonly-accent-foreground: var(--vscode-button-foreground, #fff);
|
|
80
|
+
--md-inline-code-background: color-mix(in srgb,
|
|
81
|
+
var(--vscode-textPreformat-background, #818b981f) 60%, transparent);
|
|
82
|
+
--md-find-widget-background: var(--vscode-editorWidget-background, #f3f3f3);
|
|
83
|
+
--md-find-widget-foreground: var(--vscode-editorWidget-foreground, #222);
|
|
84
|
+
--md-find-widget-border: var(--vscode-editorWidget-border, #c8c8c8);
|
|
85
|
+
--md-find-widget-shadow: var(--vscode-widget-shadow, rgba(0, 0, 0, 0.2));
|
|
86
|
+
--md-find-input-background: var(--vscode-input-background, #fff);
|
|
87
|
+
--md-find-input-foreground: var(--vscode-input-foreground, #222);
|
|
88
|
+
--md-find-placeholder-foreground: var(--vscode-input-placeholderForeground, #767676);
|
|
89
|
+
--md-find-input-caret: var(--vscode-editorCursor-foreground, currentColor);
|
|
90
|
+
--md-find-input-border: var(--vscode-input-border, #cecece);
|
|
91
|
+
--md-find-count-foreground: var(--vscode-editorWidget-foreground, #222);
|
|
92
|
+
--md-find-focus-border: var(--vscode-focusBorder, #007fd4);
|
|
93
|
+
--md-find-button-hover-background: var(--vscode-inputOption-hoverBackground, rgba(128, 128, 128, 0.18));
|
|
94
|
+
--md-find-disabled-foreground: var(--vscode-disabledForeground, rgba(97, 97, 97, 0.5));
|
|
95
|
+
--md-find-editor-background: var(--vscode-editor-background, #ffffff);
|
|
96
|
+
--md-find-match-background: var(--vscode-editor-findMatchHighlightBackground, rgba(234, 92, 0, 0.33));
|
|
97
|
+
--md-find-current-background: var(--vscode-editor-findMatchBackground, #a8ac94);
|
|
98
|
+
--md-find-current-border: var(--vscode-editor-findMatchBorder,
|
|
99
|
+
color-mix(in srgb, var(--vscode-editorWidget-foreground, #616161) 55%,
|
|
100
|
+
var(--vscode-editor-findMatchBackground, #a8ac94)));
|
|
101
|
+
--md-find-option-background: var(--vscode-inputOption-activeBackground, #007acc);
|
|
102
|
+
--md-find-option-border: color-mix(in srgb,
|
|
103
|
+
var(--vscode-focusBorder, #007acc) 70%,
|
|
104
|
+
var(--vscode-inputOption-activeForeground, #000000));
|
|
105
|
+
--md-find-option-foreground: var(--vscode-inputOption-activeForeground, #fff);
|
|
106
|
+
--md-find-error-border: var(--vscode-inputValidation-errorBorder, #be1100);
|
|
107
|
+
--md-find-error-foreground: var(--vscode-errorForeground, #a1260d);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.vscode-high-contrast .md-editor.md-theme-vscode-github,
|
|
111
|
+
.vscode-high-contrast-light .md-editor.md-theme-vscode-github {
|
|
112
|
+
--md-inline-code-background: var(--vscode-textPreformat-background, #818b981f);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.md-theme-vscode-github .md-heading {
|
|
116
|
+
margin-top: 24px;
|
|
117
|
+
margin-bottom: 16px;
|
|
118
|
+
font-weight: 600;
|
|
119
|
+
line-height: 1.25;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.md-theme-vscode-github h1.md-heading {
|
|
123
|
+
font-size: 2em;
|
|
124
|
+
padding-bottom: 0.3em;
|
|
125
|
+
border-bottom: 1px solid var(--vscode-textSeparator-foreground, #d1d9e0b3);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.md-theme-vscode-github h2.md-heading {
|
|
129
|
+
font-size: 1.5em;
|
|
130
|
+
padding-bottom: 0.3em;
|
|
131
|
+
border-bottom: 1px solid var(--vscode-textSeparator-foreground, #d1d9e0b3);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.md-theme-vscode-github h3.md-heading {
|
|
135
|
+
font-size: 1.25em;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.md-theme-vscode-github h4.md-heading {
|
|
139
|
+
font-size: 1em;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.md-theme-vscode-github h5.md-heading {
|
|
143
|
+
font-size: 0.875em;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.md-theme-vscode-github h6.md-heading {
|
|
147
|
+
font-size: 0.85em;
|
|
148
|
+
color: var(--vscode-descriptionForeground, #59636e);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.md-theme-vscode-github .md-paragraph {
|
|
152
|
+
margin-top: 0;
|
|
153
|
+
margin-bottom: 16px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.md-theme-vscode-github .md-blockquote {
|
|
157
|
+
margin: 0 0 16px 0;
|
|
158
|
+
padding: 0 1em;
|
|
159
|
+
/* Matches padding-left; `em` is safe because shared marker geometry inherits font size. */
|
|
160
|
+
--md-blockquote-pad: 1em;
|
|
161
|
+
color: var(--vscode-descriptionForeground, #59636e);
|
|
162
|
+
border-left: 0.25em solid var(--vscode-textBlockQuote-border, #d1d9e0);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.md-theme-vscode-github .md-list {
|
|
166
|
+
margin-top: 0;
|
|
167
|
+
margin-bottom: 16px;
|
|
168
|
+
padding-left: 2em;
|
|
169
|
+
/* The per-level indentation step the list gutter fills (matches padding-left). */
|
|
170
|
+
--md-list-indent-step: 2em;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.md-theme-vscode-github .md-thematic-break {
|
|
174
|
+
height: 0.25em;
|
|
175
|
+
padding: 0;
|
|
176
|
+
margin: 24px 0;
|
|
177
|
+
background-color: var(--vscode-textSeparator-foreground, #d1d9e0);
|
|
178
|
+
border: 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.md-theme-vscode-github a {
|
|
182
|
+
color: var(--vscode-textLink-foreground, #0969da);
|
|
183
|
+
text-decoration: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.md-theme-vscode-github a:hover {
|
|
187
|
+
text-decoration: underline;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.md-theme-vscode-github strong {
|
|
191
|
+
font-weight: 600;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Inline code. */
|
|
195
|
+
.md-theme-vscode-github :not(pre)>code {
|
|
196
|
+
font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
|
|
197
|
+
'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
|
|
198
|
+
font-size: 85%;
|
|
199
|
+
padding: 0.2em 0.4em;
|
|
200
|
+
margin: 0;
|
|
201
|
+
color: var(--vscode-textPreformat-foreground, inherit);
|
|
202
|
+
background-color: var(--md-inline-code-background);
|
|
203
|
+
border-radius: 6px;
|
|
204
|
+
white-space: break-spaces;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Fenced code block. */
|
|
208
|
+
.md-theme-vscode-github .md-code-block {
|
|
209
|
+
margin-top: 0;
|
|
210
|
+
margin-bottom: 16px;
|
|
211
|
+
padding: 6px 10px;
|
|
212
|
+
font-size: 85%;
|
|
213
|
+
line-height: 1.45;
|
|
214
|
+
background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
|
|
215
|
+
border-radius: 6px;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.md-theme-vscode-github .md-code-block code {
|
|
219
|
+
font-family: var(--vscode-editor-font-family, ui-monospace, SFMono-Regular,
|
|
220
|
+
'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace);
|
|
221
|
+
padding: 0;
|
|
222
|
+
background-color: transparent;
|
|
223
|
+
border-radius: 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/*
|
|
227
|
+
* Syntax-highlight token colors. Driven by `--md-tok-*` custom properties so
|
|
228
|
+
* the explorer (or any embedder) can supply a palette matched to the active
|
|
229
|
+
* color theme. Fallbacks are the VS Code light theme palette.
|
|
230
|
+
*/
|
|
231
|
+
.md-theme-vscode-github .md-code-block .tok-keyword {
|
|
232
|
+
color: var(--md-tok-keyword, #0000ff);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.md-theme-vscode-github .md-code-block .tok-string {
|
|
236
|
+
color: var(--md-tok-string, #a31515);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.md-theme-vscode-github .md-code-block .tok-comment {
|
|
240
|
+
color: var(--md-tok-comment, #008000);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.md-theme-vscode-github .md-code-block .tok-number {
|
|
244
|
+
color: var(--md-tok-number, #098658);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.md-theme-vscode-github .md-code-block .tok-regexp {
|
|
248
|
+
color: var(--md-tok-regexp, #811f3f);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.md-theme-vscode-github .md-code-block .tok-type {
|
|
252
|
+
color: var(--md-tok-type, #267f99);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.md-theme-vscode-github .md-code-block .tok-annotation {
|
|
256
|
+
color: var(--md-tok-annotation, #267f99);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.md-theme-vscode-github .md-code-block .tok-tag {
|
|
260
|
+
color: var(--md-tok-tag, #800000);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.md-theme-vscode-github .md-code-block .tok-attribute {
|
|
264
|
+
color: var(--md-tok-attribute, #e50000);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.md-theme-vscode-github .md-code-block .tok-delimiter {
|
|
268
|
+
color: var(--md-tok-delimiter, inherit);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/*
|
|
272
|
+
* Display math has no container styling (KaTeX renders it inline-centered).
|
|
273
|
+
* Keep only the block spacing; horizontal scroll comes from the base sheet.
|
|
274
|
+
*/
|
|
275
|
+
.md-theme-vscode-github .md-math-block {
|
|
276
|
+
margin-top: 0;
|
|
277
|
+
margin-bottom: 16px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/*
|
|
281
|
+
* KaTeX renders inline math at 1.21em with its own (larger) line-height, which
|
|
282
|
+
* would inflate the surrounding line box. Collapse it so the rendered math fits
|
|
283
|
+
* the text line and the paragraph height stays identical active vs inactive.
|
|
284
|
+
*/
|
|
285
|
+
.md-theme-vscode-github .md-inline-math .katex {
|
|
286
|
+
line-height: 1;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.md-theme-vscode-github .md-table-wrapper {
|
|
290
|
+
/* Block spacing lives on the wrapper (the scroll/BFC box) so it collapses
|
|
291
|
+
with siblings as before; the inner table has no margin of its own. */
|
|
292
|
+
margin-top: 0;
|
|
293
|
+
margin-bottom: 16px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.md-theme-vscode-github .md-table {
|
|
297
|
+
border-collapse: collapse;
|
|
298
|
+
width: auto;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.md-theme-vscode-github .md-table th,
|
|
302
|
+
.md-theme-vscode-github .md-table td {
|
|
303
|
+
padding: 6px 13px;
|
|
304
|
+
border: 1px solid var(--vscode-editorWidget-border, #d1d9e0);
|
|
305
|
+
text-align: left;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
* The editor renders every cell as <td> in a flat <table> of <tr> (no
|
|
310
|
+
* <thead>/<tbody>/<th>). Row order is: header, delimiter row, body rows.
|
|
311
|
+
*/
|
|
312
|
+
.md-theme-vscode-github .md-table tr:first-child td {
|
|
313
|
+
font-weight: 600;
|
|
314
|
+
padding-top: 11px;
|
|
315
|
+
padding-bottom: 11px;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* Active: reclaim the header's extra spacing to host the delimiter row. */
|
|
319
|
+
.md-theme-vscode-github .md-table.md-block-active tr:first-child td {
|
|
320
|
+
padding-top: 3px;
|
|
321
|
+
padding-bottom: 3px;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.md-theme-vscode-github .md-table tr:nth-child(even):not(.md-table-delimiter-row) {
|
|
325
|
+
background-color: var(--vscode-textCodeBlock-background, #f6f8fa);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/*
|
|
329
|
+
* The delimiter row (`| --- | --- |`) is editor source shown only while
|
|
330
|
+
* editing; render it borderless with no vertical padding so it occupies just
|
|
331
|
+
* the compact 10px reclaimed from the header.
|
|
332
|
+
*/
|
|
333
|
+
.md-theme-vscode-github .md-table-delimiter-row td {
|
|
334
|
+
border: 0;
|
|
335
|
+
padding: 0 13px;
|
|
336
|
+
background: transparent;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/*
|
|
340
|
+
* Active table: the source `|` pipes ARE the outline. Drop the HTML cell
|
|
341
|
+
* borders (kept as transparent so the 1px box geometry — and thus the table's
|
|
342
|
+
* height and first-text X — is unchanged) and clear the zebra fill so the
|
|
343
|
+
* table reads as plain source.
|
|
344
|
+
*/
|
|
345
|
+
.md-theme-vscode-github .md-table.md-block-active td {
|
|
346
|
+
border-color: transparent;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.md-theme-vscode-github .md-table.md-block-active tr:nth-child(even):not(.md-table-delimiter-row) td {
|
|
350
|
+
background-color: transparent;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/*
|
|
354
|
+
* Shift each cell's leading pipe onto its left gridline (where the border was)
|
|
355
|
+
* and the last cell's closing pipe onto the right gridline. `position:
|
|
356
|
+
* relative` moves only the painted glyph by the cell's horizontal padding;
|
|
357
|
+
* siblings and the glue's reserved width are untouched, so active/inactive
|
|
358
|
+
* height and first-text X stay pixel-identical.
|
|
359
|
+
*/
|
|
360
|
+
.md-theme-vscode-github .md-table.md-block-active td>.md-glue-tableCellGlue:first-child,
|
|
361
|
+
.md-theme-vscode-github .md-table.md-block-active .md-table-delimiter-row td>.md-marker-tableDelimiter {
|
|
362
|
+
position: relative;
|
|
363
|
+
left: -13px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/*
|
|
367
|
+
* The last cell's closing `|` floats right after the (left-aligned) cell text.
|
|
368
|
+
* Pin it to the column's right gridline (the cell's border edge, 13px past the
|
|
369
|
+
* content box) so the right outline is a straight line. `top: auto` keeps the
|
|
370
|
+
* pipe on the content line (the shared editor.css rule takes it out of flow);
|
|
371
|
+
* the previous `top: 0` floated it to the cell's top edge, so on tall/wrapping
|
|
372
|
+
* rows it no longer lined up with the in-flow leading pipes.
|
|
373
|
+
*/
|
|
374
|
+
.md-theme-vscode-github .md-table.md-block-active td:last-child {
|
|
375
|
+
position: relative;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.md-theme-vscode-github .md-table.md-block-active td:last-child>.md-glue-tableCellGlue:last-child {
|
|
379
|
+
position: absolute;
|
|
380
|
+
right: 0;
|
|
381
|
+
top: auto;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/*
|
|
385
|
+
* The delimiter row's last cell carries its closing `|` as a separate
|
|
386
|
+
* `tableDelimiterClose` marker; pin it to the same right gridline as the body
|
|
387
|
+
* rows' closing pipe so the last column's outline stays straight.
|
|
388
|
+
*/
|
|
389
|
+
.md-theme-vscode-github .md-table.md-block-active .md-table-delimiter-row td:last-child>.md-marker-tableDelimiterClose {
|
|
390
|
+
position: absolute;
|
|
391
|
+
right: 0;
|
|
392
|
+
top: auto;
|
|
393
|
+
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IDisposable, DisposableStore } from './disposables';
|
|
2
|
-
export { IDisposable, DisposableStore };
|
|
3
|
-
export declare function toDisposable(fn: () => void): IDisposable;
|
|
4
|
-
export declare function markAsDisposed(_disposable: IDisposable): void;
|
|
5
|
-
export declare function trackDisposable(_disposable: IDisposable): void;
|
|
6
|
-
export declare function assertFn(_fn: () => {}): void;
|
|
7
|
-
export declare class CancellationError extends Error {
|
|
8
|
-
constructor();
|
|
9
|
-
}
|
|
10
|
-
export interface CancellationToken {
|
|
11
|
-
/**
|
|
12
|
-
* A flag signalling is cancellation has been requested.
|
|
13
|
-
*/
|
|
14
|
-
readonly isCancellationRequested: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* An event which fires when cancellation is requested. This event
|
|
17
|
-
* only ever fires `once` as cancellation can only happen once. Listeners
|
|
18
|
-
* that are registered after cancellation will be called (next event loop run),
|
|
19
|
-
* but also only once.
|
|
20
|
-
*
|
|
21
|
-
* @event
|
|
22
|
-
*/
|
|
23
|
-
readonly onCancellationRequested: (listener: (e: any) => any, thisArgs?: any, disposables?: IDisposable[]) => IDisposable;
|
|
24
|
-
}
|
|
25
|
-
export declare function onBugIndicatingError(_error?: any): void;
|
|
26
|
-
export declare class BugIndicatingError extends Error {
|
|
27
|
-
constructor(message?: string);
|
|
28
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface IDisposable {
|
|
2
|
-
dispose(): void;
|
|
3
|
-
}
|
|
4
|
-
export declare class DisposableStore implements IDisposable {
|
|
5
|
-
private disposables;
|
|
6
|
-
private _isDisposed;
|
|
7
|
-
get isDisposed(): boolean;
|
|
8
|
-
dispose(): void;
|
|
9
|
-
add<T extends IDisposable | undefined>(disposable: T): T;
|
|
10
|
-
remove<T extends IDisposable | undefined>(disposable: T): T;
|
|
11
|
-
clear(): void;
|
|
12
|
-
leakItems(): void;
|
|
13
|
-
}
|
|
14
|
-
export declare abstract class Disposable implements IDisposable {
|
|
15
|
-
protected readonly _store: DisposableStore;
|
|
16
|
-
dispose(): void;
|
|
17
|
-
protected _register<T extends IDisposable>(t: T): T;
|
|
18
|
-
protected _registerOrDispose<T extends IDisposable | undefined>(t: T): T;
|
|
19
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export type EqualityComparer<T> = (a: T, b: T) => boolean;
|
|
2
|
-
/**
|
|
3
|
-
* Compares two items for equality using strict equality.
|
|
4
|
-
*/
|
|
5
|
-
export declare const strictEquals: EqualityComparer<any>;
|
|
6
|
-
/**
|
|
7
|
-
* Two items are considered equal, if their stringified representations are equal.
|
|
8
|
-
*/
|
|
9
|
-
export declare function jsonStringifyEquals<T>(): EqualityComparer<T>;
|
|
10
|
-
/**
|
|
11
|
-
* Uses `item.equals(other)` to determine equality.
|
|
12
|
-
*/
|
|
13
|
-
export declare function itemEquals<T extends {
|
|
14
|
-
equals(other: T): boolean;
|
|
15
|
-
}>(): EqualityComparer<T>;
|
|
16
|
-
/**
|
|
17
|
-
* Checks if two items are both null or undefined, or are equal according to the provided equality comparer.
|
|
18
|
-
*/
|
|
19
|
-
export declare function equalsIfDefined<T>(v1: T | undefined | null, v2: T | undefined | null, equals: EqualityComparer<T>): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Returns an equality comparer that checks if two items are both null or undefined, or are equal according to the provided equality comparer.
|
|
22
|
-
*/
|
|
23
|
-
export declare function equalsIfDefined<T>(equals: EqualityComparer<T>): EqualityComparer<T | undefined | null>;
|
|
24
|
-
/**
|
|
25
|
-
* Drills into arrays (items ordered) and objects (keys unordered) and uses strict equality on everything else.
|
|
26
|
-
*/
|
|
27
|
-
export declare function structuralEquals<T>(a: T, b: T): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* `getStructuralKey(a) === getStructuralKey(b) <=> structuralEquals(a, b)`
|
|
30
|
-
* (assuming that a and b are not cyclic structures and nothing extends globalThis Array).
|
|
31
|
-
*/
|
|
32
|
-
export declare function getStructuralKey(t: unknown): string;
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { DisposableStore } from './commonFacade/deps';
|
|
2
|
-
/**
|
|
3
|
-
* Represents an observable value.
|
|
4
|
-
*
|
|
5
|
-
* @template T The type of the values the observable can hold.
|
|
6
|
-
*/
|
|
7
|
-
export interface IObservable<T> extends IObservableWithChange<T, unknown> {
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Represents an observable value.
|
|
11
|
-
*
|
|
12
|
-
* @template T The type of the values the observable can hold.
|
|
13
|
-
* @template TChange The type used to describe value changes
|
|
14
|
-
* (usually `void` and only used in advanced scenarios).
|
|
15
|
-
* While observers can miss temporary values of an observable,
|
|
16
|
-
* they will receive all change values (as long as they are subscribed)!
|
|
17
|
-
*/
|
|
18
|
-
export interface IObservableWithChange<T, TChange = unknown> {
|
|
19
|
-
/**
|
|
20
|
-
* Returns the current value.
|
|
21
|
-
*
|
|
22
|
-
* Calls {@link IObserver.handleChange} if the observable notices that the value changed.
|
|
23
|
-
* Must not be called from {@link IObserver.handleChange}!
|
|
24
|
-
*/
|
|
25
|
-
get(): T;
|
|
26
|
-
/**
|
|
27
|
-
* Forces the observable to check for changes and report them.
|
|
28
|
-
*
|
|
29
|
-
* Has the same effect as calling {@link IObservable.get}, but does not force the observable
|
|
30
|
-
* to actually construct the value, e.g. if change deltas are used.
|
|
31
|
-
* Calls {@link IObserver.handleChange} if the observable notices that the value changed.
|
|
32
|
-
* Must not be called from {@link IObserver.handleChange}!
|
|
33
|
-
*/
|
|
34
|
-
reportChanges(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Adds the observer to the set of subscribed observers.
|
|
37
|
-
* This method is idempotent.
|
|
38
|
-
*/
|
|
39
|
-
addObserver(observer: IObserver): void;
|
|
40
|
-
/**
|
|
41
|
-
* Removes the observer from the set of subscribed observers.
|
|
42
|
-
* This method is idempotent.
|
|
43
|
-
*/
|
|
44
|
-
removeObserver(observer: IObserver): void;
|
|
45
|
-
/**
|
|
46
|
-
* Reads the current value and subscribes the reader to this observable.
|
|
47
|
-
*
|
|
48
|
-
* Calls {@link IReader.readObservable} if a reader is given, otherwise {@link IObservable.get}
|
|
49
|
-
* (see {@link ConvenientObservable.read} for the implementation).
|
|
50
|
-
*/
|
|
51
|
-
read(reader: IReader | undefined): T;
|
|
52
|
-
/**
|
|
53
|
-
* Makes sure this value is computed eagerly.
|
|
54
|
-
*/
|
|
55
|
-
recomputeInitiallyAndOnChange(store: DisposableStore, handleValue?: (value: T) => void): IObservable<T>;
|
|
56
|
-
/**
|
|
57
|
-
* Makes sure this value is cached.
|
|
58
|
-
*/
|
|
59
|
-
keepObserved(store: DisposableStore): IObservable<T>;
|
|
60
|
-
/**
|
|
61
|
-
* Creates a derived observable that depends on this observable.
|
|
62
|
-
* Use the reader to read other observables
|
|
63
|
-
* (see {@link ConvenientObservable.map} for the implementation).
|
|
64
|
-
*/
|
|
65
|
-
map<TNew>(fn: (value: T, reader: IReader) => TNew): IObservable<TNew>;
|
|
66
|
-
map<TNew>(owner: object, fn: (value: T, reader: IReader) => TNew): IObservable<TNew>;
|
|
67
|
-
flatten<TNew>(this: IObservable<IObservable<TNew>>): IObservable<TNew>;
|
|
68
|
-
/**
|
|
69
|
-
* ONLY FOR DEBUGGING!
|
|
70
|
-
* Logs computations of this derived.
|
|
71
|
-
*/
|
|
72
|
-
log(): IObservableWithChange<T, TChange>;
|
|
73
|
-
/**
|
|
74
|
-
* A human-readable name for debugging purposes.
|
|
75
|
-
*/
|
|
76
|
-
readonly debugName: string;
|
|
77
|
-
/**
|
|
78
|
-
* ONLY FOR DEBUGGING!
|
|
79
|
-
*/
|
|
80
|
-
debugGetDependencyGraph(): string;
|
|
81
|
-
/**
|
|
82
|
-
* This property captures the type of the change object. Do not use it at runtime!
|
|
83
|
-
*/
|
|
84
|
-
readonly TChange: TChange;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Represents an observer that can be subscribed to an observable.
|
|
88
|
-
*
|
|
89
|
-
* If an observer is subscribed to an observable and that observable didn't signal
|
|
90
|
-
* a change through one of the observer methods, the observer can assume that the
|
|
91
|
-
* observable didn't change.
|
|
92
|
-
* If an observable reported a possible change, {@link IObservable.reportChanges} forces
|
|
93
|
-
* the observable to report an actual change if there was one.
|
|
94
|
-
*/
|
|
95
|
-
export interface IObserver {
|
|
96
|
-
/**
|
|
97
|
-
* Signals that the given observable might have changed and a transaction potentially modifying that observable started.
|
|
98
|
-
* Before the given observable can call this method again, is must call {@link IObserver.endUpdate}.
|
|
99
|
-
*
|
|
100
|
-
* Implementations must not get/read the value of other observables, as they might not have received this event yet!
|
|
101
|
-
* The method {@link IObservable.reportChanges} can be used to force the observable to report the changes.
|
|
102
|
-
*/
|
|
103
|
-
beginUpdate<T>(observable: IObservable<T>): void;
|
|
104
|
-
/**
|
|
105
|
-
* Signals that the transaction that potentially modified the given observable ended.
|
|
106
|
-
* This is a good place to react to (potential) changes.
|
|
107
|
-
*/
|
|
108
|
-
endUpdate<T>(observable: IObservable<T>): void;
|
|
109
|
-
/**
|
|
110
|
-
* Signals that the given observable might have changed.
|
|
111
|
-
* The method {@link IObservable.reportChanges} can be used to force the observable to report the changes.
|
|
112
|
-
*
|
|
113
|
-
* Implementations must not get/read the value of other observables, as they might not have received this event yet!
|
|
114
|
-
* The change should be processed lazily or in {@link IObserver.endUpdate}.
|
|
115
|
-
*/
|
|
116
|
-
handlePossibleChange<T>(observable: IObservable<T>): void;
|
|
117
|
-
/**
|
|
118
|
-
* Signals that the given {@link observable} changed.
|
|
119
|
-
*
|
|
120
|
-
* Implementations must not get/read the value of other observables, as they might not have received this event yet!
|
|
121
|
-
* The change should be processed lazily or in {@link IObserver.endUpdate}.
|
|
122
|
-
*
|
|
123
|
-
* @param change Indicates how or why the value changed.
|
|
124
|
-
*/
|
|
125
|
-
handleChange<T, TChange>(observable: IObservableWithChange<T, TChange>, change: TChange): void;
|
|
126
|
-
}
|
|
127
|
-
export interface IReader {
|
|
128
|
-
/**
|
|
129
|
-
* Reads the value of an observable and subscribes to it.
|
|
130
|
-
*/
|
|
131
|
-
readObservable<T>(observable: IObservableWithChange<T, any>): T;
|
|
132
|
-
}
|
|
133
|
-
export interface ISettable<T, TChange = void> {
|
|
134
|
-
/**
|
|
135
|
-
* Sets the value of the observable.
|
|
136
|
-
* Use a transaction to batch multiple changes (with a transaction, observers only react at the end of the transaction).
|
|
137
|
-
*
|
|
138
|
-
* @param transaction When given, value changes are handled on demand or when the transaction ends.
|
|
139
|
-
* @param change Describes how or why the value changed.
|
|
140
|
-
*/
|
|
141
|
-
set(value: T, transaction: ITransaction | undefined, change: TChange): void;
|
|
142
|
-
}
|
|
143
|
-
export interface ITransaction {
|
|
144
|
-
/**
|
|
145
|
-
* Calls {@link Observer.beginUpdate} immediately
|
|
146
|
-
* and {@link Observer.endUpdate} when the transaction ends.
|
|
147
|
-
*/
|
|
148
|
-
updateObserver(observer: IObserver, observable: IObservableWithChange<any, any>): void;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* This function is used to indicate that the caller recovered from an error that indicates a bug.
|
|
152
|
-
*/
|
|
153
|
-
export declare function handleBugIndicatingErrorRecovery(message: string): void;
|
|
154
|
-
/**
|
|
155
|
-
* A settable observable.
|
|
156
|
-
*/
|
|
157
|
-
export interface ISettableObservable<T, TChange = void> extends IObservableWithChange<T, TChange>, ISettable<T, TChange> {
|
|
158
|
-
}
|
|
159
|
-
export interface IReaderWithStore extends IReader {
|
|
160
|
-
/**
|
|
161
|
-
* Items in this store get disposed just before the observable recomputes/reruns or when it becomes unobserved.
|
|
162
|
-
*/
|
|
163
|
-
get store(): DisposableStore;
|
|
164
|
-
/**
|
|
165
|
-
* Items in this store get disposed just after the observable recomputes/reruns or when it becomes unobserved.
|
|
166
|
-
* This is important if the current run needs the undisposed result from the last run.
|
|
167
|
-
*
|
|
168
|
-
* Warning: Items in this store might still get disposed before dependents (that read the now disposed value in the past) are recomputed with the new (undisposed) value!
|
|
169
|
-
* A clean solution for this is ref counting.
|
|
170
|
-
*/
|
|
171
|
-
get delayedStore(): DisposableStore;
|
|
172
|
-
}
|