reflex 0.2.9a2__py3-none-any.whl → 0.3.0a2__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 (34) hide show
  1. reflex/__init__.py +0 -1
  2. reflex/components/__init__.py +42 -15
  3. reflex/components/base/script.py +1 -1
  4. reflex/components/datadisplay/code.py +1 -1
  5. reflex/components/datadisplay/datatable.py +2 -2
  6. reflex/components/forms/debounce.py +1 -1
  7. reflex/components/forms/upload.py +1 -1
  8. reflex/components/graphing/__init__.py +1 -16
  9. reflex/components/graphing/plotly.py +2 -2
  10. reflex/components/graphing/recharts/__init__.py +41 -0
  11. reflex/components/graphing/recharts/cartesian.py +530 -0
  12. reflex/components/graphing/recharts/charts.py +456 -0
  13. reflex/components/graphing/recharts/general.py +166 -0
  14. reflex/components/graphing/recharts/polar.py +306 -0
  15. reflex/components/graphing/recharts/recharts.py +21 -0
  16. reflex/components/libs/react_player.py +1 -1
  17. reflex/components/media/icon.py +1 -1
  18. reflex/components/media/image.py +14 -5
  19. reflex/components/overlay/menu.py +26 -2
  20. reflex/components/typography/markdown.py +9 -5
  21. reflex/constants/installer.py +17 -16
  22. reflex/constants/style.py +1 -1
  23. reflex/event.py +12 -0
  24. reflex/utils/console.py +1 -1
  25. reflex/utils/exec.py +1 -1
  26. reflex/vars.py +6 -0
  27. {reflex-0.2.9a2.dist-info → reflex-0.3.0a2.dist-info}/METADATA +1 -1
  28. {reflex-0.2.9a2.dist-info → reflex-0.3.0a2.dist-info}/RECORD +31 -28
  29. reflex/.templates/web/bun.lockb +0 -0
  30. reflex/components/graphing/victory.py +0 -608
  31. reflex/components/graphing/victory.pyi +0 -308
  32. {reflex-0.2.9a2.dist-info → reflex-0.3.0a2.dist-info}/LICENSE +0 -0
  33. {reflex-0.2.9a2.dist-info → reflex-0.3.0a2.dist-info}/WHEEL +0 -0
  34. {reflex-0.2.9a2.dist-info → reflex-0.3.0a2.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,306 @@
1
+ """Polar charts in Recharts."""
2
+ from __future__ import annotations
3
+
4
+ from typing import Any, Dict, List, Union
5
+
6
+ from reflex.constants import EventTriggers
7
+ from reflex.vars import Var
8
+
9
+ from .recharts import Recharts
10
+
11
+
12
+ class Pie(Recharts):
13
+ """A Pie chart component in Recharts."""
14
+
15
+ tag = "Pie"
16
+
17
+ # data
18
+ data: Var[List[Dict[str, Any]]]
19
+
20
+ # The key of each sector's value.
21
+ data_key: Var[Union[str, int]]
22
+
23
+ # The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
24
+ cx: Var[Union[int, str]]
25
+
26
+ # The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
27
+ cy: Var[Union[int, str]]
28
+
29
+ # The inner radius of pie, which can be set to a percent value.
30
+ inner_radius: Var[Union[int, str]]
31
+
32
+ # The outer radius of pie, which can be set to a percent value.
33
+ outer_radius: Var[Union[int, str]]
34
+
35
+ # The angle of first sector.
36
+ start_angle: Var[int]
37
+
38
+ # The direction of sectors. 1 means clockwise and -1 means anticlockwise.
39
+ end_angle: Var[int]
40
+
41
+ # The minimum angle of each unzero data.
42
+ min_angle: Var[int]
43
+
44
+ # The angle between two sectors.
45
+ padding_angle: Var[int]
46
+
47
+ # The key of each sector's name.
48
+ name_key: Var[str]
49
+
50
+ # The type of icon in legend. If set to 'none', no legend item will be rendered.
51
+ legend_type: Var[str]
52
+
53
+ # If false set, labels will not be drawn.
54
+ label: Var[bool] = False # type: ignore
55
+
56
+ # If false set, label lines will not be drawn.
57
+ label_line: Var[bool]
58
+
59
+ # Valid children components
60
+ valid_children: List[str] = ["Cell", "LabelList"]
61
+
62
+ # fill color
63
+ fill: Var[str]
64
+
65
+ # stroke color
66
+ stroke: Var[str]
67
+
68
+ def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
69
+ """Get the event triggers that pass the component's value to the handler.
70
+
71
+ Returns:
72
+ A dict mapping the event trigger to the var that is passed to the handler.
73
+ """
74
+ return {
75
+ EventTriggers.ON_CLICK: lambda: [],
76
+ EventTriggers.ON_MOUSE_MOVE: lambda: [],
77
+ EventTriggers.ON_MOUSE_OVER: lambda: [],
78
+ EventTriggers.ON_MOUSE_OUT: lambda: [],
79
+ EventTriggers.ON_MOUSE_ENTER: lambda: [],
80
+ EventTriggers.ON_MOUSE_LEAVE: lambda: [],
81
+ }
82
+
83
+
84
+ class Radar(Recharts):
85
+ """A Radar chart component in Recharts."""
86
+
87
+ tag = "Radar"
88
+
89
+ # The key of a group of data which should be unique in a radar chart.
90
+ data_key: Var[Union[str, int]]
91
+
92
+ # The coordinates of all the vertexes of the radar shape, like [{ x, y }].
93
+ points: Var[List[Dict[str, Any]]]
94
+
95
+ # If false set, dots will not be drawn
96
+ dot: Var[bool]
97
+
98
+ # Stoke color
99
+ stroke: Var[str]
100
+
101
+ # Fill color
102
+ fill: Var[str]
103
+
104
+ # opacity
105
+ fill_opacity: Var[float]
106
+
107
+ # The type of icon in legend. If set to 'none', no legend item will be rendered.
108
+ legend_type: Var[str]
109
+
110
+ # If false set, labels will not be drawn
111
+ label: Var[bool]
112
+
113
+ # Specifies when the animation should begin, the unit of this option is ms.
114
+ animation_begin: Var[int]
115
+
116
+ # Specifies the duration of animation, the unit of this option is ms.
117
+ animation_duration: Var[int]
118
+
119
+ # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
120
+ animation_easing: Var[str]
121
+
122
+ # Valid children components
123
+ valid_children: List[str] = ["LabelList"]
124
+
125
+
126
+ class RadialBar(Recharts):
127
+ """A RadialBar chart component in Recharts."""
128
+
129
+ tag = "RadialBar"
130
+
131
+ # The source data which each element is an object.
132
+ data: Var[List[Dict[str, Any]]]
133
+
134
+ # Min angle of each bar. A positive value between 0 and 360.
135
+ min_angle: Var[int]
136
+
137
+ # Type of legend
138
+ legend_type: Var[str]
139
+
140
+ # If false set, labels will not be drawn.
141
+ label: Var[bool]
142
+
143
+ # If false set, background sector will not be drawn.
144
+ background: Var[bool]
145
+
146
+ # Valid children components
147
+ valid_children: List[str] = ["LabelList"]
148
+
149
+ def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
150
+ """Get the event triggers that pass the component's value to the handler.
151
+
152
+ Returns:
153
+ A dict mapping the event trigger to the var that is passed to the handler.
154
+ """
155
+ return {
156
+ EventTriggers.ON_CLICK: lambda: [],
157
+ EventTriggers.ON_MOUSE_MOVE: lambda: [],
158
+ EventTriggers.ON_MOUSE_OVER: lambda: [],
159
+ EventTriggers.ON_MOUSE_OUT: lambda: [],
160
+ EventTriggers.ON_MOUSE_ENTER: lambda: [],
161
+ EventTriggers.ON_MOUSE_LEAVE: lambda: [],
162
+ }
163
+
164
+
165
+ class PolarAngleAxis(Recharts):
166
+ """A PolarAngleAxis component in Recharts."""
167
+
168
+ tag = "PolarAngleAxis"
169
+
170
+ # The key of a group of data which should be unique to show the meaning of angle axis.
171
+ data_key: Var[Union[str, int]]
172
+
173
+ # The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
174
+ cx: Var[Union[int, str]]
175
+
176
+ # The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
177
+ cy: Var[Union[int, str]]
178
+
179
+ # The outer radius of circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy.
180
+ radius: Var[Union[int, str]]
181
+
182
+ # If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option.
183
+ axis_line: Var[Union[bool, Dict[str, Any]]]
184
+
185
+ # The type of axis line.
186
+ axis_line_type: Var[str]
187
+
188
+ # If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props mergered by the internal calculated props and the option.
189
+ tick_line: Var[Union[bool, Dict[str, Any]]]
190
+
191
+ # The width or height of tick.
192
+ tick: Var[Union[int, str]]
193
+
194
+ # The array of every tick's value and angle.
195
+ ticks: Var[List[Dict[str, Any]]]
196
+
197
+ # The orientation of axis text.
198
+ orient: Var[str]
199
+
200
+ # Allow the axis has duplicated categorys or not when the type of axis is "category".
201
+ allow_duplicated_category: Var[bool]
202
+
203
+ # Valid children components
204
+ valid_children: List[str] = ["Label"]
205
+
206
+ def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
207
+ """Get the event triggers that pass the component's value to the handler.
208
+
209
+ Returns:
210
+ A dict mapping the event trigger to the var that is passed to the handler.
211
+ """
212
+ return {
213
+ EventTriggers.ON_CLICK: lambda: [],
214
+ EventTriggers.ON_MOUSE_MOVE: lambda: [],
215
+ EventTriggers.ON_MOUSE_OVER: lambda: [],
216
+ EventTriggers.ON_MOUSE_OUT: lambda: [],
217
+ EventTriggers.ON_MOUSE_ENTER: lambda: [],
218
+ EventTriggers.ON_MOUSE_LEAVE: lambda: [],
219
+ }
220
+
221
+
222
+ class PolarGrid(Recharts):
223
+ """A PolarGrid component in Recharts."""
224
+
225
+ tag = "PolarGrid"
226
+
227
+ # The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
228
+ cx: Var[Union[int, str]]
229
+
230
+ # The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
231
+ cy: Var[Union[int, str]]
232
+
233
+ # The radius of the inner polar grid.
234
+ inner_radius: Var[Union[int, str]]
235
+
236
+ # The radius of the outer polar grid.
237
+ outer_radius: Var[Union[int, str]]
238
+
239
+ # The array of every line grid's angle.
240
+ polar_angles: Var[List[int]]
241
+
242
+ # The array of every line grid's radius.
243
+ polar_radius: Var[List[int]]
244
+
245
+ # The type of polar grids. 'polygon' | 'circle'
246
+ grid_type: Var[str]
247
+
248
+ # Valid children components
249
+ valid_children: List[str] = ["RadarChart", "RadiarBarChart"]
250
+
251
+
252
+ class PolarRadiusAxis(Recharts):
253
+ """A PolarRadiusAxis component in Recharts."""
254
+
255
+ tag = "PolarRadiusAxis"
256
+
257
+ # The angle of radial direction line to display axis text.
258
+ angle: Var[int]
259
+
260
+ # The type of axis line. 'number' | 'category'
261
+ type_: Var[str]
262
+
263
+ # Allow the axis has duplicated categorys or not when the type of axis is "category".
264
+ allow_duplicated_category: Var[bool]
265
+
266
+ # The x-coordinate of center.
267
+ cx: Var[Union[int, str]]
268
+
269
+ # The y-coordinate of center.
270
+ cy: Var[Union[int, str]]
271
+
272
+ # If set to true, the ticks of this axis are reversed.
273
+ reversed: Var[bool]
274
+
275
+ # The orientation of axis text.
276
+ orientation: Var[str]
277
+
278
+ # If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option.
279
+ axis_line: Var[Union[bool, Dict[str, Any]]]
280
+
281
+ # The width or height of tick.
282
+ tick: Var[Union[int, str]]
283
+
284
+ # The count of ticks.
285
+ tick_count: Var[int]
286
+
287
+ # If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'
288
+ scale: Var[str]
289
+
290
+ # Valid children components
291
+ valid_children: List[str] = ["Label"]
292
+
293
+ def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
294
+ """Get the event triggers that pass the component's value to the handler.
295
+
296
+ Returns:
297
+ A dict mapping the event trigger to the var that is passed to the handler.
298
+ """
299
+ return {
300
+ EventTriggers.ON_CLICK: lambda: [],
301
+ EventTriggers.ON_MOUSE_MOVE: lambda: [],
302
+ EventTriggers.ON_MOUSE_OVER: lambda: [],
303
+ EventTriggers.ON_MOUSE_OUT: lambda: [],
304
+ EventTriggers.ON_MOUSE_ENTER: lambda: [],
305
+ EventTriggers.ON_MOUSE_LEAVE: lambda: [],
306
+ }
@@ -0,0 +1,21 @@
1
+ """A component that wraps a recharts lib."""
2
+
3
+ from typing import List
4
+
5
+ from reflex.components.component import Component, NoSSRComponent
6
+
7
+
8
+ class Recharts(Component):
9
+ """A component that wraps a victory lib."""
10
+
11
+ library = "recharts"
12
+
13
+ lib_dependencies: List[str] = ["recharts@==2.8.0"]
14
+
15
+
16
+ class RechartsCharts(NoSSRComponent):
17
+ """A component that wraps a victory lib."""
18
+
19
+ library = "recharts"
20
+
21
+ lib_dependencies: List[str] = ["recharts@==2.8.0"]
@@ -11,7 +11,7 @@ class ReactPlayerComponent(NoSSRComponent):
11
11
  reference: https://github.com/cookpete/react-player.
12
12
  """
13
13
 
14
- library = "react-player@^2.12.0"
14
+ library = "react-player@==2.12.0"
15
15
 
16
16
  tag = "ReactPlayer"
17
17
 
@@ -8,7 +8,7 @@ from reflex.utils import format
8
8
  class ChakraIconComponent(Component):
9
9
  """A component that wraps a Chakra icon component."""
10
10
 
11
- library = "@chakra-ui/icons@^2.0.19"
11
+ library = "@chakra-ui/icons@==2.0.19"
12
12
 
13
13
 
14
14
  class Icon(ChakraIconComponent):
@@ -7,7 +7,6 @@ from typing import Any, Optional, Union
7
7
 
8
8
  from reflex.components.component import Component
9
9
  from reflex.components.libs.chakra import ChakraComponent
10
- from reflex.components.tags import Tag
11
10
  from reflex.utils.serializers import serializer
12
11
  from reflex.vars import Var
13
12
 
@@ -65,11 +64,21 @@ class Image(ChakraComponent):
65
64
  "on_load": lambda: [],
66
65
  }
67
66
 
68
- def _render(self) -> Tag:
69
- self.src.is_string = True
67
+ @classmethod
68
+ def create(cls, *children, **props) -> Component:
69
+ """Create an Image component.
70
70
 
71
- # Render the table.
72
- return super()._render()
71
+ Args:
72
+ *children: The children of the image.
73
+ **props: The props of the image.
74
+
75
+ Returns:
76
+ The Image component.
77
+ """
78
+ src = props.get("src", None)
79
+ if src is not None and not isinstance(src, (Var)):
80
+ props["src"] = Var.create(value=src, is_string=True)
81
+ return super().create(*children, **props)
73
82
 
74
83
 
75
84
  try:
@@ -1,7 +1,7 @@
1
1
  """Menu components."""
2
2
  from __future__ import annotations
3
3
 
4
- from typing import Any, List, Union
4
+ from typing import Any, List, Optional, Union
5
5
 
6
6
  from reflex.components.component import Component
7
7
  from reflex.components.libs.chakra import ChakraComponent
@@ -74,7 +74,13 @@ class Menu(ChakraComponent):
74
74
  }
75
75
 
76
76
  @classmethod
77
- def create(cls, *children, button=None, items=None, **props) -> Component:
77
+ def create(
78
+ cls,
79
+ *children,
80
+ button: Optional[Component] = None,
81
+ items: Optional[List] = None,
82
+ **props,
83
+ ) -> Component:
78
84
  """Create a menu component.
79
85
 
80
86
  Args:
@@ -117,6 +123,24 @@ class MenuList(ChakraComponent):
117
123
 
118
124
  tag = "MenuList"
119
125
 
126
+ @classmethod
127
+ def create(cls, *children, **props) -> ChakraComponent:
128
+ """Create a MenuList component, and automatically wrap in MenuItem if not already one.
129
+
130
+ Args:
131
+ *children: The children of the component.
132
+ **props: The properties of the component.
133
+
134
+ Returns:
135
+ The MenuList component.
136
+ """
137
+ if len(children) != 0:
138
+ children = [
139
+ child if isinstance(child, MenuItem) else MenuItem.create(child)
140
+ for child in children
141
+ ]
142
+ return super().create(*children, **props)
143
+
120
144
 
121
145
  class MenuItem(ChakraComponent):
122
146
  """The trigger that handles menu selection. Must be a direct child of a MenuList."""
@@ -73,7 +73,7 @@ def get_base_component_map() -> dict[str, Callable]:
73
73
  class Markdown(Component):
74
74
  """A markdown component."""
75
75
 
76
- library = "react-markdown@^8.0.7"
76
+ library = "react-markdown@==8.0.7"
77
77
 
78
78
  tag = "ReactMarkdown"
79
79
 
@@ -132,14 +132,18 @@ class Markdown(Component):
132
132
  imports.update(
133
133
  {
134
134
  "": {ImportVar(tag="katex/dist/katex.min.css")},
135
- "remark-math@^5.1.1": {
135
+ "remark-math@==5.1.1": {
136
136
  ImportVar(tag=_REMARK_MATH.name, is_default=True)
137
137
  },
138
- "remark-gfm@^3.0.1": {ImportVar(tag=_REMARK_GFM.name, is_default=True)},
139
- "rehype-katex@^6.0.3": {
138
+ "remark-gfm@==3.0.1": {
139
+ ImportVar(tag=_REMARK_GFM.name, is_default=True)
140
+ },
141
+ "rehype-katex@==6.0.3": {
140
142
  ImportVar(tag=_REHYPE_KATEX.name, is_default=True)
141
143
  },
142
- "rehype-raw@^6.1.1": {ImportVar(tag=_REHYPE_RAW.name, is_default=True)},
144
+ "rehype-raw@==6.1.1": {
145
+ ImportVar(tag=_REHYPE_RAW.name, is_default=True)
146
+ },
143
147
  }
144
148
  )
145
149
 
@@ -102,22 +102,23 @@ class PackageJson(SimpleNamespace):
102
102
  PATH = os.path.join(Dirs.WEB, "package.json")
103
103
 
104
104
  DEPENDENCIES = {
105
- "@chakra-ui/react": "^2.6.0",
106
- "@chakra-ui/system": "^2.5.6",
107
- "@emotion/react": "^11.10.6",
108
- "@emotion/styled": "^11.10.6",
109
- "axios": "^1.4.0",
110
- "chakra-react-select": "^4.6.0",
111
- "focus-visible": "^5.2.0",
112
- "json5": "^2.2.3",
113
- "next": "^13.3.1",
114
- "next-sitemap": "^4.1.8",
115
- "react": "^18.2.0",
116
- "react-dom": "^18.2.0",
117
- "socket.io-client": "^4.6.1",
118
- "universal-cookie": "^4.0.4",
105
+ "@chakra-ui/react": "==2.6.0",
106
+ "@chakra-ui/system": "==2.5.6",
107
+ "@emotion/react": "==11.10.6",
108
+ "@emotion/styled": "==11.10.6",
109
+ "axios": "==1.4.0",
110
+ "chakra-react-select": "==4.6.0",
111
+ "focus-visible": "==5.2.0",
112
+ "framer-motion": "==10.16.4",
113
+ "json5": "==2.2.3",
114
+ "next": "==13.5.4",
115
+ "next-sitemap": "==4.1.8",
116
+ "react": "==18.2.0",
117
+ "react-dom": "==18.2.0",
118
+ "socket.io-client": "==4.6.1",
119
+ "universal-cookie": "==4.0.4",
119
120
  }
120
121
  DEV_DEPENDENCIES = {
121
- "autoprefixer": "^10.4.14",
122
- "postcss": "^8.4.24",
122
+ "autoprefixer": "==10.4.14",
123
+ "postcss": "==8.4.24",
123
124
  }
reflex/constants/style.py CHANGED
@@ -13,7 +13,7 @@ class Tailwind(SimpleNamespace):
13
13
  """Tailwind constants."""
14
14
 
15
15
  # The Tailwindcss version
16
- VERSION = "tailwindcss@^3.3.2"
16
+ VERSION = "tailwindcss@==3.3.2"
17
17
  # The Tailwind config.
18
18
  CONFIG = os.path.join(Dirs.WEB, "tailwind.config.js")
19
19
  # Default Tailwind content paths
reflex/event.py CHANGED
@@ -330,6 +330,12 @@ def set_cookie(key: str, value: str) -> EventSpec:
330
330
  Returns:
331
331
  EventSpec: An event to set a cookie.
332
332
  """
333
+ console.deprecate(
334
+ feature_name=f"rx.set_cookie",
335
+ reason="and has been replaced by rx.Cookie, which can be used as a state var",
336
+ deprecation_version="0.2.9",
337
+ removal_version="0.2.10",
338
+ )
333
339
  return server_side(
334
340
  "_set_cookie",
335
341
  get_fn_signature(set_cookie),
@@ -366,6 +372,12 @@ def set_local_storage(key: str, value: str) -> EventSpec:
366
372
  Returns:
367
373
  EventSpec: An event to set a key-value in local storage.
368
374
  """
375
+ console.deprecate(
376
+ feature_name=f"rx.set_local_storage",
377
+ reason="and has been replaced by rx.LocalStorage, which can be used as a state var",
378
+ deprecation_version="0.2.9",
379
+ removal_version="0.2.10",
380
+ )
369
381
  return server_side(
370
382
  "_set_local_storage",
371
383
  get_fn_signature(set_local_storage),
reflex/utils/console.py CHANGED
@@ -120,7 +120,7 @@ def deprecate(
120
120
  kwargs: Keyword arguments to pass to the print function.
121
121
  """
122
122
  msg = (
123
- f"{feature_name} has been deprecated in version {deprecation_version} {reason}. It will be completely "
123
+ f"{feature_name} has been deprecated in version {deprecation_version} {reason.rstrip('.')}. It will be completely "
124
124
  f"removed in {removal_version}"
125
125
  )
126
126
  if _LOG_LEVEL <= LogLevel.WARNING:
reflex/utils/exec.py CHANGED
@@ -85,7 +85,7 @@ def run_process_and_launch_url(run_command: list[str]):
85
85
  )
86
86
  if process.stdout:
87
87
  for line in processes.stream_logs("Starting frontend", process):
88
- match = re.search("ready started server on ([0-9.:]+), url: (.*)", line)
88
+ match = re.search("Local:([\\s]+)(.*)", line)
89
89
  if match:
90
90
  if first_run:
91
91
  url = match.group(2)
reflex/vars.py CHANGED
@@ -1461,6 +1461,12 @@ def get_local_storage(key: Var | str | None = None) -> BaseVar:
1461
1461
  Raises:
1462
1462
  TypeError: if the wrong key type is provided.
1463
1463
  """
1464
+ console.deprecate(
1465
+ feature_name=f"rx.get_local_storage",
1466
+ reason="and has been replaced by rx.LocalStorage, which can be used as a state var",
1467
+ deprecation_version="0.2.9",
1468
+ removal_version="0.2.10",
1469
+ )
1464
1470
  if key is not None:
1465
1471
  if not (isinstance(key, Var) and key.type_ == str) and not isinstance(key, str):
1466
1472
  type_ = type(key) if not isinstance(key, Var) else key.type_
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: reflex
3
- Version: 0.2.9a2
3
+ Version: 0.3.0a2
4
4
  Summary: Web apps in pure Python.
5
5
  Home-page: https://reflex.dev
6
6
  License: Apache-2.0