reflex 0.8.0a5__py3-none-any.whl → 0.8.0a6__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.

Files changed (145) hide show
  1. reflex/.templates/jinja/web/pages/_app.js.jinja2 +1 -1
  2. reflex/.templates/web/utils/state.js +78 -31
  3. reflex/__init__.pyi +327 -188
  4. reflex/app.py +17 -7
  5. reflex/compiler/compiler.py +3 -1
  6. reflex/compiler/utils.py +28 -12
  7. reflex/components/__init__.pyi +34 -15
  8. reflex/components/base/__init__.pyi +30 -19
  9. reflex/components/base/app_wrap.pyi +2 -3
  10. reflex/components/base/body.pyi +2 -3
  11. reflex/components/base/document.pyi +7 -13
  12. reflex/components/base/error_boundary.pyi +2 -3
  13. reflex/components/base/fragment.pyi +2 -3
  14. reflex/components/base/link.pyi +3 -5
  15. reflex/components/base/meta.pyi +14 -18
  16. reflex/components/base/script.pyi +2 -3
  17. reflex/components/base/strict_mode.pyi +2 -3
  18. reflex/components/core/__init__.pyi +77 -38
  19. reflex/components/core/auto_scroll.pyi +2 -3
  20. reflex/components/core/banner.pyi +8 -14
  21. reflex/components/core/client_side_routing.pyi +2 -3
  22. reflex/components/core/clipboard.pyi +2 -3
  23. reflex/components/core/debounce.pyi +2 -3
  24. reflex/components/core/helmet.pyi +2 -3
  25. reflex/components/core/html.pyi +2 -3
  26. reflex/components/core/sticky.pyi +4 -7
  27. reflex/components/core/upload.pyi +5 -9
  28. reflex/components/datadisplay/__init__.pyi +13 -7
  29. reflex/components/datadisplay/code.pyi +2 -3
  30. reflex/components/datadisplay/dataeditor.pyi +33 -11
  31. reflex/components/datadisplay/shiki_code_block.pyi +3 -5
  32. reflex/components/el/__init__.pyi +506 -246
  33. reflex/components/el/element.pyi +2 -3
  34. reflex/components/el/elements/__init__.pyi +504 -245
  35. reflex/components/el/elements/base.pyi +2 -3
  36. reflex/components/el/elements/forms.pyi +77 -49
  37. reflex/components/el/elements/inline.pyi +29 -57
  38. reflex/components/el/elements/media.pyi +26 -51
  39. reflex/components/el/elements/metadata.pyi +7 -13
  40. reflex/components/el/elements/other.pyi +8 -15
  41. reflex/components/el/elements/scripts.pyi +4 -7
  42. reflex/components/el/elements/sectioning.pyi +16 -31
  43. reflex/components/el/elements/tables.pyi +11 -21
  44. reflex/components/el/elements/typography.pyi +16 -31
  45. reflex/components/gridjs/datatable.pyi +3 -5
  46. reflex/components/lucide/icon.pyi +4 -7
  47. reflex/components/markdown/markdown.pyi +2 -3
  48. reflex/components/moment/moment.py +1 -1
  49. reflex/components/moment/moment.pyi +2 -3
  50. reflex/components/plotly/plotly.pyi +31 -39
  51. reflex/components/radix/__init__.pyi +123 -65
  52. reflex/components/radix/primitives/__init__.pyi +6 -4
  53. reflex/components/radix/primitives/accordion.pyi +8 -15
  54. reflex/components/radix/primitives/base.pyi +3 -5
  55. reflex/components/radix/primitives/drawer.pyi +11 -21
  56. reflex/components/radix/primitives/form.pyi +22 -22
  57. reflex/components/radix/primitives/progress.pyi +5 -9
  58. reflex/components/radix/primitives/slider.pyi +6 -11
  59. reflex/components/radix/themes/__init__.pyi +5 -6
  60. reflex/components/radix/themes/base.pyi +9 -17
  61. reflex/components/radix/themes/color_mode.pyi +4 -7
  62. reflex/components/radix/themes/components/__init__.pyi +75 -38
  63. reflex/components/radix/themes/components/alert_dialog.pyi +8 -15
  64. reflex/components/radix/themes/components/aspect_ratio.pyi +2 -3
  65. reflex/components/radix/themes/components/avatar.pyi +2 -3
  66. reflex/components/radix/themes/components/badge.pyi +2 -3
  67. reflex/components/radix/themes/components/button.pyi +2 -3
  68. reflex/components/radix/themes/components/callout.pyi +5 -9
  69. reflex/components/radix/themes/components/card.pyi +2 -3
  70. reflex/components/radix/themes/components/checkbox.pyi +3 -5
  71. reflex/components/radix/themes/components/checkbox_cards.pyi +3 -5
  72. reflex/components/radix/themes/components/checkbox_group.pyi +3 -5
  73. reflex/components/radix/themes/components/context_menu.pyi +14 -27
  74. reflex/components/radix/themes/components/data_list.pyi +5 -9
  75. reflex/components/radix/themes/components/dialog.pyi +7 -13
  76. reflex/components/radix/themes/components/dropdown_menu.pyi +9 -17
  77. reflex/components/radix/themes/components/hover_card.pyi +4 -7
  78. reflex/components/radix/themes/components/icon_button.pyi +2 -3
  79. reflex/components/radix/themes/components/inset.pyi +2 -3
  80. reflex/components/radix/themes/components/popover.pyi +5 -9
  81. reflex/components/radix/themes/components/progress.pyi +2 -3
  82. reflex/components/radix/themes/components/radio.pyi +2 -3
  83. reflex/components/radix/themes/components/radio_cards.pyi +3 -5
  84. reflex/components/radix/themes/components/radio_group.pyi +4 -7
  85. reflex/components/radix/themes/components/scroll_area.pyi +2 -3
  86. reflex/components/radix/themes/components/segmented_control.pyi +3 -5
  87. reflex/components/radix/themes/components/select.pyi +9 -17
  88. reflex/components/radix/themes/components/separator.pyi +2 -3
  89. reflex/components/radix/themes/components/skeleton.pyi +2 -3
  90. reflex/components/radix/themes/components/slider.pyi +12 -5
  91. reflex/components/radix/themes/components/spinner.pyi +2 -3
  92. reflex/components/radix/themes/components/switch.pyi +2 -3
  93. reflex/components/radix/themes/components/table.pyi +8 -15
  94. reflex/components/radix/themes/components/tabs.pyi +5 -9
  95. reflex/components/radix/themes/components/text_area.pyi +10 -5
  96. reflex/components/radix/themes/components/text_field.pyi +19 -9
  97. reflex/components/radix/themes/components/tooltip.pyi +2 -3
  98. reflex/components/radix/themes/layout/__init__.pyi +27 -14
  99. reflex/components/radix/themes/layout/base.pyi +2 -3
  100. reflex/components/radix/themes/layout/box.pyi +2 -3
  101. reflex/components/radix/themes/layout/center.pyi +2 -3
  102. reflex/components/radix/themes/layout/container.pyi +2 -3
  103. reflex/components/radix/themes/layout/flex.pyi +2 -3
  104. reflex/components/radix/themes/layout/grid.pyi +2 -3
  105. reflex/components/radix/themes/layout/list.pyi +5 -9
  106. reflex/components/radix/themes/layout/section.pyi +2 -3
  107. reflex/components/radix/themes/layout/spacer.pyi +2 -3
  108. reflex/components/radix/themes/layout/stack.pyi +4 -7
  109. reflex/components/radix/themes/typography/__init__.pyi +7 -5
  110. reflex/components/radix/themes/typography/blockquote.pyi +2 -3
  111. reflex/components/radix/themes/typography/code.pyi +2 -3
  112. reflex/components/radix/themes/typography/heading.pyi +2 -3
  113. reflex/components/radix/themes/typography/link.pyi +3 -5
  114. reflex/components/radix/themes/typography/text.pyi +7 -13
  115. reflex/components/react_player/audio.pyi +5 -4
  116. reflex/components/react_player/react_player.pyi +2 -3
  117. reflex/components/react_player/video.pyi +5 -4
  118. reflex/components/recharts/__init__.pyi +208 -100
  119. reflex/components/recharts/cartesian.py +0 -6
  120. reflex/components/recharts/cartesian.pyi +25 -48
  121. reflex/components/recharts/charts.pyi +13 -25
  122. reflex/components/recharts/general.pyi +7 -13
  123. reflex/components/recharts/polar.pyi +7 -13
  124. reflex/components/recharts/recharts.py +2 -2
  125. reflex/components/recharts/recharts.pyi +3 -5
  126. reflex/components/sonner/toast.py +1 -1
  127. reflex/components/sonner/toast.pyi +2 -3
  128. reflex/constants/installer.py +7 -8
  129. reflex/istate/__init__.py +69 -0
  130. reflex/istate/manager.py +1 -0
  131. reflex/plugins/shared_tailwind.py +58 -1
  132. reflex/plugins/tailwind_v3.py +4 -4
  133. reflex/plugins/tailwind_v4.py +6 -5
  134. reflex/state.py +17 -12
  135. reflex/testing.py +2 -1
  136. reflex/utils/exec.py +8 -3
  137. reflex/utils/imports.py +5 -12
  138. reflex/utils/prerequisites.py +1 -1
  139. reflex/utils/processes.py +8 -41
  140. reflex/utils/telemetry.py +0 -15
  141. {reflex-0.8.0a5.dist-info → reflex-0.8.0a6.dist-info}/METADATA +2 -2
  142. {reflex-0.8.0a5.dist-info → reflex-0.8.0a6.dist-info}/RECORD +145 -145
  143. {reflex-0.8.0a5.dist-info → reflex-0.8.0a6.dist-info}/WHEEL +0 -0
  144. {reflex-0.8.0a5.dist-info → reflex-0.8.0a6.dist-info}/entry_points.txt +0 -0
  145. {reflex-0.8.0a5.dist-info → reflex-0.8.0a6.dist-info}/licenses/LICENSE +0 -0
@@ -4,7 +4,7 @@
4
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
5
5
  # ------------------------------------------------------
6
6
  from collections.abc import Mapping, Sequence
7
- from typing import Any, Literal, overload
7
+ from typing import Any, Literal
8
8
 
9
9
  from reflex.components.core.breakpoints import Breakpoints
10
10
  from reflex.constants.colors import Color
@@ -14,9 +14,8 @@ from reflex.vars.base import Var
14
14
  from .recharts import RechartsCharts
15
15
 
16
16
  class ChartBase(RechartsCharts):
17
- @overload
18
17
  @classmethod
19
- def create( # type: ignore
18
+ def create(
20
19
  cls,
21
20
  *children,
22
21
  width: Var[int | str] | int | str | None = None,
@@ -74,9 +73,8 @@ class ChartBase(RechartsCharts):
74
73
  """
75
74
 
76
75
  class CategoricalChartBase(ChartBase):
77
- @overload
78
76
  @classmethod
79
- def create( # type: ignore
77
+ def create(
80
78
  cls,
81
79
  *children,
82
80
  data: Sequence[dict[str, Any]] | Var[Sequence[dict[str, Any]]] | None = None,
@@ -152,9 +150,8 @@ class CategoricalChartBase(ChartBase):
152
150
  """
153
151
 
154
152
  class AreaChart(CategoricalChartBase):
155
- @overload
156
153
  @classmethod
157
- def create( # type: ignore
154
+ def create(
158
155
  cls,
159
156
  *children,
160
157
  base_value: Literal["auto", "dataMax", "dataMin"]
@@ -235,9 +232,8 @@ class AreaChart(CategoricalChartBase):
235
232
  """
236
233
 
237
234
  class BarChart(CategoricalChartBase):
238
- @overload
239
235
  @classmethod
240
- def create( # type: ignore
236
+ def create(
241
237
  cls,
242
238
  *children,
243
239
  bar_category_gap: Var[int | str] | int | str | None = None,
@@ -323,9 +319,8 @@ class BarChart(CategoricalChartBase):
323
319
  """
324
320
 
325
321
  class LineChart(CategoricalChartBase):
326
- @overload
327
322
  @classmethod
328
- def create( # type: ignore
323
+ def create(
329
324
  cls,
330
325
  *children,
331
326
  data: Sequence[dict[str, Any]] | Var[Sequence[dict[str, Any]]] | None = None,
@@ -401,9 +396,8 @@ class LineChart(CategoricalChartBase):
401
396
  """
402
397
 
403
398
  class ComposedChart(CategoricalChartBase):
404
- @overload
405
399
  @classmethod
406
- def create( # type: ignore
400
+ def create(
407
401
  cls,
408
402
  *children,
409
403
  base_value: Literal["auto", "dataMax", "dataMin"]
@@ -492,9 +486,8 @@ class ComposedChart(CategoricalChartBase):
492
486
  """
493
487
 
494
488
  class PieChart(ChartBase):
495
- @overload
496
489
  @classmethod
497
- def create( # type: ignore
490
+ def create(
498
491
  cls,
499
492
  *children,
500
493
  margin: Var[dict[str, Any]] | dict[str, Any] | None = None,
@@ -560,9 +553,8 @@ class PieChart(ChartBase):
560
553
  class RadarChart(ChartBase):
561
554
  @classmethod
562
555
  def get_event_triggers(cls) -> dict[str, Var | Any]: ...
563
- @overload
564
556
  @classmethod
565
- def create( # type: ignore
557
+ def create(
566
558
  cls,
567
559
  *children,
568
560
  data: Sequence[dict[str, Any]] | Var[Sequence[dict[str, Any]]] | None = None,
@@ -622,9 +614,8 @@ class RadarChart(ChartBase):
622
614
  """
623
615
 
624
616
  class RadialBarChart(ChartBase):
625
- @overload
626
617
  @classmethod
627
- def create( # type: ignore
618
+ def create(
628
619
  cls,
629
620
  *children,
630
621
  data: Sequence[dict[str, Any]] | Var[Sequence[dict[str, Any]]] | None = None,
@@ -706,9 +697,8 @@ class RadialBarChart(ChartBase):
706
697
  class ScatterChart(ChartBase):
707
698
  @classmethod
708
699
  def get_event_triggers(cls) -> dict[str, Var | Any]: ...
709
- @overload
710
700
  @classmethod
711
- def create( # type: ignore
701
+ def create(
712
702
  cls,
713
703
  *children,
714
704
  margin: Var[dict[str, Any]] | dict[str, Any] | None = None,
@@ -760,9 +750,8 @@ class ScatterChart(ChartBase):
760
750
  """
761
751
 
762
752
  class FunnelChart(ChartBase):
763
- @overload
764
753
  @classmethod
765
- def create( # type: ignore
754
+ def create(
766
755
  cls,
767
756
  *children,
768
757
  layout: Var[str] | str | None = None,
@@ -826,9 +815,8 @@ class FunnelChart(ChartBase):
826
815
  """
827
816
 
828
817
  class Treemap(RechartsCharts):
829
- @overload
830
818
  @classmethod
831
- def create( # type: ignore
819
+ def create(
832
820
  cls,
833
821
  *children,
834
822
  width: Var[int | str] | int | str | None = None,
@@ -4,7 +4,7 @@
4
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
5
5
  # ------------------------------------------------------
6
6
  from collections.abc import Mapping, Sequence
7
- from typing import Any, Literal, overload
7
+ from typing import Any, Literal
8
8
 
9
9
  from reflex.components.component import MemoizationLeaf
10
10
  from reflex.components.core.breakpoints import Breakpoints
@@ -15,9 +15,8 @@ from reflex.vars.base import Var
15
15
  from .recharts import Recharts
16
16
 
17
17
  class ResponsiveContainer(Recharts, MemoizationLeaf):
18
- @overload
19
18
  @classmethod
20
- def create( # type: ignore
19
+ def create(
21
20
  cls,
22
21
  *children,
23
22
  aspect: Var[int] | int | None = None,
@@ -81,9 +80,8 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
81
80
  """
82
81
 
83
82
  class Legend(Recharts):
84
- @overload
85
83
  @classmethod
86
- def create( # type: ignore
84
+ def create(
87
85
  cls,
88
86
  *children,
89
87
  width: Var[int] | int | None = None,
@@ -195,9 +193,8 @@ class Legend(Recharts):
195
193
  """
196
194
 
197
195
  class GraphingTooltip(Recharts):
198
- @overload
199
196
  @classmethod
200
- def create( # type: ignore
197
+ def create(
201
198
  cls,
202
199
  *children,
203
200
  separator: Var[str] | str | None = None,
@@ -283,9 +280,8 @@ class GraphingTooltip(Recharts):
283
280
  """
284
281
 
285
282
  class Label(Recharts):
286
- @overload
287
283
  @classmethod
288
- def create( # type: ignore
284
+ def create(
289
285
  cls,
290
286
  *children,
291
287
  view_box: Var[dict[str, Any]] | dict[str, Any] | None = None,
@@ -385,9 +381,8 @@ class Label(Recharts):
385
381
  """
386
382
 
387
383
  class LabelList(Recharts):
388
- @overload
389
384
  @classmethod
390
- def create( # type: ignore
385
+ def create(
391
386
  cls,
392
387
  *children,
393
388
  data_key: Var[int | str] | int | str | None = None,
@@ -489,9 +484,8 @@ class LabelList(Recharts):
489
484
  """
490
485
 
491
486
  class Cell(Recharts):
492
- @overload
493
487
  @classmethod
494
- def create( # type: ignore
488
+ def create(
495
489
  cls,
496
490
  *children,
497
491
  fill: Color | Var[Color | str] | str | None = None,
@@ -4,7 +4,7 @@
4
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
5
5
  # ------------------------------------------------------
6
6
  from collections.abc import Mapping, Sequence
7
- from typing import Any, Literal, overload
7
+ from typing import Any, Literal
8
8
 
9
9
  from reflex.components.core.breakpoints import Breakpoints
10
10
  from reflex.constants.colors import Color
@@ -16,9 +16,8 @@ from .recharts import Recharts
16
16
  class Pie(Recharts):
17
17
  @classmethod
18
18
  def get_event_triggers(cls) -> dict[str, Var | Any]: ...
19
- @overload
20
19
  @classmethod
21
- def create( # type: ignore
20
+ def create(
22
21
  cls,
23
22
  *children,
24
23
  data: Sequence[dict[str, Any]] | Var[Sequence[dict[str, Any]]] | None = None,
@@ -136,9 +135,8 @@ class Pie(Recharts):
136
135
  class Radar(Recharts):
137
136
  @classmethod
138
137
  def get_event_triggers(cls) -> dict[str, Var | Any]: ...
139
- @overload
140
138
  @classmethod
141
- def create( # type: ignore
139
+ def create(
142
140
  cls,
143
141
  *children,
144
142
  data_key: Var[int | str] | int | str | None = None,
@@ -232,9 +230,8 @@ class Radar(Recharts):
232
230
  class RadialBar(Recharts):
233
231
  @classmethod
234
232
  def get_event_triggers(cls) -> dict[str, Var | Any]: ...
235
- @overload
236
233
  @classmethod
237
- def create( # type: ignore
234
+ def create(
238
235
  cls,
239
236
  *children,
240
237
  data: Sequence[dict[str, Any]] | Var[Sequence[dict[str, Any]]] | None = None,
@@ -328,9 +325,8 @@ class RadialBar(Recharts):
328
325
  """
329
326
 
330
327
  class PolarAngleAxis(Recharts):
331
- @overload
332
328
  @classmethod
333
- def create( # type: ignore
329
+ def create(
334
330
  cls,
335
331
  *children,
336
332
  data_key: Var[int | str] | int | str | None = None,
@@ -414,9 +410,8 @@ class PolarAngleAxis(Recharts):
414
410
  """
415
411
 
416
412
  class PolarGrid(Recharts):
417
- @overload
418
413
  @classmethod
419
- def create( # type: ignore
414
+ def create(
420
415
  cls,
421
416
  *children,
422
417
  cx: Var[int] | int | None = None,
@@ -486,9 +481,8 @@ class PolarGrid(Recharts):
486
481
  class PolarRadiusAxis(Recharts):
487
482
  @classmethod
488
483
  def get_event_triggers(cls) -> dict[str, Var | Any]: ...
489
- @overload
490
484
  @classmethod
491
- def create( # type: ignore
485
+ def create(
492
486
  cls,
493
487
  *children,
494
488
  angle: Var[int] | int | None = None,
@@ -8,7 +8,7 @@ from reflex.components.component import Component, MemoizationLeaf, NoSSRCompone
8
8
  class Recharts(Component):
9
9
  """A component that wraps a recharts lib."""
10
10
 
11
- library = "recharts@2.15.3"
11
+ library = "recharts@3.0.0"
12
12
 
13
13
  def _get_style(self) -> dict:
14
14
  return {"wrapperStyle": self.style}
@@ -17,7 +17,7 @@ class Recharts(Component):
17
17
  class RechartsCharts(NoSSRComponent, MemoizationLeaf):
18
18
  """A component that wraps a recharts lib."""
19
19
 
20
- library = "recharts@2.15.3"
20
+ library = "recharts@3.0.0"
21
21
 
22
22
 
23
23
  LiteralAnimationEasing = Literal["ease", "ease-in", "ease-out", "ease-in-out", "linear"]
@@ -4,7 +4,7 @@
4
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
5
5
  # ------------------------------------------------------
6
6
  from collections.abc import Mapping, Sequence
7
- from typing import Any, Literal, overload
7
+ from typing import Any, Literal
8
8
 
9
9
  from reflex.components.component import Component, MemoizationLeaf, NoSSRComponent
10
10
  from reflex.components.core.breakpoints import Breakpoints
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
12
12
  from reflex.vars.base import Var
13
13
 
14
14
  class Recharts(Component):
15
- @overload
16
15
  @classmethod
17
- def create( # type: ignore
16
+ def create(
18
17
  cls,
19
18
  *children,
20
19
  style: Sequence[Mapping[str, Any]]
@@ -64,9 +63,8 @@ class Recharts(Component):
64
63
  """
65
64
 
66
65
  class RechartsCharts(NoSSRComponent, MemoizationLeaf):
67
- @overload
68
66
  @classmethod
69
- def create( # type: ignore
67
+ def create(
70
68
  cls,
71
69
  *children,
72
70
  style: Sequence[Mapping[str, Any]]
@@ -171,7 +171,7 @@ class ToastProps(NoExtrasAllowedProps):
171
171
  class Toaster(Component):
172
172
  """A Toaster Component for displaying toast notifications."""
173
173
 
174
- library: str | None = "sonner@2.0.3"
174
+ library: str | None = "sonner@2.0.5"
175
175
 
176
176
  tag = "Toaster"
177
177
 
@@ -4,7 +4,7 @@
4
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
5
5
  # ------------------------------------------------------
6
6
  from collections.abc import Mapping, Sequence
7
- from typing import Any, Literal, overload
7
+ from typing import Any, Literal
8
8
 
9
9
  from reflex.base import Base
10
10
  from reflex.components.component import Component, ComponentNamespace
@@ -82,9 +82,8 @@ class Toaster(Component):
82
82
  def toast_loading(message: str | Var = "", **kwargs: Any): ...
83
83
  @staticmethod
84
84
  def toast_dismiss(id: Var | str | None = None): ...
85
- @overload
86
85
  @classmethod
87
- def create( # type: ignore
86
+ def create(
88
87
  cls,
89
88
  *children,
90
89
  theme: Var[str] | str | None = None,
@@ -14,10 +14,10 @@ class Bun(SimpleNamespace):
14
14
  """Bun constants."""
15
15
 
16
16
  # The Bun version.
17
- VERSION = "1.2.16"
17
+ VERSION = "1.2.17"
18
18
 
19
19
  # Min Bun Version
20
- MIN_VERSION = "1.2.8"
20
+ MIN_VERSION = "1.2.17"
21
21
 
22
22
  # URL to bun install script.
23
23
  INSTALL_URL = "https://raw.githubusercontent.com/reflex-dev/reflex/main/scripts/bun_install.sh"
@@ -63,7 +63,7 @@ class Node(SimpleNamespace):
63
63
  """Node/ NPM constants."""
64
64
 
65
65
  # The minimum required node version.
66
- MIN_VERSION = "20.0.0"
66
+ MIN_VERSION = "20.19.0"
67
67
 
68
68
  # Path of the node config file.
69
69
  CONFIG_PATH = ".npmrc"
@@ -123,7 +123,6 @@ class PackageJson(SimpleNamespace):
123
123
  A dictionary of dependencies with their versions.
124
124
  """
125
125
  return {
126
- "axios": "1.9.0",
127
126
  "json5": "2.2.3",
128
127
  "react-router": cls._react_router_version,
129
128
  "react-router-dom": cls._react_router_version,
@@ -132,7 +131,7 @@ class PackageJson(SimpleNamespace):
132
131
  "react": cls._react_version,
133
132
  "react-helmet": "6.1.0",
134
133
  "react-dom": cls._react_version,
135
- "isbot": "5.1.26",
134
+ "isbot": "5.1.28",
136
135
  "socket.io-client": "4.8.1",
137
136
  "universal-cookie": "7.2.2",
138
137
  }
@@ -140,11 +139,11 @@ class PackageJson(SimpleNamespace):
140
139
  DEV_DEPENDENCIES = {
141
140
  "@emotion/react": "11.14.0",
142
141
  "autoprefixer": "10.4.21",
143
- "postcss": "8.5.4",
144
- "postcss-import": "16.1.0",
142
+ "postcss": "8.5.6",
143
+ "postcss-import": "16.1.1",
145
144
  "@react-router/dev": _react_router_version,
146
145
  "@react-router/fs-routes": _react_router_version,
147
- "rolldown-vite": "6.3.19",
146
+ "rolldown-vite": "7.0.1",
148
147
  }
149
148
  OVERRIDES = {
150
149
  # This should always match the `react` version in DEPENDENCIES for recharts compatibility.
reflex/istate/__init__.py CHANGED
@@ -1 +1,70 @@
1
1
  """This module will provide interfaces for the state."""
2
+
3
+ import pickle
4
+ import sys
5
+ from collections.abc import Callable
6
+ from typing import Any
7
+
8
+ # Errors caught during pickling of state
9
+ HANDLED_PICKLE_ERRORS = (
10
+ pickle.PicklingError,
11
+ AttributeError,
12
+ IndexError,
13
+ TypeError,
14
+ ValueError,
15
+ )
16
+
17
+
18
+ def _is_picklable(obj: Any, dumps: Callable[[object], bytes]) -> bool:
19
+ try:
20
+ dumps(obj)
21
+ except Exception:
22
+ return False
23
+ else:
24
+ return True
25
+
26
+
27
+ def debug_failed_pickles(obj: object, dumps: Callable[[object], bytes]):
28
+ """Recursively check the picklability of an object and its contents.
29
+
30
+ Args:
31
+ obj: The object to check.
32
+ dumps: The pickle dump function to use.
33
+
34
+ Raises:
35
+ HANDLED_PICKLE_ERRORS: If the object or any of its contents are not picklable.
36
+ """
37
+ if _is_picklable(obj, dumps):
38
+ return
39
+ if sys.version_info < (3, 11):
40
+ return
41
+ if isinstance(obj, dict):
42
+ for k, v in obj.items():
43
+ try:
44
+ debug_failed_pickles(v, dumps)
45
+ except HANDLED_PICKLE_ERRORS as e:
46
+ e.add_note(f"While pickling dict value for key {k!r}")
47
+ raise
48
+ try:
49
+ debug_failed_pickles(k, dumps)
50
+ except HANDLED_PICKLE_ERRORS as e:
51
+ e.add_note(f"While pickling dict key {k!r}")
52
+ raise
53
+ return
54
+ if isinstance(obj, (list, tuple)):
55
+ for i, v in enumerate(obj):
56
+ try:
57
+ debug_failed_pickles(v, dumps)
58
+ except HANDLED_PICKLE_ERRORS as e: # noqa: PERF203
59
+ e.add_note(f"While pickling index {i} of {type(obj).__name__}")
60
+ raise
61
+ return
62
+ picklable_thing = obj.__getstate__()
63
+ if picklable_thing is not None:
64
+ debug_failed_pickles(picklable_thing, dumps)
65
+ else:
66
+ try:
67
+ dumps(obj)
68
+ except HANDLED_PICKLE_ERRORS as e:
69
+ e.add_note(f"While pickling object of type {type(obj).__name__}")
70
+ raise
reflex/istate/manager.py CHANGED
@@ -179,6 +179,7 @@ def _default_token_expiration() -> int:
179
179
 
180
180
  def reset_disk_state_manager():
181
181
  """Reset the disk state manager."""
182
+ console.debug("Resetting disk state manager.")
182
183
  states_directory = prerequisites.get_states_dir()
183
184
  if states_directory.exists():
184
185
  for path in states_directory.iterdir():
@@ -1,6 +1,7 @@
1
1
  """Tailwind CSS configuration types for Reflex plugins."""
2
2
 
3
3
  import dataclasses
4
+ from copy import deepcopy
4
5
  from typing import Any, Literal, TypedDict
5
6
 
6
7
  from typing_extensions import NotRequired
@@ -40,6 +41,28 @@ TailwindPluginConfig = (
40
41
  )
41
42
 
42
43
 
44
+ def remove_version_from_plugin(plugin: TailwindPluginConfig) -> TailwindPluginConfig:
45
+ """Remove the version from a plugin name.
46
+
47
+ Args:
48
+ plugin: The plugin to remove the version from.
49
+
50
+ Returns:
51
+ The plugin without the version.
52
+ """
53
+ from reflex.utils.format import format_library_name
54
+
55
+ if isinstance(plugin, str):
56
+ return format_library_name(plugin)
57
+
58
+ if plugin_import := plugin.get("import"):
59
+ plugin_import["from"] = format_library_name(plugin_import["from"])
60
+
61
+ plugin["name"] = format_library_name(plugin["name"])
62
+
63
+ return plugin
64
+
65
+
43
66
  class TailwindConfig(TypedDict):
44
67
  """Tailwind CSS configuration options.
45
68
 
@@ -131,11 +154,27 @@ class TailwindPlugin(PluginBase):
131
154
  config: TailwindConfig = dataclasses.field(
132
155
  default_factory=lambda: TailwindConfig(
133
156
  plugins=[
134
- "@tailwindcss/typography",
157
+ "@tailwindcss/typography@0.5.16",
135
158
  ],
136
159
  )
137
160
  )
138
161
 
162
+ def get_frontend_development_dependencies(self, **context) -> list[str]:
163
+ """Get the packages required by the plugin.
164
+
165
+ Args:
166
+ **context: The context for the plugin.
167
+
168
+ Returns:
169
+ A list of packages required by the plugin.
170
+ """
171
+ config = self.get_config()
172
+
173
+ return [
174
+ plugin if isinstance(plugin, str) else plugin.get("name")
175
+ for plugin in config.get("plugins", [])
176
+ ] + config.get("presets", [])
177
+
139
178
  def get_config(self) -> TailwindConfig:
140
179
  """Get the Tailwind CSS configuration.
141
180
 
@@ -156,3 +195,21 @@ class TailwindPlugin(PluginBase):
156
195
  return rxconfig_config
157
196
 
158
197
  return self.config
198
+
199
+ def get_unversioned_config(self) -> TailwindConfig:
200
+ """Get the Tailwind CSS configuration without version-specific adjustments.
201
+
202
+ Returns:
203
+ The Tailwind CSS configuration without version-specific adjustments.
204
+ """
205
+ from reflex.utils.format import format_library_name
206
+
207
+ config = deepcopy(self.get_config())
208
+ if presets := config.get("presets"):
209
+ # Somehow, having an empty list of presets breaks Tailwind.
210
+ # So we only set the presets if there are any.
211
+ config["presets"] = [format_library_name(preset) for preset in presets]
212
+ config["plugins"] = [
213
+ remove_version_from_plugin(plugin) for plugin in config.get("plugins", [])
214
+ ]
215
+ return config
@@ -151,9 +151,9 @@ class TailwindV3Plugin(TailwindPlugin):
151
151
  A list of packages required by the plugin.
152
152
  """
153
153
  return [
154
- plugin if isinstance(plugin, str) else plugin.get("name")
155
- for plugin in self.get_config().get("plugins", [])
156
- ] + [Constants.VERSION]
154
+ *super().get_frontend_development_dependencies(**context),
155
+ Constants.VERSION,
156
+ ]
157
157
 
158
158
  def pre_compile(self, **context):
159
159
  """Pre-compile the plugin.
@@ -161,7 +161,7 @@ class TailwindV3Plugin(TailwindPlugin):
161
161
  Args:
162
162
  context: The context for the plugin.
163
163
  """
164
- context["add_save_task"](compile_config, self.get_config())
164
+ context["add_save_task"](compile_config, self.get_unversioned_config())
165
165
  context["add_save_task"](compile_root_style)
166
166
  context["add_modify_task"](Dirs.POSTCSS_JS, add_tailwind_to_postcss_config)
167
167
  context["add_modify_task"](
@@ -17,7 +17,7 @@ class Constants(SimpleNamespace):
17
17
  """Tailwind constants."""
18
18
 
19
19
  # The Tailwindcss version
20
- VERSION = "tailwindcss@4.1.8"
20
+ VERSION = "tailwindcss@4.1.10"
21
21
  # The Tailwind config.
22
22
  CONFIG = "tailwind.config.js"
23
23
  # Default Tailwind content paths
@@ -154,9 +154,10 @@ class TailwindV4Plugin(TailwindPlugin):
154
154
  A list of packages required by the plugin.
155
155
  """
156
156
  return [
157
- plugin if isinstance(plugin, str) else plugin.get("name")
158
- for plugin in self.get_config().get("plugins", [])
159
- ] + [Constants.VERSION, "@tailwindcss/postcss@4.1.7"]
157
+ *super().get_frontend_development_dependencies(**context),
158
+ Constants.VERSION,
159
+ "@tailwindcss/postcss@4.1.10",
160
+ ]
160
161
 
161
162
  def pre_compile(self, **context):
162
163
  """Pre-compile the plugin.
@@ -164,7 +165,7 @@ class TailwindV4Plugin(TailwindPlugin):
164
165
  Args:
165
166
  context: The context for the plugin.
166
167
  """
167
- context["add_save_task"](compile_config, self.get_config())
168
+ context["add_save_task"](compile_config, self.get_unversioned_config())
168
169
  context["add_save_task"](compile_root_style)
169
170
  context["add_modify_task"](Dirs.POSTCSS_JS, add_tailwind_to_postcss_config)
170
171
  context["add_modify_task"](