Skip to content

Commit bea6ba7

Browse files
Merge remote-tracking branch 'upstream' into try-orjson
2 parents ba64ea2 + e7c3742 commit bea6ba7

21 files changed

Lines changed: 831 additions & 887 deletions

File tree

pyi_hashes.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"reflex/components/core/window_events.pyi": "af33ccec866b9540ee7fbec6dbfbd151",
2424
"reflex/components/datadisplay/__init__.pyi": "52755871369acbfd3a96b46b9a11d32e",
2525
"reflex/components/datadisplay/code.pyi": "b86769987ef4d1cbdddb461be88539fd",
26-
"reflex/components/datadisplay/dataeditor.pyi": "d2a749db7e279972d4bc1f4de63a7c41",
26+
"reflex/components/datadisplay/dataeditor.pyi": "f8c1e816c9f22f4a7429f812214407f2",
2727
"reflex/components/datadisplay/shiki_code_block.pyi": "1d53e75b6be0d3385a342e7b3011babd",
2828
"reflex/components/el/__init__.pyi": "0adfd001a926a2a40aee94f6fa725ecc",
2929
"reflex/components/el/element.pyi": "c5974a92fbc310e42d0f6cfdd13472f4",
@@ -39,7 +39,7 @@
3939
"reflex/components/el/elements/tables.pyi": "686eb70ea7d8c4dafb0cc5c284e76184",
4040
"reflex/components/el/elements/typography.pyi": "684e83dde887dba12badd0fb75c87c04",
4141
"reflex/components/gridjs/datatable.pyi": "98a7e1b3f3b60cafcdfcd8879750ee42",
42-
"reflex/components/lucide/icon.pyi": "9cdd1107295f5c4b6d5d6516f487f237",
42+
"reflex/components/lucide/icon.pyi": "dcb8773ef162f3ec5759efe11374cf5e",
4343
"reflex/components/markdown/markdown.pyi": "dd74e8e9665b2a813ff799a7aa190b44",
4444
"reflex/components/moment/moment.pyi": "e1952f1c2c82cef85d91e970d1be64ab",
4545
"reflex/components/plotly/plotly.pyi": "4311a0aae2abcc9226abb6a273f96372",
@@ -113,10 +113,10 @@
113113
"reflex/components/react_player/video.pyi": "998671c06103d797c554d9278eb3b2a0",
114114
"reflex/components/react_router/dom.pyi": "3042fa630b7e26a7378fe045d7fbf4af",
115115
"reflex/components/recharts/__init__.pyi": "6ee7f1ca2c0912f389ba6f3251a74d99",
116-
"reflex/components/recharts/cartesian.pyi": "cfca4f880239ffaecdf9fb4c7c8caed5",
116+
"reflex/components/recharts/cartesian.pyi": "d138261ab8259d5208c2f028b9f708bd",
117117
"reflex/components/recharts/charts.pyi": "013036b9c00ad85a570efdb813c1bc40",
118118
"reflex/components/recharts/general.pyi": "d87ff9b85b2a204be01753690df4fb11",
119-
"reflex/components/recharts/polar.pyi": "ad24bd37c6acc0bc9bd4ac01af3ffe49",
120-
"reflex/components/recharts/recharts.pyi": "c41d19ab67972246c574098929bea7ea",
119+
"reflex/components/recharts/polar.pyi": "b8b1a3e996e066facdf4f8c9eb363137",
120+
"reflex/components/recharts/recharts.pyi": "d5c9fc57a03b419748f0408c23319eee",
121121
"reflex/components/sonner/toast.pyi": "3c27bad1aaeb5183eaa6a41e77e8d7f0"
122122
}

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "reflex"
3-
version = "0.8.27dev1"
3+
version = "0.8.28dev1"
44
description = "Web apps in pure Python."
55
license.text = "Apache-2.0"
66
authors = [
@@ -246,7 +246,7 @@ fail_fast = true
246246

247247
[[tool.pre-commit.repos]]
248248
repo = "https://github.com/astral-sh/ruff-pre-commit"
249-
rev = "v0.14.13"
249+
rev = "v0.15.1"
250250
hooks = [
251251
{ id = "ruff-format", args = [
252252
"reflex",

reflex/app.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@
7777
from reflex.event import (
7878
_EVENT_FIELDS,
7979
Event,
80-
EventHandler,
8180
EventSpec,
8281
EventType,
8382
IndividualEventType,
8483
get_hydrate_event,
8584
noop,
8685
)
86+
from reflex.istate.proxy import StateProxy
8787
from reflex.page import DECORATED_PAGES
8888
from reflex.route import (
8989
get_route_args,
@@ -1618,6 +1618,8 @@ def _process_background(
16181618
if not handler.is_background:
16191619
return None
16201620

1621+
substate = StateProxy(substate)
1622+
16211623
async def _coro():
16221624
"""Coroutine to process the event and emit updates inside an asyncio.Task.
16231625
@@ -1933,21 +1935,14 @@ async def upload_file(request: Request):
19331935
substate_token = _substate_key(token, handler.rpartition(".")[0])
19341936
state = await app.state_manager.get_state(substate_token)
19351937

1936-
# get the current session ID
1937-
# get the current state(parent state/substate)
1938-
path = handler.split(".")[:-1]
1939-
current_state = state.get_substate(path)
19401938
handler_upload_param = ()
19411939

1942-
# get handler function
1943-
func = getattr(type(current_state), handler.split(".")[-1])
1940+
_current_state, event_handler = state._get_event_handler(handler)
19441941

1945-
# check if there exists any handler args with annotation, list[UploadFile]
1946-
if isinstance(func, EventHandler):
1947-
if func.is_background:
1948-
msg = f"@rx.event(background=True) is not supported for upload handler `{handler}`."
1949-
raise UploadTypeError(msg)
1950-
func = func.fn
1942+
if event_handler.is_background:
1943+
msg = f"@rx.event(background=True) is not supported for upload handler `{handler}`."
1944+
raise UploadTypeError(msg)
1945+
func = event_handler.fn
19511946
if isinstance(func, functools.partial):
19521947
func = func.func
19531948
for k, v in get_type_hints(func).items():

reflex/components/base/error_boundary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def on_error_spec(
3636
class ErrorBoundary(Component):
3737
"""A React Error Boundary component that catches unhandled frontend exceptions."""
3838

39-
library = "react-error-boundary@6.1.0"
39+
library = "react-error-boundary@6.1.1"
4040
tag = "ErrorBoundary"
4141

4242
# Fired when the boundary catches an error.

reflex/components/core/upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class GhostUpload(Fragment):
221221
class Upload(MemoizationLeaf):
222222
"""A file upload component."""
223223

224-
library = "react-dropzone@14.3.8"
224+
library = "react-dropzone@15.0.0"
225225

226226
tag = ""
227227

reflex/components/datadisplay/dataeditor.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class DataEditor(NoSSRComponent):
182182
is_default = True
183183
library: str | None = "@glideapps/glide-data-grid@6.0.3"
184184
lib_dependencies: list[str] = [
185-
"lodash@4.17.21",
185+
"lodash@4.17.23",
186186
"react-responsive-carousel@3.2.23",
187187
]
188188

@@ -291,6 +291,9 @@ class DataEditor(NoSSRComponent):
291291
# Controls which types of row selections can exist at the same time. ("exclusive", "mixed").
292292
row_selection_blending: Var[Literal["exclusive", "mixed"]]
293293

294+
# Controls row marker selection behavior. "auto" adapts to touch/mouse, "multi" acts as if Ctrl is pressed. ("auto", "multi").
295+
row_selection_mode: Var[Literal["auto", "multi"]]
296+
294297
# Controls how spans are handled in selections. ("default", "allowPartial").
295298
span_range_behavior: Var[Literal["default", "allowPartial"]]
296299

@@ -357,6 +360,12 @@ class DataEditor(NoSSRComponent):
357360
# Fired when a column is resized.
358361
on_column_resize: EventHandler[passthrough_event_spec(GridColumn, int)]
359362

363+
# Shows search bar.
364+
show_search: Var[bool]
365+
366+
# Fired when the search close button is clicked.
367+
on_search_close: EventHandler[no_args_event_spec]
368+
360369
def add_imports(self) -> ImportDict:
361370
"""Add imports for the component.
362371

reflex/components/lucide/icon.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from reflex.vars.base import LiteralVar, Var
77
from reflex.vars.sequence import LiteralStringVar, StringVar
88

9-
LUCIDE_LIBRARY = "lucide-react@0.562.0"
9+
LUCIDE_LIBRARY = "lucide-react@0.574.0"
1010

1111

1212
class LucideIconComponent(Component):
@@ -627,6 +627,7 @@ def _get_imports(self):
627627
"cylinder",
628628
"dam",
629629
"database_backup",
630+
"database_search",
630631
"database_zap",
631632
"database",
632633
"decimals_arrow_left",
@@ -864,6 +865,7 @@ def _get_imports(self):
864865
"git_compare",
865866
"git_fork",
866867
"git_graph",
868+
"git_merge_conflict",
867869
"git_merge",
868870
"git_pull_request_arrow",
869871
"git_pull_request_closed",
@@ -876,6 +878,8 @@ def _get_imports(self):
876878
"glass_water",
877879
"glasses",
878880
"globe_lock",
881+
"globe_off",
882+
"globe_x",
879883
"globe",
880884
"goal",
881885
"gpu",
@@ -1012,6 +1016,8 @@ def _get_imports(self):
10121016
"leaf",
10131017
"leafy_green",
10141018
"lectern",
1019+
"lens_concave",
1020+
"lens_convex",
10151021
"letter_text",
10161022
"library_big",
10171023
"library",
@@ -1020,6 +1026,7 @@ def _get_imports(self):
10201026
"lightbulb_off",
10211027
"lightbulb",
10221028
"line_chart",
1029+
"line_dot_right_horizontal",
10231030
"line_squiggle",
10241031
"link_2_off",
10251032
"link_2",
@@ -1097,6 +1104,7 @@ def _get_imports(self):
10971104
"memory_stick",
10981105
"menu",
10991106
"merge",
1107+
"message_circle_check",
11001108
"message_circle_code",
11011109
"message_circle_dashed",
11021110
"message_circle_heart",
@@ -1137,6 +1145,8 @@ def _get_imports(self):
11371145
"minimize_2",
11381146
"minimize",
11391147
"minus",
1148+
"mirror_rectangular",
1149+
"mirror_round",
11401150
"monitor_check",
11411151
"monitor_cloud",
11421152
"monitor_cog",
@@ -1156,6 +1166,7 @@ def _get_imports(self):
11561166
"motorbike",
11571167
"mountain_snow",
11581168
"mountain",
1169+
"mouse_left",
11591170
"mouse_off",
11601171
"mouse_pointer_2_off",
11611172
"mouse_pointer_2",
@@ -1305,6 +1316,7 @@ def _get_imports(self):
13051316
"power",
13061317
"presentation",
13071318
"printer_check",
1319+
"printer_x",
13081320
"printer",
13091321
"projector",
13101322
"proportions",
@@ -1432,6 +1444,7 @@ def _get_imports(self):
14321444
"share",
14331445
"sheet",
14341446
"shell",
1447+
"shelving_unit",
14351448
"shield_alert",
14361449
"shield_ban",
14371450
"shield_check",
@@ -1660,6 +1673,7 @@ def _get_imports(self):
16601673
"torus",
16611674
"touchpad_off",
16621675
"touchpad",
1676+
"towel_rack",
16631677
"tower_control",
16641678
"toy_brick",
16651679
"tractor",
@@ -1714,12 +1728,14 @@ def _get_imports(self):
17141728
"usb",
17151729
"user_check",
17161730
"user_cog",
1731+
"user_key",
17171732
"user_lock",
17181733
"user_minus",
17191734
"user_pen",
17201735
"user_plus",
17211736
"user_round_check",
17221737
"user_round_cog",
1738+
"user_round_key",
17231739
"user_round_minus",
17241740
"user_round_pen",
17251741
"user_round_plus",
@@ -1795,12 +1811,14 @@ def _get_imports(self):
17951811
"worm",
17961812
"wrap_text",
17971813
"wrench",
1814+
"x_line_top",
17981815
"x",
17991816
"youtube",
18001817
"zap_off",
18011818
"zap",
18021819
"zoom_in",
18031820
"zoom_out",
1821+
# "mouse_right",
18041822
]
18051823

18061824
# The default transformation of some icon names doesn't match how the

reflex/components/moment/moment.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Moment(NoSSRComponent):
2929

3030
tag: str | None = "Moment"
3131
is_default = True
32-
library: str | None = "react-moment@1.2.0"
32+
library: str | None = "react-moment@1.2.2"
3333
lib_dependencies: list[str] = ["moment@2.30.1"]
3434

3535
# How often the date update (how often time update / 0 to disable).
@@ -53,6 +53,9 @@ class Moment(NoSSRComponent):
5353
# Displays the date as the time from now, e.g. "5 minutes ago".
5454
from_now: Var[bool]
5555

56+
# Displays the relative time in a short format using abbreviated units (e.g., "1h", "2d", "3mo", "1y" instead of "1 hour ago", "2 days ago", etc.).
57+
from_now_short: Var[bool]
58+
5659
# Setting fromNowDuring will display the relative time as with fromNow but just during its value in milliseconds, after that format will be used instead.
5760
from_now_during: Var[int]
5861

reflex/components/radix/themes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class RadixLoadingProp(Component):
109109
class RadixThemesComponent(Component):
110110
"""Base class for all @radix-ui/themes components."""
111111

112-
library = "@radix-ui/themes@3.2.1"
112+
library = "@radix-ui/themes@3.3.0"
113113

114114
# "Fake" prop color_scheme is used to avoid shadowing CSS prop "color".
115115
_rename_props: ClassVar[dict[str, str]] = {"colorScheme": "color"}

reflex/components/recharts/cartesian.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,6 @@ class Brush(Recharts):
241241
# The default end index of brush. If the option is not set, the end index will be calculated by the length of data.
242242
end_index: Var[int]
243243

244-
# The fill color of brush
245-
fill: Var[str | Color]
246-
247-
# The stroke color of brush
248-
stroke: Var[str | Color]
249-
250244
@classmethod
251245
def get_event_triggers(cls) -> dict[str, Var | Any]:
252246
"""Get the event triggers that pass the component's value to the handler.

0 commit comments

Comments
 (0)