Skip to content

Commit 39da464

Browse files
Merge remote-tracking branch 'upstream/main' into more-cached-type-hints
2 parents fb3f51b + 3c11451 commit 39da464

26 files changed

Lines changed: 974 additions & 784 deletions

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bookworm",
2+
"image": "mcr.microsoft.com/devcontainers/python:3.14-trixie",
33
"postCreateCommand": "/bin/bash -c 'python -m pip install uv && python -m uv sync & git clone https://github.com/reflex-dev/reflex-examples; wait'",
44
"forwardPorts": [3000, 8000],
55
"portsAttributes": {

pyi_hashes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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 = [
@@ -244,7 +244,7 @@ fail_fast = true
244244

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

reflex/assets.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ def asset(
9292
if not dst_file.exists() and (
9393
not dst_file.is_symlink() or dst_file.resolve() != src_file_shared.resolve()
9494
):
95-
dst_file.symlink_to(src_file_shared)
95+
try:
96+
dst_file.symlink_to(src_file_shared)
97+
except FileExistsError:
98+
# This happens when Simon builds the app on a bind mount in a docker container.
99+
dst_file.unlink()
100+
dst_file.symlink_to(src_file_shared)
96101

97102
return f"/{external}/{subfolder}/{path}"

reflex/compiler/templates.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ def vite_config_template(
502502
force_full_reload: bool,
503503
experimental_hmr: bool,
504504
sourcemap: bool | Literal["inline", "hidden"],
505+
allowed_hosts: bool | list[str] = False,
505506
):
506507
"""Template for vite.config.js.
507508
@@ -511,10 +512,17 @@ def vite_config_template(
511512
force_full_reload: Whether to force a full reload on changes.
512513
experimental_hmr: Whether to enable experimental HMR features.
513514
sourcemap: The sourcemap configuration.
515+
allowed_hosts: Allow all hosts (True), specific hosts (list of strings), or only localhost (False).
514516
515517
Returns:
516518
Rendered vite.config.js content as string.
517519
"""
520+
if allowed_hosts is True:
521+
allowed_hosts_line = "\n allowedHosts: true,"
522+
elif isinstance(allowed_hosts, list) and allowed_hosts:
523+
allowed_hosts_line = f"\n allowedHosts: {json.dumps(allowed_hosts)},"
524+
else:
525+
allowed_hosts_line = ""
518526
return rf"""import {{ fileURLToPath, URL }} from "url";
519527
import {{ reactRouter }} from "@react-router/dev/vite";
520528
import {{ defineConfig }} from "vite";
@@ -586,7 +594,7 @@ def vite_config_template(
586594
hmr: {"true" if experimental_hmr else "false"},
587595
}},
588596
server: {{
589-
port: process.env.PORT,
597+
port: process.env.PORT,{allowed_hosts_line}
590598
hmr: {"true" if hmr else "false"},
591599
watch: {{
592600
ignored: [

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: 1 addition & 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

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

0 commit comments

Comments
 (0)