claude-dev-server 1.2.0 → 1.2.2
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/assets/dev.html +41 -13
- package/dist/assets/ttyd-terminal.html +1 -1
- package/dist/{chunk-PAE5WTS2.js → chunk-PZVR2URG.js} +44 -16
- package/dist/chunk-PZVR2URG.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-PAE5WTS2.js.map +0 -1
package/dist/assets/dev.html
CHANGED
|
@@ -158,10 +158,10 @@ html, body {
|
|
|
158
158
|
font-family: monospace;
|
|
159
159
|
white-space: nowrap;
|
|
160
160
|
}
|
|
161
|
-
/* Portrait mode */
|
|
161
|
+
/* Portrait mode - dev on top, ttyd on bottom */
|
|
162
162
|
@media (orientation: portrait) {
|
|
163
163
|
.claude-dev-server-container {
|
|
164
|
-
flex-direction: column;
|
|
164
|
+
flex-direction: column-reverse;
|
|
165
165
|
}
|
|
166
166
|
.claude-dev-server-divider {
|
|
167
167
|
width: 100%;
|
|
@@ -172,9 +172,16 @@ html, body {
|
|
|
172
172
|
width: 100%;
|
|
173
173
|
min-width: unset;
|
|
174
174
|
max-width: unset;
|
|
175
|
-
height:
|
|
175
|
+
height: 70%;
|
|
176
176
|
min-height: 200px;
|
|
177
177
|
}
|
|
178
|
+
.claude-dev-server-left {
|
|
179
|
+
width: 100%;
|
|
180
|
+
min-width: unset;
|
|
181
|
+
max-width: unset;
|
|
182
|
+
height: 30%;
|
|
183
|
+
min-height: 150px;
|
|
184
|
+
}
|
|
178
185
|
}
|
|
179
186
|
</style>
|
|
180
187
|
</head>
|
|
@@ -484,13 +491,19 @@ html, body {
|
|
|
484
491
|
}
|
|
485
492
|
|
|
486
493
|
function setupDraggable(divider) {
|
|
487
|
-
let
|
|
488
|
-
let
|
|
489
|
-
let
|
|
494
|
+
let startValue = 0;
|
|
495
|
+
let startSize = 0;
|
|
496
|
+
let containerSize = 0;
|
|
497
|
+
let isPortrait = window.matchMedia('(orientation: portrait)').matches;
|
|
490
498
|
|
|
491
499
|
divider.addEventListener('mousedown', startDrag);
|
|
492
500
|
divider.addEventListener('touchstart', startDrag);
|
|
493
501
|
|
|
502
|
+
// Listen for orientation changes
|
|
503
|
+
window.matchMedia('(orientation: portrait)').addEventListener('change', (e) => {
|
|
504
|
+
isPortrait = e.matches;
|
|
505
|
+
});
|
|
506
|
+
|
|
494
507
|
function startDrag(e) {
|
|
495
508
|
isDragging = true;
|
|
496
509
|
divider.classList.add('dragging');
|
|
@@ -499,14 +512,17 @@ html, body {
|
|
|
499
512
|
iframes.forEach(iframe => iframe.style.pointerEvents = 'none');
|
|
500
513
|
|
|
501
514
|
const clientX = e.touches ? e.touches[0].clientX : e.clientX;
|
|
502
|
-
|
|
515
|
+
const clientY = e.touches ? e.touches[0].clientY : e.clientY;
|
|
516
|
+
|
|
517
|
+
// Use X for landscape (horizontal drag), Y for portrait (vertical drag)
|
|
518
|
+
startValue = isPortrait ? clientY : clientX;
|
|
503
519
|
|
|
504
520
|
const container = document.querySelector('.claude-dev-server-container');
|
|
505
521
|
const leftPanelEl = document.querySelector('.claude-dev-server-left');
|
|
506
522
|
|
|
507
523
|
if (container && leftPanelEl) {
|
|
508
|
-
|
|
509
|
-
|
|
524
|
+
containerSize = isPortrait ? container.offsetHeight : container.offsetWidth;
|
|
525
|
+
startSize = isPortrait ? leftPanelEl.offsetHeight : leftPanelEl.offsetWidth;
|
|
510
526
|
}
|
|
511
527
|
|
|
512
528
|
e.preventDefault();
|
|
@@ -521,16 +537,28 @@ html, body {
|
|
|
521
537
|
}
|
|
522
538
|
|
|
523
539
|
const clientX = e.touches ? e.touches[0].clientX : e.clientX;
|
|
524
|
-
const
|
|
540
|
+
const clientY = e.touches ? e.touches[0].clientY : e.clientY;
|
|
525
541
|
|
|
526
|
-
|
|
527
|
-
|
|
542
|
+
// Use appropriate axis based on orientation
|
|
543
|
+
const currentValue = isPortrait ? clientY : clientX;
|
|
544
|
+
const delta = currentValue - startValue;
|
|
545
|
+
|
|
546
|
+
let newSize = startSize + delta;
|
|
547
|
+
let percentage = (newSize / containerSize) * 100;
|
|
528
548
|
const clamped = Math.max(20, Math.min(80, percentage));
|
|
529
549
|
|
|
530
550
|
const leftPanelEl = document.querySelector('.claude-dev-server-left');
|
|
531
551
|
if (leftPanelEl) {
|
|
532
552
|
leftPanelEl.style.flex = 'none';
|
|
533
|
-
|
|
553
|
+
if (isPortrait) {
|
|
554
|
+
// Portrait: adjust height
|
|
555
|
+
leftPanelEl.style.height = clamped + '%';
|
|
556
|
+
leftPanelEl.style.width = '';
|
|
557
|
+
} else {
|
|
558
|
+
// Landscape: adjust width
|
|
559
|
+
leftPanelEl.style.width = clamped + '%';
|
|
560
|
+
leftPanelEl.style.height = '';
|
|
561
|
+
}
|
|
534
562
|
}
|
|
535
563
|
}
|
|
536
564
|
|