reflex 0.8.0a4__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.
- reflex/.templates/jinja/web/pages/_app.js.jinja2 +1 -1
- reflex/.templates/jinja/web/styles/styles.css.jinja2 +1 -0
- reflex/.templates/web/app/routes.js +3 -3
- reflex/.templates/web/utils/client_side_routing.js +1 -1
- reflex/.templates/web/utils/state.js +110 -52
- reflex/__init__.pyi +327 -188
- reflex/app.py +50 -48
- reflex/compiler/compiler.py +6 -2
- reflex/compiler/utils.py +32 -14
- reflex/components/__init__.pyi +34 -15
- reflex/components/base/__init__.pyi +30 -19
- reflex/components/base/app_wrap.pyi +2 -3
- reflex/components/base/body.pyi +2 -3
- reflex/components/base/document.pyi +7 -13
- reflex/components/base/error_boundary.pyi +2 -3
- reflex/components/base/fragment.pyi +2 -3
- reflex/components/base/link.pyi +3 -5
- reflex/components/base/meta.py +4 -15
- reflex/components/base/meta.pyi +14 -18
- reflex/components/base/script.pyi +2 -3
- reflex/components/base/strict_mode.pyi +2 -3
- reflex/components/core/__init__.pyi +77 -38
- reflex/components/core/auto_scroll.pyi +2 -3
- reflex/components/core/banner.pyi +8 -14
- reflex/components/core/client_side_routing.pyi +2 -3
- reflex/components/core/clipboard.pyi +2 -3
- reflex/components/core/debounce.pyi +2 -3
- reflex/components/core/foreach.py +2 -2
- reflex/components/core/helmet.pyi +2 -3
- reflex/components/core/html.pyi +2 -3
- reflex/components/core/match.py +3 -3
- reflex/components/core/sticky.pyi +4 -7
- reflex/components/core/upload.py +2 -1
- reflex/components/core/upload.pyi +5 -9
- reflex/components/datadisplay/__init__.pyi +13 -7
- reflex/components/datadisplay/code.py +12 -7
- reflex/components/datadisplay/code.pyi +2 -3
- reflex/components/datadisplay/dataeditor.pyi +33 -11
- reflex/components/datadisplay/shiki_code_block.py +5 -3
- reflex/components/datadisplay/shiki_code_block.pyi +3 -5
- reflex/components/el/__init__.pyi +506 -246
- reflex/components/el/element.pyi +2 -3
- reflex/components/el/elements/__init__.pyi +504 -245
- reflex/components/el/elements/base.pyi +2 -3
- reflex/components/el/elements/forms.pyi +77 -49
- reflex/components/el/elements/inline.pyi +29 -57
- reflex/components/el/elements/media.pyi +26 -51
- reflex/components/el/elements/metadata.pyi +7 -13
- reflex/components/el/elements/other.pyi +8 -15
- reflex/components/el/elements/scripts.pyi +4 -7
- reflex/components/el/elements/sectioning.pyi +16 -31
- reflex/components/el/elements/tables.pyi +11 -21
- reflex/components/el/elements/typography.pyi +16 -31
- reflex/components/gridjs/datatable.pyi +3 -5
- reflex/components/lucide/icon.pyi +4 -7
- reflex/components/markdown/markdown.py +5 -3
- reflex/components/markdown/markdown.pyi +2 -3
- reflex/components/moment/moment.py +1 -1
- reflex/components/moment/moment.pyi +2 -3
- reflex/components/plotly/plotly.py +12 -6
- reflex/components/plotly/plotly.pyi +31 -39
- reflex/components/radix/__init__.pyi +123 -65
- reflex/components/radix/primitives/__init__.pyi +6 -4
- reflex/components/radix/primitives/accordion.pyi +8 -15
- reflex/components/radix/primitives/base.pyi +3 -5
- reflex/components/radix/primitives/drawer.pyi +11 -21
- reflex/components/radix/primitives/form.pyi +22 -22
- reflex/components/radix/primitives/progress.pyi +5 -9
- reflex/components/radix/primitives/slider.pyi +6 -11
- reflex/components/radix/themes/__init__.pyi +5 -6
- reflex/components/radix/themes/base.pyi +9 -17
- reflex/components/radix/themes/color_mode.py +5 -6
- reflex/components/radix/themes/color_mode.pyi +4 -7
- reflex/components/radix/themes/components/__init__.pyi +75 -38
- reflex/components/radix/themes/components/alert_dialog.pyi +8 -15
- reflex/components/radix/themes/components/aspect_ratio.pyi +2 -3
- reflex/components/radix/themes/components/avatar.pyi +2 -3
- reflex/components/radix/themes/components/badge.pyi +2 -3
- reflex/components/radix/themes/components/button.pyi +2 -3
- reflex/components/radix/themes/components/callout.pyi +5 -9
- reflex/components/radix/themes/components/card.pyi +2 -3
- reflex/components/radix/themes/components/checkbox.pyi +3 -5
- reflex/components/radix/themes/components/checkbox_cards.pyi +3 -5
- reflex/components/radix/themes/components/checkbox_group.pyi +3 -5
- reflex/components/radix/themes/components/context_menu.pyi +14 -27
- reflex/components/radix/themes/components/data_list.pyi +5 -9
- reflex/components/radix/themes/components/dialog.pyi +7 -13
- reflex/components/radix/themes/components/dropdown_menu.pyi +9 -17
- reflex/components/radix/themes/components/hover_card.pyi +4 -7
- reflex/components/radix/themes/components/icon_button.pyi +2 -3
- reflex/components/radix/themes/components/inset.pyi +2 -3
- reflex/components/radix/themes/components/popover.pyi +5 -9
- reflex/components/radix/themes/components/progress.pyi +2 -3
- reflex/components/radix/themes/components/radio.pyi +2 -3
- reflex/components/radix/themes/components/radio_cards.pyi +3 -5
- reflex/components/radix/themes/components/radio_group.pyi +4 -7
- reflex/components/radix/themes/components/scroll_area.pyi +2 -3
- reflex/components/radix/themes/components/segmented_control.pyi +3 -5
- reflex/components/radix/themes/components/select.pyi +9 -17
- reflex/components/radix/themes/components/separator.pyi +2 -3
- reflex/components/radix/themes/components/skeleton.pyi +2 -3
- reflex/components/radix/themes/components/slider.pyi +12 -5
- reflex/components/radix/themes/components/spinner.pyi +2 -3
- reflex/components/radix/themes/components/switch.pyi +2 -3
- reflex/components/radix/themes/components/table.pyi +8 -15
- reflex/components/radix/themes/components/tabs.pyi +5 -9
- reflex/components/radix/themes/components/text_area.pyi +10 -5
- reflex/components/radix/themes/components/text_field.pyi +19 -9
- reflex/components/radix/themes/components/tooltip.pyi +2 -3
- reflex/components/radix/themes/layout/__init__.pyi +27 -14
- reflex/components/radix/themes/layout/base.pyi +2 -3
- reflex/components/radix/themes/layout/box.pyi +2 -3
- reflex/components/radix/themes/layout/center.pyi +2 -3
- reflex/components/radix/themes/layout/container.pyi +2 -3
- reflex/components/radix/themes/layout/flex.pyi +2 -3
- reflex/components/radix/themes/layout/grid.pyi +2 -3
- reflex/components/radix/themes/layout/list.pyi +5 -9
- reflex/components/radix/themes/layout/section.pyi +2 -3
- reflex/components/radix/themes/layout/spacer.pyi +2 -3
- reflex/components/radix/themes/layout/stack.pyi +4 -7
- reflex/components/radix/themes/typography/__init__.pyi +7 -5
- reflex/components/radix/themes/typography/blockquote.pyi +2 -3
- reflex/components/radix/themes/typography/code.pyi +2 -3
- reflex/components/radix/themes/typography/heading.pyi +2 -3
- reflex/components/radix/themes/typography/link.pyi +3 -5
- reflex/components/radix/themes/typography/text.pyi +7 -13
- reflex/components/react_player/audio.pyi +5 -4
- reflex/components/react_player/react_player.pyi +2 -3
- reflex/components/react_player/video.pyi +5 -4
- reflex/components/recharts/__init__.pyi +208 -100
- reflex/components/recharts/cartesian.py +8 -7
- reflex/components/recharts/cartesian.pyi +25 -48
- reflex/components/recharts/charts.pyi +13 -25
- reflex/components/recharts/general.pyi +7 -13
- reflex/components/recharts/polar.pyi +7 -13
- reflex/components/recharts/recharts.py +2 -2
- reflex/components/recharts/recharts.pyi +3 -5
- reflex/components/sonner/toast.py +1 -1
- reflex/components/sonner/toast.pyi +2 -3
- reflex/constants/installer.py +7 -8
- reflex/constants/route.py +13 -6
- reflex/istate/__init__.py +69 -0
- reflex/istate/manager.py +1 -0
- reflex/plugins/shared_tailwind.py +58 -1
- reflex/plugins/tailwind_v3.py +4 -4
- reflex/plugins/tailwind_v4.py +6 -5
- reflex/route.py +159 -71
- reflex/state.py +38 -16
- reflex/testing.py +2 -1
- reflex/utils/exec.py +18 -13
- reflex/utils/format.py +1 -5
- reflex/utils/imports.py +5 -12
- reflex/utils/misc.py +40 -0
- reflex/utils/prerequisites.py +7 -12
- reflex/utils/processes.py +8 -41
- reflex/utils/pyi_generator.py +23 -40
- reflex/utils/telemetry.py +0 -15
- reflex/utils/types.py +1 -1
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/METADATA +3 -3
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/RECORD +163 -163
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/WHEEL +0 -0
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/entry_points.txt +0 -0
- {reflex-0.8.0a4.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
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
10
10
|
from reflex.components.el.elements.typography import Div
|
|
@@ -13,9 +13,8 @@ from reflex.utils.imports import ImportDict
|
|
|
13
13
|
from reflex.vars.base import Var
|
|
14
14
|
|
|
15
15
|
class AutoScroll(Div):
|
|
16
|
-
@overload
|
|
17
16
|
@classmethod
|
|
18
|
-
def create(
|
|
17
|
+
def create(
|
|
19
18
|
cls,
|
|
20
19
|
*children,
|
|
21
20
|
access_key: Var[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
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.components.base.fragment import Fragment
|
|
10
10
|
from reflex.components.component import Component
|
|
@@ -38,15 +38,14 @@ has_too_many_connection_errors = Var(
|
|
|
38
38
|
|
|
39
39
|
class WebsocketTargetURL(Var):
|
|
40
40
|
@classmethod
|
|
41
|
-
def create(cls) -> Var: ...
|
|
41
|
+
def create(cls) -> Var: ...
|
|
42
42
|
|
|
43
43
|
def default_connection_error() -> list[str | Var | Component]: ...
|
|
44
44
|
|
|
45
45
|
class ConnectionToaster(Fragment):
|
|
46
46
|
def add_hooks(self) -> list[str | Var]: ...
|
|
47
|
-
@overload
|
|
48
47
|
@classmethod
|
|
49
|
-
def create(
|
|
48
|
+
def create(
|
|
50
49
|
cls,
|
|
51
50
|
*children,
|
|
52
51
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -96,9 +95,8 @@ class ConnectionToaster(Fragment):
|
|
|
96
95
|
"""
|
|
97
96
|
|
|
98
97
|
class ConnectionBanner(Component):
|
|
99
|
-
@overload
|
|
100
98
|
@classmethod
|
|
101
|
-
def create(
|
|
99
|
+
def create(
|
|
102
100
|
cls,
|
|
103
101
|
*children,
|
|
104
102
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -140,9 +138,8 @@ class ConnectionBanner(Component):
|
|
|
140
138
|
"""
|
|
141
139
|
|
|
142
140
|
class ConnectionModal(Component):
|
|
143
|
-
@overload
|
|
144
141
|
@classmethod
|
|
145
|
-
def create(
|
|
142
|
+
def create(
|
|
146
143
|
cls,
|
|
147
144
|
*children,
|
|
148
145
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -184,9 +181,8 @@ class ConnectionModal(Component):
|
|
|
184
181
|
"""
|
|
185
182
|
|
|
186
183
|
class WifiOffPulse(Icon):
|
|
187
|
-
@overload
|
|
188
184
|
@classmethod
|
|
189
|
-
def create(
|
|
185
|
+
def create(
|
|
190
186
|
cls,
|
|
191
187
|
*children,
|
|
192
188
|
size: Var[int] | int | None = None,
|
|
@@ -240,9 +236,8 @@ class WifiOffPulse(Icon):
|
|
|
240
236
|
def add_imports(self) -> dict[str, str | ImportVar | list[str | ImportVar]]: ...
|
|
241
237
|
|
|
242
238
|
class ConnectionPulser(Div):
|
|
243
|
-
@overload
|
|
244
239
|
@classmethod
|
|
245
|
-
def create(
|
|
240
|
+
def create(
|
|
246
241
|
cls,
|
|
247
242
|
*children,
|
|
248
243
|
access_key: Var[str] | str | None = None,
|
|
@@ -485,9 +480,8 @@ class ConnectionPulser(Div):
|
|
|
485
480
|
"""
|
|
486
481
|
|
|
487
482
|
class BackendDisabled(Div):
|
|
488
|
-
@overload
|
|
489
483
|
@classmethod
|
|
490
|
-
def create(
|
|
484
|
+
def create(
|
|
491
485
|
cls,
|
|
492
486
|
*children,
|
|
493
487
|
access_key: Var[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
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.component import Component
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -16,9 +16,8 @@ route_not_found: Var
|
|
|
16
16
|
class ClientSideRouting(Component):
|
|
17
17
|
def add_hooks(self) -> list[str | Var]: ...
|
|
18
18
|
def render(self) -> str: ...
|
|
19
|
-
@overload
|
|
20
19
|
@classmethod
|
|
21
|
-
def create(
|
|
20
|
+
def create(
|
|
22
21
|
cls,
|
|
23
22
|
*children,
|
|
24
23
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -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
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.base.fragment import Fragment
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -13,9 +13,8 @@ from reflex.utils.imports import ImportVar
|
|
|
13
13
|
from reflex.vars.base import Var
|
|
14
14
|
|
|
15
15
|
class Clipboard(Fragment):
|
|
16
|
-
@overload
|
|
17
16
|
@classmethod
|
|
18
|
-
def create(
|
|
17
|
+
def create(
|
|
19
18
|
cls,
|
|
20
19
|
*children,
|
|
21
20
|
targets: Sequence[str] | Var[Sequence[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
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.component import Component
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -14,9 +14,8 @@ from reflex.vars.base import Var
|
|
|
14
14
|
DEFAULT_DEBOUNCE_TIMEOUT = 300
|
|
15
15
|
|
|
16
16
|
class DebounceInput(Component):
|
|
17
|
-
@overload
|
|
18
17
|
@classmethod
|
|
19
|
-
def create(
|
|
18
|
+
def create(
|
|
20
19
|
cls,
|
|
21
20
|
*children,
|
|
22
21
|
min_length: Var[int] | int | None = None,
|
|
@@ -8,7 +8,7 @@ from collections.abc import Callable, Iterable
|
|
|
8
8
|
from typing import Any
|
|
9
9
|
|
|
10
10
|
from reflex.components.base.fragment import Fragment
|
|
11
|
-
from reflex.components.component import Component
|
|
11
|
+
from reflex.components.component import Component, field
|
|
12
12
|
from reflex.components.core.cond import cond
|
|
13
13
|
from reflex.components.tags import IterTag
|
|
14
14
|
from reflex.constants import MemoizationMode
|
|
@@ -36,7 +36,7 @@ class Foreach(Component):
|
|
|
36
36
|
iterable: Var[Iterable]
|
|
37
37
|
|
|
38
38
|
# A function from the render args to the component.
|
|
39
|
-
render_fn: Callable = Fragment.create
|
|
39
|
+
render_fn: Callable = field(default=Fragment.create, is_javascript_property=False)
|
|
40
40
|
|
|
41
41
|
@classmethod
|
|
42
42
|
def create(
|
|
@@ -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
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.component import Component
|
|
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 Helmet(Component):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
style: Sequence[Mapping[str, Any]]
|
reflex/components/core/html.pyi
CHANGED
|
@@ -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
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
10
10
|
from reflex.components.el.elements.typography import Div
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class Html(Div):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
dangerouslySetInnerHTML: Var[dict[str, str]] | dict[str, str] | None = None,
|
reflex/components/core/match.py
CHANGED
|
@@ -4,7 +4,7 @@ import textwrap
|
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
6
|
from reflex.components.base import Fragment
|
|
7
|
-
from reflex.components.component import BaseComponent, Component, MemoizationLeaf
|
|
7
|
+
from reflex.components.component import BaseComponent, Component, MemoizationLeaf, field
|
|
8
8
|
from reflex.components.tags import MatchTag, Tag
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from reflex.utils import format
|
|
@@ -21,10 +21,10 @@ class Match(MemoizationLeaf):
|
|
|
21
21
|
cond: Var[Any]
|
|
22
22
|
|
|
23
23
|
# The list of match cases to be matched.
|
|
24
|
-
match_cases: list[Any] =
|
|
24
|
+
match_cases: list[Any] = field(default_factory=list, is_javascript_property=False)
|
|
25
25
|
|
|
26
26
|
# The catchall case to match.
|
|
27
|
-
default: Any
|
|
27
|
+
default: Any = field(default=None, is_javascript_property=False)
|
|
28
28
|
|
|
29
29
|
@classmethod
|
|
30
30
|
def create(cls, cond: Any, *cases) -> Component | Var:
|
|
@@ -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
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.components.component import ComponentNamespace
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -15,9 +15,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
15
15
|
from reflex.vars.base import Var
|
|
16
16
|
|
|
17
17
|
class StickyLogo(Svg):
|
|
18
|
-
@overload
|
|
19
18
|
@classmethod
|
|
20
|
-
def create(
|
|
19
|
+
def create(
|
|
21
20
|
cls,
|
|
22
21
|
*children,
|
|
23
22
|
width: Var[int | str] | int | str | None = None,
|
|
@@ -239,9 +238,8 @@ class StickyLogo(Svg):
|
|
|
239
238
|
def add_style(self): ...
|
|
240
239
|
|
|
241
240
|
class StickyLabel(Text):
|
|
242
|
-
@overload
|
|
243
241
|
@classmethod
|
|
244
|
-
def create(
|
|
242
|
+
def create(
|
|
245
243
|
cls,
|
|
246
244
|
*children,
|
|
247
245
|
as_child: Var[bool] | bool | None = None,
|
|
@@ -592,9 +590,8 @@ class StickyLabel(Text):
|
|
|
592
590
|
def add_style(self): ...
|
|
593
591
|
|
|
594
592
|
class StickyBadge(A):
|
|
595
|
-
@overload
|
|
596
593
|
@classmethod
|
|
597
|
-
def create(
|
|
594
|
+
def create(
|
|
598
595
|
cls,
|
|
599
596
|
*children,
|
|
600
597
|
download: Var[bool | str] | bool | str | None = None,
|
reflex/components/core/upload.py
CHANGED
|
@@ -12,6 +12,7 @@ from reflex.components.component import (
|
|
|
12
12
|
ComponentNamespace,
|
|
13
13
|
MemoizationLeaf,
|
|
14
14
|
StatefulComponent,
|
|
15
|
+
field,
|
|
15
16
|
)
|
|
16
17
|
from reflex.components.core.cond import cond
|
|
17
18
|
from reflex.components.el.elements.forms import Input
|
|
@@ -234,7 +235,7 @@ class Upload(MemoizationLeaf):
|
|
|
234
235
|
on_drop: EventHandler[_on_drop_spec]
|
|
235
236
|
|
|
236
237
|
# Style rules to apply when actively dragging.
|
|
237
|
-
drag_active_style: Style | None = None
|
|
238
|
+
drag_active_style: Style | None = field(default=None, is_javascript_property=False)
|
|
238
239
|
|
|
239
240
|
@classmethod
|
|
240
241
|
def create(cls, *children, **props) -> Component:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Any, ClassVar
|
|
8
|
+
from typing import Any, ClassVar
|
|
9
9
|
|
|
10
10
|
from reflex.components.base.fragment import Fragment
|
|
11
11
|
from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
|
|
@@ -40,9 +40,8 @@ uploaded_files_url_prefix = Var(
|
|
|
40
40
|
def get_upload_url(file_path: str | Var[str]) -> Var[str]: ...
|
|
41
41
|
|
|
42
42
|
class UploadFilesProvider(Component):
|
|
43
|
-
@overload
|
|
44
43
|
@classmethod
|
|
45
|
-
def create(
|
|
44
|
+
def create(
|
|
46
45
|
cls,
|
|
47
46
|
*children,
|
|
48
47
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -92,9 +91,8 @@ class UploadFilesProvider(Component):
|
|
|
92
91
|
"""
|
|
93
92
|
|
|
94
93
|
class GhostUpload(Fragment):
|
|
95
|
-
@overload
|
|
96
94
|
@classmethod
|
|
97
|
-
def create(
|
|
95
|
+
def create(
|
|
98
96
|
cls,
|
|
99
97
|
*children,
|
|
100
98
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -148,9 +146,8 @@ class GhostUpload(Fragment):
|
|
|
148
146
|
class Upload(MemoizationLeaf):
|
|
149
147
|
is_used: ClassVar[bool] = False
|
|
150
148
|
|
|
151
|
-
@overload
|
|
152
149
|
@classmethod
|
|
153
|
-
def create(
|
|
150
|
+
def create(
|
|
154
151
|
cls,
|
|
155
152
|
*children,
|
|
156
153
|
accept: Var[dict[str, Sequence] | None] | dict[str, Sequence] | None = None,
|
|
@@ -222,9 +219,8 @@ class Upload(MemoizationLeaf):
|
|
|
222
219
|
"""
|
|
223
220
|
|
|
224
221
|
class StyledUpload(Upload):
|
|
225
|
-
@overload
|
|
226
222
|
@classmethod
|
|
227
|
-
def create(
|
|
223
|
+
def create(
|
|
228
224
|
cls,
|
|
229
225
|
*children,
|
|
230
226
|
accept: Var[dict[str, Sequence] | None] | dict[str, Sequence] | None = None,
|
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
5
5
|
|
|
6
|
-
from .code import CodeBlock
|
|
7
|
-
from .
|
|
8
|
-
from .
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
from .code import CodeBlock, LiteralCodeLanguage, code_block
|
|
7
|
+
from .dataeditor import DataEditorTheme, data_editor, data_editor_theme
|
|
8
|
+
from .logo import logo
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"CodeBlock",
|
|
12
|
+
"DataEditorTheme",
|
|
13
|
+
"LiteralCodeLanguage",
|
|
14
|
+
"code_block",
|
|
15
|
+
"data_editor",
|
|
16
|
+
"data_editor_theme",
|
|
17
|
+
"logo",
|
|
18
|
+
]
|
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import dataclasses
|
|
6
6
|
from typing import ClassVar, Literal
|
|
7
7
|
|
|
8
|
-
from reflex.components.component import Component, ComponentNamespace
|
|
8
|
+
from reflex.components.component import Component, ComponentNamespace, field
|
|
9
9
|
from reflex.components.core.cond import color_mode_cond
|
|
10
10
|
from reflex.components.lucide.icon import Icon
|
|
11
11
|
from reflex.components.markdown.markdown import MarkdownComponentMap
|
|
@@ -407,16 +407,24 @@ class CodeBlock(Component, MarkdownComponentMap):
|
|
|
407
407
|
wrap_long_lines: Var[bool]
|
|
408
408
|
|
|
409
409
|
# A custom style for the code block.
|
|
410
|
-
custom_style: dict[str, str | Var | Color] =
|
|
410
|
+
custom_style: dict[str, str | Var | Color] = field(
|
|
411
|
+
default_factory=dict, is_javascript_property=False
|
|
412
|
+
)
|
|
411
413
|
|
|
412
414
|
# Props passed down to the code tag.
|
|
413
415
|
code_tag_props: Var[dict[str, str]]
|
|
414
416
|
|
|
415
417
|
# Whether a copy button should appear.
|
|
416
|
-
can_copy: bool | None =
|
|
418
|
+
can_copy: bool | None = field(
|
|
419
|
+
default=False,
|
|
420
|
+
is_javascript_property=False,
|
|
421
|
+
)
|
|
417
422
|
|
|
418
423
|
# A custom copy button to override the default one.
|
|
419
|
-
copy_button: bool | Component | None =
|
|
424
|
+
copy_button: bool | Component | None = field(
|
|
425
|
+
default=None,
|
|
426
|
+
is_javascript_property=False,
|
|
427
|
+
)
|
|
420
428
|
|
|
421
429
|
@classmethod
|
|
422
430
|
def create(
|
|
@@ -498,9 +506,6 @@ class CodeBlock(Component, MarkdownComponentMap):
|
|
|
498
506
|
|
|
499
507
|
return out
|
|
500
508
|
|
|
501
|
-
def _exclude_props(self) -> list[str]:
|
|
502
|
-
return ["can_copy", "copy_button"]
|
|
503
|
-
|
|
504
509
|
|
|
505
510
|
class CodeblockNamespace(ComponentNamespace):
|
|
506
511
|
"""Namespace for the CodeBlock component."""
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
import dataclasses
|
|
7
7
|
from collections.abc import Mapping, Sequence
|
|
8
|
-
from typing import Any, ClassVar, Literal
|
|
8
|
+
from typing import Any, ClassVar, Literal
|
|
9
9
|
|
|
10
10
|
from reflex.components.component import Component, ComponentNamespace
|
|
11
11
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -351,9 +351,8 @@ for theme_name in dir(Theme):
|
|
|
351
351
|
setattr(Theme, theme_name, getattr(Theme, theme_name)._replace(_var_type=Theme))
|
|
352
352
|
|
|
353
353
|
class CodeBlock(Component, MarkdownComponentMap):
|
|
354
|
-
@overload
|
|
355
354
|
@classmethod
|
|
356
|
-
def create(
|
|
355
|
+
def create(
|
|
357
356
|
cls,
|
|
358
357
|
*children,
|
|
359
358
|
theme: Theme | Var[Theme | str] | str | None = None,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Any, Literal, TypedDict
|
|
8
|
+
from typing import Any, Literal, TypedDict
|
|
9
9
|
|
|
10
10
|
from reflex.base import Base
|
|
11
11
|
from reflex.components.component import NoSSRComponent
|
|
@@ -128,9 +128,8 @@ class GridColumn(TypedDict):
|
|
|
128
128
|
class DataEditor(NoSSRComponent):
|
|
129
129
|
def add_imports(self) -> ImportDict: ...
|
|
130
130
|
def add_hooks(self) -> list[str]: ...
|
|
131
|
-
@overload
|
|
132
131
|
@classmethod
|
|
133
|
-
def create(
|
|
132
|
+
def create(
|
|
134
133
|
cls,
|
|
135
134
|
*children,
|
|
136
135
|
rows: Var[int] | int | None = None,
|
|
@@ -181,20 +180,43 @@ class DataEditor(NoSSRComponent):
|
|
|
181
180
|
on_cell_activated: EventType[()] | EventType[tuple[int, int]] | None = None,
|
|
182
181
|
on_cell_clicked: EventType[()] | EventType[tuple[int, int]] | None = None,
|
|
183
182
|
on_cell_context_menu: EventType[()] | EventType[tuple[int, int]] | None = None,
|
|
184
|
-
on_cell_edited: EventType[()]
|
|
183
|
+
on_cell_edited: EventType[()]
|
|
184
|
+
| EventType[tuple[int, int]]
|
|
185
|
+
| EventType[tuple[int, int], GridCell]
|
|
186
|
+
| None = None,
|
|
185
187
|
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
186
|
-
on_column_resize: EventType[()]
|
|
188
|
+
on_column_resize: EventType[()]
|
|
189
|
+
| EventType[GridColumn]
|
|
190
|
+
| EventType[GridColumn, int]
|
|
191
|
+
| None = None,
|
|
187
192
|
on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
188
193
|
on_delete: EventType[()] | EventType[GridSelection] | None = None,
|
|
189
194
|
on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
190
|
-
on_finished_editing: EventType[()]
|
|
195
|
+
on_finished_editing: EventType[()]
|
|
196
|
+
| EventType[GridCell | None]
|
|
197
|
+
| EventType[GridCell | None, tuple[int, int]]
|
|
198
|
+
| None = None,
|
|
191
199
|
on_focus: EventType[()] | None = None,
|
|
192
|
-
on_group_header_clicked: EventType[()]
|
|
193
|
-
|
|
194
|
-
|
|
200
|
+
on_group_header_clicked: EventType[()]
|
|
201
|
+
| EventType[tuple[int, int]]
|
|
202
|
+
| EventType[tuple[int, int], GridCell]
|
|
203
|
+
| None = None,
|
|
204
|
+
on_group_header_context_menu: EventType[()]
|
|
205
|
+
| EventType[int]
|
|
206
|
+
| EventType[int, GroupHeaderClickedEventArgs]
|
|
207
|
+
| None = None,
|
|
208
|
+
on_group_header_renamed: EventType[()]
|
|
209
|
+
| EventType[str]
|
|
210
|
+
| EventType[str, str]
|
|
211
|
+
| None = None,
|
|
195
212
|
on_header_clicked: EventType[()] | EventType[tuple[int, int]] | None = None,
|
|
196
|
-
on_header_context_menu: EventType[()]
|
|
197
|
-
|
|
213
|
+
on_header_context_menu: EventType[()]
|
|
214
|
+
| EventType[tuple[int, int]]
|
|
215
|
+
| None = None,
|
|
216
|
+
on_header_menu_click: EventType[()]
|
|
217
|
+
| EventType[int]
|
|
218
|
+
| EventType[int, Rectangle]
|
|
219
|
+
| None = None,
|
|
198
220
|
on_item_hovered: EventType[()] | EventType[tuple[int, int]] | None = None,
|
|
199
221
|
on_mount: EventType[()] | None = None,
|
|
200
222
|
on_mouse_down: EventType[()] | None = None,
|
|
@@ -8,7 +8,7 @@ from collections import defaultdict
|
|
|
8
8
|
from dataclasses import dataclass
|
|
9
9
|
from typing import Any, Literal
|
|
10
10
|
|
|
11
|
-
from reflex.components.component import Component, ComponentNamespace
|
|
11
|
+
from reflex.components.component import Component, ComponentNamespace, field
|
|
12
12
|
from reflex.components.core.colors import color
|
|
13
13
|
from reflex.components.core.cond import color_mode_cond
|
|
14
14
|
from reflex.components.el.elements.forms import Button
|
|
@@ -721,10 +721,12 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
|
|
|
721
721
|
show_line_numbers: Var[bool]
|
|
722
722
|
|
|
723
723
|
# Whether a copy button should appear.
|
|
724
|
-
can_copy: bool = False
|
|
724
|
+
can_copy: bool = field(default=False, is_javascript_property=False)
|
|
725
725
|
|
|
726
726
|
# copy_button: A custom copy button to override the default one.
|
|
727
|
-
copy_button: Component | bool | None =
|
|
727
|
+
copy_button: Component | bool | None = field(
|
|
728
|
+
default=None, is_javascript_property=False
|
|
729
|
+
)
|
|
728
730
|
|
|
729
731
|
@classmethod
|
|
730
732
|
def create(
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
7
|
from dataclasses import dataclass
|
|
8
|
-
from typing import Any, Literal
|
|
8
|
+
from typing import Any, Literal
|
|
9
9
|
|
|
10
10
|
from reflex.components.component import Component, ComponentNamespace
|
|
11
11
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -356,9 +356,8 @@ class ShikiJsTransformer(ShikiBaseTransformers):
|
|
|
356
356
|
style: Style | None
|
|
357
357
|
|
|
358
358
|
class ShikiCodeBlock(Component, MarkdownComponentMap):
|
|
359
|
-
@overload
|
|
360
359
|
@classmethod
|
|
361
|
-
def create(
|
|
360
|
+
def create(
|
|
362
361
|
cls,
|
|
363
362
|
*children,
|
|
364
363
|
language: Literal[
|
|
@@ -971,9 +970,8 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
|
|
|
971
970
|
) -> ShikiBaseTransformers: ...
|
|
972
971
|
|
|
973
972
|
class ShikiHighLevelCodeBlock(ShikiCodeBlock):
|
|
974
|
-
@overload
|
|
975
973
|
@classmethod
|
|
976
|
-
def create(
|
|
974
|
+
def create(
|
|
977
975
|
cls,
|
|
978
976
|
*children,
|
|
979
977
|
use_transformers: Var[bool] | bool | None = None,
|