@industry-theme/xterm-terminal-panel 0.5.3 → 0.5.4

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.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  context,
33
33
  SpanStatusCode
34
34
  } from "@opentelemetry/api";
35
- var PACKAGE_VERSION = "0.5.1";
35
+ var PACKAGE_VERSION = "0.5.4";
36
36
  var TRACER_NAME = "@industry-theme/xterm-terminal-panel";
37
37
  var TRACER_VERSION = PACKAGE_VERSION;
38
38
  function getTracer() {
@@ -1782,14 +1782,38 @@ var TerminalPanel = ({
1782
1782
  };
1783
1783
  // src/panels/TabbedTerminalPanel.tsx
1784
1784
  import { useTheme as useTheme6 } from "@principal-ade/industry-theme";
1785
- import { Terminal as TerminalIcon2, Lock as Lock2, Unlock as Unlock2, Box, Boxes, Loader2 } from "lucide-react";
1785
+ import { Terminal as TerminalIcon2, Lock as Lock2, Unlock as Unlock2, Box, Boxes } from "lucide-react";
1786
1786
  import React2, {
1787
1787
  useState as useState4,
1788
1788
  useCallback as useCallback3,
1789
1789
  useEffect as useEffect4,
1790
1790
  useRef as useRef3
1791
1791
  } from "react";
1792
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1792
+ import { jsx as jsx7, jsxs as jsxs6, Fragment as Fragment2 } from "react/jsx-runtime";
1793
+ var ActivityIndicator = ({ color, isAnimating }) => /* @__PURE__ */ jsxs6("div", {
1794
+ style: { display: "flex", gap: 1, alignItems: "center", height: 12 },
1795
+ children: [
1796
+ [0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx7("div", {
1797
+ style: {
1798
+ width: 2,
1799
+ height: 10,
1800
+ backgroundColor: color,
1801
+ borderRadius: 1,
1802
+ transformOrigin: "center",
1803
+ transform: isAnimating ? undefined : "scaleY(0.4)",
1804
+ animation: isAnimating ? `waveSine 1.2s ease-in-out ${i * 0.1}s infinite` : "none"
1805
+ }
1806
+ }, i)),
1807
+ /* @__PURE__ */ jsx7("style", {
1808
+ children: `
1809
+ @keyframes waveSine {
1810
+ 0%, 100% { transform: scaleY(0.4); }
1811
+ 50% { transform: scaleY(1); }
1812
+ }
1813
+ `
1814
+ })
1815
+ ]
1816
+ });
1793
1817
  function TerminalTabContentInner(props, ref) {
1794
1818
  const { tab, sessionId, isActive, isVisible, actions, events, terminalContext, onSessionCreated, onScrollPositionChange, isForeign = false, defaultScrollLocked, activityDetection = true, activityTimeout = 500, autoShowBlinds = false, onActivityStateChange } = props;
1795
1819
  console.log("[TerminalTabContent] RENDER", { tabId: tab.id, isActive, sessionId });
@@ -2488,30 +2512,12 @@ var TabbedTerminalPanelInner = ({
2488
2512
  const hasInternalActivity = tabSessionId ? activityStates.get(tabSessionId) : false;
2489
2513
  const isWorking = hasExternalWorkingState || hasInternalActivity;
2490
2514
  const isActive = tab.id === activeTabId;
2491
- if (!isActive && !isWorking)
2515
+ if (!isActive)
2492
2516
  return null;
2493
2517
  const scrollPosition = scrollPositions.get(tab.id) ?? defaultScrollPosition;
2494
- return /* @__PURE__ */ jsxs6("div", {
2495
- style: { display: "flex", alignItems: "center", gap: "4px" },
2518
+ return /* @__PURE__ */ jsxs6(Fragment2, {
2496
2519
  children: [
2497
- isWorking && /* @__PURE__ */ jsx7("div", {
2498
- style: {
2499
- display: "flex",
2500
- alignItems: "center",
2501
- justifyContent: "center",
2502
- width: "16px",
2503
- height: "16px",
2504
- color: theme.colors.primary
2505
- },
2506
- title: "Agent working",
2507
- children: /* @__PURE__ */ jsx7(Loader2, {
2508
- size: 12,
2509
- style: {
2510
- animation: "spin 1s linear infinite"
2511
- }
2512
- })
2513
- }),
2514
- isActive && /* @__PURE__ */ jsx7("button", {
2520
+ /* @__PURE__ */ jsx7("button", {
2515
2521
  onClick: (e) => {
2516
2522
  e.stopPropagation();
2517
2523
  handleToggleScrollLock();
@@ -2541,6 +2547,22 @@ var TabbedTerminalPanelInner = ({
2541
2547
  }) : /* @__PURE__ */ jsx7(Unlock2, {
2542
2548
  size: 10
2543
2549
  })
2550
+ }),
2551
+ /* @__PURE__ */ jsx7("div", {
2552
+ style: {
2553
+ position: "absolute",
2554
+ right: "8px",
2555
+ display: "flex",
2556
+ alignItems: "center",
2557
+ justifyContent: "center",
2558
+ width: "16px",
2559
+ height: "16px"
2560
+ },
2561
+ title: isWorking ? "Terminal active" : "Terminal idle",
2562
+ children: /* @__PURE__ */ jsx7(ActivityIndicator, {
2563
+ color: theme.colors.primary,
2564
+ isAnimating: isWorking ?? false
2565
+ })
2544
2566
  })
2545
2567
  ]
2546
2568
  });
@@ -1 +1 @@
1
- {"version":3,"file":"TabbedTerminalPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/TabbedTerminalPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAKN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EAKZ,MAAM,gBAAgB,CAAC;AAoCxB,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AA6zCD,eAAO,MAAM,mBAAmB,EAAkC,CAAC,IAAI,SAAS,OAAO,cAAc,EAAE,OAAO,GAAG,WAAW,EAC1H,KAAK,EAAE,wBAAwB,CAAC,IAAI,CAAC,KAClC,KAAK,CAAC,YAAY,CAAC"}
1
+ {"version":3,"file":"TabbedTerminalPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/TabbedTerminalPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAKN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EAKZ,MAAM,gBAAgB,CAAC;AAkExB,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAqzCD,eAAO,MAAM,mBAAmB,EAAkC,CAAC,IAAI,SAAS,OAAO,cAAc,EAAE,OAAO,GAAG,WAAW,EAC1H,KAAK,EAAE,wBAAwB,CAAC,IAAI,CAAC,KAClC,KAAK,CAAC,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { trace, context, SpanStatusCode, type Tracer, type Span } from '@opentelemetry/api';
2
2
  export declare const TRACER_NAME = "@industry-theme/xterm-terminal-panel";
3
- export declare const TRACER_VERSION = "0.5.1";
3
+ export declare const TRACER_VERSION = "0.5.4";
4
4
  export declare function getTracer(): Tracer;
5
5
  export declare function getActiveSpan(): Span | undefined;
6
6
  export declare function withSpan<T>(span: Span, fn: () => Promise<T>): Promise<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@industry-theme/xterm-terminal-panel",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Industry-themed xterm.js terminal components with panel framework integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",