[FL-3925] JS views finished (#4155)

* js: value destructuring and tests

* js: temporary fix to see size impact

* js_val: reduce code size 1

* i may be stupid.

* test: js_value args

* Revert "js: temporary fix to see size impact"

This reverts commit f51d726dbafc4300d3552020de1c3b8f9ecd3ac1.

* pvs: silence warnings

* style: formatting

* pvs: silence warnings?

* pvs: silence warnings??

* js_value: redesign declaration types for less code

* js: temporary fix to see size impact

* style: formatting

* pvs: fix helpful warnings

* js_value: reduce .rodata size

* pvs: fix helpful warning

* js_value: reduce code size 1

* fix build error

* style: format

* Revert "js: temporary fix to see size impact"

This reverts commit d6a46f01794132e882e03fd273dec24386a4f8ba.

* style: format

* js: move to new arg parser

* style: format

* feat: all js views done

* js, toolbox: generalize string owning

* toolbox: silence pvs warning

---------

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
Anna Antonenko
2025-09-24 23:24:28 +04:00
committed by GitHub
parent 0d5beedb01
commit d0360625d6
30 changed files with 1496 additions and 48 deletions

View File

@@ -24,24 +24,23 @@
* ### View
* In Flipper's terminology, a "View" is a fullscreen design element that
* assumes control over the entire viewport and all input events. Different
* types of views are available (not all of which are unfortunately currently
* implemented in JS):
* types of views are available:
* | View | Has JS adapter? |
* |----------------------|-----------------------|
* | `button_menu` | |
* | `button_panel` | |
* | `button_menu` | |
* | `button_panel` | |
* | `byte_input` | ✅ |
* | `dialog_ex` | ✅ (as `dialog`) |
* | `empty_screen` | ✅ |
* | `file_browser` | ✅ (as `file_picker`) |
* | `loading` | ✅ |
* | `menu` | |
* | `number_input` | |
* | `popup` | |
* | `menu` | |
* | `number_input` | |
* | `popup` | |
* | `submenu` | ✅ |
* | `text_box` | ✅ |
* | `text_input` | ✅ |
* | `variable_item_list` | |
* | `variable_item_list` | ✅ (as `vi_list`) |
* | `widget` | ✅ |
*
* In JS, each view has its own set of properties (or just "props"). The
@@ -119,6 +118,9 @@
import type { Contract } from "../event_loop";
export type Font = "primary" | "secondary" | "keyboard" | "big_numbers";
export type InputType = "press" | "release" | "short" | "long" | "repeat";
type Properties = { [K: string]: any };
export declare class View<Props extends Properties, Child> {