Commit Graph

18 Commits

Author SHA1 Message Date
Talia 0e6eee28fd Make DOMState API more generic
The old interface was too specific to the way domLense works, by
assuming the value to be an array that gets mutated elsewhere (or a
proxy that behaves like one)
2024-01-15 11:48:52 +01:00
Talia eb75dc531a Remove exports from state.js 2024-01-15 11:03:11 +01:00
Talia 7be7cf0210
Change DOMState value to last static value 2024-01-10 22:47:30 +01:00
Talia 61be174b6e
Add domState class 2024-01-10 20:42:47 +01:00
Talia f199f64932 Add kebab<->camel case conversion to component state 2024-01-10 15:23:10 +01:00
Talia fb000ba7a3 Replace state from component constructor entirely 2024-01-10 13:31:42 +01:00
Talia b51732636d Add component as argument to state component constructor 2024-01-10 13:28:56 +01:00
Talia cdc56f5848
Add nested state change forwarding 2023-12-27 19:58:49 +01:00
Talia 37948987b0
Add composed states 2023-12-27 18:52:42 +01:00
Talia b7bb093a0c
Compare strings in component attributes 2023-12-27 18:50:11 +01:00
Talia 7febebce65
Map names of forward states to "value" 2023-12-27 18:50:11 +01:00
Talia 64b73676cb
Make state components update attributes on state change 2023-12-23 21:16:58 +01:00
Talia b46c5d1d5c
Fix oversights in forwarded state caching 2023-12-23 21:05:55 +01:00
Talia e80801b639
Cache forwarded states to avoid duplication 2023-12-23 17:46:43 +01:00
Talia e38d556531
Add fallback option to forwarded state 2023-12-23 17:31:45 +01:00
Talia 04ab913b72
Fix error when accessing undefined StoredState values 2023-12-22 00:59:28 +01:00
Talia ae334801d4
Add forward method do state
This returns a thin wrapper State with its value proxied to a given
attribute on the backend state.
2023-12-22 00:38:54 +01:00
Talia f1f79945dd
Add state management module
Moved over from darkwiiplayer/js project
2023-12-21 23:54:06 +01:00