shokupan 0.10.3 → 0.10.5
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.cjs +72 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +72 -29
- package/dist/index.js.map +1 -1
- package/dist/plugins/application/api-explorer/static/explorer-client.mjs +48 -1
- package/dist/plugins/application/api-explorer/static/style.css +25 -3
- package/package.json +1 -1
|
@@ -272,13 +272,18 @@ function renderRequestView(route, container) {
|
|
|
272
272
|
${source ? `
|
|
273
273
|
<div class="source-section">
|
|
274
274
|
<h3 style="margin-bottom:8px; font-size:1.1rem; color:var(--text-primary);">Source Code</h3>
|
|
275
|
-
<div class="source-header" style="justify-content:
|
|
275
|
+
<div class="source-header" style="justify-content: space-between; margin-bottom: 8px; align-items: center;">
|
|
276
276
|
<a href="vscode://file/${source.file}:${source.line}" class="doc-source-link" title="${source.file}:${source.line}">
|
|
277
277
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="margin-right:6px">
|
|
278
278
|
<polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline>
|
|
279
279
|
</svg>
|
|
280
280
|
${source.file.split('/').pop()}:${source.line}
|
|
281
281
|
</a>
|
|
282
|
+
<button class="btn icon-btn" id="btn-source-fullscreen" title="Toggle Fullscreen">
|
|
283
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
284
|
+
<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>
|
|
285
|
+
</svg>
|
|
286
|
+
</button>
|
|
282
287
|
</div>
|
|
283
288
|
<div id="monaco-source-viewer" class="monaco-container"></div>
|
|
284
289
|
</div>
|
|
@@ -421,6 +426,48 @@ function renderRequestView(route, container) {
|
|
|
421
426
|
// Setup initial remove buttons
|
|
422
427
|
container.querySelectorAll('.remove-header').forEach(setupRemoveHeaderBtn);
|
|
423
428
|
|
|
429
|
+
// Source viewer fullscreen toggle
|
|
430
|
+
const fullscreenBtn = document.getElementById('btn-source-fullscreen');
|
|
431
|
+
if (fullscreenBtn) {
|
|
432
|
+
const updateFullscreenIcon = (isFullscreen) => {
|
|
433
|
+
const svg = fullscreenBtn.querySelector('svg');
|
|
434
|
+
if (isFullscreen) {
|
|
435
|
+
// Exit fullscreen icon (minimize)
|
|
436
|
+
svg.innerHTML = '<path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path>';
|
|
437
|
+
} else {
|
|
438
|
+
// Enter fullscreen icon (maximize)
|
|
439
|
+
svg.innerHTML = '<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>';
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
fullscreenBtn.addEventListener('click', () => {
|
|
444
|
+
const sourceSection = container.querySelector('.source-section');
|
|
445
|
+
if (sourceSection) {
|
|
446
|
+
const isFullscreen = sourceSection.classList.toggle('fullscreen');
|
|
447
|
+
updateFullscreenIcon(isFullscreen);
|
|
448
|
+
|
|
449
|
+
// Update Monaco layout after transition
|
|
450
|
+
setTimeout(() => {
|
|
451
|
+
if (currentEditors.source) currentEditors.source.layout();
|
|
452
|
+
}, 300);
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
// ESC key to exit fullscreen
|
|
457
|
+
document.addEventListener('keydown', (e) => {
|
|
458
|
+
if (e.key === 'Escape') {
|
|
459
|
+
const sourceSection = container.querySelector('.source-section');
|
|
460
|
+
if (sourceSection && sourceSection.classList.contains('fullscreen')) {
|
|
461
|
+
sourceSection.classList.remove('fullscreen');
|
|
462
|
+
updateFullscreenIcon(false);
|
|
463
|
+
setTimeout(() => {
|
|
464
|
+
if (currentEditors.source) currentEditors.source.layout();
|
|
465
|
+
}, 300);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
|
|
424
471
|
// Populate Request Body if example exists
|
|
425
472
|
if (hasBody && currentEditors.request) {
|
|
426
473
|
currentEditors.request.setValue('{\n \n}');
|
|
@@ -121,7 +121,6 @@ body {
|
|
|
121
121
|
.nav-group-title {
|
|
122
122
|
padding: 8px 16px;
|
|
123
123
|
font-size: 0.8rem;
|
|
124
|
-
text-transform: uppercase;
|
|
125
124
|
color: var(--text-secondary);
|
|
126
125
|
font-weight: 600;
|
|
127
126
|
user-select: none;
|
|
@@ -198,6 +197,12 @@ body {
|
|
|
198
197
|
overflow: hidden;
|
|
199
198
|
text-overflow: ellipsis;
|
|
200
199
|
flex: 1;
|
|
200
|
+
font-family: 'JetBrains Mono', monospace;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.nav-label .param-highlight {
|
|
204
|
+
color: #2196f3;
|
|
205
|
+
font-weight: 600;
|
|
201
206
|
}
|
|
202
207
|
|
|
203
208
|
/* Nav Item Wrapper (for items with source links) */
|
|
@@ -243,7 +248,6 @@ body {
|
|
|
243
248
|
.nav-subgroup-title {
|
|
244
249
|
padding: 6px 16px 6px 36px;
|
|
245
250
|
font-size: 0.75rem;
|
|
246
|
-
text-transform: uppercase;
|
|
247
251
|
color: var(--text-secondary);
|
|
248
252
|
font-weight: 600;
|
|
249
253
|
user-select: none;
|
|
@@ -442,7 +446,6 @@ body {
|
|
|
442
446
|
|
|
443
447
|
.send-btn {
|
|
444
448
|
background: var(--primary);
|
|
445
|
-
color: #fff;
|
|
446
449
|
border: none;
|
|
447
450
|
border-radius: 6px;
|
|
448
451
|
padding: 0 20px;
|
|
@@ -563,6 +566,25 @@ body {
|
|
|
563
566
|
display: flex;
|
|
564
567
|
flex-direction: column;
|
|
565
568
|
height: 400px;
|
|
569
|
+
transition: all 0.3s ease;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.source-section.fullscreen {
|
|
573
|
+
position: fixed;
|
|
574
|
+
top: 0;
|
|
575
|
+
left: 0;
|
|
576
|
+
right: 0;
|
|
577
|
+
bottom: 0;
|
|
578
|
+
width: 100%;
|
|
579
|
+
height: 100vh;
|
|
580
|
+
margin: 0;
|
|
581
|
+
z-index: 1000;
|
|
582
|
+
background: var(--bg-primary);
|
|
583
|
+
padding: 16px;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.source-section.fullscreen h3 {
|
|
587
|
+
margin-top: 0;
|
|
566
588
|
}
|
|
567
589
|
|
|
568
590
|
.source-header {
|