poe-svelte-ui-lib 2.34.0 → 2.35.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.
Files changed (37) hide show
  1. package/README.md +12 -10
  2. package/dist/GUIRenderer/GUIRenderer.svelte +45 -4
  3. package/dist/GUIRenderer/GUIRenderer.svelte.d.ts +2 -0
  4. package/dist/WidgetFirmware/FirmwareIcon.svelte +12 -0
  5. package/dist/WidgetFirmware/FirmwareIcon.svelte.d.ts +18 -0
  6. package/dist/WidgetFirmware/README.md +140 -0
  7. package/dist/WidgetFirmware/WidgetFirmware.svelte +163 -0
  8. package/dist/WidgetFirmware/WidgetFirmware.svelte.d.ts +4 -0
  9. package/dist/WidgetFirmware/WidgetFirmwareProps.svelte +36 -0
  10. package/dist/WidgetFirmware/WidgetFirmwareProps.svelte.d.ts +9 -0
  11. package/dist/WidgetFirmware/firmware.d.ts +12 -0
  12. package/dist/WidgetFirmware/firmware.js +48 -0
  13. package/dist/busBridge.d.ts +2 -1
  14. package/dist/busBridge.js +2 -1
  15. package/dist/constructor.d.ts +2 -1
  16. package/dist/constructor.js +3 -1
  17. package/dist/defaults.js +2 -0
  18. package/dist/dictionaries/generated/poe_gui.d.ts +2 -1
  19. package/dist/dictionaries/generated/poe_gui.js +2 -1
  20. package/dist/dictionaries/poe_gui.yaml +1 -0
  21. package/dist/firmwareUpdate.d.ts +18 -0
  22. package/dist/firmwareUpdate.js +129 -0
  23. package/dist/fsTransfer.d.ts +3 -1
  24. package/dist/gui.d.ts +3 -0
  25. package/dist/gui.js +3 -0
  26. package/dist/guiViews.d.ts +2 -0
  27. package/dist/guiViews.js +2 -0
  28. package/dist/index.d.ts +5 -2
  29. package/dist/index.js +3 -0
  30. package/dist/locales/constructor.d.ts +20 -0
  31. package/dist/locales/constructor.js +12 -0
  32. package/dist/locales/i18n.js +1 -0
  33. package/dist/locales/translations.d.ts +125 -0
  34. package/dist/locales/translations.js +53 -0
  35. package/dist/registry.js +2 -0
  36. package/dist/types.d.ts +27 -0
  37. package/package.json +1 -1
@@ -325,6 +325,59 @@ const translations = {
325
325
  "widget.fs.title": { ru: "Файловая система", en: "File System", zh: "文件系统" },
326
326
  "widget.fs.path": { ru: "Путь", en: "Path", zh: "路径" },
327
327
  "widget.fs.size": { ru: "Размер", en: "Size", zh: "大小" },
328
+ "firmware.error.noBootloader": {
329
+ ru: "Загрузчик модуля не отозвался: модуль не перезагрузился или загрузчика нет",
330
+ en: "Module bootloader did not answer: the module did not restart or has no bootloader",
331
+ zh: "模块引导程序无响应:模块未重启或没有引导程序",
332
+ },
333
+ "firmware.error.timeout": { ru: "Загрузчик не ответил ({step})", en: "Bootloader did not respond ({step})", zh: "引导程序无响应({step})" },
334
+ "firmware.error.device": {
335
+ ru: "Загрузчик ответил ошибкой ({step}): {message}",
336
+ en: "Bootloader returned an error ({step}): {message}",
337
+ zh: "引导程序返回错误({step}):{message}",
338
+ },
339
+ "firmware.error.badStart": { ru: "Загрузчик не сообщил размер части", en: "Bootloader did not report the chunk size", zh: "引导程序未报告块大小" },
340
+ "firmware.error.resync": {
341
+ ru: "Части прошивки не сходятся (часть {frame})",
342
+ en: "Firmware chunks out of sync (chunk {frame})",
343
+ zh: "固件块不同步(第 {frame} 块)",
344
+ },
345
+ "firmware.error.image": { ru: "Неверный размер прошивки: {size} байт", en: "Invalid firmware size: {size} bytes", zh: "固件大小无效:{size} 字节" },
346
+ "firmware.error.hub": {
347
+ ru: "Хаб прервал обновление модуля на {percent}%",
348
+ en: "The hub aborted the module update at {percent}%",
349
+ zh: "集线器在 {percent}% 时中止了模块更新",
350
+ },
351
+ "widget.firmware.title": { ru: "Прошивка", en: "Firmware", zh: "固件" },
352
+ "widget.firmware.current": { ru: "Версия {version}", en: "Version {version}", zh: "版本 {version}" },
353
+ "widget.firmware.version": { ru: "Новая версия", en: "New version", zh: "新版本" },
354
+ "widget.firmware.update": { ru: "Обновить", en: "Update", zh: "更新" },
355
+ "widget.firmware.file": { ru: "Файл прошивки", en: "Firmware file", zh: "固件文件" },
356
+ "widget.firmware.no_versions": { ru: "Версий в каталоге нет", en: "No versions in the catalog", zh: "目录中没有版本" },
357
+ "widget.firmware.unavailable": {
358
+ ru: "Обновление прошивки доступно в облаке и в терминале",
359
+ en: "Firmware update is available in the cloud and in the terminal",
360
+ zh: "固件更新可在云端和终端中使用",
361
+ },
362
+ "widget.firmware.stage.start": { ru: "Запуск обновления", en: "Starting update", zh: "正在启动更新" },
363
+ "widget.firmware.stage.bootloader": { ru: "Перезагрузка в загрузчик", en: "Restarting into bootloader", zh: "正在重启进入引导程序" },
364
+ "widget.firmware.stage.erase": { ru: "Стирание", en: "Erasing", zh: "正在擦除" },
365
+ "widget.firmware.stage.write": { ru: "Запись {n}%", en: "Writing {n}%", zh: "正在写入 {n}%" },
366
+ "widget.firmware.stage.verify": { ru: "Проверка", en: "Verifying", zh: "正在校验" },
367
+ "widget.firmware.stage.hub": { ru: "Обновление через хаб {n}%", en: "Updating via hub {n}%", zh: "通过集线器更新 {n}%" },
368
+ "widget.firmware.done": { ru: "Готово", en: "Done", zh: "完成" },
369
+ "widget.firmware.failed": { ru: "Ошибка: {error}", en: "Error: {error}", zh: "错误:{error}" },
370
+ "widget.firmware.busy": { ru: "Уже идёт обновление прошивки", en: "A firmware update is already running", zh: "固件更新已在进行中" },
371
+ "widget.firmware.hint.version": {
372
+ ru: "Версия из каталога облака. Модуль перезагрузится в загрузчик, прошивка запишется и проверится",
373
+ en: "A version from the cloud catalog. The module restarts into its bootloader, then the firmware is written and verified",
374
+ zh: "云端目录中的版本。模块将重启进入引导程序,然后写入并校验固件",
375
+ },
376
+ "widget.firmware.hint.file": {
377
+ ru: "Выбор файла .bin сразу запускает обновление",
378
+ en: "Picking a .bin file starts the update at once",
379
+ zh: "选择 .bin 文件后立即开始更新",
380
+ },
328
381
  "widget.fs.error.timeout": { ru: "Устройство не ответило ({step})", en: "Device did not respond ({step})", zh: "设备无响应({step})" },
329
382
  "widget.fs.error.device": {
330
383
  ru: "Устройство ответило ошибкой ({step}): {message}",
package/dist/registry.js CHANGED
@@ -20,6 +20,7 @@ import WidgetDeviceInfo from "./WidgetDeviceInfo/WidgetDeviceInfo.svelte";
20
20
  import WidgetLoRa from "./WidgetLoRa/WidgetLoRa.svelte";
21
21
  import WidgetFileSystem from "./WidgetFileSystem/WidgetFileSystem.svelte";
22
22
  import WidgetStackInfo from "./WidgetStackInfo/WidgetStackInfo.svelte";
23
+ import WidgetFirmware from "./WidgetFirmware/WidgetFirmware.svelte";
23
24
  import WidgetRGBStrip from "./WidgetRGBStrip/WidgetRGBStrip.svelte";
24
25
  import WidgetPFD from "./WidgetPFD/WidgetPFD.svelte";
25
26
  import WidgetMap from "./WidgetMap/WidgetMap.svelte";
@@ -48,6 +49,7 @@ const VIEWS = {
48
49
  WidgetLoRa,
49
50
  WidgetFileSystem,
50
51
  WidgetStackInfo,
52
+ WidgetFirmware,
51
53
  WidgetRGBStrip,
52
54
  WidgetPFD,
53
55
  WidgetMap,
package/dist/types.d.ts CHANGED
@@ -32,6 +32,7 @@ export interface UIComponentPropsMap {
32
32
  WidgetLoRa: IWidgetLoRaProps;
33
33
  WidgetFileSystem: IWidgetFileSystemProps;
34
34
  WidgetStackInfo: IWidgetStackInfoProps;
35
+ WidgetFirmware: IWidgetFirmwareProps;
35
36
  WidgetRGBStrip: IWidgetRGBStripProps;
36
37
  WidgetPFD: IWidgetPFDProps;
37
38
  WidgetMap: IWidgetMapProps;
@@ -777,6 +778,32 @@ export interface IWidgetStackInfoProps {
777
778
  persistKey?: string;
778
779
  onRefresh?: () => void;
779
780
  }
781
+ export type WidgetFirmwareStage = "start" | "bootloader" | "erase" | "write" | "verify" | "hub";
782
+ export type WidgetFirmwareSource = {
783
+ VerFW: number;
784
+ } | {
785
+ file: Blob;
786
+ };
787
+ export interface IWidgetFirmwareProps {
788
+ id?: string;
789
+ wrapperClass?: string;
790
+ accent?: AccentColor;
791
+ label?: {
792
+ name?: string;
793
+ };
794
+ value?: {
795
+ DevFW?: number;
796
+ };
797
+ versions?: IOption<number>[];
798
+ accept?: string;
799
+ sources?: {
800
+ version?: boolean;
801
+ file?: boolean;
802
+ };
803
+ collapsed?: boolean;
804
+ persistKey?: string;
805
+ onUpdate?: (source: WidgetFirmwareSource, onProgress: (stage: WidgetFirmwareStage, percent: number) => void) => Promise<void>;
806
+ }
780
807
  export interface IWidgetRGBStripProps {
781
808
  id?: string;
782
809
  wrapperClass?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "2.34.0",
3
+ "version": "2.35.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Oleg-Perevyshin/ElementsUI.git"