reflex 0.7.1a4__py3-none-any.whl → 0.7.2a2__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 (227) hide show
  1. reflex/.templates/jinja/web/utils/context.js.jinja2 +8 -8
  2. reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -3
  3. reflex/.templates/web/utils/state.js +18 -18
  4. reflex/admin.py +1 -2
  5. reflex/app.py +46 -49
  6. reflex/app_mixins/lifespan.py +2 -2
  7. reflex/app_mixins/middleware.py +1 -2
  8. reflex/assets.py +1 -2
  9. reflex/base.py +2 -2
  10. reflex/compiler/compiler.py +51 -16
  11. reflex/compiler/utils.py +4 -13
  12. reflex/components/base/app_wrap.pyi +7 -7
  13. reflex/components/base/bare.py +3 -3
  14. reflex/components/base/body.pyi +7 -7
  15. reflex/components/base/document.py +1 -3
  16. reflex/components/base/document.pyi +32 -32
  17. reflex/components/base/error_boundary.py +2 -4
  18. reflex/components/base/error_boundary.pyi +11 -13
  19. reflex/components/base/fragment.pyi +7 -7
  20. reflex/components/base/head.pyi +13 -13
  21. reflex/components/base/link.pyi +22 -22
  22. reflex/components/base/meta.py +5 -7
  23. reflex/components/base/meta.pyi +40 -40
  24. reflex/components/base/script.pyi +11 -14
  25. reflex/components/base/strict_mode.pyi +7 -7
  26. reflex/components/component.py +188 -113
  27. reflex/components/core/auto_scroll.py +8 -1
  28. reflex/components/core/auto_scroll.pyi +183 -210
  29. reflex/components/core/banner.py +2 -4
  30. reflex/components/core/banner.pyi +390 -444
  31. reflex/components/core/breakpoints.py +5 -5
  32. reflex/components/core/client_side_routing.pyi +14 -14
  33. reflex/components/core/clipboard.py +4 -4
  34. reflex/components/core/clipboard.pyi +12 -14
  35. reflex/components/core/cond.py +17 -25
  36. reflex/components/core/debounce.py +3 -3
  37. reflex/components/core/debounce.pyi +14 -14
  38. reflex/components/core/foreach.py +7 -2
  39. reflex/components/core/html.py +1 -3
  40. reflex/components/core/html.pyi +184 -213
  41. reflex/components/core/match.py +15 -19
  42. reflex/components/core/sticky.pyi +930 -1078
  43. reflex/components/core/upload.py +4 -4
  44. reflex/components/core/upload.pyi +62 -62
  45. reflex/components/datadisplay/code.py +6 -6
  46. reflex/components/datadisplay/code.pyi +1159 -1165
  47. reflex/components/datadisplay/dataeditor.py +49 -49
  48. reflex/components/datadisplay/dataeditor.pyi +95 -123
  49. reflex/components/datadisplay/logo.py +1 -3
  50. reflex/components/datadisplay/shiki_code_block.py +8 -10
  51. reflex/components/datadisplay/shiki_code_block.pyi +1678 -1720
  52. reflex/components/el/element.pyi +7 -7
  53. reflex/components/el/elements/base.pyi +183 -210
  54. reflex/components/el/elements/forms.py +24 -24
  55. reflex/components/el/elements/forms.pyi +2572 -2934
  56. reflex/components/el/elements/inline.py +4 -4
  57. reflex/components/el/elements/inline.pyi +5191 -5953
  58. reflex/components/el/elements/media.py +47 -47
  59. reflex/components/el/elements/media.pyi +4802 -5500
  60. reflex/components/el/elements/metadata.py +1 -3
  61. reflex/components/el/elements/metadata.pyi +782 -896
  62. reflex/components/el/elements/other.pyi +1278 -1467
  63. reflex/components/el/elements/scripts.pyi +580 -667
  64. reflex/components/el/elements/sectioning.pyi +2761 -3166
  65. reflex/components/el/elements/tables.pyi +1840 -2119
  66. reflex/components/el/elements/typography.pyi +2772 -3179
  67. reflex/components/gridjs/datatable.py +7 -7
  68. reflex/components/gridjs/datatable.pyi +19 -19
  69. reflex/components/lucide/icon.pyi +21 -21
  70. reflex/components/markdown/markdown.py +2 -2
  71. reflex/components/markdown/markdown.pyi +9 -9
  72. reflex/components/moment/moment.py +11 -12
  73. reflex/components/moment/moment.pyi +44 -47
  74. reflex/components/next/base.pyi +7 -7
  75. reflex/components/next/image.py +3 -3
  76. reflex/components/next/image.pyi +19 -21
  77. reflex/components/next/link.pyi +9 -9
  78. reflex/components/next/video.py +1 -3
  79. reflex/components/next/video.pyi +9 -9
  80. reflex/components/plotly/plotly.py +22 -45
  81. reflex/components/plotly/plotly.pyi +164 -164
  82. reflex/components/radix/primitives/accordion.py +14 -14
  83. reflex/components/radix/primitives/accordion.pyi +439 -487
  84. reflex/components/radix/primitives/base.py +1 -3
  85. reflex/components/radix/primitives/base.pyi +15 -15
  86. reflex/components/radix/primitives/drawer.py +3 -3
  87. reflex/components/radix/primitives/drawer.pyi +110 -116
  88. reflex/components/radix/primitives/form.py +1 -1
  89. reflex/components/radix/primitives/form.pyi +668 -752
  90. reflex/components/radix/primitives/progress.py +6 -6
  91. reflex/components/radix/primitives/progress.pyi +225 -243
  92. reflex/components/radix/primitives/slider.py +6 -6
  93. reflex/components/radix/primitives/slider.pyi +52 -55
  94. reflex/components/radix/themes/base.py +3 -6
  95. reflex/components/radix/themes/base.pyi +197 -303
  96. reflex/components/radix/themes/color_mode.py +5 -5
  97. reflex/components/radix/themes/color_mode.pyi +366 -436
  98. reflex/components/radix/themes/components/alert_dialog.pyi +229 -262
  99. reflex/components/radix/themes/components/aspect_ratio.py +1 -3
  100. reflex/components/radix/themes/components/aspect_ratio.pyi +8 -8
  101. reflex/components/radix/themes/components/avatar.pyi +79 -94
  102. reflex/components/radix/themes/components/badge.pyi +252 -295
  103. reflex/components/radix/themes/components/button.pyi +269 -314
  104. reflex/components/radix/themes/components/callout.py +2 -2
  105. reflex/components/radix/themes/components/callout.pyi +1116 -1290
  106. reflex/components/radix/themes/components/card.pyi +194 -229
  107. reflex/components/radix/themes/components/checkbox.pyi +243 -278
  108. reflex/components/radix/themes/components/checkbox_cards.py +3 -7
  109. reflex/components/radix/themes/components/checkbox_cards.pyi +101 -135
  110. reflex/components/radix/themes/components/checkbox_group.py +2 -2
  111. reflex/components/radix/themes/components/checkbox_group.pyi +83 -96
  112. reflex/components/radix/themes/components/context_menu.py +18 -15
  113. reflex/components/radix/themes/components/context_menu.pyi +408 -458
  114. reflex/components/radix/themes/components/data_list.pyi +122 -147
  115. reflex/components/radix/themes/components/dialog.pyi +231 -264
  116. reflex/components/radix/themes/components/dropdown_menu.py +16 -13
  117. reflex/components/radix/themes/components/dropdown_menu.pyi +223 -246
  118. reflex/components/radix/themes/components/hover_card.py +2 -2
  119. reflex/components/radix/themes/components/hover_card.pyi +237 -282
  120. reflex/components/radix/themes/components/icon_button.pyi +269 -314
  121. reflex/components/radix/themes/components/inset.py +8 -8
  122. reflex/components/radix/themes/components/inset.pyi +232 -292
  123. reflex/components/radix/themes/components/popover.py +2 -2
  124. reflex/components/radix/themes/components/popover.pyi +229 -271
  125. reflex/components/radix/themes/components/progress.pyi +80 -96
  126. reflex/components/radix/themes/components/radio.pyi +73 -86
  127. reflex/components/radix/themes/components/radio_cards.py +4 -8
  128. reflex/components/radix/themes/components/radio_cards.pyi +117 -154
  129. reflex/components/radix/themes/components/radio_group.py +3 -3
  130. reflex/components/radix/themes/components/radio_group.pyi +250 -291
  131. reflex/components/radix/themes/components/scroll_area.pyi +14 -20
  132. reflex/components/radix/themes/components/segmented_control.py +6 -6
  133. reflex/components/radix/themes/components/segmented_control.pyi +89 -108
  134. reflex/components/radix/themes/components/select.py +7 -7
  135. reflex/components/radix/themes/components/select.pyi +376 -444
  136. reflex/components/radix/themes/components/separator.pyi +79 -93
  137. reflex/components/radix/themes/components/skeleton.pyi +32 -26
  138. reflex/components/radix/themes/components/slider.py +8 -8
  139. reflex/components/radix/themes/components/slider.pyi +99 -122
  140. reflex/components/radix/themes/components/spinner.pyi +12 -19
  141. reflex/components/radix/themes/components/switch.pyi +84 -99
  142. reflex/components/radix/themes/components/table.py +9 -9
  143. reflex/components/radix/themes/components/table.pyi +1440 -1794
  144. reflex/components/radix/themes/components/tabs.py +4 -4
  145. reflex/components/radix/themes/components/tabs.pyi +120 -132
  146. reflex/components/radix/themes/components/text_area.pyi +281 -331
  147. reflex/components/radix/themes/components/text_field.py +2 -2
  148. reflex/components/radix/themes/components/text_field.pyi +639 -734
  149. reflex/components/radix/themes/components/tooltip.py +6 -6
  150. reflex/components/radix/themes/components/tooltip.pyi +34 -43
  151. reflex/components/radix/themes/layout/base.pyi +85 -182
  152. reflex/components/radix/themes/layout/box.pyi +183 -210
  153. reflex/components/radix/themes/layout/center.pyi +225 -286
  154. reflex/components/radix/themes/layout/container.pyi +191 -224
  155. reflex/components/radix/themes/layout/flex.py +2 -2
  156. reflex/components/radix/themes/layout/flex.pyi +225 -286
  157. reflex/components/radix/themes/layout/grid.py +2 -2
  158. reflex/components/radix/themes/layout/grid.pyi +245 -315
  159. reflex/components/radix/themes/layout/list.py +2 -2
  160. reflex/components/radix/themes/layout/list.pyi +712 -815
  161. reflex/components/radix/themes/layout/section.pyi +187 -221
  162. reflex/components/radix/themes/layout/spacer.pyi +225 -286
  163. reflex/components/radix/themes/layout/stack.pyi +625 -768
  164. reflex/components/radix/themes/typography/blockquote.pyi +257 -299
  165. reflex/components/radix/themes/typography/code.pyi +259 -304
  166. reflex/components/radix/themes/typography/heading.pyi +272 -324
  167. reflex/components/radix/themes/typography/link.pyi +302 -358
  168. reflex/components/radix/themes/typography/text.pyi +1669 -1945
  169. reflex/components/react_player/audio.pyi +20 -22
  170. reflex/components/react_player/react_player.pyi +19 -19
  171. reflex/components/react_player/video.pyi +20 -22
  172. reflex/components/recharts/cartesian.py +100 -97
  173. reflex/components/recharts/cartesian.pyi +891 -1007
  174. reflex/components/recharts/charts.py +42 -42
  175. reflex/components/recharts/charts.pyi +212 -249
  176. reflex/components/recharts/general.py +22 -21
  177. reflex/components/recharts/general.pyi +198 -223
  178. reflex/components/recharts/polar.py +42 -45
  179. reflex/components/recharts/polar.pyi +254 -288
  180. reflex/components/recharts/recharts.pyi +13 -13
  181. reflex/components/sonner/toast.py +20 -20
  182. reflex/components/sonner/toast.pyi +58 -61
  183. reflex/components/suneditor/editor.py +9 -9
  184. reflex/components/suneditor/editor.pyi +78 -83
  185. reflex/components/tags/cond_tag.py +2 -2
  186. reflex/components/tags/iter_tag.py +10 -14
  187. reflex/components/tags/match_tag.py +2 -2
  188. reflex/components/tags/tag.py +10 -10
  189. reflex/config.py +36 -35
  190. reflex/constants/__init__.py +56 -53
  191. reflex/custom_components/custom_components.py +6 -7
  192. reflex/event.py +38 -42
  193. reflex/experimental/client_state.py +2 -4
  194. reflex/experimental/layout.py +2 -2
  195. reflex/experimental/layout.pyi +579 -663
  196. reflex/istate/data.py +4 -5
  197. reflex/middleware/hydrate_middleware.py +2 -2
  198. reflex/middleware/middleware.py +2 -2
  199. reflex/model.py +3 -5
  200. reflex/page.py +2 -2
  201. reflex/reflex.py +9 -10
  202. reflex/state.py +77 -49
  203. reflex/style.py +9 -3
  204. reflex/testing.py +21 -24
  205. reflex/utils/console.py +1 -1
  206. reflex/utils/decorator.py +26 -1
  207. reflex/utils/exec.py +6 -11
  208. reflex/utils/export.py +2 -3
  209. reflex/utils/format.py +4 -4
  210. reflex/utils/imports.py +12 -12
  211. reflex/utils/prerequisites.py +35 -84
  212. reflex/utils/processes.py +5 -5
  213. reflex/utils/pyi_generator.py +33 -22
  214. reflex/utils/serializers.py +60 -15
  215. reflex/utils/types.py +237 -56
  216. reflex/vars/base.py +122 -72
  217. reflex/vars/datetime.py +2 -2
  218. reflex/vars/function.py +52 -55
  219. reflex/vars/number.py +59 -5
  220. reflex/vars/object.py +57 -26
  221. reflex/vars/sequence.py +983 -958
  222. {reflex-0.7.1a4.dist-info → reflex-0.7.2a2.dist-info}/METADATA +3 -6
  223. reflex-0.7.2a2.dist-info/RECORD +405 -0
  224. {reflex-0.7.1a4.dist-info → reflex-0.7.2a2.dist-info}/WHEEL +1 -1
  225. reflex-0.7.1a4.dist-info/RECORD +0 -405
  226. {reflex-0.7.1a4.dist-info → reflex-0.7.2a2.dist-info}/LICENSE +0 -0
  227. {reflex-0.7.1a4.dist-info → reflex-0.7.2a2.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  """Media classes."""
2
2
 
3
- from typing import Any, Literal, Union
3
+ from typing import Any, Literal
4
4
 
5
5
  from reflex import Component, ComponentNamespace
6
6
  from reflex.components.el.elements.inline import ReferrerPolicy
@@ -22,7 +22,7 @@ class Area(BaseHTML):
22
22
  coords: Var[str]
23
23
 
24
24
  # Specifies that the target will be downloaded when clicked
25
- download: Var[Union[str, bool]]
25
+ download: Var[str | bool]
26
26
 
27
27
  # Hyperlink reference for the area
28
28
  href: Var[str]
@@ -291,9 +291,9 @@ class Svg(BaseHTML):
291
291
 
292
292
  tag = "svg"
293
293
  # The width of the svg.
294
- width: Var[Union[str, int]]
294
+ width: Var[str | int]
295
295
  # The height of the svg.
296
- height: Var[Union[str, int]]
296
+ height: Var[str | int]
297
297
  # The XML namespace declaration.
298
298
  xmlns: Var[str]
299
299
 
@@ -303,19 +303,19 @@ class Text(BaseHTML):
303
303
 
304
304
  tag = "text"
305
305
  # The x coordinate of the starting point of the text baseline.
306
- x: Var[Union[str, int]]
306
+ x: Var[str | int]
307
307
  # The y coordinate of the starting point of the text baseline.
308
- y: Var[Union[str, int]]
308
+ y: Var[str | int]
309
309
  # Shifts the text position horizontally from a previous text element.
310
- dx: Var[Union[str, int]]
310
+ dx: Var[str | int]
311
311
  # Shifts the text position vertically from a previous text element.
312
- dy: Var[Union[str, int]]
312
+ dy: Var[str | int]
313
313
  # Rotates orientation of each individual glyph.
314
- rotate: Var[Union[str, int]]
314
+ rotate: Var[str | int]
315
315
  # How the text is stretched or compressed to fit the width defined by the text_length attribute.
316
316
  length_adjust: Var[str]
317
317
  # A width that the text should be scaled to fit.
318
- text_length: Var[Union[str, int]]
318
+ text_length: Var[str | int]
319
319
 
320
320
 
321
321
  class Line(BaseHTML):
@@ -323,13 +323,13 @@ class Line(BaseHTML):
323
323
 
324
324
  tag = "line"
325
325
  # The x-axis coordinate of the line starting point.
326
- x1: Var[Union[str, int]]
326
+ x1: Var[str | int]
327
327
  # The x-axis coordinate of the the line ending point.
328
- x2: Var[Union[str, int]]
328
+ x2: Var[str | int]
329
329
  # The y-axis coordinate of the line starting point.
330
- y1: Var[Union[str, int]]
330
+ y1: Var[str | int]
331
331
  # The y-axis coordinate of the the line ending point.
332
- y2: Var[Union[str, int]]
332
+ y2: Var[str | int]
333
333
  # The total path length, in user units.
334
334
  path_length: Var[int]
335
335
 
@@ -339,11 +339,11 @@ class Circle(BaseHTML):
339
339
 
340
340
  tag = "circle"
341
341
  # The x-axis coordinate of the center of the circle.
342
- cx: Var[Union[str, int]]
342
+ cx: Var[str | int]
343
343
  # The y-axis coordinate of the center of the circle.
344
- cy: Var[Union[str, int]]
344
+ cy: Var[str | int]
345
345
  # The radius of the circle.
346
- r: Var[Union[str, int]]
346
+ r: Var[str | int]
347
347
  # The total length for the circle's circumference, in user units.
348
348
  path_length: Var[int]
349
349
 
@@ -353,13 +353,13 @@ class Ellipse(BaseHTML):
353
353
 
354
354
  tag = "ellipse"
355
355
  # The x position of the center of the ellipse.
356
- cx: Var[Union[str, int]]
356
+ cx: Var[str | int]
357
357
  # The y position of the center of the ellipse.
358
- cy: Var[Union[str, int]]
358
+ cy: Var[str | int]
359
359
  # The radius of the ellipse on the x axis.
360
- rx: Var[Union[str, int]]
360
+ rx: Var[str | int]
361
361
  # The radius of the ellipse on the y axis.
362
- ry: Var[Union[str, int]]
362
+ ry: Var[str | int]
363
363
  # The total length for the ellipse's circumference, in user units.
364
364
  path_length: Var[int]
365
365
 
@@ -369,17 +369,17 @@ class Rect(BaseHTML):
369
369
 
370
370
  tag = "rect"
371
371
  # The x coordinate of the rect.
372
- x: Var[Union[str, int]]
372
+ x: Var[str | int]
373
373
  # The y coordinate of the rect.
374
- y: Var[Union[str, int]]
374
+ y: Var[str | int]
375
375
  # The width of the rect
376
- width: Var[Union[str, int]]
376
+ width: Var[str | int]
377
377
  # The height of the rect.
378
- height: Var[Union[str, int]]
378
+ height: Var[str | int]
379
379
  # The horizontal corner radius of the rect. Defaults to ry if it is specified.
380
- rx: Var[Union[str, int]]
380
+ rx: Var[str | int]
381
381
  # The vertical corner radius of the rect. Defaults to rx if it is specified.
382
- ry: Var[Union[str, int]]
382
+ ry: Var[str | int]
383
383
  # The total length of the rectangle's perimeter, in user units.
384
384
  path_length: Var[int]
385
385
 
@@ -406,25 +406,25 @@ class LinearGradient(BaseHTML):
406
406
  tag = "linearGradient"
407
407
 
408
408
  # Units for the gradient.
409
- gradient_units: Var[Union[str, bool]]
409
+ gradient_units: Var[str | bool]
410
410
 
411
411
  # Transform applied to the gradient.
412
- gradient_transform: Var[Union[str, bool]]
412
+ gradient_transform: Var[str | bool]
413
413
 
414
414
  # Method used to spread the gradient.
415
- spread_method: Var[Union[str, bool]]
415
+ spread_method: Var[str | bool]
416
416
 
417
417
  # X coordinate of the starting point of the gradient.
418
- x1: Var[Union[str, int, float]]
418
+ x1: Var[str | int | float]
419
419
 
420
420
  # X coordinate of the ending point of the gradient.
421
- x2: Var[Union[str, int, float]]
421
+ x2: Var[str | int | float]
422
422
 
423
423
  # Y coordinate of the starting point of the gradient.
424
- y1: Var[Union[str, int, float]]
424
+ y1: Var[str | int | float]
425
425
 
426
426
  # Y coordinate of the ending point of the gradient.
427
- y2: Var[Union[str, int, float]]
427
+ y2: Var[str | int | float]
428
428
 
429
429
 
430
430
  class RadialGradient(BaseHTML):
@@ -433,31 +433,31 @@ class RadialGradient(BaseHTML):
433
433
  tag = "radialGradient"
434
434
 
435
435
  # The x coordinate of the end circle of the radial gradient.
436
- cx: Var[Union[str, int, float]]
436
+ cx: Var[str | int | float]
437
437
 
438
438
  # The y coordinate of the end circle of the radial gradient.
439
- cy: Var[Union[str, int, float]]
439
+ cy: Var[str | int | float]
440
440
 
441
441
  # The radius of the start circle of the radial gradient.
442
- fr: Var[Union[str, int, float]]
442
+ fr: Var[str | int | float]
443
443
 
444
444
  # The x coordinate of the start circle of the radial gradient.
445
- fx: Var[Union[str, int, float]]
445
+ fx: Var[str | int | float]
446
446
 
447
447
  # The y coordinate of the start circle of the radial gradient.
448
- fy: Var[Union[str, int, float]]
448
+ fy: Var[str | int | float]
449
449
 
450
450
  # Units for the gradient.
451
- gradient_units: Var[Union[str, bool]]
451
+ gradient_units: Var[str | bool]
452
452
 
453
453
  # Transform applied to the gradient.
454
- gradient_transform: Var[Union[str, bool]]
454
+ gradient_transform: Var[str | bool]
455
455
 
456
456
  # The radius of the end circle of the radial gradient.
457
- r: Var[Union[str, int, float]]
457
+ r: Var[str | int | float]
458
458
 
459
459
  # Method used to spread the gradient.
460
- spread_method: Var[Union[str, bool]]
460
+ spread_method: Var[str | bool]
461
461
 
462
462
 
463
463
  class Stop(BaseHTML):
@@ -466,13 +466,13 @@ class Stop(BaseHTML):
466
466
  tag = "stop"
467
467
 
468
468
  # Offset of the gradient stop.
469
- offset: Var[Union[str, float, int]]
469
+ offset: Var[str | float | int]
470
470
 
471
471
  # Color of the gradient stop.
472
- stop_color: Var[Union[str, Color, bool]]
472
+ stop_color: Var[str | Color | bool]
473
473
 
474
474
  # Opacity of the gradient stop.
475
- stop_opacity: Var[Union[str, float, int, bool]]
475
+ stop_opacity: Var[str | float | int | bool]
476
476
 
477
477
 
478
478
  class Path(BaseHTML):
@@ -481,7 +481,7 @@ class Path(BaseHTML):
481
481
  tag = "path"
482
482
 
483
483
  # Defines the shape of the path.
484
- d: Var[Union[str, int, float]]
484
+ d: Var[str | int | float]
485
485
 
486
486
 
487
487
  class SVG(ComponentNamespace):