reflex 0.6.5__py3-none-any.whl → 0.6.5a1__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.
- reflex/components/core/upload.py +2 -10
- reflex/components/core/upload.pyi +0 -51
- reflex/components/radix/themes/base.py +0 -3
- reflex/state.py +9 -15
- {reflex-0.6.5.dist-info → reflex-0.6.5a1.dist-info}/METADATA +2 -2
- {reflex-0.6.5.dist-info → reflex-0.6.5a1.dist-info}/RECORD +9 -9
- {reflex-0.6.5.dist-info → reflex-0.6.5a1.dist-info}/LICENSE +0 -0
- {reflex-0.6.5.dist-info → reflex-0.6.5a1.dist-info}/WHEEL +0 -0
- {reflex-0.6.5.dist-info → reflex-0.6.5a1.dist-info}/entry_points.txt +0 -0
reflex/components/core/upload.py
CHANGED
|
@@ -5,7 +5,6 @@ from __future__ import annotations
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import Any, Callable, ClassVar, Dict, List, Optional, Tuple
|
|
7
7
|
|
|
8
|
-
from reflex.components.base.fragment import Fragment
|
|
9
8
|
from reflex.components.component import (
|
|
10
9
|
Component,
|
|
11
10
|
ComponentNamespace,
|
|
@@ -182,13 +181,6 @@ class UploadFilesProvider(Component):
|
|
|
182
181
|
tag = "UploadFilesProvider"
|
|
183
182
|
|
|
184
183
|
|
|
185
|
-
class GhostUpload(Fragment):
|
|
186
|
-
"""A ghost upload component."""
|
|
187
|
-
|
|
188
|
-
# Fired when files are dropped.
|
|
189
|
-
on_drop: EventHandler[_on_drop_spec]
|
|
190
|
-
|
|
191
|
-
|
|
192
184
|
class Upload(MemoizationLeaf):
|
|
193
185
|
"""A file upload component."""
|
|
194
186
|
|
|
@@ -284,8 +276,8 @@ class Upload(MemoizationLeaf):
|
|
|
284
276
|
root_props_unique_name = get_unique_variable_name()
|
|
285
277
|
|
|
286
278
|
event_var, callback_str = StatefulComponent._get_memoized_event_triggers(
|
|
287
|
-
|
|
288
|
-
)["
|
|
279
|
+
Box.create(on_click=upload_props["on_drop"]) # type: ignore
|
|
280
|
+
)["on_click"]
|
|
289
281
|
|
|
290
282
|
upload_props["on_drop"] = event_var
|
|
291
283
|
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from typing import Any, ClassVar, Dict, List, Optional, Union, overload
|
|
8
8
|
|
|
9
|
-
from reflex.components.base.fragment import Fragment
|
|
10
9
|
from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
|
|
11
10
|
from reflex.constants import Dirs
|
|
12
11
|
from reflex.event import BASE_STATE, CallableEventSpec, EventSpec, EventType
|
|
@@ -85,56 +84,6 @@ class UploadFilesProvider(Component):
|
|
|
85
84
|
"""
|
|
86
85
|
...
|
|
87
86
|
|
|
88
|
-
class GhostUpload(Fragment):
|
|
89
|
-
@overload
|
|
90
|
-
@classmethod
|
|
91
|
-
def create( # type: ignore
|
|
92
|
-
cls,
|
|
93
|
-
*children,
|
|
94
|
-
style: Optional[Style] = None,
|
|
95
|
-
key: Optional[Any] = None,
|
|
96
|
-
id: Optional[Any] = None,
|
|
97
|
-
class_name: Optional[Any] = None,
|
|
98
|
-
autofocus: Optional[bool] = None,
|
|
99
|
-
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
100
|
-
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
101
|
-
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
102
|
-
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
103
|
-
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
104
|
-
on_drop: Optional[
|
|
105
|
-
Union[EventType[[], BASE_STATE], EventType[[Any], BASE_STATE]]
|
|
106
|
-
] = None,
|
|
107
|
-
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
108
|
-
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
109
|
-
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
110
|
-
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
111
|
-
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
112
|
-
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
113
|
-
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
114
|
-
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
115
|
-
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
116
|
-
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
117
|
-
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
118
|
-
**props,
|
|
119
|
-
) -> "GhostUpload":
|
|
120
|
-
"""Create the component.
|
|
121
|
-
|
|
122
|
-
Args:
|
|
123
|
-
*children: The children of the component.
|
|
124
|
-
on_drop: Fired when files are dropped.
|
|
125
|
-
style: The style of the component.
|
|
126
|
-
key: A unique key for the component.
|
|
127
|
-
id: The id for the component.
|
|
128
|
-
class_name: The class name for the component.
|
|
129
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
130
|
-
custom_attrs: custom attribute
|
|
131
|
-
**props: The props of the component.
|
|
132
|
-
|
|
133
|
-
Returns:
|
|
134
|
-
The component.
|
|
135
|
-
"""
|
|
136
|
-
...
|
|
137
|
-
|
|
138
87
|
class Upload(MemoizationLeaf):
|
|
139
88
|
is_used: ClassVar[bool] = False
|
|
140
89
|
|
|
@@ -112,9 +112,6 @@ class RadixThemesComponent(Component):
|
|
|
112
112
|
|
|
113
113
|
library = "@radix-ui/themes@^3.0.0"
|
|
114
114
|
|
|
115
|
-
# Temporary pin < 3.1.5 until radix-ui/themes#627 is resolved.
|
|
116
|
-
library = library + " && <3.1.5"
|
|
117
|
-
|
|
118
115
|
# "Fake" prop color_scheme is used to avoid shadowing CSS prop "color".
|
|
119
116
|
_rename_props: Dict[str, str] = {"colorScheme": "color"}
|
|
120
117
|
|
reflex/state.py
CHANGED
|
@@ -46,7 +46,6 @@ from reflex import event
|
|
|
46
46
|
from reflex.config import get_config
|
|
47
47
|
from reflex.istate.data import RouterData
|
|
48
48
|
from reflex.istate.storage import ClientStorageBase
|
|
49
|
-
from reflex.model import Model
|
|
50
49
|
from reflex.vars.base import (
|
|
51
50
|
ComputedVar,
|
|
52
51
|
DynamicRouteVar,
|
|
@@ -1734,20 +1733,15 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
|
|
|
1734
1733
|
if value is None:
|
|
1735
1734
|
continue
|
|
1736
1735
|
hinted_args = value_inside_optional(hinted_args)
|
|
1737
|
-
if
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
)
|
|
1747
|
-
elif dataclasses.is_dataclass(hinted_args) or issubclass(
|
|
1748
|
-
hinted_args, Base
|
|
1749
|
-
):
|
|
1750
|
-
payload[arg] = hinted_args(**value)
|
|
1736
|
+
if (
|
|
1737
|
+
isinstance(value, dict)
|
|
1738
|
+
and inspect.isclass(hinted_args)
|
|
1739
|
+
and (
|
|
1740
|
+
dataclasses.is_dataclass(hinted_args)
|
|
1741
|
+
or issubclass(hinted_args, Base)
|
|
1742
|
+
)
|
|
1743
|
+
):
|
|
1744
|
+
payload[arg] = hinted_args(**value)
|
|
1751
1745
|
if isinstance(value, list) and (hinted_args is set or hinted_args is Set):
|
|
1752
1746
|
payload[arg] = set(value)
|
|
1753
1747
|
if isinstance(value, list) and (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: reflex
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.5a1
|
|
4
4
|
Summary: Web apps in pure Python.
|
|
5
5
|
Home-page: https://reflex.dev
|
|
6
6
|
License: Apache-2.0
|
|
@@ -33,7 +33,7 @@ Requires-Dist: python-multipart (>=0.0.5,<0.1)
|
|
|
33
33
|
Requires-Dist: python-socketio (>=5.7.0,<6.0)
|
|
34
34
|
Requires-Dist: redis (>=4.3.5,<6.0)
|
|
35
35
|
Requires-Dist: reflex-chakra (>=0.6.0)
|
|
36
|
-
Requires-Dist: reflex-hosting-cli (>=0.1.
|
|
36
|
+
Requires-Dist: reflex-hosting-cli (>=0.1.5,<2.0)
|
|
37
37
|
Requires-Dist: rich (>=13.0.0,<14.0)
|
|
38
38
|
Requires-Dist: setuptools (>=75.0)
|
|
39
39
|
Requires-Dist: sqlmodel (>=0.0.14,<0.1)
|
|
@@ -93,8 +93,8 @@ reflex/components/core/html.pyi,sha256=VPpzNa7VORqu1IDQae4NbHXsCFzo2mELV8kIdCveN
|
|
|
93
93
|
reflex/components/core/layout/__init__.py,sha256=znldZaj_NGt8qCZDG70GMwjMTskcvCf_2N_EjCAHwdc,30
|
|
94
94
|
reflex/components/core/match.py,sha256=xhzO8LHl99Gd6yoPJ-UFZsPqilHwZJ7SWJmhly5_exE,9102
|
|
95
95
|
reflex/components/core/responsive.py,sha256=ACZdtJ4a4F8B3dm1k8h6J2_UJx0Z5LDB7XHQ2ty4wAc,1911
|
|
96
|
-
reflex/components/core/upload.py,sha256=
|
|
97
|
-
reflex/components/core/upload.pyi,sha256=
|
|
96
|
+
reflex/components/core/upload.py,sha256=NQg4bAD7eEMEjBQdA8cowYavExSfF7gY4vCuaN3shS8,11673
|
|
97
|
+
reflex/components/core/upload.pyi,sha256=a1gu_G01irhgaPsBMY4Z8putbH7_zqDUOz3yw3nKaWc,13936
|
|
98
98
|
reflex/components/datadisplay/__init__.py,sha256=L8pWWKNHWdUD2fbZRoEKjd_8c_hpDdGYO463hwkoIi4,438
|
|
99
99
|
reflex/components/datadisplay/__init__.pyi,sha256=rYMwO_X4NvUex6IL2MMTnhdFRp8Lz5zweMwXaW_l7nc,588
|
|
100
100
|
reflex/components/datadisplay/code.py,sha256=apunYV9nuExEzSq2yhF6D26_6lwplqrUQXOBSZ1ic1I,14117
|
|
@@ -179,7 +179,7 @@ reflex/components/radix/primitives/slider.py,sha256=eAH8WbdkMth8Lto8YcfV1uv_rozM
|
|
|
179
179
|
reflex/components/radix/primitives/slider.pyi,sha256=lOaJoXureA0MutJY28UpC6T26Ol_UgTsXWDnCs90_vg,13077
|
|
180
180
|
reflex/components/radix/themes/__init__.py,sha256=3ASzR_OrjkLXZ6CksGKIQPOcyYZ984NzXrn2UCIdxUc,492
|
|
181
181
|
reflex/components/radix/themes/__init__.pyi,sha256=RVeS7TipR51MgmsWJStZwh4QxKBtOMtCguBtVbUJqX8,476
|
|
182
|
-
reflex/components/radix/themes/base.py,sha256
|
|
182
|
+
reflex/components/radix/themes/base.py,sha256=-ZWXzglswR08WMMoErTbpluX1T92Jwe_5GDK9pD5uhM,8905
|
|
183
183
|
reflex/components/radix/themes/base.pyi,sha256=WN5yCygEK3TUd1oGDw6DwihnLcBUv2N_srSKn50JRIU,28267
|
|
184
184
|
reflex/components/radix/themes/color_mode.py,sha256=sokLGgallrIJpKl_qgIJ75yE2qreR645Tl-daboQ1IU,6430
|
|
185
185
|
reflex/components/radix/themes/color_mode.pyi,sha256=GuheseSsmI8I_T4gJC7PluSOaIJ-FkxfV4xhxW8VUws,20031
|
|
@@ -357,7 +357,7 @@ reflex/model.py,sha256=AaCs6V9iWFj-EZI7zfXL1LTy-TrnNfJKVit2MPqLM8M,14139
|
|
|
357
357
|
reflex/page.py,sha256=N85R5tTI-NoFd9ArwYCN8OcV9aSPZIPrJI2ZFbH8ytk,2389
|
|
358
358
|
reflex/reflex.py,sha256=R8_NLSfX2IhlZlZkXvlIWMS9FUGNqzOHB2NcP-GYSMY,22705
|
|
359
359
|
reflex/route.py,sha256=WZS7stKgO94nekFFYHaOqNgN3zZGpJb3YpGF4ViTHmw,4198
|
|
360
|
-
reflex/state.py,sha256=
|
|
360
|
+
reflex/state.py,sha256=SkLd68t6lH64-gkekc4Jl7bw9kdUpK6rKB9_23M_ZEY,131617
|
|
361
361
|
reflex/style.py,sha256=-mBrpaq23jiNJIwgCir6Fzj182u9rGpp3qZ2cUt5aZs,12695
|
|
362
362
|
reflex/testing.py,sha256=qkLVNeLcD3uxTg95WuV1IYoEhkmEdJ7o8Fbc8NaeoRQ,34792
|
|
363
363
|
reflex/utils/__init__.py,sha256=y-AHKiRQAhk2oAkvn7W8cRVTZVK625ff8tTwvZtO7S4,24
|
|
@@ -387,8 +387,8 @@ reflex/vars/function.py,sha256=1E-yBhP3sOTVmVotSA6S8PY2c63yl0DJvr0oZh7j2bg,6854
|
|
|
387
387
|
reflex/vars/number.py,sha256=BeHQr4Cj2gdXekEWcxSzLTIuRAC3sf6YvsdHlADETpQ,27499
|
|
388
388
|
reflex/vars/object.py,sha256=dTfkkUGDmoxu7iPcKSnNJ-lTI48yoXbagUyA-lKwDDo,14335
|
|
389
389
|
reflex/vars/sequence.py,sha256=mlmOkSV8FIxwdJHzQdu3NzHAoNB4KcGc93dcmdviIoo,49916
|
|
390
|
-
reflex-0.6.
|
|
391
|
-
reflex-0.6.
|
|
392
|
-
reflex-0.6.
|
|
393
|
-
reflex-0.6.
|
|
394
|
-
reflex-0.6.
|
|
390
|
+
reflex-0.6.5a1.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
391
|
+
reflex-0.6.5a1.dist-info/METADATA,sha256=gccguwJAix5W7cgsUi8HVPL0oSoFcX7FOM5fal6ptwE,12057
|
|
392
|
+
reflex-0.6.5a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
393
|
+
reflex-0.6.5a1.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
|
|
394
|
+
reflex-0.6.5a1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|