webssh2_client 2.0.0-alpha.6 → 2.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Bill Church
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/README.md CHANGED
@@ -11,17 +11,13 @@ WebSSH2 Client is an HTML5 web-based terminal emulator and SSH client component.
11
11
 
12
12
  # Important Notice
13
13
 
14
- This package contains only the browser-side client component of WebSSH2. It requires a compatible WebSSH2 server to function. The server component is available at [webssh2 server](https://github.com/billchurch/webssh2/tree/bigip-server). This package is intended for advanced users who want to customize or integrate the client component independently.
15
-
16
- # Status
17
-
18
- This is an experimental refactor of the WebSSH2 v0.2.x client to function as a standalone component. It has been separated from the server-side code to facilitate customization and integration with different frameworks.
14
+ This package contains only the browser-side client component of WebSSH2. It requires a compatible WebSSH2 server to function. The server component is available at [webssh2 server](https://github.com/billchurch/webssh2). This package is intended for advanced users who want to customize or integrate the client component independently.
19
15
 
20
16
  ## Requirements
21
17
 
22
18
  - Modern web browser with JavaScript enabled
23
- - Compatible WebSSH2 server instance (v0.2.x or compatible)
24
- - Socket.IO v2.2.0 compatibility (due to server requirements)
19
+ - Compatible WebSSH2 server instance (v2.0.0 or compatible)
20
+ - Socket.IO v4.8.1 compatibility
25
21
 
26
22
  ## Installation
27
23
 
@@ -68,11 +64,19 @@ For server setup instructions, refer to the [WebSSH2 server documentation](https
68
64
  - OS-aware keyboard shortcuts (Ctrl+F on Windows/Linux, ⌘F on macOS)
69
65
  - Navigation with Enter/Shift+Enter or arrow buttons
70
66
  - F3/Shift+F3 for quick match navigation
67
+ - **Advanced Clipboard Integration:**
68
+ - Auto-copy on selection (similar to terminals like tmux or PuTTY, configurable)
69
+ - Middle-click paste support (configurable)
70
+ - Keyboard shortcuts: Ctrl+Shift+C/V (Windows/Linux) or Cmd+Shift+C/V (macOS)
71
+ - Browser compatibility detection with fallback mechanisms
72
+ - Visual feedback with toast notifications
73
+ - All features can be toggled in Terminal Settings
71
74
  - Customizable terminal settings:
72
75
  - Font size and family
73
76
  - Color schemes
74
77
  - Cursor behavior
75
78
  - Scrollback buffer size
79
+ - Clipboard behavior controls
76
80
  - Session logging with download capability
77
81
  - Copy and paste functionality
78
82
  - Terminal mouse support
@@ -367,6 +371,53 @@ The system automatically detects whether you're using:
367
371
  - Mixed usage supported (header + headerBackground or headerStyle)
368
372
  - Graceful fallback to CSS for non-Tailwind values
369
373
 
374
+ ### Clipboard Settings
375
+
376
+ The WebSSH2 client includes comprehensive clipboard integration. All clipboard features can be configured through the Terminal Settings modal (accessible from the menu) or via localStorage:
377
+
378
+ #### Features
379
+
380
+ 1. **Auto-copy on Selection**: Automatically copies selected text to the system clipboard when you select text with your mouse (similar to tmux or PuTTY)
381
+ 2. **Middle-click Paste**: Paste clipboard contents by middle-clicking in the terminal
382
+ 3. **Keyboard Shortcuts**: Use Ctrl+Shift+C to copy and Ctrl+Shift+V to paste (Cmd+Shift+C/V on macOS)
383
+
384
+ #### Configuration
385
+
386
+ Clipboard settings are stored in localStorage under `webssh2.settings.global` and can be toggled via the Terminal Settings modal:
387
+
388
+ - `clipboardAutoSelectToCopy` (default: `true`) - Enable/disable auto-copy on selection
389
+ - `clipboardEnableMiddleClickPaste` (default: `true`) - Enable/disable middle-click paste
390
+ - `clipboardEnableKeyboardShortcuts` (default: `true`) - Enable/disable keyboard shortcuts
391
+
392
+ #### Browser Compatibility
393
+
394
+ The clipboard integration includes:
395
+
396
+ - Automatic detection of browser clipboard API support
397
+ - Fallback mechanisms for older browsers
398
+ - Security context validation (HTTPS/localhost required)
399
+ - Browser-specific warnings and guidance
400
+ - Visual feedback via toast notifications for clipboard operations
401
+
402
+ #### Programmatic Configuration
403
+
404
+ You can also configure clipboard settings programmatically:
405
+
406
+ ```javascript
407
+ // Read current settings
408
+ const settings = JSON.parse(
409
+ localStorage.getItem('webssh2.settings.global') || '{}'
410
+ )
411
+
412
+ // Update clipboard settings
413
+ settings.clipboardAutoSelectToCopy = false // Disable auto-copy
414
+ settings.clipboardEnableMiddleClickPaste = true // Enable middle-click
415
+ settings.clipboardEnableKeyboardShortcuts = true // Enable shortcuts
416
+
417
+ // Save settings
418
+ localStorage.setItem('webssh2.settings.global', JSON.stringify(settings))
419
+ ```
420
+
370
421
  ### Configuration Object
371
422
 
372
423
  You can configure the client by setting `window.webssh2Config`:
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ getPublicPath: () => string;
3
+ version: string;
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
package/client/index.js CHANGED
@@ -1,14 +1,12 @@
1
1
  // client
2
2
  // client/index.ts
3
- import path from 'path'
4
- import { readFileSync } from 'fs'
5
- import { fileURLToPath } from 'url'
6
- const __filename = fileURLToPath(import.meta.url)
7
- const __dirname = path.dirname(__filename)
8
- const packageJson = JSON.parse(
9
- readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')
10
- )
3
+ import path from 'path';
4
+ import { readFileSync } from 'fs';
5
+ import { fileURLToPath } from 'url';
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
8
+ const packageJson = JSON.parse(readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
11
9
  export default {
12
- getPublicPath: () => path.join(__dirname, 'public'),
13
- version: packageJson.version
14
- }
10
+ getPublicPath: () => path.join(__dirname, 'public'),
11
+ version: packageJson.version
12
+ };
@@ -1,4 +1,4 @@
1
- <!-- Version Version 2.0.0-alpha.6 - 2025-09-07T19:18:43.996Z - 758b375 -->
1
+ <!-- Version Version 2.0.0 - 2025-09-14T21:54:12.437Z - 8125560 -->
2
2
  <!-- webssh2-client -->
3
3
  <!-- /client/src/client.htm -->
4
4
  <!DOCTYPE html>