instaui 0.1.17__py2.py3-none-any.whl → 0.1.18__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.
instaui/ui/__init__.py CHANGED
@@ -54,12 +54,12 @@ __all__ = [
54
54
  "watch",
55
55
  "vue_watch",
56
56
  "js_watch",
57
+ "js_fn",
57
58
  "TWatchState",
58
59
  "match",
59
60
  "column",
60
61
  "experimental",
61
62
  "skip_output",
62
- "js_output",
63
63
  "str_format",
64
64
  "on_page_request_lifespan",
65
65
  "webview",
@@ -122,7 +122,6 @@ from instaui.watch.js_watch import js_watch
122
122
  from instaui.handlers.watch_handler import WatchState as TWatchState
123
123
  from instaui.skip import skip_output
124
124
  from instaui.ui_functions.input_slient_data import InputSilentData as slient
125
- from instaui.js.js_output import JsOutput as js_output
126
125
  import instaui.experimental as experimental
127
126
 
128
127
  from instaui.ui_functions.server import create_server as server
@@ -132,6 +131,7 @@ from instaui.ui_functions.ui_types import TBindable, is_bindable
132
131
 
133
132
  from .events import on_page_request_lifespan
134
133
  from instaui.extra_libs._import_error import show_error # noqa: E402, F401
134
+ from instaui.js.fn import JsFn as js_fn
135
135
 
136
136
  # -- dynamic imports
137
137
  from instaui.systems.module_system import LazyModule as _LazyModule
instaui/ui/__init__.pyi CHANGED
@@ -54,12 +54,12 @@ __all__ = [
54
54
  "watch",
55
55
  "vue_watch",
56
56
  "js_watch",
57
+ "js_fn",
57
58
  "TWatchState",
58
59
  "match",
59
60
  "column",
60
61
  "experimental",
61
62
  "skip_output",
62
- "js_output",
63
63
  "str_format",
64
64
  "on_page_request_lifespan",
65
65
  "webview",
@@ -122,7 +122,6 @@ from instaui.watch.js_watch import js_watch
122
122
  from instaui.handlers.watch_handler import WatchState as TWatchState
123
123
  from instaui.skip import skip_output
124
124
  from instaui.ui_functions.input_slient_data import InputSilentData as slient
125
- from instaui.js.js_output import JsOutput as js_output
126
125
  import instaui.experimental as experimental
127
126
 
128
127
  from instaui.ui_functions.server import create_server as server
@@ -132,6 +131,7 @@ from instaui.ui_functions.ui_types import TBindable, is_bindable
132
131
 
133
132
  from .events import on_page_request_lifespan
134
133
  from instaui.extra_libs._import_error import show_error # noqa: E402, F401
134
+ from instaui.js.fn import JsFn as js_fn
135
135
 
136
136
  # -- dynamic imports
137
137
  from instaui.components.markdown.markdown import Markdown as markdown
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: instaui
3
- Version: 0.1.17
3
+ Version: 0.1.18
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
@@ -183,11 +183,9 @@ instaui/fastapi_server/watch_router.py,sha256=KC8AbGNpH2x11PHQMPgc9N5WOlqW05i6r0
183
183
  instaui/handlers/_utils.py,sha256=uO7WgbNhrykJwDwSEXQxsqsuCR37nx8ehL_urXm-Tks,2830
184
184
  instaui/handlers/event_handler.py,sha256=hjxi_nDh0yjk9EmRgew1USXk-Egd4pR8YnUiOcJbbnc,1761
185
185
  instaui/handlers/watch_handler.py,sha256=Ay4lubEdRnZcWSqWLwxQyS_uWiF0gu-E9PrNGCAHvL0,1600
186
- instaui/js/__init__.py,sha256=oIYLPskHpQf8a4SWHLX4DyKjrlDrqWaqbNksIQsLBoA,69
187
- instaui/js/js_output.py,sha256=a4tZ99P19oen4510qI9LWX6pX0-lH5y37v8va6UY62Y,382
188
- instaui/js/lambda_func.py,sha256=ulCJ1lzF4h3jGihVTwltS3xEDPbTegjzIN8Al7U4Ank,1004
186
+ instaui/js/fn.py,sha256=3y5nQvEjQtsaFYfTcS1-1v5b4bM20NLkk0HFl_3fewE,1186
189
187
  instaui/runtime/__init__.py,sha256=4aYTDsKaloRMQns8ttdfSx5xLmcN0Ot6tMqELbjIDZg,667
190
- instaui/runtime/_app.py,sha256=tF2rb_4SC6cMYTriDYUKRfroAK6tn5PFLEEXyogClmI,7340
188
+ instaui/runtime/_app.py,sha256=d1IM2Ul3tDuyQPYjk4DUaxqeufuCORytCTcWtlQ0IB4,7728
191
189
  instaui/runtime/_inner_helper.py,sha256=Aw7S_KtCuOlpd8NP2RuQvNTL1GJtpxQGLsKdc3VXQFY,326
192
190
  instaui/runtime/_link_manager.py,sha256=sVdqm3gdCl6i9UXa8WwckfYVf1vmESm7hvdagT_-OZI,2271
193
191
  instaui/runtime/context.py,sha256=MXwyKnX1X13peHOUbYzwAMflaA1WoQrNkGbi5C_0ErU,1086
@@ -211,9 +209,9 @@ instaui/spa_router/_router_param_var.py,sha256=KCy54xBZxGMqLO3Zlbzr6XV8ts-M6jCOK
211
209
  instaui/spa_router/_types.py,sha256=KuGuv5C6qivwllfdmV5qrvM0S_GWJ6u8OOTkCNmJImU,81
212
210
  instaui/spa_router/templates/page_routes,sha256=8VjM_8f6pjFb01QbU9z5HNqpcNRdCiX3X0OqNHLq8fo,1355
213
211
  instaui/static/insta-ui.css,sha256=EFA-_5bytZzwbe9w_kaAskE-bpdtwKbBRAyS4iw7NvU,292
214
- instaui/static/insta-ui.esm-browser.prod.js,sha256=03mpt5Q9ltVW5AHGgXjJpsE83-xXj-ZZYwINcF0gpzk,109952
212
+ instaui/static/insta-ui.esm-browser.prod.js,sha256=s5IwKwBd98i4ODQqWp0N7dmDygVpNYVuhjLqO4Xtkls,109777
215
213
  instaui/static/insta-ui.ico,sha256=08FJg4qWolvOjfodoh8IJLStslrvd8sDyuRcTUDq5ak,1150
216
- instaui/static/insta-ui.js.map,sha256=c9H_5BPV7SSjK1RHxWAc2TKYx0pFFbLcw08VRrCqu-U,664247
214
+ instaui/static/insta-ui.js.map,sha256=WjZjtDKfAbGC70HNJVfnAxq2k7eqr-ni3x4UAhQyREk,663314
217
215
  instaui/static/instaui-tools-browser.js,sha256=cLHKNXYaYMZriMxV-yKGAHTrHSdNRUlDVZmv6uc6mMw,14455
218
216
  instaui/static/vue.esm-browser.prod.js,sha256=vwQkXANuVYQuEFc0VgiokJdhNyMmvxMKyb1FmrYrNb4,162662
219
217
  instaui/static/vue.global.prod.js,sha256=YO-UVLcXWjFOKfGU2uRrIMYpliGY2y48OmEjV464Z7M,157933
@@ -238,8 +236,8 @@ instaui/template/env.py,sha256=ZqVsqpfSY1mupbgpBSkvOJytNui8xfNR5kNNC9rv4Ps,150
238
236
  instaui/template/web_template.py,sha256=BmZY13q4E_ZP4YVgfBKbbXvPHcGZfOl2f54wp_0DjJA,1603
239
237
  instaui/template/webview_template.py,sha256=rd51iPi600QOPQ9PMjgYk61oIxn3L2p3_sJ3eBPG_24,1557
240
238
  instaui/template/zero_template.py,sha256=E88VGsyjb1qbHFJlMW-xmLRFkwUXZA7VDoZ_Jd8YubA,3514
241
- instaui/ui/__init__.py,sha256=e8GJWNB8HXMWlqqp4hGuRCWii5HcgyxXnyH4F8O7B64,4795
242
- instaui/ui/__init__.pyi,sha256=8LwGzW1nFLd5bSKi25rrB47TMXdpomcWF31L0zx6blY,4875
239
+ instaui/ui/__init__.py,sha256=LwgVJIsEY4vOkAyWq5v_CyQrJKVAP2OCcj2nUMUGsMM,4776
240
+ instaui/ui/__init__.pyi,sha256=I5nfskP87QjdEwo7DF-ncXOp2pZ0TPCvWbkrirKin9U,4856
243
241
  instaui/ui/events.py,sha256=lfhiINwn-Kh0MezsSeLJPttWm6G1aWiwyk3TRo0NrlA,809
244
242
  instaui/ui_functions/input_slient_data.py,sha256=0A5DegIt_MqdZgbj1RiVFNmB_RUqgov9FYtkw6VX0DE,511
245
243
  instaui/ui_functions/server.py,sha256=B4w8KwBUMGStY19uUG8E4vRG7-L4cedttLkh35xr698,357
@@ -282,7 +280,7 @@ instaui/webview/resource.py,sha256=kFT6N5UZK5GLE0KmW3TrEYDNlViw9DL2OshRh41wBXs,5
282
280
  instaui/zero/__init__.py,sha256=N0LuRUAcaurxHSspcEDuwZg62W2S3qL4VtrMKxOivBE,49
283
281
  instaui/zero/func.py,sha256=8cA_wJMtRmoAARjWY8yY5MmLXDAQ7hyVW6f1Vbejtoc,3576
284
282
  instaui/zero/scope.py,sha256=HGohYOqnpRGVkkoz_gvR6-DgCc48AtJAcDwbOnnGHLM,3753
285
- instaui-0.1.17.dist-info/METADATA,sha256=rCiN5ssW1cIw_eNgbt6JzB1cKlI1qcFE_8aR2I5YmO8,3562
286
- instaui-0.1.17.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
287
- instaui-0.1.17.dist-info/licenses/LICENSE,sha256=_JjnAWrikJ6qkwT7PazeFNRlcIu8q_RH3mYcHTxEF5c,1094
288
- instaui-0.1.17.dist-info/RECORD,,
283
+ instaui-0.1.18.dist-info/METADATA,sha256=XO-j_gf1pr-Btqvih-8_V4P2OH94bGWp9sfIz2Oaez4,3562
284
+ instaui-0.1.18.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
285
+ instaui-0.1.18.dist-info/licenses/LICENSE,sha256=_JjnAWrikJ6qkwT7PazeFNRlcIu8q_RH3mYcHTxEF5c,1094
286
+ instaui-0.1.18.dist-info/RECORD,,
instaui/js/__init__.py DELETED
@@ -1,4 +0,0 @@
1
- from .lambda_func import LambdaFunc as func
2
-
3
-
4
- __all__ = ["func"]
instaui/js/js_output.py DELETED
@@ -1,15 +0,0 @@
1
- from instaui.common.jsonable import Jsonable
2
- from instaui.vars.mixin_types.py_binding import CanOutputMixin
3
-
4
-
5
- class JsOutput(Jsonable, CanOutputMixin):
6
- def __init__(self):
7
- self.type = "jsOutput"
8
-
9
- def _to_output_config(self):
10
- return self._to_json_dict()
11
-
12
- def _to_json_dict(self):
13
- data = super()._to_json_dict()
14
-
15
- return data
instaui/js/lambda_func.py DELETED
@@ -1,35 +0,0 @@
1
- from typing import Dict
2
- from instaui.common.jsonable import Jsonable
3
- from instaui.vars.mixin_types.element_binding import ElementBindingMixin
4
-
5
-
6
- class LambdaFunc(Jsonable, ElementBindingMixin):
7
- def __init__(
8
- self, code: str, *, bindings: Dict[str, ElementBindingMixin], computed=False
9
- ):
10
- self.code = code
11
- self.type = "js"
12
- self._bindings = bindings
13
- self._computed = computed
14
-
15
- def _to_binding_config(self) -> Dict:
16
- return self._to_json_dict()
17
-
18
- def _to_js_binding_config(self):
19
- return self._to_json_dict()
20
-
21
- def _to_element_binding_config(self):
22
- return self._to_json_dict()
23
-
24
- def _to_json_dict(self):
25
- data = super()._to_json_dict()
26
-
27
- if self._bindings:
28
- data["bind"] = {
29
- k: v._to_element_binding_config() for k, v in self._bindings.items()
30
- }
31
-
32
- if self._computed is True:
33
- data["ext"] = ["cpt"]
34
-
35
- return data