instaui 0.1.3__py3-none-any.whl → 0.1.5__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 (93) hide show
  1. instaui/components/content.py +4 -4
  2. instaui/components/echarts/echarts.js +128 -0
  3. instaui/components/echarts/echarts.py +194 -0
  4. instaui/components/echarts/static/echarts.esm.min.js +45 -0
  5. instaui/components/element.py +103 -13
  6. instaui/components/html/__init__.py +31 -18
  7. instaui/components/html/_preset.py +4 -0
  8. instaui/components/html/heading.py +51 -0
  9. instaui/components/html/range.py +3 -0
  10. instaui/components/html/select.py +16 -35
  11. instaui/components/html/table.py +36 -0
  12. instaui/components/html/textarea.py +28 -0
  13. instaui/components/markdown/markdown.js +33 -0
  14. instaui/components/markdown/markdown.py +41 -0
  15. instaui/components/markdown/static/github-markdown.css +12 -0
  16. instaui/components/markdown/static/marked.esm.js +2579 -0
  17. instaui/components/shiki_code/shiki_code.js +126 -0
  18. instaui/components/shiki_code/shiki_code.py +99 -0
  19. instaui/components/shiki_code/static/langs/css.mjs +5 -0
  20. instaui/components/shiki_code/static/langs/markdown.mjs +5 -0
  21. instaui/components/shiki_code/static/langs/python.mjs +5 -0
  22. instaui/components/shiki_code/static/langs/shell.mjs +2 -0
  23. instaui/components/shiki_code/static/langs/shellscript.mjs +5 -0
  24. instaui/components/shiki_code/static/shiki-core.js +5784 -0
  25. instaui/components/shiki_code/static/shiki-style.css +175 -0
  26. instaui/components/shiki_code/static/shiki-transformers.js +461 -0
  27. instaui/components/shiki_code/static/themes/vitesse-dark.mjs +2 -0
  28. instaui/components/shiki_code/static/themes/vitesse-light.mjs +2 -0
  29. instaui/components/value_element.py +7 -3
  30. instaui/components/vfor.py +1 -1
  31. instaui/consts.py +2 -1
  32. instaui/daisyui/__init__.py +26 -0
  33. instaui/daisyui/_index.py +20 -0
  34. instaui/daisyui/button.py +38 -0
  35. instaui/daisyui/checkbox.py +17 -0
  36. instaui/daisyui/static/daisyui.css +1 -0
  37. instaui/daisyui/static/themes.css +1 -0
  38. instaui/daisyui/table.py +35 -0
  39. instaui/dependencies/component_dependency.py +11 -5
  40. instaui/event/js_event.py +1 -0
  41. instaui/event/web_event.py +6 -7
  42. instaui/fastapi_server/dependency_router.py +4 -3
  43. instaui/fastapi_server/resource.py +12 -16
  44. instaui/fastapi_server/server.py +34 -24
  45. instaui/handlers/event_handler.py +3 -1
  46. instaui/handlers/watch_handler.py +4 -0
  47. instaui/html_tools.py +44 -2
  48. instaui/inject.py +3 -3
  49. instaui/runtime/_app.py +43 -4
  50. instaui/runtime/_link_manager.py +89 -0
  51. instaui/runtime/resource.py +21 -8
  52. instaui/shadcn_classless/_index.py +42 -0
  53. instaui/shadcn_classless/static/shadcn-classless.css +403 -0
  54. instaui/spa_router/_functions.py +1 -1
  55. instaui/spa_router/_route_model.py +1 -1
  56. instaui/static/insta-ui.css +1 -1
  57. instaui/static/insta-ui.esm-browser.prod.js +1308 -1252
  58. instaui/static/insta-ui.js.map +1 -1
  59. instaui/static/instaui-tools-browser.js +511 -0
  60. instaui/static/templates/webview.html +78 -0
  61. instaui/systems/module_system.py +30 -0
  62. instaui/tailwind/__init__.py +6 -0
  63. instaui/tailwind/_index.py +24 -0
  64. instaui/{static/tailwindcss.min.js → tailwind/static/tailwindcss-v3.min.js} +62 -62
  65. instaui/tailwind/static/tailwindcss-v4.min.js +8 -0
  66. instaui/template/_utils.py +23 -0
  67. instaui/template/webview_template.py +50 -0
  68. instaui/template/zero_template.py +18 -17
  69. instaui/ui/__build_init.py +73 -0
  70. instaui/ui/__init__.py +74 -58
  71. instaui/ui/__init__.pyi +135 -0
  72. instaui/ui/events.py +1 -1
  73. instaui/ui_functions/server.py +3 -1
  74. instaui/vars/event_context.py +4 -0
  75. instaui/vars/web_computed.py +30 -30
  76. instaui/watch/web_watch.py +5 -6
  77. instaui/webview/__init__.py +1 -0
  78. instaui/webview/_utils.py +8 -0
  79. instaui/webview/api.py +72 -0
  80. instaui/webview/func.py +114 -0
  81. instaui/webview/index.py +162 -0
  82. instaui/webview/resource.py +172 -0
  83. instaui/zero/func.py +31 -23
  84. instaui/zero/scope.py +110 -4
  85. {instaui-0.1.3.dist-info → instaui-0.1.5.dist-info}/METADATA +4 -1
  86. {instaui-0.1.3.dist-info → instaui-0.1.5.dist-info}/RECORD +88 -44
  87. instaui/handlers/computed_handler.py +0 -42
  88. instaui/handlers/config_handler.py +0 -13
  89. instaui/static/insta-ui.iife.js +0 -29
  90. instaui/static/insta-ui.iife.js.map +0 -1
  91. instaui/zero/test.html +0 -44
  92. {instaui-0.1.3.dist-info → instaui-0.1.5.dist-info}/LICENSE +0 -0
  93. {instaui-0.1.3.dist-info → instaui-0.1.5.dist-info}/WHEEL +0 -0
instaui/zero/scope.py CHANGED
@@ -1,20 +1,126 @@
1
1
  from pathlib import Path
2
- from typing import Union
2
+ from typing import Dict, Optional, Union
3
3
  from instaui.runtime import new_app_slot, reset_app_slot
4
4
  from contextlib import contextmanager
5
- from .func import to_html, to_html_str
5
+ from .func import to_html, to_html_str, get_template_model
6
+ from instaui.template.zero_template import ZeroTemplateModel
6
7
 
7
8
 
8
9
  @contextmanager
9
- def scope():
10
- token = new_app_slot("zero")
10
+ def scope(app_meta: Optional[Dict] = None):
11
+ token = new_app_slot("zero", app_meta)
11
12
  yield Wrapper()
12
13
  reset_app_slot(token)
13
14
 
14
15
 
15
16
  class Wrapper:
16
17
  def to_html(self, file: Union[str, Path]):
18
+ file = self._get_caller_path(file)
17
19
  return to_html(file)
18
20
 
19
21
  def to_html_str(self):
20
22
  return to_html_str()
23
+
24
+ def to_debug_report(self, file: Union[str, Path]):
25
+ file = self._get_caller_path(file)
26
+
27
+ # Custom component dependencies must be recorded only during actual execution
28
+ result_html_str = to_html_str()
29
+ model = get_template_model()
30
+ with scope(app_meta={"merge_global_resources": False}) as s:
31
+ _create_debug_report(model, result_html_str)
32
+ s.to_html(file.resolve().absolute())
33
+
34
+ @staticmethod
35
+ def _get_caller_path(file: Union[str, Path]) -> Path:
36
+ if isinstance(file, str):
37
+ import inspect
38
+
39
+ frame = inspect.currentframe().f_back.f_back # type: ignore
40
+ assert frame is not None
41
+ script_file = inspect.getfile(frame)
42
+ file = Path(script_file).parent.joinpath(file)
43
+
44
+ return file
45
+
46
+
47
+ def _create_debug_report(model: ZeroTemplateModel, result_html_str: str):
48
+ from instaui import ui, html, daisyui as daisy
49
+
50
+ no_exists_path_class = "ex-no-exists-path"
51
+
52
+ def _path_exists_class(path: Path):
53
+ return "" if path.exists() else no_exists_path_class
54
+
55
+ ui.use_tailwind()
56
+ daisy.use()
57
+ ui.add_style(rf".{no_exists_path_class} {{background-color: red;color: white;}}")
58
+
59
+ html_size = len(result_html_str.encode("utf-8")) / 1024 / 1024
60
+
61
+ box_style = "border-2 border-gray-200 p-4 place-center gap-x-2"
62
+
63
+ with ui.column().classes("gap-2"):
64
+ # base info
65
+ with ui.grid(columns="auto 1fr").classes(box_style):
66
+ html.span("file size:")
67
+ html.span(f"{html_size:.2f} MB")
68
+
69
+ # import maps
70
+ html.paragraph("import maps")
71
+
72
+ rows = [
73
+ ["vue", str(model.vue_js_code)],
74
+ ["instaui", str(model.instaui_js_code)],
75
+ ]
76
+
77
+ for name, url in model.extra_import_maps.items():
78
+ if isinstance(url, Path) and url.is_file():
79
+ rows.append([name, str(url)])
80
+
81
+ daisy.table(columns=["name", "path"], rows=rows)
82
+
83
+ # with ui.grid(columns="auto 1fr").classes(box_style):
84
+ # html.span("name")
85
+ # html.span("path")
86
+
87
+ # html.span("vue")
88
+ # html.span(str(model.vue_js_code))
89
+
90
+ # html.span("instaui")
91
+ # html.span(str(model.instaui_js_code))
92
+
93
+ # for name, url in model.extra_import_maps.items():
94
+ # if isinstance(url, Path) and url.is_file():
95
+ # html.span(name)
96
+ # html.span(str(url.resolve().absolute())).classes(
97
+ # _path_exists_class(url)
98
+ # )
99
+
100
+ # css links
101
+ html.paragraph("css links")
102
+ with ui.column().classes(box_style):
103
+ for link in model.css_links:
104
+ if isinstance(link, Path) and link.is_file():
105
+ html.span(str(link)).classes(_path_exists_class(link))
106
+
107
+ # js links
108
+ html.paragraph("js links")
109
+ with ui.column().classes(box_style):
110
+ for info in model.js_links:
111
+ if isinstance(info.link, Path) and info.link.is_file():
112
+ html.span(str(info.link)).classes(_path_exists_class(info.link))
113
+
114
+ # custom components
115
+ html.paragraph("custom components")
116
+ with ui.grid(columns="auto 1fr").classes(box_style):
117
+ html.span("name")
118
+ html.span("js file path")
119
+
120
+ for info in model.vue_app_component:
121
+ html.span(info.name)
122
+
123
+ if isinstance(info.url, Path) and info.url.is_file():
124
+ html.span(str(info.url)).classes(_path_exists_class(info.url))
125
+ else:
126
+ html.span("not file")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: instaui
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: insta-ui is a Python-based UI library for rapidly building user interfaces.
5
5
  License: MIT
6
6
  Author: CrystalWindSnake
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
+ Provides-Extra: all
16
17
  Provides-Extra: web
17
18
  Provides-Extra: webview
18
19
  Requires-Dist: fastapi ; extra == "web"
@@ -22,6 +23,8 @@ Requires-Dist: pydantic (>=2.10.6,<3.0.0)
22
23
  Requires-Dist: pywebview ; extra == "webview"
23
24
  Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
24
25
  Requires-Dist: uvicorn ; extra == "web"
26
+ Requires-Dist: web ; extra == "all"
27
+ Requires-Dist: webview ; extra == "all"
25
28
  Description-Content-Type: text/markdown
26
29
 
27
30
  # insta-ui
@@ -5,95 +5,125 @@ instaui/common/jsonable.py,sha256=efzn_IvfrsaNKjc3B3UzshoMvsqSsB-jnD2Aia8YMYM,90
5
5
  instaui/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  instaui/components/column.py,sha256=IjSfrtH8Ez-DMOZWUULUpmA5s8CWl1DY1o4q0ztJCg8,608
7
7
  instaui/components/component.py,sha256=cfKWlhxATdvERSzsVzvLtm61f72_gblhLJXIrXLGQrk,1284
8
- instaui/components/content.py,sha256=et3n8O-36vKRhfNl0y-5lA9pSSEM323Pc0fBMa00pkU,1088
8
+ instaui/components/content.py,sha256=f6dm0GukYJk4RRNJzuvOGqBrStLWkJQbLkV7M5fJ63k,1094
9
9
  instaui/components/directive.py,sha256=bHSOWXNhzWRVNqLXwhc_hY3R3g-JAQ5DWIqpZkI6_wI,1411
10
- instaui/components/element.py,sha256=eC7SZSM4kSdqadDc5SQsAcLq5HCdHa_KD27Qd9CZZis,15269
10
+ instaui/components/echarts/echarts.js,sha256=dXW6gzrBpzt7ZRy5LDJYxkO4PnP37A1KUAWm9391B1M,2673
11
+ instaui/components/echarts/echarts.py,sha256=JX2NXSVqhZYMXIINgO4AFTQOZ2YDIbib1_kYcWRBMGg,5445
12
+ instaui/components/echarts/static/echarts.esm.min.js,sha256=KN8OVRa4kTlat9NIfArzA3rtGcYfyrkcwjFBy_07vu8,1033915
13
+ instaui/components/element.py,sha256=tWdMQQeSUuTJPAzrSXBVP7cAAoSp_K9z1s6X218_ffQ,17791
11
14
  instaui/components/grid.py,sha256=VPqiEMbLkRukeMkHjE2fTnZdKJrbcuBLrU05TpocfL8,2403
12
- instaui/components/html/__init__.py,sha256=seR029kPHbfCFNYawXryoJr-KXn-_B9OB2qdUwz02RM,786
15
+ instaui/components/html/__init__.py,sha256=9bO1ai0aQCWwj80NKqDeq_3zwMg5gf17mE40a1IESAk,1088
13
16
  instaui/components/html/_mixins.py,sha256=5dcSM9h1PswIKL6_eiqUxqW4H2OCuyNeCuRZq3gDGOc,876
17
+ instaui/components/html/_preset.py,sha256=c5rTj3r8W7UP0UHFLUW-ZSPedIa-gzrsU1goi60l20Q,94
14
18
  instaui/components/html/button.py,sha256=lB5SYC2Q8b3dOHLBclJW8yaWBuhoe0qNhpKeEifRDJc,820
15
19
  instaui/components/html/checkbox.py,sha256=29BTpovcJvrN2uQY280dn8KTyspwBBvLeKSxUv3CxjU,1066
16
20
  instaui/components/html/date.py,sha256=MOodsG83JDtb_8l26QWRb7taiPHUAJI6wjt_AjSAJT0,833
17
21
  instaui/components/html/div.py,sha256=fF9rBlOBIl-tDvml1DtJK9lFfFY0SBcP5bn36pluis4,167
18
22
  instaui/components/html/form.py,sha256=C-QVtwX18zH8ZuVK93weGwlRWfSyTGWY_CYIdGcaslU,169
23
+ instaui/components/html/heading.py,sha256=eK7XubxEQxXASzZmDin-qNM7xYQX6Lbmjix60uFr9OI,1306
19
24
  instaui/components/html/input.py,sha256=gWgRIy-xWvW_XeiJ3H8OD8XM-LmJzcxpju7803salwY,908
20
25
  instaui/components/html/label.py,sha256=aENhnvD_ziqumZPD7GbeIV-y4MVO0hgTYfdel8X4Eoc,505
21
26
  instaui/components/html/li.py,sha256=bUfjMK3avk48Y8S1HnNeLkvl-QsaMz8aFTJtY_t34oA,410
22
27
  instaui/components/html/link.py,sha256=eNC2f-twFZUhw_rL-Ggff2Lo8NRU33oF8CfWW_9-ktI,670
23
28
  instaui/components/html/number.py,sha256=8uS6qCJjHoWFbd7CYaNPjef_xWQIGKxTkt--0c_q-z4,1091
24
29
  instaui/components/html/paragraph.py,sha256=-rK8RzLIF3X4eeDm73kallUPNZIZJ6aWDOT0oNzDs7E,440
25
- instaui/components/html/range.py,sha256=JOLfWvQ7JhHEnGZS2pp7QrVqW9rz9zU3ujb1jSaLVxk,1508
26
- instaui/components/html/select.py,sha256=IgcouMeqbJmbnkTdLz-Ex2hqnz0Hw7BSkE0s-azs-2w,2427
30
+ instaui/components/html/range.py,sha256=cLGoo3QaARG9YDnh6g3UYtc1yueI5dfMa9-4e-feSn4,1644
31
+ instaui/components/html/select.py,sha256=AKtHqmx92_7L0YtGFB77JDqFcNTe_a5BNFU_m4ihuZs,2126
27
32
  instaui/components/html/span.py,sha256=kPqXHckL0YRWzV84ze4mAcKZPbmvalqDFtiwez_Lbyc,438
33
+ instaui/components/html/table.py,sha256=YU315he8ikHnAjr0p85gR836NwQvw2Qfgloi1NkQ7Sg,1524
34
+ instaui/components/html/textarea.py,sha256=rE5BVKCPdvmOr2jV-YU8sQ6KjhSx1HiYqiLR4naiULU,914
28
35
  instaui/components/html/ul.py,sha256=YbP2kH0Utlwr194uvVlCNQk1Xfl-5O24nVsDHSM0dqg,545
36
+ instaui/components/markdown/markdown.js,sha256=ZlwxvQJ_0Fq1R-j-unfQTWMRswJ8GsYgLvd-wxVISGc,682
37
+ instaui/components/markdown/markdown.py,sha256=2_ECsZPJ2P5hdP5-Kna0KwoFtHEzk8hgtTZ9rPX5Mds,978
38
+ instaui/components/markdown/static/github-markdown.css,sha256=rN4poFFQBiYB-q0stk5Bi0_YOv295LEsBLQSkNw2kO0,42486
39
+ instaui/components/markdown/static/marked.esm.js,sha256=mgAILO5RXoifHq_HxqoWQ6qcMn_Xw8jYuNHdgoIV-xw,99306
29
40
  instaui/components/match.py,sha256=B3wV1h-SkvYnX8RiMObdM2tfJb8nW2gjFxXQvNeZWWM,2774
30
41
  instaui/components/row.py,sha256=dvLbVmXFgigBZo1OKK6fFyJdrYHPms5-EZ11PVPD23I,388
42
+ instaui/components/shiki_code/shiki_code.js,sha256=b4Z_yfKAnZsma7T51aDUljXn45Jd-AJH-Z1vRO1zaQg,3137
43
+ instaui/components/shiki_code/shiki_code.py,sha256=0FonvKvFKrGfz-xWlJJqGZt0TDSkZQr-4u3E9_CEbDk,3100
44
+ instaui/components/shiki_code/static/langs/css.mjs,sha256=vCN8-QsQSqpj1kE5F9whUvBr39IsRtC3Ql7RxIGfw2Y,52249
45
+ instaui/components/shiki_code/static/langs/markdown.mjs,sha256=wTkMkPZpF-xRGxiQDtoNHk0KUzYM1nheKGOlyX4P2Sw,61684
46
+ instaui/components/shiki_code/static/langs/python.mjs,sha256=h9AiQgl4T1pP_s9xgMSdTp7UjPs1hpHruOQOqvIGFIQ,77213
47
+ instaui/components/shiki_code/static/langs/shell.mjs,sha256=tFnepW_2H4k-TKg0X2a5eFxSVUu69tvLsBACE8CppPk,91
48
+ instaui/components/shiki_code/static/langs/shellscript.mjs,sha256=hUZDCGMkHhsWI8d8RJwqC5DENXuUoJgFmrgJFnuN_Gw,45548
49
+ instaui/components/shiki_code/static/shiki-core.js,sha256=UL04NBlHkWnjncUOLsNx5mMHCXUUh2t9hVLJPpSOAqs,787821
50
+ instaui/components/shiki_code/static/shiki-style.css,sha256=Scp2vcZiuBzDd1YyMz0HT6_qzs95OX18wzAJvC-tLHU,6350
51
+ instaui/components/shiki_code/static/shiki-transformers.js,sha256=JtWn48oj_ppT2-RDbbLnmBjtIvnBRHkgwFcO4hj0yx0,12744
52
+ instaui/components/shiki_code/static/themes/vitesse-dark.mjs,sha256=OqDIbeBNg40dGoy2Ef02zM7aS7QTcC3bah6ZzvtkpbA,15326
53
+ instaui/components/shiki_code/static/themes/vitesse-light.mjs,sha256=RWgJuEHtO93_BSyNYuenSW6O_x1fv01aiGRO0ZF_qdo,15176
31
54
  instaui/components/slot.py,sha256=RT0eU7wH7ffFDkl5ucfrNXB1nbsKDq688Hp920TZaoo,2287
32
55
  instaui/components/transition_group.py,sha256=H9zx9NTlCoQnBArWfmxmh7CMKb5hZn8vKrFe4OFxPrE,201
33
- instaui/components/value_element.py,sha256=Y10W4Hus-k-Og2ft2noBdVqF_Hq3x54vFdVvi1Tlf_I,1236
34
- instaui/components/vfor.py,sha256=6zj2-27hMNQtr5PPcCRriKxVX1YRluTWuCbwPGzoBA0,4030
56
+ instaui/components/value_element.py,sha256=wRIAaR3_Cq9qLNJw2KPhWt7dJmclj1mrttzlGpb01Y0,1412
57
+ instaui/components/vfor.py,sha256=A6hvCpmY-5oNZLnIs2yvfQ12C1-GggKVAthqhi5E4lY,4031
35
58
  instaui/components/vif.py,sha256=2E62-8J9NIlZDhvgIOuDwz0tLLb6VoJ1ji1K4okrapw,1165
36
- instaui/consts.py,sha256=d9lGtEF3ykcumbFCrIJ3KHkOyGgnRDstEAnHxHWL4Y8,947
37
- instaui/dependencies/component_dependency.py,sha256=U4CUV4dY54iW16cHsoAymC8N2H-VRzApiavpBR5heMY,486
59
+ instaui/consts.py,sha256=3le1YZTV2PM_jXgvEDWlBeGEJz8QIZ2StvA9MZpem_g,967
60
+ instaui/daisyui/__init__.py,sha256=V_8mtkai3cCzhg8_IwhOjPSbyFLs3P-LGxwin0S2p6M,478
61
+ instaui/daisyui/_index.py,sha256=m09dCTRbeOXqgTT36Cq1oXRjUYI8k4zQothFwLiSaq4,549
62
+ instaui/daisyui/button.py,sha256=wsIPyajetff3JyN_GDZGynaHjKfa_98Z2oQbucBYn8U,1097
63
+ instaui/daisyui/checkbox.py,sha256=369s5mKU20IFzru2KFlaw0JQbrhN5D-5sJxu1hivzu8,603
64
+ instaui/daisyui/static/daisyui.css,sha256=IyPR0-rc-ePlHvryIZk8Mm3ZRHlhPg5FRijcOsxSRIM,782801
65
+ instaui/daisyui/static/themes.css,sha256=6WRPF3bNtrpgMzSjqXv26Yol8fb0xDy2PB2LDLU5E2g,38347
66
+ instaui/daisyui/table.py,sha256=7p1EqZ_ZT_o-7j6en5f_08Xl7kLHNEWhPp5dJu_y55Y,1511
67
+ instaui/dependencies/component_dependency.py,sha256=V9L9YmM0_d1bQFMea3aH8qYG_mvGsAVPhmz0UHZa3PQ,672
38
68
  instaui/dependencies/plugin_dependency.py,sha256=6u562ihKbiL3DE4hBrGjauS2nzYEC2glOVN0fwEVNVc,806
39
69
  instaui/event/event_mixin.py,sha256=cN0Wh95e1wX183mGnGFm8BK_aEHWJ8WNx3Upy75mU_4,286
40
- instaui/event/js_event.py,sha256=vA8fBuD7jeMU7HMsXC1b6OM3wO4phQDu149P1ZxtwhQ,1738
41
- instaui/event/web_event.py,sha256=1_TBXYuyhZnxhV6U0D10JtUXzYBQoEDqPR9ZYTx8_Is,3208
70
+ instaui/event/js_event.py,sha256=C6TS-sgHiUtCSAFpkDDaI1vKzc4F-ZA1zauf3GTiFX4,1780
71
+ instaui/event/web_event.py,sha256=ddb91alNOuafYt1xOPVADqCy36_CQN4r8EfgLpsxmBM,3207
42
72
  instaui/experimental/__init__.py,sha256=mla0-czeN-1mBNReWSEnMLwBvERMVceQfHGAdCdlyR4,122
43
73
  instaui/experimental/debug.py,sha256=UGUWgNZ3ShanpuxfuPdx52TgQrkO9hByABYMnPZEIiE,1325
44
74
  instaui/fastapi_server/_utils.py,sha256=MCqbebS4UkBOV8fp3Oy415Tvxnqi2mnMl5Eqe6yJogg,1177
45
75
  instaui/fastapi_server/_uvicorn.py,sha256=n-es5ajWepXb6xF9EP0ft2lrEbsyLGWMUE7uVqpkUAs,1174
46
76
  instaui/fastapi_server/debug_mode_router.py,sha256=n5i9SP300Wvji_ziuzOOVqvrl9bswj6BQ1Ka0RiVpVg,1543
47
- instaui/fastapi_server/dependency_router.py,sha256=8OczS9OK73dbFCLUgHmm9FTtLmOQ1qLtdperPS3q4YQ,515
77
+ instaui/fastapi_server/dependency_router.py,sha256=pvqL4qozwoJtZoFp34dw-VJkzGjUra0NVf12Phe0iV8,591
48
78
  instaui/fastapi_server/event_router.py,sha256=_b0UNaPiwGwk7ElcF7XQnZfraPyWG2Miv9-wg-RI-PU,1648
49
79
  instaui/fastapi_server/middlewares.py,sha256=XyXjdGjH5hJ47ZK8EBeOln4Db1rfRijZpEGl3xmYQqU,643
50
80
  instaui/fastapi_server/request_context.py,sha256=EV5ZG4zgI_NPlTxinqO4AIREj6rbb1-HcjKCMa2Unfs,521
51
- instaui/fastapi_server/resource.py,sha256=j7K_0MeojXdS6HSF8mLWboss1gr37ULkQR_rSpoNu-Y,929
52
- instaui/fastapi_server/server.py,sha256=LCPFmM21cCp7UCAgGGO6TDNRXno0VdYF4n4uno5PrBA,9664
81
+ instaui/fastapi_server/resource.py,sha256=2788yiuRjE3GRLqyukuL-x6qN0TSUNzNCm6S51ulNTk,887
82
+ instaui/fastapi_server/server.py,sha256=6NvpWg6CkCjGK21-Pj1WDLI3YjA0nBBNS2v2_vPPiyc,9892
53
83
  instaui/fastapi_server/watch_router.py,sha256=KC8AbGNpH2x11PHQMPgc9N5WOlqW05i6r0PTU5A35rI,1599
54
84
  instaui/handlers/_utils.py,sha256=EB5mTb6flhMeuwm2Byb5jp18WqMngOuv3jC_PmycrA0,2076
55
- instaui/handlers/computed_handler.py,sha256=vlX29BJlJ8BNVR5HJRRl_nTOyf5cFdg7YhzSnXqKtJc,1067
56
- instaui/handlers/config_handler.py,sha256=I2Paut7lZJ-u0LXNmSgtie67APyZfEOEv8JMducYEL8,303
57
- instaui/handlers/event_handler.py,sha256=HVeKks1Widy7OemMNxURk5L8x6-CbI3pV05ATl7OGaI,1633
58
- instaui/handlers/watch_handler.py,sha256=LZTo6AiklHs7BqOHwCPpDKSigqOmK9kusTkbogB2-_Q,1468
59
- instaui/html_tools.py,sha256=r_AxBDu4KgQjheqIqVSFos_eiF01sAYK7Suu__MVFnI,1318
60
- instaui/inject.py,sha256=yaEgsySd-5EYDjb-Wn5i2-K1tsUBdZyi_ViUplgnjrQ,731
85
+ instaui/handlers/event_handler.py,sha256=hjxi_nDh0yjk9EmRgew1USXk-Egd4pR8YnUiOcJbbnc,1761
86
+ instaui/handlers/watch_handler.py,sha256=Ay4lubEdRnZcWSqWLwxQyS_uWiF0gu-E9PrNGCAHvL0,1600
87
+ instaui/html_tools.py,sha256=-W347Uc0xfFSo2Fhk-dE65T8RT-_ApeDqzshi0oPsNI,2579
88
+ instaui/inject.py,sha256=NeTcsxoPdo12kZCvGjFU9NNHsVWnsPJfIcNY5_sPGYc,727
61
89
  instaui/js/__init__.py,sha256=oIYLPskHpQf8a4SWHLX4DyKjrlDrqWaqbNksIQsLBoA,69
62
90
  instaui/js/js_output.py,sha256=a4tZ99P19oen4510qI9LWX6pX0-lH5y37v8va6UY62Y,382
63
91
  instaui/js/lambda_func.py,sha256=ulCJ1lzF4h3jGihVTwltS3xEDPbTegjzIN8Al7U4Ank,1004
64
92
  instaui/launch_collector.py,sha256=_YmF3hsNWe-ZxMp_amqUBHkhB6fOuTPfX16BVwn25xg,1731
65
93
  instaui/page_info.py,sha256=aJtfLp2h05tCuLzxk2pZ6a9ztyxSdI-g3NBRxbqpS6E,269
66
94
  instaui/runtime/__init__.py,sha256=4aYTDsKaloRMQns8ttdfSx5xLmcN0Ot6tMqELbjIDZg,667
67
- instaui/runtime/_app.py,sha256=ZnZvITMel77elQjnccbcVT7y2Pinwqy8FvhHwEwv-_A,5899
95
+ instaui/runtime/_app.py,sha256=tF2rb_4SC6cMYTriDYUKRfroAK6tn5PFLEEXyogClmI,7340
68
96
  instaui/runtime/_inner_helper.py,sha256=Aw7S_KtCuOlpd8NP2RuQvNTL1GJtpxQGLsKdc3VXQFY,326
97
+ instaui/runtime/_link_manager.py,sha256=sVdqm3gdCl6i9UXa8WwckfYVf1vmESm7hvdagT_-OZI,2271
69
98
  instaui/runtime/context.py,sha256=MXwyKnX1X13peHOUbYzwAMflaA1WoQrNkGbi5C_0ErU,1086
70
99
  instaui/runtime/dataclass.py,sha256=dr3hN4YjFXPzckRX9HR87t1-gPjT9RNq9YV-0uJnjHo,587
71
- instaui/runtime/resource.py,sha256=HTEG-Ed3rv2RDIeWUJcZ-Gsx5w4OUWyzFD81hOjeIZc,1743
100
+ instaui/runtime/resource.py,sha256=8I47HZHRHIzIDrYcfSiHA2RWwb3-ZIsVFMsat8jgV-8,2363
72
101
  instaui/runtime/scope.py,sha256=CG8o3TmisLCSp6zHhj0vI4bJgEzDitUXw5ox9BNb3z4,3779
73
102
  instaui/runtime/ui_state_scope.py,sha256=g48VpQj0BboooUrPr5VIWvcQoJe0bIQARMwRyVEE0I8,314
74
103
  instaui/settings/__init__.py,sha256=nK_xDrlq7CPjm9x3EKsKUW5qWBg_1d-xbqAp_i5G8cc,70
75
104
  instaui/settings/__settings.py,sha256=DWzRvs9bBqjoNA2MvGAyz3GRrSV8H6lMLF1H3iJyoyA,385
105
+ instaui/shadcn_classless/_index.py,sha256=8gjLIh4J1ezFsQr3hvqS76gY_nhdgiNpexY-ENgfReY,1088
106
+ instaui/shadcn_classless/static/shadcn-classless.css,sha256=3-DIG6JLQ5sZJekpxB2M3ZMgv4V5kBY7lcR6qZwgHuM,10473
76
107
  instaui/skip.py,sha256=uqhqusgeChVoivKFMoZd-XePYrlSoLvUzRZDBcUgFmA,149
77
108
  instaui/spa_router/__init__.py,sha256=DGSf0YD6wZFj22kmPSyJWUmm_Lx3_YFg32iOa096T7Y,519
78
109
  instaui/spa_router/_components.py,sha256=vPo4JuRtbD_5ll0LkGwU1p8l_pxNfCSdFLDzMXsoEpw,896
79
110
  instaui/spa_router/_file_base_utils.py,sha256=jcT9QoNu_ILhoI3JYhEA2JvINOg3PgWFa0d0IgysAa8,8697
80
- instaui/spa_router/_functions.py,sha256=j0ga2dq1q5JdPiUtOUS9KaRyvjm0Kmgf_HXYVVLcqvo,3226
111
+ instaui/spa_router/_functions.py,sha256=6EDwXLHnmRrB_CUcbRNPblfOUPF8orob9PXrWm2RfSI,3227
81
112
  instaui/spa_router/_install.py,sha256=X9p7wtuGxo6B5F47UTY4ndOSRzENXkoK1XdkNo3F_YA,291
82
- instaui/spa_router/_route_model.py,sha256=Vua-xnk2AgHwTz4jBiPSL_3QOLKzX3cFCUDlJHE_mxY,4056
113
+ instaui/spa_router/_route_model.py,sha256=x54tqunkVQSbBKpELiSwcDdBDUzDXFbJl_o6eSu7M7A,4057
83
114
  instaui/spa_router/_router_box.py,sha256=Ez0vWWEYH_FHuFDvcAVhhfrlMRnDpT0_7tjmMZRMWZg,1163
84
115
  instaui/spa_router/_router_output.py,sha256=Nc6N8yO_9IrUbaYbPZMkOX_9VlwBKzyXMahaPp5GFGg,528
85
116
  instaui/spa_router/_router_param_var.py,sha256=KCy54xBZxGMqLO3Zlbzr6XV8ts-M6jCOKunL2gz5IUc,1455
86
117
  instaui/spa_router/_types.py,sha256=KuGuv5C6qivwllfdmV5qrvM0S_GWJ6u8OOTkCNmJImU,81
87
118
  instaui/spa_router/templates/page_routes,sha256=8VjM_8f6pjFb01QbU9z5HNqpcNRdCiX3X0OqNHLq8fo,1355
88
- instaui/static/insta-ui.css,sha256=B0xrNK9qVoRwRXhnTT8OascdHFeUk7vtfr7VhoA23_Y,297
89
- instaui/static/insta-ui.esm-browser.prod.js,sha256=d-XH08dCFhTbJ97IxCFnfA8JRToJwYvdM3Z812JrnJw,108029
119
+ instaui/static/insta-ui.css,sha256=xfCyuXSbX2YkxASomIPmLXcz3le2b1mSdZ9gAUp6shQ,257
120
+ instaui/static/insta-ui.esm-browser.prod.js,sha256=Fueqfm7xAVmSFgky-XYIdibN15tupS_hW-OVmFMjOjY,109236
90
121
  instaui/static/insta-ui.ico,sha256=08FJg4qWolvOjfodoh8IJLStslrvd8sDyuRcTUDq5ak,1150
91
- instaui/static/insta-ui.iife.js,sha256=ZahZqkh_wOrxNGaAXk3MZHrE3sKvOzs1dyYq1987NPE,71885
92
- instaui/static/insta-ui.iife.js.map,sha256=kn3azChvTCovyT0u4xg02i4DXoy97FTMsMEWMb8nPLc,646544
93
- instaui/static/insta-ui.js.map,sha256=hEYm8Kj9veIDKyAqmvQOYIMG_uPuO0lwBpIMxy49XlQ,656435
94
- instaui/static/tailwindcss.min.js,sha256=rR1MZFeOQv5aofD10TzUia9_YGdMGdtIPSSVT0WKR_Y,366328
122
+ instaui/static/insta-ui.js.map,sha256=lL_V2BY30_BWOiBS0eEsmlukrAqPpRNK7oBO2ghhGSw,661811
123
+ instaui/static/instaui-tools-browser.js,sha256=cLHKNXYaYMZriMxV-yKGAHTrHSdNRUlDVZmv6uc6mMw,14455
95
124
  instaui/static/templates/debug/sse.html,sha256=KPZfFRBNqKs5xEmNgMmgfFvneKXiFzMMDDHPsqebbgU,3384
96
125
  instaui/static/templates/web.html,sha256=pCHoQIPUO03GX_aZ5zNjRYQC9b0GPFtoYE9P8eo5pHc,1789
126
+ instaui/static/templates/webview.html,sha256=9zQB7wkYKSgHh866Dk3xqSYbcWhCMCaVuh9iM8TFnhg,1862
97
127
  instaui/static/templates/zero.html,sha256=_PHhx6uYD__tlt_bXG4j1WoZGnMBXIs2w2sU6-1zvH4,1684
98
128
  instaui/static/vue.esm-browser.prod.js,sha256=vwQkXANuVYQuEFc0VgiokJdhNyMmvxMKyb1FmrYrNb4,162662
99
129
  instaui/static/vue.global.prod.js,sha256=xFm6fMjbZcmCWJ-l1kx_9HiHfo5bD9dWgyB87GpOieg,157924
@@ -101,16 +131,25 @@ instaui/static/vue.runtime.esm-browser.prod.js,sha256=74FfP_s9pycfQXWAiGWx6SbjV_
101
131
  instaui/systems/file_system.py,sha256=q8k_mSHhldkSRYXT73T9s8zvERZZo9HL1U2-4mwau-I,163
102
132
  instaui/systems/func_system.py,sha256=iEnskq2vE4TUekJhMLc9hvv-iiougkxi1qXbvSEGovs,2806
103
133
  instaui/systems/js_system.py,sha256=t_r7SFPmfvTiIrxzuf1YgHyi_Oi_81W0UH_kkC5MwmM,685
134
+ instaui/systems/module_system.py,sha256=6qeR1K1vxocezBGPX5yecLVygqjzHNeDtlJTwJO9Szs,937
104
135
  instaui/systems/pydantic_system.py,sha256=qibHh4QqjLNPBzyrCkJVJwCk1dC_H8gEDYYf8Sb-5ps,691
105
136
  instaui/systems/string_system.py,sha256=NzB7rgy7BZAYXAYDEWJQSvuYNui2TbLbrc9itVZGLmE,247
137
+ instaui/tailwind/__init__.py,sha256=HNexMZAMG2c0QtkX3oNXmpWnyWDuJPrxuq5IBGvcjVs,75
138
+ instaui/tailwind/_index.py,sha256=PPjm046Clrfkg7xv0_BVWuxiLdYZIqnLN3GR7cSvuIg,810
139
+ instaui/tailwind/static/tailwindcss-v3.min.js,sha256=wmOuJX6oR7byZau-Zp2CDXhM6BVK5ZXN55tgExAV4ew,366390
140
+ instaui/tailwind/static/tailwindcss-v4.min.js,sha256=9Ob5VKFT6th87AlCG5pJ90ICCZSsnemVuQ1TzyS2zk4,250319
106
141
  instaui/template/__init__.py,sha256=fuua3uCOCmhWb7Q6Sc6pUxfwlxYJTXkdWB1V2fubyyc,141
142
+ instaui/template/_utils.py,sha256=wNIGDWr3z2PpmKsgShYISbCnII4AbKfsLIX_DRWlRbU,670
107
143
  instaui/template/env.py,sha256=ZqVsqpfSY1mupbgpBSkvOJytNui8xfNR5kNNC9rv4Ps,150
108
144
  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
111
- instaui/ui/events.py,sha256=4OZ-qFU2S4WG0WSq0Hjh9T_GOPWyPqPSr9PZ8sjVU-M,808
145
+ instaui/template/webview_template.py,sha256=AWDtsk-CbBOissWjIzjq-0gd8iVjKW7mjs70iGXmNcU,1629
146
+ instaui/template/zero_template.py,sha256=E88VGsyjb1qbHFJlMW-xmLRFkwUXZA7VDoZ_Jd8YubA,3514
147
+ instaui/ui/__build_init.py,sha256=xpwR2H-lqV7932W2NirtPXb4JtRk2vI9H36OHocqBOg,2156
148
+ instaui/ui/__init__.py,sha256=svj4zXW2uUzfNJBbs6yjXRemDvKQqIgeaakcVuTmLTQ,4167
149
+ instaui/ui/__init__.pyi,sha256=GTxfZRHVkwbbY1hGukp48qSPUY69QakxJxBll54dcpc,4071
150
+ instaui/ui/events.py,sha256=lfhiINwn-Kh0MezsSeLJPttWm6G1aWiwyk3TRo0NrlA,809
112
151
  instaui/ui_functions/input_slient_data.py,sha256=0A5DegIt_MqdZgbj1RiVFNmB_RUqgov9FYtkw6VX0DE,511
113
- instaui/ui_functions/server.py,sha256=75Th_PhcbHcA9vAqrymGoZm2xNcOHMe0UZpypgbTRy8,287
152
+ instaui/ui_functions/server.py,sha256=B4w8KwBUMGStY19uUG8E4vRG7-L4cedttLkh35xr698,357
114
153
  instaui/ui_functions/str_format.py,sha256=ECWttA4LlNHlvdT_73wGF_I68soWNEXTP_Hosmxt-m4,1139
115
154
  instaui/ui_functions/ui_page.py,sha256=QbXIKajnDxeutf06wXn7wZ8FgELS-eXedn5HwtuDoT8,357
116
155
  instaui/ui_functions/ui_types.py,sha256=J5tqFFkoZJMuoLeTqU52KNgw3kdB_IfcrhaBmyI6NAA,505
@@ -120,7 +159,7 @@ instaui/vars/_types.py,sha256=wthCk1fcxj1SZ5y6b84W9gFpoi8j2PYnfmaPj4Am72s,308
120
159
  instaui/vars/_utils.py,sha256=j_00d04_bIACUZkOqrnJXh3pU6Em3YVphUJMmyMfRJI,316
121
160
  instaui/vars/data.py,sha256=DBqXdcY8LG9VbR3i-LnW45YfICiChTRHKcZwgCxULdc,1721
122
161
  instaui/vars/element_ref.py,sha256=JQ5fKzjaLbLBDcV83IztcPQFMsaT37sTxjtxEy4LwFc,1053
123
- instaui/vars/event_context.py,sha256=mPWWTBVsvfP4SSVyBI6V-1lywwNtvXfopve85YRxAtk,1209
162
+ instaui/vars/event_context.py,sha256=3ML6nyF6Q1hbFvdeu6E2QVOIVcWe1P9FtlCR0dgBGjo,1308
124
163
  instaui/vars/event_extend.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
164
  instaui/vars/js_computed.py,sha256=DjR2kUIbWqCIDUPsRDXCTtlQzXiwpa9L3JwcOc6ADQ0,2695
126
165
  instaui/vars/mixin_types/common_type.py,sha256=4KduANLCUCeGTA1ClEsbFzEzd8Mgve3693Wxf9H7Gmw,176
@@ -137,19 +176,24 @@ instaui/vars/state.py,sha256=N6yLcVkiyCpK5oR8C2KbggFmLwpgBgzylp11JgFiab8,2630
137
176
  instaui/vars/types.py,sha256=K0QTajlzHaDvFoVMCHAhY_rVvrBm3FsC92BFPOgdBog,511
138
177
  instaui/vars/vfor_item.py,sha256=cVrpErh8OrycYjDLm7PTuE2kIcC2M6ThAQlwvTXG8x0,5490
139
178
  instaui/vars/vue_computed.py,sha256=f3xkjTjbfSpwKeBImWkG_bCqIuyysH3V-Zdbqh482As,2395
140
- instaui/vars/web_computed.py,sha256=GAi2dAB7vAOd3F4oCe_6S90onVQV5oQJKRcr0jA4SeQ,4536
179
+ instaui/vars/web_computed.py,sha256=agnNR_16YGeeruiDnC35EyYA0RVJLQnz_7qbhHV5htM,4407
141
180
  instaui/vars/web_view_computed.py,sha256=bFFVE9jRKczNy4HhmegWoC6KOL_Nrej-ag37DAIDzaA,36
142
181
  instaui/version.py,sha256=to8l16EjNe4jmzK316s5ZIotjv554tqF0VfwA1tBhQk,87
143
182
  instaui/watch/_types.py,sha256=HJ_eAID0NsEJ_S8PhcYWxpVWhYLjjqKlbNWwqdqS4IU,73
144
183
  instaui/watch/_utils.py,sha256=mTITHG8hp0pyfQXUERQKXMDna5Au02bhuASCV32eXHI,124
145
184
  instaui/watch/js_watch.py,sha256=k9lgtyUGZ8a549QITcNie2kGbT0BJuYqfouoOex0Dqs,2182
146
185
  instaui/watch/vue_watch.py,sha256=n6yVt2ruKCjx-ZnIb29ytN9ugDas1JpUBOJeQ_FSYAA,1571
147
- instaui/watch/web_watch.py,sha256=Gl0AZ9ji_A7tAoqsvyHmBOAYaX1CHxowVONlZKy8nd8,3763
186
+ instaui/watch/web_watch.py,sha256=6VOeXPHQM6UcCaOnrsZ-c5AiCNaUqL5nOkw4-G_2frE,3728
187
+ instaui/webview/__init__.py,sha256=1yUBPkgYvuQk9cDYXzGE9WcUHyM0Af8Er632GtgQeuo,35
188
+ instaui/webview/_utils.py,sha256=pqARVv37h-8p7CLOpvqLV8O_az4EV2VD9G-beUVqjD8,172
189
+ instaui/webview/api.py,sha256=9xuG3EKpmOOy1dvIrS9C9z9ukQDRnIdZLrGFD5FLyvU,2071
190
+ instaui/webview/func.py,sha256=Igrf7U5qL5jJvhwIRJ3JqRjXxX_S2O_nQ9oy1HLFtYo,3422
191
+ instaui/webview/index.py,sha256=0uUU2addq2Bu4Cb41iYSvVzLsJXWzzEI5vzb7rzIc0o,5821
192
+ instaui/webview/resource.py,sha256=kFT6N5UZK5GLE0KmW3TrEYDNlViw9DL2OshRh41wBXs,5566
148
193
  instaui/zero/__init__.py,sha256=N0LuRUAcaurxHSspcEDuwZg62W2S3qL4VtrMKxOivBE,49
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,,
194
+ instaui/zero/func.py,sha256=8cA_wJMtRmoAARjWY8yY5MmLXDAQ7hyVW6f1Vbejtoc,3576
195
+ instaui/zero/scope.py,sha256=6odxaryVSfamKpQQgpR-4cKIzLaH0eU4uaQspObRINM,4405
196
+ instaui-0.1.5.dist-info/LICENSE,sha256=_JjnAWrikJ6qkwT7PazeFNRlcIu8q_RH3mYcHTxEF5c,1094
197
+ instaui-0.1.5.dist-info/METADATA,sha256=eFfii9kiTmYTOrVBYOoJXYgZnh0FeIBYq-Kn9auvOMw,3570
198
+ instaui-0.1.5.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
199
+ instaui-0.1.5.dist-info/RECORD,,
@@ -1,42 +0,0 @@
1
- import threading
2
- from typing import Callable, Dict, Optional
3
-
4
- from instaui.runtime.context import get_context
5
- from instaui.systems import func_system
6
-
7
-
8
- ASYNC_URL = "/instaui/computed/async"
9
- SYNC_URL = "/instaui/computed/sync"
10
- INIT_URL = "/instaui/computed/init"
11
-
12
- _computed_handlers: Dict[str, Callable] = {}
13
- dict_lock = threading.Lock()
14
-
15
-
16
- def register_handler(key: str, handler: Callable):
17
- if key in _computed_handlers:
18
- return
19
- with dict_lock:
20
- _computed_handlers[key] = handler
21
-
22
-
23
- def get_handler(key: str) -> Optional[Callable]:
24
- return _computed_handlers.get(key)
25
-
26
-
27
- def get_statistics_info():
28
- return {
29
- "_computed_handlers count": len(_computed_handlers),
30
- "_computed_handlers keys": list(_computed_handlers.keys()),
31
- }
32
-
33
-
34
- def create_handler_key(
35
- page_path: str,
36
- handler: Callable,
37
- ):
38
- _, lineno, _ = func_system.get_function_location_info(handler)
39
-
40
- if get_context().debug_mode:
41
- return f"path:{page_path}|line:{lineno}"
42
- return f"{page_path}|{lineno}"
@@ -1,13 +0,0 @@
1
- from typing import Callable, Dict
2
-
3
- ASYNC_URL = "/instaui/config/async"
4
- SYNC_URL = "/instaui/config/sync"
5
- _handlers: Dict[str, Callable] = {}
6
-
7
-
8
- def register_handler(key: str, handler: Callable):
9
- _handlers[key] = handler
10
-
11
-
12
- def get_handler(key: str) -> Callable:
13
- return _handlers[key]