instaui 0.1.6__py3-none-any.whl → 0.1.8__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.
@@ -3,7 +3,7 @@ import datetime
3
3
  import typing
4
4
  from typing_extensions import Unpack
5
5
  from instaui.components.element import Element
6
- from instaui.vars import TMaybeRef
6
+ from instaui.vars.types import TMaybeRef
7
7
  from instaui.arco import component_types
8
8
  from instaui.event.event_mixin import EventMixin
9
9
  from ._utils import handle_props, try_setup_vmodel
@@ -1,7 +1,7 @@
1
1
  import typing
2
2
  from typing_extensions import Unpack
3
3
  from instaui.components.element import Element
4
- from instaui.vars import TMaybeRef
4
+ from instaui.vars.types import TMaybeRef
5
5
  from instaui.arco import component_types
6
6
  from instaui.event.event_mixin import EventMixin
7
7
  from ._utils import handle_props, try_setup_vmodel
@@ -3,13 +3,13 @@ from typing import TYPE_CHECKING, Any, Literal, Union
3
3
  from instaui.components.element import Element
4
4
 
5
5
  if TYPE_CHECKING:
6
- import instaui.vars as ui_vars
6
+ from instaui.vars.types import TMaybeRef
7
7
 
8
8
 
9
9
  class Heading(Element):
10
10
  def __init__(
11
11
  self,
12
- text: Union[str, ui_vars.TMaybeRef[Any]],
12
+ text: Union[str, TMaybeRef[Any]],
13
13
  *,
14
14
  level: Literal[1, 2, 3, 4, 5, 6] = 1,
15
15
  ):
@@ -22,30 +22,30 @@ class Heading(Element):
22
22
 
23
23
 
24
24
  class H1(Heading):
25
- def __init__(self, text: Union[str, ui_vars.TMaybeRef[Any]]):
25
+ def __init__(self, text: Union[str, TMaybeRef[Any]]):
26
26
  super().__init__(text, level=1)
27
27
 
28
28
 
29
29
  class H2(Heading):
30
- def __init__(self, text: Union[str, ui_vars.TMaybeRef[Any]]):
30
+ def __init__(self, text: Union[str, TMaybeRef[Any]]):
31
31
  super().__init__(text, level=2)
32
32
 
33
33
 
34
34
  class H3(Heading):
35
- def __init__(self, text: Union[str, ui_vars.TMaybeRef[Any]]):
35
+ def __init__(self, text: Union[str, TMaybeRef[Any]]):
36
36
  super().__init__(text, level=3)
37
37
 
38
38
 
39
39
  class H4(Heading):
40
- def __init__(self, text: Union[str, ui_vars.TMaybeRef[Any]]):
40
+ def __init__(self, text: Union[str, TMaybeRef[Any]]):
41
41
  super().__init__(text, level=4)
42
42
 
43
43
 
44
44
  class H5(Heading):
45
- def __init__(self, text: Union[str, ui_vars.TMaybeRef[Any]]):
45
+ def __init__(self, text: Union[str, TMaybeRef[Any]]):
46
46
  super().__init__(text, level=5)
47
47
 
48
48
 
49
49
  class H6(Heading):
50
- def __init__(self, text: Union[str, ui_vars.TMaybeRef[Any]]):
50
+ def __init__(self, text: Union[str, TMaybeRef[Any]]):
51
51
  super().__init__(text, level=6)
@@ -6,16 +6,16 @@ from instaui.components.value_element import ValueElement
6
6
  from ._mixins import InputEventMixin
7
7
 
8
8
  if TYPE_CHECKING:
9
- import instaui.vars as ui_vars
9
+ from instaui.vars.types import TMaybeRef
10
10
 
11
11
 
12
12
  class Input(InputEventMixin, ValueElement[str]):
13
13
  def __init__(
14
14
  self,
15
- value: Union[str, ui_vars.TMaybeRef[str], None] = None,
15
+ value: Union[str, TMaybeRef[str], None] = None,
16
16
  *,
17
- model_value: Union[str, ui_vars.TMaybeRef[str], None] = None,
18
- disabled: Optional[ui_vars.TMaybeRef[bool]] = None,
17
+ model_value: Union[str, TMaybeRef[str], None] = None,
18
+ disabled: Optional[TMaybeRef[bool]] = None,
19
19
  ):
20
20
  super().__init__("input", value, is_html_component=True)
21
21
 
@@ -3,13 +3,13 @@ from typing import TYPE_CHECKING, Any, Union
3
3
  from instaui.components.element import Element
4
4
 
5
5
  if TYPE_CHECKING:
6
- import instaui.vars as ui_vars
6
+ from instaui.vars.types import TMaybeRef
7
7
 
8
8
 
9
9
  class Label(Element):
10
10
  def __init__(
11
11
  self,
12
- text: Union[Any, ui_vars.TMaybeRef[Any], None] = None,
12
+ text: Union[Any, TMaybeRef[Any], None] = None,
13
13
  ):
14
14
  super().__init__("label")
15
15
 
@@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, Any, Union
3
3
  from instaui.components.element import Element
4
4
 
5
5
  if TYPE_CHECKING:
6
- from instaui.vars import TMaybeRef
6
+ from instaui.vars.types import TMaybeRef
7
7
 
8
8
 
9
9
  class Li(Element):
@@ -5,7 +5,7 @@ from instaui.components.value_element import ValueElement
5
5
  from ._mixins import InputEventMixin
6
6
 
7
7
  if TYPE_CHECKING:
8
- import instaui.vars as ui_vars
8
+ from instaui.vars.types import TMaybeRef
9
9
 
10
10
 
11
11
  _T_value = Union[int, float]
@@ -14,11 +14,11 @@ _T_value = Union[int, float]
14
14
  class Number(InputEventMixin, ValueElement[_T_value]):
15
15
  def __init__(
16
16
  self,
17
- value: Optional[ui_vars.TMaybeRef[_T_value]] = None,
17
+ value: Optional[TMaybeRef[_T_value]] = None,
18
18
  *,
19
- model_value: Optional[ui_vars.TMaybeRef[_T_value]] = None,
20
- min: Optional[ui_vars.TMaybeRef[_T_value]] = None,
21
- max: Optional[ui_vars.TMaybeRef[_T_value]] = None,
19
+ model_value: Optional[TMaybeRef[_T_value]] = None,
20
+ min: Optional[TMaybeRef[_T_value]] = None,
21
+ max: Optional[TMaybeRef[_T_value]] = None,
22
22
  ):
23
23
  super().__init__("input", value, is_html_component=True)
24
24
  self.props({"type": "number"})
@@ -3,13 +3,13 @@ from typing import TYPE_CHECKING, Any, Union
3
3
  from instaui.components.element import Element
4
4
 
5
5
  if TYPE_CHECKING:
6
- import instaui.vars as ui_vars
6
+ from instaui.vars.types import TMaybeRef
7
7
 
8
8
 
9
9
  class Paragraph(Element):
10
10
  def __init__(
11
11
  self,
12
- text: Union[str, ui_vars.TMaybeRef[Any]],
12
+ text: Union[str, TMaybeRef[Any]],
13
13
  ):
14
14
  super().__init__("p")
15
15
  self.props(
@@ -3,13 +3,13 @@ from typing import TYPE_CHECKING, Any, Union
3
3
  from instaui.components.element import Element
4
4
 
5
5
  if TYPE_CHECKING:
6
- import instaui.vars as ui_vars
6
+ from instaui.vars.types import TMaybeRef
7
7
 
8
8
 
9
9
  class Span(Element):
10
10
  def __init__(
11
11
  self,
12
- text: Union[str, ui_vars.TMaybeRef[Any]],
12
+ text: Union[str, TMaybeRef[Any]],
13
13
  ):
14
14
  super().__init__("span")
15
15
  self.props(
@@ -5,20 +5,20 @@ from instaui.components.content import Content
5
5
  from instaui.components.vfor import VFor
6
6
 
7
7
  if TYPE_CHECKING:
8
- import instaui.vars as ui_vars
8
+ from instaui.vars.types import TMaybeRef
9
9
 
10
10
 
11
11
  class Table(Element):
12
12
  def __init__(
13
13
  self,
14
- columns: Union[List[str], ui_vars.TMaybeRef[List[str]], None] = None,
15
- rows: Union[List[List[Any]], ui_vars.TMaybeRef[List[List[Any]]], None] = None,
14
+ columns: Union[List[str], TMaybeRef[List[str]], None] = None,
15
+ rows: Union[List[List[Any]], TMaybeRef[List[List[Any]]], None] = None,
16
16
  ):
17
17
  """Create a table element.
18
18
 
19
19
  Args:
20
- columns (Union[List[str], ui_vars.TMaybeRef[List[str]], None], optional): A list of column headers or a reactive reference to such a list. Defaults to None.
21
- rows (Union[List[List[Any]], ui_vars.TMaybeRef[List[List[Any]]], None], optional): A list of row data, where each row is a list of cell values, or a reactive reference to such a list. Defaults to None.
20
+ columns (Union[List[str], TMaybeRef[List[str]], None], optional): A list of column headers or a reactive reference to such a list. Defaults to None.
21
+ rows (Union[List[List[Any]], TMaybeRef[List[List[Any]]], None], optional): A list of row data, where each row is a list of cell values, or a reactive reference to such a list. Defaults to None.
22
22
  """
23
23
  super().__init__("table")
24
24
 
@@ -6,16 +6,16 @@ from instaui.components.value_element import ValueElement
6
6
  from ._mixins import InputEventMixin
7
7
 
8
8
  if TYPE_CHECKING:
9
- import instaui.vars as ui_vars
9
+ from instaui.vars.types import TMaybeRef
10
10
 
11
11
 
12
12
  class Textarea(InputEventMixin, ValueElement[str]):
13
13
  def __init__(
14
14
  self,
15
- value: Union[str, ui_vars.TMaybeRef[str], None] = None,
15
+ value: Union[str, TMaybeRef[str], None] = None,
16
16
  *,
17
- model_value: Union[str, ui_vars.TMaybeRef[str], None] = None,
18
- disabled: Optional[ui_vars.TMaybeRef[bool]] = None,
17
+ model_value: Union[str, TMaybeRef[str], None] = None,
18
+ disabled: Optional[TMaybeRef[bool]] = None,
19
19
  ):
20
20
  super().__init__("textarea", value, is_html_component=True)
21
21
 
instaui/ui/__init__.py CHANGED
@@ -70,7 +70,7 @@ __all__ = [
70
70
 
71
71
  # -- static imports
72
72
  from instaui.version import __version__
73
- from instaui.vars import TMaybeRef
73
+ from instaui.vars.types import TMaybeRef
74
74
  from instaui.vars.ref import ref, TRef
75
75
 
76
76
  from instaui.vars.data import ConstData as data, TConstData
instaui/ui/__init__.pyi CHANGED
@@ -70,7 +70,7 @@ __all__ = [
70
70
 
71
71
  # -- static imports
72
72
  from instaui.version import __version__
73
- from instaui.vars import TMaybeRef
73
+ from instaui.vars.types import TMaybeRef
74
74
  from instaui.vars.ref import ref, TRef
75
75
 
76
76
  from instaui.vars.data import ConstData as data, TConstData
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: instaui
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary: insta-ui is a Python-based UI library for rapidly building user interfaces.
5
5
  License: MIT
6
6
  Author: CrystalWindSnake
@@ -21,6 +21,8 @@ Requires-Dist: fastapi[standard] ; extra == "web"
21
21
  Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
22
22
  Requires-Dist: orjson (>=3.10.15,<4.0.0)
23
23
  Requires-Dist: pydantic (>=2.10.6,<3.0.0)
24
+ Requires-Dist: pydantic (>=2.10.6,<3.0.0) ; extra == "web"
25
+ Requires-Dist: pydantic (>=2.10.6,<3.0.0) ; extra == "webview"
24
26
  Requires-Dist: pywebview ; extra == "all"
25
27
  Requires-Dist: pywebview ; extra == "webview"
26
28
  Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
@@ -14,10 +14,10 @@ instaui/arco/components/back_top.py,sha256=IQqo0-PQ1deIR13S15QEp9CcT-w9oDLuYxi7A
14
14
  instaui/arco/components/badge.py,sha256=zvyGcrP425nMfCG-l8Qv5-XhigR-k3kugs_2LSbgqxs,379
15
15
  instaui/arco/components/breadcrumb.py,sha256=mJqcYVKwl2YtPoRPKebzSevfmkGi2UG5AoCeQgf3vAc,394
16
16
  instaui/arco/components/button.py,sha256=bKW7zNxIaOFhsFmODV2HXxiYylyap4rbJNQXLS-qYGU,1141
17
- instaui/arco/components/calendar.py,sha256=_JKratsKPYVBmvtXFU9sQvmqK1sLrLP9Nn75McFpLvw,1211
17
+ instaui/arco/components/calendar.py,sha256=gvEbL5FaDFkB-wR0bL9eQRxXim7ZpnnhJLY-irwS-3s,1217
18
18
  instaui/arco/components/card.py,sha256=tvz_PgSysY9Yesv2gm6AsCZIfA-Uho6lwCq04-iagZw,376
19
19
  instaui/arco/components/carousel.py,sha256=n0gIQ3LNdwmxF2z3SziKaTTxuOVqgeOBinz2nne6xi0,948
20
- instaui/arco/components/cascader.py,sha256=v8KUZnLtGNMj3tlQdlijSsYHZWLUbyn8gdwexdJSo5g,2610
20
+ instaui/arco/components/cascader.py,sha256=1inR-4Fg5qEh75TR73x6rAksyiuhjyIijpSUAHdgXNw,2616
21
21
  instaui/arco/components/checkbox.py,sha256=RPnosvzBbIHP81X6wLLCT6mrtxIQlZvWnmVqtFZtUpM,900
22
22
  instaui/arco/components/collapse.py,sha256=_KTRwPJNfe_9H2A2CkPA29_1Ci7VdvqLePHb-ng5a9M,900
23
23
  instaui/arco/components/color_picker.py,sha256=zQI59ETb9UKSzto0aIwxYi0mBQqFz16pZdrLjwTWgao,1180
@@ -111,18 +111,18 @@ instaui/components/html/checkbox.py,sha256=29BTpovcJvrN2uQY280dn8KTyspwBBvLeKSxU
111
111
  instaui/components/html/date.py,sha256=MOodsG83JDtb_8l26QWRb7taiPHUAJI6wjt_AjSAJT0,833
112
112
  instaui/components/html/div.py,sha256=fF9rBlOBIl-tDvml1DtJK9lFfFY0SBcP5bn36pluis4,167
113
113
  instaui/components/html/form.py,sha256=C-QVtwX18zH8ZuVK93weGwlRWfSyTGWY_CYIdGcaslU,169
114
- instaui/components/html/heading.py,sha256=eK7XubxEQxXASzZmDin-qNM7xYQX6Lbmjix60uFr9OI,1306
115
- instaui/components/html/input.py,sha256=gWgRIy-xWvW_XeiJ3H8OD8XM-LmJzcxpju7803salwY,908
116
- instaui/components/html/label.py,sha256=aENhnvD_ziqumZPD7GbeIV-y4MVO0hgTYfdel8X4Eoc,505
117
- instaui/components/html/li.py,sha256=bUfjMK3avk48Y8S1HnNeLkvl-QsaMz8aFTJtY_t34oA,410
114
+ instaui/components/html/heading.py,sha256=nYGfUIJFNjeVV_RRwCRuEMblWAEZT-CjNX8eAmtbaaU,1260
115
+ instaui/components/html/input.py,sha256=I9Sbl4THBQuCcaE2HulwD-Hz8Kh2v-rp-HEactlZZBs,894
116
+ instaui/components/html/label.py,sha256=HAH0pGhRdyRG3YwTM4qM8lyF8O3yAfmEyPHj0fQnA-k,507
117
+ instaui/components/html/li.py,sha256=2IS8eudUX4McHjyxT1SOu91xviC2D1NNdYKLjznZ-IA,416
118
118
  instaui/components/html/link.py,sha256=eNC2f-twFZUhw_rL-Ggff2Lo8NRU33oF8CfWW_9-ktI,670
119
- instaui/components/html/number.py,sha256=8uS6qCJjHoWFbd7CYaNPjef_xWQIGKxTkt--0c_q-z4,1091
120
- instaui/components/html/paragraph.py,sha256=-rK8RzLIF3X4eeDm73kallUPNZIZJ6aWDOT0oNzDs7E,440
119
+ instaui/components/html/number.py,sha256=Y2oIzTMHKWMWpufG55tFz0npEoEFvLhTWpZbMJ8J07s,1069
120
+ instaui/components/html/paragraph.py,sha256=U0ePdkQhmt6fdLhLsZ3IVsIBdHBw4mOxhEwfioHzoyY,442
121
121
  instaui/components/html/range.py,sha256=cLGoo3QaARG9YDnh6g3UYtc1yueI5dfMa9-4e-feSn4,1644
122
122
  instaui/components/html/select.py,sha256=AKtHqmx92_7L0YtGFB77JDqFcNTe_a5BNFU_m4ihuZs,2126
123
- instaui/components/html/span.py,sha256=kPqXHckL0YRWzV84ze4mAcKZPbmvalqDFtiwez_Lbyc,438
124
- instaui/components/html/table.py,sha256=YU315he8ikHnAjr0p85gR836NwQvw2Qfgloi1NkQ7Sg,1524
125
- instaui/components/html/textarea.py,sha256=rE5BVKCPdvmOr2jV-YU8sQ6KjhSx1HiYqiLR4naiULU,914
123
+ instaui/components/html/span.py,sha256=RJnccwnYEh8PUZ36VTBCKzBNV74M3SMohAejb0ck0UI,440
124
+ instaui/components/html/table.py,sha256=fPjZg--x6vIjtt7ExjjTIVe9sMv6dz13BS1c4Iz_qao,1502
125
+ instaui/components/html/textarea.py,sha256=EsVir5nOQDlf5hlmfdWfdfGv-owk-ajPJYOGCbzWVu4,900
126
126
  instaui/components/html/ul.py,sha256=YbP2kH0Utlwr194uvVlCNQk1Xfl-5O24nVsDHSM0dqg,545
127
127
  instaui/components/markdown/markdown.js,sha256=ZlwxvQJ_0Fq1R-j-unfQTWMRswJ8GsYgLvd-wxVISGc,682
128
128
  instaui/components/markdown/markdown.py,sha256=2_ECsZPJ2P5hdP5-Kna0KwoFtHEzk8hgtTZ9rPX5Mds,978
@@ -233,8 +233,8 @@ instaui/template/env.py,sha256=ZqVsqpfSY1mupbgpBSkvOJytNui8xfNR5kNNC9rv4Ps,150
233
233
  instaui/template/web_template.py,sha256=BmZY13q4E_ZP4YVgfBKbbXvPHcGZfOl2f54wp_0DjJA,1603
234
234
  instaui/template/webview_template.py,sha256=AWDtsk-CbBOissWjIzjq-0gd8iVjKW7mjs70iGXmNcU,1629
235
235
  instaui/template/zero_template.py,sha256=E88VGsyjb1qbHFJlMW-xmLRFkwUXZA7VDoZ_Jd8YubA,3514
236
- instaui/ui/__init__.py,sha256=svj4zXW2uUzfNJBbs6yjXRemDvKQqIgeaakcVuTmLTQ,4167
237
- instaui/ui/__init__.pyi,sha256=GTxfZRHVkwbbY1hGukp48qSPUY69QakxJxBll54dcpc,4071
236
+ instaui/ui/__init__.py,sha256=giH6uvCsXsHh8TaUiyXI4eROFajVpYJM1NrLgVSQgoo,4173
237
+ instaui/ui/__init__.pyi,sha256=NDj1z4wfqbImEAwaBic1115_AtuGLIcsiMkxPn_usA4,4077
238
238
  instaui/ui/events.py,sha256=lfhiINwn-Kh0MezsSeLJPttWm6G1aWiwyk3TRo0NrlA,809
239
239
  instaui/ui_functions/input_slient_data.py,sha256=0A5DegIt_MqdZgbj1RiVFNmB_RUqgov9FYtkw6VX0DE,511
240
240
  instaui/ui_functions/server.py,sha256=B4w8KwBUMGStY19uUG8E4vRG7-L4cedttLkh35xr698,357
@@ -242,7 +242,6 @@ instaui/ui_functions/str_format.py,sha256=ECWttA4LlNHlvdT_73wGF_I68soWNEXTP_Hosm
242
242
  instaui/ui_functions/ui_page.py,sha256=2JeBpXJ0xb4OG88l6xagynlE76OzGRzdEthP_Jw4Jbg,363
243
243
  instaui/ui_functions/ui_types.py,sha256=J5tqFFkoZJMuoLeTqU52KNgw3kdB_IfcrhaBmyI6NAA,505
244
244
  instaui/ui_functions/url_location.py,sha256=zyTAJpA-3GBBe7WAiP2IDKQxeQhu0LNgBOxwEzcDaDk,823
245
- instaui/vars/__init__.py,sha256=yR-gU9FPEYUjWD7CS3RKT0JeAEuF2EPG99AwXFiLhAg,250
246
245
  instaui/vars/_types.py,sha256=wthCk1fcxj1SZ5y6b84W9gFpoi8j2PYnfmaPj4Am72s,308
247
246
  instaui/vars/data.py,sha256=uxDN-Xa5wO-_QFZYkiYOACnb9Ve8yODSFNIUs-S_E0I,1768
248
247
  instaui/vars/element_ref.py,sha256=qC-Kb1hBGz_Y6WKjKxRvYR8jdvWW4VeAAGzJ2wSrGgI,1059
@@ -280,7 +279,7 @@ instaui/webview/resource.py,sha256=kFT6N5UZK5GLE0KmW3TrEYDNlViw9DL2OshRh41wBXs,5
280
279
  instaui/zero/__init__.py,sha256=N0LuRUAcaurxHSspcEDuwZg62W2S3qL4VtrMKxOivBE,49
281
280
  instaui/zero/func.py,sha256=8cA_wJMtRmoAARjWY8yY5MmLXDAQ7hyVW6f1Vbejtoc,3576
282
281
  instaui/zero/scope.py,sha256=HGohYOqnpRGVkkoz_gvR6-DgCc48AtJAcDwbOnnGHLM,3753
283
- instaui-0.1.6.dist-info/LICENSE,sha256=_JjnAWrikJ6qkwT7PazeFNRlcIu8q_RH3mYcHTxEF5c,1094
284
- instaui-0.1.6.dist-info/METADATA,sha256=ztDw7jTs04ieDWynNLuO7mmf7tORrao4ThU51OhU4ic,3636
285
- instaui-0.1.6.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
286
- instaui-0.1.6.dist-info/RECORD,,
282
+ instaui-0.1.8.dist-info/LICENSE,sha256=_JjnAWrikJ6qkwT7PazeFNRlcIu8q_RH3mYcHTxEF5c,1094
283
+ instaui-0.1.8.dist-info/METADATA,sha256=QOxw5WEHpeqJoc9PIg1YNwHFTVpfI90-KmAQImYlF00,3758
284
+ instaui-0.1.8.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
285
+ instaui-0.1.8.dist-info/RECORD,,
instaui/vars/__init__.py DELETED
@@ -1,13 +0,0 @@
1
- from .ref import Ref
2
- from .web_computed import WebComputed
3
- from .vfor_item import VForItem
4
- from .types import TRefOrComputed, TMaybeRef
5
-
6
-
7
- __all__ = [
8
- "Ref",
9
- "WebComputed",
10
- "TRefOrComputed",
11
- "TMaybeRef",
12
- "VForItem",
13
- ]