instaui 0.1.1__py3-none-any.whl → 0.1.3__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/components/component.py +1 -1
- instaui/components/element.py +37 -17
- instaui/components/html/checkbox.py +0 -7
- instaui/components/html/select.py +1 -1
- instaui/components/vfor.py +1 -1
- instaui/consts.py +4 -0
- instaui/dependencies/component_dependency.py +16 -0
- instaui/dependencies/plugin_dependency.py +28 -0
- instaui/fastapi_server/debug_mode_router.py +0 -1
- instaui/fastapi_server/dependency_router.py +21 -0
- instaui/fastapi_server/resource.py +34 -0
- instaui/fastapi_server/server.py +147 -95
- instaui/html_tools.py +19 -105
- instaui/page_info.py +1 -11
- instaui/runtime/_app.py +9 -20
- instaui/runtime/resource.py +13 -48
- instaui/static/insta-ui.esm-browser.prod.js +3663 -3663
- instaui/static/insta-ui.ico +0 -0
- instaui/static/insta-ui.iife.js +29 -29
- instaui/static/templates/debug/sse.html +2 -2
- instaui/static/templates/web.html +32 -76
- instaui/static/templates/zero.html +48 -32
- instaui/systems/file_system.py +3 -14
- instaui/template/web_template.py +40 -46
- instaui/template/zero_template.py +95 -15
- instaui/ui/__init__.py +4 -5
- instaui/ui_functions/ui_page.py +3 -18
- instaui/vars/path_var.py +2 -1
- instaui/zero/func.py +115 -0
- instaui/zero/scope.py +12 -1
- instaui/zero/test.html +44 -0
- {instaui-0.1.1.dist-info → instaui-0.1.3.dist-info}/METADATA +1 -1
- {instaui-0.1.1.dist-info → instaui-0.1.3.dist-info}/RECORD +35 -32
- instaui/dependencies/__init__.py +0 -15
- instaui/dependencies/component_registrar.py +0 -82
- instaui/dependencies/installer.py +0 -5
- instaui/fastapi_server/config_router.py +0 -60
- {instaui-0.1.1.dist-info → instaui-0.1.3.dist-info}/LICENSE +0 -0
- {instaui-0.1.1.dist-info → instaui-0.1.3.dist-info}/WHEEL +0 -0
@@ -4,15 +4,15 @@ instaui/boot_info.py,sha256=2uIkRaNhuUCG6Jbyl2Gb0_1IbVxtfJ8s2j6X1XXdSk0,905
|
|
4
4
|
instaui/common/jsonable.py,sha256=efzn_IvfrsaNKjc3B3UzshoMvsqSsB-jnD2Aia8YMYM,902
|
5
5
|
instaui/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
instaui/components/column.py,sha256=IjSfrtH8Ez-DMOZWUULUpmA5s8CWl1DY1o4q0ztJCg8,608
|
7
|
-
instaui/components/component.py,sha256=
|
7
|
+
instaui/components/component.py,sha256=cfKWlhxATdvERSzsVzvLtm61f72_gblhLJXIrXLGQrk,1284
|
8
8
|
instaui/components/content.py,sha256=et3n8O-36vKRhfNl0y-5lA9pSSEM323Pc0fBMa00pkU,1088
|
9
9
|
instaui/components/directive.py,sha256=bHSOWXNhzWRVNqLXwhc_hY3R3g-JAQ5DWIqpZkI6_wI,1411
|
10
|
-
instaui/components/element.py,sha256=
|
10
|
+
instaui/components/element.py,sha256=eC7SZSM4kSdqadDc5SQsAcLq5HCdHa_KD27Qd9CZZis,15269
|
11
11
|
instaui/components/grid.py,sha256=VPqiEMbLkRukeMkHjE2fTnZdKJrbcuBLrU05TpocfL8,2403
|
12
12
|
instaui/components/html/__init__.py,sha256=seR029kPHbfCFNYawXryoJr-KXn-_B9OB2qdUwz02RM,786
|
13
13
|
instaui/components/html/_mixins.py,sha256=5dcSM9h1PswIKL6_eiqUxqW4H2OCuyNeCuRZq3gDGOc,876
|
14
14
|
instaui/components/html/button.py,sha256=lB5SYC2Q8b3dOHLBclJW8yaWBuhoe0qNhpKeEifRDJc,820
|
15
|
-
instaui/components/html/checkbox.py,sha256=
|
15
|
+
instaui/components/html/checkbox.py,sha256=29BTpovcJvrN2uQY280dn8KTyspwBBvLeKSxUv3CxjU,1066
|
16
16
|
instaui/components/html/date.py,sha256=MOodsG83JDtb_8l26QWRb7taiPHUAJI6wjt_AjSAJT0,833
|
17
17
|
instaui/components/html/div.py,sha256=fF9rBlOBIl-tDvml1DtJK9lFfFY0SBcP5bn36pluis4,167
|
18
18
|
instaui/components/html/form.py,sha256=C-QVtwX18zH8ZuVK93weGwlRWfSyTGWY_CYIdGcaslU,169
|
@@ -23,7 +23,7 @@ instaui/components/html/link.py,sha256=eNC2f-twFZUhw_rL-Ggff2Lo8NRU33oF8CfWW_9-k
|
|
23
23
|
instaui/components/html/number.py,sha256=8uS6qCJjHoWFbd7CYaNPjef_xWQIGKxTkt--0c_q-z4,1091
|
24
24
|
instaui/components/html/paragraph.py,sha256=-rK8RzLIF3X4eeDm73kallUPNZIZJ6aWDOT0oNzDs7E,440
|
25
25
|
instaui/components/html/range.py,sha256=JOLfWvQ7JhHEnGZS2pp7QrVqW9rz9zU3ujb1jSaLVxk,1508
|
26
|
-
instaui/components/html/select.py,sha256=
|
26
|
+
instaui/components/html/select.py,sha256=IgcouMeqbJmbnkTdLz-Ex2hqnz0Hw7BSkE0s-azs-2w,2427
|
27
27
|
instaui/components/html/span.py,sha256=kPqXHckL0YRWzV84ze4mAcKZPbmvalqDFtiwez_Lbyc,438
|
28
28
|
instaui/components/html/ul.py,sha256=YbP2kH0Utlwr194uvVlCNQk1Xfl-5O24nVsDHSM0dqg,545
|
29
29
|
instaui/components/match.py,sha256=B3wV1h-SkvYnX8RiMObdM2tfJb8nW2gjFxXQvNeZWWM,2774
|
@@ -31,12 +31,11 @@ instaui/components/row.py,sha256=dvLbVmXFgigBZo1OKK6fFyJdrYHPms5-EZ11PVPD23I,388
|
|
31
31
|
instaui/components/slot.py,sha256=RT0eU7wH7ffFDkl5ucfrNXB1nbsKDq688Hp920TZaoo,2287
|
32
32
|
instaui/components/transition_group.py,sha256=H9zx9NTlCoQnBArWfmxmh7CMKb5hZn8vKrFe4OFxPrE,201
|
33
33
|
instaui/components/value_element.py,sha256=Y10W4Hus-k-Og2ft2noBdVqF_Hq3x54vFdVvi1Tlf_I,1236
|
34
|
-
instaui/components/vfor.py,sha256=
|
34
|
+
instaui/components/vfor.py,sha256=6zj2-27hMNQtr5PPcCRriKxVX1YRluTWuCbwPGzoBA0,4030
|
35
35
|
instaui/components/vif.py,sha256=2E62-8J9NIlZDhvgIOuDwz0tLLb6VoJ1ji1K4okrapw,1165
|
36
|
-
instaui/consts.py,sha256=
|
37
|
-
instaui/dependencies/
|
38
|
-
instaui/dependencies/
|
39
|
-
instaui/dependencies/installer.py,sha256=xP-AiNdvJHqupeqIwsWu2rrOGT-wvWPcRyj1w7Hs0-s,91
|
36
|
+
instaui/consts.py,sha256=d9lGtEF3ykcumbFCrIJ3KHkOyGgnRDstEAnHxHWL4Y8,947
|
37
|
+
instaui/dependencies/component_dependency.py,sha256=U4CUV4dY54iW16cHsoAymC8N2H-VRzApiavpBR5heMY,486
|
38
|
+
instaui/dependencies/plugin_dependency.py,sha256=6u562ihKbiL3DE4hBrGjauS2nzYEC2glOVN0fwEVNVc,806
|
40
39
|
instaui/event/event_mixin.py,sha256=cN0Wh95e1wX183mGnGFm8BK_aEHWJ8WNx3Upy75mU_4,286
|
41
40
|
instaui/event/js_event.py,sha256=vA8fBuD7jeMU7HMsXC1b6OM3wO4phQDu149P1ZxtwhQ,1738
|
42
41
|
instaui/event/web_event.py,sha256=1_TBXYuyhZnxhV6U0D10JtUXzYBQoEDqPR9ZYTx8_Is,3208
|
@@ -44,31 +43,32 @@ instaui/experimental/__init__.py,sha256=mla0-czeN-1mBNReWSEnMLwBvERMVceQfHGAdCdl
|
|
44
43
|
instaui/experimental/debug.py,sha256=UGUWgNZ3ShanpuxfuPdx52TgQrkO9hByABYMnPZEIiE,1325
|
45
44
|
instaui/fastapi_server/_utils.py,sha256=MCqbebS4UkBOV8fp3Oy415Tvxnqi2mnMl5Eqe6yJogg,1177
|
46
45
|
instaui/fastapi_server/_uvicorn.py,sha256=n-es5ajWepXb6xF9EP0ft2lrEbsyLGWMUE7uVqpkUAs,1174
|
47
|
-
instaui/fastapi_server/
|
48
|
-
instaui/fastapi_server/
|
46
|
+
instaui/fastapi_server/debug_mode_router.py,sha256=n5i9SP300Wvji_ziuzOOVqvrl9bswj6BQ1Ka0RiVpVg,1543
|
47
|
+
instaui/fastapi_server/dependency_router.py,sha256=8OczS9OK73dbFCLUgHmm9FTtLmOQ1qLtdperPS3q4YQ,515
|
49
48
|
instaui/fastapi_server/event_router.py,sha256=_b0UNaPiwGwk7ElcF7XQnZfraPyWG2Miv9-wg-RI-PU,1648
|
50
49
|
instaui/fastapi_server/middlewares.py,sha256=XyXjdGjH5hJ47ZK8EBeOln4Db1rfRijZpEGl3xmYQqU,643
|
51
50
|
instaui/fastapi_server/request_context.py,sha256=EV5ZG4zgI_NPlTxinqO4AIREj6rbb1-HcjKCMa2Unfs,521
|
52
|
-
instaui/fastapi_server/
|
51
|
+
instaui/fastapi_server/resource.py,sha256=j7K_0MeojXdS6HSF8mLWboss1gr37ULkQR_rSpoNu-Y,929
|
52
|
+
instaui/fastapi_server/server.py,sha256=LCPFmM21cCp7UCAgGGO6TDNRXno0VdYF4n4uno5PrBA,9664
|
53
53
|
instaui/fastapi_server/watch_router.py,sha256=KC8AbGNpH2x11PHQMPgc9N5WOlqW05i6r0PTU5A35rI,1599
|
54
54
|
instaui/handlers/_utils.py,sha256=EB5mTb6flhMeuwm2Byb5jp18WqMngOuv3jC_PmycrA0,2076
|
55
55
|
instaui/handlers/computed_handler.py,sha256=vlX29BJlJ8BNVR5HJRRl_nTOyf5cFdg7YhzSnXqKtJc,1067
|
56
56
|
instaui/handlers/config_handler.py,sha256=I2Paut7lZJ-u0LXNmSgtie67APyZfEOEv8JMducYEL8,303
|
57
57
|
instaui/handlers/event_handler.py,sha256=HVeKks1Widy7OemMNxURk5L8x6-CbI3pV05ATl7OGaI,1633
|
58
58
|
instaui/handlers/watch_handler.py,sha256=LZTo6AiklHs7BqOHwCPpDKSigqOmK9kusTkbogB2-_Q,1468
|
59
|
-
instaui/html_tools.py,sha256=
|
59
|
+
instaui/html_tools.py,sha256=r_AxBDu4KgQjheqIqVSFos_eiF01sAYK7Suu__MVFnI,1318
|
60
60
|
instaui/inject.py,sha256=yaEgsySd-5EYDjb-Wn5i2-K1tsUBdZyi_ViUplgnjrQ,731
|
61
61
|
instaui/js/__init__.py,sha256=oIYLPskHpQf8a4SWHLX4DyKjrlDrqWaqbNksIQsLBoA,69
|
62
62
|
instaui/js/js_output.py,sha256=a4tZ99P19oen4510qI9LWX6pX0-lH5y37v8va6UY62Y,382
|
63
63
|
instaui/js/lambda_func.py,sha256=ulCJ1lzF4h3jGihVTwltS3xEDPbTegjzIN8Al7U4Ank,1004
|
64
64
|
instaui/launch_collector.py,sha256=_YmF3hsNWe-ZxMp_amqUBHkhB6fOuTPfX16BVwn25xg,1731
|
65
|
-
instaui/page_info.py,sha256=
|
65
|
+
instaui/page_info.py,sha256=aJtfLp2h05tCuLzxk2pZ6a9ztyxSdI-g3NBRxbqpS6E,269
|
66
66
|
instaui/runtime/__init__.py,sha256=4aYTDsKaloRMQns8ttdfSx5xLmcN0Ot6tMqELbjIDZg,667
|
67
|
-
instaui/runtime/_app.py,sha256=
|
67
|
+
instaui/runtime/_app.py,sha256=ZnZvITMel77elQjnccbcVT7y2Pinwqy8FvhHwEwv-_A,5899
|
68
68
|
instaui/runtime/_inner_helper.py,sha256=Aw7S_KtCuOlpd8NP2RuQvNTL1GJtpxQGLsKdc3VXQFY,326
|
69
69
|
instaui/runtime/context.py,sha256=MXwyKnX1X13peHOUbYzwAMflaA1WoQrNkGbi5C_0ErU,1086
|
70
70
|
instaui/runtime/dataclass.py,sha256=dr3hN4YjFXPzckRX9HR87t1-gPjT9RNq9YV-0uJnjHo,587
|
71
|
-
instaui/runtime/resource.py,sha256=
|
71
|
+
instaui/runtime/resource.py,sha256=HTEG-Ed3rv2RDIeWUJcZ-Gsx5w4OUWyzFD81hOjeIZc,1743
|
72
72
|
instaui/runtime/scope.py,sha256=CG8o3TmisLCSp6zHhj0vI4bJgEzDitUXw5ox9BNb3z4,3779
|
73
73
|
instaui/runtime/ui_state_scope.py,sha256=g48VpQj0BboooUrPr5VIWvcQoJe0bIQARMwRyVEE0I8,314
|
74
74
|
instaui/settings/__init__.py,sha256=nK_xDrlq7CPjm9x3EKsKUW5qWBg_1d-xbqAp_i5G8cc,70
|
@@ -86,32 +86,33 @@ instaui/spa_router/_router_param_var.py,sha256=KCy54xBZxGMqLO3Zlbzr6XV8ts-M6jCOK
|
|
86
86
|
instaui/spa_router/_types.py,sha256=KuGuv5C6qivwllfdmV5qrvM0S_GWJ6u8OOTkCNmJImU,81
|
87
87
|
instaui/spa_router/templates/page_routes,sha256=8VjM_8f6pjFb01QbU9z5HNqpcNRdCiX3X0OqNHLq8fo,1355
|
88
88
|
instaui/static/insta-ui.css,sha256=B0xrNK9qVoRwRXhnTT8OascdHFeUk7vtfr7VhoA23_Y,297
|
89
|
-
instaui/static/insta-ui.esm-browser.prod.js,sha256=
|
90
|
-
instaui/static/insta-ui.
|
89
|
+
instaui/static/insta-ui.esm-browser.prod.js,sha256=d-XH08dCFhTbJ97IxCFnfA8JRToJwYvdM3Z812JrnJw,108029
|
90
|
+
instaui/static/insta-ui.ico,sha256=08FJg4qWolvOjfodoh8IJLStslrvd8sDyuRcTUDq5ak,1150
|
91
|
+
instaui/static/insta-ui.iife.js,sha256=ZahZqkh_wOrxNGaAXk3MZHrE3sKvOzs1dyYq1987NPE,71885
|
91
92
|
instaui/static/insta-ui.iife.js.map,sha256=kn3azChvTCovyT0u4xg02i4DXoy97FTMsMEWMb8nPLc,646544
|
92
93
|
instaui/static/insta-ui.js.map,sha256=hEYm8Kj9veIDKyAqmvQOYIMG_uPuO0lwBpIMxy49XlQ,656435
|
93
94
|
instaui/static/tailwindcss.min.js,sha256=rR1MZFeOQv5aofD10TzUia9_YGdMGdtIPSSVT0WKR_Y,366328
|
94
|
-
instaui/static/templates/debug/sse.html,sha256
|
95
|
-
instaui/static/templates/web.html,sha256=
|
96
|
-
instaui/static/templates/zero.html,sha256=
|
95
|
+
instaui/static/templates/debug/sse.html,sha256=KPZfFRBNqKs5xEmNgMmgfFvneKXiFzMMDDHPsqebbgU,3384
|
96
|
+
instaui/static/templates/web.html,sha256=pCHoQIPUO03GX_aZ5zNjRYQC9b0GPFtoYE9P8eo5pHc,1789
|
97
|
+
instaui/static/templates/zero.html,sha256=_PHhx6uYD__tlt_bXG4j1WoZGnMBXIs2w2sU6-1zvH4,1684
|
97
98
|
instaui/static/vue.esm-browser.prod.js,sha256=vwQkXANuVYQuEFc0VgiokJdhNyMmvxMKyb1FmrYrNb4,162662
|
98
99
|
instaui/static/vue.global.prod.js,sha256=xFm6fMjbZcmCWJ-l1kx_9HiHfo5bD9dWgyB87GpOieg,157924
|
99
100
|
instaui/static/vue.runtime.esm-browser.prod.js,sha256=74FfP_s9pycfQXWAiGWx6SbjV_oJvMwZLFBkEXeW1Ek,102024
|
100
|
-
instaui/systems/file_system.py,sha256=
|
101
|
+
instaui/systems/file_system.py,sha256=q8k_mSHhldkSRYXT73T9s8zvERZZo9HL1U2-4mwau-I,163
|
101
102
|
instaui/systems/func_system.py,sha256=iEnskq2vE4TUekJhMLc9hvv-iiougkxi1qXbvSEGovs,2806
|
102
103
|
instaui/systems/js_system.py,sha256=t_r7SFPmfvTiIrxzuf1YgHyi_Oi_81W0UH_kkC5MwmM,685
|
103
104
|
instaui/systems/pydantic_system.py,sha256=qibHh4QqjLNPBzyrCkJVJwCk1dC_H8gEDYYf8Sb-5ps,691
|
104
105
|
instaui/systems/string_system.py,sha256=NzB7rgy7BZAYXAYDEWJQSvuYNui2TbLbrc9itVZGLmE,247
|
105
106
|
instaui/template/__init__.py,sha256=fuua3uCOCmhWb7Q6Sc6pUxfwlxYJTXkdWB1V2fubyyc,141
|
106
107
|
instaui/template/env.py,sha256=ZqVsqpfSY1mupbgpBSkvOJytNui8xfNR5kNNC9rv4Ps,150
|
107
|
-
instaui/template/web_template.py,sha256=
|
108
|
-
instaui/template/zero_template.py,sha256=
|
109
|
-
instaui/ui/__init__.py,sha256=
|
108
|
+
instaui/template/web_template.py,sha256=BmZY13q4E_ZP4YVgfBKbbXvPHcGZfOl2f54wp_0DjJA,1603
|
109
|
+
instaui/template/zero_template.py,sha256=CCcnY66o5sMDuk-iD42wXvF4tt_28EvJL_R1wz6ONZ0,3514
|
110
|
+
instaui/ui/__init__.py,sha256=eoKvBNUqEcScrgr0TAKmyBJX0ltkEAVIYv-yeAPzFzs,3551
|
110
111
|
instaui/ui/events.py,sha256=4OZ-qFU2S4WG0WSq0Hjh9T_GOPWyPqPSr9PZ8sjVU-M,808
|
111
112
|
instaui/ui_functions/input_slient_data.py,sha256=0A5DegIt_MqdZgbj1RiVFNmB_RUqgov9FYtkw6VX0DE,511
|
112
113
|
instaui/ui_functions/server.py,sha256=75Th_PhcbHcA9vAqrymGoZm2xNcOHMe0UZpypgbTRy8,287
|
113
114
|
instaui/ui_functions/str_format.py,sha256=ECWttA4LlNHlvdT_73wGF_I68soWNEXTP_Hosmxt-m4,1139
|
114
|
-
instaui/ui_functions/ui_page.py,sha256
|
115
|
+
instaui/ui_functions/ui_page.py,sha256=QbXIKajnDxeutf06wXn7wZ8FgELS-eXedn5HwtuDoT8,357
|
115
116
|
instaui/ui_functions/ui_types.py,sha256=J5tqFFkoZJMuoLeTqU52KNgw3kdB_IfcrhaBmyI6NAA,505
|
116
117
|
instaui/ui_functions/url_location.py,sha256=zyTAJpA-3GBBe7WAiP2IDKQxeQhu0LNgBOxwEzcDaDk,823
|
117
118
|
instaui/vars/__init__.py,sha256=yR-gU9FPEYUjWD7CS3RKT0JeAEuF2EPG99AwXFiLhAg,250
|
@@ -129,7 +130,7 @@ instaui/vars/mixin_types/pathable.py,sha256=40H5f1gCDtKs4Qor0C-moB821T7Df8DOgUcn
|
|
129
130
|
instaui/vars/mixin_types/py_binding.py,sha256=VIVSrHrjcltsP5ADKHtMSZBpi2qKyameXqoEevdfqk8,237
|
130
131
|
instaui/vars/mixin_types/str_format_binding.py,sha256=i2jXm1RKddPnGrCxEyz0tkDrBU2FfjR0EviQ0RKZsbY,257
|
131
132
|
instaui/vars/mixin_types/var_type.py,sha256=FQj1TEkjT7HopDPztt0-J6eQVGHjem3KBFsjZwvcvYg,57
|
132
|
-
instaui/vars/path_var.py,sha256=
|
133
|
+
instaui/vars/path_var.py,sha256=DOgYHoajWKcMHMKYMSBiEOA99mmHIaMH-HRDvAKTZyE,2820
|
133
134
|
instaui/vars/ref.py,sha256=WPLZiWK0SRSTo87IVhvndMCR-G3_QO9OfoP2C3VwSYs,2522
|
134
135
|
instaui/vars/slot_prop.py,sha256=qBVQ0Ze0T8-Wsy__8qEuqVESIrLX69Bmy21Kuxrg_GQ,1198
|
135
136
|
instaui/vars/state.py,sha256=N6yLcVkiyCpK5oR8C2KbggFmLwpgBgzylp11JgFiab8,2630
|
@@ -145,8 +146,10 @@ instaui/watch/js_watch.py,sha256=k9lgtyUGZ8a549QITcNie2kGbT0BJuYqfouoOex0Dqs,218
|
|
145
146
|
instaui/watch/vue_watch.py,sha256=n6yVt2ruKCjx-ZnIb29ytN9ugDas1JpUBOJeQ_FSYAA,1571
|
146
147
|
instaui/watch/web_watch.py,sha256=Gl0AZ9ji_A7tAoqsvyHmBOAYaX1CHxowVONlZKy8nd8,3763
|
147
148
|
instaui/zero/__init__.py,sha256=N0LuRUAcaurxHSspcEDuwZg62W2S3qL4VtrMKxOivBE,49
|
148
|
-
instaui/zero/
|
149
|
-
instaui
|
150
|
-
instaui
|
151
|
-
instaui-0.1.
|
152
|
-
instaui-0.1.
|
149
|
+
instaui/zero/func.py,sha256=vUqwesrhV7t134DP7LRoYaYz7Z4wjX9UF42lOfszW0g,3593
|
150
|
+
instaui/zero/scope.py,sha256=p15fZRmvvNi6prIdY2j7iUYGHxcPpK3df0A3P70-Dy4,464
|
151
|
+
instaui/zero/test.html,sha256=JYtwKaat_ePz52DXYZOrFeGI2xDaK4f0-xTdsT7zVu0,471152
|
152
|
+
instaui-0.1.3.dist-info/LICENSE,sha256=_JjnAWrikJ6qkwT7PazeFNRlcIu8q_RH3mYcHTxEF5c,1094
|
153
|
+
instaui-0.1.3.dist-info/METADATA,sha256=7pM7noB4T2L54MkkK9vYZ6lGP8Y6lbbTIUTJnoC8vs8,3474
|
154
|
+
instaui-0.1.3.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
155
|
+
instaui-0.1.3.dist-info/RECORD,,
|
instaui/dependencies/__init__.py
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
from .component_registrar import (
|
2
|
-
ComponentRegistrationInfo,
|
3
|
-
register_component,
|
4
|
-
PluginRegistrationInfo,
|
5
|
-
register_plugin,
|
6
|
-
)
|
7
|
-
from .installer import install_component
|
8
|
-
|
9
|
-
__all__ = [
|
10
|
-
"ComponentRegistrationInfo",
|
11
|
-
"register_component",
|
12
|
-
"PluginRegistrationInfo",
|
13
|
-
"register_plugin",
|
14
|
-
"install_component",
|
15
|
-
]
|
@@ -1,82 +0,0 @@
|
|
1
|
-
import inspect
|
2
|
-
from pathlib import Path
|
3
|
-
from typing import List, Optional, Type, Union
|
4
|
-
from instaui.systems.file_system import generate_hash_name_from_path
|
5
|
-
from dataclasses import dataclass, field
|
6
|
-
from instaui.runtime import get_app_slot
|
7
|
-
from instaui.runtime._app import App
|
8
|
-
|
9
|
-
|
10
|
-
class ComponentRegistrar:
|
11
|
-
def __init__(self, js_file: Path):
|
12
|
-
self.js_file = js_file
|
13
|
-
self.key = f"{generate_hash_name_from_path(js_file.parent)}/{js_file.name}"
|
14
|
-
self.name = js_file.stem
|
15
|
-
|
16
|
-
def __hash__(self) -> int:
|
17
|
-
return hash(self.js_file)
|
18
|
-
|
19
|
-
def __eq__(self, other: object) -> bool:
|
20
|
-
if not isinstance(other, ComponentRegistrar):
|
21
|
-
return False
|
22
|
-
return self.js_file == other.js_file
|
23
|
-
|
24
|
-
@classmethod
|
25
|
-
def create(cls, js_file: Union[str, Path], target_class: Type):
|
26
|
-
js_file = Path(js_file)
|
27
|
-
base = Path(inspect.getfile(target_class)).parent
|
28
|
-
if not js_file.is_absolute():
|
29
|
-
js_file = base / js_file
|
30
|
-
return cls(js_file)
|
31
|
-
|
32
|
-
|
33
|
-
@dataclass(frozen=True)
|
34
|
-
class ComponentRegistrationInfo:
|
35
|
-
name: str
|
36
|
-
esm: Optional[Path] = None
|
37
|
-
iife: Optional[Path] = None
|
38
|
-
css: List[Path] = field(default_factory=list, compare=False)
|
39
|
-
|
40
|
-
|
41
|
-
@dataclass(frozen=True)
|
42
|
-
class PluginRegistrationInfo:
|
43
|
-
name: str
|
44
|
-
esm: Optional[Path] = None
|
45
|
-
iife: Optional[Path] = None
|
46
|
-
css: List[Path] = field(default_factory=list, compare=False)
|
47
|
-
|
48
|
-
|
49
|
-
def register_plugin(
|
50
|
-
name: str,
|
51
|
-
esm: Optional[Path] = None,
|
52
|
-
iife: Optional[Path] = None,
|
53
|
-
css: Optional[Union[Path, List[Path]]] = None,
|
54
|
-
shared: bool = False,
|
55
|
-
):
|
56
|
-
css = [css] if isinstance(css, Path) else css
|
57
|
-
|
58
|
-
cr = PluginRegistrationInfo(name, esm, iife, css or [])
|
59
|
-
|
60
|
-
if shared:
|
61
|
-
App.default_plugins(cr)
|
62
|
-
|
63
|
-
get_app_slot().register_plugin(cr)
|
64
|
-
return cr
|
65
|
-
|
66
|
-
|
67
|
-
def register_component(
|
68
|
-
name: str,
|
69
|
-
esm: Optional[Path] = None,
|
70
|
-
iife: Optional[Path] = None,
|
71
|
-
css: Optional[Union[Path, List[Path]]] = None,
|
72
|
-
shared: bool = False,
|
73
|
-
):
|
74
|
-
css = [css] if isinstance(css, Path) else css
|
75
|
-
|
76
|
-
cr = ComponentRegistrationInfo(f"instaui-{name}", esm, iife, css or [])
|
77
|
-
|
78
|
-
if shared:
|
79
|
-
App.default_js_components(cr)
|
80
|
-
|
81
|
-
get_app_slot().register_component(cr)
|
82
|
-
return cr
|
@@ -1,60 +0,0 @@
|
|
1
|
-
from typing import Dict
|
2
|
-
from fastapi import FastAPI
|
3
|
-
from contextlib import contextmanager
|
4
|
-
from instaui.html_tools import to_config_data
|
5
|
-
from instaui.handlers import config_handler
|
6
|
-
from instaui.launch_collector import get_launch_collector
|
7
|
-
from . import _utils
|
8
|
-
|
9
|
-
|
10
|
-
def create_router(app: FastAPI):
|
11
|
-
_async_config_handler(app)
|
12
|
-
_sync_config_handler(app)
|
13
|
-
|
14
|
-
|
15
|
-
def _async_config_handler(app: FastAPI):
|
16
|
-
@app.post(config_handler.ASYNC_URL)
|
17
|
-
async def _(data: Dict):
|
18
|
-
key = data.get("key", None)
|
19
|
-
handler = config_handler.get_handler(key)
|
20
|
-
if handler is None:
|
21
|
-
return {"error": "event handler not found"}
|
22
|
-
|
23
|
-
_utils.update_app_page_info(data)
|
24
|
-
|
25
|
-
with _execute_request_lifespans():
|
26
|
-
await handler()
|
27
|
-
|
28
|
-
return to_config_data()
|
29
|
-
|
30
|
-
|
31
|
-
def _sync_config_handler(app: FastAPI):
|
32
|
-
@app.post(config_handler.SYNC_URL)
|
33
|
-
def _(data: Dict):
|
34
|
-
key = data.get("key", None)
|
35
|
-
|
36
|
-
handler = config_handler.get_handler(key)
|
37
|
-
if handler is None:
|
38
|
-
return {"error": "event handler not found"}
|
39
|
-
|
40
|
-
_utils.update_app_page_info(data)
|
41
|
-
|
42
|
-
with _execute_request_lifespans():
|
43
|
-
handler()
|
44
|
-
|
45
|
-
return to_config_data()
|
46
|
-
|
47
|
-
|
48
|
-
@contextmanager
|
49
|
-
def _execute_request_lifespans():
|
50
|
-
events = [iter(event()) for event in get_launch_collector().page_request_lifespans]
|
51
|
-
for event in events:
|
52
|
-
next(event)
|
53
|
-
|
54
|
-
yield
|
55
|
-
|
56
|
-
for event in events:
|
57
|
-
try:
|
58
|
-
next(event)
|
59
|
-
except StopIteration:
|
60
|
-
pass
|
File without changes
|
File without changes
|