reflex 0.8.13a1__py3-none-any.whl → 0.8.14a2__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/app.py +25 -5
- reflex/compiler/templates.py +4 -0
- reflex/components/core/upload.py +9 -13
- reflex/components/core/upload.pyi +27 -9
- reflex/components/plotly/plotly.py +9 -9
- reflex/components/radix/primitives/__init__.py +1 -1
- reflex/components/radix/primitives/__init__.pyi +2 -1
- reflex/components/radix/primitives/base.py +31 -0
- reflex/components/radix/primitives/base.pyi +44 -0
- reflex/components/radix/primitives/dialog.py +148 -0
- reflex/components/radix/primitives/dialog.pyi +749 -0
- reflex/components/radix/primitives/slider.py +3 -17
- reflex/components/radix/primitives/slider.pyi +2 -4
- reflex/components/radix/themes/components/slider.py +1 -2
- reflex/components/radix/themes/components/slider.pyi +3 -6
- reflex/components/react_player/audio.pyi +23 -46
- reflex/components/react_player/react_player.pyi +40 -45
- reflex/components/react_player/video.pyi +23 -46
- reflex/constants/colors.py +1 -3
- reflex/constants/installer.py +5 -5
- reflex/custom_components/custom_components.py +18 -18
- reflex/environment.py +3 -0
- reflex/event.py +1 -1
- reflex/plugins/shared_tailwind.py +1 -1
- reflex/reflex.py +62 -24
- reflex/state.py +3 -2
- reflex/utils/exec.py +23 -4
- reflex/utils/frontend_skeleton.py +3 -5
- reflex/utils/js_runtimes.py +43 -33
- reflex/utils/prerequisites.py +5 -6
- reflex/utils/processes.py +10 -11
- reflex/utils/rename.py +3 -5
- reflex/utils/serializers.py +3 -7
- reflex/utils/templates.py +20 -22
- reflex/vars/base.py +3 -6
- reflex/vars/color.py +2 -68
- reflex/vars/object.py +1 -3
- reflex/vars/sequence.py +2 -2
- {reflex-0.8.13a1.dist-info → reflex-0.8.14a2.dist-info}/METADATA +1 -1
- {reflex-0.8.13a1.dist-info → reflex-0.8.14a2.dist-info}/RECORD +43 -41
- {reflex-0.8.13a1.dist-info → reflex-0.8.14a2.dist-info}/WHEEL +0 -0
- {reflex-0.8.13a1.dist-info → reflex-0.8.14a2.dist-info}/entry_points.txt +0 -0
- {reflex-0.8.13a1.dist-info → reflex-0.8.14a2.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,7 +7,7 @@ from typing import Any, Literal
|
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import Component, ComponentNamespace
|
|
9
9
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
|
10
|
-
from reflex.event import EventHandler
|
|
10
|
+
from reflex.event import EventHandler, passthrough_event_spec
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
13
13
|
LiteralSliderOrientation = Literal["horizontal", "vertical"]
|
|
@@ -20,20 +20,6 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
|
|
|
20
20
|
library = "@radix-ui/react-slider@1.3.6"
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
def on_value_event_spec(
|
|
24
|
-
value: Var[list[int]],
|
|
25
|
-
) -> tuple[Var[list[int]]]:
|
|
26
|
-
"""Event handler spec for the value event.
|
|
27
|
-
|
|
28
|
-
Args:
|
|
29
|
-
value: The value of the event.
|
|
30
|
-
|
|
31
|
-
Returns:
|
|
32
|
-
The event handler spec.
|
|
33
|
-
"""
|
|
34
|
-
return (value,)
|
|
35
|
-
|
|
36
|
-
|
|
37
23
|
class SliderRoot(SliderComponent):
|
|
38
24
|
"""The Slider component containing all slider parts."""
|
|
39
25
|
|
|
@@ -63,10 +49,10 @@ class SliderRoot(SliderComponent):
|
|
|
63
49
|
min_steps_between_thumbs: Var[int]
|
|
64
50
|
|
|
65
51
|
# Fired when the value of a thumb changes.
|
|
66
|
-
on_value_change: EventHandler[
|
|
52
|
+
on_value_change: EventHandler[passthrough_event_spec(list[float])]
|
|
67
53
|
|
|
68
54
|
# Fired when a thumb is released.
|
|
69
|
-
on_value_commit: EventHandler[
|
|
55
|
+
on_value_commit: EventHandler[passthrough_event_spec(list[float])]
|
|
70
56
|
|
|
71
57
|
def add_style(self) -> dict[str, Any] | None:
|
|
72
58
|
"""Add style to the component.
|
|
@@ -66,8 +66,6 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
|
|
|
66
66
|
The component.
|
|
67
67
|
"""
|
|
68
68
|
|
|
69
|
-
def on_value_event_spec(value: Var[list[int]]) -> tuple[Var[list[int]]]: ...
|
|
70
|
-
|
|
71
69
|
class SliderRoot(SliderComponent):
|
|
72
70
|
def add_style(self) -> dict[str, Any] | None: ...
|
|
73
71
|
@classmethod
|
|
@@ -114,8 +112,8 @@ class SliderRoot(SliderComponent):
|
|
|
114
112
|
on_scroll: EventType[()] | None = None,
|
|
115
113
|
on_scroll_end: EventType[()] | None = None,
|
|
116
114
|
on_unmount: EventType[()] | None = None,
|
|
117
|
-
on_value_change: EventType[()] | EventType[list[
|
|
118
|
-
on_value_commit: EventType[()] | EventType[list[
|
|
115
|
+
on_value_change: EventType[()] | EventType[list[float]] | None = None,
|
|
116
|
+
on_value_commit: EventType[()] | EventType[list[float]] | None = None,
|
|
119
117
|
**props,
|
|
120
118
|
) -> SliderRoot:
|
|
121
119
|
"""Create the component.
|
|
@@ -13,9 +13,8 @@ from reflex.utils.types import typehint_issubclass
|
|
|
13
13
|
from reflex.vars.base import Var
|
|
14
14
|
|
|
15
15
|
on_value_event_spec = (
|
|
16
|
-
passthrough_event_spec(list[int | float]),
|
|
17
|
-
passthrough_event_spec(list[int]),
|
|
18
16
|
passthrough_event_spec(list[float]),
|
|
17
|
+
passthrough_event_spec(list[int]),
|
|
19
18
|
)
|
|
20
19
|
|
|
21
20
|
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo, passthrough_event_spec
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
on_value_event_spec = (
|
|
15
|
-
passthrough_event_spec(list[int | float]),
|
|
16
|
-
passthrough_event_spec(list[int]),
|
|
17
15
|
passthrough_event_spec(list[float]),
|
|
16
|
+
passthrough_event_spec(list[int]),
|
|
18
17
|
)
|
|
19
18
|
|
|
20
19
|
class Slider(RadixThemesComponent):
|
|
@@ -120,9 +119,8 @@ class Slider(RadixThemesComponent):
|
|
|
120
119
|
custom_attrs: dict[str, Var | Any] | None = None,
|
|
121
120
|
on_blur: EventType[()] | None = None,
|
|
122
121
|
on_change: EventType[()]
|
|
123
|
-
| EventType[list[
|
|
122
|
+
| EventType[list[float]]
|
|
124
123
|
| (EventType[()] | EventType[list[int]])
|
|
125
|
-
| (EventType[()] | EventType[list[float]])
|
|
126
124
|
| None = None,
|
|
127
125
|
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
128
126
|
on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
@@ -140,9 +138,8 @@ class Slider(RadixThemesComponent):
|
|
|
140
138
|
on_scroll_end: EventType[()] | None = None,
|
|
141
139
|
on_unmount: EventType[()] | None = None,
|
|
142
140
|
on_value_commit: EventType[()]
|
|
143
|
-
| EventType[list[
|
|
141
|
+
| EventType[list[float]]
|
|
144
142
|
| (EventType[()] | EventType[list[int]])
|
|
145
|
-
| (EventType[()] | EventType[list[float]])
|
|
146
143
|
| None = None,
|
|
147
144
|
**props,
|
|
148
145
|
) -> Slider:
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
|
-
import reflex
|
|
10
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
11
10
|
from reflex.components.react_player.react_player import ReactPlayer
|
|
12
11
|
from reflex.event import EventType, PointerEventInfo
|
|
@@ -17,13 +16,18 @@ class Audio(ReactPlayer):
|
|
|
17
16
|
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
|
-
|
|
19
|
+
src: Var[list[dict[str, str]] | list[str] | str]
|
|
20
|
+
| list[dict[str, str]]
|
|
21
|
+
| list[str]
|
|
22
|
+
| str
|
|
23
|
+
| None = None,
|
|
21
24
|
playing: Var[bool] | bool | None = None,
|
|
22
25
|
loop: Var[bool] | bool | None = None,
|
|
23
26
|
controls: Var[bool] | bool | None = None,
|
|
24
27
|
light: Var[bool] | bool | None = None,
|
|
25
28
|
volume: Var[float] | float | None = None,
|
|
26
29
|
muted: Var[bool] | bool | None = None,
|
|
30
|
+
config: Var[dict[str, Any]] | dict[str, Any] | None = None,
|
|
27
31
|
style: Sequence[Mapping[str, Any]]
|
|
28
32
|
| Mapping[str, Any]
|
|
29
33
|
| Var[Mapping[str, Any]]
|
|
@@ -35,18 +39,16 @@ class Audio(ReactPlayer):
|
|
|
35
39
|
class_name: Any | None = None,
|
|
36
40
|
custom_attrs: dict[str, Var | Any] | None = None,
|
|
37
41
|
on_blur: EventType[()] | None = None,
|
|
38
|
-
on_buffer: EventType[()] | None = None,
|
|
39
|
-
on_buffer_end: EventType[()] | None = None,
|
|
40
42
|
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
41
43
|
on_click_preview: EventType[()] | None = None,
|
|
42
44
|
on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
43
|
-
on_disable_pip: EventType[()] | None = None,
|
|
44
45
|
on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
45
|
-
|
|
46
|
-
on_enable_pip: EventType[()] | None = None,
|
|
46
|
+
on_duration_change: EventType[Any] | None = None,
|
|
47
47
|
on_ended: EventType[()] | None = None,
|
|
48
|
+
on_enter_picture_in_picture: EventType[()] | None = None,
|
|
48
49
|
on_error: EventType[()] | None = None,
|
|
49
50
|
on_focus: EventType[()] | None = None,
|
|
51
|
+
on_leave_picture_in_picture: EventType[()] | None = None,
|
|
50
52
|
on_mount: EventType[()] | None = None,
|
|
51
53
|
on_mouse_down: EventType[()] | None = None,
|
|
52
54
|
on_mouse_enter: EventType[()] | None = None,
|
|
@@ -57,54 +59,29 @@ class Audio(ReactPlayer):
|
|
|
57
59
|
on_mouse_up: EventType[()] | None = None,
|
|
58
60
|
on_pause: EventType[()] | None = None,
|
|
59
61
|
on_play: EventType[()] | None = None,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| EventType[reflex.components.react_player.react_player.Progress]
|
|
64
|
-
| None = None,
|
|
62
|
+
on_playing: EventType[()] | None = None,
|
|
63
|
+
on_progress: EventType[Any] | None = None,
|
|
64
|
+
on_rate_change: EventType[Any] | None = None,
|
|
65
65
|
on_ready: EventType[()] | None = None,
|
|
66
66
|
on_scroll: EventType[()] | None = None,
|
|
67
67
|
on_scroll_end: EventType[()] | None = None,
|
|
68
|
-
|
|
68
|
+
on_seeked: EventType[Any] | None = None,
|
|
69
|
+
on_seeking: EventType[()] | None = None,
|
|
69
70
|
on_start: EventType[()] | None = None,
|
|
71
|
+
on_time_update: EventType[Any] | None = None,
|
|
70
72
|
on_unmount: EventType[()] | None = None,
|
|
73
|
+
on_waiting: EventType[()] | None = None,
|
|
71
74
|
**props,
|
|
72
75
|
) -> Audio:
|
|
73
|
-
"""Create
|
|
76
|
+
"""Create a component.
|
|
74
77
|
|
|
75
78
|
Args:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
playing: Set to true or false to pause or play the media
|
|
79
|
-
loop: Set to true or false to loop the media
|
|
80
|
-
controls: Set to true or false to display native player controls.
|
|
81
|
-
light: Set to true to show just the video thumbnail, which loads the full player on click
|
|
82
|
-
volume: Set the volume of the player, between 0 and 1
|
|
83
|
-
muted: Mutes the player
|
|
84
|
-
on_ready: Called when media is loaded and ready to play. If playing is set to true, media will play immediately.
|
|
85
|
-
on_start: Called when media starts playing.
|
|
86
|
-
on_play: Called when media starts or resumes playing after pausing or buffering.
|
|
87
|
-
on_progress: Callback containing played and loaded progress as a fraction, and playedSeconds and loadedSeconds in seconds. eg { played: 0.12, playedSeconds: 11.3, loaded: 0.34, loadedSeconds: 16.7 }
|
|
88
|
-
on_duration: Callback containing duration of the media, in seconds.
|
|
89
|
-
on_pause: Called when media is paused.
|
|
90
|
-
on_buffer: Called when media starts buffering.
|
|
91
|
-
on_buffer_end: Called when media has finished buffering. Works for files, YouTube and Facebook.
|
|
92
|
-
on_seek: Called when media seeks with seconds parameter.
|
|
93
|
-
on_playback_rate_change: Called when playback rate of the player changed. Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths.
|
|
94
|
-
on_playback_quality_change: Called when playback quality of the player changed. Only supported by YouTube (if enabled).
|
|
95
|
-
on_ended: Called when media finishes playing. Does not fire when loop is set to true.
|
|
96
|
-
on_error: Called when an error occurs whilst attempting to play media.
|
|
97
|
-
on_click_preview: Called when user clicks the light mode preview.
|
|
98
|
-
on_enable_pip: Called when picture-in-picture mode is enabled.
|
|
99
|
-
on_disable_pip: Called when picture-in-picture mode is disabled.
|
|
100
|
-
style: The style of the component.
|
|
101
|
-
key: A unique key for the component.
|
|
102
|
-
id: The id for the component.
|
|
103
|
-
ref: The Var to pass as the ref to the component.
|
|
104
|
-
class_name: The class name for the component.
|
|
105
|
-
custom_attrs: custom attribute
|
|
106
|
-
**props: The props of the component.
|
|
79
|
+
children: The children of the component.
|
|
80
|
+
props: The props of the component.
|
|
107
81
|
|
|
108
82
|
Returns:
|
|
109
|
-
The component.
|
|
83
|
+
The created component.
|
|
84
|
+
|
|
85
|
+
Raises:
|
|
86
|
+
ValueError: If both a deprecated prop and its replacement are both passed.
|
|
110
87
|
"""
|
|
@@ -6,29 +6,49 @@
|
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
7
|
from typing import Any, TypedDict
|
|
8
8
|
|
|
9
|
-
from reflex.components.component import
|
|
9
|
+
from reflex.components.component import Component
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
11
11
|
from reflex.event import EventType, PointerEventInfo
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
|
+
from reflex.vars.object import ObjectVar
|
|
14
|
+
|
|
15
|
+
ReactPlayerEvent = ObjectVar[dict[str, dict[str, dict[str, Any]]]]
|
|
13
16
|
|
|
14
17
|
class Progress(TypedDict):
|
|
15
18
|
played: float
|
|
16
19
|
playedSeconds: float
|
|
17
20
|
loaded: float
|
|
18
21
|
loadedSeconds: float
|
|
22
|
+
duration: float
|
|
23
|
+
|
|
24
|
+
_DEPRECATED_PROP_MAP = {
|
|
25
|
+
"url": "src",
|
|
26
|
+
"on_duration": "on_duration_change",
|
|
27
|
+
"on_playback_rate_change": "on_rate_change",
|
|
28
|
+
"on_seek": "on_seeked",
|
|
29
|
+
"on_buffer": "on_waiting",
|
|
30
|
+
"on_buffer_end": "on_playing",
|
|
31
|
+
"on_enable_pip": "on_enter_picture_in_picture",
|
|
32
|
+
"on_disable_pip": "on_leave_picture_in_picture",
|
|
33
|
+
}
|
|
19
34
|
|
|
20
|
-
class ReactPlayer(
|
|
35
|
+
class ReactPlayer(Component):
|
|
21
36
|
@classmethod
|
|
22
37
|
def create(
|
|
23
38
|
cls,
|
|
24
39
|
*children,
|
|
25
|
-
|
|
40
|
+
src: Var[list[dict[str, str]] | list[str] | str]
|
|
41
|
+
| list[dict[str, str]]
|
|
42
|
+
| list[str]
|
|
43
|
+
| str
|
|
44
|
+
| None = None,
|
|
26
45
|
playing: Var[bool] | bool | None = None,
|
|
27
46
|
loop: Var[bool] | bool | None = None,
|
|
28
47
|
controls: Var[bool] | bool | None = None,
|
|
29
48
|
light: Var[bool] | bool | None = None,
|
|
30
49
|
volume: Var[float] | float | None = None,
|
|
31
50
|
muted: Var[bool] | bool | None = None,
|
|
51
|
+
config: Var[dict[str, Any]] | dict[str, Any] | None = None,
|
|
32
52
|
style: Sequence[Mapping[str, Any]]
|
|
33
53
|
| Mapping[str, Any]
|
|
34
54
|
| Var[Mapping[str, Any]]
|
|
@@ -40,18 +60,16 @@ class ReactPlayer(NoSSRComponent):
|
|
|
40
60
|
class_name: Any | None = None,
|
|
41
61
|
custom_attrs: dict[str, Var | Any] | None = None,
|
|
42
62
|
on_blur: EventType[()] | None = None,
|
|
43
|
-
on_buffer: EventType[()] | None = None,
|
|
44
|
-
on_buffer_end: EventType[()] | None = None,
|
|
45
63
|
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
46
64
|
on_click_preview: EventType[()] | None = None,
|
|
47
65
|
on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
48
|
-
on_disable_pip: EventType[()] | None = None,
|
|
49
66
|
on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
50
|
-
|
|
51
|
-
on_enable_pip: EventType[()] | None = None,
|
|
67
|
+
on_duration_change: EventType[Any] | None = None,
|
|
52
68
|
on_ended: EventType[()] | None = None,
|
|
69
|
+
on_enter_picture_in_picture: EventType[()] | None = None,
|
|
53
70
|
on_error: EventType[()] | None = None,
|
|
54
71
|
on_focus: EventType[()] | None = None,
|
|
72
|
+
on_leave_picture_in_picture: EventType[()] | None = None,
|
|
55
73
|
on_mount: EventType[()] | None = None,
|
|
56
74
|
on_mouse_down: EventType[()] | None = None,
|
|
57
75
|
on_mouse_enter: EventType[()] | None = None,
|
|
@@ -62,52 +80,29 @@ class ReactPlayer(NoSSRComponent):
|
|
|
62
80
|
on_mouse_up: EventType[()] | None = None,
|
|
63
81
|
on_pause: EventType[()] | None = None,
|
|
64
82
|
on_play: EventType[()] | None = None,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
83
|
+
on_playing: EventType[()] | None = None,
|
|
84
|
+
on_progress: EventType[Any] | None = None,
|
|
85
|
+
on_rate_change: EventType[Any] | None = None,
|
|
68
86
|
on_ready: EventType[()] | None = None,
|
|
69
87
|
on_scroll: EventType[()] | None = None,
|
|
70
88
|
on_scroll_end: EventType[()] | None = None,
|
|
71
|
-
|
|
89
|
+
on_seeked: EventType[Any] | None = None,
|
|
90
|
+
on_seeking: EventType[()] | None = None,
|
|
72
91
|
on_start: EventType[()] | None = None,
|
|
92
|
+
on_time_update: EventType[Any] | None = None,
|
|
73
93
|
on_unmount: EventType[()] | None = None,
|
|
94
|
+
on_waiting: EventType[()] | None = None,
|
|
74
95
|
**props,
|
|
75
96
|
) -> ReactPlayer:
|
|
76
|
-
"""Create
|
|
97
|
+
"""Create a component.
|
|
77
98
|
|
|
78
99
|
Args:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
playing: Set to true or false to pause or play the media
|
|
82
|
-
loop: Set to true or false to loop the media
|
|
83
|
-
controls: Set to true or false to display native player controls.
|
|
84
|
-
light: Set to true to show just the video thumbnail, which loads the full player on click
|
|
85
|
-
volume: Set the volume of the player, between 0 and 1
|
|
86
|
-
muted: Mutes the player
|
|
87
|
-
on_ready: Called when media is loaded and ready to play. If playing is set to true, media will play immediately.
|
|
88
|
-
on_start: Called when media starts playing.
|
|
89
|
-
on_play: Called when media starts or resumes playing after pausing or buffering.
|
|
90
|
-
on_progress: Callback containing played and loaded progress as a fraction, and playedSeconds and loadedSeconds in seconds. eg { played: 0.12, playedSeconds: 11.3, loaded: 0.34, loadedSeconds: 16.7 }
|
|
91
|
-
on_duration: Callback containing duration of the media, in seconds.
|
|
92
|
-
on_pause: Called when media is paused.
|
|
93
|
-
on_buffer: Called when media starts buffering.
|
|
94
|
-
on_buffer_end: Called when media has finished buffering. Works for files, YouTube and Facebook.
|
|
95
|
-
on_seek: Called when media seeks with seconds parameter.
|
|
96
|
-
on_playback_rate_change: Called when playback rate of the player changed. Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths.
|
|
97
|
-
on_playback_quality_change: Called when playback quality of the player changed. Only supported by YouTube (if enabled).
|
|
98
|
-
on_ended: Called when media finishes playing. Does not fire when loop is set to true.
|
|
99
|
-
on_error: Called when an error occurs whilst attempting to play media.
|
|
100
|
-
on_click_preview: Called when user clicks the light mode preview.
|
|
101
|
-
on_enable_pip: Called when picture-in-picture mode is enabled.
|
|
102
|
-
on_disable_pip: Called when picture-in-picture mode is disabled.
|
|
103
|
-
style: The style of the component.
|
|
104
|
-
key: A unique key for the component.
|
|
105
|
-
id: The id for the component.
|
|
106
|
-
ref: The Var to pass as the ref to the component.
|
|
107
|
-
class_name: The class name for the component.
|
|
108
|
-
custom_attrs: custom attribute
|
|
109
|
-
**props: The props of the component.
|
|
100
|
+
children: The children of the component.
|
|
101
|
+
props: The props of the component.
|
|
110
102
|
|
|
111
103
|
Returns:
|
|
112
|
-
The component.
|
|
104
|
+
The created component.
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
ValueError: If both a deprecated prop and its replacement are both passed.
|
|
113
108
|
"""
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
|
-
import reflex
|
|
10
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
11
10
|
from reflex.components.react_player.react_player import ReactPlayer
|
|
12
11
|
from reflex.event import EventType, PointerEventInfo
|
|
@@ -17,13 +16,18 @@ class Video(ReactPlayer):
|
|
|
17
16
|
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
|
-
|
|
19
|
+
src: Var[list[dict[str, str]] | list[str] | str]
|
|
20
|
+
| list[dict[str, str]]
|
|
21
|
+
| list[str]
|
|
22
|
+
| str
|
|
23
|
+
| None = None,
|
|
21
24
|
playing: Var[bool] | bool | None = None,
|
|
22
25
|
loop: Var[bool] | bool | None = None,
|
|
23
26
|
controls: Var[bool] | bool | None = None,
|
|
24
27
|
light: Var[bool] | bool | None = None,
|
|
25
28
|
volume: Var[float] | float | None = None,
|
|
26
29
|
muted: Var[bool] | bool | None = None,
|
|
30
|
+
config: Var[dict[str, Any]] | dict[str, Any] | None = None,
|
|
27
31
|
style: Sequence[Mapping[str, Any]]
|
|
28
32
|
| Mapping[str, Any]
|
|
29
33
|
| Var[Mapping[str, Any]]
|
|
@@ -35,18 +39,16 @@ class Video(ReactPlayer):
|
|
|
35
39
|
class_name: Any | None = None,
|
|
36
40
|
custom_attrs: dict[str, Var | Any] | None = None,
|
|
37
41
|
on_blur: EventType[()] | None = None,
|
|
38
|
-
on_buffer: EventType[()] | None = None,
|
|
39
|
-
on_buffer_end: EventType[()] | None = None,
|
|
40
42
|
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
41
43
|
on_click_preview: EventType[()] | None = None,
|
|
42
44
|
on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
43
|
-
on_disable_pip: EventType[()] | None = None,
|
|
44
45
|
on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
|
|
45
|
-
|
|
46
|
-
on_enable_pip: EventType[()] | None = None,
|
|
46
|
+
on_duration_change: EventType[Any] | None = None,
|
|
47
47
|
on_ended: EventType[()] | None = None,
|
|
48
|
+
on_enter_picture_in_picture: EventType[()] | None = None,
|
|
48
49
|
on_error: EventType[()] | None = None,
|
|
49
50
|
on_focus: EventType[()] | None = None,
|
|
51
|
+
on_leave_picture_in_picture: EventType[()] | None = None,
|
|
50
52
|
on_mount: EventType[()] | None = None,
|
|
51
53
|
on_mouse_down: EventType[()] | None = None,
|
|
52
54
|
on_mouse_enter: EventType[()] | None = None,
|
|
@@ -57,54 +59,29 @@ class Video(ReactPlayer):
|
|
|
57
59
|
on_mouse_up: EventType[()] | None = None,
|
|
58
60
|
on_pause: EventType[()] | None = None,
|
|
59
61
|
on_play: EventType[()] | None = None,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| EventType[reflex.components.react_player.react_player.Progress]
|
|
64
|
-
| None = None,
|
|
62
|
+
on_playing: EventType[()] | None = None,
|
|
63
|
+
on_progress: EventType[Any] | None = None,
|
|
64
|
+
on_rate_change: EventType[Any] | None = None,
|
|
65
65
|
on_ready: EventType[()] | None = None,
|
|
66
66
|
on_scroll: EventType[()] | None = None,
|
|
67
67
|
on_scroll_end: EventType[()] | None = None,
|
|
68
|
-
|
|
68
|
+
on_seeked: EventType[Any] | None = None,
|
|
69
|
+
on_seeking: EventType[()] | None = None,
|
|
69
70
|
on_start: EventType[()] | None = None,
|
|
71
|
+
on_time_update: EventType[Any] | None = None,
|
|
70
72
|
on_unmount: EventType[()] | None = None,
|
|
73
|
+
on_waiting: EventType[()] | None = None,
|
|
71
74
|
**props,
|
|
72
75
|
) -> Video:
|
|
73
|
-
"""Create
|
|
76
|
+
"""Create a component.
|
|
74
77
|
|
|
75
78
|
Args:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
playing: Set to true or false to pause or play the media
|
|
79
|
-
loop: Set to true or false to loop the media
|
|
80
|
-
controls: Set to true or false to display native player controls.
|
|
81
|
-
light: Set to true to show just the video thumbnail, which loads the full player on click
|
|
82
|
-
volume: Set the volume of the player, between 0 and 1
|
|
83
|
-
muted: Mutes the player
|
|
84
|
-
on_ready: Called when media is loaded and ready to play. If playing is set to true, media will play immediately.
|
|
85
|
-
on_start: Called when media starts playing.
|
|
86
|
-
on_play: Called when media starts or resumes playing after pausing or buffering.
|
|
87
|
-
on_progress: Callback containing played and loaded progress as a fraction, and playedSeconds and loadedSeconds in seconds. eg { played: 0.12, playedSeconds: 11.3, loaded: 0.34, loadedSeconds: 16.7 }
|
|
88
|
-
on_duration: Callback containing duration of the media, in seconds.
|
|
89
|
-
on_pause: Called when media is paused.
|
|
90
|
-
on_buffer: Called when media starts buffering.
|
|
91
|
-
on_buffer_end: Called when media has finished buffering. Works for files, YouTube and Facebook.
|
|
92
|
-
on_seek: Called when media seeks with seconds parameter.
|
|
93
|
-
on_playback_rate_change: Called when playback rate of the player changed. Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths.
|
|
94
|
-
on_playback_quality_change: Called when playback quality of the player changed. Only supported by YouTube (if enabled).
|
|
95
|
-
on_ended: Called when media finishes playing. Does not fire when loop is set to true.
|
|
96
|
-
on_error: Called when an error occurs whilst attempting to play media.
|
|
97
|
-
on_click_preview: Called when user clicks the light mode preview.
|
|
98
|
-
on_enable_pip: Called when picture-in-picture mode is enabled.
|
|
99
|
-
on_disable_pip: Called when picture-in-picture mode is disabled.
|
|
100
|
-
style: The style of the component.
|
|
101
|
-
key: A unique key for the component.
|
|
102
|
-
id: The id for the component.
|
|
103
|
-
ref: The Var to pass as the ref to the component.
|
|
104
|
-
class_name: The class name for the component.
|
|
105
|
-
custom_attrs: custom attribute
|
|
106
|
-
**props: The props of the component.
|
|
79
|
+
children: The children of the component.
|
|
80
|
+
props: The props of the component.
|
|
107
81
|
|
|
108
82
|
Returns:
|
|
109
|
-
The component.
|
|
83
|
+
The created component.
|
|
84
|
+
|
|
85
|
+
Raises:
|
|
86
|
+
ValueError: If both a deprecated prop and its replacement are both passed.
|
|
110
87
|
"""
|
reflex/constants/colors.py
CHANGED
reflex/constants/installer.py
CHANGED
|
@@ -14,7 +14,7 @@ class Bun(SimpleNamespace):
|
|
|
14
14
|
"""Bun constants."""
|
|
15
15
|
|
|
16
16
|
# The Bun version.
|
|
17
|
-
VERSION = "1.2.
|
|
17
|
+
VERSION = "1.2.23"
|
|
18
18
|
|
|
19
19
|
# Min Bun Version
|
|
20
20
|
MIN_VERSION = "1.2.17"
|
|
@@ -75,7 +75,7 @@ fetch-retries=0
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
def _determine_react_router_version() -> str:
|
|
78
|
-
default_version = "7.9.
|
|
78
|
+
default_version = "7.9.3"
|
|
79
79
|
if (version := os.getenv("REACT_ROUTER_VERSION")) and version != default_version:
|
|
80
80
|
from reflex.utils import console
|
|
81
81
|
|
|
@@ -131,7 +131,7 @@ class PackageJson(SimpleNamespace):
|
|
|
131
131
|
"react": cls._react_version,
|
|
132
132
|
"react-helmet": "6.1.0",
|
|
133
133
|
"react-dom": cls._react_version,
|
|
134
|
-
"isbot": "5.1.
|
|
134
|
+
"isbot": "5.1.31",
|
|
135
135
|
"socket.io-client": "4.8.1",
|
|
136
136
|
"universal-cookie": "7.2.2",
|
|
137
137
|
}
|
|
@@ -143,11 +143,11 @@ class PackageJson(SimpleNamespace):
|
|
|
143
143
|
"postcss-import": "16.1.1",
|
|
144
144
|
"@react-router/dev": _react_router_version,
|
|
145
145
|
"@react-router/fs-routes": _react_router_version,
|
|
146
|
-
"vite": "npm:rolldown-vite@7.1.
|
|
146
|
+
"vite": "npm:rolldown-vite@7.1.13",
|
|
147
147
|
}
|
|
148
148
|
OVERRIDES = {
|
|
149
149
|
# This should always match the `react` version in DEPENDENCIES for recharts compatibility.
|
|
150
150
|
"react-is": _react_version,
|
|
151
151
|
"cookie": "1.0.2",
|
|
152
|
-
"vite": "npm:rolldown-vite@7.1.
|
|
152
|
+
"vite": "npm:rolldown-vite@7.1.13",
|
|
153
153
|
}
|