instaui 0.2.2__py2.py3-none-any.whl → 0.3.1__py2.py3-none-any.whl

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 (45) hide show
  1. instaui/arco/components/select.py +2 -1
  2. instaui/components/component.py +3 -1
  3. instaui/components/element.py +1 -4
  4. instaui/components/match.py +20 -84
  5. instaui/components/slot.py +53 -19
  6. instaui/components/vfor.py +39 -44
  7. instaui/components/vif.py +10 -22
  8. instaui/event/js_event.py +10 -8
  9. instaui/event/vue_event.py +14 -16
  10. instaui/event/web_event.py +4 -7
  11. instaui/html_tools.py +8 -2
  12. instaui/js/fn.py +13 -10
  13. instaui/runtime/__init__.py +2 -2
  14. instaui/runtime/_app.py +43 -35
  15. instaui/runtime/scope.py +117 -33
  16. instaui/spa_router/_functions.py +4 -4
  17. instaui/spa_router/_route_model.py +6 -7
  18. instaui/spa_router/_router_output.py +5 -1
  19. instaui/spa_router/_router_param_var.py +4 -9
  20. instaui/static/insta-ui.css +1 -1
  21. instaui/static/insta-ui.esm-browser.prod.js +2267 -2364
  22. instaui/static/insta-ui.js.map +1 -1
  23. instaui/ui/__init__.py +3 -2
  24. instaui/ui/__init__.pyi +3 -2
  25. instaui/ui_functions/input_slient_data.py +4 -0
  26. instaui/vars/_types.py +14 -0
  27. instaui/vars/data.py +7 -4
  28. instaui/vars/element_ref.py +13 -10
  29. instaui/vars/event_context.py +7 -3
  30. instaui/vars/js_computed.py +4 -4
  31. instaui/vars/mixin_types/py_binding.py +33 -0
  32. instaui/vars/path_var.py +7 -0
  33. instaui/vars/ref.py +7 -2
  34. instaui/vars/slot_prop.py +22 -14
  35. instaui/vars/state.py +23 -12
  36. instaui/vars/vfor_item.py +170 -72
  37. instaui/vars/vue_computed.py +4 -4
  38. instaui/vars/web_computed.py +10 -6
  39. instaui/watch/js_watch.py +6 -6
  40. instaui/watch/vue_watch.py +25 -2
  41. instaui/watch/web_watch.py +6 -5
  42. {instaui-0.2.2.dist-info → instaui-0.3.1.dist-info}/METADATA +1 -1
  43. {instaui-0.2.2.dist-info → instaui-0.3.1.dist-info}/RECORD +45 -45
  44. {instaui-0.2.2.dist-info → instaui-0.3.1.dist-info}/WHEEL +0 -0
  45. {instaui-0.2.2.dist-info → instaui-0.3.1.dist-info}/licenses/LICENSE +0 -0
instaui/vars/vfor_item.py CHANGED
@@ -1,8 +1,9 @@
1
1
  from __future__ import annotations
2
- from typing import Dict, Generic, Tuple, TypeVar, TYPE_CHECKING, Union, cast
3
- from contextlib import contextmanager
2
+ from typing import Any, Dict, Generic, Tuple, TypeVar, Union, cast
4
3
 
5
4
  from instaui.common.jsonable import Jsonable
5
+ from instaui.runtime._app import get_current_scope
6
+ from instaui.vars._types import InputBindingType, OutputSetType
6
7
  from instaui.vars.mixin_types.element_binding import ElementBindingMixin
7
8
  from instaui.vars.mixin_types.py_binding import CanInputMixin, CanOutputMixin
8
9
  from instaui.vars.mixin_types.pathable import CanPathPropMixin
@@ -10,8 +11,6 @@ from instaui.vars.mixin_types.str_format_binding import StrFormatBindingMixin
10
11
  from instaui.vars.mixin_types.observable import ObservableMixin
11
12
  from instaui.vars.path_var import PathVar
12
13
 
13
- if TYPE_CHECKING:
14
- from instaui.components.vfor import VFor
15
14
 
16
15
  _T = TypeVar("_T")
17
16
 
@@ -33,32 +32,42 @@ class VForItemProxy(
33
32
  def __getattr__(self, name: str):
34
33
  return self._vfor_item[name]
35
34
 
35
+ @property
36
+ def __vfor_item_(self):
37
+ return super().__getattribute__("_vfor_item")
38
+
36
39
  def __getitem__(self, name):
37
- return super().__getattribute__("_vfor_item")[name]
40
+ return self.__vfor_item_[name]
38
41
 
39
42
  def _to_element_binding_config(self) -> Dict:
40
- return super().__getattribute__("_vfor_item")._to_element_binding_config()
43
+ return self.__vfor_item_._to_element_binding_config()
41
44
 
42
45
  def _to_input_config(self):
43
- return super().__getattribute__("_vfor_item")._to_input_config()
46
+ return self.__vfor_item_._to_input_config()
44
47
 
45
48
  def _to_path_prop_binding_config(self) -> Dict:
46
- return super().__getattribute__("_vfor_item")._to_path_prop_binding_config()
49
+ return self.__vfor_item_._to_path_prop_binding_config()
47
50
 
48
51
  def _to_output_config(self):
49
- return super().__getattribute__("_vfor_item")._to_output_config()
52
+ return self.__vfor_item_._to_output_config()
50
53
 
51
54
  def _to_str_format_binding(self, order: int) -> Tuple[str, str]:
52
- return super().__getattribute__("_vfor_item")._to_str_format_binding(order)
55
+ return self.__vfor_item_._to_str_format_binding(order)
53
56
 
54
57
  def _to_pathable_binding_config(self) -> Dict:
55
- return super().__getattribute__("_vfor_item")._to_pathable_binding_config()
58
+ return self.__vfor_item_._to_pathable_binding_config()
56
59
 
57
60
  def _to_observable_config(self):
58
- return super().__getattribute__("_vfor_item")._to_observable_config()
61
+ return self.__vfor_item_._to_observable_config()
59
62
 
60
63
  def _to_json_dict(self):
61
- return super().__getattribute__("_vfor_item")._to_json_dict()
64
+ return self.__vfor_item_._to_json_dict()
65
+
66
+ def _to_event_output_type(self) -> OutputSetType:
67
+ return self.__vfor_item_._to_event_output_type()
68
+
69
+ def _to_event_input_type(self) -> InputBindingType:
70
+ return self.__vfor_item_._to_event_input_type()
62
71
 
63
72
 
64
73
  class VForItem(
@@ -69,135 +78,224 @@ class VForItem(
69
78
  CanPathPropMixin,
70
79
  ElementBindingMixin[_T],
71
80
  StrFormatBindingMixin,
81
+ Jsonable,
72
82
  Generic[_T],
73
83
  ):
74
- VAR_Type = "vf"
84
+ SCOPE_TYPE = "fv"
75
85
 
76
- def __init__(self, vfor: VFor):
86
+ def __init__(self):
77
87
  super().__init__()
78
- self._vfor = vfor
88
+ scope = get_current_scope()
89
+ self.__register_info = scope.register_vfor_item_task(self)
90
+
91
+ def __getattr__(self, name: str):
92
+ return self[name]
93
+
94
+ # def __getitem__(self, name):
95
+ # return self[name]
79
96
 
80
97
  @property
81
98
  def dict_key(self):
82
- return self._vfor.current[1]
99
+ return cast(Any, VForItemKey())
83
100
 
84
101
  @property
85
102
  def dict_value(self):
86
- return self._vfor.current[0]
103
+ return self
104
+
105
+ @property
106
+ def index(self) -> int:
107
+ return cast(int, VForIndex())
87
108
 
88
109
  @property
89
- def proxy(self):
90
- return cast(_T, VForItemProxy(self))
110
+ def value(self) -> _T:
111
+ return cast(_T, self)
112
+
113
+ # @property
114
+ # def proxy(self):
115
+ # return cast(_T, VForItemProxy(self))
91
116
 
92
117
  def _to_binding_config(self) -> Union[Jsonable, Dict]:
93
- return self._to_json_dict()
118
+ return self.__to_binding_config()
94
119
 
95
120
  def _to_element_binding_config(self):
96
- return self._to_json_dict()
121
+ return self.__to_binding_config()
97
122
 
98
123
  def _to_input_config(self):
99
- return self._to_json_dict()
124
+ return self.__to_binding_config()
100
125
 
101
126
  def _to_output_config(self):
102
- return self._to_json_dict()
127
+ return self.__to_binding_config()
103
128
 
104
129
  def _to_path_prop_binding_config(self) -> Dict:
105
- return self._to_json_dict()
130
+ return self.__to_binding_config()
106
131
 
107
132
  def _to_pathable_binding_config(self) -> Dict:
108
- return self._to_json_dict()
133
+ return self.__to_binding_config()
109
134
 
110
135
  def _to_observable_config(self):
111
- return self._to_json_dict()
136
+ return self.__to_binding_config()
137
+
138
+ def __to_binding_config(self):
139
+ data: Dict = {
140
+ "sid": self.__register_info.scope_id,
141
+ "id": self.__register_info.var_id,
142
+ }
143
+
144
+ return data
112
145
 
113
146
  def _to_json_dict(self):
114
147
  data: Dict = {
115
- "type": self.VAR_Type,
116
- "fid": self._vfor._fid,
148
+ "id": self.__register_info.var_id,
117
149
  }
118
150
 
119
151
  return data
120
152
 
153
+ def _to_event_output_type(self) -> OutputSetType:
154
+ return OutputSetType.Ref
155
+
156
+ def _to_event_input_type(self) -> InputBindingType:
157
+ return InputBindingType.Ref
158
+
121
159
 
122
160
  class VForIndex(
123
161
  CanInputMixin,
124
162
  CanPathPropMixin,
125
163
  ElementBindingMixin,
126
164
  StrFormatBindingMixin,
165
+ Jsonable,
127
166
  ):
128
- def __init__(self, vfor: VFor):
167
+ SCOPE_TYPE = "fi"
168
+
169
+ def __init__(self):
129
170
  super().__init__()
130
- self._vfor = vfor
171
+ scope = get_current_scope()
172
+ self.__register_info = scope.register_vfor_index_task(self)
173
+
174
+ def __to_binding_config(self):
175
+ data: Dict = {
176
+ "sid": self.__register_info.scope_id,
177
+ "id": self.__register_info.var_id,
178
+ }
179
+
180
+ return data
131
181
 
132
182
  def _to_element_binding_config(self):
133
- return self._to_json_dict()
183
+ return self.__to_binding_config()
134
184
 
135
185
  def _to_input_config(self):
136
- return self._to_json_dict()
186
+ return self.__to_binding_config()
137
187
 
138
188
  def _to_path_prop_binding_config(self) -> Dict:
139
- return self._to_json_dict()
189
+ return self.__to_binding_config()
140
190
 
141
191
  def _to_json_dict(self):
142
192
  return {
143
- "type": "vf-i",
144
- "fid": self._vfor._fid,
193
+ "id": self.__register_info.var_id,
145
194
  }
146
195
 
196
+ def _to_event_input_type(self) -> InputBindingType:
197
+ return InputBindingType.Ref
147
198
 
148
- class VForDict(
199
+
200
+ class VForItemKey(
149
201
  CanInputMixin,
150
- CanOutputMixin,
151
- StrFormatBindingMixin,
202
+ CanPathPropMixin,
152
203
  ElementBindingMixin,
204
+ StrFormatBindingMixin,
153
205
  Jsonable,
154
206
  ):
155
- def __init__(self, vfor: VFor):
156
- self._vfor = vfor
207
+ SCOPE_TYPE = "fk"
157
208
 
158
- @property
159
- def dict_key(self):
160
- return self._vfor.current[1]
161
-
162
- @property
163
- def dict_value(self):
164
- return self._vfor.current[0]
165
-
166
- @contextmanager
167
- def with_index(self):
168
- self.__enter__()
169
- yield self, cast(int, VForIndex(self._vfor))
209
+ def __init__(self):
210
+ super().__init__()
211
+ scope = get_current_scope()
212
+ self.__register_info = scope.register_vfor_key_task(self)
170
213
 
171
- def __enter__(self):
172
- self._vfor.__enter__()
173
- return self
214
+ def __to_binding_config(self):
215
+ data: Dict = {
216
+ "sid": self.__register_info.scope_id,
217
+ "id": self.__register_info.var_id,
218
+ }
174
219
 
175
- def __exit__(self, *_) -> None:
176
- return self._vfor.__exit__(*_)
220
+ return data
177
221
 
178
- def _to_element_binding_config(self) -> Dict:
179
- return self.dict_value._to_element_binding_config()
222
+ def _to_element_binding_config(self):
223
+ return self.__to_binding_config()
180
224
 
181
225
  def _to_input_config(self):
182
- return self.dict_value._to_input_config()
226
+ return self.__to_binding_config()
183
227
 
184
- def _to_output_config(self):
185
- return self.dict_value._to_output_config()
228
+ def _to_path_prop_binding_config(self) -> Dict:
229
+ return self.__to_binding_config()
186
230
 
187
231
  def _to_json_dict(self):
188
- return self.dict_value._to_json_dict()
232
+ return {
233
+ "id": self.__register_info.var_id,
234
+ }
235
+
236
+ def _to_event_input_type(self) -> InputBindingType:
237
+ return InputBindingType.Ref
238
+
239
+
240
+ # class VForDict(
241
+ # CanInputMixin,
242
+ # CanOutputMixin,
243
+ # StrFormatBindingMixin,
244
+ # ElementBindingMixin,
245
+ # Jsonable,
246
+ # ):
247
+ # def __init__(self, vfor: VFor):
248
+ # self._vfor = vfor
249
+
250
+ # @property
251
+ # def dict_key(self):
252
+ # return self._vfor.current[0]
253
+
254
+ # @property
255
+ # def dict_value(self):
256
+ # return self._vfor.current[1]
257
+
258
+ # @contextmanager
259
+ # def with_index(self):
260
+ # self.__enter__()
261
+ # yield self, cast(int, VForIndex(self._vfor))
262
+
263
+ # def __enter__(self):
264
+ # self._vfor.__enter__()
265
+ # return self
266
+
267
+ # def __exit__(self, *_) -> None:
268
+ # return self._vfor.__exit__(*_)
269
+
270
+ # def _to_element_binding_config(self) -> Dict:
271
+ # return self.dict_value._to_element_binding_config()
272
+
273
+ # def _to_input_config(self):
274
+ # return self.dict_value._to_input_config()
275
+
276
+ # def _to_output_config(self):
277
+ # return self.dict_value._to_output_config()
278
+
279
+ # def _to_json_dict(self):
280
+ # return self.dict_value._to_json_dict()
281
+
282
+ # def _to_event_output_type(self) -> EventOutputType:
283
+ # raise ValueError("VForDict does not support output events")
284
+
285
+ # def _to_event_input_type(self) -> EventInputType:
286
+ # return EventInputType.Ref
189
287
 
190
288
 
191
- class VForWithIndex(Generic[_T]):
192
- def __init__(self, vfor: VFor[_T]):
193
- self._vfor = vfor
289
+ # class VForWithIndex(Generic[_T]):
290
+ # def __init__(self, vfor: VFor[_T]):
291
+ # self._vfor = vfor
194
292
 
195
- def __enter__(self):
196
- self._vfor.__enter__()
197
- return cast(_T, self._vfor.current.proxy), cast(int, VForIndex(self._vfor))
293
+ # def __enter__(self):
294
+ # self._vfor.__enter__()
295
+ # return cast(_T, self._vfor.current.proxy), cast(int, VForIndex(self._vfor))
198
296
 
199
- def __exit__(self, *_) -> None:
200
- return self._vfor.__exit__(*_)
297
+ # def __exit__(self, *_) -> None:
298
+ # return self._vfor.__exit__(*_)
201
299
 
202
300
 
203
301
  TVForItem = VForItem
@@ -4,6 +4,7 @@ from typing import Any, Dict, Mapping, Optional, Union
4
4
  from instaui.common.jsonable import Jsonable
5
5
 
6
6
  from instaui.runtime._app import get_current_scope
7
+ from instaui.vars._types import InputBindingType
7
8
  from instaui.vars.path_var import PathVar
8
9
  from instaui.vars.mixin_types.var_type import VarMixin
9
10
  from instaui.vars.mixin_types.element_binding import (
@@ -26,8 +27,6 @@ class VueComputed(
26
27
  StrFormatBindingMixin,
27
28
  ElementBindingMixin,
28
29
  ):
29
- BIND_TYPE = "var"
30
-
31
30
  def __init__(
32
31
  self,
33
32
  fn_code: str,
@@ -55,7 +54,6 @@ class VueComputed(
55
54
 
56
55
  def __to_binding_config(self):
57
56
  return {
58
- "type": self.BIND_TYPE,
59
57
  "id": self.__register_info.var_id,
60
58
  "sid": self.__register_info.scope_id,
61
59
  }
@@ -77,9 +75,11 @@ class VueComputed(
77
75
 
78
76
  def _to_json_dict(self):
79
77
  data = super()._to_json_dict()
80
- data["sid"] = self.__register_info.scope_id
81
78
  data["id"] = self.__register_info.var_id
82
79
  return data
83
80
 
81
+ def _to_event_input_type(self) -> InputBindingType:
82
+ return InputBindingType.Ref
83
+
84
84
 
85
85
  TVueComputed = VueComputed
@@ -15,8 +15,13 @@ from instaui.common.jsonable import Jsonable
15
15
  from instaui.runtime._app import get_app_slot, get_current_scope
16
16
  from instaui.handlers import watch_handler
17
17
 
18
+ from instaui.vars._types import InputBindingType
18
19
  from instaui.vars.path_var import PathVar
19
- from instaui.vars.mixin_types.py_binding import CanInputMixin, CanOutputMixin
20
+ from instaui.vars.mixin_types.py_binding import (
21
+ CanInputMixin,
22
+ CanOutputMixin,
23
+ outputs_to_config,
24
+ )
20
25
  from instaui.vars.mixin_types.element_binding import ElementBindingMixin
21
26
  from instaui.vars.mixin_types.pathable import CanPathPropMixin
22
27
  from instaui.vars.mixin_types.str_format_binding import StrFormatBindingMixin
@@ -41,8 +46,6 @@ class WebComputed(
41
46
  ElementBindingMixin[R],
42
47
  Generic[P, R],
43
48
  ):
44
- BIND_TYPE = "var"
45
-
46
49
  def __init__(
47
50
  self,
48
51
  func: Callable[P, R],
@@ -61,7 +64,7 @@ class WebComputed(
61
64
  self._inputs, self._is_slient_inputs, self._is_data = (
62
65
  observable_helper.analyze_observable_inputs(list(inputs or []))
63
66
  )
64
- self._outputs = [output._to_output_config() for output in extend_outputs or []]
67
+ self._outputs = outputs_to_config([output for output in extend_outputs or []])
65
68
  self._fn = func
66
69
  self._init_value = init_value
67
70
  self._evaluating = evaluating
@@ -86,7 +89,6 @@ class WebComputed(
86
89
  watch_handler.register_handler(hkey, self._fn, len(self._outputs) + 1)
87
90
 
88
91
  data["id"] = self.__register_info.var_id
89
- data["sid"] = self.__register_info.scope_id
90
92
 
91
93
  if self._inputs:
92
94
  data["inputs"] = self._inputs
@@ -117,7 +119,6 @@ class WebComputed(
117
119
 
118
120
  def __to_binding_config(self):
119
121
  return {
120
- "type": self.BIND_TYPE,
121
122
  "id": self.__register_info.var_id,
122
123
  "sid": self.__register_info.scope_id,
123
124
  }
@@ -137,6 +138,9 @@ class WebComputed(
137
138
  def _to_observable_config(self):
138
139
  return self.__to_binding_config()
139
140
 
141
+ def _to_event_input_type(self) -> InputBindingType:
142
+ return InputBindingType.Ref
143
+
140
144
 
141
145
  def web_computed(
142
146
  *,
instaui/watch/js_watch.py CHANGED
@@ -5,7 +5,7 @@ from . import _utils
5
5
  from instaui.common.jsonable import Jsonable
6
6
  from instaui.runtime._app import get_current_scope
7
7
 
8
- from instaui.vars.mixin_types.py_binding import CanOutputMixin
8
+ from instaui.vars.mixin_types.py_binding import CanOutputMixin, outputs_to_config
9
9
  from instaui.vars.mixin_types.common_type import TObservableInput
10
10
  from instaui._helper import observable_helper
11
11
 
@@ -23,14 +23,12 @@ class JsWatch(Jsonable):
23
23
  ) -> None:
24
24
  inputs = observable_helper.auto_made_inputs_to_slient(inputs, outputs)
25
25
 
26
- get_current_scope().register_js_watch(self)
27
-
28
26
  self.code = code
29
27
 
30
28
  self._inputs, self._is_slient_inputs, self._is_data = (
31
29
  observable_helper.analyze_observable_inputs(list(inputs or []))
32
30
  )
33
- self._outputs = [output._to_output_config() for output in outputs or []]
31
+ self._outputs = [output for output in outputs or []]
34
32
 
35
33
  if immediate is not True:
36
34
  self.immediate = immediate
@@ -58,7 +56,7 @@ class JsWatch(Jsonable):
58
56
  data["data"] = self._is_data
59
57
 
60
58
  if self._outputs:
61
- data["outputs"] = self._outputs
59
+ data["outputs"] = outputs_to_config(self._outputs)
62
60
 
63
61
  return data
64
62
 
@@ -107,4 +105,6 @@ def js_watch(
107
105
  ui.label(msg)
108
106
  """
109
107
 
110
- return JsWatch(code, inputs, outputs, immediate, deep, once, flush)
108
+ watch = JsWatch(code, inputs, outputs, immediate, deep, once, flush)
109
+ get_current_scope().register_js_watch(watch)
110
+ return watch
@@ -29,8 +29,6 @@ class VueWatch(Jsonable):
29
29
  once: bool = False,
30
30
  flush: Optional[_types.TFlush] = None,
31
31
  ) -> None:
32
- get_current_scope().register_vue_watch(self)
33
-
34
32
  self.code = callback
35
33
 
36
34
  if not isinstance(sources, Sequence):
@@ -75,3 +73,28 @@ class VueWatch(Jsonable):
75
73
 
76
74
  if flush is not None:
77
75
  self.flush = flush
76
+
77
+
78
+ def vue_watch(
79
+ sources: Union[Any, Sequence],
80
+ callback: str,
81
+ *,
82
+ bindings: Optional[Dict[str, Any]] = None,
83
+ immediate: bool = False,
84
+ deep: Union[bool, int] = False,
85
+ once: bool = False,
86
+ flush: Optional[_types.TFlush] = None,
87
+ ):
88
+ """ """
89
+
90
+ watch = VueWatch(
91
+ sources,
92
+ callback,
93
+ bindings=bindings,
94
+ immediate=immediate,
95
+ deep=deep,
96
+ once=once,
97
+ flush=flush,
98
+ )
99
+ get_current_scope().register_vue_watch(watch)
100
+ return watch
@@ -11,6 +11,7 @@ from instaui.handlers import watch_handler
11
11
 
12
12
  from instaui.vars.mixin_types.py_binding import (
13
13
  CanOutputMixin,
14
+ outputs_to_config,
14
15
  _assert_outputs_be_can_output_mixin,
15
16
  )
16
17
  from instaui.vars.mixin_types.common_type import TObservableInput
@@ -46,13 +47,11 @@ class WebWatch(Jsonable, typing.Generic[P, R]):
46
47
 
47
48
  inputs = observable_helper.auto_made_inputs_to_slient(inputs, outputs)
48
49
 
49
- get_current_scope().register_web_watch(self)
50
-
51
50
  self._inputs, self._is_slient_inputs, self._is_data = (
52
51
  observable_helper.analyze_observable_inputs(list(inputs or []))
53
52
  )
54
53
 
55
- self._outputs = [output._to_output_config() for output in outputs]
54
+ self._outputs = outputs
56
55
  self._fn = func
57
56
  self._immediate = immediate
58
57
  self._deep = deep
@@ -94,7 +93,7 @@ class WebWatch(Jsonable, typing.Generic[P, R]):
94
93
  data["debug"] = self._debug
95
94
 
96
95
  if self._outputs:
97
- data["outputs"] = self._outputs
96
+ data["outputs"] = outputs_to_config(self._outputs)
98
97
 
99
98
  if self._immediate is not True:
100
99
  data["immediate"] = self._immediate
@@ -179,7 +178,7 @@ def watch(
179
178
  """
180
179
 
181
180
  def wrapper(func: typing.Callable[P, R]):
182
- return WebWatch(
181
+ obj = WebWatch(
183
182
  func,
184
183
  inputs,
185
184
  outputs=outputs,
@@ -191,4 +190,6 @@ def watch(
191
190
  _debug=_debug,
192
191
  )
193
192
 
193
+ get_current_scope().register_web_watch(obj)
194
+
194
195
  return wrapper
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: instaui
3
- Version: 0.2.2
3
+ Version: 0.3.1
4
4
  Summary: insta-ui is a Python-based UI library for rapidly building user interfaces.
5
5
  Author-email: CrystalWindSnake <568166495@qq.com>
6
6
  License-Expression: MIT