reflex 0.7.1a4__py3-none-any.whl → 0.7.2a1__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 (226) 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/admin.py +1 -2
  4. reflex/app.py +46 -49
  5. reflex/app_mixins/lifespan.py +2 -2
  6. reflex/app_mixins/middleware.py +1 -2
  7. reflex/assets.py +1 -2
  8. reflex/base.py +2 -2
  9. reflex/compiler/compiler.py +51 -16
  10. reflex/compiler/utils.py +4 -13
  11. reflex/components/base/app_wrap.pyi +7 -7
  12. reflex/components/base/bare.py +3 -3
  13. reflex/components/base/body.pyi +7 -7
  14. reflex/components/base/document.py +1 -3
  15. reflex/components/base/document.pyi +32 -32
  16. reflex/components/base/error_boundary.py +2 -4
  17. reflex/components/base/error_boundary.pyi +11 -13
  18. reflex/components/base/fragment.pyi +7 -7
  19. reflex/components/base/head.pyi +13 -13
  20. reflex/components/base/link.pyi +22 -22
  21. reflex/components/base/meta.py +5 -7
  22. reflex/components/base/meta.pyi +40 -40
  23. reflex/components/base/script.pyi +11 -14
  24. reflex/components/base/strict_mode.pyi +7 -7
  25. reflex/components/component.py +188 -113
  26. reflex/components/core/auto_scroll.py +8 -1
  27. reflex/components/core/auto_scroll.pyi +183 -210
  28. reflex/components/core/banner.py +2 -4
  29. reflex/components/core/banner.pyi +390 -444
  30. reflex/components/core/breakpoints.py +5 -5
  31. reflex/components/core/client_side_routing.pyi +14 -14
  32. reflex/components/core/clipboard.py +4 -4
  33. reflex/components/core/clipboard.pyi +12 -14
  34. reflex/components/core/cond.py +17 -25
  35. reflex/components/core/debounce.py +3 -3
  36. reflex/components/core/debounce.pyi +14 -14
  37. reflex/components/core/foreach.py +7 -2
  38. reflex/components/core/html.py +1 -3
  39. reflex/components/core/html.pyi +184 -213
  40. reflex/components/core/match.py +15 -19
  41. reflex/components/core/sticky.pyi +930 -1078
  42. reflex/components/core/upload.py +4 -4
  43. reflex/components/core/upload.pyi +62 -62
  44. reflex/components/datadisplay/code.py +6 -6
  45. reflex/components/datadisplay/code.pyi +1159 -1165
  46. reflex/components/datadisplay/dataeditor.py +49 -49
  47. reflex/components/datadisplay/dataeditor.pyi +95 -123
  48. reflex/components/datadisplay/logo.py +1 -3
  49. reflex/components/datadisplay/shiki_code_block.py +8 -10
  50. reflex/components/datadisplay/shiki_code_block.pyi +1678 -1720
  51. reflex/components/el/element.pyi +7 -7
  52. reflex/components/el/elements/base.pyi +183 -210
  53. reflex/components/el/elements/forms.py +23 -23
  54. reflex/components/el/elements/forms.pyi +2571 -2933
  55. reflex/components/el/elements/inline.py +4 -4
  56. reflex/components/el/elements/inline.pyi +5191 -5953
  57. reflex/components/el/elements/media.py +47 -47
  58. reflex/components/el/elements/media.pyi +4802 -5500
  59. reflex/components/el/elements/metadata.py +1 -3
  60. reflex/components/el/elements/metadata.pyi +782 -896
  61. reflex/components/el/elements/other.pyi +1278 -1467
  62. reflex/components/el/elements/scripts.pyi +580 -667
  63. reflex/components/el/elements/sectioning.pyi +2761 -3166
  64. reflex/components/el/elements/tables.pyi +1840 -2119
  65. reflex/components/el/elements/typography.pyi +2772 -3179
  66. reflex/components/gridjs/datatable.py +7 -7
  67. reflex/components/gridjs/datatable.pyi +19 -19
  68. reflex/components/lucide/icon.pyi +21 -21
  69. reflex/components/markdown/markdown.py +2 -2
  70. reflex/components/markdown/markdown.pyi +9 -9
  71. reflex/components/moment/moment.py +11 -12
  72. reflex/components/moment/moment.pyi +44 -47
  73. reflex/components/next/base.pyi +7 -7
  74. reflex/components/next/image.py +3 -3
  75. reflex/components/next/image.pyi +19 -21
  76. reflex/components/next/link.pyi +9 -9
  77. reflex/components/next/video.py +1 -3
  78. reflex/components/next/video.pyi +9 -9
  79. reflex/components/plotly/plotly.py +22 -45
  80. reflex/components/plotly/plotly.pyi +164 -164
  81. reflex/components/radix/primitives/accordion.py +14 -14
  82. reflex/components/radix/primitives/accordion.pyi +439 -487
  83. reflex/components/radix/primitives/base.py +1 -3
  84. reflex/components/radix/primitives/base.pyi +15 -15
  85. reflex/components/radix/primitives/drawer.py +3 -3
  86. reflex/components/radix/primitives/drawer.pyi +110 -116
  87. reflex/components/radix/primitives/form.py +1 -1
  88. reflex/components/radix/primitives/form.pyi +668 -752
  89. reflex/components/radix/primitives/progress.py +6 -6
  90. reflex/components/radix/primitives/progress.pyi +225 -243
  91. reflex/components/radix/primitives/slider.py +6 -6
  92. reflex/components/radix/primitives/slider.pyi +52 -55
  93. reflex/components/radix/themes/base.py +3 -6
  94. reflex/components/radix/themes/base.pyi +197 -303
  95. reflex/components/radix/themes/color_mode.py +5 -5
  96. reflex/components/radix/themes/color_mode.pyi +366 -436
  97. reflex/components/radix/themes/components/alert_dialog.pyi +229 -262
  98. reflex/components/radix/themes/components/aspect_ratio.py +1 -3
  99. reflex/components/radix/themes/components/aspect_ratio.pyi +8 -8
  100. reflex/components/radix/themes/components/avatar.pyi +79 -94
  101. reflex/components/radix/themes/components/badge.pyi +252 -295
  102. reflex/components/radix/themes/components/button.pyi +269 -314
  103. reflex/components/radix/themes/components/callout.py +2 -2
  104. reflex/components/radix/themes/components/callout.pyi +1116 -1290
  105. reflex/components/radix/themes/components/card.pyi +194 -229
  106. reflex/components/radix/themes/components/checkbox.pyi +243 -278
  107. reflex/components/radix/themes/components/checkbox_cards.py +3 -7
  108. reflex/components/radix/themes/components/checkbox_cards.pyi +101 -135
  109. reflex/components/radix/themes/components/checkbox_group.py +2 -2
  110. reflex/components/radix/themes/components/checkbox_group.pyi +83 -96
  111. reflex/components/radix/themes/components/context_menu.py +18 -15
  112. reflex/components/radix/themes/components/context_menu.pyi +408 -458
  113. reflex/components/radix/themes/components/data_list.pyi +122 -147
  114. reflex/components/radix/themes/components/dialog.pyi +231 -264
  115. reflex/components/radix/themes/components/dropdown_menu.py +16 -13
  116. reflex/components/radix/themes/components/dropdown_menu.pyi +223 -246
  117. reflex/components/radix/themes/components/hover_card.py +2 -2
  118. reflex/components/radix/themes/components/hover_card.pyi +237 -282
  119. reflex/components/radix/themes/components/icon_button.pyi +269 -314
  120. reflex/components/radix/themes/components/inset.py +8 -8
  121. reflex/components/radix/themes/components/inset.pyi +232 -292
  122. reflex/components/radix/themes/components/popover.py +2 -2
  123. reflex/components/radix/themes/components/popover.pyi +229 -271
  124. reflex/components/radix/themes/components/progress.pyi +80 -96
  125. reflex/components/radix/themes/components/radio.pyi +73 -86
  126. reflex/components/radix/themes/components/radio_cards.py +4 -8
  127. reflex/components/radix/themes/components/radio_cards.pyi +117 -154
  128. reflex/components/radix/themes/components/radio_group.py +3 -3
  129. reflex/components/radix/themes/components/radio_group.pyi +250 -291
  130. reflex/components/radix/themes/components/scroll_area.pyi +14 -20
  131. reflex/components/radix/themes/components/segmented_control.py +6 -6
  132. reflex/components/radix/themes/components/segmented_control.pyi +89 -108
  133. reflex/components/radix/themes/components/select.py +7 -7
  134. reflex/components/radix/themes/components/select.pyi +376 -444
  135. reflex/components/radix/themes/components/separator.pyi +79 -93
  136. reflex/components/radix/themes/components/skeleton.pyi +32 -26
  137. reflex/components/radix/themes/components/slider.py +8 -8
  138. reflex/components/radix/themes/components/slider.pyi +99 -122
  139. reflex/components/radix/themes/components/spinner.pyi +12 -19
  140. reflex/components/radix/themes/components/switch.pyi +84 -99
  141. reflex/components/radix/themes/components/table.py +9 -9
  142. reflex/components/radix/themes/components/table.pyi +1440 -1794
  143. reflex/components/radix/themes/components/tabs.py +4 -4
  144. reflex/components/radix/themes/components/tabs.pyi +120 -132
  145. reflex/components/radix/themes/components/text_area.pyi +281 -331
  146. reflex/components/radix/themes/components/text_field.py +2 -2
  147. reflex/components/radix/themes/components/text_field.pyi +639 -734
  148. reflex/components/radix/themes/components/tooltip.py +6 -6
  149. reflex/components/radix/themes/components/tooltip.pyi +34 -43
  150. reflex/components/radix/themes/layout/base.pyi +85 -182
  151. reflex/components/radix/themes/layout/box.pyi +183 -210
  152. reflex/components/radix/themes/layout/center.pyi +225 -286
  153. reflex/components/radix/themes/layout/container.pyi +191 -224
  154. reflex/components/radix/themes/layout/flex.py +2 -2
  155. reflex/components/radix/themes/layout/flex.pyi +225 -286
  156. reflex/components/radix/themes/layout/grid.py +2 -2
  157. reflex/components/radix/themes/layout/grid.pyi +245 -315
  158. reflex/components/radix/themes/layout/list.py +2 -2
  159. reflex/components/radix/themes/layout/list.pyi +712 -815
  160. reflex/components/radix/themes/layout/section.pyi +187 -221
  161. reflex/components/radix/themes/layout/spacer.pyi +225 -286
  162. reflex/components/radix/themes/layout/stack.pyi +625 -768
  163. reflex/components/radix/themes/typography/blockquote.pyi +257 -299
  164. reflex/components/radix/themes/typography/code.pyi +259 -304
  165. reflex/components/radix/themes/typography/heading.pyi +272 -324
  166. reflex/components/radix/themes/typography/link.pyi +302 -358
  167. reflex/components/radix/themes/typography/text.pyi +1669 -1945
  168. reflex/components/react_player/audio.pyi +20 -22
  169. reflex/components/react_player/react_player.pyi +19 -19
  170. reflex/components/react_player/video.pyi +20 -22
  171. reflex/components/recharts/cartesian.py +100 -97
  172. reflex/components/recharts/cartesian.pyi +891 -1007
  173. reflex/components/recharts/charts.py +42 -42
  174. reflex/components/recharts/charts.pyi +212 -249
  175. reflex/components/recharts/general.py +22 -21
  176. reflex/components/recharts/general.pyi +198 -223
  177. reflex/components/recharts/polar.py +42 -45
  178. reflex/components/recharts/polar.pyi +254 -288
  179. reflex/components/recharts/recharts.pyi +13 -13
  180. reflex/components/sonner/toast.py +20 -20
  181. reflex/components/sonner/toast.pyi +58 -61
  182. reflex/components/suneditor/editor.py +9 -9
  183. reflex/components/suneditor/editor.pyi +78 -83
  184. reflex/components/tags/cond_tag.py +2 -2
  185. reflex/components/tags/iter_tag.py +10 -14
  186. reflex/components/tags/match_tag.py +2 -2
  187. reflex/components/tags/tag.py +10 -10
  188. reflex/config.py +36 -35
  189. reflex/constants/__init__.py +56 -53
  190. reflex/custom_components/custom_components.py +6 -7
  191. reflex/event.py +38 -42
  192. reflex/experimental/client_state.py +2 -4
  193. reflex/experimental/layout.py +2 -2
  194. reflex/experimental/layout.pyi +579 -663
  195. reflex/istate/data.py +4 -5
  196. reflex/middleware/hydrate_middleware.py +2 -2
  197. reflex/middleware/middleware.py +2 -2
  198. reflex/model.py +3 -5
  199. reflex/page.py +2 -2
  200. reflex/reflex.py +9 -10
  201. reflex/state.py +77 -49
  202. reflex/style.py +9 -3
  203. reflex/testing.py +21 -24
  204. reflex/utils/console.py +1 -1
  205. reflex/utils/decorator.py +26 -1
  206. reflex/utils/exec.py +6 -11
  207. reflex/utils/export.py +2 -3
  208. reflex/utils/format.py +4 -4
  209. reflex/utils/imports.py +12 -12
  210. reflex/utils/prerequisites.py +35 -84
  211. reflex/utils/processes.py +5 -5
  212. reflex/utils/pyi_generator.py +33 -22
  213. reflex/utils/serializers.py +60 -15
  214. reflex/utils/types.py +237 -56
  215. reflex/vars/base.py +122 -72
  216. reflex/vars/datetime.py +2 -2
  217. reflex/vars/function.py +52 -55
  218. reflex/vars/number.py +59 -5
  219. reflex/vars/object.py +57 -26
  220. reflex/vars/sequence.py +983 -958
  221. {reflex-0.7.1a4.dist-info → reflex-0.7.2a1.dist-info}/METADATA +3 -6
  222. reflex-0.7.2a1.dist-info/RECORD +405 -0
  223. {reflex-0.7.1a4.dist-info → reflex-0.7.2a1.dist-info}/WHEEL +1 -1
  224. reflex-0.7.1a4.dist-info/RECORD +0 -405
  225. {reflex-0.7.1a4.dist-info → reflex-0.7.2a1.dist-info}/LICENSE +0 -0
  226. {reflex-0.7.1a4.dist-info → reflex-0.7.2a1.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):