tasmota-webserial-esptool 7.0.1 → 7.2.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/README.md CHANGED
@@ -8,7 +8,7 @@ WebSerial ESPTool is **not** based on esptool.js
8
8
  ## Local development
9
9
 
10
10
  - Clone this repository.
11
- - Install dependencies with `yarn`
11
+ - Install dependencies with `npm install`
12
12
  - Run `script/develop`
13
13
  - Open http://localhost:5004/
14
14
 
package/css/style.css CHANGED
@@ -70,6 +70,24 @@
70
70
  color: #000;
71
71
  }
72
72
 
73
+ .header button.highlight {
74
+ background-color: #ff6b00;
75
+ border-color: #ff6b00;
76
+ color: #fff;
77
+ animation: pulse 1.5s infinite;
78
+ }
79
+
80
+ @keyframes pulse {
81
+ 0%, 100% {
82
+ transform: scale(1);
83
+ box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.7);
84
+ }
85
+ 50% {
86
+ transform: scale(1.05);
87
+ box-shadow: 0 0 0 10px rgba(255, 107, 0, 0);
88
+ }
89
+ }
90
+
73
91
  .header select {
74
92
  height: 30px;
75
93
  }
@@ -550,3 +568,80 @@ div.clear {
550
568
  .center {
551
569
  text-align: center;
552
570
  }
571
+
572
+ /* ESP32-S2 Reconnect Modal */
573
+ .modal {
574
+ display: flex;
575
+ position: fixed;
576
+ z-index: 9999;
577
+ left: 0;
578
+ top: 0;
579
+ width: 100%;
580
+ height: 100%;
581
+ background-color: rgba(0, 0, 0, 0.7);
582
+ align-items: center;
583
+ justify-content: center;
584
+ }
585
+
586
+ .modal.hidden {
587
+ display: none;
588
+ }
589
+
590
+ .modal-content {
591
+ background-color: #fff;
592
+ padding: 40px;
593
+ border-radius: 15px;
594
+ box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
595
+ text-align: center;
596
+ max-width: 500px;
597
+ animation: modalSlideIn 0.3s ease-out;
598
+ }
599
+
600
+ @keyframes modalSlideIn {
601
+ from {
602
+ transform: translateY(-50px);
603
+ opacity: 0;
604
+ }
605
+ to {
606
+ transform: translateY(0);
607
+ opacity: 1;
608
+ }
609
+ }
610
+
611
+ .modal-content h2 {
612
+ color: #4a4a4a;
613
+ margin-top: 0;
614
+ font-size: 24px;
615
+ margin-bottom: 20px;
616
+ }
617
+
618
+ .modal-content p {
619
+ font-size: 16px;
620
+ line-height: 1.6;
621
+ margin: 15px 0;
622
+ color: #333;
623
+ }
624
+
625
+ .modal-button {
626
+ background-color: #fff;
627
+ color: #6b6b6b;
628
+ border: 2px solid #6b6b6b;
629
+ padding: 12px 40px;
630
+ font-size: 18px;
631
+ font-weight: 600;
632
+ border-radius: 25px;
633
+ cursor: pointer;
634
+ margin-top: 20px;
635
+ transition: background-color 0.2s, color 0.2s, border-color 0.2s;
636
+ display: inline-flex;
637
+ align-items: center;
638
+ justify-content: center;
639
+ line-height: normal;
640
+ text-align: center;
641
+ }
642
+
643
+ .modal-button:hover {
644
+ background-color: #71ae1e;
645
+ color: #fff;
646
+ border-color: #71ae1e;
647
+ }
package/dist/const.js CHANGED
@@ -244,30 +244,6 @@ export const CHIP_DETECT_MAGIC_VALUES = {
244
244
  0xfff0c101: { name: "ESP8266", family: CHIP_FAMILY_ESP8266 },
245
245
  0x00f01d83: { name: "ESP32", family: CHIP_FAMILY_ESP32 },
246
246
  0x000007c6: { name: "ESP32-S2", family: CHIP_FAMILY_ESP32S2 },
247
- 0x9: { name: "ESP32-S3", family: CHIP_FAMILY_ESP32S3 },
248
- 0x0c21e06f: { name: "ESP32-C2", family: CHIP_FAMILY_ESP32C2 },
249
- 0x6f51306f: { name: "ESP32-C2", family: CHIP_FAMILY_ESP32C2 },
250
- 0x7c41a06f: { name: "ESP32-C2", family: CHIP_FAMILY_ESP32C2 },
251
- 0x1b31506f: { name: "ESP32-C3", family: CHIP_FAMILY_ESP32C3 },
252
- 0x4361606f: { name: "ESP32-C3", family: CHIP_FAMILY_ESP32C3 },
253
- 0x4881606f: { name: "ESP32-C3", family: CHIP_FAMILY_ESP32C3 },
254
- 0x6921506f: { name: "ESP32-C3", family: CHIP_FAMILY_ESP32C3 },
255
- 0x1101406f: { name: "ESP32-C5", family: CHIP_FAMILY_ESP32C5 },
256
- 0x5fd1406f: { name: "ESP32-C5", family: CHIP_FAMILY_ESP32C5 },
257
- 0x5c501458: { name: "ESP32-C5", family: CHIP_FAMILY_ESP32C5 },
258
- 0x63e1406f: { name: "ESP32-C5", family: CHIP_FAMILY_ESP32C5 },
259
- 0x2ce0806f: { name: "ESP32-C6", family: CHIP_FAMILY_ESP32C6 },
260
- 0x2421606f: { name: "ESP32-C61", family: CHIP_FAMILY_ESP32C61 },
261
- 0x33f0206f: { name: "ESP32-C61", family: CHIP_FAMILY_ESP32C61 },
262
- 0x4f81606f: { name: "ESP32-C61", family: CHIP_FAMILY_ESP32C61 },
263
- 0x7211606f: { name: "ESP32-C61", family: CHIP_FAMILY_ESP32C61 },
264
- 0x97e30068: { name: "ESP32-H2", family: CHIP_FAMILY_ESP32H2 },
265
- 0xd7b73e80: { name: "ESP32-H2", family: CHIP_FAMILY_ESP32H2 },
266
- // ESP32-P4 old revisions (< Rev. 300) - use magic value detection
267
- // Rev. 300+ uses IMAGE_CHIP_ID detection instead
268
- 0x0: { name: "ESP32-P4", family: CHIP_FAMILY_ESP32P4 },
269
- 0x7039ad9: { name: "ESP32-P4", family: CHIP_FAMILY_ESP32P4 },
270
- 0x0addbad0: { name: "ESP32-P4", family: CHIP_FAMILY_ESP32P4 },
271
247
  };
272
248
  // Commands supported by ESP8266 ROM bootloader
273
249
  export const ESP_FLASH_BEGIN = 0x02;
@@ -307,7 +283,7 @@ export const FLASH_READ_TIMEOUT = 100; // timeout for reading flash in ms
307
283
  * Scales timeouts which are size-specific
308
284
  */
309
285
  export const timeoutPerMb = (secondsPerMb, sizeBytes) => {
310
- let result = Math.floor(secondsPerMb * (sizeBytes / 0x1e6));
286
+ const result = Math.floor(secondsPerMb * (sizeBytes / 0x1e6));
311
287
  if (result < DEFAULT_TIMEOUT) {
312
288
  return DEFAULT_TIMEOUT;
313
289
  }
@@ -18,6 +18,8 @@ export declare class ESPLoader extends EventTarget {
18
18
  private _currentBaudRate;
19
19
  private _maxUSBSerialBaudrate?;
20
20
  private _reader?;
21
+ private _isESP32S2NativeUSB;
22
+ private _initializationSucceeded;
21
23
  constructor(port: SerialPort, logger: Logger, _parent?: ESPLoader | undefined);
22
24
  private get _inputBuffer();
23
25
  private get _totalBytesRead();
@@ -132,7 +134,7 @@ export declare class ESPLoader extends EventTarget {
132
134
  * @name flashDeflBegin
133
135
  *
134
136
  */
135
- flashDeflBegin(size?: number, compressedSize?: number, offset?: number, encrypted?: boolean): Promise<number>;
137
+ flashDeflBegin(size?: number, compressedSize?: number, offset?: number): Promise<number>;
136
138
  flashFinish(): Promise<void>;
137
139
  flashDeflFinish(): Promise<void>;
138
140
  getBootloaderOffset(): number;
@@ -199,7 +201,7 @@ declare class EspStubLoader extends ESPLoader {
199
201
  * @name memBegin (592)
200
202
  * Start downloading an application image to RAM
201
203
  */
202
- memBegin(size: number, blocks: number, blocksize: number, offset: number): Promise<any>;
204
+ memBegin(size: number, _blocks: number, _blocksize: number, offset: number): Promise<[number, number[]]>;
203
205
  /**
204
206
  * @name getEraseSize
205
207
  * depending on flash chip model the erase may take this long (maybe longer!)