reflex 0.8.9a1__py3-none-any.whl → 0.8.9a2__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/components/component.py +10 -51
- reflex/components/core/sticky.pyi +3 -0
- reflex/components/el/elements/media.pyi +5869 -5
- reflex/components/lucide/icon.pyi +3 -0
- reflex/config.py +33 -6
- reflex/utils/types.py +4 -0
- {reflex-0.8.9a1.dist-info → reflex-0.8.9a2.dist-info}/METADATA +1 -1
- {reflex-0.8.9a1.dist-info → reflex-0.8.9a2.dist-info}/RECORD +11 -11
- {reflex-0.8.9a1.dist-info → reflex-0.8.9a2.dist-info}/WHEEL +0 -0
- {reflex-0.8.9a1.dist-info → reflex-0.8.9a2.dist-info}/entry_points.txt +0 -0
- {reflex-0.8.9a1.dist-info → reflex-0.8.9a2.dist-info}/licenses/LICENSE +0 -0
reflex/components/component.py
CHANGED
|
@@ -1021,48 +1021,8 @@ class Component(BaseComponent, ABC):
|
|
|
1021
1021
|
"""
|
|
1022
1022
|
return set()
|
|
1023
1023
|
|
|
1024
|
-
@
|
|
1025
|
-
def
|
|
1026
|
-
"""Check if all fields are known at compile time. True for most components.
|
|
1027
|
-
|
|
1028
|
-
Returns:
|
|
1029
|
-
Whether all fields are known at compile time.
|
|
1030
|
-
"""
|
|
1031
|
-
return True
|
|
1032
|
-
|
|
1033
|
-
@classmethod
|
|
1034
|
-
@functools.cache
|
|
1035
|
-
def _get_component_prop_names(cls) -> set[str]:
|
|
1036
|
-
"""Get the names of the component props. NOTE: This assumes all fields are known.
|
|
1037
|
-
|
|
1038
|
-
Returns:
|
|
1039
|
-
The names of the component props.
|
|
1040
|
-
"""
|
|
1041
|
-
return {
|
|
1042
|
-
name
|
|
1043
|
-
for name in cls.get_fields()
|
|
1044
|
-
if name in cls.get_props()
|
|
1045
|
-
and isinstance(
|
|
1046
|
-
field_type := types.value_inside_optional(
|
|
1047
|
-
types.get_field_type(cls, name)
|
|
1048
|
-
),
|
|
1049
|
-
type,
|
|
1050
|
-
)
|
|
1051
|
-
and issubclass(field_type, Component)
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
def _get_components_in_props(self) -> Sequence[BaseComponent]:
|
|
1055
|
-
"""Get the components in the props.
|
|
1056
|
-
|
|
1057
|
-
Returns:
|
|
1058
|
-
The components in the props
|
|
1059
|
-
"""
|
|
1060
|
-
if self._are_fields_known():
|
|
1061
|
-
return [
|
|
1062
|
-
component
|
|
1063
|
-
for name in self._get_component_prop_names()
|
|
1064
|
-
for component in _components_from(getattr(self, name))
|
|
1065
|
-
]
|
|
1024
|
+
@functools.cached_property
|
|
1025
|
+
def _get_component_prop_property(self) -> Sequence[BaseComponent]:
|
|
1066
1026
|
return [
|
|
1067
1027
|
component
|
|
1068
1028
|
for prop in self.get_props()
|
|
@@ -1071,6 +1031,14 @@ class Component(BaseComponent, ABC):
|
|
|
1071
1031
|
for component in _components_from(value)
|
|
1072
1032
|
]
|
|
1073
1033
|
|
|
1034
|
+
def _get_components_in_props(self) -> Sequence[BaseComponent]:
|
|
1035
|
+
"""Get the components in the props.
|
|
1036
|
+
|
|
1037
|
+
Returns:
|
|
1038
|
+
The components in the props
|
|
1039
|
+
"""
|
|
1040
|
+
return self._get_component_prop_property
|
|
1041
|
+
|
|
1074
1042
|
@classmethod
|
|
1075
1043
|
def _validate_children(cls, children: tuple | list):
|
|
1076
1044
|
from reflex.utils.exceptions import ChildrenTypeError
|
|
@@ -2060,15 +2028,6 @@ class CustomComponent(Component):
|
|
|
2060
2028
|
self.props[camel_cased_key] = value
|
|
2061
2029
|
setattr(self, camel_cased_key, value)
|
|
2062
2030
|
|
|
2063
|
-
@classmethod
|
|
2064
|
-
def _are_fields_known(cls) -> bool:
|
|
2065
|
-
"""Check if the fields are known.
|
|
2066
|
-
|
|
2067
|
-
Returns:
|
|
2068
|
-
Whether the fields are known.
|
|
2069
|
-
"""
|
|
2070
|
-
return False
|
|
2071
|
-
|
|
2072
2031
|
def __eq__(self, other: Any) -> bool:
|
|
2073
2032
|
"""Check if the component is equal to another.
|
|
2074
2033
|
|
|
@@ -22,6 +22,9 @@ class StickyLogo(Svg):
|
|
|
22
22
|
width: Var[int | str] | int | str | None = None,
|
|
23
23
|
height: Var[int | str] | int | str | None = None,
|
|
24
24
|
xmlns: Var[str] | str | None = None,
|
|
25
|
+
view_box: Var[str] | str | None = None,
|
|
26
|
+
preserve_aspect_ratio: Var[str] | str | None = None,
|
|
27
|
+
transform: Var[str] | str | None = None,
|
|
25
28
|
access_key: Var[str] | str | None = None,
|
|
26
29
|
auto_capitalize: Literal[
|
|
27
30
|
"characters", "none", "off", "on", "sentences", "words"
|