@industry-theme/xterm-terminal-panel 0.5.3 → 0.5.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.css CHANGED
@@ -16,7 +16,7 @@
16
16
  width: 100%;
17
17
  height: 100%;
18
18
  margin: 0;
19
- padding: 5px 0 0 5px;
19
+ padding: 10px 0 0 10px;
20
20
  }
21
21
 
22
22
  .xterm-helper-textarea {
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,16 +1782,41 @@ 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;
1819
+ const { theme } = useTheme6();
1795
1820
  console.log("[TerminalTabContent] RENDER", { tabId: tab.id, isActive, sessionId });
1796
1821
  const terminalRef = useRef3(null);
1797
1822
  const [localSessionId, setLocalSessionId] = useState4(sessionId);
@@ -2019,15 +2044,32 @@ function TerminalTabContentInner(props, ref) {
2019
2044
  toggleScrollLock: handleToggleScrollLock
2020
2045
  }), [handleScrollToBottom, handleToggleScrollLock]);
2021
2046
  if (!isInitialized) {
2022
- return /* @__PURE__ */ jsx7("div", {
2047
+ return /* @__PURE__ */ jsxs6("div", {
2023
2048
  style: {
2024
2049
  display: isActive ? "flex" : "none",
2025
2050
  height: "100%",
2026
- alignItems: "center",
2027
- justifyContent: "center",
2028
- color: "#888"
2051
+ width: "100%",
2052
+ backgroundColor: theme.colors.background,
2053
+ padding: "10px 0 0 10px"
2029
2054
  },
2030
- children: "Initializing terminal..."
2055
+ children: [
2056
+ /* @__PURE__ */ jsx7("div", {
2057
+ style: {
2058
+ width: "8px",
2059
+ height: "17px",
2060
+ backgroundColor: theme.colors.text,
2061
+ animation: "blink 1s step-end infinite"
2062
+ }
2063
+ }),
2064
+ /* @__PURE__ */ jsx7("style", {
2065
+ children: `
2066
+ @keyframes blink {
2067
+ 0%, 100% { opacity: 1; }
2068
+ 50% { opacity: 0; }
2069
+ }
2070
+ `
2071
+ })
2072
+ ]
2031
2073
  });
2032
2074
  }
2033
2075
  const overlayState = !shouldRenderTerminal ? {
@@ -2488,30 +2530,12 @@ var TabbedTerminalPanelInner = ({
2488
2530
  const hasInternalActivity = tabSessionId ? activityStates.get(tabSessionId) : false;
2489
2531
  const isWorking = hasExternalWorkingState || hasInternalActivity;
2490
2532
  const isActive = tab.id === activeTabId;
2491
- if (!isActive && !isWorking)
2533
+ if (!isActive)
2492
2534
  return null;
2493
2535
  const scrollPosition = scrollPositions.get(tab.id) ?? defaultScrollPosition;
2494
- return /* @__PURE__ */ jsxs6("div", {
2495
- style: { display: "flex", alignItems: "center", gap: "4px" },
2536
+ return /* @__PURE__ */ jsxs6(Fragment2, {
2496
2537
  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", {
2538
+ /* @__PURE__ */ jsx7("button", {
2515
2539
  onClick: (e) => {
2516
2540
  e.stopPropagation();
2517
2541
  handleToggleScrollLock();
@@ -2541,6 +2565,22 @@ var TabbedTerminalPanelInner = ({
2541
2565
  }) : /* @__PURE__ */ jsx7(Unlock2, {
2542
2566
  size: 10
2543
2567
  })
2568
+ }),
2569
+ /* @__PURE__ */ jsx7("div", {
2570
+ style: {
2571
+ position: "absolute",
2572
+ right: "8px",
2573
+ display: "flex",
2574
+ alignItems: "center",
2575
+ justifyContent: "center",
2576
+ width: "16px",
2577
+ height: "16px"
2578
+ },
2579
+ title: isWorking ? "Terminal active" : "Terminal idle",
2580
+ children: /* @__PURE__ */ jsx7(ActivityIndicator, {
2581
+ color: theme.colors.primary,
2582
+ isAnimating: isWorking ?? false
2583
+ })
2544
2584
  })
2545
2585
  ]
2546
2586
  });
@@ -2700,6 +2740,7 @@ var TabbedTerminalPanelInner = ({
2700
2740
  style: { opacity: 0.5, marginBottom: "16px" }
2701
2741
  }),
2702
2742
  /* @__PURE__ */ jsx7("p", {
2743
+ style: { fontFamily: theme.fonts.body, fontSize: theme.fontSizes[1] },
2703
2744
  children: "No terminal sessions"
2704
2745
  }),
2705
2746
  /* @__PURE__ */ jsx7("button", {
@@ -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;AAq0CD,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/dist/styles.css CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  /* Remove default xterm padding */
14
14
  .terminal-container-fix .xterm {
15
- padding: 5px 0 0 5px;
15
+ padding: 10px 0 0 10px;
16
16
  margin: 0;
17
17
  height: 100%;
18
18
  width: 100%;
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.5",
4
4
  "description": "Industry-themed xterm.js terminal components with panel framework integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",