reflex 0.7.0a4__py3-none-any.whl → 0.7.1__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 (128) hide show
  1. reflex/.templates/jinja/web/package.json.jinja2 +7 -1
  2. reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -1
  3. reflex/__init__.py +1 -0
  4. reflex/__init__.pyi +1 -0
  5. reflex/app.py +269 -86
  6. reflex/base.py +4 -10
  7. reflex/compiler/compiler.py +46 -12
  8. reflex/compiler/templates.py +1 -2
  9. reflex/compiler/utils.py +23 -14
  10. reflex/components/base/bare.py +109 -16
  11. reflex/components/component.py +179 -124
  12. reflex/components/core/__init__.py +1 -0
  13. reflex/components/core/__init__.pyi +1 -0
  14. reflex/components/core/auto_scroll.py +114 -0
  15. reflex/components/core/auto_scroll.pyi +284 -0
  16. reflex/components/core/banner.py +40 -9
  17. reflex/components/core/banner.pyi +400 -87
  18. reflex/components/core/breakpoints.py +1 -1
  19. reflex/components/core/cond.py +0 -8
  20. reflex/components/core/foreach.py +12 -2
  21. reflex/components/core/html.pyi +200 -19
  22. reflex/components/core/match.py +4 -4
  23. reflex/components/core/sticky.py +4 -30
  24. reflex/components/core/sticky.pyi +874 -90
  25. reflex/components/core/upload.py +3 -5
  26. reflex/components/core/upload.pyi +2 -4
  27. reflex/components/datadisplay/code.py +36 -10
  28. reflex/components/datadisplay/code.pyi +1 -1
  29. reflex/components/datadisplay/dataeditor.py +1 -3
  30. reflex/components/datadisplay/dataeditor.pyi +1 -3
  31. reflex/components/el/elements/base.py +95 -17
  32. reflex/components/el/elements/base.pyi +278 -19
  33. reflex/components/el/elements/forms.py +124 -102
  34. reflex/components/el/elements/forms.pyi +2787 -365
  35. reflex/components/el/elements/inline.py +24 -15
  36. reflex/components/el/elements/inline.pyi +5655 -546
  37. reflex/components/el/elements/media.py +79 -95
  38. reflex/components/el/elements/media.pyi +5167 -565
  39. reflex/components/el/elements/metadata.py +19 -17
  40. reflex/components/el/elements/metadata.pyi +841 -89
  41. reflex/components/el/elements/other.py +3 -5
  42. reflex/components/el/elements/other.pyi +1404 -137
  43. reflex/components/el/elements/scripts.py +10 -13
  44. reflex/components/el/elements/scripts.pyi +634 -65
  45. reflex/components/el/elements/sectioning.pyi +3001 -286
  46. reflex/components/el/elements/tables.py +14 -35
  47. reflex/components/el/elements/tables.pyi +2029 -218
  48. reflex/components/el/elements/typography.py +10 -13
  49. reflex/components/el/elements/typography.pyi +3014 -297
  50. reflex/components/lucide/icon.py +22 -6
  51. reflex/components/markdown/markdown.py +30 -10
  52. reflex/components/markdown/markdown.pyi +3 -2
  53. reflex/components/plotly/plotly.py +1 -3
  54. reflex/components/plotly/plotly.pyi +1 -3
  55. reflex/components/radix/primitives/form.pyi +624 -93
  56. reflex/components/radix/themes/color_mode.py +1 -1
  57. reflex/components/radix/themes/color_mode.pyi +213 -31
  58. reflex/components/radix/themes/components/alert_dialog.pyi +199 -18
  59. reflex/components/radix/themes/components/badge.pyi +199 -18
  60. reflex/components/radix/themes/components/button.pyi +213 -31
  61. reflex/components/radix/themes/components/callout.pyi +1000 -95
  62. reflex/components/radix/themes/components/card.pyi +199 -18
  63. reflex/components/radix/themes/components/context_menu.py +79 -1
  64. reflex/components/radix/themes/components/context_menu.pyi +320 -1
  65. reflex/components/radix/themes/components/dialog.pyi +199 -18
  66. reflex/components/radix/themes/components/hover_card.pyi +199 -18
  67. reflex/components/radix/themes/components/icon_button.pyi +213 -31
  68. reflex/components/radix/themes/components/inset.pyi +199 -18
  69. reflex/components/radix/themes/components/popover.pyi +199 -18
  70. reflex/components/radix/themes/components/table.pyi +1437 -154
  71. reflex/components/radix/themes/components/text_area.py +2 -2
  72. reflex/components/radix/themes/components/text_area.pyi +201 -20
  73. reflex/components/radix/themes/components/text_field.py +1 -1
  74. reflex/components/radix/themes/components/text_field.pyi +444 -88
  75. reflex/components/radix/themes/layout/box.pyi +200 -19
  76. reflex/components/radix/themes/layout/center.pyi +199 -18
  77. reflex/components/radix/themes/layout/container.pyi +199 -18
  78. reflex/components/radix/themes/layout/flex.pyi +199 -18
  79. reflex/components/radix/themes/layout/grid.pyi +199 -18
  80. reflex/components/radix/themes/layout/list.pyi +604 -57
  81. reflex/components/radix/themes/layout/section.pyi +199 -18
  82. reflex/components/radix/themes/layout/spacer.pyi +199 -18
  83. reflex/components/radix/themes/layout/stack.pyi +597 -54
  84. reflex/components/radix/themes/typography/blockquote.pyi +200 -19
  85. reflex/components/radix/themes/typography/code.pyi +199 -18
  86. reflex/components/radix/themes/typography/heading.pyi +199 -18
  87. reflex/components/radix/themes/typography/link.pyi +238 -28
  88. reflex/components/radix/themes/typography/text.pyi +1394 -127
  89. reflex/components/react_player/react_player.py +1 -1
  90. reflex/components/react_player/react_player.pyi +1 -3
  91. reflex/components/sonner/toast.py +41 -12
  92. reflex/components/sonner/toast.pyi +20 -6
  93. reflex/components/tags/iter_tag.py +4 -0
  94. reflex/components/tags/tag.py +3 -3
  95. reflex/config.py +187 -28
  96. reflex/constants/__init__.py +2 -0
  97. reflex/constants/base.py +6 -0
  98. reflex/constants/compiler.py +9 -0
  99. reflex/constants/event.py +1 -0
  100. reflex/constants/installer.py +8 -5
  101. reflex/constants/utils.py +1 -3
  102. reflex/event.py +7 -16
  103. reflex/experimental/layout.pyi +597 -54
  104. reflex/py.typed +0 -0
  105. reflex/reflex.py +44 -48
  106. reflex/state.py +49 -44
  107. reflex/style.py +15 -22
  108. reflex/testing.py +2 -0
  109. reflex/utils/build.py +12 -0
  110. reflex/utils/console.py +4 -0
  111. reflex/utils/decorator.py +25 -0
  112. reflex/utils/exec.py +92 -34
  113. reflex/utils/format.py +35 -6
  114. reflex/utils/path_ops.py +32 -1
  115. reflex/utils/prerequisites.py +45 -35
  116. reflex/utils/processes.py +12 -13
  117. reflex/utils/serializers.py +20 -43
  118. reflex/utils/telemetry.py +4 -15
  119. reflex/utils/types.py +36 -66
  120. reflex/vars/base.py +53 -76
  121. reflex/vars/function.py +17 -5
  122. reflex/vars/number.py +1 -1
  123. reflex/vars/sequence.py +80 -4
  124. {reflex-0.7.0a4.dist-info → reflex-0.7.1.dist-info}/METADATA +4 -5
  125. {reflex-0.7.0a4.dist-info → reflex-0.7.1.dist-info}/RECORD +128 -124
  126. {reflex-0.7.0a4.dist-info → reflex-0.7.1.dist-info}/LICENSE +0 -0
  127. {reflex-0.7.0a4.dist-info → reflex-0.7.1.dist-info}/WHEEL +0 -0
  128. {reflex-0.7.0a4.dist-info → reflex-0.7.1.dist-info}/entry_points.txt +0 -0
@@ -1,11 +1,23 @@
1
1
  """Inline classes."""
2
2
 
3
- from typing import Union
3
+ from typing import Literal, Union
4
4
 
5
5
  from reflex.vars.base import Var
6
6
 
7
7
  from .base import BaseHTML
8
8
 
9
+ ReferrerPolicy = Literal[
10
+ "",
11
+ "no-referrer",
12
+ "no-referrer-when-downgrade",
13
+ "origin",
14
+ "origin-when-cross-origin",
15
+ "same-origin",
16
+ "strict-origin",
17
+ "strict-origin-when-cross-origin",
18
+ "unsafe-url",
19
+ ]
20
+
9
21
 
10
22
  class A(BaseHTML): # Inherits common attributes from BaseMeta
11
23
  """Display the 'a' element."""
@@ -13,31 +25,28 @@ class A(BaseHTML): # Inherits common attributes from BaseMeta
13
25
  tag = "a"
14
26
 
15
27
  # Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
16
- download: Var[Union[str, int, bool]]
28
+ download: Var[Union[str, bool]]
17
29
 
18
30
  # Specifies the URL of the page the link goes to
19
- href: Var[Union[str, int, bool]]
31
+ href: Var[str]
20
32
 
21
33
  # Specifies the language of the linked document
22
- href_lang: Var[Union[str, int, bool]]
34
+ href_lang: Var[str]
23
35
 
24
36
  # Specifies what media/device the linked document is optimized for
25
- media: Var[Union[str, int, bool]]
37
+ media: Var[str]
26
38
 
27
39
  # Specifies which referrer is sent when fetching the resource
28
- ping: Var[Union[str, int, bool]]
40
+ ping: Var[str]
29
41
 
30
42
  # Specifies the relationship between the current document and the linked document
31
- referrer_policy: Var[Union[str, int, bool]]
43
+ referrer_policy: Var[ReferrerPolicy]
32
44
 
33
45
  # Specifies the relationship between the linked document and the current document
34
- rel: Var[Union[str, int, bool]]
35
-
36
- # Specifies the shape of the area
37
- shape: Var[Union[str, int, bool]]
46
+ rel: Var[str]
38
47
 
39
48
  # Specifies where to open the linked document
40
- target: Var[Union[str, int, bool]]
49
+ target: Var[Union[str, Literal["_self", "_blank", "_parent", "_top"]]]
41
50
 
42
51
 
43
52
  class Abbr(BaseHTML):
@@ -88,7 +97,7 @@ class Data(BaseHTML):
88
97
  tag = "data"
89
98
 
90
99
  # Specifies the machine-readable translation of the data element.
91
- value: Var[Union[str, int, bool]]
100
+ value: Var[Union[str, int, float]]
92
101
 
93
102
 
94
103
  class Dfn(BaseHTML):
@@ -127,7 +136,7 @@ class Q(BaseHTML):
127
136
  tag = "q"
128
137
 
129
138
  # Specifies the source URL of the quote.
130
- cite: Var[Union[str, int, bool]]
139
+ cite: Var[str]
131
140
 
132
141
 
133
142
  class Rp(BaseHTML):
@@ -196,7 +205,7 @@ class Time(BaseHTML):
196
205
  tag = "time"
197
206
 
198
207
  # Specifies the date and/or time of the element.
199
- date_time: Var[Union[str, int, bool]]
208
+ date_time: Var[str]
200
209
 
201
210
 
202
211
  class U(BaseHTML):