@oml/markdown 0.15.0 → 0.16.1

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.
@@ -43,10 +43,80 @@ pre > code.language-diagram,
43
43
  pre > code.language-list,
44
44
  pre > code.language-text,
45
45
  pre > code.language-matrix,
46
- pre > code.language-table-editor {
46
+ pre > code.language-table-editor,
47
+ pre > code.language-js,
48
+ pre > code.language-javascript,
49
+ pre > code.language-python,
50
+ pre > code.language-r {
47
51
  display: none;
48
52
  }
49
53
 
54
+ .oml-md-js-result {
55
+ margin: 1rem 0;
56
+ }
57
+
58
+ .oml-md-js-result:empty {
59
+ display: none;
60
+ }
61
+
62
+ pre.oml-md-js-text-output {
63
+ font-family: var(--vscode-editor-font-family, monospace);
64
+ font-size: 0.9em;
65
+ background: var(--vscode-textBlockQuote-background, var(--oml-static-background, #f6f8fa));
66
+ border: 1px solid var(--vscode-editorWidget-border, var(--oml-static-border, #d0d7de));
67
+ border-radius: 6px !important;
68
+ padding: 0.5rem 0.75rem !important;
69
+ margin: 0.25rem 0;
70
+ white-space: pre-wrap;
71
+ overflow: visible !important;
72
+ color: var(--vscode-editor-foreground, var(--oml-static-foreground, #24292f));
73
+ }
74
+
75
+ .oml-md-js-html-output {
76
+ margin: 0.25rem 0;
77
+ color: var(--vscode-editor-foreground, var(--oml-static-foreground, #24292f));
78
+ }
79
+
80
+ .oml-md-js-html-output ul,
81
+ .oml-md-js-html-output ol {
82
+ padding-left: 2em;
83
+ }
84
+
85
+ .oml-md-js-html-output li {
86
+ color: var(--vscode-editor-foreground, var(--oml-static-foreground, #24292f));
87
+ }
88
+
89
+ .oml-md-js-error {
90
+ border: 1px solid var(--vscode-inputValidation-errorBorder, #f14c4c);
91
+ background: var(--vscode-inputValidation-errorBackground, rgba(241, 76, 76, 0.1));
92
+ color: var(--vscode-errorForeground, #f14c4c);
93
+ border-radius: 6px;
94
+ padding: 0.5rem 0.75rem;
95
+ margin: 0.25rem 0;
96
+ font-family: var(--vscode-editor-font-family, monospace);
97
+ font-size: 0.9em;
98
+ white-space: pre-wrap;
99
+ }
100
+
101
+ .oml-md-js-empty {
102
+ color: var(--vscode-descriptionForeground, #666);
103
+ font-style: italic;
104
+ margin: 0.25rem 0;
105
+ }
106
+
107
+ pre.oml-md-js-stderr {
108
+ font-family: var(--vscode-editor-font-family, monospace);
109
+ font-size: 0.85em;
110
+ color: var(--vscode-descriptionForeground, #888);
111
+ background: transparent;
112
+ border: none;
113
+ border-radius: 0 !important;
114
+ padding: 0 !important;
115
+ margin: 0;
116
+ white-space: pre-wrap;
117
+ overflow: visible !important;
118
+ }
119
+
50
120
  h1,
51
121
  h2,
52
122
  h3,
@@ -349,6 +419,7 @@ pre {
349
419
  text-align: left;
350
420
  font-weight: 600;
351
421
  border-bottom: 1px solid var(--vscode-editorWidget-border);
422
+ border-right: 1px solid var(--vscode-editorWidget-border);
352
423
  padding: 8px 10px;
353
424
  background: var(--vscode-editor-background);
354
425
  cursor: pointer;
@@ -358,12 +429,21 @@ pre {
358
429
  user-select: none;
359
430
  }
360
431
 
432
+ .oml-md-table thead th:last-child {
433
+ border-right: none;
434
+ }
435
+
361
436
  .oml-md-table tbody td {
362
437
  border-bottom: 1px solid var(--vscode-editorWidget-border);
438
+ border-right: 1px solid var(--vscode-editorWidget-border);
363
439
  padding: 6px 10px;
364
440
  vertical-align: top;
365
441
  }
366
442
 
443
+ .oml-md-table tbody td:last-child {
444
+ border-right: none;
445
+ }
446
+
367
447
  .vscode-dark th {
368
448
  border-color: rgb(255 255 255 / 69%);
369
449
  }
@@ -3,6 +3,9 @@
3
3
  export const STATIC_MARKDOWN_RUNTIME_BUNDLE_FILE = 'browser-runtime.bundle.js';
4
4
 
5
5
  export const STATIC_MARKDOWN_RUNTIME_CSS = `
6
+ /* Prevent first-paint flicker before static runtime hydration restores content. */
7
+ body { visibility: hidden; }
8
+
6
9
  .oml-md-result { margin: 1rem 0; }
7
10
  .oml-md-result-message {
8
11
  border: 1px solid #e5b567;
@@ -28,7 +28,7 @@ export function interpolateTemplateBody(
28
28
  ): string {
29
29
  return source.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match: string, key: string): string => {
30
30
  if (!(key in values)) {
31
- return '';
31
+ return _match;
32
32
  }
33
33
  const value = values[key];
34
34
  if (Array.isArray(value)) {