@industry-theme/xterm-terminal-panel 0.5.23 → 0.5.25

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,153 @@ import {
32
32
  context,
33
33
  SpanStatusCode
34
34
  } from "@opentelemetry/api";
35
- var PACKAGE_VERSION = "0.5.4";
35
+ // package.json
36
+ var package_default = {
37
+ name: "@industry-theme/xterm-terminal-panel",
38
+ version: "0.5.24",
39
+ description: "Industry-themed xterm.js terminal components with panel framework integration",
40
+ type: "module",
41
+ main: "dist/index.js",
42
+ module: "dist/index.js",
43
+ types: "dist/index.d.ts",
44
+ exports: {
45
+ ".": {
46
+ types: "./dist/index.d.ts",
47
+ import: "./dist/index.js",
48
+ require: "./dist/index.js",
49
+ default: "./dist/index.js"
50
+ },
51
+ "./tools": {
52
+ types: "./dist/tools/index.d.ts",
53
+ import: "./dist/tools.bundle.js",
54
+ require: "./dist/tools.bundle.js",
55
+ default: "./dist/tools.bundle.js"
56
+ },
57
+ "./styles.css": "./dist/styles.css",
58
+ "./package.json": "./package.json"
59
+ },
60
+ scripts: {
61
+ build: "bun run clean && bun run build:esm && bun run build:tools && bun run build:types && bun run build:styles",
62
+ "build:esm": "NODE_ENV=production bun build ./index.ts --outdir ./dist --entry-naming [dir]/[name].[ext] --format esm --target browser --external react --external react-dom --external @xterm/xterm --external @xterm/addon-fit --external @xterm/addon-search --external @xterm/addon-web-links --external @xterm/addon-webgl --external @principal-ade/industry-theme --external @principal-ade/panel-framework-core --external @principal-ade/panels --external lucide-react --external clsx --external @opentelemetry/api",
63
+ "build:tools": "bun build ./src/tools/index.ts --outfile ./dist/tools.bundle.js --format esm --target browser",
64
+ "build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap",
65
+ "build:styles": "cp src/styles/terminal-theme.css dist/styles.css",
66
+ dev: "bun run build --watch",
67
+ test: "bun test",
68
+ "test:watch": "bun test --watch",
69
+ typecheck: "tsc --noEmit",
70
+ lint: "eslint . --ext .ts,.tsx",
71
+ "lint:fix": "eslint . --ext .ts,.tsx --fix",
72
+ format: "prettier --write .",
73
+ "format:check": "prettier --check .",
74
+ clean: "rm -rf dist coverage",
75
+ storybook: "storybook dev -p 6009",
76
+ "build-storybook": "storybook build"
77
+ },
78
+ keywords: [
79
+ "terminal",
80
+ "xterm",
81
+ "xterm.js",
82
+ "pty",
83
+ "theme",
84
+ "industry",
85
+ "panel",
86
+ "panel-framework",
87
+ "panel-extension"
88
+ ],
89
+ author: "Principal ADE Team",
90
+ license: "MIT",
91
+ dependencies: {
92
+ clsx: "^2.1.1",
93
+ "react-resizable-panels": "^4.7.3"
94
+ },
95
+ peerDependencies: {
96
+ "@opentelemetry/api": ">=1.8.0",
97
+ "@principal-ade/industry-theme": ">=0.1.8",
98
+ "@principal-ade/panel-framework-core": ">=0.5.1",
99
+ "@principal-ade/panel-layouts": ">=0.4.0",
100
+ "@principal-ade/panels": ">=1.0.79",
101
+ "@principal-ade/utcp-panel-event": ">=0.1.0",
102
+ "@xterm/addon-fit": ">=0.10.0",
103
+ "@xterm/addon-search": ">=0.15.0",
104
+ "@xterm/addon-web-links": ">=0.11.0",
105
+ "@xterm/addon-webgl": ">=0.18.0",
106
+ "@xterm/xterm": ">=5.5.0",
107
+ "lucide-react": ">=0.263.0",
108
+ react: ">=19.0.0",
109
+ "react-dom": ">=19.0.0"
110
+ },
111
+ peerDependenciesMeta: {
112
+ "@opentelemetry/api": {
113
+ optional: true
114
+ },
115
+ "lucide-react": {
116
+ optional: true
117
+ },
118
+ "@xterm/addon-webgl": {
119
+ optional: true
120
+ }
121
+ },
122
+ devDependencies: {
123
+ "@chromatic-com/storybook": "^4.1.3",
124
+ "@eslint/js": "^9.32.0",
125
+ "@industry-theme/agent-panels": "^0.3.0",
126
+ "@industry-theme/principal-view-panels": "0.12.79",
127
+ "@opentelemetry/api": "^1.9.0",
128
+ "@principal-ade/industry-theme": "^0.1.8",
129
+ "@principal-ade/panel-framework-core": "0.5.1",
130
+ "@principal-ade/panels": "1.0.81",
131
+ "@principal-ai/repository-abstraction": "^0.5.7",
132
+ "@principal-ai/storybook-addon-otel": "^0.3.22",
133
+ "@storybook/addon-docs": "10.1.2",
134
+ "@storybook/addon-links": "10.1.2",
135
+ "@storybook/addon-onboarding": "10.1.2",
136
+ "@storybook/react-vite": "10.1.2",
137
+ "@types/bun": "latest",
138
+ "@types/node": "^22.15.26",
139
+ "@types/react": "^19.1.12",
140
+ "@types/react-dom": "^19.1.8",
141
+ "@typescript-eslint/eslint-plugin": "^8.38.0",
142
+ "@typescript-eslint/parser": "^8.38.0",
143
+ "@vitejs/plugin-react": "^4.3.4",
144
+ "@xterm/addon-fit": "^0.10.0",
145
+ "@xterm/addon-search": "^0.15.0",
146
+ "@xterm/addon-web-links": "^0.11.0",
147
+ "@xterm/addon-webgl": "^0.18.0",
148
+ "@xterm/xterm": "^5.5.0",
149
+ esbuild: "^0.25.8",
150
+ eslint: "^9.32.0",
151
+ "eslint-config-prettier": "^10.1.8",
152
+ "eslint-import-resolver-typescript": "^4.4.4",
153
+ "eslint-plugin-import": "^2.32.0",
154
+ "eslint-plugin-react": "^7.37.2",
155
+ "eslint-plugin-react-hooks": "^5.0.0",
156
+ "eslint-plugin-storybook": "10.1.2",
157
+ "lucide-react": "^0.552.0",
158
+ prettier: "^3.6.2",
159
+ react: "^19.1.1",
160
+ "react-dom": "^19.1.1",
161
+ "react-markdown": "^10.1.0",
162
+ "remark-gfm": "^4.0.1",
163
+ storybook: "10.1.2",
164
+ typescript: "^5.0.4",
165
+ "typescript-eslint": "^8.38.0",
166
+ vite: "^6.0.7"
167
+ },
168
+ files: [
169
+ "dist",
170
+ "README.md",
171
+ "LICENSE"
172
+ ],
173
+ repository: {
174
+ type: "git",
175
+ url: "git+https://github.com/industry-theme/xterm-terminal-panel.git"
176
+ },
177
+ homepage: "https://principal-ade.com"
178
+ };
179
+
180
+ // src/telemetry.ts
181
+ var PACKAGE_VERSION = package_default.version;
36
182
  var TRACER_NAME = "@industry-theme/xterm-terminal-panel";
37
183
  var TRACER_VERSION = PACKAGE_VERSION;
38
184
  function getTracer() {
@@ -2366,6 +2512,12 @@ var TabbedTerminalPanelInner = ({
2366
2512
  onActiveTabChange?.(tabId);
2367
2513
  }
2368
2514
  }, [isControlled, onActiveTabChange]);
2515
+ const [activatedTabs, setActivatedTabs] = useState4(() => new Set);
2516
+ React3.useEffect(() => {
2517
+ if (activeTabId && !activatedTabs.has(activeTabId)) {
2518
+ setActivatedTabs((prev) => new Set(prev).add(activeTabId));
2519
+ }
2520
+ }, [activeTabId, activatedTabs]);
2369
2521
  const [sessionIds, setSessionIds] = useState4(new Map);
2370
2522
  const [scrollPositions, setScrollPositions] = useState4(new Map);
2371
2523
  const [activityStates, setActivityStates] = useState4(new Map);
@@ -2993,6 +3145,7 @@ var TabbedTerminalPanelInner = ({
2993
3145
  children: renderTerminalWithAssociation(tab, isActive, sessionId, association)
2994
3146
  }, tab.id);
2995
3147
  }
3148
+ const hasBeenActivated = activatedTabs.has(tab.id);
2996
3149
  return /* @__PURE__ */ jsx7("div", {
2997
3150
  style: {
2998
3151
  display: isActive ? "flex" : "none",
@@ -3000,7 +3153,7 @@ var TabbedTerminalPanelInner = ({
3000
3153
  height: "100%",
3001
3154
  width: "100%"
3002
3155
  },
3003
- children: customContent
3156
+ children: hasBeenActivated && customContent
3004
3157
  }, tab.id);
3005
3158
  }
3006
3159
  if (tab.contentType === "terminal") {
@@ -1 +1 @@
1
- {"version":3,"file":"TabbedTerminalPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/TabbedTerminalPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAKN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EAMZ,MAAM,gBAAgB,CAAC;AAkExB,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AA8jDD,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":"AAIA,OAAO,KAKN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EAMZ,MAAM,gBAAgB,CAAC;AAkExB,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AA+kDD,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.4";
3
+ export declare const TRACER_VERSION: string;
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>;
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,EACL,OAAO,EACP,cAAc,EACd,KAAK,MAAM,EACX,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAC;AAM5B,eAAO,MAAM,WAAW,yCAAyC,CAAC;AAClE,eAAO,MAAM,cAAc,UAAkB,CAAC;AAM9C,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAMD,wBAAgB,aAAa,IAAI,IAAI,GAAG,SAAS,CAEhD;AAMD,wBAAsB,QAAQ,CAAC,CAAC,EAC9B,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAEZ;AAKD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAE1D;AAGD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1C,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,EACL,OAAO,EACP,cAAc,EACd,KAAK,MAAM,EACX,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAC;AAM5B,eAAO,MAAM,WAAW,yCAAyC,CAAC;AAClE,eAAO,MAAM,cAAc,QAAkB,CAAC;AAM9C,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAMD,wBAAgB,aAAa,IAAI,IAAI,GAAG,SAAS,CAEhD;AAMD,wBAAsB,QAAQ,CAAC,CAAC,EAC9B,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAEZ;AAKD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAE1D;AAGD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1C,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@industry-theme/xterm-terminal-panel",
3
- "version": "0.5.23",
3
+ "version": "0.5.25",
4
4
  "description": "Industry-themed xterm.js terminal components with panel framework integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -88,10 +88,11 @@
88
88
  "@chromatic-com/storybook": "^4.1.3",
89
89
  "@eslint/js": "^9.32.0",
90
90
  "@industry-theme/agent-panels": "^0.3.0",
91
+ "@industry-theme/principal-view-panels": "0.12.79",
91
92
  "@opentelemetry/api": "^1.9.0",
92
93
  "@principal-ade/industry-theme": "^0.1.8",
93
94
  "@principal-ade/panel-framework-core": "0.5.1",
94
- "@principal-ade/panels": "^1.0.79",
95
+ "@principal-ade/panels": "1.0.81",
95
96
  "@principal-ai/repository-abstraction": "^0.5.7",
96
97
  "@principal-ai/storybook-addon-otel": "^0.3.22",
97
98
  "@storybook/addon-docs": "10.1.2",