reflex 0.7.0a5__py3-none-any.whl → 0.7.1a2__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.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -1
- reflex/__init__.py +1 -0
- reflex/__init__.pyi +1 -0
- reflex/app.py +255 -81
- reflex/base.py +4 -10
- reflex/compiler/compiler.py +46 -12
- reflex/compiler/templates.py +1 -2
- reflex/compiler/utils.py +23 -14
- reflex/components/base/bare.py +109 -16
- reflex/components/component.py +179 -124
- reflex/components/core/__init__.py +1 -0
- reflex/components/core/__init__.pyi +1 -0
- reflex/components/core/auto_scroll.py +111 -0
- reflex/components/core/auto_scroll.pyi +284 -0
- reflex/components/core/banner.py +40 -9
- reflex/components/core/banner.pyi +400 -87
- reflex/components/core/breakpoints.py +1 -1
- reflex/components/core/cond.py +0 -8
- reflex/components/core/foreach.py +12 -2
- reflex/components/core/html.pyi +200 -19
- reflex/components/core/match.py +4 -4
- reflex/components/core/sticky.pyi +874 -90
- reflex/components/core/upload.py +3 -5
- reflex/components/core/upload.pyi +2 -4
- reflex/components/datadisplay/code.py +36 -10
- reflex/components/datadisplay/code.pyi +1 -1
- reflex/components/datadisplay/dataeditor.py +1 -3
- reflex/components/datadisplay/dataeditor.pyi +1 -3
- reflex/components/el/elements/base.py +95 -17
- reflex/components/el/elements/base.pyi +278 -19
- reflex/components/el/elements/forms.py +124 -102
- reflex/components/el/elements/forms.pyi +2787 -365
- reflex/components/el/elements/inline.py +24 -15
- reflex/components/el/elements/inline.pyi +5655 -546
- reflex/components/el/elements/media.py +79 -95
- reflex/components/el/elements/media.pyi +5167 -565
- reflex/components/el/elements/metadata.py +19 -17
- reflex/components/el/elements/metadata.pyi +841 -89
- reflex/components/el/elements/other.py +3 -5
- reflex/components/el/elements/other.pyi +1404 -137
- reflex/components/el/elements/scripts.py +10 -13
- reflex/components/el/elements/scripts.pyi +634 -65
- reflex/components/el/elements/sectioning.pyi +3001 -286
- reflex/components/el/elements/tables.py +14 -35
- reflex/components/el/elements/tables.pyi +2029 -218
- reflex/components/el/elements/typography.py +10 -13
- reflex/components/el/elements/typography.pyi +3014 -297
- reflex/components/lucide/icon.py +22 -6
- reflex/components/markdown/markdown.py +30 -10
- reflex/components/markdown/markdown.pyi +3 -2
- reflex/components/plotly/plotly.py +1 -3
- reflex/components/plotly/plotly.pyi +1 -3
- reflex/components/radix/primitives/form.pyi +624 -93
- reflex/components/radix/themes/color_mode.py +1 -1
- reflex/components/radix/themes/color_mode.pyi +213 -31
- reflex/components/radix/themes/components/alert_dialog.pyi +199 -18
- reflex/components/radix/themes/components/badge.pyi +199 -18
- reflex/components/radix/themes/components/button.pyi +213 -31
- reflex/components/radix/themes/components/callout.pyi +1000 -95
- reflex/components/radix/themes/components/card.pyi +199 -18
- reflex/components/radix/themes/components/context_menu.py +79 -1
- reflex/components/radix/themes/components/context_menu.pyi +320 -1
- reflex/components/radix/themes/components/dialog.pyi +199 -18
- reflex/components/radix/themes/components/hover_card.pyi +199 -18
- reflex/components/radix/themes/components/icon_button.pyi +213 -31
- reflex/components/radix/themes/components/inset.pyi +199 -18
- reflex/components/radix/themes/components/popover.pyi +199 -18
- reflex/components/radix/themes/components/table.pyi +1437 -154
- reflex/components/radix/themes/components/text_area.py +2 -2
- reflex/components/radix/themes/components/text_area.pyi +201 -20
- reflex/components/radix/themes/components/text_field.py +1 -1
- reflex/components/radix/themes/components/text_field.pyi +444 -88
- reflex/components/radix/themes/layout/box.pyi +200 -19
- reflex/components/radix/themes/layout/center.pyi +199 -18
- reflex/components/radix/themes/layout/container.pyi +199 -18
- reflex/components/radix/themes/layout/flex.pyi +199 -18
- reflex/components/radix/themes/layout/grid.pyi +199 -18
- reflex/components/radix/themes/layout/list.pyi +604 -57
- reflex/components/radix/themes/layout/section.pyi +199 -18
- reflex/components/radix/themes/layout/spacer.pyi +199 -18
- reflex/components/radix/themes/layout/stack.pyi +597 -54
- reflex/components/radix/themes/typography/blockquote.pyi +200 -19
- reflex/components/radix/themes/typography/code.pyi +199 -18
- reflex/components/radix/themes/typography/heading.pyi +199 -18
- reflex/components/radix/themes/typography/link.pyi +238 -28
- reflex/components/radix/themes/typography/text.pyi +1394 -127
- reflex/components/react_player/react_player.py +1 -1
- reflex/components/react_player/react_player.pyi +1 -3
- reflex/components/sonner/toast.py +41 -12
- reflex/components/sonner/toast.pyi +20 -6
- reflex/components/tags/iter_tag.py +4 -0
- reflex/components/tags/tag.py +3 -3
- reflex/config.py +187 -28
- reflex/constants/__init__.py +2 -0
- reflex/constants/base.py +6 -0
- reflex/constants/compiler.py +9 -0
- reflex/constants/event.py +1 -0
- reflex/constants/installer.py +4 -5
- reflex/constants/utils.py +1 -3
- reflex/event.py +7 -16
- reflex/experimental/layout.pyi +597 -54
- reflex/py.typed +0 -0
- reflex/reflex.py +30 -41
- reflex/state.py +49 -44
- reflex/style.py +15 -22
- reflex/testing.py +2 -0
- reflex/utils/build.py +12 -0
- reflex/utils/console.py +4 -0
- reflex/utils/decorator.py +25 -0
- reflex/utils/exec.py +92 -34
- reflex/utils/format.py +35 -6
- reflex/utils/path_ops.py +16 -1
- reflex/utils/prerequisites.py +34 -8
- reflex/utils/processes.py +12 -13
- reflex/utils/serializers.py +20 -43
- reflex/utils/telemetry.py +4 -15
- reflex/utils/types.py +36 -66
- reflex/vars/base.py +53 -76
- reflex/vars/function.py +17 -5
- reflex/vars/number.py +1 -1
- reflex/vars/sequence.py +80 -4
- {reflex-0.7.0a5.dist-info → reflex-0.7.1a2.dist-info}/METADATA +4 -5
- {reflex-0.7.0a5.dist-info → reflex-0.7.1a2.dist-info}/RECORD +126 -122
- {reflex-0.7.0a5.dist-info → reflex-0.7.1a2.dist-info}/LICENSE +0 -0
- {reflex-0.7.0a5.dist-info → reflex-0.7.1a2.dist-info}/WHEEL +0 -0
- {reflex-0.7.0a5.dist-info → reflex-0.7.1a2.dist-info}/entry_points.txt +0 -0
reflex/components/core/html.pyi
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# ------------------- DO NOT EDIT ----------------------
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
|
-
from typing import Any, Dict, Optional, Union, overload
|
|
6
|
+
from typing import Any, Dict, Literal, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.el.elements.typography import Div
|
|
9
9
|
from reflex.event import EventType
|
|
@@ -19,30 +19,211 @@ class Html(Div):
|
|
|
19
19
|
dangerouslySetInnerHTML: Optional[
|
|
20
20
|
Union[Dict[str, str], Var[Dict[str, str]]]
|
|
21
21
|
] = None,
|
|
22
|
-
access_key: Optional[Union[Var[
|
|
22
|
+
access_key: Optional[Union[Var[str], str]] = None,
|
|
23
23
|
auto_capitalize: Optional[
|
|
24
|
-
Union[
|
|
24
|
+
Union[
|
|
25
|
+
Literal["characters", "none", "off", "on", "sentences", "words"],
|
|
26
|
+
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
|
27
|
+
]
|
|
25
28
|
] = None,
|
|
26
29
|
content_editable: Optional[
|
|
27
|
-
Union[
|
|
30
|
+
Union[
|
|
31
|
+
Literal["inherit", "plaintext-only", False, True],
|
|
32
|
+
Var[Literal["inherit", "plaintext-only", False, True]],
|
|
33
|
+
]
|
|
28
34
|
] = None,
|
|
29
|
-
context_menu: Optional[
|
|
30
|
-
|
|
31
|
-
] = None,
|
|
32
|
-
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
33
|
-
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
35
|
+
context_menu: Optional[Union[Var[str], str]] = None,
|
|
36
|
+
dir: Optional[Union[Var[str], str]] = None,
|
|
37
|
+
draggable: Optional[Union[Var[bool], bool]] = None,
|
|
34
38
|
enter_key_hint: Optional[
|
|
35
|
-
Union[
|
|
39
|
+
Union[
|
|
40
|
+
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
|
41
|
+
Var[
|
|
42
|
+
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
|
43
|
+
],
|
|
44
|
+
]
|
|
45
|
+
] = None,
|
|
46
|
+
hidden: Optional[Union[Var[bool], bool]] = None,
|
|
47
|
+
input_mode: Optional[
|
|
48
|
+
Union[
|
|
49
|
+
Literal[
|
|
50
|
+
"decimal",
|
|
51
|
+
"email",
|
|
52
|
+
"none",
|
|
53
|
+
"numeric",
|
|
54
|
+
"search",
|
|
55
|
+
"tel",
|
|
56
|
+
"text",
|
|
57
|
+
"url",
|
|
58
|
+
],
|
|
59
|
+
Var[
|
|
60
|
+
Literal[
|
|
61
|
+
"decimal",
|
|
62
|
+
"email",
|
|
63
|
+
"none",
|
|
64
|
+
"numeric",
|
|
65
|
+
"search",
|
|
66
|
+
"tel",
|
|
67
|
+
"text",
|
|
68
|
+
"url",
|
|
69
|
+
]
|
|
70
|
+
],
|
|
71
|
+
]
|
|
72
|
+
] = None,
|
|
73
|
+
item_prop: Optional[Union[Var[str], str]] = None,
|
|
74
|
+
lang: Optional[Union[Var[str], str]] = None,
|
|
75
|
+
role: Optional[
|
|
76
|
+
Union[
|
|
77
|
+
Literal[
|
|
78
|
+
"alert",
|
|
79
|
+
"alertdialog",
|
|
80
|
+
"application",
|
|
81
|
+
"article",
|
|
82
|
+
"banner",
|
|
83
|
+
"button",
|
|
84
|
+
"cell",
|
|
85
|
+
"checkbox",
|
|
86
|
+
"columnheader",
|
|
87
|
+
"combobox",
|
|
88
|
+
"complementary",
|
|
89
|
+
"contentinfo",
|
|
90
|
+
"definition",
|
|
91
|
+
"dialog",
|
|
92
|
+
"directory",
|
|
93
|
+
"document",
|
|
94
|
+
"feed",
|
|
95
|
+
"figure",
|
|
96
|
+
"form",
|
|
97
|
+
"grid",
|
|
98
|
+
"gridcell",
|
|
99
|
+
"group",
|
|
100
|
+
"heading",
|
|
101
|
+
"img",
|
|
102
|
+
"link",
|
|
103
|
+
"list",
|
|
104
|
+
"listbox",
|
|
105
|
+
"listitem",
|
|
106
|
+
"log",
|
|
107
|
+
"main",
|
|
108
|
+
"marquee",
|
|
109
|
+
"math",
|
|
110
|
+
"menu",
|
|
111
|
+
"menubar",
|
|
112
|
+
"menuitem",
|
|
113
|
+
"menuitemcheckbox",
|
|
114
|
+
"menuitemradio",
|
|
115
|
+
"navigation",
|
|
116
|
+
"none",
|
|
117
|
+
"note",
|
|
118
|
+
"option",
|
|
119
|
+
"presentation",
|
|
120
|
+
"progressbar",
|
|
121
|
+
"radio",
|
|
122
|
+
"radiogroup",
|
|
123
|
+
"region",
|
|
124
|
+
"row",
|
|
125
|
+
"rowgroup",
|
|
126
|
+
"rowheader",
|
|
127
|
+
"scrollbar",
|
|
128
|
+
"search",
|
|
129
|
+
"searchbox",
|
|
130
|
+
"separator",
|
|
131
|
+
"slider",
|
|
132
|
+
"spinbutton",
|
|
133
|
+
"status",
|
|
134
|
+
"switch",
|
|
135
|
+
"tab",
|
|
136
|
+
"table",
|
|
137
|
+
"tablist",
|
|
138
|
+
"tabpanel",
|
|
139
|
+
"term",
|
|
140
|
+
"textbox",
|
|
141
|
+
"timer",
|
|
142
|
+
"toolbar",
|
|
143
|
+
"tooltip",
|
|
144
|
+
"tree",
|
|
145
|
+
"treegrid",
|
|
146
|
+
"treeitem",
|
|
147
|
+
],
|
|
148
|
+
Var[
|
|
149
|
+
Literal[
|
|
150
|
+
"alert",
|
|
151
|
+
"alertdialog",
|
|
152
|
+
"application",
|
|
153
|
+
"article",
|
|
154
|
+
"banner",
|
|
155
|
+
"button",
|
|
156
|
+
"cell",
|
|
157
|
+
"checkbox",
|
|
158
|
+
"columnheader",
|
|
159
|
+
"combobox",
|
|
160
|
+
"complementary",
|
|
161
|
+
"contentinfo",
|
|
162
|
+
"definition",
|
|
163
|
+
"dialog",
|
|
164
|
+
"directory",
|
|
165
|
+
"document",
|
|
166
|
+
"feed",
|
|
167
|
+
"figure",
|
|
168
|
+
"form",
|
|
169
|
+
"grid",
|
|
170
|
+
"gridcell",
|
|
171
|
+
"group",
|
|
172
|
+
"heading",
|
|
173
|
+
"img",
|
|
174
|
+
"link",
|
|
175
|
+
"list",
|
|
176
|
+
"listbox",
|
|
177
|
+
"listitem",
|
|
178
|
+
"log",
|
|
179
|
+
"main",
|
|
180
|
+
"marquee",
|
|
181
|
+
"math",
|
|
182
|
+
"menu",
|
|
183
|
+
"menubar",
|
|
184
|
+
"menuitem",
|
|
185
|
+
"menuitemcheckbox",
|
|
186
|
+
"menuitemradio",
|
|
187
|
+
"navigation",
|
|
188
|
+
"none",
|
|
189
|
+
"note",
|
|
190
|
+
"option",
|
|
191
|
+
"presentation",
|
|
192
|
+
"progressbar",
|
|
193
|
+
"radio",
|
|
194
|
+
"radiogroup",
|
|
195
|
+
"region",
|
|
196
|
+
"row",
|
|
197
|
+
"rowgroup",
|
|
198
|
+
"rowheader",
|
|
199
|
+
"scrollbar",
|
|
200
|
+
"search",
|
|
201
|
+
"searchbox",
|
|
202
|
+
"separator",
|
|
203
|
+
"slider",
|
|
204
|
+
"spinbutton",
|
|
205
|
+
"status",
|
|
206
|
+
"switch",
|
|
207
|
+
"tab",
|
|
208
|
+
"table",
|
|
209
|
+
"tablist",
|
|
210
|
+
"tabpanel",
|
|
211
|
+
"term",
|
|
212
|
+
"textbox",
|
|
213
|
+
"timer",
|
|
214
|
+
"toolbar",
|
|
215
|
+
"tooltip",
|
|
216
|
+
"tree",
|
|
217
|
+
"treegrid",
|
|
218
|
+
"treeitem",
|
|
219
|
+
]
|
|
220
|
+
],
|
|
221
|
+
]
|
|
36
222
|
] = None,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
42
|
-
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
43
|
-
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
44
|
-
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
45
|
-
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
223
|
+
slot: Optional[Union[Var[str], str]] = None,
|
|
224
|
+
spell_check: Optional[Union[Var[bool], bool]] = None,
|
|
225
|
+
tab_index: Optional[Union[Var[int], int]] = None,
|
|
226
|
+
title: Optional[Union[Var[str], str]] = None,
|
|
46
227
|
style: Optional[Style] = None,
|
|
47
228
|
key: Optional[Any] = None,
|
|
48
229
|
id: Optional[Any] = None,
|
reflex/components/core/match.py
CHANGED
|
@@ -178,9 +178,9 @@ class Match(MemoizationLeaf):
|
|
|
178
178
|
first_case_return = match_cases[0][-1]
|
|
179
179
|
return_type = type(first_case_return)
|
|
180
180
|
|
|
181
|
-
if
|
|
181
|
+
if isinstance(first_case_return, BaseComponent):
|
|
182
182
|
return_type = BaseComponent
|
|
183
|
-
elif
|
|
183
|
+
elif isinstance(first_case_return, Var):
|
|
184
184
|
return_type = Var
|
|
185
185
|
|
|
186
186
|
for index, case in enumerate(match_cases):
|
|
@@ -228,8 +228,8 @@ class Match(MemoizationLeaf):
|
|
|
228
228
|
|
|
229
229
|
# Validate the match cases (as well as the default case) to have Var return types.
|
|
230
230
|
if any(
|
|
231
|
-
case for case in match_cases if not
|
|
232
|
-
) or not
|
|
231
|
+
case for case in match_cases if not isinstance(case[-1], Var)
|
|
232
|
+
) or not isinstance(default, Var):
|
|
233
233
|
raise ValueError("Return types of match cases should be Vars.")
|
|
234
234
|
|
|
235
235
|
return Var(
|