@vscode/markdown-editor 0.0.2-21 → 0.0.2-22
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/dist/index.d.ts +63 -30
- package/dist/index.js +1420 -1373
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/view/editor.css +11 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/markdown-editor",
|
|
3
|
-
"version": "0.0.2-
|
|
3
|
+
"version": "0.0.2-22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "pnpm run build:dependencies && vite build",
|
|
55
55
|
"build:dependencies": "pnpm --filter @vscode/hubrpc build",
|
|
56
|
-
"build:explorer": "pnpm run build:dependencies && pnpm --filter @vscode/sample-web-editor build && vite build --config vite.fixture.config.ts --outDir dist-explorer --emptyOutDir",
|
|
56
|
+
"build:explorer": "pnpm run build:dependencies && pnpm --filter @vscode/component-explorer-vite-plugin... build && pnpm --filter @vscode/sample-web-editor build && vite build --config vite.fixture.config.ts --outDir dist-explorer --emptyOutDir",
|
|
57
57
|
"dev": "vite build --watch",
|
|
58
58
|
"pack": "pnpm run build && pnpm pack",
|
|
59
59
|
"test": "vitest --run",
|
package/src/view/editor.css
CHANGED
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
.md-editor {
|
|
27
27
|
display: flow-root;
|
|
28
28
|
outline: none;
|
|
29
|
-
container: md-editor / inline-size;
|
|
30
29
|
/* The editor paints its own cursor (`.md-cursor`); hide the native caret. */
|
|
31
30
|
caret-color: transparent;
|
|
32
31
|
}
|
|
@@ -63,9 +62,7 @@
|
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
.md-editor-content-with-readonly-toggle {
|
|
66
|
-
--md-editor-content-inline-end-padding: calc(
|
|
67
|
-
var(--md-readonly-toggle-width) + var(--md-readonly-toggle-gap) + var(--md-readonly-toggle-inset)
|
|
68
|
-
);
|
|
65
|
+
--md-editor-content-inline-end-padding: calc(var(--md-readonly-toggle-width) + var(--md-readonly-toggle-gap) + var(--md-readonly-toggle-inset));
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
.md-editor-content-with-readonly-toggle>.md-document :is(.md-heading, .md-paragraph) {
|
|
@@ -147,18 +144,14 @@
|
|
|
147
144
|
/*
|
|
148
145
|
* An unhandled block: a construct the parser does not model (setext heading,
|
|
149
146
|
* frontmatter fence, an extension token). Its raw source is shown verbatim,
|
|
150
|
-
* styled like a code block but visibly flagged as "not understood"
|
|
151
|
-
* warning border
|
|
152
|
-
*
|
|
153
|
-
* rather than silently dropped.
|
|
147
|
+
* styled like a code block but visibly flagged as "not understood" by a dashed
|
|
148
|
+
* warning border, so the content is preserved and editable rather than silently
|
|
149
|
+
* dropped.
|
|
154
150
|
*
|
|
155
|
-
* The wrapper is the non-scrolling box (border + block spacing
|
|
156
|
-
*
|
|
157
|
-
* badge on the wrapper (not the scroller) pins it to the visible top-right
|
|
158
|
-
* corner instead of letting it drift with the scrolled content.
|
|
151
|
+
* The wrapper is the non-scrolling box (border + block spacing); the inner
|
|
152
|
+
* `.md-unhandled-scroll` <pre> is the horizontal scroller.
|
|
159
153
|
*/
|
|
160
154
|
.md-unhandled-block {
|
|
161
|
-
position: relative;
|
|
162
155
|
margin: 0.5em 0;
|
|
163
156
|
border: 1px dashed #d0a000;
|
|
164
157
|
border-radius: 4px;
|
|
@@ -167,30 +160,12 @@
|
|
|
167
160
|
/*
|
|
168
161
|
* Inner scroller. Beats the per-theme `.md-theme-* .md-code-block` box rules
|
|
169
162
|
* (same class count) via the extra `pre` type selector: no margin/border of its
|
|
170
|
-
* own (those live on the wrapper)
|
|
171
|
-
* pinned badge so it never overlaps the first source line.
|
|
163
|
+
* own (those live on the wrapper).
|
|
172
164
|
*/
|
|
173
165
|
pre.md-unhandled-scroll.md-code-block {
|
|
174
166
|
margin: 0;
|
|
175
167
|
border: 0;
|
|
176
168
|
border-radius: 4px;
|
|
177
|
-
padding-top: 1.7em;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.md-unhandled-block::after {
|
|
181
|
-
content: 'unhandled: ' attr(data-unhandled-token);
|
|
182
|
-
position: absolute;
|
|
183
|
-
top: 0;
|
|
184
|
-
right: 0;
|
|
185
|
-
padding: 1px 6px;
|
|
186
|
-
font-family: system-ui, sans-serif;
|
|
187
|
-
font-size: 10px;
|
|
188
|
-
line-height: 1.4;
|
|
189
|
-
color: #6b5200;
|
|
190
|
-
background: #f5e5a8;
|
|
191
|
-
border-bottom-left-radius: 4px;
|
|
192
|
-
pointer-events: none;
|
|
193
|
-
user-select: none;
|
|
194
169
|
}
|
|
195
170
|
|
|
196
171
|
/*
|
|
@@ -864,13 +839,9 @@ pre.md-unhandled-scroll.md-code-block {
|
|
|
864
839
|
* unbreakable content nor later content scrolled through the viewport can ever
|
|
865
840
|
* pass underneath the button.
|
|
866
841
|
*/
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
height: calc(
|
|
871
|
-
var(--md-readonly-toggle-height) + var(--md-readonly-toggle-inset) + var(--md-readonly-toggle-inset)
|
|
872
|
-
);
|
|
873
|
-
}
|
|
842
|
+
.md-editor-narrow .md-readonly-toggle-host {
|
|
843
|
+
position: relative;
|
|
844
|
+
height: calc(var(--md-readonly-toggle-height) + var(--md-readonly-toggle-inset) + var(--md-readonly-toggle-inset));
|
|
874
845
|
}
|
|
875
846
|
|
|
876
847
|
.md-readonly-toggle::after {
|
|
@@ -962,6 +933,7 @@ pre.md-unhandled-scroll.md-code-block {
|
|
|
962
933
|
}
|
|
963
934
|
|
|
964
935
|
@media (prefers-reduced-motion: reduce) {
|
|
936
|
+
|
|
965
937
|
.md-readonly-toggle,
|
|
966
938
|
.md-readonly-toggle .md-readonly-toggle-indicator,
|
|
967
939
|
.md-readonly-toggle .md-readonly-toggle-icon,
|