xterm-input-panel 1.1.0 → 1.2.1

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.
@@ -1,6 +1,6 @@
1
- import { beforeAll } from 'vitest'
2
- import { setProjectAnnotations } from 'storybook/preview-api'
3
1
  import * as rendererAnnotations from '@storybook/web-components/entry-preview'
2
+ import { setProjectAnnotations } from 'storybook/preview-api'
3
+ import { beforeAll } from 'vitest'
4
4
  import * as previewAnnotations from './preview'
5
5
 
6
6
  const annotations = setProjectAnnotations([rendererAnnotations, previewAnnotations])
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # xterm-input-panel
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fcfb701: Move terminal InputPanel entry from floating FAB to the terminal toolbar, harden InputPanel remount lifecycle recovery, and improve schema-driven workflow compatibility by removing proposal/tasks/design hard assumptions from dashboard metadata paths.
8
+
9
+ Also evolve `opsx-collab-pr-loop` into dedicated loop artifacts under `loop/*` (intake, research-plan, implementation, checkpoints) with apply tracking on `loop/checkpoints.md`.
10
+
11
+ ## 1.2.0
12
+
13
+ ### Minor Changes
14
+
15
+ - Improve terminal interaction reliability, including InputPanel state persistence and ghostty virtual cursor behavior.
16
+
3
17
  ## 1.1.0
4
18
 
5
19
  ### Minor Changes
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenSpecUI Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xterm-input-panel",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "dependencies": {
@@ -22,7 +22,7 @@
22
22
  "@storybook/web-components-vite": "^10.2.8",
23
23
  "@vitest/browser": "^4.0.18",
24
24
  "@vitest/browser-playwright": "^4.0.18",
25
- "@xterm/xterm": "6.1.0-beta.152",
25
+ "@xterm/xterm": "6.1.0-beta.167",
26
26
  "playwright": "^1.58.2",
27
27
  "storybook": "^10.2.8",
28
28
  "typescript": "^5.7.2",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "scripts": {
33
33
  "dev": "storybook dev -p 6007",
34
- "test:browser": "vitest run --config vitest.storybook.config.ts",
34
+ "test:browser": "vitest run --retry 2 --config vitest.storybook.config.ts",
35
35
  "typecheck": "tsc --noEmit"
36
36
  }
37
37
  }
@@ -16,7 +16,9 @@ const meta: Meta = {
16
16
  tags: ['autodocs'],
17
17
  decorators: [
18
18
  (story) => html`
19
- <div style="width: 400px; height: 250px; background: #1a1a1a; color: #fff; font-family: monospace;">
19
+ <div
20
+ style="width: 400px; height: 250px; background: #1a1a1a; color: #fff; font-family: monospace;"
21
+ >
20
22
  ${story()}
21
23
  </div>
22
24
  `,
@@ -56,7 +58,7 @@ export const SendInput: StoryObj = {
56
58
  sendBtn.click()
57
59
 
58
60
  // Wait for _send to complete
59
- await new Promise(resolve => setTimeout(resolve, 100))
61
+ await new Promise((resolve) => setTimeout(resolve, 100))
60
62
 
61
63
  expect(sendHandler).toHaveBeenCalledTimes(1)
62
64
  const detail = (sendHandler.mock.calls[0] as unknown[])[0] as CustomEvent
@@ -85,13 +87,15 @@ export const CtrlEnterSend: StoryObj = {
85
87
  textarea.dispatchEvent(new Event('input', { bubbles: true }))
86
88
  await tab.updateComplete
87
89
 
88
- textarea.dispatchEvent(new KeyboardEvent('keydown', {
89
- key: 'Enter',
90
- ctrlKey: true,
91
- bubbles: true,
92
- }))
90
+ textarea.dispatchEvent(
91
+ new KeyboardEvent('keydown', {
92
+ key: 'Enter',
93
+ ctrlKey: true,
94
+ bubbles: true,
95
+ })
96
+ )
93
97
 
94
- await new Promise(resolve => setTimeout(resolve, 100))
98
+ await new Promise((resolve) => setTimeout(resolve, 100))
95
99
 
96
100
  expect(sendHandler).toHaveBeenCalledTimes(1)
97
101
  const detail = (sendHandler.mock.calls[0] as unknown[])[0] as CustomEvent
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit'
1
+ import { LitElement, css, html } from 'lit'
2
2
  import { iconSend } from './icons.js'
3
3
 
4
4
  /**
@@ -10,7 +10,7 @@ import { iconSend } from './icons.js'
10
10
  export class InputMethodTab extends LitElement {
11
11
  static get properties() {
12
12
  return {
13
- _inputValue: { state: true },
13
+ value: { type: String, attribute: false },
14
14
  }
15
15
  }
16
16
 
@@ -84,15 +84,26 @@ export class InputMethodTab extends LitElement {
84
84
  }
85
85
  `
86
86
 
87
- declare _inputValue: string
87
+ declare value: string
88
88
 
89
89
  constructor() {
90
90
  super()
91
- this._inputValue = ''
91
+ this.value = ''
92
+ }
93
+
94
+ private _emitInputChange() {
95
+ this.dispatchEvent(
96
+ new CustomEvent('input-panel:input-change', {
97
+ detail: { value: this.value },
98
+ bubbles: true,
99
+ composed: true,
100
+ })
101
+ )
92
102
  }
93
103
 
94
104
  private _onInput(e: Event) {
95
- this._inputValue = (e.target as HTMLTextAreaElement).value
105
+ this.value = (e.target as HTMLTextAreaElement).value
106
+ this._emitInputChange()
96
107
  }
97
108
 
98
109
  private _onKeyDown(e: KeyboardEvent) {
@@ -104,7 +115,7 @@ export class InputMethodTab extends LitElement {
104
115
  }
105
116
 
106
117
  private _send() {
107
- const text = this._inputValue.trim()
118
+ const text = this.value.trim()
108
119
  if (!text) return
109
120
 
110
121
  // Dispatch to terminal
@@ -116,7 +127,8 @@ export class InputMethodTab extends LitElement {
116
127
  })
117
128
  )
118
129
 
119
- this._inputValue = ''
130
+ this.value = ''
131
+ this._emitInputChange()
120
132
  }
121
133
 
122
134
  render() {
@@ -124,7 +136,7 @@ export class InputMethodTab extends LitElement {
124
136
  <div class="input-area">
125
137
  <textarea
126
138
  placeholder="Type command and press Ctrl+Enter to send..."
127
- .value=${this._inputValue}
139
+ .value=${this.value}
128
140
  @input=${this._onInput}
129
141
  @keydown=${this._onKeyDown}
130
142
  ></textarea>
@@ -56,6 +56,20 @@ export const FloatingLayout: StoryObj = {
56
56
  <virtual-trackpad-tab slot="trackpad" floating></virtual-trackpad-tab>
57
57
  </input-panel>
58
58
  `,
59
+ play: async ({ canvasElement }) => {
60
+ const panel = await getLitElement(canvasElement, 'input-panel')
61
+ const dialog = panel.shadowRoot?.querySelector('.panel-dialog') as HTMLElement
62
+ expect(dialog).toBeTruthy()
63
+
64
+ const styles = getComputedStyle(dialog) as CSSStyleDeclaration & {
65
+ webkitBackdropFilter?: string
66
+ }
67
+ expect(styles.mixBlendMode).toBe('exclusion')
68
+ expect(
69
+ styles.backdropFilter.includes('blur(1px)') ||
70
+ styles.webkitBackdropFilter?.includes('blur(1px)')
71
+ ).toBe(true)
72
+ },
59
73
  }
60
74
 
61
75
  /**
@@ -200,19 +200,10 @@ export class InputPanel extends LitElement {
200
200
  position: relative;
201
201
  }
202
202
 
203
- @keyframes breathing {
204
- 0%,
205
- 100% {
206
- opacity: 0.5;
207
- }
208
- 50% {
209
- opacity: 0.05;
210
- }
211
- }
212
-
213
- /* Fix 7: breathing animation on entire panel (including toolbar) */
214
203
  :host([layout='floating']) .panel-dialog {
215
- animation: breathing 6s ease-in-out infinite;
204
+ mix-blend-mode: exclusion;
205
+ backdrop-filter: blur(1px);
206
+ -webkit-backdrop-filter: blur(1px);
216
207
  }
217
208
 
218
209
  .panel-dialog {
@@ -1,5 +1,5 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { resolvePixiTheme, cssColorToHex, blendHex } from './pixi-theme.js'
1
+ import { describe, expect, it } from 'vitest'
2
+ import { blendHex, cssColorToHex, resolvePixiTheme } from './pixi-theme.js'
3
3
 
4
4
  describe('pixi-theme', () => {
5
5
  describe('resolvePixiTheme', () => {
package/src/platform.ts CHANGED
@@ -3,9 +3,9 @@ export type PlatformMode = HostPlatform | 'auto'
3
3
 
4
4
  export function detectHostPlatform(): HostPlatform {
5
5
  const platformSource = (
6
- (navigator as Navigator & { userAgentData?: { platform?: string } }).userAgentData?.platform
7
- ?? navigator.platform
8
- ?? navigator.userAgent
6
+ (navigator as Navigator & { userAgentData?: { platform?: string } }).userAgentData?.platform ??
7
+ navigator.platform ??
8
+ navigator.userAgent
9
9
  ).toLowerCase()
10
10
 
11
11
  if (platformSource.includes('mac')) return 'macos'