webssh2_client 2.0.0-alpha.1 → 2.0.0-alpha.10

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/README.md CHANGED
@@ -60,11 +60,27 @@ For server setup instructions, refer to the [WebSSH2 server documentation](https
60
60
  ## Client Features
61
61
 
62
62
  - Web-based SSH client with xterm.js terminal emulation
63
+ - **Terminal Search Functionality:**
64
+ - Real-time search with live match highlighting
65
+ - Case-sensitive and regex search options
66
+ - Whole word matching
67
+ - Match counter (current/total)
68
+ - OS-aware keyboard shortcuts (Ctrl+F on Windows/Linux, ⌘F on macOS)
69
+ - Navigation with Enter/Shift+Enter or arrow buttons
70
+ - F3/Shift+F3 for quick match navigation
71
+ - **Advanced Clipboard Integration:**
72
+ - Auto-copy on selection (similar to terminals like tmux or PuTTY, configurable)
73
+ - Middle-click paste support (configurable)
74
+ - Keyboard shortcuts: Ctrl+Shift+C/V (Windows/Linux) or Cmd+Shift+C/V (macOS)
75
+ - Browser compatibility detection with fallback mechanisms
76
+ - Visual feedback with toast notifications
77
+ - All features can be toggled in Terminal Settings
63
78
  - Customizable terminal settings:
64
79
  - Font size and family
65
80
  - Color schemes
66
81
  - Cursor behavior
67
82
  - Scrollback buffer size
83
+ - Clipboard behavior controls
68
84
  - Session logging with download capability
69
85
  - Copy and paste functionality
70
86
  - Terminal mouse support
@@ -221,13 +237,20 @@ For backward compatibility, the original `headerBackground` parameter is still s
221
237
 
222
238
  ```
223
239
  # Solid Colors
224
- bg-red-600, bg-blue-500, bg-green-500, bg-yellow-500, bg-purple-500
225
- bg-slate-700, bg-gray-800
240
+ bg-red-500, bg-red-600, bg-blue-500, bg-blue-600, bg-green-500, bg-yellow-500
241
+ bg-purple-500, bg-pink-500, bg-indigo-500, bg-cyan-500, bg-emerald-500, bg-slate-700
226
242
 
227
- # Gradients (Direction + Colors)
228
- bg-gradient-to-r from-red-600 to-red-700
229
- bg-gradient-to-br from-purple-500 via-pink-500 to-yellow-400
230
- bg-gradient-to-tl from-blue-400 to-cyan-500
243
+ # Gradients (All 8 Directions Available)
244
+ bg-gradient-to-r, bg-gradient-to-l, bg-gradient-to-t, bg-gradient-to-b
245
+ bg-gradient-to-tr, bg-gradient-to-tl, bg-gradient-to-br, bg-gradient-to-bl
246
+
247
+ # Color Ranges (from/to/via)
248
+ from-red-500 to from-red-700, from-blue-500 to from-blue-700
249
+ from-green-500 to from-green-700, from-yellow-400 to from-yellow-500
250
+ from-orange-400 to from-orange-500, from-purple-500 to from-purple-600
251
+ from-indigo-500 to from-indigo-600, from-pink-500 to from-pink-600
252
+ from-cyan-400 to from-cyan-500, from-emerald-500, from-teal-500, from-slate-700
253
+ via-yellow-500, via-pink-500, via-purple-500, via-blue-500
231
254
  ```
232
255
 
233
256
  **📝 Text Styling**
@@ -235,7 +258,8 @@ bg-gradient-to-tl from-blue-400 to-cyan-500
235
258
  ```
236
259
  # Sizes: text-xs, text-sm, text-base, text-lg, text-xl, text-2xl, text-3xl, text-4xl
237
260
  # Weights: font-normal, font-medium, font-semibold, font-bold, font-black
238
- # Colors: text-white, text-black, text-yellow-100, text-red-100, text-blue-100
261
+ # Colors: text-white, text-black, text-yellow-100, text-blue-100, text-red-100, text-green-100, text-gray-100
262
+ # Alignment: text-center, text-left
239
263
 
240
264
  # Examples
241
265
  text-2xl font-bold text-white
@@ -249,6 +273,7 @@ text-4xl font-black text-yellow-100
249
273
  # Available: h-4, h-5, h-6, h-7, h-8, h-10, h-12, h-14, h-16
250
274
  # Default was h-6 (24px), now customizable
251
275
 
276
+ h-5 # Very compact header
252
277
  h-8 # Compact header
253
278
  h-12 # Standard header
254
279
  h-16 # Prominent header
@@ -262,22 +287,26 @@ animate-pulse # Pulsing effect for alerts
262
287
  animate-bounce # Bouncing for urgent notifications
263
288
 
264
289
  # Shadows
265
- shadow-md, shadow-lg, shadow-xl
290
+ shadow, shadow-md, shadow-lg, shadow-xl
266
291
 
267
292
  # Borders
268
- border-2 border-white border-dashed
269
- rounded-lg, rounded-xl
293
+ border, border-2, border-4
294
+ border-red-500, border-blue-500, border-white
295
+ border-dashed, border-solid
296
+
297
+ # Border Radius
298
+ rounded, rounded-lg, rounded-xl
270
299
  ```
271
300
 
272
301
  **📍 Layout & Positioning**
273
302
 
274
303
  ```
275
304
  # Text Alignment
276
- text-left, text-center, text-right
305
+ text-left, text-center
277
306
 
278
- # Spacing
279
- px-4, px-6 (horizontal padding)
280
- py-2, py-3 (vertical padding)
307
+ # Spacing (Padding)
308
+ px-2, px-4, px-6 (horizontal padding)
309
+ py-1, py-2, py-3 (vertical padding)
281
310
 
282
311
  # Flexbox (for complex layouts)
283
312
  flex items-center justify-center
@@ -317,10 +346,10 @@ bg-purple-600 rounded-lg h-10 font-semibold
317
346
 
318
347
  **⚡ Quick Reference:**
319
348
 
320
- - **Colors**: red, blue, green, yellow, purple, pink, cyan, emerald, slate, gray
321
- - **Shades**: 400 (lighter), 500 (medium), 600 (darker), 700 (darkest common)
349
+ - **Solid Colors**: red-500/600, blue-500/600, green-500, yellow-500, purple-500, pink-500, indigo-500, cyan-500, emerald-500, slate-700
350
+ - **Gradient Colors**: Full range 400-700 for red/blue/green, 400-500 for yellow/orange, 500-600 for purple/indigo/pink, etc.
322
351
  - **Text sizes**: xs, sm, base, lg, xl, 2xl, 3xl, 4xl
323
- - **Heights**: 4-16 (h-4 = 16px, h-16 = 64px)
352
+ - **Heights**: 4, 5, 6, 7, 8, 10, 12, 14, 16 (h-4 = 16px, h-16 = 64px)
324
353
  - **Combine freely**: `bg-blue-500 h-12 text-xl font-bold animate-pulse shadow-lg`
325
354
 
326
355
  ##### Styling System Features
@@ -338,7 +367,7 @@ The system automatically detects whether you're using:
338
367
  - **Layout:** Heights, padding, margins, flexbox
339
368
  - **Borders:** Styles, colors, radius
340
369
  - **Effects:** Shadows, animations
341
- - **Bundle Optimized:** Curated safelist keeps CSS file size reasonable (~38KB)
370
+ - **Bundle Optimized:** Curated safelist keeps CSS file size reasonable (~33KB)
342
371
 
343
372
  **Backward Compatibility:**
344
373
 
@@ -346,6 +375,53 @@ The system automatically detects whether you're using:
346
375
  - Mixed usage supported (header + headerBackground or headerStyle)
347
376
  - Graceful fallback to CSS for non-Tailwind values
348
377
 
378
+ ### Clipboard Settings
379
+
380
+ 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:
381
+
382
+ #### Features
383
+
384
+ 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)
385
+ 2. **Middle-click Paste**: Paste clipboard contents by middle-clicking in the terminal
386
+ 3. **Keyboard Shortcuts**: Use Ctrl+Shift+C to copy and Ctrl+Shift+V to paste (Cmd+Shift+C/V on macOS)
387
+
388
+ #### Configuration
389
+
390
+ Clipboard settings are stored in localStorage under `webssh2.settings.global` and can be toggled via the Terminal Settings modal:
391
+
392
+ - `clipboardAutoSelectToCopy` (default: `true`) - Enable/disable auto-copy on selection
393
+ - `clipboardEnableMiddleClickPaste` (default: `true`) - Enable/disable middle-click paste
394
+ - `clipboardEnableKeyboardShortcuts` (default: `true`) - Enable/disable keyboard shortcuts
395
+
396
+ #### Browser Compatibility
397
+
398
+ The clipboard integration includes:
399
+
400
+ - Automatic detection of browser clipboard API support
401
+ - Fallback mechanisms for older browsers
402
+ - Security context validation (HTTPS/localhost required)
403
+ - Browser-specific warnings and guidance
404
+ - Visual feedback via toast notifications for clipboard operations
405
+
406
+ #### Programmatic Configuration
407
+
408
+ You can also configure clipboard settings programmatically:
409
+
410
+ ```javascript
411
+ // Read current settings
412
+ const settings = JSON.parse(
413
+ localStorage.getItem('webssh2.settings.global') || '{}'
414
+ )
415
+
416
+ // Update clipboard settings
417
+ settings.clipboardAutoSelectToCopy = false // Disable auto-copy
418
+ settings.clipboardEnableMiddleClickPaste = true // Enable middle-click
419
+ settings.clipboardEnableKeyboardShortcuts = true // Enable shortcuts
420
+
421
+ // Save settings
422
+ localStorage.setItem('webssh2.settings.global', JSON.stringify(settings))
423
+ ```
424
+
349
425
  ### Configuration Object
350
426
 
351
427
  You can configure the client by setting `window.webssh2Config`:
package/client/index.js CHANGED
@@ -1,12 +1,14 @@
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(readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
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
+ )
9
11
  export default {
10
- getPublicPath: () => path.join(__dirname, 'public'),
11
- version: packageJson.version
12
- };
12
+ getPublicPath: () => path.join(__dirname, 'public'),
13
+ version: packageJson.version
14
+ }
@@ -1,4 +1,4 @@
1
- <!-- Version Version 2.0.0-alpha.1 - 2025-09-07T02:20:37.207Z - 5a009ff -->
1
+ <!-- Version Version 2.0.0-alpha.10 - 2025-09-14T02:54:32.512Z - bdd0d00 -->
2
2
  <!-- webssh2-client -->
3
3
  <!-- /client/src/client.htm -->
4
4
  <!DOCTYPE html>
@@ -14,6 +14,9 @@
14
14
  color: #f5f5f5 !important;
15
15
  }
16
16
  </style>
17
+ <script>
18
+ window.webssh2Config = null;
19
+ </script>
17
20
  <script type="module" crossorigin src="./webssh2.bundle.js"></script>
18
21
  <link rel="stylesheet" crossorigin href="./webssh2.css">
19
22
  </head>