vuesp-components 5.3.1 → 5.3.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.3.3 — 2026-11-25
4
+
5
+ ### Added
6
+
7
+ - `SerialConsole` export menu: log (`.log`), `CSV`, `JSON` and raw RX bytes (`.bin`) — `capabilities.export`.
8
+ - `SerialConsole` sessions: the log and counters are saved to IndexedDB and restored after a page reload — `capabilities.session`. Clearing the log removes the saved session.
9
+
10
+ ## 5.3.2 — 2026-11-25
11
+
12
+ ### Added
13
+
14
+ - `SerialConsole` binary view: a `TEXT | HEX | BIN` switch, bits are shown as groups of 8 (`capabilities.binary`).
15
+ - `SerialConsole` byte inspector: click a log line to decode its bytes as `u8`, `i8`, `u16/u32` and `f32` in little and big endian (`capabilities.inspector`).
16
+ - Log lines keep a bounded copy of the raw bytes (up to 1024 per frame) for the binary view and the inspector.
17
+
3
18
  ## 5.3.1 — 2026-11-25
4
19
 
5
20
  ### Added
package/README.md CHANGED
@@ -73,6 +73,60 @@ const handleClick = () => {
73
73
  </script>
74
74
  ```
75
75
 
76
+ #### Serial console
77
+
78
+ `SerialConsole` is a ready-made terminal block: connection header, RX/TX log with
79
+ time and counters, text/HEX view, search with highlighting, pause, framing by
80
+ line or idle gap, UTF-8/CP1251, text and HEX sending, history and quick commands.
81
+ It is transport-agnostic: pass `start`, `stop`, `send` and `subscribe` callbacks.
82
+
83
+ ```vue
84
+ <template>
85
+ <SerialConsole
86
+ :status="status"
87
+ :port-label="portLabel"
88
+ :transport="transport"
89
+ locale="ru"
90
+ storage-key="my-app:serial"
91
+ :dirty="dirty"
92
+ :on-apply="applySettings"
93
+ :on-reset="resetSettings"
94
+ >
95
+ <template #header-actions>
96
+ <VSelect :model-value="baud" :items="baudItems" hide-message label="Baud rate" @change="onBaud" />
97
+ </template>
98
+ <template #settings>
99
+ <!-- host-specific port settings (parity, stop bits, ...) -->
100
+ </template>
101
+ <template #settings-extra>
102
+ <!-- optional extra blocks -->
103
+ </template>
104
+ </SerialConsole>
105
+ </template>
106
+
107
+ <script setup lang="ts">
108
+ import { ref } from 'vue'
109
+ import { SerialConsole, VSelect } from 'vuesp-components/components'
110
+ import type { ISerialConsoleTransport, TSerialConsoleStatus } from 'vuesp-components/components'
111
+
112
+ const status = ref<TSerialConsoleStatus>('disconnected')
113
+ const portLabel = ref('')
114
+ const dirty = ref(false)
115
+
116
+ const transport: ISerialConsoleTransport = {
117
+ start: async () => { /* open the port */ },
118
+ stop: async () => { /* close the port */ },
119
+ send: async (bytes) => { /* write bytes, return true on success */ return true },
120
+ subscribe: (onData) => { /* call onData(bytes) for every chunk; return unsubscribe */ return () => {} },
121
+ }
122
+ </script>
123
+ ```
124
+
125
+ The component ships its own `ru`/`en` dictionary (`locale`, or override with
126
+ `labels`), so it does not need keys in the host i18n. Available slots:
127
+ `#header-actions`, `#settings`, `#settings-actions`, `#settings-extra`,
128
+ `#toolbar-extra`, `#footer`.
129
+
76
130
  #### Buttons
77
131
 
78
132
  `VButton` has two independent axes: `variant` (look) and `color` (palette).
@@ -189,6 +243,9 @@ app.use(i18nPlugin, {
189
243
  - `VExpansion` - Expansion panel
190
244
  - `VList` - List component
191
245
 
246
+ ### Serial Components
247
+ - `SerialConsole` - Serial terminal block (log, send, search, framing, counters)
248
+
192
249
  ### App Components
193
250
  - `AppHeader` - Header with theme toggle
194
251
  - `AppNav` - Navigation menu