tmux-ide 2.9.0-beta.26 → 2.9.0-beta.27

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/bin/cli.js CHANGED
@@ -11279,7 +11279,7 @@ var require_package = __commonJS({
11279
11279
  "package.json"(exports, module) {
11280
11280
  module.exports = {
11281
11281
  name: "tmux-ide",
11282
- version: "2.9.0-beta.26",
11282
+ version: "2.9.0-beta.27",
11283
11283
  description: "A visual, agent-aware IDE for any tmux session, with optional workspace presets",
11284
11284
  type: "module",
11285
11285
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmux-ide",
3
- "version": "2.9.0-beta.26",
3
+ "version": "2.9.0-beta.27",
4
4
  "description": "A visual, agent-aware IDE for any tmux session, with optional workspace presets",
5
5
  "type": "module",
6
6
  "bin": {
@@ -167,6 +167,14 @@ export function terminalPaneSeparators(frames, paneBorderStatus) {
167
167
  }
168
168
  return Object.freeze(separators);
169
169
  }
170
+ /** Highlight the observed divider, never the pointer's unconfirmed target. */
171
+ export function terminalPaneObservedResizeGuide(frames, paneBorderStatus, preview) {
172
+ const separator = terminalPaneSeparators(frames, paneBorderStatus).find((candidate) => candidate.paneId === preview.semanticPaneId &&
173
+ candidate.axis === (preview.axis === "cols" ? "x" : "y"));
174
+ return separator
175
+ ? terminalPaneResizePreview(separator, separator.position, separator.position).guide
176
+ : null;
177
+ }
170
178
  export function terminalPaneResizePreview(separator, pointer, origin) {
171
179
  const scale = separator.nativeCellsPerDisplayCell ?? 1;
172
180
  const total = separator.initialCells + separator.siblingCells;
@@ -16,7 +16,7 @@ import { PaneTitleBar } from "../workspace/terminal-pane-header.jsx";
16
16
  import { PANE_ACTION_MENU_ITEMS, PaneActionMenu } from "../workspace/pane-action-menu.jsx";
17
17
  import { createApplicationPaneMenuOwner } from "./application-pane-menu-owner.js";
18
18
  import { extractTerminalSelection, terminalMouseActionSupported, terminalGestureLeaseMatches, terminalSelectionCell, terminalMouseInput, } from "./terminal-selection.js";
19
- import { terminalAgentStatusLabel, terminalPaneDisplayTitle, terminalPaneResizePreview, terminalPaneSeparatorAt, terminalPaneSeparators, terminalWindowAgentIndicator, terminalWindowPane, terminalWindowTitle, } from "./application-terminal-workspace-policy.js";
19
+ import { terminalAgentStatusLabel, terminalPaneDisplayTitle, terminalPaneResizePreview, terminalPaneObservedResizeGuide, terminalPaneSeparatorAt, terminalPaneSeparators, terminalWindowAgentIndicator, terminalWindowPane, terminalWindowTitle, } from "./application-terminal-workspace-policy.js";
20
20
  export { terminalAgentStatusLabel, terminalPaneChromeLabel, terminalPaneDisplayTitle, } from "./application-terminal-workspace-policy.js";
21
21
  export function safeApplicationMouseIngressMicros(now = () => performance.now()) {
22
22
  try {
@@ -304,14 +304,19 @@ export function ApplicationTerminalWorkspace(props) {
304
304
  top: localY + 1 + height <= bottom ? localY + 1 : Math.max(topOffset(), localY - height),
305
305
  });
306
306
  };
307
- const globalPreview = (preview) => Object.freeze({
308
- ...preview,
309
- globalGuide: Object.freeze({
310
- ...preview.guide,
311
- x: preview.guide.x + (props.originX ?? 0),
312
- y: preview.guide.y + (props.originY ?? 0) + topOffset(),
313
- }),
314
- });
307
+ const observedGuide = (preview) => terminalPaneObservedResizeGuide(visibleFrames(), layout().current?.paneBorderStatus ?? "off", preview);
308
+ const globalPreview = (preview) => {
309
+ const guide = observedGuide(preview) ?? preview.guide;
310
+ return Object.freeze({
311
+ ...preview,
312
+ guide,
313
+ globalGuide: Object.freeze({
314
+ ...guide,
315
+ x: guide.x + (props.originX ?? 0),
316
+ y: guide.y + (props.originY ?? 0) + topOffset(),
317
+ }),
318
+ });
319
+ };
315
320
  // tmux retains one active pane per window even while that window is hidden.
316
321
  // Keep those native terminal surfaces presentation-ready while the host has
317
322
  // focus; switching the visible window then changes only composition, not
@@ -1189,8 +1194,10 @@ export function ApplicationTerminalWorkspace(props) {
1189
1194
  };
1190
1195
  const guide = createMemo(() => {
1191
1196
  const active = resizePreview();
1192
- if (active)
1193
- return { rect: active.guide, active: true };
1197
+ if (active) {
1198
+ const rect = observedGuide(active);
1199
+ return rect ? { rect, active: true } : null;
1200
+ }
1194
1201
  const hovered = hoveredSeparator();
1195
1202
  return hovered
1196
1203
  ? {
@@ -278,6 +278,22 @@ export function terminalPaneSeparators(
278
278
  return Object.freeze(separators);
279
279
  }
280
280
 
281
+ /** Highlight the observed divider, never the pointer's unconfirmed target. */
282
+ export function terminalPaneObservedResizeGuide(
283
+ frames: readonly OpenTuiPaneFrame[],
284
+ paneBorderStatus: "top" | "bottom" | "off",
285
+ preview: ApplicationPaneResizePreview,
286
+ ): ResizeGuideRect | null {
287
+ const separator = terminalPaneSeparators(frames, paneBorderStatus).find(
288
+ (candidate) =>
289
+ candidate.paneId === preview.semanticPaneId &&
290
+ candidate.axis === (preview.axis === "cols" ? "x" : "y"),
291
+ );
292
+ return separator
293
+ ? terminalPaneResizePreview(separator, separator.position, separator.position).guide
294
+ : null;
295
+ }
296
+
281
297
  export function terminalPaneResizePreview(
282
298
  separator: ApplicationPaneSeparator,
283
299
  pointer: number,
@@ -67,6 +67,7 @@ import {
67
67
  terminalAgentStatusLabel,
68
68
  terminalPaneDisplayTitle,
69
69
  terminalPaneResizePreview,
70
+ terminalPaneObservedResizeGuide,
70
71
  terminalPaneSeparatorAt,
71
72
  terminalPaneSeparators,
72
73
  terminalWindowAgentIndicator,
@@ -593,15 +594,24 @@ export function ApplicationTerminalWorkspace(props: ApplicationTerminalWorkspace
593
594
  top: localY + 1 + height <= bottom ? localY + 1 : Math.max(topOffset(), localY - height),
594
595
  });
595
596
  };
596
- const globalPreview = (preview: ApplicationPaneResizePreview): ApplicationPaneResizePreview =>
597
- Object.freeze({
597
+ const observedGuide = (preview: ApplicationPaneResizePreview) =>
598
+ terminalPaneObservedResizeGuide(
599
+ visibleFrames(),
600
+ layout().current?.paneBorderStatus ?? "off",
601
+ preview,
602
+ );
603
+ const globalPreview = (preview: ApplicationPaneResizePreview): ApplicationPaneResizePreview => {
604
+ const guide = observedGuide(preview) ?? preview.guide;
605
+ return Object.freeze({
598
606
  ...preview,
607
+ guide,
599
608
  globalGuide: Object.freeze({
600
- ...preview.guide,
601
- x: preview.guide.x + (props.originX ?? 0),
602
- y: preview.guide.y + (props.originY ?? 0) + topOffset(),
609
+ ...guide,
610
+ x: guide.x + (props.originX ?? 0),
611
+ y: guide.y + (props.originY ?? 0) + topOffset(),
603
612
  }),
604
613
  });
614
+ };
605
615
  // tmux retains one active pane per window even while that window is hidden.
606
616
  // Keep those native terminal surfaces presentation-ready while the host has
607
617
  // focus; switching the visible window then changes only composition, not
@@ -1626,7 +1636,10 @@ export function ApplicationTerminalWorkspace(props: ApplicationTerminalWorkspace
1626
1636
  };
1627
1637
  const guide = createMemo(() => {
1628
1638
  const active = resizePreview();
1629
- if (active) return { rect: active.guide, active: true };
1639
+ if (active) {
1640
+ const rect = observedGuide(active);
1641
+ return rect ? { rect, active: true } : null;
1642
+ }
1630
1643
  const hovered = hoveredSeparator();
1631
1644
  return hovered
1632
1645
  ? {