@t0.labs/daxta 1.1.0 → 1.1.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.
- package/assets/example.html +24 -25
- package/assets/viewer.html +24 -25
- package/package.json +1 -1
package/assets/example.html
CHANGED
|
@@ -563,9 +563,12 @@
|
|
|
563
563
|
grid-column: 3;
|
|
564
564
|
grid-row: 1;
|
|
565
565
|
min-height: 0;
|
|
566
|
-
|
|
566
|
+
height: 100%;
|
|
567
|
+
overflow: hidden;
|
|
567
568
|
padding: 14px 18px 16px;
|
|
568
569
|
background: var(--paper);
|
|
570
|
+
display: flex;
|
|
571
|
+
flex-direction: column;
|
|
569
572
|
}
|
|
570
573
|
.sidebar {
|
|
571
574
|
position: relative;
|
|
@@ -1123,6 +1126,7 @@
|
|
|
1123
1126
|
gap: 8px;
|
|
1124
1127
|
align-items: stretch;
|
|
1125
1128
|
margin-bottom: 12px;
|
|
1129
|
+
flex: none;
|
|
1126
1130
|
}
|
|
1127
1131
|
.url {
|
|
1128
1132
|
flex: 1;
|
|
@@ -1199,8 +1203,11 @@
|
|
|
1199
1203
|
display: grid;
|
|
1200
1204
|
grid-template-columns: 1fr 1fr;
|
|
1201
1205
|
gap: 12px;
|
|
1202
|
-
margin-bottom:
|
|
1203
|
-
align-items:
|
|
1206
|
+
margin-bottom: 0;
|
|
1207
|
+
align-items: stretch;
|
|
1208
|
+
flex: 1;
|
|
1209
|
+
min-height: 0;
|
|
1210
|
+
overflow: hidden;
|
|
1204
1211
|
}
|
|
1205
1212
|
.card {
|
|
1206
1213
|
background: var(--white);
|
|
@@ -1208,9 +1215,12 @@
|
|
|
1208
1215
|
border: 1px solid var(--hairline);
|
|
1209
1216
|
box-shadow: none;
|
|
1210
1217
|
min-width: 0;
|
|
1218
|
+
min-height: 0;
|
|
1219
|
+
height: 100%;
|
|
1211
1220
|
display: flex;
|
|
1212
1221
|
flex-direction: column;
|
|
1213
1222
|
max-width: 100%;
|
|
1223
|
+
overflow: hidden;
|
|
1214
1224
|
}
|
|
1215
1225
|
.card.response-card {
|
|
1216
1226
|
overflow: hidden;
|
|
@@ -1252,12 +1262,15 @@
|
|
|
1252
1262
|
padding: 0;
|
|
1253
1263
|
display: flex;
|
|
1254
1264
|
flex-direction: column;
|
|
1265
|
+
flex: 1;
|
|
1255
1266
|
min-height: 0;
|
|
1267
|
+
overflow-x: hidden;
|
|
1268
|
+
overflow-y: auto;
|
|
1256
1269
|
}
|
|
1257
|
-
|
|
1258
|
-
|
|
1270
|
+
.json-pane {
|
|
1271
|
+
min-height: 0;
|
|
1259
1272
|
}
|
|
1260
|
-
|
|
1273
|
+
.json-pane pre {
|
|
1261
1274
|
max-height: none;
|
|
1262
1275
|
}
|
|
1263
1276
|
.meta-block {
|
|
@@ -1412,6 +1425,9 @@
|
|
|
1412
1425
|
.foot-bar { position: sticky; bottom: 0; }
|
|
1413
1426
|
.sidebar-resizer { display: none; }
|
|
1414
1427
|
.pair, .schemas { grid-template-columns: 1fr; }
|
|
1428
|
+
.workbench { overflow: auto; height: auto; }
|
|
1429
|
+
.pair { flex: none; height: auto; overflow: visible; }
|
|
1430
|
+
.card { height: auto; max-height: 70vh; }
|
|
1415
1431
|
.search-wrap { width: min(280px, 70vw); }
|
|
1416
1432
|
}
|
|
1417
1433
|
|
|
@@ -3546,7 +3562,7 @@
|
|
|
3546
3562
|
${metaBlock("Headers", headersHtml, requiredAuthHint(item.op), { always: true })}
|
|
3547
3563
|
${metaBlock("Path", pathParamsHtml)}
|
|
3548
3564
|
${metaBlock("Query", queryHtml)}
|
|
3549
|
-
${metaBlock("Body", bodyHtml
|
|
3565
|
+
${metaBlock("Body", `<div class="json-pane">${bodyHtml}</div>`, "", { always: true })}
|
|
3550
3566
|
${schemas.request}
|
|
3551
3567
|
</div>
|
|
3552
3568
|
</section>
|
|
@@ -3567,7 +3583,7 @@
|
|
|
3567
3583
|
</div>
|
|
3568
3584
|
</div>
|
|
3569
3585
|
<div class="card-body">
|
|
3570
|
-
|
|
3586
|
+
${metaBlock("Body", `<div class="json-pane" id="response-body">${resHtml}</div>`, "", { always: true })}
|
|
3571
3587
|
${schemas.response}
|
|
3572
3588
|
</div>
|
|
3573
3589
|
</section>
|
|
@@ -3626,23 +3642,6 @@
|
|
|
3626
3642
|
};
|
|
3627
3643
|
});
|
|
3628
3644
|
|
|
3629
|
-
const syncResponseHeight = () => {
|
|
3630
|
-
const requestCard = document.getElementById("request-card");
|
|
3631
|
-
const responseCard = document.getElementById("response-card");
|
|
3632
|
-
const responseBody = document.getElementById("response-body");
|
|
3633
|
-
if (!requestCard || !responseCard || !responseBody) return;
|
|
3634
|
-
responseCard.style.maxHeight = "";
|
|
3635
|
-
responseBody.style.maxHeight = "";
|
|
3636
|
-
const requestHeight = requestCard.offsetHeight;
|
|
3637
|
-
const head = responseCard.querySelector(".card-head");
|
|
3638
|
-
const headHeight = head ? head.offsetHeight : 0;
|
|
3639
|
-
const maxBody = Math.max(0, requestHeight - headHeight);
|
|
3640
|
-
responseCard.style.maxHeight = requestHeight + "px";
|
|
3641
|
-
responseBody.style.maxHeight = maxBody + "px";
|
|
3642
|
-
};
|
|
3643
|
-
syncResponseHeight();
|
|
3644
|
-
requestAnimationFrame(syncResponseHeight);
|
|
3645
|
-
|
|
3646
3645
|
document.getElementById("copy-curl").onclick = (event) => copy(toCurl(item, scenario), event.currentTarget, "Copy cURL");
|
|
3647
3646
|
const copyReq = document.getElementById("copy-req");
|
|
3648
3647
|
if (copyReq && reqCopyText) copyReq.onclick = (event) => copy(reqCopyText, event.currentTarget, "Copy body");
|
package/assets/viewer.html
CHANGED
|
@@ -408,9 +408,12 @@
|
|
|
408
408
|
grid-column: 3;
|
|
409
409
|
grid-row: 1;
|
|
410
410
|
min-height: 0;
|
|
411
|
-
|
|
411
|
+
height: 100%;
|
|
412
|
+
overflow: hidden;
|
|
412
413
|
padding: 14px 18px 16px;
|
|
413
414
|
background: var(--paper);
|
|
415
|
+
display: flex;
|
|
416
|
+
flex-direction: column;
|
|
414
417
|
}
|
|
415
418
|
.sidebar {
|
|
416
419
|
position: relative;
|
|
@@ -964,6 +967,7 @@
|
|
|
964
967
|
gap: 8px;
|
|
965
968
|
align-items: stretch;
|
|
966
969
|
margin-bottom: 12px;
|
|
970
|
+
flex: none;
|
|
967
971
|
}
|
|
968
972
|
.url {
|
|
969
973
|
flex: 1;
|
|
@@ -1040,8 +1044,11 @@
|
|
|
1040
1044
|
display: grid;
|
|
1041
1045
|
grid-template-columns: 1fr 1fr;
|
|
1042
1046
|
gap: 12px;
|
|
1043
|
-
margin-bottom:
|
|
1044
|
-
align-items:
|
|
1047
|
+
margin-bottom: 0;
|
|
1048
|
+
align-items: stretch;
|
|
1049
|
+
flex: 1;
|
|
1050
|
+
min-height: 0;
|
|
1051
|
+
overflow: hidden;
|
|
1045
1052
|
}
|
|
1046
1053
|
.card {
|
|
1047
1054
|
background: var(--white);
|
|
@@ -1049,9 +1056,12 @@
|
|
|
1049
1056
|
border: 1px solid var(--hairline);
|
|
1050
1057
|
box-shadow: none;
|
|
1051
1058
|
min-width: 0;
|
|
1059
|
+
min-height: 0;
|
|
1060
|
+
height: 100%;
|
|
1052
1061
|
display: flex;
|
|
1053
1062
|
flex-direction: column;
|
|
1054
1063
|
max-width: 100%;
|
|
1064
|
+
overflow: hidden;
|
|
1055
1065
|
}
|
|
1056
1066
|
.card.response-card {
|
|
1057
1067
|
overflow: hidden;
|
|
@@ -1093,12 +1103,15 @@
|
|
|
1093
1103
|
padding: 0;
|
|
1094
1104
|
display: flex;
|
|
1095
1105
|
flex-direction: column;
|
|
1106
|
+
flex: 1;
|
|
1096
1107
|
min-height: 0;
|
|
1108
|
+
overflow-x: hidden;
|
|
1109
|
+
overflow-y: auto;
|
|
1097
1110
|
}
|
|
1098
|
-
|
|
1099
|
-
|
|
1111
|
+
.json-pane {
|
|
1112
|
+
min-height: 0;
|
|
1100
1113
|
}
|
|
1101
|
-
|
|
1114
|
+
.json-pane pre {
|
|
1102
1115
|
max-height: none;
|
|
1103
1116
|
}
|
|
1104
1117
|
.meta-block {
|
|
@@ -1249,6 +1262,9 @@
|
|
|
1249
1262
|
.ex-dock { position: sticky; bottom: 0; }
|
|
1250
1263
|
.sidebar-resizer { display: none; }
|
|
1251
1264
|
.pair, .schemas { grid-template-columns: 1fr; }
|
|
1265
|
+
.workbench { overflow: auto; height: auto; }
|
|
1266
|
+
.pair { flex: none; height: auto; overflow: visible; }
|
|
1267
|
+
.card { height: auto; max-height: 70vh; }
|
|
1252
1268
|
.search-wrap { width: min(280px, 70vw); }
|
|
1253
1269
|
}
|
|
1254
1270
|
</style>
|
|
@@ -3271,7 +3287,7 @@
|
|
|
3271
3287
|
${metaBlock("Headers", headersHtml, requiredAuthHint(item.op), { always: true })}
|
|
3272
3288
|
${metaBlock("Path", pathParamsHtml)}
|
|
3273
3289
|
${metaBlock("Query", queryHtml)}
|
|
3274
|
-
${metaBlock("Body", bodyHtml
|
|
3290
|
+
${metaBlock("Body", `<div class="json-pane">${bodyHtml}</div>`, "", { always: true })}
|
|
3275
3291
|
${schemas.request}
|
|
3276
3292
|
</div>
|
|
3277
3293
|
</section>
|
|
@@ -3292,7 +3308,7 @@
|
|
|
3292
3308
|
</div>
|
|
3293
3309
|
</div>
|
|
3294
3310
|
<div class="card-body">
|
|
3295
|
-
|
|
3311
|
+
${metaBlock("Body", `<div class="json-pane" id="response-body">${resHtml}</div>`, "", { always: true })}
|
|
3296
3312
|
${schemas.response}
|
|
3297
3313
|
</div>
|
|
3298
3314
|
</section>
|
|
@@ -3351,23 +3367,6 @@
|
|
|
3351
3367
|
};
|
|
3352
3368
|
});
|
|
3353
3369
|
|
|
3354
|
-
const syncResponseHeight = () => {
|
|
3355
|
-
const requestCard = document.getElementById("request-card");
|
|
3356
|
-
const responseCard = document.getElementById("response-card");
|
|
3357
|
-
const responseBody = document.getElementById("response-body");
|
|
3358
|
-
if (!requestCard || !responseCard || !responseBody) return;
|
|
3359
|
-
responseCard.style.maxHeight = "";
|
|
3360
|
-
responseBody.style.maxHeight = "";
|
|
3361
|
-
const requestHeight = requestCard.offsetHeight;
|
|
3362
|
-
const head = responseCard.querySelector(".card-head");
|
|
3363
|
-
const headHeight = head ? head.offsetHeight : 0;
|
|
3364
|
-
const maxBody = Math.max(0, requestHeight - headHeight);
|
|
3365
|
-
responseCard.style.maxHeight = requestHeight + "px";
|
|
3366
|
-
responseBody.style.maxHeight = maxBody + "px";
|
|
3367
|
-
};
|
|
3368
|
-
syncResponseHeight();
|
|
3369
|
-
requestAnimationFrame(syncResponseHeight);
|
|
3370
|
-
|
|
3371
3370
|
document.getElementById("copy-curl").onclick = (event) => copy(toCurl(item, scenario), event.currentTarget, "Copy cURL");
|
|
3372
3371
|
const copyReq = document.getElementById("copy-req");
|
|
3373
3372
|
if (copyReq && reqCopyText) copyReq.onclick = (event) => copy(reqCopyText, event.currentTarget, "Copy body");
|