@jsenv/terminal-recorder 1.5.21 → 1.5.23

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.
@@ -984,13 +984,17 @@ window.__supervisor__ = (() => {
984
984
  const { trace = {} } = cause;
985
985
  const preferCause =
986
986
  cause.code === "MODULE_NOT_FOUND" ||
987
- cause.code === "PROTOCOL_NOT_SUPPORTED";
987
+ cause.code === "PROTOCOL_NOT_SUPPORTED" ||
988
+ cause.code === "PARSE_ERROR";
988
989
  const dataToRender = preferCause ? cause : exception;
989
990
  root.querySelector(".text").innerHTML = stringifyStack({
990
991
  codeFrame: trace.codeFrame
991
992
  ? generateClickableText(trace.codeFrame)
992
993
  : "",
993
- name: dataToRender.name,
994
+ name:
995
+ cause.parseErrorSourceType === "css"
996
+ ? "CSSSyntaxError"
997
+ : dataToRender.name,
994
998
  message: preferCause
995
999
  ? generateClickableText(cause.reason)
996
1000
  : dataToRender.message
@@ -1158,81 +1162,85 @@ window.__supervisor__ = (() => {
1158
1162
  customElements.define(JSENV_ERROR_OVERLAY_TAGNAME, JsenvErrorOverlay);
1159
1163
  }
1160
1164
 
1161
- const overlayCSS = `
1162
- :host {
1163
- position: fixed;
1164
- z-index: 99999;
1165
- top: 0;
1166
- left: 0;
1167
- width: 100%;
1168
- height: 100%;
1169
- overflow-y: scroll;
1170
- margin: 0;
1171
- background: rgba(0, 0, 0, 0.66);
1172
- }
1173
-
1174
- .backdrop {
1175
- position: absolute;
1176
- left: 0;
1177
- right: 0;
1178
- top: 0;
1179
- bottom: 0;
1180
- }
1181
-
1182
- .overlay {
1183
- position: relative;
1184
- background: rgba(0, 0, 0, 0.95);
1185
- width: 800px;
1186
- margin: 30px auto;
1187
- padding: 25px 40px;
1188
- padding-top: 0;
1189
- overflow: hidden; /* for h1 margins */
1190
- border-radius: 4px 8px;
1191
- box-shadow: 0 20px 40px rgb(0 0 0 / 30%), 0 15px 12px rgb(0 0 0 / 20%);
1192
- box-sizing: border-box;
1193
- font-family: monospace;
1194
- direction: ltr;
1195
- }
1196
-
1197
- h1 {
1198
- color: red;
1199
- text-align: center;
1200
- }
1201
-
1202
- pre {
1203
- overflow: auto;
1204
- max-width: 100%;
1205
- /* padding is nice + prevents scrollbar from hiding the text behind it */
1206
- /* does not work nicely on firefox though https://bugzilla.mozilla.org/show_bug.cgi?id=748518 */
1207
- padding: 20px;
1208
- }
1209
-
1210
- .tip {
1211
- border-top: 1px solid #999;
1212
- padding-top: 12px;
1213
- }
1214
-
1215
- [data-theme="dark"] {
1216
- color: #999;
1217
- }
1218
- [data-theme="dark"] pre {
1219
- background: #111;
1220
- border: 1px solid #333;
1221
- color: #eee;
1222
- }
1223
-
1224
- [data-theme="light"] {
1225
- color: #EEEEEE;
1226
- }
1227
- [data-theme="light"] pre {
1228
- background: #1E1E1E;
1229
- border: 1px solid white;
1230
- color: #EEEEEE;
1231
- }
1232
-
1233
- pre a {
1234
- color: inherit;
1235
- }`;
1165
+ const overlayCSS = /* css */ `
1166
+ :host {
1167
+ position: fixed;
1168
+ z-index: 99999;
1169
+ top: 0;
1170
+ left: 0;
1171
+ width: 100%;
1172
+ height: 100%;
1173
+ /* overflow-y: scroll; */
1174
+ margin: 0;
1175
+ background: rgba(0, 0, 0, 0.66);
1176
+ }
1177
+
1178
+ .backdrop {
1179
+ position: absolute;
1180
+ left: 0;
1181
+ right: 0;
1182
+ top: 0;
1183
+ bottom: 0;
1184
+ }
1185
+
1186
+ .overlay {
1187
+ position: relative;
1188
+ background: rgba(0, 0, 0, 0.95);
1189
+ width: 800px;
1190
+ max-width: 100vw;
1191
+ margin: 30px auto;
1192
+ padding: 25px 40px;
1193
+ padding-top: 0;
1194
+ overflow: hidden; /* for h1 margins */
1195
+ border-radius: 4px 8px;
1196
+ box-shadow:
1197
+ 0 20px 40px rgb(0 0 0 / 30%),
1198
+ 0 15px 12px rgb(0 0 0 / 20%);
1199
+ box-sizing: border-box;
1200
+ font-family: monospace;
1201
+ direction: ltr;
1202
+ }
1203
+
1204
+ h1 {
1205
+ color: red;
1206
+ text-align: center;
1207
+ }
1208
+
1209
+ pre {
1210
+ overflow: auto;
1211
+ max-width: 100%;
1212
+ /* padding is nice + prevents scrollbar from hiding the text behind it */
1213
+ /* does not work nicely on firefox though https://bugzilla.mozilla.org/show_bug.cgi?id=748518 */
1214
+ padding: 20px;
1215
+ }
1216
+
1217
+ .tip {
1218
+ border-top: 1px solid #999;
1219
+ padding-top: 12px;
1220
+ }
1221
+
1222
+ [data-theme="dark"] {
1223
+ color: #999;
1224
+ }
1225
+ [data-theme="dark"] pre {
1226
+ background: #111;
1227
+ border: 1px solid #333;
1228
+ color: #eee;
1229
+ }
1230
+
1231
+ [data-theme="light"] {
1232
+ color: #eeeeee;
1233
+ }
1234
+ [data-theme="light"] pre {
1235
+ background: #1e1e1e;
1236
+ border: 1px solid white;
1237
+ color: #eeeeee;
1238
+ }
1239
+
1240
+ pre a {
1241
+ color: inherit;
1242
+ }
1243
+ `;
1236
1244
  }
1237
1245
 
1238
1246
  supervisor.createException = createException;