From 7dda611364483c390cd6bc6ba938ef3725d21774 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 20 Aug 2024 13:08:05 -0700 Subject: [PATCH 01/30] basic functionality --- reflex/app.py | 237 +++++++++++++++++++++--------------- reflex/compiler/compiler.py | 93 ++++++++++---- reflex/style.py | 4 +- 3 files changed, 206 insertions(+), 128 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 69a5ff9782..78cba33b8d 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -3,13 +3,14 @@ from __future__ import annotations import asyncio -import concurrent.futures import contextlib import copy +import dataclasses import functools import inspect import io -import multiprocessing +import multiprocess +from pathos import multiprocessing, pools import os import platform import sys @@ -169,6 +170,21 @@ class OverlayFragment(Fragment): pass +@dataclasses.dataclass( + frozen=True, +) +class UncompiledPage: + """An uncompiled page.""" + + component: Component + route: str + title: str + description: str + image: str + on_load: Union[EventHandler, EventSpec, list[EventHandler | EventSpec], None] + meta: list[dict[str, str]] + + class App(MiddlewareMixin, LifespanMixin, Base): """The main Reflex app that encapsulates the backend and frontend. @@ -219,6 +235,9 @@ class App(MiddlewareMixin, LifespanMixin, Base): # Attributes to add to the html root tag of every page. html_custom_attrs: Optional[Dict[str, str]] = None + # A map from a route to an uncompiled page. PRIVATE. + uncompiled_pages: Dict[str, UncompiledPage] = {} + # A map from a page route to the component to render. Users should use `add_page`. PRIVATE. pages: Dict[str, Component] = {} @@ -492,13 +511,13 @@ def add_page( # Check if the route given is valid verify_route_validity(route) - if route in self.pages and os.getenv(constants.RELOAD_CONFIG): + if route in self.uncompiled_pages and os.getenv(constants.RELOAD_CONFIG): # when the app is reloaded(typically for app harness tests), we should maintain # the latest render function of a route.This applies typically to decorated pages # since they are only added when app._compile is called. - self.pages.pop(route) + self.uncompiled_pages.pop(route) - if route in self.pages: + if route in self.uncompiled_pages: route_name = ( f"`{route}` or `/`" if route == constants.PageNames.INDEX_ROUTE @@ -514,8 +533,33 @@ def add_page( state = self.state if self.state else State state.setup_dynamic_args(get_route_args(route)) + if on_load: + self.load_events[route] = ( + on_load if isinstance(on_load, list) else [on_load] + ) + + self.uncompiled_pages[route] = UncompiledPage( + component=component, + route=route, + title=title, + description=description, + image=image, + on_load=on_load, + meta=meta, + ) + + def _compile_page(self, route: str): + """Compile a page. + + Args: + route: The route of the page to compile. + """ + uncompiled_page = self.uncompiled_pages[route] + + on_load = uncompiled_page.on_load + # Generate the component if it is a callable. - component = self._generate_component(component) + component = self._generate_component(uncompiled_page.component) # unpack components that return tuples in an rx.fragment. if isinstance(component, tuple): @@ -538,16 +582,16 @@ def add_page( meta_args = { "title": ( - title - if title is not None + uncompiled_page.title + if uncompiled_page.title is not None else format.make_default_page_title(get_config().app_name, route) ), - "image": image, - "meta": meta, + "image": uncompiled_page.image, + "meta": uncompiled_page.meta, } - if description is not None: - meta_args["description"] = description + if uncompiled_page.description is not None: + meta_args["description"] = uncompiled_page.description # Add meta information to the component. compiler_utils.add_meta( @@ -559,12 +603,6 @@ def add_page( self._check_routes_conflict(route) self.pages[route] = component - # Add the load events. - if on_load: - if not isinstance(on_load, list): - on_load = [on_load] - self.load_events[route] = on_load - def get_load_events(self, route: str) -> list[EventHandler | EventSpec]: """Get the load events for a route. @@ -839,11 +877,15 @@ def _compile(self, export: bool = False): """ from reflex.utils.exceptions import ReflexRuntimeError + print("Compiling the app...") + + self._enable_state() + def get_compilation_time() -> str: return str(datetime.now().time()).split(".")[0] # Render a default 404 page if the user didn't supply one - if constants.Page404.SLUG not in self.pages: + if constants.Page404.SLUG not in self.uncompiled_pages: self.add_custom_404_page() # Add the optional endpoints (_upload) @@ -869,7 +911,7 @@ def get_compilation_time() -> str: progress.start() task = progress.add_task( f"[{get_compilation_time()}] Compiling:", - total=len(self.pages) + total=len(self.uncompiled_pages) + fixed_pages_within_executor + adhoc_steps_without_executor, ) @@ -898,38 +940,8 @@ def get_compilation_time() -> str: all_imports = {} custom_components = set() - for _route, component in self.pages.items(): - # Merge the component style with the app style. - component._add_style_recursive(self.style, self.theme) - - # Add component._get_all_imports() to all_imports. - all_imports.update(component._get_all_imports()) - - # Add the app wrappers from this component. - app_wrappers.update(component._get_all_app_wrap_components()) - - # Add the custom components from the page to the set. - custom_components |= component._get_all_custom_components() - progress.advance(task) - # Perform auto-memoization of stateful components. - ( - stateful_components_path, - stateful_components_code, - page_components, - ) = compiler.compile_stateful_components(self.pages.values()) - - progress.advance(task) - - # Catch "static" apps (that do not define a rx.State subclass) which are trying to access rx.State. - if code_uses_state_contexts(stateful_components_code) and self.state is None: - raise ReflexRuntimeError( - "To access rx.State in frontend components, at least one " - "subclass of rx.State must be defined in the app." - ) - compile_results.append((stateful_components_path, stateful_components_code)) - # Compile the root document before fork. compile_results.append( compiler.compile_document_root( @@ -939,29 +951,15 @@ def get_compilation_time() -> str: ) ) - # Compile the contexts before fork. - compile_results.append( - compiler.compile_contexts(self.state, self.theme), - ) # Fix #2992 by removing the top-level appearance prop if self.theme is not None: self.theme.appearance = None - app_root = self._app_root(app_wrappers=app_wrappers) - progress.advance(task) - # Prepopulate the global ExecutorSafeFunctions class with input data required by the compile functions. - # This is required for multiprocessing to work, in presence of non-picklable inputs. - for route, component in zip(self.pages, page_components): - ExecutorSafeFunctions.COMPILE_PAGE_ARGS_BY_ROUTE[route] = ( - route, - component, - self.state, - ) + for route, uncompiled_page in self.uncompiled_pages.items(): + ExecutorSafeFunctions.UNCOMPILED_PAGES[route] = uncompiled_page - ExecutorSafeFunctions.COMPILE_APP_APP_ROOT = app_root - ExecutorSafeFunctions.CUSTOM_COMPONENTS = custom_components ExecutorSafeFunctions.STYLE = self.style # Use a forking process pool, if possible. Much faster, especially for large sites. @@ -971,39 +969,31 @@ def get_compilation_time() -> str: platform.system() in ("Linux", "Darwin") and os.environ.get("REFLEX_COMPILE_PROCESSES") is not None ): - executor = concurrent.futures.ProcessPoolExecutor( - max_workers=int(os.environ.get("REFLEX_COMPILE_PROCESSES", 0)) or None, - mp_context=multiprocessing.get_context("fork"), - ) + executor = pools.ProcessPool() else: - executor = concurrent.futures.ThreadPoolExecutor( - max_workers=int(os.environ.get("REFLEX_COMPILE_THREADS", 0)) or None, - ) + executor = pools.ThreadPool() + + pages_results = [] with executor: result_futures = [] - custom_components_future = None + pages_futures = [] - def _mark_complete(_=None): - progress.advance(task) + # def _mark_complete(_=None): + # progress.advance(task) def _submit_work(fn, *args, **kwargs): - f = executor.submit(fn, *args, **kwargs) - f.add_done_callback(_mark_complete) + f = executor.apipe(fn, *args, **kwargs) + # f.add_done_callback(_mark_complete) result_futures.append(f) # Compile all page components. - for route in self.pages: - _submit_work(ExecutorSafeFunctions.compile_page, route) - - # Compile the app wrapper. - _submit_work(ExecutorSafeFunctions.compile_app) - - # Compile the custom components. - custom_components_future = executor.submit( - ExecutorSafeFunctions.compile_custom_components, - ) - custom_components_future.add_done_callback(_mark_complete) + for route in self.uncompiled_pages: + f = executor.apipe( + ExecutorSafeFunctions.compile_uncompiled_page, route + ) + # f.add_done_callback(_mark_complete) + pages_futures.append((route, f)) # Compile the root stylesheet with base styles. _submit_work(compiler.compile_root_stylesheet, self.stylesheets) @@ -1021,23 +1011,70 @@ def _submit_work(fn, *args, **kwargs): _submit_work(compiler.remove_tailwind_from_postcss) # Wait for all compilation tasks to complete. - for future in concurrent.futures.as_completed(result_futures): - compile_results.append(future.result()) - - # Special case for custom_components, since we need the compiled imports - # to install proper frontend packages. - ( - *custom_components_result, - custom_components_imports, - ) = custom_components_future.result() - compile_results.append(custom_components_result) - all_imports.update(custom_components_imports) + for future in result_futures: + compile_results.append(future.get()) + + for route, future in pages_futures: + print(f"Compiled {route}") + pages_results.append(future.get()) + + for route, component, compiled_page in pages_results: + self.pages[compiled_page] = component + compile_results.append(compiled_page) + + # Merge the component style with the app style. + component._add_style_recursive(self.style, self.theme) + + # Add component._get_all_imports() to all_imports. + all_imports.update(component._get_all_imports()) + + # Add the app wrappers from this component. + app_wrappers.update(component._get_all_app_wrap_components()) + + # Add the custom components from the page to the set. + custom_components |= component._get_all_custom_components() + + # Perform auto-memoization of stateful components. + ( + stateful_components_path, + stateful_components_code, + page_components, + ) = compiler.compile_stateful_components(self.pages.values()) + + progress.advance(task) + + # Catch "static" apps (that do not define a rx.State subclass) which are trying to access rx.State. + if code_uses_state_contexts(stateful_components_code) and self.state is None: + raise ReflexRuntimeError( + "To access rx.State in frontend components, at least one " + "subclass of rx.State must be defined in the app." + ) + compile_results.append((stateful_components_path, stateful_components_code)) + + app_root = self._app_root(app_wrappers=app_wrappers) # Get imports from AppWrap components. all_imports.update(app_root._get_all_imports()) progress.advance(task) + # Compile the contexts before fork. + compile_results.append( + compiler.compile_contexts(self.state, self.theme), + ) + + # Compile the app root. + compile_results.append( + compiler.compile_app(app_root), + ) + + # Compile custom components. + *custom_components_result, custom_components_imports = ( + compiler.compile_components(custom_components) + ) + compile_results.append(custom_components_result) + all_imports.update(custom_components_imports) + progress.advance(task) progress.stop() diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 4345e244ff..90af159578 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -5,10 +5,11 @@ import os from datetime import datetime from pathlib import Path -from typing import Dict, Iterable, Optional, Type, Union +from typing import TYPE_CHECKING, Dict, Iterable, Optional, Type, Union from reflex import constants from reflex.compiler import templates, utils +from reflex.components.base.fragment import Fragment from reflex.components.component import ( BaseComponent, Component, @@ -511,6 +512,58 @@ def purge_web_pages_dir(): utils.empty_dir(get_web_dir() / constants.Dirs.PAGES, keep_files=["_app.js"]) +if TYPE_CHECKING: + from reflex.app import UncompiledPage + from reflex.event import EventHandler, EventSpec + + +def compile_uncompiled_page( + route: str, page: UncompiledPage +) -> tuple[EventHandler | EventSpec | list[EventHandler | EventSpec] | None, Fragment]: + """Compiles an uncompiled page into a component and adds meta information. + + Args: + route (str): The route of the page. + page (UncompiledPage): The uncompiled page object. + + Returns: + tuple[EventHandler | EventSpec | list[EventHandler | EventSpec] | None, Fragment]: The on_load event handler or spec, and the compiled component. + """ + # Generate the component if it is a callable. + component = page.component + component = component if isinstance(component, Component) else component() + + # unpack components that return tuples in an rx.fragment. + if isinstance(component, tuple): + component = Fragment.create(*component) + + from reflex.app import OverlayFragment + from reflex.utils.format import make_default_page_title + + component = OverlayFragment.create(component) + + meta_args = { + "title": ( + page.title + if page.title is not None + else make_default_page_title(get_config().app_name, route) + ), + "image": page.image, + "meta": page.meta, + } + + if page.description is not None: + meta_args["description"] = page.description + + # Add meta information to the component. + utils.add_meta( + component, + **meta_args, + ) + + return component + + class ExecutorSafeFunctions: """Helper class to allow parallelisation of parts of the compilation process. @@ -536,9 +589,9 @@ class ExecutorSafeFunctions: """ - COMPILE_PAGE_ARGS_BY_ROUTE = {} - COMPILE_APP_APP_ROOT: Component | None = None - CUSTOM_COMPONENTS: set[CustomComponent] | None = None + UNCOMPILED_PAGES = {} + COMPILED_COMPONENTS = {} + STATE: Type[BaseState] | None = None STYLE: ComponentStyle | None = None @classmethod @@ -551,35 +604,21 @@ def compile_page(cls, route: str): Returns: The path and code of the compiled page. """ - return compile_page(*cls.COMPILE_PAGE_ARGS_BY_ROUTE[route]) + return compile_page(route, cls.COMPILED_COMPONENTS[route], cls.STATE) @classmethod - def compile_app(cls): - """Compile the app. + def compile_uncompiled_page(cls, route: str): + """Compile an uncompiled page. - Returns: - The path and code of the compiled app. - - Raises: - ValueError: If the app root is not set. - """ - if cls.COMPILE_APP_APP_ROOT is None: - raise ValueError("COMPILE_APP_APP_ROOT should be set") - return compile_app(cls.COMPILE_APP_APP_ROOT) - - @classmethod - def compile_custom_components(cls): - """Compile the custom components. + Args: + route: The route of the page to compile. Returns: - The path and code of the compiled custom components. - - Raises: - ValueError: If the custom components are not set. + The path and code of the compiled page. """ - if cls.CUSTOM_COMPONENTS is None: - raise ValueError("CUSTOM_COMPONENTS should be set") - return compile_components(cls.CUSTOM_COMPONENTS) + component = compile_uncompiled_page(route, cls.UNCOMPILED_PAGES[route]) + component = component if isinstance(component, Component) else component() + return route, component, compile_page(route, component, cls.STATE) @classmethod def compile_theme(cls): diff --git a/reflex/style.py b/reflex/style.py index 69e93ed398..e4a6220902 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -257,7 +257,9 @@ def __setitem__(self, key: str, value: Any): _var = Var.create(value, _var_is_string=False) if _var is not None: # Carry the imports/hooks when setting a Var as a value. - self._var_data = VarData.merge(self._var_data, _var._var_data) + self._var_data = VarData.merge( + self._var_data if hasattr(self, "_var_data") else None, _var._var_data + ) super().__setitem__(key, value) From c9f7ddd4d0e9c2a105ef13e5f6cbe43321fea552 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 21 Aug 2024 19:24:55 -0700 Subject: [PATCH 02/30] reorder page evaluation --- reflex/app.py | 102 ++++++++++++++---------------------- reflex/compiler/compiler.py | 37 +++++++------ 2 files changed, 60 insertions(+), 79 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 78cba33b8d..c9c84b24b2 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -9,6 +9,7 @@ import functools import inspect import io +import dill import multiprocess from pathos import multiprocessing, pools import os @@ -47,7 +48,10 @@ from reflex.base import Base from reflex.compiler import compiler from reflex.compiler import utils as compiler_utils -from reflex.compiler.compiler import ExecutorSafeFunctions +from reflex.compiler.compiler import ( + ExecutorSafeFunctions, + compile_uncompiled_page_helper, +) from reflex.components.base.app_wrap import AppWrap from reflex.components.base.error_boundary import ErrorBoundary from reflex.components.base.fragment import Fragment @@ -554,49 +558,8 @@ def _compile_page(self, route: str): Args: route: The route of the page to compile. """ - uncompiled_page = self.uncompiled_pages[route] - - on_load = uncompiled_page.on_load - - # Generate the component if it is a callable. - component = self._generate_component(uncompiled_page.component) - - # unpack components that return tuples in an rx.fragment. - if isinstance(component, tuple): - component = Fragment.create(*component) - - # Ensure state is enabled if this page uses state. - if self.state is None: - if on_load or component._has_stateful_event_triggers(): - self._enable_state() - else: - for var in component._get_vars(include_children=True): - if not var._var_data: - continue - if not var._var_data.state: - continue - self._enable_state() - break - - component = OverlayFragment.create(component) - - meta_args = { - "title": ( - uncompiled_page.title - if uncompiled_page.title is not None - else format.make_default_page_title(get_config().app_name, route) - ), - "image": uncompiled_page.image, - "meta": uncompiled_page.meta, - } - - if uncompiled_page.description is not None: - meta_args["description"] = uncompiled_page.description - - # Add meta information to the component. - compiler_utils.add_meta( - component, - **meta_args, + component = compiler.compile_uncompiled_page_helper( + route, self.uncompiled_pages[route] ) # Add the page. @@ -892,6 +855,10 @@ def get_compilation_time() -> str: self._add_optional_endpoints() if not self._should_compile(): + for route in self.uncompiled_pages: + if route in self.pages: + continue + self._compile_page(route) return self._validate_var_dependencies() @@ -957,11 +924,6 @@ def get_compilation_time() -> str: progress.advance(task) - for route, uncompiled_page in self.uncompiled_pages.items(): - ExecutorSafeFunctions.UNCOMPILED_PAGES[route] = uncompiled_page - - ExecutorSafeFunctions.STYLE = self.style - # Use a forking process pool, if possible. Much faster, especially for large sites. # Fallback to ThreadPoolExecutor as something that will always work. executor = None @@ -969,6 +931,9 @@ def get_compilation_time() -> str: platform.system() in ("Linux", "Darwin") and os.environ.get("REFLEX_COMPILE_PROCESSES") is not None ): + for route in self.uncompiled_pages: + self._compile_page(route) + executor = pools.ProcessPool() else: executor = pools.ThreadPool() @@ -979,27 +944,40 @@ def get_compilation_time() -> str: result_futures = [] pages_futures = [] - # def _mark_complete(_=None): - # progress.advance(task) - def _submit_work(fn, *args, **kwargs): f = executor.apipe(fn, *args, **kwargs) - # f.add_done_callback(_mark_complete) result_futures.append(f) # Compile all page components. - for route in self.uncompiled_pages: + for route, page in self.uncompiled_pages.items(): + if route in self.pages: + continue + f = executor.apipe( - ExecutorSafeFunctions.compile_uncompiled_page, route + ExecutorSafeFunctions.compile_uncompiled_page, + route, + page, + self.state, + self.style, + self.theme, ) - # f.add_done_callback(_mark_complete) pages_futures.append((route, f)) + # Compile the pre-compiled pages. + for route, component in self.pages.items(): + component._add_style_recursive(self.style, self.theme) + _submit_work( + ExecutorSafeFunctions.compile_page, + route, + component, + self.state, + ) + # Compile the root stylesheet with base styles. _submit_work(compiler.compile_root_stylesheet, self.stylesheets) # Compile the theme. - _submit_work(ExecutorSafeFunctions.compile_theme) + _submit_work(ExecutorSafeFunctions.compile_theme, self.style) # Compile the Tailwind config. if config.tailwind is not None: @@ -1013,18 +991,18 @@ def _submit_work(fn, *args, **kwargs): # Wait for all compilation tasks to complete. for future in result_futures: compile_results.append(future.get()) + progress.advance(task) for route, future in pages_futures: - print(f"Compiled {route}") pages_results.append(future.get()) + progress.advance(task) for route, component, compiled_page in pages_results: - self.pages[compiled_page] = component + self._check_routes_conflict(route) + self.pages[route] = component compile_results.append(compiled_page) - # Merge the component style with the app style. - component._add_style_recursive(self.style, self.theme) - + for route, component in self.pages.items(): # Add component._get_all_imports() to all_imports. all_imports.update(component._get_all_imports()) diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 90af159578..fe7270ee76 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -517,9 +517,7 @@ def purge_web_pages_dir(): from reflex.event import EventHandler, EventSpec -def compile_uncompiled_page( - route: str, page: UncompiledPage -) -> tuple[EventHandler | EventSpec | list[EventHandler | EventSpec] | None, Fragment]: +def compile_uncompiled_page_helper(route: str, page: UncompiledPage) -> Component: """Compiles an uncompiled page into a component and adds meta information. Args: @@ -527,7 +525,7 @@ def compile_uncompiled_page( page (UncompiledPage): The uncompiled page object. Returns: - tuple[EventHandler | EventSpec | list[EventHandler | EventSpec] | None, Fragment]: The on_load event handler or spec, and the compiled component. + Component: The compiled component. """ # Generate the component if it is a callable. component = page.component @@ -589,13 +587,10 @@ class ExecutorSafeFunctions: """ - UNCOMPILED_PAGES = {} - COMPILED_COMPONENTS = {} - STATE: Type[BaseState] | None = None - STYLE: ComponentStyle | None = None - @classmethod - def compile_page(cls, route: str): + def compile_page( + cls, route: str, component: Component, state: Type[BaseState] + ) -> tuple[str, str]: """Compile a page. Args: @@ -604,10 +599,17 @@ def compile_page(cls, route: str): Returns: The path and code of the compiled page. """ - return compile_page(route, cls.COMPILED_COMPONENTS[route], cls.STATE) + return compile_page(route, component, state) @classmethod - def compile_uncompiled_page(cls, route: str): + def compile_uncompiled_page( + cls, + route: str, + page: UncompiledPage, + state: Type[BaseState], + style: ComponentStyle, + theme: Component, + ) -> tuple[str, Component, tuple[str, str]]: """Compile an uncompiled page. Args: @@ -616,12 +618,13 @@ def compile_uncompiled_page(cls, route: str): Returns: The path and code of the compiled page. """ - component = compile_uncompiled_page(route, cls.UNCOMPILED_PAGES[route]) + component = compile_uncompiled_page_helper(route, page) component = component if isinstance(component, Component) else component() - return route, component, compile_page(route, component, cls.STATE) + component._add_style_recursive(style, theme) + return route, component, compile_page(route, component, state) @classmethod - def compile_theme(cls): + def compile_theme(cls, style: ComponentStyle | None) -> tuple[str, str]: """Compile the theme. Returns: @@ -630,6 +633,6 @@ def compile_theme(cls): Raises: ValueError: If the style is not set. """ - if cls.STYLE is None: + if style is None: raise ValueError("STYLE should be set") - return compile_theme(cls.STYLE) + return compile_theme(style) From d736006b4fd231bb1ad6de464fda28d14c5cb5ae Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Fri, 23 Aug 2024 18:55:18 +0000 Subject: [PATCH 03/30] Fix benchmark tests (#3822) --- benchmarks/test_benchmark_compile_pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/test_benchmark_compile_pages.py b/benchmarks/test_benchmark_compile_pages.py index 00fc86ff90..33404bca7c 100644 --- a/benchmarks/test_benchmark_compile_pages.py +++ b/benchmarks/test_benchmark_compile_pages.py @@ -7,7 +7,6 @@ from typing import Generator import pytest -import reflex_chakra as rc from benchmarks import WINDOWS_SKIP_REASON from reflex import constants @@ -131,6 +130,7 @@ class State(rx.State): def AppWithOnePage(): """A reflex app with one page.""" + import reflex_chakra as rc from rxconfig import config # type: ignore import reflex as rx From fb4c39041865dfb8b48569089d723ed71605b8dd Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 23 Aug 2024 12:59:34 -0700 Subject: [PATCH 04/30] Upper bound for reflex-chakra dependency (#3824) * Upper bound for reflex-chakra dependency We have to make a breaking change in reflex-chakra, and it will happen in 0.6.0, so ensure that reflex 0.5.10 never installs the breaking version of reflex-chakra. * Relock deps --- poetry.lock | 1767 ++++++++++++++++++++++++------------------------ pyproject.toml | 2 +- 2 files changed, 900 insertions(+), 869 deletions(-) diff --git a/poetry.lock b/poetry.lock index 22f455f244..bfcdc929b4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "alembic" version = "1.13.2" description = "A database migration tool for SQLAlchemy." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -26,7 +25,6 @@ tz = ["backports.zoneinfo"] name = "annotated-types" version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -41,7 +39,6 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} name = "anyio" version = "4.4.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -64,7 +61,6 @@ trio = ["trio (>=0.23)"] name = "async-timeout" version = "4.0.3" description = "Timeout context manager for asyncio programs" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -76,7 +72,6 @@ files = [ name = "asynctest" version = "0.13.0" description = "Enhance the standard unittest package with features for testing asyncio libraries" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -86,29 +81,27 @@ files = [ [[package]] name = "attrs" -version = "23.2.0" +version = "24.2.0" description = "Classes Without Boilerplate" -category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, - {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, + {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, + {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, ] [package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] -tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] +benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "backports-tarfile" version = "1.2.0" description = "Backport of CPython tarfile module" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -124,7 +117,6 @@ testing = ["jaraco.test", "pytest (!=8.0.*)", "pytest (>=6,!=8.1.*)", "pytest-ch name = "bidict" version = "0.23.1" description = "The bidirectional mapping library for Python." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -136,7 +128,6 @@ files = [ name = "build" version = "1.2.1" description = "A simple, correct Python build frontend" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -160,76 +151,89 @@ virtualenv = ["virtualenv (>=20.0.35)"] [[package]] name = "certifi" -version = "2024.6.2" +version = "2024.7.4" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, - {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, + {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, + {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, ] [[package]] name = "cffi" -version = "1.16.0" +version = "1.17.0" description = "Foreign Function Interface for Python calling C code." -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088"}, - {file = "cffi-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7"}, - {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614"}, - {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743"}, - {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d"}, - {file = "cffi-1.16.0-cp310-cp310-win32.whl", hash = "sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a"}, - {file = "cffi-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1"}, - {file = "cffi-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404"}, - {file = "cffi-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56"}, - {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e"}, - {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc"}, - {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb"}, - {file = "cffi-1.16.0-cp311-cp311-win32.whl", hash = "sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab"}, - {file = "cffi-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba"}, - {file = "cffi-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956"}, - {file = "cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6"}, - {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969"}, - {file = "cffi-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520"}, - {file = "cffi-1.16.0-cp312-cp312-win32.whl", hash = "sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b"}, - {file = "cffi-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235"}, - {file = "cffi-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b"}, - {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324"}, - {file = "cffi-1.16.0-cp38-cp38-win32.whl", hash = "sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a"}, - {file = "cffi-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36"}, - {file = "cffi-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed"}, - {file = "cffi-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4"}, - {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098"}, - {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000"}, - {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe"}, - {file = "cffi-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4"}, - {file = "cffi-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8"}, - {file = "cffi-1.16.0.tar.gz", hash = "sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"}, + {file = "cffi-1.17.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f9338cc05451f1942d0d8203ec2c346c830f8e86469903d5126c1f0a13a2bcbb"}, + {file = "cffi-1.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a0ce71725cacc9ebf839630772b07eeec220cbb5f03be1399e0457a1464f8e1a"}, + {file = "cffi-1.17.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c815270206f983309915a6844fe994b2fa47e5d05c4c4cef267c3b30e34dbe42"}, + {file = "cffi-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6bdcd415ba87846fd317bee0774e412e8792832e7805938987e4ede1d13046d"}, + {file = "cffi-1.17.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a98748ed1a1df4ee1d6f927e151ed6c1a09d5ec21684de879c7ea6aa96f58f2"}, + {file = "cffi-1.17.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0a048d4f6630113e54bb4b77e315e1ba32a5a31512c31a273807d0027a7e69ab"}, + {file = "cffi-1.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24aa705a5f5bd3a8bcfa4d123f03413de5d86e497435693b638cbffb7d5d8a1b"}, + {file = "cffi-1.17.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:856bf0924d24e7f93b8aee12a3a1095c34085600aa805693fb7f5d1962393206"}, + {file = "cffi-1.17.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:4304d4416ff032ed50ad6bb87416d802e67139e31c0bde4628f36a47a3164bfa"}, + {file = "cffi-1.17.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:331ad15c39c9fe9186ceaf87203a9ecf5ae0ba2538c9e898e3a6967e8ad3db6f"}, + {file = "cffi-1.17.0-cp310-cp310-win32.whl", hash = "sha256:669b29a9eca6146465cc574659058ed949748f0809a2582d1f1a324eb91054dc"}, + {file = "cffi-1.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:48b389b1fd5144603d61d752afd7167dfd205973a43151ae5045b35793232aa2"}, + {file = "cffi-1.17.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c5d97162c196ce54af6700949ddf9409e9833ef1003b4741c2b39ef46f1d9720"}, + {file = "cffi-1.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5ba5c243f4004c750836f81606a9fcb7841f8874ad8f3bf204ff5e56332b72b9"}, + {file = "cffi-1.17.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bb9333f58fc3a2296fb1d54576138d4cf5d496a2cc118422bd77835e6ae0b9cb"}, + {file = "cffi-1.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:435a22d00ec7d7ea533db494da8581b05977f9c37338c80bc86314bec2619424"}, + {file = "cffi-1.17.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d1df34588123fcc88c872f5acb6f74ae59e9d182a2707097f9e28275ec26a12d"}, + {file = "cffi-1.17.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:df8bb0010fdd0a743b7542589223a2816bdde4d94bb5ad67884348fa2c1c67e8"}, + {file = "cffi-1.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8b5b9712783415695663bd463990e2f00c6750562e6ad1d28e072a611c5f2a6"}, + {file = "cffi-1.17.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ffef8fd58a36fb5f1196919638f73dd3ae0db1a878982b27a9a5a176ede4ba91"}, + {file = "cffi-1.17.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4e67d26532bfd8b7f7c05d5a766d6f437b362c1bf203a3a5ce3593a645e870b8"}, + {file = "cffi-1.17.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:45f7cd36186db767d803b1473b3c659d57a23b5fa491ad83c6d40f2af58e4dbb"}, + {file = "cffi-1.17.0-cp311-cp311-win32.whl", hash = "sha256:a9015f5b8af1bb6837a3fcb0cdf3b874fe3385ff6274e8b7925d81ccaec3c5c9"}, + {file = "cffi-1.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:b50aaac7d05c2c26dfd50c3321199f019ba76bb650e346a6ef3616306eed67b0"}, + {file = "cffi-1.17.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aec510255ce690d240f7cb23d7114f6b351c733a74c279a84def763660a2c3bc"}, + {file = "cffi-1.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2770bb0d5e3cc0e31e7318db06efcbcdb7b31bcb1a70086d3177692a02256f59"}, + {file = "cffi-1.17.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:db9a30ec064129d605d0f1aedc93e00894b9334ec74ba9c6bdd08147434b33eb"}, + {file = "cffi-1.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a47eef975d2b8b721775a0fa286f50eab535b9d56c70a6e62842134cf7841195"}, + {file = "cffi-1.17.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f3e0992f23bbb0be00a921eae5363329253c3b86287db27092461c887b791e5e"}, + {file = "cffi-1.17.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6107e445faf057c118d5050560695e46d272e5301feffda3c41849641222a828"}, + {file = "cffi-1.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb862356ee9391dc5a0b3cbc00f416b48c1b9a52d252d898e5b7696a5f9fe150"}, + {file = "cffi-1.17.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c1c13185b90bbd3f8b5963cd8ce7ad4ff441924c31e23c975cb150e27c2bf67a"}, + {file = "cffi-1.17.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:17c6d6d3260c7f2d94f657e6872591fe8733872a86ed1345bda872cfc8c74885"}, + {file = "cffi-1.17.0-cp312-cp312-win32.whl", hash = "sha256:c3b8bd3133cd50f6b637bb4322822c94c5ce4bf0d724ed5ae70afce62187c492"}, + {file = "cffi-1.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:dca802c8db0720ce1c49cce1149ff7b06e91ba15fa84b1d59144fef1a1bc7ac2"}, + {file = "cffi-1.17.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6ce01337d23884b21c03869d2f68c5523d43174d4fc405490eb0091057943118"}, + {file = "cffi-1.17.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cab2eba3830bf4f6d91e2d6718e0e1c14a2f5ad1af68a89d24ace0c6b17cced7"}, + {file = "cffi-1.17.0-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:14b9cbc8f7ac98a739558eb86fabc283d4d564dafed50216e7f7ee62d0d25377"}, + {file = "cffi-1.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b00e7bcd71caa0282cbe3c90966f738e2db91e64092a877c3ff7f19a1628fdcb"}, + {file = "cffi-1.17.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:41f4915e09218744d8bae14759f983e466ab69b178de38066f7579892ff2a555"}, + {file = "cffi-1.17.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e4760a68cab57bfaa628938e9c2971137e05ce48e762a9cb53b76c9b569f1204"}, + {file = "cffi-1.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:011aff3524d578a9412c8b3cfaa50f2c0bd78e03eb7af7aa5e0df59b158efb2f"}, + {file = "cffi-1.17.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:a003ac9edc22d99ae1286b0875c460351f4e101f8c9d9d2576e78d7e048f64e0"}, + {file = "cffi-1.17.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ef9528915df81b8f4c7612b19b8628214c65c9b7f74db2e34a646a0a2a0da2d4"}, + {file = "cffi-1.17.0-cp313-cp313-win32.whl", hash = "sha256:70d2aa9fb00cf52034feac4b913181a6e10356019b18ef89bc7c12a283bf5f5a"}, + {file = "cffi-1.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:b7b6ea9e36d32582cda3465f54c4b454f62f23cb083ebc7a94e2ca6ef011c3a7"}, + {file = "cffi-1.17.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:964823b2fc77b55355999ade496c54dde161c621cb1f6eac61dc30ed1b63cd4c"}, + {file = "cffi-1.17.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:516a405f174fd3b88829eabfe4bb296ac602d6a0f68e0d64d5ac9456194a5b7e"}, + {file = "cffi-1.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dec6b307ce928e8e112a6bb9921a1cb00a0e14979bf28b98e084a4b8a742bd9b"}, + {file = "cffi-1.17.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4094c7b464cf0a858e75cd14b03509e84789abf7b79f8537e6a72152109c76e"}, + {file = "cffi-1.17.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2404f3de742f47cb62d023f0ba7c5a916c9c653d5b368cc966382ae4e57da401"}, + {file = "cffi-1.17.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3aa9d43b02a0c681f0bfbc12d476d47b2b2b6a3f9287f11ee42989a268a1833c"}, + {file = "cffi-1.17.0-cp38-cp38-win32.whl", hash = "sha256:0bb15e7acf8ab35ca8b24b90af52c8b391690ef5c4aec3d31f38f0d37d2cc499"}, + {file = "cffi-1.17.0-cp38-cp38-win_amd64.whl", hash = "sha256:93a7350f6706b31f457c1457d3a3259ff9071a66f312ae64dc024f049055f72c"}, + {file = "cffi-1.17.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1a2ddbac59dc3716bc79f27906c010406155031a1c801410f1bafff17ea304d2"}, + {file = "cffi-1.17.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6327b572f5770293fc062a7ec04160e89741e8552bf1c358d1a23eba68166759"}, + {file = "cffi-1.17.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbc183e7bef690c9abe5ea67b7b60fdbca81aa8da43468287dae7b5c046107d4"}, + {file = "cffi-1.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bdc0f1f610d067c70aa3737ed06e2726fd9d6f7bfee4a351f4c40b6831f4e82"}, + {file = "cffi-1.17.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6d872186c1617d143969defeadac5a904e6e374183e07977eedef9c07c8953bf"}, + {file = "cffi-1.17.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0d46ee4764b88b91f16661a8befc6bfb24806d885e27436fdc292ed7e6f6d058"}, + {file = "cffi-1.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f76a90c345796c01d85e6332e81cab6d70de83b829cf1d9762d0a3da59c7932"}, + {file = "cffi-1.17.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e60821d312f99d3e1569202518dddf10ae547e799d75aef3bca3a2d9e8ee693"}, + {file = "cffi-1.17.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:eb09b82377233b902d4c3fbeeb7ad731cdab579c6c6fda1f763cd779139e47c3"}, + {file = "cffi-1.17.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:24658baf6224d8f280e827f0a50c46ad819ec8ba380a42448e24459daf809cf4"}, + {file = "cffi-1.17.0-cp39-cp39-win32.whl", hash = "sha256:0fdacad9e0d9fc23e519efd5ea24a70348305e8d7d85ecbb1a5fa66dc834e7fb"}, + {file = "cffi-1.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:7cbc78dc018596315d4e7841c8c3a7ae31cc4d638c9b627f87d52e8abaaf2d29"}, + {file = "cffi-1.17.0.tar.gz", hash = "sha256:f3157624b7558b914cb039fd1af735e5e8049a87c817cc215109ad1c8779df76"}, ] [package.dependencies] @@ -239,7 +243,6 @@ pycparser = "*" name = "cfgv" version = "3.4.0" description = "Validate configuration and produce human readable error messages." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -251,7 +254,6 @@ files = [ name = "charset-normalizer" version = "3.3.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -351,7 +353,6 @@ files = [ name = "click" version = "8.1.7" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -366,7 +367,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -376,64 +376,83 @@ files = [ [[package]] name = "coverage" -version = "7.5.4" +version = "7.6.1" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6cfb5a4f556bb51aba274588200a46e4dd6b505fb1a5f8c5ae408222eb416f99"}, - {file = "coverage-7.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2174e7c23e0a454ffe12267a10732c273243b4f2d50d07544a91198f05c48f47"}, - {file = "coverage-7.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2214ee920787d85db1b6a0bd9da5f8503ccc8fcd5814d90796c2f2493a2f4d2e"}, - {file = "coverage-7.5.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1137f46adb28e3813dec8c01fefadcb8c614f33576f672962e323b5128d9a68d"}, - {file = "coverage-7.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b385d49609f8e9efc885790a5a0e89f2e3ae042cdf12958b6034cc442de428d3"}, - {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b4a474f799456e0eb46d78ab07303286a84a3140e9700b9e154cfebc8f527016"}, - {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5cd64adedf3be66f8ccee418473c2916492d53cbafbfcff851cbec5a8454b136"}, - {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e564c2cf45d2f44a9da56f4e3a26b2236504a496eb4cb0ca7221cd4cc7a9aca9"}, - {file = "coverage-7.5.4-cp310-cp310-win32.whl", hash = "sha256:7076b4b3a5f6d2b5d7f1185fde25b1e54eb66e647a1dfef0e2c2bfaf9b4c88c8"}, - {file = "coverage-7.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:018a12985185038a5b2bcafab04ab833a9a0f2c59995b3cec07e10074c78635f"}, - {file = "coverage-7.5.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:db14f552ac38f10758ad14dd7b983dbab424e731588d300c7db25b6f89e335b5"}, - {file = "coverage-7.5.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3257fdd8e574805f27bb5342b77bc65578e98cbc004a92232106344053f319ba"}, - {file = "coverage-7.5.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a6612c99081d8d6134005b1354191e103ec9705d7ba2754e848211ac8cacc6b"}, - {file = "coverage-7.5.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d45d3cbd94159c468b9b8c5a556e3f6b81a8d1af2a92b77320e887c3e7a5d080"}, - {file = "coverage-7.5.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed550e7442f278af76d9d65af48069f1fb84c9f745ae249c1a183c1e9d1b025c"}, - {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7a892be37ca35eb5019ec85402c3371b0f7cda5ab5056023a7f13da0961e60da"}, - {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8192794d120167e2a64721d88dbd688584675e86e15d0569599257566dec9bf0"}, - {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:820bc841faa502e727a48311948e0461132a9c8baa42f6b2b84a29ced24cc078"}, - {file = "coverage-7.5.4-cp311-cp311-win32.whl", hash = "sha256:6aae5cce399a0f065da65c7bb1e8abd5c7a3043da9dceb429ebe1b289bc07806"}, - {file = "coverage-7.5.4-cp311-cp311-win_amd64.whl", hash = "sha256:d2e344d6adc8ef81c5a233d3a57b3c7d5181f40e79e05e1c143da143ccb6377d"}, - {file = "coverage-7.5.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:54317c2b806354cbb2dc7ac27e2b93f97096912cc16b18289c5d4e44fc663233"}, - {file = "coverage-7.5.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:042183de01f8b6d531e10c197f7f0315a61e8d805ab29c5f7b51a01d62782747"}, - {file = "coverage-7.5.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6bb74ed465d5fb204b2ec41d79bcd28afccf817de721e8a807d5141c3426638"}, - {file = "coverage-7.5.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3d45ff86efb129c599a3b287ae2e44c1e281ae0f9a9bad0edc202179bcc3a2e"}, - {file = "coverage-7.5.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5013ed890dc917cef2c9f765c4c6a8ae9df983cd60dbb635df8ed9f4ebc9f555"}, - {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1014fbf665fef86cdfd6cb5b7371496ce35e4d2a00cda501cf9f5b9e6fced69f"}, - {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3684bc2ff328f935981847082ba4fdc950d58906a40eafa93510d1b54c08a66c"}, - {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:581ea96f92bf71a5ec0974001f900db495488434a6928a2ca7f01eee20c23805"}, - {file = "coverage-7.5.4-cp312-cp312-win32.whl", hash = "sha256:73ca8fbc5bc622e54627314c1a6f1dfdd8db69788f3443e752c215f29fa87a0b"}, - {file = "coverage-7.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:cef4649ec906ea7ea5e9e796e68b987f83fa9a718514fe147f538cfeda76d7a7"}, - {file = "coverage-7.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cdd31315fc20868c194130de9ee6bfd99755cc9565edff98ecc12585b90be882"}, - {file = "coverage-7.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:02ff6e898197cc1e9fa375581382b72498eb2e6d5fc0b53f03e496cfee3fac6d"}, - {file = "coverage-7.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d05c16cf4b4c2fc880cb12ba4c9b526e9e5d5bb1d81313d4d732a5b9fe2b9d53"}, - {file = "coverage-7.5.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c5986ee7ea0795a4095ac4d113cbb3448601efca7f158ec7f7087a6c705304e4"}, - {file = "coverage-7.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5df54843b88901fdc2f598ac06737f03d71168fd1175728054c8f5a2739ac3e4"}, - {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ab73b35e8d109bffbda9a3e91c64e29fe26e03e49addf5b43d85fc426dde11f9"}, - {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:aea072a941b033813f5e4814541fc265a5c12ed9720daef11ca516aeacd3bd7f"}, - {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:16852febd96acd953b0d55fc842ce2dac1710f26729b31c80b940b9afcd9896f"}, - {file = "coverage-7.5.4-cp38-cp38-win32.whl", hash = "sha256:8f894208794b164e6bd4bba61fc98bf6b06be4d390cf2daacfa6eca0a6d2bb4f"}, - {file = "coverage-7.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:e2afe743289273209c992075a5a4913e8d007d569a406ffed0bd080ea02b0633"}, - {file = "coverage-7.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b95c3a8cb0463ba9f77383d0fa8c9194cf91f64445a63fc26fb2327e1e1eb088"}, - {file = "coverage-7.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3d7564cc09dd91b5a6001754a5b3c6ecc4aba6323baf33a12bd751036c998be4"}, - {file = "coverage-7.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44da56a2589b684813f86d07597fdf8a9c6ce77f58976727329272f5a01f99f7"}, - {file = "coverage-7.5.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e16f3d6b491c48c5ae726308e6ab1e18ee830b4cdd6913f2d7f77354b33f91c8"}, - {file = "coverage-7.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbc5958cb471e5a5af41b0ddaea96a37e74ed289535e8deca404811f6cb0bc3d"}, - {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:a04e990a2a41740b02d6182b498ee9796cf60eefe40cf859b016650147908029"}, - {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ddbd2f9713a79e8e7242d7c51f1929611e991d855f414ca9996c20e44a895f7c"}, - {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b1ccf5e728ccf83acd313c89f07c22d70d6c375a9c6f339233dcf792094bcbf7"}, - {file = "coverage-7.5.4-cp39-cp39-win32.whl", hash = "sha256:56b4eafa21c6c175b3ede004ca12c653a88b6f922494b023aeb1e836df953ace"}, - {file = "coverage-7.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:65e528e2e921ba8fd67d9055e6b9f9e34b21ebd6768ae1c1723f4ea6ace1234d"}, - {file = "coverage-7.5.4-pp38.pp39.pp310-none-any.whl", hash = "sha256:79b356f3dd5b26f3ad23b35c75dbdaf1f9e2450b6bcefc6d0825ea0aa3f86ca5"}, - {file = "coverage-7.5.4.tar.gz", hash = "sha256:a44963520b069e12789d0faea4e9fdb1e410cdc4aab89d94f7f55cbb7fef0353"}, + {file = "coverage-7.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b06079abebbc0e89e6163b8e8f0e16270124c154dc6e4a47b413dd538859af16"}, + {file = "coverage-7.6.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf4b19715bccd7ee27b6b120e7e9dd56037b9c0681dcc1adc9ba9db3d417fa36"}, + {file = "coverage-7.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61c0abb4c85b095a784ef23fdd4aede7a2628478e7baba7c5e3deba61070a02"}, + {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd21f6ae3f08b41004dfb433fa895d858f3f5979e7762d052b12aef444e29afc"}, + {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f59d57baca39b32db42b83b2a7ba6f47ad9c394ec2076b084c3f029b7afca23"}, + {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a1ac0ae2b8bd743b88ed0502544847c3053d7171a3cff9228af618a068ed9c34"}, + {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e6a08c0be454c3b3beb105c0596ebdc2371fab6bb90c0c0297f4e58fd7e1012c"}, + {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f5796e664fe802da4f57a168c85359a8fbf3eab5e55cd4e4569fbacecc903959"}, + {file = "coverage-7.6.1-cp310-cp310-win32.whl", hash = "sha256:7bb65125fcbef8d989fa1dd0e8a060999497629ca5b0efbca209588a73356232"}, + {file = "coverage-7.6.1-cp310-cp310-win_amd64.whl", hash = "sha256:3115a95daa9bdba70aea750db7b96b37259a81a709223c8448fa97727d546fe0"}, + {file = "coverage-7.6.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7dea0889685db8550f839fa202744652e87c60015029ce3f60e006f8c4462c93"}, + {file = "coverage-7.6.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed37bd3c3b063412f7620464a9ac1314d33100329f39799255fb8d3027da50d3"}, + {file = "coverage-7.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d85f5e9a5f8b73e2350097c3756ef7e785f55bd71205defa0bfdaf96c31616ff"}, + {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bc572be474cafb617672c43fe989d6e48d3c83af02ce8de73fff1c6bb3c198d"}, + {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0420b573964c760df9e9e86d1a9a622d0d27f417e1a949a8a66dd7bcee7bc6"}, + {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1f4aa8219db826ce6be7099d559f8ec311549bfc4046f7f9fe9b5cea5c581c56"}, + {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:fc5a77d0c516700ebad189b587de289a20a78324bc54baee03dd486f0855d234"}, + {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b48f312cca9621272ae49008c7f613337c53fadca647d6384cc129d2996d1133"}, + {file = "coverage-7.6.1-cp311-cp311-win32.whl", hash = "sha256:1125ca0e5fd475cbbba3bb67ae20bd2c23a98fac4e32412883f9bcbaa81c314c"}, + {file = "coverage-7.6.1-cp311-cp311-win_amd64.whl", hash = "sha256:8ae539519c4c040c5ffd0632784e21b2f03fc1340752af711f33e5be83a9d6c6"}, + {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, + {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, + {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, + {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, + {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, + {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, + {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, + {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, + {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, + {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, + {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, + {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, + {file = "coverage-7.6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6db04803b6c7291985a761004e9060b2bca08da6d04f26a7f2294b8623a0c1a0"}, + {file = "coverage-7.6.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f1adfc8ac319e1a348af294106bc6a8458a0f1633cc62a1446aebc30c5fa186a"}, + {file = "coverage-7.6.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a95324a9de9650a729239daea117df21f4b9868ce32e63f8b650ebe6cef5595b"}, + {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b43c03669dc4618ec25270b06ecd3ee4fa94c7f9b3c14bae6571ca00ef98b0d3"}, + {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8929543a7192c13d177b770008bc4e8119f2e1f881d563fc6b6305d2d0ebe9de"}, + {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:a09ece4a69cf399510c8ab25e0950d9cf2b42f7b3cb0374f95d2e2ff594478a6"}, + {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9054a0754de38d9dbd01a46621636689124d666bad1936d76c0341f7d71bf569"}, + {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0dbde0f4aa9a16fa4d754356a8f2e36296ff4d83994b2c9d8398aa32f222f989"}, + {file = "coverage-7.6.1-cp38-cp38-win32.whl", hash = "sha256:da511e6ad4f7323ee5702e6633085fb76c2f893aaf8ce4c51a0ba4fc07580ea7"}, + {file = "coverage-7.6.1-cp38-cp38-win_amd64.whl", hash = "sha256:3f1156e3e8f2872197af3840d8ad307a9dd18e615dc64d9ee41696f287c57ad8"}, + {file = "coverage-7.6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abd5fd0db5f4dc9289408aaf34908072f805ff7792632250dcb36dc591d24255"}, + {file = "coverage-7.6.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:547f45fa1a93154bd82050a7f3cddbc1a7a4dd2a9bf5cb7d06f4ae29fe94eaf8"}, + {file = "coverage-7.6.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645786266c8f18a931b65bfcefdbf6952dd0dea98feee39bd188607a9d307ed2"}, + {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e0b2df163b8ed01d515807af24f63de04bebcecbd6c3bfeff88385789fdf75a"}, + {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:609b06f178fe8e9f89ef676532760ec0b4deea15e9969bf754b37f7c40326dbc"}, + {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:702855feff378050ae4f741045e19a32d57d19f3e0676d589df0575008ea5004"}, + {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2bdb062ea438f22d99cba0d7829c2ef0af1d768d1e4a4f528087224c90b132cb"}, + {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9c56863d44bd1c4fe2abb8a4d6f5371d197f1ac0ebdee542f07f35895fc07f36"}, + {file = "coverage-7.6.1-cp39-cp39-win32.whl", hash = "sha256:6e2cd258d7d927d09493c8df1ce9174ad01b381d4729a9d8d4e38670ca24774c"}, + {file = "coverage-7.6.1-cp39-cp39-win_amd64.whl", hash = "sha256:06a737c882bd26d0d6ee7269b20b12f14a8704807a01056c80bb881a4b2ce6ca"}, + {file = "coverage-7.6.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:e9a6e0eb86070e8ccaedfbd9d38fec54864f3125ab95419970575b42af7541df"}, + {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, ] [package.dependencies] @@ -444,44 +463,38 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "42.0.8" +version = "43.0.0" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e"}, - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:961e61cefdcb06e0c6d7e3a1b22ebe8b996eb2bf50614e89384be54c48c6b63d"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ec3672626e1b9e55afd0df6d774ff0e953452886e06e0f1eb7eb0c832e8902"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e599b53fd95357d92304510fb7bda8523ed1f79ca98dce2f43c115950aa78801"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5226d5d21ab681f432a9c1cf8b658c0cb02533eece706b155e5fbd8a0cdd3949"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6b7c4f03ce01afd3b76cf69a5455caa9cfa3de8c8f493e0d3ab7d20611c8dae9"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:2346b911eb349ab547076f47f2e035fc8ff2c02380a7cbbf8d87114fa0f1c583"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad803773e9df0b92e0a817d22fd8a3675493f690b96130a5e24f1b8fabbea9c7"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2f66d9cd9147ee495a8374a45ca445819f8929a3efcd2e3df6428e46c3cbb10b"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d45b940883a03e19e944456a558b67a41160e367a719833c53de6911cabba2b7"}, - {file = "cryptography-42.0.8-cp37-abi3-win32.whl", hash = "sha256:a0c5b2b0585b6af82d7e385f55a8bc568abff8923af147ee3c07bd8b42cda8b2"}, - {file = "cryptography-42.0.8-cp37-abi3-win_amd64.whl", hash = "sha256:57080dee41209e556a9a4ce60d229244f7a66ef52750f813bfbe18959770cfba"}, - {file = "cryptography-42.0.8-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:dea567d1b0e8bc5764b9443858b673b734100c2871dc93163f58c46a97a83d28"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4783183f7cb757b73b2ae9aed6599b96338eb957233c58ca8f49a49cc32fd5e"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0608251135d0e03111152e41f0cc2392d1e74e35703960d4190b2e0f4ca9c70"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dc0fdf6787f37b1c6b08e6dfc892d9d068b5bdb671198c72072828b80bd5fe4c"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9c0c1716c8447ee7dbf08d6db2e5c41c688544c61074b54fc4564196f55c25a7"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fff12c88a672ab9c9c1cf7b0c80e3ad9e2ebd9d828d955c126be4fd3e5578c9e"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:cafb92b2bc622cd1aa6a1dce4b93307792633f4c5fe1f46c6b97cf67073ec961"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:31f721658a29331f895a5a54e7e82075554ccfb8b163a18719d342f5ffe5ecb1"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b297f90c5723d04bcc8265fc2a0f86d4ea2e0f7ab4b6994459548d3a6b992a14"}, - {file = "cryptography-42.0.8-cp39-abi3-win32.whl", hash = "sha256:2f88d197e66c65be5e42cd72e5c18afbfae3f741742070e3019ac8f4ac57262c"}, - {file = "cryptography-42.0.8-cp39-abi3-win_amd64.whl", hash = "sha256:fa76fbb7596cc5839320000cdd5d0955313696d9511debab7ee7278fc8b5c84a"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ba4f0a211697362e89ad822e667d8d340b4d8d55fae72cdd619389fb5912eefe"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:81884c4d096c272f00aeb1f11cf62ccd39763581645b0812e99a91505fa48e0c"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c9bb2ae11bfbab395bdd072985abde58ea9860ed84e59dbc0463a5d0159f5b71"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7016f837e15b0a1c119d27ecd89b3515f01f90a8615ed5e9427e30d9cdbfed3d"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5a94eccb2a81a309806027e1670a358b99b8fe8bfe9f8d329f27d72c094dde8c"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dec9b018df185f08483f294cae6ccac29e7a6e0678996587363dc352dc65c842"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:343728aac38decfdeecf55ecab3264b015be68fc2816ca800db649607aeee648"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:013629ae70b40af70c9a7a5db40abe5d9054e6f4380e50ce769947b73bf3caad"}, - {file = "cryptography-42.0.8.tar.gz", hash = "sha256:8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2"}, + {file = "cryptography-43.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:64c3f16e2a4fc51c0d06af28441881f98c5d91009b8caaff40cf3548089e9c74"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3dcdedae5c7710b9f97ac6bba7e1052b95c7083c9d0e9df96e02a1932e777895"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d9a1eca329405219b605fac09ecfc09ac09e595d6def650a437523fcd08dd22"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ea9e57f8ea880eeea38ab5abf9fbe39f923544d7884228ec67d666abd60f5a47"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9a8d6802e0825767476f62aafed40532bd435e8a5f7d23bd8b4f5fd04cc80ecf"}, + {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cc70b4b581f28d0a254d006f26949245e3657d40d8857066c2ae22a61222ef55"}, + {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4a997df8c1c2aae1e1e5ac49c2e4f610ad037fc5a3aadc7b64e39dea42249431"}, + {file = "cryptography-43.0.0-cp37-abi3-win32.whl", hash = "sha256:6e2b11c55d260d03a8cf29ac9b5e0608d35f08077d8c087be96287f43af3ccdc"}, + {file = "cryptography-43.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:31e44a986ceccec3d0498e16f3d27b2ee5fdf69ce2ab89b52eaad1d2f33d8778"}, + {file = "cryptography-43.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:7b3f5fe74a5ca32d4d0f302ffe6680fcc5c28f8ef0dc0ae8f40c0f3a1b4fca66"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac1955ce000cb29ab40def14fd1bbfa7af2017cca696ee696925615cafd0dce5"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:299d3da8e00b7e2b54bb02ef58d73cd5f55fb31f33ebbf33bd00d9aa6807df7e"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ee0c405832ade84d4de74b9029bedb7b31200600fa524d218fc29bfa371e97f5"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cb013933d4c127349b3948aa8aaf2f12c0353ad0eccd715ca789c8a0f671646f"}, + {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fdcb265de28585de5b859ae13e3846a8e805268a823a12a4da2597f1f5afc9f0"}, + {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2905ccf93a8a2a416f3ec01b1a7911c3fe4073ef35640e7ee5296754e30b762b"}, + {file = "cryptography-43.0.0-cp39-abi3-win32.whl", hash = "sha256:47ca71115e545954e6c1d207dd13461ab81f4eccfcb1345eac874828b5e3eaaf"}, + {file = "cryptography-43.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:0663585d02f76929792470451a5ba64424acc3cd5227b03921dab0e2f27b1709"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2c6d112bf61c5ef44042c253e4859b3cbbb50df2f78fa8fae6747a7814484a70"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:844b6d608374e7d08f4f6e6f9f7b951f9256db41421917dfb2d003dde4cd6b66"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:51956cf8730665e2bdf8ddb8da0056f699c1a5715648c1b0144670c1ba00b48f"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:aae4d918f6b180a8ab8bf6511a419473d107df4dbb4225c7b48c5c9602c38c7f"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:232ce02943a579095a339ac4b390fbbe97f5b5d5d107f8a08260ea2768be8cc2"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5bcb8a5620008a8034d39bce21dc3e23735dfdb6a33a06974739bfa04f853947"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:08a24a7070b2b6804c1940ff0f910ff728932a9d0e80e7814234269f9d46d069"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e9c5266c432a1e23738d178e51c2c7a5e2ddf790f248be939448c0ba2021f9d1"}, + {file = "cryptography-43.0.0.tar.gz", hash = "sha256:b88075ada2d51aa9f18283532c9f60e72170041bba88d7f37e49cbb10275299e"}, ] [package.dependencies] @@ -494,14 +507,13 @@ nox = ["nox"] pep8test = ["check-sdist", "click", "mypy", "ruff"] sdist = ["build"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test = ["certifi", "cryptography-vectors (==43.0.0)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] test-randomorder = ["pytest-randomly"] [[package]] name = "darglint" version = "1.8.1" description = "A utility for ensuring Google-style docstrings stay up to date with the source code." -category = "dev" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -513,7 +525,6 @@ files = [ name = "dill" version = "0.3.8" description = "serialize all of Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -529,7 +540,6 @@ profile = ["gprof2dot (>=2022.7.29)"] name = "distlib" version = "0.3.8" description = "Distribution utilities" -category = "dev" optional = false python-versions = "*" files = [ @@ -541,7 +551,6 @@ files = [ name = "distro" version = "1.9.0" description = "Distro - an OS platform information API" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -553,24 +562,19 @@ files = [ name = "docutils" version = "0.20.1" description = "Docutils -- Python Documentation Utilities" -category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, - {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, -] +python-versions = "*" +files = [] [[package]] name = "exceptiongroup" -version = "1.2.1" +version = "1.2.2" description = "Backport of PEP 654 (exception groups)" -category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, - {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, + {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, + {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, ] [package.extras] @@ -580,7 +584,6 @@ test = ["pytest (>=6)"] name = "fastapi" version = "0.110.3" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -600,7 +603,6 @@ all = ["email_validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)" name = "filelock" version = "3.15.4" description = "A platform independent file lock." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -617,7 +619,6 @@ typing = ["typing-extensions (>=4.8)"] name = "greenlet" version = "3.0.3" description = "Lightweight in-process concurrent programming" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -689,7 +690,6 @@ test = ["objgraph", "psutil"] name = "gunicorn" version = "22.0.0" description = "WSGI HTTP Server for UNIX" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -711,7 +711,6 @@ tornado = ["tornado (>=0.2)"] name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -723,7 +722,6 @@ files = [ name = "httpcore" version = "1.0.5" description = "A minimal low-level HTTP client." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -738,14 +736,13 @@ h11 = ">=0.13,<0.15" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] trio = ["trio (>=0.22.0,<0.26.0)"] [[package]] name = "httpx" version = "0.27.0" description = "The next generation HTTP client." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -756,26 +753,25 @@ files = [ [package.dependencies] anyio = "*" certifi = "*" -httpcore = ">=1.0.0,<2.0.0" +httpcore = "==1.*" idna = "*" sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "identify" -version = "2.5.36" +version = "2.6.0" description = "File identification library for Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "identify-2.5.36-py2.py3-none-any.whl", hash = "sha256:37d93f380f4de590500d9dba7db359d0d3da95ffe7f9de1753faa159e71e7dfa"}, - {file = "identify-2.5.36.tar.gz", hash = "sha256:e5e00f54165f9047fbebeb4a560f9acfb8af4c88232be60a488e9b68d122745d"}, + {file = "identify-2.6.0-py2.py3-none-any.whl", hash = "sha256:e79ae4406387a9d300332b5fd366d8994f1525e8414984e1a59e058b2eda2dd0"}, + {file = "identify-2.6.0.tar.gz", hash = "sha256:cb171c685bdc31bcc4c1734698736a7d5b6c8bf2e0c15117f4d469c8640ae5cf"}, ] [package.extras] @@ -785,7 +781,6 @@ license = ["ukkonen"] name = "idna" version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -795,14 +790,13 @@ files = [ [[package]] name = "importlib-metadata" -version = "8.0.0" +version = "8.4.0" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-8.0.0-py3-none-any.whl", hash = "sha256:15584cf2b1bf449d98ff8a6ff1abef57bf20f3ac6454f431736cd3e660921b2f"}, - {file = "importlib_metadata-8.0.0.tar.gz", hash = "sha256:188bd24e4c346d3f0a933f275c2fec67050326a856b9a359881d7c2a697e8812"}, + {file = "importlib_metadata-8.4.0-py3-none-any.whl", hash = "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1"}, + {file = "importlib_metadata-8.4.0.tar.gz", hash = "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5"}, ] [package.dependencies] @@ -815,28 +809,30 @@ test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "p [[package]] name = "importlib-resources" -version = "6.4.0" +version = "6.4.4" description = "Read resources from Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_resources-6.4.0-py3-none-any.whl", hash = "sha256:50d10f043df931902d4194ea07ec57960f66a80449ff867bfe782b4c486ba78c"}, - {file = "importlib_resources-6.4.0.tar.gz", hash = "sha256:cdb2b453b8046ca4e3798eb1d84f3cce1446a0e8e7b5ef4efb600f19fc398145"}, + {file = "importlib_resources-6.4.4-py3-none-any.whl", hash = "sha256:dda242603d1c9cd836c3368b1174ed74cb4049ecd209e7a1a0104620c18c5c11"}, + {file = "importlib_resources-6.4.4.tar.gz", hash = "sha256:20600c8b7361938dc0bb2d5ec0297802e575df486f5a544fa414da65e13721f7"}, ] [package.dependencies] zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["jaraco.test (>=5.4)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)", "zipp (>=3.17)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] +type = ["pytest-mypy"] [[package]] name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -848,7 +844,6 @@ files = [ name = "jaraco-classes" version = "3.4.0" description = "Utility functions for Python class constructs" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -865,47 +860,44 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-ena [[package]] name = "jaraco-context" -version = "5.3.0" +version = "6.0.1" description = "Useful decorators and context managers" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "jaraco.context-5.3.0-py3-none-any.whl", hash = "sha256:3e16388f7da43d384a1a7cd3452e72e14732ac9fe459678773a3608a812bf266"}, - {file = "jaraco.context-5.3.0.tar.gz", hash = "sha256:c2f67165ce1f9be20f32f650f25d8edfc1646a8aeee48ae06fb35f90763576d2"}, + {file = "jaraco.context-6.0.1-py3-none-any.whl", hash = "sha256:f797fc481b490edb305122c9181830a3a5b76d84ef6d1aef2fb9b47ab956f9e4"}, + {file = "jaraco_context-6.0.1.tar.gz", hash = "sha256:9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3"}, ] [package.dependencies] "backports.tarfile" = {version = "*", markers = "python_version < \"3.12\""} [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["portend", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +test = ["portend", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [[package]] name = "jaraco-functools" -version = "4.0.1" +version = "4.0.2" description = "Functools like those found in stdlib" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "jaraco.functools-4.0.1-py3-none-any.whl", hash = "sha256:3b24ccb921d6b593bdceb56ce14799204f473976e2a9d4b15b04d0f2c2326664"}, - {file = "jaraco_functools-4.0.1.tar.gz", hash = "sha256:d33fa765374c0611b52f8b3a795f8900869aa88c84769d4d1746cd68fb28c3e8"}, + {file = "jaraco.functools-4.0.2-py3-none-any.whl", hash = "sha256:c9d16a3ed4ccb5a889ad8e0b7a343401ee5b2a71cee6ed192d3f68bc351e94e3"}, + {file = "jaraco_functools-4.0.2.tar.gz", hash = "sha256:3460c74cd0d32bf82b9576bbb3527c4364d5b27a21f5158a62aed6c4b42e23f5"}, ] [package.dependencies] more-itertools = "*" [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["jaraco.classes", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +test = ["jaraco.classes", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [[package]] name = "jeepney" version = "0.8.0" description = "Low-level, pure Python DBus protocol wrapper." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -921,7 +913,6 @@ trio = ["async_generator", "trio"] name = "jinja2" version = "3.1.4" description = "A very fast and expressive template engine." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -937,14 +928,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "25.2.1" +version = "25.3.0" description = "Store and access your passwords safely." -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "keyring-25.2.1-py3-none-any.whl", hash = "sha256:2458681cdefc0dbc0b7eb6cf75d0b98e59f9ad9b2d4edd319d18f68bdca95e50"}, - {file = "keyring-25.2.1.tar.gz", hash = "sha256:daaffd42dbda25ddafb1ad5fec4024e5bbcfe424597ca1ca452b299861e49f1b"}, + {file = "keyring-25.3.0-py3-none-any.whl", hash = "sha256:8d963da00ccdf06e356acd9bf3b743208878751032d8599c6cc89eb51310ffae"}, + {file = "keyring-25.3.0.tar.gz", hash = "sha256:8d85a1ea5d6db8515b59e1c5d1d1678b03cf7fc8b8dcfb1651e8c4a524eb42ef"}, ] [package.dependencies] @@ -959,14 +949,13 @@ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] completion = ["shtab (>=1.1.0)"] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +test = ["pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [[package]] name = "lazy-loader" version = "0.4" description = "Makes it easy to load subpackages and functions on demand." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -986,7 +975,6 @@ test = ["pytest (>=7.4)", "pytest-cov (>=4.1)"] name = "mako" version = "1.3.5" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1006,7 +994,6 @@ testing = ["pytest"] name = "markdown-it-py" version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1031,7 +1018,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markupsafe" version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1101,7 +1087,6 @@ files = [ name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1111,47 +1096,44 @@ files = [ [[package]] name = "more-itertools" -version = "10.3.0" +version = "10.4.0" description = "More routines for operating on iterables, beyond itertools" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "more-itertools-10.3.0.tar.gz", hash = "sha256:e5d93ef411224fbcef366a6e8ddc4c5781bc6359d43412a65dd5964e46111463"}, - {file = "more_itertools-10.3.0-py3-none-any.whl", hash = "sha256:ea6a02e24a9161e51faad17a8782b92a0df82c12c1c8886fec7f0c3fa1a1b320"}, + {file = "more-itertools-10.4.0.tar.gz", hash = "sha256:fe0e63c4ab068eac62410ab05cccca2dc71ec44ba8ef29916a0090df061cf923"}, + {file = "more_itertools-10.4.0-py3-none-any.whl", hash = "sha256:0f7d9f83a0a8dcfa8a2694a770590d98a67ea943e3d9f5298309a484758c4e27"}, ] [[package]] name = "nh3" -version = "0.2.17" +version = "0.2.18" description = "Python bindings to the ammonia HTML sanitization library." -category = "main" optional = false python-versions = "*" files = [ - {file = "nh3-0.2.17-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:551672fd71d06cd828e282abdb810d1be24e1abb7ae2543a8fa36a71c1006fe9"}, - {file = "nh3-0.2.17-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c551eb2a3876e8ff2ac63dff1585236ed5dfec5ffd82216a7a174f7c5082a78a"}, - {file = "nh3-0.2.17-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:66f17d78826096291bd264f260213d2b3905e3c7fae6dfc5337d49429f1dc9f3"}, - {file = "nh3-0.2.17-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0316c25b76289cf23be6b66c77d3608a4fdf537b35426280032f432f14291b9a"}, - {file = "nh3-0.2.17-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:22c26e20acbb253a5bdd33d432a326d18508a910e4dcf9a3316179860d53345a"}, - {file = "nh3-0.2.17-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:85cdbcca8ef10733bd31f931956f7fbb85145a4d11ab9e6742bbf44d88b7e351"}, - {file = "nh3-0.2.17-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:40015514022af31975c0b3bca4014634fa13cb5dc4dbcbc00570acc781316dcc"}, - {file = "nh3-0.2.17-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ba73a2f8d3a1b966e9cdba7b211779ad8a2561d2dba9674b8a19ed817923f65f"}, - {file = "nh3-0.2.17-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c21bac1a7245cbd88c0b0e4a420221b7bfa838a2814ee5bb924e9c2f10a1120b"}, - {file = "nh3-0.2.17-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d7a25fd8c86657f5d9d576268e3b3767c5cd4f42867c9383618be8517f0f022a"}, - {file = "nh3-0.2.17-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:c790769152308421283679a142dbdb3d1c46c79c823008ecea8e8141db1a2062"}, - {file = "nh3-0.2.17-cp37-abi3-musllinux_1_2_i686.whl", hash = "sha256:b4427ef0d2dfdec10b641ed0bdaf17957eb625b2ec0ea9329b3d28806c153d71"}, - {file = "nh3-0.2.17-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a3f55fabe29164ba6026b5ad5c3151c314d136fd67415a17660b4aaddacf1b10"}, - {file = "nh3-0.2.17-cp37-abi3-win32.whl", hash = "sha256:1a814dd7bba1cb0aba5bcb9bebcc88fd801b63e21e2450ae6c52d3b3336bc911"}, - {file = "nh3-0.2.17-cp37-abi3-win_amd64.whl", hash = "sha256:1aa52a7def528297f256de0844e8dd680ee279e79583c76d6fa73a978186ddfb"}, - {file = "nh3-0.2.17.tar.gz", hash = "sha256:40d0741a19c3d645e54efba71cb0d8c475b59135c1e3c580f879ad5514cbf028"}, + {file = "nh3-0.2.18-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:14c5a72e9fe82aea5fe3072116ad4661af5cf8e8ff8fc5ad3450f123e4925e86"}, + {file = "nh3-0.2.18-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:7b7c2a3c9eb1a827d42539aa64091640bd275b81e097cd1d8d82ef91ffa2e811"}, + {file = "nh3-0.2.18-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42c64511469005058cd17cc1537578eac40ae9f7200bedcfd1fc1a05f4f8c200"}, + {file = "nh3-0.2.18-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0411beb0589eacb6734f28d5497ca2ed379eafab8ad8c84b31bb5c34072b7164"}, + {file = "nh3-0.2.18-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:5f36b271dae35c465ef5e9090e1fdaba4a60a56f0bb0ba03e0932a66f28b9189"}, + {file = "nh3-0.2.18-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34c03fa78e328c691f982b7c03d4423bdfd7da69cd707fe572f544cf74ac23ad"}, + {file = "nh3-0.2.18-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:19aaba96e0f795bd0a6c56291495ff59364f4300d4a39b29a0abc9cb3774a84b"}, + {file = "nh3-0.2.18-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de3ceed6e661954871d6cd78b410213bdcb136f79aafe22aa7182e028b8c7307"}, + {file = "nh3-0.2.18-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6955369e4d9f48f41e3f238a9e60f9410645db7e07435e62c6a9ea6135a4907f"}, + {file = "nh3-0.2.18-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:f0eca9ca8628dbb4e916ae2491d72957fdd35f7a5d326b7032a345f111ac07fe"}, + {file = "nh3-0.2.18-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:3a157ab149e591bb638a55c8c6bcb8cdb559c8b12c13a8affaba6cedfe51713a"}, + {file = "nh3-0.2.18-cp37-abi3-musllinux_1_2_i686.whl", hash = "sha256:c8b3a1cebcba9b3669ed1a84cc65bf005728d2f0bc1ed2a6594a992e817f3a50"}, + {file = "nh3-0.2.18-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:36c95d4b70530b320b365659bb5034341316e6a9b30f0b25fa9c9eff4c27a204"}, + {file = "nh3-0.2.18-cp37-abi3-win32.whl", hash = "sha256:a7f1b5b2c15866f2db413a3649a8fe4fd7b428ae58be2c0f6bca5eefd53ca2be"}, + {file = "nh3-0.2.18-cp37-abi3-win_amd64.whl", hash = "sha256:8ce0f819d2f1933953fca255db2471ad58184a60508f03e6285e5114b6254844"}, + {file = "nh3-0.2.18.tar.gz", hash = "sha256:94a166927e53972a9698af9542ace4e38b9de50c34352b962f4d9a7d4c927af4"}, ] [[package]] name = "nodeenv" version = "1.9.1" description = "Node.js virtual environment builder" -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -1163,7 +1145,6 @@ files = [ name = "numpy" version = "1.24.4" description = "Fundamental package for array computing in Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1199,64 +1180,123 @@ files = [ [[package]] name = "numpy" -version = "2.0.0" +version = "2.0.1" description = "Fundamental package for array computing in Python" -category = "dev" optional = false python-versions = ">=3.9" files = [ - {file = "numpy-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:04494f6ec467ccb5369d1808570ae55f6ed9b5809d7f035059000a37b8d7e86f"}, - {file = "numpy-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2635dbd200c2d6faf2ef9a0d04f0ecc6b13b3cad54f7c67c61155138835515d2"}, - {file = "numpy-2.0.0-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:0a43f0974d501842866cc83471bdb0116ba0dffdbaac33ec05e6afed5b615238"}, - {file = "numpy-2.0.0-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:8d83bb187fb647643bd56e1ae43f273c7f4dbcdf94550d7938cfc32566756514"}, - {file = "numpy-2.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79e843d186c8fb1b102bef3e2bc35ef81160ffef3194646a7fdd6a73c6b97196"}, - {file = "numpy-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d7696c615765091cc5093f76fd1fa069870304beaccfd58b5dcc69e55ef49c1"}, - {file = "numpy-2.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b4c76e3d4c56f145d41b7b6751255feefae92edbc9a61e1758a98204200f30fc"}, - {file = "numpy-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:acd3a644e4807e73b4e1867b769fbf1ce8c5d80e7caaef0d90dcdc640dfc9787"}, - {file = "numpy-2.0.0-cp310-cp310-win32.whl", hash = "sha256:cee6cc0584f71adefe2c908856ccc98702baf95ff80092e4ca46061538a2ba98"}, - {file = "numpy-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:ed08d2703b5972ec736451b818c2eb9da80d66c3e84aed1deeb0c345fefe461b"}, - {file = "numpy-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ad0c86f3455fbd0de6c31a3056eb822fc939f81b1618f10ff3406971893b62a5"}, - {file = "numpy-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e7f387600d424f91576af20518334df3d97bc76a300a755f9a8d6e4f5cadd289"}, - {file = "numpy-2.0.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:34f003cb88b1ba38cb9a9a4a3161c1604973d7f9d5552c38bc2f04f829536609"}, - {file = "numpy-2.0.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:b6f6a8f45d0313db07d6d1d37bd0b112f887e1369758a5419c0370ba915b3871"}, - {file = "numpy-2.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f64641b42b2429f56ee08b4f427a4d2daf916ec59686061de751a55aafa22e4"}, - {file = "numpy-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7039a136017eaa92c1848152827e1424701532ca8e8967fe480fe1569dae581"}, - {file = "numpy-2.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46e161722e0f619749d1cd892167039015b2c2817296104487cd03ed4a955995"}, - {file = "numpy-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0e50842b2295ba8414c8c1d9d957083d5dfe9e16828b37de883f51fc53c4016f"}, - {file = "numpy-2.0.0-cp311-cp311-win32.whl", hash = "sha256:2ce46fd0b8a0c947ae047d222f7136fc4d55538741373107574271bc00e20e8f"}, - {file = "numpy-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:fbd6acc766814ea6443628f4e6751d0da6593dae29c08c0b2606164db026970c"}, - {file = "numpy-2.0.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:354f373279768fa5a584bac997de6a6c9bc535c482592d7a813bb0c09be6c76f"}, - {file = "numpy-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4d2f62e55a4cd9c58c1d9a1c9edaedcd857a73cb6fda875bf79093f9d9086f85"}, - {file = "numpy-2.0.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:1e72728e7501a450288fc8e1f9ebc73d90cfd4671ebbd631f3e7857c39bd16f2"}, - {file = "numpy-2.0.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:84554fc53daa8f6abf8e8a66e076aff6ece62de68523d9f665f32d2fc50fd66e"}, - {file = "numpy-2.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c73aafd1afca80afecb22718f8700b40ac7cab927b8abab3c3e337d70e10e5a2"}, - {file = "numpy-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49d9f7d256fbc804391a7f72d4a617302b1afac1112fac19b6c6cec63fe7fe8a"}, - {file = "numpy-2.0.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0ec84b9ba0654f3b962802edc91424331f423dcf5d5f926676e0150789cb3d95"}, - {file = "numpy-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:feff59f27338135776f6d4e2ec7aeeac5d5f7a08a83e80869121ef8164b74af9"}, - {file = "numpy-2.0.0-cp312-cp312-win32.whl", hash = "sha256:c5a59996dc61835133b56a32ebe4ef3740ea5bc19b3983ac60cc32be5a665d54"}, - {file = "numpy-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:a356364941fb0593bb899a1076b92dfa2029f6f5b8ba88a14fd0984aaf76d0df"}, - {file = "numpy-2.0.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e61155fae27570692ad1d327e81c6cf27d535a5d7ef97648a17d922224b216de"}, - {file = "numpy-2.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4554eb96f0fd263041baf16cf0881b3f5dafae7a59b1049acb9540c4d57bc8cb"}, - {file = "numpy-2.0.0-cp39-cp39-macosx_14_0_arm64.whl", hash = "sha256:903703372d46bce88b6920a0cd86c3ad82dae2dbef157b5fc01b70ea1cfc430f"}, - {file = "numpy-2.0.0-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:3e8e01233d57639b2e30966c63d36fcea099d17c53bf424d77f088b0f4babd86"}, - {file = "numpy-2.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cde1753efe513705a0c6d28f5884e22bdc30438bf0085c5c486cdaff40cd67a"}, - {file = "numpy-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:821eedb7165ead9eebdb569986968b541f9908979c2da8a4967ecac4439bae3d"}, - {file = "numpy-2.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9a1712c015831da583b21c5bfe15e8684137097969c6d22e8316ba66b5baabe4"}, - {file = "numpy-2.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9c27f0946a3536403efb0e1c28def1ae6730a72cd0d5878db38824855e3afc44"}, - {file = "numpy-2.0.0-cp39-cp39-win32.whl", hash = "sha256:63b92c512d9dbcc37f9d81b123dec99fdb318ba38c8059afc78086fe73820275"}, - {file = "numpy-2.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:3f6bed7f840d44c08ebdb73b1825282b801799e325bcbdfa6bc5c370e5aecc65"}, - {file = "numpy-2.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9416a5c2e92ace094e9f0082c5fd473502c91651fb896bc17690d6fc475128d6"}, - {file = "numpy-2.0.0-pp39-pypy39_pp73-macosx_14_0_x86_64.whl", hash = "sha256:17067d097ed036636fa79f6a869ac26df7db1ba22039d962422506640314933a"}, - {file = "numpy-2.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38ecb5b0582cd125f67a629072fed6f83562d9dd04d7e03256c9829bdec027ad"}, - {file = "numpy-2.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:cef04d068f5fb0518a77857953193b6bb94809a806bd0a14983a8f12ada060c9"}, - {file = "numpy-2.0.0.tar.gz", hash = "sha256:cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864"}, + {file = "numpy-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0fbb536eac80e27a2793ffd787895242b7f18ef792563d742c2d673bfcb75134"}, + {file = "numpy-2.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:69ff563d43c69b1baba77af455dd0a839df8d25e8590e79c90fcbe1499ebde42"}, + {file = "numpy-2.0.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:1b902ce0e0a5bb7704556a217c4f63a7974f8f43e090aff03fcf262e0b135e02"}, + {file = "numpy-2.0.1-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:f1659887361a7151f89e79b276ed8dff3d75877df906328f14d8bb40bb4f5101"}, + {file = "numpy-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4658c398d65d1b25e1760de3157011a80375da861709abd7cef3bad65d6543f9"}, + {file = "numpy-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4127d4303b9ac9f94ca0441138acead39928938660ca58329fe156f84b9f3015"}, + {file = "numpy-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e5eeca8067ad04bc8a2a8731183d51d7cbaac66d86085d5f4766ee6bf19c7f87"}, + {file = "numpy-2.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9adbd9bb520c866e1bfd7e10e1880a1f7749f1f6e5017686a5fbb9b72cf69f82"}, + {file = "numpy-2.0.1-cp310-cp310-win32.whl", hash = "sha256:7b9853803278db3bdcc6cd5beca37815b133e9e77ff3d4733c247414e78eb8d1"}, + {file = "numpy-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:81b0893a39bc5b865b8bf89e9ad7807e16717f19868e9d234bdaf9b1f1393868"}, + {file = "numpy-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:75b4e316c5902d8163ef9d423b1c3f2f6252226d1aa5cd8a0a03a7d01ffc6268"}, + {file = "numpy-2.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6e4eeb6eb2fced786e32e6d8df9e755ce5be920d17f7ce00bc38fcde8ccdbf9e"}, + {file = "numpy-2.0.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:a1e01dcaab205fbece13c1410253a9eea1b1c9b61d237b6fa59bcc46e8e89343"}, + {file = "numpy-2.0.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:a8fc2de81ad835d999113ddf87d1ea2b0f4704cbd947c948d2f5513deafe5a7b"}, + {file = "numpy-2.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a3d94942c331dd4e0e1147f7a8699a4aa47dffc11bf8a1523c12af8b2e91bbe"}, + {file = "numpy-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15eb4eca47d36ec3f78cde0a3a2ee24cf05ca7396ef808dda2c0ddad7c2bde67"}, + {file = "numpy-2.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:b83e16a5511d1b1f8a88cbabb1a6f6a499f82c062a4251892d9ad5d609863fb7"}, + {file = "numpy-2.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1f87fec1f9bc1efd23f4227becff04bd0e979e23ca50cc92ec88b38489db3b55"}, + {file = "numpy-2.0.1-cp311-cp311-win32.whl", hash = "sha256:36d3a9405fd7c511804dc56fc32974fa5533bdeb3cd1604d6b8ff1d292b819c4"}, + {file = "numpy-2.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:08458fbf403bff5e2b45f08eda195d4b0c9b35682311da5a5a0a0925b11b9bd8"}, + {file = "numpy-2.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6bf4e6f4a2a2e26655717a1983ef6324f2664d7011f6ef7482e8c0b3d51e82ac"}, + {file = "numpy-2.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6fddc5fe258d3328cd8e3d7d3e02234c5d70e01ebe377a6ab92adb14039cb4"}, + {file = "numpy-2.0.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:5daab361be6ddeb299a918a7c0864fa8618af66019138263247af405018b04e1"}, + {file = "numpy-2.0.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:ea2326a4dca88e4a274ba3a4405eb6c6467d3ffbd8c7d38632502eaae3820587"}, + {file = "numpy-2.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:529af13c5f4b7a932fb0e1911d3a75da204eff023ee5e0e79c1751564221a5c8"}, + {file = "numpy-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6790654cb13eab303d8402354fabd47472b24635700f631f041bd0b65e37298a"}, + {file = "numpy-2.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:cbab9fc9c391700e3e1287666dfd82d8666d10e69a6c4a09ab97574c0b7ee0a7"}, + {file = "numpy-2.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:99d0d92a5e3613c33a5f01db206a33f8fdf3d71f2912b0de1739894668b7a93b"}, + {file = "numpy-2.0.1-cp312-cp312-win32.whl", hash = "sha256:173a00b9995f73b79eb0191129f2455f1e34c203f559dd118636858cc452a1bf"}, + {file = "numpy-2.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:bb2124fdc6e62baae159ebcfa368708867eb56806804d005860b6007388df171"}, + {file = "numpy-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bfc085b28d62ff4009364e7ca34b80a9a080cbd97c2c0630bb5f7f770dae9414"}, + {file = "numpy-2.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8fae4ebbf95a179c1156fab0b142b74e4ba4204c87bde8d3d8b6f9c34c5825ef"}, + {file = "numpy-2.0.1-cp39-cp39-macosx_14_0_arm64.whl", hash = "sha256:72dc22e9ec8f6eaa206deb1b1355eb2e253899d7347f5e2fae5f0af613741d06"}, + {file = "numpy-2.0.1-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:ec87f5f8aca726117a1c9b7083e7656a9d0d606eec7299cc067bb83d26f16e0c"}, + {file = "numpy-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f682ea61a88479d9498bf2091fdcd722b090724b08b31d63e022adc063bad59"}, + {file = "numpy-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8efc84f01c1cd7e34b3fb310183e72fcdf55293ee736d679b6d35b35d80bba26"}, + {file = "numpy-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3fdabe3e2a52bc4eff8dc7a5044342f8bd9f11ef0934fcd3289a788c0eb10018"}, + {file = "numpy-2.0.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:24a0e1befbfa14615b49ba9659d3d8818a0f4d8a1c5822af8696706fbda7310c"}, + {file = "numpy-2.0.1-cp39-cp39-win32.whl", hash = "sha256:f9cf5ea551aec449206954b075db819f52adc1638d46a6738253a712d553c7b4"}, + {file = "numpy-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:e9e81fa9017eaa416c056e5d9e71be93d05e2c3c2ab308d23307a8bc4443c368"}, + {file = "numpy-2.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:61728fba1e464f789b11deb78a57805c70b2ed02343560456190d0501ba37b0f"}, + {file = "numpy-2.0.1-pp39-pypy39_pp73-macosx_14_0_x86_64.whl", hash = "sha256:12f5d865d60fb9734e60a60f1d5afa6d962d8d4467c120a1c0cda6eb2964437d"}, + {file = "numpy-2.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eacf3291e263d5a67d8c1a581a8ebbcfd6447204ef58828caf69a5e3e8c75990"}, + {file = "numpy-2.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2c3a346ae20cfd80b6cfd3e60dc179963ef2ea58da5ec074fd3d9e7a1e7ba97f"}, + {file = "numpy-2.0.1.tar.gz", hash = "sha256:485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3"}, +] + +[[package]] +name = "numpy" +version = "2.1.0" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = ">=3.10" +files = [ + {file = "numpy-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6326ab99b52fafdcdeccf602d6286191a79fe2fda0ae90573c5814cd2b0bc1b8"}, + {file = "numpy-2.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0937e54c09f7a9a68da6889362ddd2ff584c02d015ec92672c099b61555f8911"}, + {file = "numpy-2.1.0-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:30014b234f07b5fec20f4146f69e13cfb1e33ee9a18a1879a0142fbb00d47673"}, + {file = "numpy-2.1.0-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:899da829b362ade41e1e7eccad2cf274035e1cb36ba73034946fccd4afd8606b"}, + {file = "numpy-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:08801848a40aea24ce16c2ecde3b756f9ad756586fb2d13210939eb69b023f5b"}, + {file = "numpy-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:398049e237d1aae53d82a416dade04defed1a47f87d18d5bd615b6e7d7e41d1f"}, + {file = "numpy-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0abb3916a35d9090088a748636b2c06dc9a6542f99cd476979fb156a18192b84"}, + {file = "numpy-2.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:10e2350aea18d04832319aac0f887d5fcec1b36abd485d14f173e3e900b83e33"}, + {file = "numpy-2.1.0-cp310-cp310-win32.whl", hash = "sha256:f6b26e6c3b98adb648243670fddc8cab6ae17473f9dc58c51574af3e64d61211"}, + {file = "numpy-2.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:f505264735ee074250a9c78247ee8618292091d9d1fcc023290e9ac67e8f1afa"}, + {file = "numpy-2.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:76368c788ccb4f4782cf9c842b316140142b4cbf22ff8db82724e82fe1205dce"}, + {file = "numpy-2.1.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:f8e93a01a35be08d31ae33021e5268f157a2d60ebd643cfc15de6ab8e4722eb1"}, + {file = "numpy-2.1.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:9523f8b46485db6939bd069b28b642fec86c30909cea90ef550373787f79530e"}, + {file = "numpy-2.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54139e0eb219f52f60656d163cbe67c31ede51d13236c950145473504fa208cb"}, + {file = "numpy-2.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5ebbf9fbdabed208d4ecd2e1dfd2c0741af2f876e7ae522c2537d404ca895c3"}, + {file = "numpy-2.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:378cb4f24c7d93066ee4103204f73ed046eb88f9ad5bb2275bb9fa0f6a02bd36"}, + {file = "numpy-2.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8f699a709120b220dfe173f79c73cb2a2cab2c0b88dd59d7b49407d032b8ebd"}, + {file = "numpy-2.1.0-cp311-cp311-win32.whl", hash = "sha256:ffbd6faeb190aaf2b5e9024bac9622d2ee549b7ec89ef3a9373fa35313d44e0e"}, + {file = "numpy-2.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:0af3a5987f59d9c529c022c8c2a64805b339b7ef506509fba7d0556649b9714b"}, + {file = "numpy-2.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fe76d75b345dc045acdbc006adcb197cc680754afd6c259de60d358d60c93736"}, + {file = "numpy-2.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f358ea9e47eb3c2d6eba121ab512dfff38a88db719c38d1e67349af210bc7529"}, + {file = "numpy-2.1.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:dd94ce596bda40a9618324547cfaaf6650b1a24f5390350142499aa4e34e53d1"}, + {file = "numpy-2.1.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:b47c551c6724960479cefd7353656498b86e7232429e3a41ab83be4da1b109e8"}, + {file = "numpy-2.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0756a179afa766ad7cb6f036de622e8a8f16ffdd55aa31f296c870b5679d745"}, + {file = "numpy-2.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24003ba8ff22ea29a8c306e61d316ac74111cebf942afbf692df65509a05f111"}, + {file = "numpy-2.1.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b34fa5e3b5d6dc7e0a4243fa0f81367027cb6f4a7215a17852979634b5544ee0"}, + {file = "numpy-2.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c4f982715e65036c34897eb598d64aef15150c447be2cfc6643ec7a11af06574"}, + {file = "numpy-2.1.0-cp312-cp312-win32.whl", hash = "sha256:c4cd94dfefbefec3f8b544f61286584292d740e6e9d4677769bc76b8f41deb02"}, + {file = "numpy-2.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0cdef204199278f5c461a0bed6ed2e052998276e6d8ab2963d5b5c39a0500bc"}, + {file = "numpy-2.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8ab81ccd753859ab89e67199b9da62c543850f819993761c1e94a75a814ed667"}, + {file = "numpy-2.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:442596f01913656d579309edcd179a2a2f9977d9a14ff41d042475280fc7f34e"}, + {file = "numpy-2.1.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:848c6b5cad9898e4b9ef251b6f934fa34630371f2e916261070a4eb9092ffd33"}, + {file = "numpy-2.1.0-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:54c6a63e9d81efe64bfb7bcb0ec64332a87d0b87575f6009c8ba67ea6374770b"}, + {file = "numpy-2.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:652e92fc409e278abdd61e9505649e3938f6d04ce7ef1953f2ec598a50e7c195"}, + {file = "numpy-2.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ab32eb9170bf8ffcbb14f11613f4a0b108d3ffee0832457c5d4808233ba8977"}, + {file = "numpy-2.1.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:8fb49a0ba4d8f41198ae2d52118b050fd34dace4b8f3fb0ee34e23eb4ae775b1"}, + {file = "numpy-2.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:44e44973262dc3ae79e9063a1284a73e09d01b894b534a769732ccd46c28cc62"}, + {file = "numpy-2.1.0-cp313-cp313-win32.whl", hash = "sha256:ab83adc099ec62e044b1fbb3a05499fa1e99f6d53a1dde102b2d85eff66ed324"}, + {file = "numpy-2.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:de844aaa4815b78f6023832590d77da0e3b6805c644c33ce94a1e449f16d6ab5"}, + {file = "numpy-2.1.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:343e3e152bf5a087511cd325e3b7ecfd5b92d369e80e74c12cd87826e263ec06"}, + {file = "numpy-2.1.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f07fa2f15dabe91259828ce7d71b5ca9e2eb7c8c26baa822c825ce43552f4883"}, + {file = "numpy-2.1.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5474dad8c86ee9ba9bb776f4b99ef2d41b3b8f4e0d199d4f7304728ed34d0300"}, + {file = "numpy-2.1.0-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:1f817c71683fd1bb5cff1529a1d085a57f02ccd2ebc5cd2c566f9a01118e3b7d"}, + {file = "numpy-2.1.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a3336fbfa0d38d3deacd3fe7f3d07e13597f29c13abf4d15c3b6dc2291cbbdd"}, + {file = "numpy-2.1.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a894c51fd8c4e834f00ac742abad73fc485df1062f1b875661a3c1e1fb1c2f6"}, + {file = "numpy-2.1.0-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:9156ca1f79fc4acc226696e95bfcc2b486f165a6a59ebe22b2c1f82ab190384a"}, + {file = "numpy-2.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:624884b572dff8ca8f60fab591413f077471de64e376b17d291b19f56504b2bb"}, + {file = "numpy-2.1.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:15ef8b2177eeb7e37dd5ef4016f30b7659c57c2c0b57a779f1d537ff33a72c7b"}, + {file = "numpy-2.1.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:e5f0642cdf4636198a4990de7a71b693d824c56a757862230454629cf62e323d"}, + {file = "numpy-2.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15976718c004466406342789f31b6673776360f3b1e3c575f25302d7e789575"}, + {file = "numpy-2.1.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:6c1de77ded79fef664d5098a66810d4d27ca0224e9051906e634b3f7ead134c2"}, + {file = "numpy-2.1.0.tar.gz", hash = "sha256:7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2"}, ] [[package]] name = "outcome" version = "1.3.0.post0" description = "Capture the outcome of Python function calls." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1271,7 +1311,6 @@ attrs = ">=19.2.0" name = "packaging" version = "24.1" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1283,7 +1322,6 @@ files = [ name = "pandas" version = "1.5.3" description = "Powerful data structures for data analysis, time series, and statistics" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1328,7 +1366,6 @@ test = ["hypothesis (>=5.5.3)", "pytest (>=6.0)", "pytest-xdist (>=1.31)"] name = "pandas" version = "2.2.2" description = "Powerful data structures for data analysis, time series, and statistics" -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1400,85 +1437,95 @@ xml = ["lxml (>=4.9.2)"] [[package]] name = "pillow" -version = "10.3.0" +version = "10.4.0" description = "Python Imaging Library (Fork)" -category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45"}, - {file = "pillow-10.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf"}, - {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3"}, - {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5"}, - {file = "pillow-10.3.0-cp310-cp310-win32.whl", hash = "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2"}, - {file = "pillow-10.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f"}, - {file = "pillow-10.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b"}, - {file = "pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795"}, - {file = "pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd"}, - {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad"}, - {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c"}, - {file = "pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09"}, - {file = "pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d"}, - {file = "pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f"}, - {file = "pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84"}, - {file = "pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a"}, - {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef"}, - {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3"}, - {file = "pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d"}, - {file = "pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b"}, - {file = "pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a"}, - {file = "pillow-10.3.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b"}, - {file = "pillow-10.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd"}, - {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d"}, - {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3"}, - {file = "pillow-10.3.0-cp38-cp38-win32.whl", hash = "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b"}, - {file = "pillow-10.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999"}, - {file = "pillow-10.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936"}, - {file = "pillow-10.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8"}, - {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9"}, - {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb"}, - {file = "pillow-10.3.0-cp39-cp39-win32.whl", hash = "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572"}, - {file = "pillow-10.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb"}, - {file = "pillow-10.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591"}, - {file = "pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d"}, -] - -[package.extras] -docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] + {file = "pillow-10.4.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:4d9667937cfa347525b319ae34375c37b9ee6b525440f3ef48542fcf66f2731e"}, + {file = "pillow-10.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:543f3dc61c18dafb755773efc89aae60d06b6596a63914107f75459cf984164d"}, + {file = "pillow-10.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7928ecbf1ece13956b95d9cbcfc77137652b02763ba384d9ab508099a2eca856"}, + {file = "pillow-10.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4d49b85c4348ea0b31ea63bc75a9f3857869174e2bf17e7aba02945cd218e6f"}, + {file = "pillow-10.4.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:6c762a5b0997f5659a5ef2266abc1d8851ad7749ad9a6a5506eb23d314e4f46b"}, + {file = "pillow-10.4.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a985e028fc183bf12a77a8bbf36318db4238a3ded7fa9df1b9a133f1cb79f8fc"}, + {file = "pillow-10.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:812f7342b0eee081eaec84d91423d1b4650bb9828eb53d8511bcef8ce5aecf1e"}, + {file = "pillow-10.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ac1452d2fbe4978c2eec89fb5a23b8387aba707ac72810d9490118817d9c0b46"}, + {file = "pillow-10.4.0-cp310-cp310-win32.whl", hash = "sha256:bcd5e41a859bf2e84fdc42f4edb7d9aba0a13d29a2abadccafad99de3feff984"}, + {file = "pillow-10.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:ecd85a8d3e79cd7158dec1c9e5808e821feea088e2f69a974db5edf84dc53141"}, + {file = "pillow-10.4.0-cp310-cp310-win_arm64.whl", hash = "sha256:ff337c552345e95702c5fde3158acb0625111017d0e5f24bf3acdb9cc16b90d1"}, + {file = "pillow-10.4.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:0a9ec697746f268507404647e531e92889890a087e03681a3606d9b920fbee3c"}, + {file = "pillow-10.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dfe91cb65544a1321e631e696759491ae04a2ea11d36715eca01ce07284738be"}, + {file = "pillow-10.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5dc6761a6efc781e6a1544206f22c80c3af4c8cf461206d46a1e6006e4429ff3"}, + {file = "pillow-10.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e84b6cc6a4a3d76c153a6b19270b3526a5a8ed6b09501d3af891daa2a9de7d6"}, + {file = "pillow-10.4.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:bbc527b519bd3aa9d7f429d152fea69f9ad37c95f0b02aebddff592688998abe"}, + {file = "pillow-10.4.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:76a911dfe51a36041f2e756b00f96ed84677cdeb75d25c767f296c1c1eda1319"}, + {file = "pillow-10.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:59291fb29317122398786c2d44427bbd1a6d7ff54017075b22be9d21aa59bd8d"}, + {file = "pillow-10.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:416d3a5d0e8cfe4f27f574362435bc9bae57f679a7158e0096ad2beb427b8696"}, + {file = "pillow-10.4.0-cp311-cp311-win32.whl", hash = "sha256:7086cc1d5eebb91ad24ded9f58bec6c688e9f0ed7eb3dbbf1e4800280a896496"}, + {file = "pillow-10.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cbed61494057c0f83b83eb3a310f0bf774b09513307c434d4366ed64f4128a91"}, + {file = "pillow-10.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:f5f0c3e969c8f12dd2bb7e0b15d5c468b51e5017e01e2e867335c81903046a22"}, + {file = "pillow-10.4.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:673655af3eadf4df6b5457033f086e90299fdd7a47983a13827acf7459c15d94"}, + {file = "pillow-10.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:866b6942a92f56300012f5fbac71f2d610312ee65e22f1aa2609e491284e5597"}, + {file = "pillow-10.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29dbdc4207642ea6aad70fbde1a9338753d33fb23ed6956e706936706f52dd80"}, + {file = "pillow-10.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf2342ac639c4cf38799a44950bbc2dfcb685f052b9e262f446482afaf4bffca"}, + {file = "pillow-10.4.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:f5b92f4d70791b4a67157321c4e8225d60b119c5cc9aee8ecf153aace4aad4ef"}, + {file = "pillow-10.4.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:86dcb5a1eb778d8b25659d5e4341269e8590ad6b4e8b44d9f4b07f8d136c414a"}, + {file = "pillow-10.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:780c072c2e11c9b2c7ca37f9a2ee8ba66f44367ac3e5c7832afcfe5104fd6d1b"}, + {file = "pillow-10.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:37fb69d905be665f68f28a8bba3c6d3223c8efe1edf14cc4cfa06c241f8c81d9"}, + {file = "pillow-10.4.0-cp312-cp312-win32.whl", hash = "sha256:7dfecdbad5c301d7b5bde160150b4db4c659cee2b69589705b6f8a0c509d9f42"}, + {file = "pillow-10.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:1d846aea995ad352d4bdcc847535bd56e0fd88d36829d2c90be880ef1ee4668a"}, + {file = "pillow-10.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:e553cad5179a66ba15bb18b353a19020e73a7921296a7979c4a2b7f6a5cd57f9"}, + {file = "pillow-10.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8bc1a764ed8c957a2e9cacf97c8b2b053b70307cf2996aafd70e91a082e70df3"}, + {file = "pillow-10.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6209bb41dc692ddfee4942517c19ee81b86c864b626dbfca272ec0f7cff5d9fb"}, + {file = "pillow-10.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bee197b30783295d2eb680b311af15a20a8b24024a19c3a26431ff83eb8d1f70"}, + {file = "pillow-10.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ef61f5dd14c300786318482456481463b9d6b91ebe5ef12f405afbba77ed0be"}, + {file = "pillow-10.4.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:297e388da6e248c98bc4a02e018966af0c5f92dfacf5a5ca22fa01cb3179bca0"}, + {file = "pillow-10.4.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:e4db64794ccdf6cb83a59d73405f63adbe2a1887012e308828596100a0b2f6cc"}, + {file = "pillow-10.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bd2880a07482090a3bcb01f4265f1936a903d70bc740bfcb1fd4e8a2ffe5cf5a"}, + {file = "pillow-10.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4b35b21b819ac1dbd1233317adeecd63495f6babf21b7b2512d244ff6c6ce309"}, + {file = "pillow-10.4.0-cp313-cp313-win32.whl", hash = "sha256:551d3fd6e9dc15e4c1eb6fc4ba2b39c0c7933fa113b220057a34f4bb3268a060"}, + {file = "pillow-10.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:030abdbe43ee02e0de642aee345efa443740aa4d828bfe8e2eb11922ea6a21ea"}, + {file = "pillow-10.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:5b001114dd152cfd6b23befeb28d7aee43553e2402c9f159807bf55f33af8a8d"}, + {file = "pillow-10.4.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:8d4d5063501b6dd4024b8ac2f04962d661222d120381272deea52e3fc52d3736"}, + {file = "pillow-10.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7c1ee6f42250df403c5f103cbd2768a28fe1a0ea1f0f03fe151c8741e1469c8b"}, + {file = "pillow-10.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b15e02e9bb4c21e39876698abf233c8c579127986f8207200bc8a8f6bb27acf2"}, + {file = "pillow-10.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a8d4bade9952ea9a77d0c3e49cbd8b2890a399422258a77f357b9cc9be8d680"}, + {file = "pillow-10.4.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:43efea75eb06b95d1631cb784aa40156177bf9dd5b4b03ff38979e048258bc6b"}, + {file = "pillow-10.4.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:950be4d8ba92aca4b2bb0741285a46bfae3ca699ef913ec8416c1b78eadd64cd"}, + {file = "pillow-10.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d7480af14364494365e89d6fddc510a13e5a2c3584cb19ef65415ca57252fb84"}, + {file = "pillow-10.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:73664fe514b34c8f02452ffb73b7a92c6774e39a647087f83d67f010eb9a0cf0"}, + {file = "pillow-10.4.0-cp38-cp38-win32.whl", hash = "sha256:e88d5e6ad0d026fba7bdab8c3f225a69f063f116462c49892b0149e21b6c0a0e"}, + {file = "pillow-10.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:5161eef006d335e46895297f642341111945e2c1c899eb406882a6c61a4357ab"}, + {file = "pillow-10.4.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:0ae24a547e8b711ccaaf99c9ae3cd975470e1a30caa80a6aaee9a2f19c05701d"}, + {file = "pillow-10.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:298478fe4f77a4408895605f3482b6cc6222c018b2ce565c2b6b9c354ac3229b"}, + {file = "pillow-10.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:134ace6dc392116566980ee7436477d844520a26a4b1bd4053f6f47d096997fd"}, + {file = "pillow-10.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:930044bb7679ab003b14023138b50181899da3f25de50e9dbee23b61b4de2126"}, + {file = "pillow-10.4.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:c76e5786951e72ed3686e122d14c5d7012f16c8303a674d18cdcd6d89557fc5b"}, + {file = "pillow-10.4.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b2724fdb354a868ddf9a880cb84d102da914e99119211ef7ecbdc613b8c96b3c"}, + {file = "pillow-10.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dbc6ae66518ab3c5847659e9988c3b60dc94ffb48ef9168656e0019a93dbf8a1"}, + {file = "pillow-10.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:06b2f7898047ae93fad74467ec3d28fe84f7831370e3c258afa533f81ef7f3df"}, + {file = "pillow-10.4.0-cp39-cp39-win32.whl", hash = "sha256:7970285ab628a3779aecc35823296a7869f889b8329c16ad5a71e4901a3dc4ef"}, + {file = "pillow-10.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:961a7293b2457b405967af9c77dcaa43cc1a8cd50d23c532e62d48ab6cdd56f5"}, + {file = "pillow-10.4.0-cp39-cp39-win_arm64.whl", hash = "sha256:32cda9e3d601a52baccb2856b8ea1fc213c90b340c542dcef77140dfa3278a9e"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5b4815f2e65b30f5fbae9dfffa8636d992d49705723fe86a3661806e069352d4"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8f0aef4ef59694b12cadee839e2ba6afeab89c0f39a3adc02ed51d109117b8da"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f4727572e2918acaa9077c919cbbeb73bd2b3ebcfe033b72f858fc9fbef0026"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff25afb18123cea58a591ea0244b92eb1e61a1fd497bf6d6384f09bc3262ec3e"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dc3e2db6ba09ffd7d02ae9141cfa0ae23393ee7687248d46a7507b75d610f4f5"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:02a2be69f9c9b8c1e97cf2713e789d4e398c751ecfd9967c18d0ce304efbf885"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0755ffd4a0c6f267cccbae2e9903d95477ca2f77c4fcf3a3a09570001856c8a5"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a02364621fe369e06200d4a16558e056fe2805d3468350df3aef21e00d26214b"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:1b5dea9831a90e9d0721ec417a80d4cbd7022093ac38a568db2dd78363b00908"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b885f89040bb8c4a1573566bbb2f44f5c505ef6e74cec7ab9068c900047f04b"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87dd88ded2e6d74d31e1e0a99a726a6765cda32d00ba72dc37f0651f306daaa8"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:2db98790afc70118bd0255c2eeb465e9767ecf1f3c25f9a1abb8ffc8cfd1fe0a"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f7baece4ce06bade126fb84b8af1c33439a76d8a6fd818970215e0560ca28c27"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:cfdd747216947628af7b259d274771d84db2268ca062dd5faf373639d00113a3"}, + {file = "pillow-10.4.0.tar.gz", hash = "sha256:166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06"}, +] + +[package.extras] +docs = ["furo", "olefile", "sphinx (>=7.3)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinxext-opengraph"] fpx = ["olefile"] mic = ["olefile"] tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] @@ -1487,21 +1534,19 @@ xmp = ["defusedxml"] [[package]] name = "pip" -version = "24.1.1" +version = "24.2" description = "The PyPA recommended tool for installing Python packages." -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "pip-24.1.1-py3-none-any.whl", hash = "sha256:efca15145a95e95c00608afeab66311d40bfb73bb2266a855befd705e6bb15a0"}, - {file = "pip-24.1.1.tar.gz", hash = "sha256:5aa64f65e1952733ee0a9a9b1f52496ebdb3f3077cc46f80a16d983b58d1180a"}, + {file = "pip-24.2-py3-none-any.whl", hash = "sha256:2cd581cf58ab7fcfca4ce8efa6dcacd0de5bf8d0a3eb9ec927e07405f4d9e2a2"}, + {file = "pip-24.2.tar.gz", hash = "sha256:5b5e490b5e9cb275c879595064adce9ebd31b854e3e803740b72f9ccf34a45b8"}, ] [[package]] name = "pipdeptree" version = "2.16.2" description = "Command line utility to show dependency tree of packages." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1520,7 +1565,6 @@ test = ["covdefaults (>=2.3)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pyte name = "pkginfo" version = "1.10.0" description = "Query metadata from sdists / bdists / installed packages." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1535,7 +1579,6 @@ testing = ["pytest", "pytest-cov", "wheel"] name = "platformdirs" version = "4.2.2" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1550,14 +1593,13 @@ type = ["mypy (>=1.8)"] [[package]] name = "plotly" -version = "5.22.0" +version = "5.23.0" description = "An open-source, interactive data visualization library for Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "plotly-5.22.0-py3-none-any.whl", hash = "sha256:68fc1901f098daeb233cc3dd44ec9dc31fb3ca4f4e53189344199c43496ed006"}, - {file = "plotly-5.22.0.tar.gz", hash = "sha256:859fdadbd86b5770ae2466e542b761b247d1c6b49daed765b95bb8c7063e7469"}, + {file = "plotly-5.23.0-py3-none-any.whl", hash = "sha256:76cbe78f75eddc10c56f5a4ee3e7ccaade7c0a57465546f02098c0caed6c2d1a"}, + {file = "plotly-5.23.0.tar.gz", hash = "sha256:89e57d003a116303a34de6700862391367dd564222ab71f8531df70279fc0193"}, ] [package.dependencies] @@ -1568,7 +1610,6 @@ tenacity = ">=6.2.0" name = "pluggy" version = "1.5.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1584,7 +1625,6 @@ testing = ["pytest", "pytest-benchmark"] name = "pre-commit" version = "3.5.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1603,7 +1643,6 @@ virtualenv = ">=20.10.0" name = "psutil" version = "6.0.0" description = "Cross-platform lib for process and system monitoring in Python." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ @@ -1633,7 +1672,6 @@ test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] name = "py-cpuinfo" version = "9.0.0" description = "Get CPU info with pure Python" -category = "dev" optional = false python-versions = "*" files = [ @@ -1645,7 +1683,6 @@ files = [ name = "pycparser" version = "2.22" description = "C parser in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1655,111 +1692,122 @@ files = [ [[package]] name = "pydantic" -version = "2.7.4" +version = "2.8.2" description = "Data validation using Python type hints" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.7.4-py3-none-any.whl", hash = "sha256:ee8538d41ccb9c0a9ad3e0e5f07bf15ed8015b481ced539a1759d8cc89ae90d0"}, - {file = "pydantic-2.7.4.tar.gz", hash = "sha256:0c84efd9548d545f63ac0060c1e4d39bb9b14db8b3c0652338aecc07b5adec52"}, + {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"}, + {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.18.4" -typing-extensions = ">=4.6.1" +pydantic-core = "2.20.1" +typing-extensions = [ + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, +] [package.extras] email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.18.4" +version = "2.20.1" description = "Core functionality for Pydantic validation and serialization" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.18.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:f76d0ad001edd426b92233d45c746fd08f467d56100fd8f30e9ace4b005266e4"}, - {file = "pydantic_core-2.18.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:59ff3e89f4eaf14050c8022011862df275b552caef8082e37b542b066ce1ff26"}, - {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a55b5b16c839df1070bc113c1f7f94a0af4433fcfa1b41799ce7606e5c79ce0a"}, - {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4d0dcc59664fcb8974b356fe0a18a672d6d7cf9f54746c05f43275fc48636851"}, - {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8951eee36c57cd128f779e641e21eb40bc5073eb28b2d23f33eb0ef14ffb3f5d"}, - {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4701b19f7e3a06ea655513f7938de6f108123bf7c86bbebb1196eb9bd35cf724"}, - {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e00a3f196329e08e43d99b79b286d60ce46bed10f2280d25a1718399457e06be"}, - {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:97736815b9cc893b2b7f663628e63f436018b75f44854c8027040e05230eeddb"}, - {file = "pydantic_core-2.18.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6891a2ae0e8692679c07728819b6e2b822fb30ca7445f67bbf6509b25a96332c"}, - {file = "pydantic_core-2.18.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bc4ff9805858bd54d1a20efff925ccd89c9d2e7cf4986144b30802bf78091c3e"}, - {file = "pydantic_core-2.18.4-cp310-none-win32.whl", hash = "sha256:1b4de2e51bbcb61fdebd0ab86ef28062704f62c82bbf4addc4e37fa4b00b7cbc"}, - {file = "pydantic_core-2.18.4-cp310-none-win_amd64.whl", hash = "sha256:6a750aec7bf431517a9fd78cb93c97b9b0c496090fee84a47a0d23668976b4b0"}, - {file = "pydantic_core-2.18.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:942ba11e7dfb66dc70f9ae66b33452f51ac7bb90676da39a7345e99ffb55402d"}, - {file = "pydantic_core-2.18.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b2ebef0e0b4454320274f5e83a41844c63438fdc874ea40a8b5b4ecb7693f1c4"}, - {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a642295cd0c8df1b86fc3dced1d067874c353a188dc8e0f744626d49e9aa51c4"}, - {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f09baa656c904807e832cf9cce799c6460c450c4ad80803517032da0cd062e2"}, - {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:98906207f29bc2c459ff64fa007afd10a8c8ac080f7e4d5beff4c97086a3dabd"}, - {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:19894b95aacfa98e7cb093cd7881a0c76f55731efad31073db4521e2b6ff5b7d"}, - {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fbbdc827fe5e42e4d196c746b890b3d72876bdbf160b0eafe9f0334525119c8"}, - {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f85d05aa0918283cf29a30b547b4df2fbb56b45b135f9e35b6807cb28bc47951"}, - {file = "pydantic_core-2.18.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e85637bc8fe81ddb73fda9e56bab24560bdddfa98aa64f87aaa4e4b6730c23d2"}, - {file = "pydantic_core-2.18.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2f5966897e5461f818e136b8451d0551a2e77259eb0f73a837027b47dc95dab9"}, - {file = "pydantic_core-2.18.4-cp311-none-win32.whl", hash = "sha256:44c7486a4228413c317952e9d89598bcdfb06399735e49e0f8df643e1ccd0558"}, - {file = "pydantic_core-2.18.4-cp311-none-win_amd64.whl", hash = "sha256:8a7164fe2005d03c64fd3b85649891cd4953a8de53107940bf272500ba8a788b"}, - {file = "pydantic_core-2.18.4-cp311-none-win_arm64.whl", hash = "sha256:4e99bc050fe65c450344421017f98298a97cefc18c53bb2f7b3531eb39bc7805"}, - {file = "pydantic_core-2.18.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:6f5c4d41b2771c730ea1c34e458e781b18cc668d194958e0112455fff4e402b2"}, - {file = "pydantic_core-2.18.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2fdf2156aa3d017fddf8aea5adfba9f777db1d6022d392b682d2a8329e087cef"}, - {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4748321b5078216070b151d5271ef3e7cc905ab170bbfd27d5c83ee3ec436695"}, - {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:847a35c4d58721c5dc3dba599878ebbdfd96784f3fb8bb2c356e123bdcd73f34"}, - {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c40d4eaad41f78e3bbda31b89edc46a3f3dc6e171bf0ecf097ff7a0ffff7cb1"}, - {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:21a5e440dbe315ab9825fcd459b8814bb92b27c974cbc23c3e8baa2b76890077"}, - {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01dd777215e2aa86dfd664daed5957704b769e726626393438f9c87690ce78c3"}, - {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4b06beb3b3f1479d32befd1f3079cc47b34fa2da62457cdf6c963393340b56e9"}, - {file = "pydantic_core-2.18.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:564d7922e4b13a16b98772441879fcdcbe82ff50daa622d681dd682175ea918c"}, - {file = "pydantic_core-2.18.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0eb2a4f660fcd8e2b1c90ad566db2b98d7f3f4717c64fe0a83e0adb39766d5b8"}, - {file = "pydantic_core-2.18.4-cp312-none-win32.whl", hash = "sha256:8b8bab4c97248095ae0c4455b5a1cd1cdd96e4e4769306ab19dda135ea4cdb07"}, - {file = "pydantic_core-2.18.4-cp312-none-win_amd64.whl", hash = "sha256:14601cdb733d741b8958224030e2bfe21a4a881fb3dd6fbb21f071cabd48fa0a"}, - {file = "pydantic_core-2.18.4-cp312-none-win_arm64.whl", hash = "sha256:c1322d7dd74713dcc157a2b7898a564ab091ca6c58302d5c7b4c07296e3fd00f"}, - {file = "pydantic_core-2.18.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:823be1deb01793da05ecb0484d6c9e20baebb39bd42b5d72636ae9cf8350dbd2"}, - {file = "pydantic_core-2.18.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ebef0dd9bf9b812bf75bda96743f2a6c5734a02092ae7f721c048d156d5fabae"}, - {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae1d6df168efb88d7d522664693607b80b4080be6750c913eefb77e34c12c71a"}, - {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f9899c94762343f2cc2fc64c13e7cae4c3cc65cdfc87dd810a31654c9b7358cc"}, - {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99457f184ad90235cfe8461c4d70ab7dd2680e28821c29eca00252ba90308c78"}, - {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18f469a3d2a2fdafe99296a87e8a4c37748b5080a26b806a707f25a902c040a8"}, - {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7cdf28938ac6b8b49ae5e92f2735056a7ba99c9b110a474473fd71185c1af5d"}, - {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:938cb21650855054dc54dfd9120a851c974f95450f00683399006aa6e8abb057"}, - {file = "pydantic_core-2.18.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:44cd83ab6a51da80fb5adbd9560e26018e2ac7826f9626bc06ca3dc074cd198b"}, - {file = "pydantic_core-2.18.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:972658f4a72d02b8abfa2581d92d59f59897d2e9f7e708fdabe922f9087773af"}, - {file = "pydantic_core-2.18.4-cp38-none-win32.whl", hash = "sha256:1d886dc848e60cb7666f771e406acae54ab279b9f1e4143babc9c2258213daa2"}, - {file = "pydantic_core-2.18.4-cp38-none-win_amd64.whl", hash = "sha256:bb4462bd43c2460774914b8525f79b00f8f407c945d50881568f294c1d9b4443"}, - {file = "pydantic_core-2.18.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:44a688331d4a4e2129140a8118479443bd6f1905231138971372fcde37e43528"}, - {file = "pydantic_core-2.18.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a2fdd81edd64342c85ac7cf2753ccae0b79bf2dfa063785503cb85a7d3593223"}, - {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:86110d7e1907ab36691f80b33eb2da87d780f4739ae773e5fc83fb272f88825f"}, - {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:46387e38bd641b3ee5ce247563b60c5ca098da9c56c75c157a05eaa0933ed154"}, - {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:123c3cec203e3f5ac7b000bd82235f1a3eced8665b63d18be751f115588fea30"}, - {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dc1803ac5c32ec324c5261c7209e8f8ce88e83254c4e1aebdc8b0a39f9ddb443"}, - {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53db086f9f6ab2b4061958d9c276d1dbe3690e8dd727d6abf2321d6cce37fa94"}, - {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:abc267fa9837245cc28ea6929f19fa335f3dc330a35d2e45509b6566dc18be23"}, - {file = "pydantic_core-2.18.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a0d829524aaefdebccb869eed855e2d04c21d2d7479b6cada7ace5448416597b"}, - {file = "pydantic_core-2.18.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:509daade3b8649f80d4e5ff21aa5673e4ebe58590b25fe42fac5f0f52c6f034a"}, - {file = "pydantic_core-2.18.4-cp39-none-win32.whl", hash = "sha256:ca26a1e73c48cfc54c4a76ff78df3727b9d9f4ccc8dbee4ae3f73306a591676d"}, - {file = "pydantic_core-2.18.4-cp39-none-win_amd64.whl", hash = "sha256:c67598100338d5d985db1b3d21f3619ef392e185e71b8d52bceacc4a7771ea7e"}, - {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:574d92eac874f7f4db0ca653514d823a0d22e2354359d0759e3f6a406db5d55d"}, - {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1f4d26ceb5eb9eed4af91bebeae4b06c3fb28966ca3a8fb765208cf6b51102ab"}, - {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77450e6d20016ec41f43ca4a6c63e9fdde03f0ae3fe90e7c27bdbeaece8b1ed4"}, - {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d323a01da91851a4f17bf592faf46149c9169d68430b3146dcba2bb5e5719abc"}, - {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43d447dd2ae072a0065389092a231283f62d960030ecd27565672bd40746c507"}, - {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:578e24f761f3b425834f297b9935e1ce2e30f51400964ce4801002435a1b41ef"}, - {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:81b5efb2f126454586d0f40c4d834010979cb80785173d1586df845a632e4e6d"}, - {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ab86ce7c8f9bea87b9d12c7f0af71102acbf5ecbc66c17796cff45dae54ef9a5"}, - {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:90afc12421df2b1b4dcc975f814e21bc1754640d502a2fbcc6d41e77af5ec312"}, - {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:51991a89639a912c17bef4b45c87bd83593aee0437d8102556af4885811d59f5"}, - {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:293afe532740370aba8c060882f7d26cfd00c94cae32fd2e212a3a6e3b7bc15e"}, - {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b48ece5bde2e768197a2d0f6e925f9d7e3e826f0ad2271120f8144a9db18d5c8"}, - {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:eae237477a873ab46e8dd748e515c72c0c804fb380fbe6c85533c7de51f23a8f"}, - {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:834b5230b5dfc0c1ec37b2fda433b271cbbc0e507560b5d1588e2cc1148cf1ce"}, - {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e858ac0a25074ba4bce653f9b5d0a85b7456eaddadc0ce82d3878c22489fa4ee"}, - {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2fd41f6eff4c20778d717af1cc50eca52f5afe7805ee530a4fbd0bae284f16e9"}, - {file = "pydantic_core-2.18.4.tar.gz", hash = "sha256:ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864"}, + {file = "pydantic_core-2.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3acae97ffd19bf091c72df4d726d552c473f3576409b2a7ca36b2f535ffff4a3"}, + {file = "pydantic_core-2.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41f4c96227a67a013e7de5ff8f20fb496ce573893b7f4f2707d065907bffdbd6"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f239eb799a2081495ea659d8d4a43a8f42cd1fe9ff2e7e436295c38a10c286a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53e431da3fc53360db73eedf6f7124d1076e1b4ee4276b36fb25514544ceb4a3"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1f62b2413c3a0e846c3b838b2ecd6c7a19ec6793b2a522745b0869e37ab5bc1"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d41e6daee2813ecceea8eda38062d69e280b39df793f5a942fa515b8ed67953"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d482efec8b7dc6bfaedc0f166b2ce349df0011f5d2f1f25537ced4cfc34fd98"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e93e1a4b4b33daed65d781a57a522ff153dcf748dee70b40c7258c5861e1768a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7c4ea22b6739b162c9ecaaa41d718dfad48a244909fe7ef4b54c0b530effc5a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4f2790949cf385d985a31984907fecb3896999329103df4e4983a4a41e13e840"}, + {file = "pydantic_core-2.20.1-cp310-none-win32.whl", hash = "sha256:5e999ba8dd90e93d57410c5e67ebb67ffcaadcea0ad973240fdfd3a135506250"}, + {file = "pydantic_core-2.20.1-cp310-none-win_amd64.whl", hash = "sha256:512ecfbefef6dac7bc5eaaf46177b2de58cdf7acac8793fe033b24ece0b9566c"}, + {file = "pydantic_core-2.20.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d2a8fa9d6d6f891f3deec72f5cc668e6f66b188ab14bb1ab52422fe8e644f312"}, + {file = "pydantic_core-2.20.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:175873691124f3d0da55aeea1d90660a6ea7a3cfea137c38afa0a5ffabe37b88"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37eee5b638f0e0dcd18d21f59b679686bbd18917b87db0193ae36f9c23c355fc"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25e9185e2d06c16ee438ed39bf62935ec436474a6ac4f9358524220f1b236e43"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:150906b40ff188a3260cbee25380e7494ee85048584998c1e66df0c7a11c17a6"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ad4aeb3e9a97286573c03df758fc7627aecdd02f1da04516a86dc159bf70121"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3f3ed29cd9f978c604708511a1f9c2fdcb6c38b9aae36a51905b8811ee5cbf1"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0dae11d8f5ded51699c74d9548dcc5938e0804cc8298ec0aa0da95c21fff57b"}, + {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:faa6b09ee09433b87992fb5a2859efd1c264ddc37280d2dd5db502126d0e7f27"}, + {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9dc1b507c12eb0481d071f3c1808f0529ad41dc415d0ca11f7ebfc666e66a18b"}, + {file = "pydantic_core-2.20.1-cp311-none-win32.whl", hash = "sha256:fa2fddcb7107e0d1808086ca306dcade7df60a13a6c347a7acf1ec139aa6789a"}, + {file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"}, + {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"}, + {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"}, + {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"}, + {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"}, + {file = "pydantic_core-2.20.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:4745f4ac52cc6686390c40eaa01d48b18997cb130833154801a442323cc78f91"}, + {file = "pydantic_core-2.20.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8ad4c766d3f33ba8fd692f9aa297c9058970530a32c728a2c4bfd2616d3358b"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41e81317dd6a0127cabce83c0c9c3fbecceae981c8391e6f1dec88a77c8a569a"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaad4ff2de1c3823fddf82f41121bdf453d922e9a238642b1dedb33c4e4f98ad"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ab812fa0c845df815e506be30337e2df27e88399b985d0bb4e3ecfe72df31c"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5ebac750d9d5f2706654c638c041635c385596caf68f81342011ddfa1e5598"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2aafc5a503855ea5885559eae883978c9b6d8c8993d67766ee73d82e841300dd"}, + {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4868f6bd7c9d98904b748a2653031fc9c2f85b6237009d475b1008bfaeb0a5aa"}, + {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa2f457b4af386254372dfa78a2eda2563680d982422641a85f271c859df1987"}, + {file = "pydantic_core-2.20.1-cp38-none-win32.whl", hash = "sha256:225b67a1f6d602de0ce7f6c1c3ae89a4aa25d3de9be857999e9124f15dab486a"}, + {file = "pydantic_core-2.20.1-cp38-none-win_amd64.whl", hash = "sha256:6b507132dcfc0dea440cce23ee2182c0ce7aba7054576efc65634f080dbe9434"}, + {file = "pydantic_core-2.20.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b03f7941783b4c4a26051846dea594628b38f6940a2fdc0df00b221aed39314c"}, + {file = "pydantic_core-2.20.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1eedfeb6089ed3fad42e81a67755846ad4dcc14d73698c120a82e4ccf0f1f9f6"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:635fee4e041ab9c479e31edda27fcf966ea9614fff1317e280d99eb3e5ab6fe2"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:77bf3ac639c1ff567ae3b47f8d4cc3dc20f9966a2a6dd2311dcc055d3d04fb8a"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ed1b0132f24beeec5a78b67d9388656d03e6a7c837394f99257e2d55b461611"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6514f963b023aeee506678a1cf821fe31159b925c4b76fe2afa94cc70b3222b"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d4204d8ca33146e761c79f83cc861df20e7ae9f6487ca290a97702daf56006"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d036c7187b9422ae5b262badb87a20a49eb6c5238b2004e96d4da1231badef1"}, + {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ebfef07dbe1d93efb94b4700f2d278494e9162565a54f124c404a5656d7ff09"}, + {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6b9d9bb600328a1ce523ab4f454859e9d439150abb0906c5a1983c146580ebab"}, + {file = "pydantic_core-2.20.1-cp39-none-win32.whl", hash = "sha256:784c1214cb6dd1e3b15dd8b91b9a53852aed16671cc3fbe4786f4f1db07089e2"}, + {file = "pydantic_core-2.20.1-cp39-none-win_amd64.whl", hash = "sha256:d2fe69c5434391727efa54b47a1e7986bb0186e72a41b203df8f5b0a19a4f669"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a45f84b09ac9c3d35dfcf6a27fd0634d30d183205230a0ebe8373a0e8cfa0906"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d02a72df14dfdbaf228424573a07af10637bd490f0901cee872c4f434a735b94"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2b27e6af28f07e2f195552b37d7d66b150adbaa39a6d327766ffd695799780f"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084659fac3c83fd674596612aeff6041a18402f1e1bc19ca39e417d554468482"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:242b8feb3c493ab78be289c034a1f659e8826e2233786e36f2893a950a719bb6"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:38cf1c40a921d05c5edc61a785c0ddb4bed67827069f535d794ce6bcded919fc"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e0bbdd76ce9aa5d4209d65f2b27fc6e5ef1312ae6c5333c26db3f5ade53a1e99"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:254ec27fdb5b1ee60684f91683be95e5133c994cc54e86a0b0963afa25c8f8a6"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:407653af5617f0757261ae249d3fba09504d7a71ab36ac057c938572d1bc9331"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c693e916709c2465b02ca0ad7b387c4f8423d1db7b4649c551f27a529181c5ad"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b5ff4911aea936a47d9376fd3ab17e970cc543d1b68921886e7f64bd28308d1"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177f55a886d74f1808763976ac4efd29b7ed15c69f4d838bbd74d9d09cf6fa86"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:964faa8a861d2664f0c7ab0c181af0bea66098b1919439815ca8803ef136fc4e"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4dd484681c15e6b9a977c785a345d3e378d72678fd5f1f3c0509608da24f2ac0"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f6d6cff3538391e8486a431569b77921adfcdef14eb18fbf19b7c0a5294d4e6a"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6d511cc297ff0883bc3708b465ff82d7560193169a8b93260f74ecb0a5e08a7"}, + {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"}, ] [package.dependencies] @@ -1769,7 +1817,6 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" name = "pygments" version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1784,7 +1831,6 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pyproject-hooks" version = "1.1.0" description = "Wrappers to call pyproject.toml-based build backend hooks." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1796,7 +1842,6 @@ files = [ name = "pyright" version = "1.1.334" description = "Command line wrapper for pyright" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1815,7 +1860,6 @@ dev = ["twine (>=3.4.1)"] name = "pysocks" version = "1.7.1" description = "A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1828,7 +1872,6 @@ files = [ name = "pytest" version = "7.4.4" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1851,7 +1894,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-asyncio" version = "0.21.2" description = "Pytest support for asyncio" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1870,7 +1912,6 @@ testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy name = "pytest-benchmark" version = "4.0.0" description = "A ``pytest`` fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1891,7 +1932,6 @@ histogram = ["pygal", "pygaljs"] name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1910,7 +1950,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pytest-mock" version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1928,7 +1967,6 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] name = "python-dateutil" version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1943,7 +1981,6 @@ six = ">=1.5" name = "python-engineio" version = "4.9.1" description = "Engine.IO server and client for Python" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1963,7 +2000,6 @@ docs = ["sphinx"] name = "python-multipart" version = "0.0.9" description = "A streaming multipart parser for Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1978,7 +2014,6 @@ dev = ["atomicwrites (==1.4.1)", "attrs (==23.2.0)", "coverage (==7.4.1)", "hatc name = "python-socketio" version = "5.11.3" description = "Socket.IO server and client for Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1999,7 +2034,6 @@ docs = ["sphinx"] name = "pytz" version = "2024.1" description = "World timezone definitions, modern and historical" -category = "dev" optional = false python-versions = "*" files = [ @@ -2009,71 +2043,81 @@ files = [ [[package]] name = "pywin32-ctypes" -version = "0.2.2" +version = "0.2.3" description = "A (partial) reimplementation of pywin32 using ctypes/cffi" -category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "pywin32-ctypes-0.2.2.tar.gz", hash = "sha256:3426e063bdd5fd4df74a14fa3cf80a0b42845a87e1d1e81f6549f9daec593a60"}, - {file = "pywin32_ctypes-0.2.2-py3-none-any.whl", hash = "sha256:bf490a1a709baf35d688fe0ecf980ed4de11d2b3e37b51e5442587a75d9957e7"}, + {file = "pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755"}, + {file = "pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"}, ] [[package]] name = "pyyaml" -version = "6.0.1" +version = "6.0.2" description = "YAML parser and emitter for Python" -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, - {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, - {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, - {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, - {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, - {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, - {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, - {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, + {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, + {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, + {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, + {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, + {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, + {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, + {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, + {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, + {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, + {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, + {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, + {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, + {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, + {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, + {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] [[package]] name = "readme-renderer" version = "43.0" description = "readme_renderer is a library for rendering readme descriptions for Warehouse" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2091,28 +2135,26 @@ md = ["cmarkgfm (>=0.8.0)"] [[package]] name = "redis" -version = "5.0.7" +version = "5.0.8" description = "Python client for Redis database and key-value store" -category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "redis-5.0.7-py3-none-any.whl", hash = "sha256:0e479e24da960c690be5d9b96d21f7b918a98c0cf49af3b6fafaa0753f93a0db"}, - {file = "redis-5.0.7.tar.gz", hash = "sha256:8f611490b93c8109b50adc317b31bfd84fff31def3475b92e7e80bf39f48175b"}, + {file = "redis-5.0.8-py3-none-any.whl", hash = "sha256:56134ee08ea909106090934adc36f65c9bcbbaecea5b21ba704ba6fb561f8eb4"}, + {file = "redis-5.0.8.tar.gz", hash = "sha256:0c5b10d387568dfe0698c6fad6615750c24170e548ca2deac10c649d463e9870"}, ] [package.dependencies] async-timeout = {version = ">=4.0.3", markers = "python_full_version < \"3.11.3\""} [package.extras] -hiredis = ["hiredis (>=1.0.0)"] +hiredis = ["hiredis (>1.0.0)"] ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)"] [[package]] name = "reflex-chakra" version = "0.1.1a1" description = "reflex using chakra components" -category = "main" optional = false python-versions = "<4.0,>=3.8" files = [ @@ -2127,7 +2169,6 @@ reflex = ">=0.5.9" name = "reflex-hosting-cli" version = "0.1.13" description = "Reflex Hosting CLI" -category = "main" optional = false python-versions = "<4.0,>=3.8" files = [ @@ -2151,7 +2192,6 @@ websockets = ">=10.4" name = "requests" version = "2.32.3" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2173,7 +2213,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "requests-toolbelt" version = "1.0.0" description = "A utility belt for advanced users of python-requests" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -2188,7 +2227,6 @@ requests = ">=2.0.1,<3.0.0" name = "rfc3986" version = "2.0.0" description = "Validating URI References per RFC 3986" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2203,7 +2241,6 @@ idna2008 = ["idna"] name = "rich" version = "13.7.1" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -2223,7 +2260,6 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] name = "ruff" version = "0.4.10" description = "An extremely fast Python linter and code formatter, written in Rust." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2250,7 +2286,6 @@ files = [ name = "secretstorage" version = "3.3.3" description = "Python bindings to FreeDesktop.org Secret Service API" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2264,29 +2299,27 @@ jeepney = ">=0.6" [[package]] name = "selenium" -version = "4.22.0" +version = "4.23.1" description = "Official Python bindings for Selenium WebDriver" -category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "selenium-4.22.0-py3-none-any.whl", hash = "sha256:e424991196e9857e19bf04fe5c1c0a4aac076794ff5e74615b1124e729d93104"}, - {file = "selenium-4.22.0.tar.gz", hash = "sha256:903c8c9d61b3eea6fcc9809dc7d9377e04e2ac87709876542cc8f863e482c4ce"}, + {file = "selenium-4.23.1-py3-none-any.whl", hash = "sha256:3a8d9f23dc636bd3840dd56f00c2739e32ec0c1e34a821dd553e15babef24477"}, + {file = "selenium-4.23.1.tar.gz", hash = "sha256:128d099e66284437e7128d2279176ec7a06e6ec7426e167f5d34987166bd8f46"}, ] [package.dependencies] certifi = ">=2021.10.8" trio = ">=0.17,<1.0" trio-websocket = ">=0.9,<1.0" -typing_extensions = ">=4.9.0" +typing_extensions = ">=4.9,<5.0" urllib3 = {version = ">=1.26,<3", extras = ["socks"]} -websocket-client = ">=1.8.0" +websocket-client = ">=1.8,<2.0" [[package]] name = "setuptools" version = "70.1.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2302,7 +2335,6 @@ testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metad name = "shellingham" version = "1.5.4" description = "Tool to Detect Surrounding Shell" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2314,7 +2346,6 @@ files = [ name = "simple-websocket" version = "1.0.0" description = "Simple WebSocket server and client for Python" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2332,7 +2363,6 @@ docs = ["sphinx"] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2344,7 +2374,6 @@ files = [ name = "sniffio" version = "1.3.1" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2356,7 +2385,6 @@ files = [ name = "sortedcontainers" version = "2.4.0" description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set" -category = "dev" optional = false python-versions = "*" files = [ @@ -2366,65 +2394,64 @@ files = [ [[package]] name = "sqlalchemy" -version = "2.0.31" +version = "2.0.32" description = "Database Abstraction Library" -category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "SQLAlchemy-2.0.31-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f2a213c1b699d3f5768a7272de720387ae0122f1becf0901ed6eaa1abd1baf6c"}, - {file = "SQLAlchemy-2.0.31-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9fea3d0884e82d1e33226935dac990b967bef21315cbcc894605db3441347443"}, - {file = "SQLAlchemy-2.0.31-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3ad7f221d8a69d32d197e5968d798217a4feebe30144986af71ada8c548e9fa"}, - {file = "SQLAlchemy-2.0.31-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f2bee229715b6366f86a95d497c347c22ddffa2c7c96143b59a2aa5cc9eebbc"}, - {file = "SQLAlchemy-2.0.31-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cd5b94d4819c0c89280b7c6109c7b788a576084bf0a480ae17c227b0bc41e109"}, - {file = "SQLAlchemy-2.0.31-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:750900a471d39a7eeba57580b11983030517a1f512c2cb287d5ad0fcf3aebd58"}, - {file = "SQLAlchemy-2.0.31-cp310-cp310-win32.whl", hash = "sha256:7bd112be780928c7f493c1a192cd8c5fc2a2a7b52b790bc5a84203fb4381c6be"}, - {file = "SQLAlchemy-2.0.31-cp310-cp310-win_amd64.whl", hash = "sha256:5a48ac4d359f058474fadc2115f78a5cdac9988d4f99eae44917f36aa1476327"}, - {file = "SQLAlchemy-2.0.31-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f68470edd70c3ac3b6cd5c2a22a8daf18415203ca1b036aaeb9b0fb6f54e8298"}, - {file = "SQLAlchemy-2.0.31-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e2c38c2a4c5c634fe6c3c58a789712719fa1bf9b9d6ff5ebfce9a9e5b89c1ca"}, - {file = "SQLAlchemy-2.0.31-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd15026f77420eb2b324dcb93551ad9c5f22fab2c150c286ef1dc1160f110203"}, - {file = "SQLAlchemy-2.0.31-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2196208432deebdfe3b22185d46b08f00ac9d7b01284e168c212919891289396"}, - {file = "SQLAlchemy-2.0.31-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:352b2770097f41bff6029b280c0e03b217c2dcaddc40726f8f53ed58d8a85da4"}, - {file = "SQLAlchemy-2.0.31-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:56d51ae825d20d604583f82c9527d285e9e6d14f9a5516463d9705dab20c3740"}, - {file = "SQLAlchemy-2.0.31-cp311-cp311-win32.whl", hash = "sha256:6e2622844551945db81c26a02f27d94145b561f9d4b0c39ce7bfd2fda5776dac"}, - {file = "SQLAlchemy-2.0.31-cp311-cp311-win_amd64.whl", hash = "sha256:ccaf1b0c90435b6e430f5dd30a5aede4764942a695552eb3a4ab74ed63c5b8d3"}, - {file = "SQLAlchemy-2.0.31-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3b74570d99126992d4b0f91fb87c586a574a5872651185de8297c6f90055ae42"}, - {file = "SQLAlchemy-2.0.31-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f77c4f042ad493cb8595e2f503c7a4fe44cd7bd59c7582fd6d78d7e7b8ec52c"}, - {file = "SQLAlchemy-2.0.31-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd1591329333daf94467e699e11015d9c944f44c94d2091f4ac493ced0119449"}, - {file = "SQLAlchemy-2.0.31-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:74afabeeff415e35525bf7a4ecdab015f00e06456166a2eba7590e49f8db940e"}, - {file = "SQLAlchemy-2.0.31-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b9c01990d9015df2c6f818aa8f4297d42ee71c9502026bb074e713d496e26b67"}, - {file = "SQLAlchemy-2.0.31-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:66f63278db425838b3c2b1c596654b31939427016ba030e951b292e32b99553e"}, - {file = "SQLAlchemy-2.0.31-cp312-cp312-win32.whl", hash = "sha256:0b0f658414ee4e4b8cbcd4a9bb0fd743c5eeb81fc858ca517217a8013d282c96"}, - {file = "SQLAlchemy-2.0.31-cp312-cp312-win_amd64.whl", hash = "sha256:fa4b1af3e619b5b0b435e333f3967612db06351217c58bfb50cee5f003db2a5a"}, - {file = "SQLAlchemy-2.0.31-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f43e93057cf52a227eda401251c72b6fbe4756f35fa6bfebb5d73b86881e59b0"}, - {file = "SQLAlchemy-2.0.31-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d337bf94052856d1b330d5fcad44582a30c532a2463776e1651bd3294ee7e58b"}, - {file = "SQLAlchemy-2.0.31-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c06fb43a51ccdff3b4006aafee9fcf15f63f23c580675f7734245ceb6b6a9e05"}, - {file = "SQLAlchemy-2.0.31-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:b6e22630e89f0e8c12332b2b4c282cb01cf4da0d26795b7eae16702a608e7ca1"}, - {file = "SQLAlchemy-2.0.31-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:79a40771363c5e9f3a77f0e28b3302801db08040928146e6808b5b7a40749c88"}, - {file = "SQLAlchemy-2.0.31-cp37-cp37m-win32.whl", hash = "sha256:501ff052229cb79dd4c49c402f6cb03b5a40ae4771efc8bb2bfac9f6c3d3508f"}, - {file = "SQLAlchemy-2.0.31-cp37-cp37m-win_amd64.whl", hash = "sha256:597fec37c382a5442ffd471f66ce12d07d91b281fd474289356b1a0041bdf31d"}, - {file = "SQLAlchemy-2.0.31-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:dc6d69f8829712a4fd799d2ac8d79bdeff651c2301b081fd5d3fe697bd5b4ab9"}, - {file = "SQLAlchemy-2.0.31-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:23b9fbb2f5dd9e630db70fbe47d963c7779e9c81830869bd7d137c2dc1ad05fb"}, - {file = "SQLAlchemy-2.0.31-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a21c97efcbb9f255d5c12a96ae14da873233597dfd00a3a0c4ce5b3e5e79704"}, - {file = "SQLAlchemy-2.0.31-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26a6a9837589c42b16693cf7bf836f5d42218f44d198f9343dd71d3164ceeeac"}, - {file = "SQLAlchemy-2.0.31-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc251477eae03c20fae8db9c1c23ea2ebc47331bcd73927cdcaecd02af98d3c3"}, - {file = "SQLAlchemy-2.0.31-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:2fd17e3bb8058359fa61248c52c7b09a97cf3c820e54207a50af529876451808"}, - {file = "SQLAlchemy-2.0.31-cp38-cp38-win32.whl", hash = "sha256:c76c81c52e1e08f12f4b6a07af2b96b9b15ea67ccdd40ae17019f1c373faa227"}, - {file = "SQLAlchemy-2.0.31-cp38-cp38-win_amd64.whl", hash = "sha256:4b600e9a212ed59355813becbcf282cfda5c93678e15c25a0ef896b354423238"}, - {file = "SQLAlchemy-2.0.31-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b6cf796d9fcc9b37011d3f9936189b3c8074a02a4ed0c0fbbc126772c31a6d4"}, - {file = "SQLAlchemy-2.0.31-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:78fe11dbe37d92667c2c6e74379f75746dc947ee505555a0197cfba9a6d4f1a4"}, - {file = "SQLAlchemy-2.0.31-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fc47dc6185a83c8100b37acda27658fe4dbd33b7d5e7324111f6521008ab4fe"}, - {file = "SQLAlchemy-2.0.31-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a41514c1a779e2aa9a19f67aaadeb5cbddf0b2b508843fcd7bafdf4c6864005"}, - {file = "SQLAlchemy-2.0.31-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:afb6dde6c11ea4525318e279cd93c8734b795ac8bb5dda0eedd9ebaca7fa23f1"}, - {file = "SQLAlchemy-2.0.31-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:3f9faef422cfbb8fd53716cd14ba95e2ef655400235c3dfad1b5f467ba179c8c"}, - {file = "SQLAlchemy-2.0.31-cp39-cp39-win32.whl", hash = "sha256:fc6b14e8602f59c6ba893980bea96571dd0ed83d8ebb9c4479d9ed5425d562e9"}, - {file = "SQLAlchemy-2.0.31-cp39-cp39-win_amd64.whl", hash = "sha256:3cb8a66b167b033ec72c3812ffc8441d4e9f5f78f5e31e54dcd4c90a4ca5bebc"}, - {file = "SQLAlchemy-2.0.31-py3-none-any.whl", hash = "sha256:69f3e3c08867a8e4856e92d7afb618b95cdee18e0bc1647b77599722c9a28911"}, - {file = "SQLAlchemy-2.0.31.tar.gz", hash = "sha256:b607489dd4a54de56984a0c7656247504bd5523d9d0ba799aef59d4add009484"}, + {file = "SQLAlchemy-2.0.32-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0c9045ecc2e4db59bfc97b20516dfdf8e41d910ac6fb667ebd3a79ea54084619"}, + {file = "SQLAlchemy-2.0.32-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1467940318e4a860afd546ef61fefb98a14d935cd6817ed07a228c7f7c62f389"}, + {file = "SQLAlchemy-2.0.32-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5954463675cb15db8d4b521f3566a017c8789222b8316b1e6934c811018ee08b"}, + {file = "SQLAlchemy-2.0.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:167e7497035c303ae50651b351c28dc22a40bb98fbdb8468cdc971821b1ae533"}, + {file = "SQLAlchemy-2.0.32-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b27dfb676ac02529fb6e343b3a482303f16e6bc3a4d868b73935b8792edb52d0"}, + {file = "SQLAlchemy-2.0.32-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:bf2360a5e0f7bd75fa80431bf8ebcfb920c9f885e7956c7efde89031695cafb8"}, + {file = "SQLAlchemy-2.0.32-cp310-cp310-win32.whl", hash = "sha256:306fe44e754a91cd9d600a6b070c1f2fadbb4a1a257b8781ccf33c7067fd3e4d"}, + {file = "SQLAlchemy-2.0.32-cp310-cp310-win_amd64.whl", hash = "sha256:99db65e6f3ab42e06c318f15c98f59a436f1c78179e6a6f40f529c8cc7100b22"}, + {file = "SQLAlchemy-2.0.32-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:21b053be28a8a414f2ddd401f1be8361e41032d2ef5884b2f31d31cb723e559f"}, + {file = "SQLAlchemy-2.0.32-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b178e875a7a25b5938b53b006598ee7645172fccafe1c291a706e93f48499ff5"}, + {file = "SQLAlchemy-2.0.32-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723a40ee2cc7ea653645bd4cf024326dea2076673fc9d3d33f20f6c81db83e1d"}, + {file = "SQLAlchemy-2.0.32-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:295ff8689544f7ee7e819529633d058bd458c1fd7f7e3eebd0f9268ebc56c2a0"}, + {file = "SQLAlchemy-2.0.32-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49496b68cd190a147118af585173ee624114dfb2e0297558c460ad7495f9dfe2"}, + {file = "SQLAlchemy-2.0.32-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:acd9b73c5c15f0ec5ce18128b1fe9157ddd0044abc373e6ecd5ba376a7e5d961"}, + {file = "SQLAlchemy-2.0.32-cp311-cp311-win32.whl", hash = "sha256:9365a3da32dabd3e69e06b972b1ffb0c89668994c7e8e75ce21d3e5e69ddef28"}, + {file = "SQLAlchemy-2.0.32-cp311-cp311-win_amd64.whl", hash = "sha256:8bd63d051f4f313b102a2af1cbc8b80f061bf78f3d5bd0843ff70b5859e27924"}, + {file = "SQLAlchemy-2.0.32-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6bab3db192a0c35e3c9d1560eb8332463e29e5507dbd822e29a0a3c48c0a8d92"}, + {file = "SQLAlchemy-2.0.32-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:19d98f4f58b13900d8dec4ed09dd09ef292208ee44cc9c2fe01c1f0a2fe440e9"}, + {file = "SQLAlchemy-2.0.32-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cd33c61513cb1b7371fd40cf221256456d26a56284e7d19d1f0b9f1eb7dd7e8"}, + {file = "SQLAlchemy-2.0.32-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d6ba0497c1d066dd004e0f02a92426ca2df20fac08728d03f67f6960271feec"}, + {file = "SQLAlchemy-2.0.32-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2b6be53e4fde0065524f1a0a7929b10e9280987b320716c1509478b712a7688c"}, + {file = "SQLAlchemy-2.0.32-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:916a798f62f410c0b80b63683c8061f5ebe237b0f4ad778739304253353bc1cb"}, + {file = "SQLAlchemy-2.0.32-cp312-cp312-win32.whl", hash = "sha256:31983018b74908ebc6c996a16ad3690301a23befb643093fcfe85efd292e384d"}, + {file = "SQLAlchemy-2.0.32-cp312-cp312-win_amd64.whl", hash = "sha256:4363ed245a6231f2e2957cccdda3c776265a75851f4753c60f3004b90e69bfeb"}, + {file = "SQLAlchemy-2.0.32-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b8afd5b26570bf41c35c0121801479958b4446751a3971fb9a480c1afd85558e"}, + {file = "SQLAlchemy-2.0.32-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c750987fc876813f27b60d619b987b057eb4896b81117f73bb8d9918c14f1cad"}, + {file = "SQLAlchemy-2.0.32-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ada0102afff4890f651ed91120c1120065663506b760da4e7823913ebd3258be"}, + {file = "SQLAlchemy-2.0.32-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:78c03d0f8a5ab4f3034c0e8482cfcc415a3ec6193491cfa1c643ed707d476f16"}, + {file = "SQLAlchemy-2.0.32-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:3bd1cae7519283ff525e64645ebd7a3e0283f3c038f461ecc1c7b040a0c932a1"}, + {file = "SQLAlchemy-2.0.32-cp37-cp37m-win32.whl", hash = "sha256:01438ebcdc566d58c93af0171c74ec28efe6a29184b773e378a385e6215389da"}, + {file = "SQLAlchemy-2.0.32-cp37-cp37m-win_amd64.whl", hash = "sha256:4979dc80fbbc9d2ef569e71e0896990bc94df2b9fdbd878290bd129b65ab579c"}, + {file = "SQLAlchemy-2.0.32-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c742be912f57586ac43af38b3848f7688863a403dfb220193a882ea60e1ec3a"}, + {file = "SQLAlchemy-2.0.32-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:62e23d0ac103bcf1c5555b6c88c114089587bc64d048fef5bbdb58dfd26f96da"}, + {file = "SQLAlchemy-2.0.32-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:251f0d1108aab8ea7b9aadbd07fb47fb8e3a5838dde34aa95a3349876b5a1f1d"}, + {file = "SQLAlchemy-2.0.32-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ef18a84e5116340e38eca3e7f9eeaaef62738891422e7c2a0b80feab165905f"}, + {file = "SQLAlchemy-2.0.32-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3eb6a97a1d39976f360b10ff208c73afb6a4de86dd2a6212ddf65c4a6a2347d5"}, + {file = "SQLAlchemy-2.0.32-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0c1c9b673d21477cec17ab10bc4decb1322843ba35b481585facd88203754fc5"}, + {file = "SQLAlchemy-2.0.32-cp38-cp38-win32.whl", hash = "sha256:c41a2b9ca80ee555decc605bd3c4520cc6fef9abde8fd66b1cf65126a6922d65"}, + {file = "SQLAlchemy-2.0.32-cp38-cp38-win_amd64.whl", hash = "sha256:8a37e4d265033c897892279e8adf505c8b6b4075f2b40d77afb31f7185cd6ecd"}, + {file = "SQLAlchemy-2.0.32-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:52fec964fba2ef46476312a03ec8c425956b05c20220a1a03703537824b5e8e1"}, + {file = "SQLAlchemy-2.0.32-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:328429aecaba2aee3d71e11f2477c14eec5990fb6d0e884107935f7fb6001632"}, + {file = "SQLAlchemy-2.0.32-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85a01b5599e790e76ac3fe3aa2f26e1feba56270023d6afd5550ed63c68552b3"}, + {file = "SQLAlchemy-2.0.32-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aaf04784797dcdf4c0aa952c8d234fa01974c4729db55c45732520ce12dd95b4"}, + {file = "SQLAlchemy-2.0.32-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4488120becf9b71b3ac718f4138269a6be99a42fe023ec457896ba4f80749525"}, + {file = "SQLAlchemy-2.0.32-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:14e09e083a5796d513918a66f3d6aedbc131e39e80875afe81d98a03312889e6"}, + {file = "SQLAlchemy-2.0.32-cp39-cp39-win32.whl", hash = "sha256:0d322cc9c9b2154ba7e82f7bf25ecc7c36fbe2d82e2933b3642fc095a52cfc78"}, + {file = "SQLAlchemy-2.0.32-cp39-cp39-win_amd64.whl", hash = "sha256:7dd8583df2f98dea28b5cd53a1beac963f4f9d087888d75f22fcc93a07cf8d84"}, + {file = "SQLAlchemy-2.0.32-py3-none-any.whl", hash = "sha256:e567a8793a692451f706b363ccf3c45e056b67d90ead58c3bc9471af5d212202"}, + {file = "SQLAlchemy-2.0.32.tar.gz", hash = "sha256:c1b88cc8b02b6a5f0efb0345a03672d4c897dc7d92585176f88c67346f565ea8"}, ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and platform_machine == \"aarch64\" or python_version < \"3.13\" and platform_machine == \"ppc64le\" or python_version < \"3.13\" and platform_machine == \"x86_64\" or python_version < \"3.13\" and platform_machine == \"amd64\" or python_version < \"3.13\" and platform_machine == \"AMD64\" or python_version < \"3.13\" and platform_machine == \"win32\" or python_version < \"3.13\" and platform_machine == \"WIN32\""} +greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} typing-extensions = ">=4.6.0" [package.extras] @@ -2454,14 +2481,13 @@ sqlcipher = ["sqlcipher3_binary"] [[package]] name = "sqlmodel" -version = "0.0.19" +version = "0.0.21" description = "SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness." -category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "sqlmodel-0.0.19-py3-none-any.whl", hash = "sha256:6c8125d4101970d031e9aae970b20cbeaf44149989f8366d939f4ab21aab8763"}, - {file = "sqlmodel-0.0.19.tar.gz", hash = "sha256:95449b0b48a40a3eecf0a629fa5735b9dfc8a5574a91090d24ca17f02246ad96"}, + {file = "sqlmodel-0.0.21-py3-none-any.whl", hash = "sha256:eca104afe8a643f0764076b29f02e51d19d6b35c458f4c119942960362a4b52a"}, + {file = "sqlmodel-0.0.21.tar.gz", hash = "sha256:b2034c23d930f66d2091b17a4280a9c23a7ea540a71e7fcf9c746d262f06f74a"}, ] [package.dependencies] @@ -2472,7 +2498,6 @@ SQLAlchemy = ">=2.0.14,<2.1.0" name = "starlette" version = "0.37.2" description = "The little ASGI library that shines." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2489,14 +2514,13 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7 [[package]] name = "starlette-admin" -version = "0.14.0" +version = "0.14.1" description = "Fast, beautiful and extensible administrative interface framework for Starlette/FastApi applications" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "starlette_admin-0.14.0-py3-none-any.whl", hash = "sha256:b59a0d1f571898086651c2a02e0a34db8fc68c4c564de66ac66de7a0daa764fd"}, - {file = "starlette_admin-0.14.0.tar.gz", hash = "sha256:60b517ca9f73ac7eb645f354138a0126dbb84d7bdde53db23deaf38477100dff"}, + {file = "starlette_admin-0.14.1-py3-none-any.whl", hash = "sha256:5b6260d7ed3db455585852d669feb7ed9a8c5f9a1e3d48d21a52912ec37e18f9"}, + {file = "starlette_admin-0.14.1.tar.gz", hash = "sha256:45e2baa3b9a8deec7a6e8ca9295123f648bb0d2070abe68f27193c6d5e32cc38"}, ] [package.dependencies] @@ -2506,16 +2530,15 @@ starlette = "*" [package.extras] cov = ["coverage[toml] (>=7.0.0,<7.4.0)"] -dev = ["pre-commit (>=2.20.0,<4.0.0)", "uvicorn (>=0.20.0,<0.26.0)"] -doc = ["mkdocs (>=1.4.2,<2.0.0)", "mkdocs-material (>=9.0.0,<10.0.0)", "mkdocs-static-i18n (>=0.53.0,<0.57.0)", "mkdocstrings[python] (>=0.19.0,<0.25.0)"] +dev = ["pre-commit (>=2.20.0,<4.0.0)", "uvicorn (>=0.20.0,<0.31.0)"] +doc = ["mkdocs (>=1.4.2,<2.0.0)", "mkdocs-material (>=9.0.0,<10.0.0)", "mkdocs-static-i18n (>=1.2.3,<1.3)", "mkdocstrings[python] (>=0.19.0,<0.26.0)"] i18n = ["babel (>=2.13.0)"] -test = ["aiomysql (>=0.1.1,<0.3.0)", "aiosqlite (>=0.17.0,<0.20.0)", "arrow (>=1.2.3,<1.4.0)", "asyncpg (>=0.27.0,<0.30.0)", "backports-zoneinfo", "black (==24.1.1)", "colour (>=0.1.5,<0.2.0)", "fasteners (==0.19)", "httpx (>=0.23.3,<0.27.0)", "itsdangerous (>=2.1.2,<2.2.0)", "mongoengine (>=0.25.0,<0.28.0)", "mypy (==1.8.0)", "odmantic (>=0.9.0,<0.10.0)", "passlib (>=1.7.4,<1.8.0)", "phonenumbers (>=8.13.3,<8.14.0)", "pillow (>=9.4.0,<9.6.0)", "psycopg2-binary (>=2.9.5,<3.0.0)", "pydantic[email] (>=1.10.2,<2.6.0)", "pymysql[rsa] (>=1.0.2,<1.2.0)", "pytest (>=7.2.0,<7.5.0)", "pytest-asyncio (>=0.20.2,<0.24.0)", "ruff (==0.1.15)", "sqlalchemy-file (>=0.5.0,<0.7.0)", "sqlalchemy-utils (>=0.40.0,<0.42.0)", "sqlmodel (>=0.0.11,<0.15.0)", "tinydb (>=4.7.0,<4.9.0)"] +test = ["aiomysql (>=0.1.1,<0.3.0)", "aiosqlite (>=0.17.0,<0.21.0)", "arrow (>=1.2.3,<1.4.0)", "asyncpg (>=0.27.0,<0.30.0)", "backports-zoneinfo", "black (==24.4.2)", "colour (>=0.1.5,<0.2.0)", "fasteners (==0.19)", "httpx (>=0.23.3,<0.27.0)", "itsdangerous (>=2.2.0,<2.3.0)", "mongoengine (>=0.25.0,<0.29.0)", "mypy (==1.10.0)", "odmantic (>=0.9.0,<0.10.0)", "passlib (>=1.7.4,<1.8.0)", "phonenumbers (>=8.13.3,<8.14.0)", "pillow (>=9.4.0,<9.6.0)", "psycopg2-binary (>=2.9.5,<3.0.0)", "pydantic[email] (>=1.10.2,<2.8.0)", "pymysql[rsa] (>=1.0.2,<1.2.0)", "pytest (>=7.2.0,<7.5.0)", "pytest-asyncio (>=0.20.2,<0.24.0)", "ruff (==0.4.8)", "sqlalchemy-file (>=0.5.0,<0.7.0)", "sqlalchemy-utils (>=0.40.0,<0.42.0)", "sqlmodel (>=0.0.11,<0.15.0)", "tinydb (>=4.7.0,<4.9.0)"] [[package]] name = "tabulate" version = "0.9.0" description = "Pretty-print tabular data" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2528,14 +2551,13 @@ widechars = ["wcwidth"] [[package]] name = "tenacity" -version = "8.4.2" +version = "9.0.0" description = "Retry code until it succeeds" -category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "tenacity-8.4.2-py3-none-any.whl", hash = "sha256:9e6f7cf7da729125c7437222f8a522279751cdfbe6b67bfe64f75d3a348661b2"}, - {file = "tenacity-8.4.2.tar.gz", hash = "sha256:cd80a53a79336edba8489e767f729e4f391c896956b57140b5d7511a64bbd3ef"}, + {file = "tenacity-9.0.0-py3-none-any.whl", hash = "sha256:93de0c98785b27fcf659856aa9f54bfbd399e29969b0621bc7f762bd441b4539"}, + {file = "tenacity-9.0.0.tar.gz", hash = "sha256:807f37ca97d62aa361264d497b0e31e92b8027044942bfa756160d908320d73b"}, ] [package.extras] @@ -2546,7 +2568,6 @@ test = ["pytest", "tornado (>=4.5)", "typeguard"] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2558,7 +2579,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2568,26 +2588,24 @@ files = [ [[package]] name = "tomlkit" -version = "0.12.5" +version = "0.13.2" description = "Style preserving TOML library" -category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "tomlkit-0.12.5-py3-none-any.whl", hash = "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f"}, - {file = "tomlkit-0.12.5.tar.gz", hash = "sha256:eef34fba39834d4d6b73c9ba7f3e4d1c417a4e56f89a7e96e090dd0d24b8fb3c"}, + {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, + {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, ] [[package]] name = "trio" -version = "0.25.1" +version = "0.26.2" description = "A friendly Python library for async concurrency and I/O" -category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "trio-0.25.1-py3-none-any.whl", hash = "sha256:e42617ba091e7b2e50c899052e83a3c403101841de925187f61e7b7eaebdf3fb"}, - {file = "trio-0.25.1.tar.gz", hash = "sha256:9f5314f014ea3af489e77b001861c535005c3858d38ec46b6b071ebfa339d7fb"}, + {file = "trio-0.26.2-py3-none-any.whl", hash = "sha256:c5237e8133eb0a1d72f09a971a55c28ebe69e351c783fc64bc37db8db8bbe1d0"}, + {file = "trio-0.26.2.tar.gz", hash = "sha256:0346c3852c15e5c7d40ea15972c4805689ef2cb8b5206f794c9c19450119f3a4"}, ] [package.dependencies] @@ -2603,7 +2621,6 @@ sortedcontainers = "*" name = "trio-websocket" version = "0.11.1" description = "WebSocket library for Trio" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2620,7 +2637,6 @@ wsproto = ">=0.14" name = "twine" version = "5.1.1" description = "Collection of utilities for publishing packages on PyPI" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2641,14 +2657,13 @@ urllib3 = ">=1.26.0" [[package]] name = "typer" -version = "0.12.3" +version = "0.12.4" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "typer-0.12.3-py3-none-any.whl", hash = "sha256:070d7ca53f785acbccba8e7d28b08dcd88f79f1fbda035ade0aecec71ca5c914"}, - {file = "typer-0.12.3.tar.gz", hash = "sha256:49e73131481d804288ef62598d97a1ceef3058905aa536a1134f90891ba35482"}, + {file = "typer-0.12.4-py3-none-any.whl", hash = "sha256:819aa03699f438397e876aa12b0d63766864ecba1b579092cc9fe35d886e34b6"}, + {file = "typer-0.12.4.tar.gz", hash = "sha256:c9c1613ed6a166162705b3347b8d10b661ccc5d95692654d0fb628118f2c34e6"}, ] [package.dependencies] @@ -2661,7 +2676,6 @@ typing-extensions = ">=3.7.4.3" name = "typing-extensions" version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2673,7 +2687,6 @@ files = [ name = "tzdata" version = "2024.1" description = "Provider of IANA time zone data" -category = "dev" optional = false python-versions = ">=2" files = [ @@ -2685,7 +2698,6 @@ files = [ name = "urllib3" version = "2.2.2" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2704,14 +2716,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.30.1" +version = "0.30.6" description = "The lightning-fast ASGI server." -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "uvicorn-0.30.1-py3-none-any.whl", hash = "sha256:cd17daa7f3b9d7a24de3617820e634d0933b69eed8e33a516071174427238c81"}, - {file = "uvicorn-0.30.1.tar.gz", hash = "sha256:d46cd8e0fd80240baffbcd9ec1012a712938754afcf81bce56c024c1656aece8"}, + {file = "uvicorn-0.30.6-py3-none-any.whl", hash = "sha256:65fd46fe3fda5bdc1b03b94eb634923ff18cd35b2f084813ea79d1f103f711b5"}, + {file = "uvicorn-0.30.6.tar.gz", hash = "sha256:4b15decdda1e72be08209e860a1e10e92439ad5b97cf44cc945fcbee66fc5788"}, ] [package.dependencies] @@ -2726,7 +2737,6 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", name = "virtualenv" version = "20.26.3" description = "Virtual Python Environment builder" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2745,44 +2755,46 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [[package]] name = "watchdog" -version = "4.0.1" +version = "4.0.2" description = "Filesystem events monitoring" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "watchdog-4.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:da2dfdaa8006eb6a71051795856bedd97e5b03e57da96f98e375682c48850645"}, - {file = "watchdog-4.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e93f451f2dfa433d97765ca2634628b789b49ba8b504fdde5837cdcf25fdb53b"}, - {file = "watchdog-4.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ef0107bbb6a55f5be727cfc2ef945d5676b97bffb8425650dadbb184be9f9a2b"}, - {file = "watchdog-4.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:17e32f147d8bf9657e0922c0940bcde863b894cd871dbb694beb6704cfbd2fb5"}, - {file = "watchdog-4.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:03e70d2df2258fb6cb0e95bbdbe06c16e608af94a3ffbd2b90c3f1e83eb10767"}, - {file = "watchdog-4.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:123587af84260c991dc5f62a6e7ef3d1c57dfddc99faacee508c71d287248459"}, - {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:093b23e6906a8b97051191a4a0c73a77ecc958121d42346274c6af6520dec175"}, - {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:611be3904f9843f0529c35a3ff3fd617449463cb4b73b1633950b3d97fa4bfb7"}, - {file = "watchdog-4.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:62c613ad689ddcb11707f030e722fa929f322ef7e4f18f5335d2b73c61a85c28"}, - {file = "watchdog-4.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:d4925e4bf7b9bddd1c3de13c9b8a2cdb89a468f640e66fbfabaf735bd85b3e35"}, - {file = "watchdog-4.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cad0bbd66cd59fc474b4a4376bc5ac3fc698723510cbb64091c2a793b18654db"}, - {file = "watchdog-4.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a3c2c317a8fb53e5b3d25790553796105501a235343f5d2bf23bb8649c2c8709"}, - {file = "watchdog-4.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c9904904b6564d4ee8a1ed820db76185a3c96e05560c776c79a6ce5ab71888ba"}, - {file = "watchdog-4.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:667f3c579e813fcbad1b784db7a1aaa96524bed53437e119f6a2f5de4db04235"}, - {file = "watchdog-4.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d10a681c9a1d5a77e75c48a3b8e1a9f2ae2928eda463e8d33660437705659682"}, - {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0144c0ea9997b92615af1d94afc0c217e07ce2c14912c7b1a5731776329fcfc7"}, - {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:998d2be6976a0ee3a81fb8e2777900c28641fb5bfbd0c84717d89bca0addcdc5"}, - {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e7921319fe4430b11278d924ef66d4daa469fafb1da679a2e48c935fa27af193"}, - {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:f0de0f284248ab40188f23380b03b59126d1479cd59940f2a34f8852db710625"}, - {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bca36be5707e81b9e6ce3208d92d95540d4ca244c006b61511753583c81c70dd"}, - {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ab998f567ebdf6b1da7dc1e5accfaa7c6992244629c0fdaef062f43249bd8dee"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:dddba7ca1c807045323b6af4ff80f5ddc4d654c8bce8317dde1bd96b128ed253"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_armv7l.whl", hash = "sha256:4513ec234c68b14d4161440e07f995f231be21a09329051e67a2118a7a612d2d"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_i686.whl", hash = "sha256:4107ac5ab936a63952dea2a46a734a23230aa2f6f9db1291bf171dac3ebd53c6"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64.whl", hash = "sha256:6e8c70d2cd745daec2a08734d9f63092b793ad97612470a0ee4cbb8f5f705c57"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:f27279d060e2ab24c0aa98363ff906d2386aa6c4dc2f1a374655d4e02a6c5e5e"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_s390x.whl", hash = "sha256:f8affdf3c0f0466e69f5b3917cdd042f89c8c63aebdb9f7c078996f607cdb0f5"}, - {file = "watchdog-4.0.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ac7041b385f04c047fcc2951dc001671dee1b7e0615cde772e84b01fbf68ee84"}, - {file = "watchdog-4.0.1-py3-none-win32.whl", hash = "sha256:206afc3d964f9a233e6ad34618ec60b9837d0582b500b63687e34011e15bb429"}, - {file = "watchdog-4.0.1-py3-none-win_amd64.whl", hash = "sha256:7577b3c43e5909623149f76b099ac49a1a01ca4e167d1785c76eb52fa585745a"}, - {file = "watchdog-4.0.1-py3-none-win_ia64.whl", hash = "sha256:d7b9f5f3299e8dd230880b6c55504a1f69cf1e4316275d1b215ebdd8187ec88d"}, - {file = "watchdog-4.0.1.tar.gz", hash = "sha256:eebaacf674fa25511e8867028d281e602ee6500045b57f43b08778082f7f8b44"}, + {file = "watchdog-4.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ede7f010f2239b97cc79e6cb3c249e72962404ae3865860855d5cbe708b0fd22"}, + {file = "watchdog-4.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a2cffa171445b0efa0726c561eca9a27d00a1f2b83846dbd5a4f639c4f8ca8e1"}, + {file = "watchdog-4.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c50f148b31b03fbadd6d0b5980e38b558046b127dc483e5e4505fcef250f9503"}, + {file = "watchdog-4.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7c7d4bf585ad501c5f6c980e7be9c4f15604c7cc150e942d82083b31a7548930"}, + {file = "watchdog-4.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:914285126ad0b6eb2258bbbcb7b288d9dfd655ae88fa28945be05a7b475a800b"}, + {file = "watchdog-4.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:984306dc4720da5498b16fc037b36ac443816125a3705dfde4fd90652d8028ef"}, + {file = "watchdog-4.0.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:1cdcfd8142f604630deef34722d695fb455d04ab7cfe9963055df1fc69e6727a"}, + {file = "watchdog-4.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d7ab624ff2f663f98cd03c8b7eedc09375a911794dfea6bf2a359fcc266bff29"}, + {file = "watchdog-4.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:132937547a716027bd5714383dfc40dc66c26769f1ce8a72a859d6a48f371f3a"}, + {file = "watchdog-4.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:cd67c7df93eb58f360c43802acc945fa8da70c675b6fa37a241e17ca698ca49b"}, + {file = "watchdog-4.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:bcfd02377be80ef3b6bc4ce481ef3959640458d6feaae0bd43dd90a43da90a7d"}, + {file = "watchdog-4.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:980b71510f59c884d684b3663d46e7a14b457c9611c481e5cef08f4dd022eed7"}, + {file = "watchdog-4.0.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:aa160781cafff2719b663c8a506156e9289d111d80f3387cf3af49cedee1f040"}, + {file = "watchdog-4.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f6ee8dedd255087bc7fe82adf046f0b75479b989185fb0bdf9a98b612170eac7"}, + {file = "watchdog-4.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0b4359067d30d5b864e09c8597b112fe0a0a59321a0f331498b013fb097406b4"}, + {file = "watchdog-4.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:770eef5372f146997638d737c9a3c597a3b41037cfbc5c41538fc27c09c3a3f9"}, + {file = "watchdog-4.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eeea812f38536a0aa859972d50c76e37f4456474b02bd93674d1947cf1e39578"}, + {file = "watchdog-4.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b2c45f6e1e57ebb4687690c05bc3a2c1fb6ab260550c4290b8abb1335e0fd08b"}, + {file = "watchdog-4.0.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:10b6683df70d340ac3279eff0b2766813f00f35a1d37515d2c99959ada8f05fa"}, + {file = "watchdog-4.0.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:f7c739888c20f99824f7aa9d31ac8a97353e22d0c0e54703a547a218f6637eb3"}, + {file = "watchdog-4.0.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:c100d09ac72a8a08ddbf0629ddfa0b8ee41740f9051429baa8e31bb903ad7508"}, + {file = "watchdog-4.0.2-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:f5315a8c8dd6dd9425b974515081fc0aadca1d1d61e078d2246509fd756141ee"}, + {file = "watchdog-4.0.2-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:2d468028a77b42cc685ed694a7a550a8d1771bb05193ba7b24006b8241a571a1"}, + {file = "watchdog-4.0.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:f15edcae3830ff20e55d1f4e743e92970c847bcddc8b7509bcd172aa04de506e"}, + {file = "watchdog-4.0.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:936acba76d636f70db8f3c66e76aa6cb5136a936fc2a5088b9ce1c7a3508fc83"}, + {file = "watchdog-4.0.2-py3-none-manylinux2014_armv7l.whl", hash = "sha256:e252f8ca942a870f38cf785aef420285431311652d871409a64e2a0a52a2174c"}, + {file = "watchdog-4.0.2-py3-none-manylinux2014_i686.whl", hash = "sha256:0e83619a2d5d436a7e58a1aea957a3c1ccbf9782c43c0b4fed80580e5e4acd1a"}, + {file = "watchdog-4.0.2-py3-none-manylinux2014_ppc64.whl", hash = "sha256:88456d65f207b39f1981bf772e473799fcdc10801062c36fd5ad9f9d1d463a73"}, + {file = "watchdog-4.0.2-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:32be97f3b75693a93c683787a87a0dc8db98bb84701539954eef991fb35f5fbc"}, + {file = "watchdog-4.0.2-py3-none-manylinux2014_s390x.whl", hash = "sha256:c82253cfc9be68e3e49282831afad2c1f6593af80c0daf1287f6a92657986757"}, + {file = "watchdog-4.0.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:c0b14488bd336c5b1845cee83d3e631a1f8b4e9c5091ec539406e4a324f882d8"}, + {file = "watchdog-4.0.2-py3-none-win32.whl", hash = "sha256:0d8a7e523ef03757a5aa29f591437d64d0d894635f8a50f370fe37f913ce4e19"}, + {file = "watchdog-4.0.2-py3-none-win_amd64.whl", hash = "sha256:c344453ef3bf875a535b0488e3ad28e341adbd5a9ffb0f7d62cefacc8824ef2b"}, + {file = "watchdog-4.0.2-py3-none-win_ia64.whl", hash = "sha256:baececaa8edff42cd16558a639a9b0ddf425f93d892e8392a56bf904f5eff22c"}, + {file = "watchdog-4.0.2.tar.gz", hash = "sha256:b4dfbb6c49221be4535623ea4474a4d6ee0a9cef4a80b20c28db4d858b64e270"}, ] [package.extras] @@ -2790,87 +2802,98 @@ watchmedo = ["PyYAML (>=3.10)"] [[package]] name = "watchfiles" -version = "0.22.0" +version = "0.23.0" description = "Simple, modern and high performance file watching and code reload in python." -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "watchfiles-0.22.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:da1e0a8caebf17976e2ffd00fa15f258e14749db5e014660f53114b676e68538"}, - {file = "watchfiles-0.22.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:61af9efa0733dc4ca462347becb82e8ef4945aba5135b1638bfc20fad64d4f0e"}, - {file = "watchfiles-0.22.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d9188979a58a096b6f8090e816ccc3f255f137a009dd4bbec628e27696d67c1"}, - {file = "watchfiles-0.22.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2bdadf6b90c099ca079d468f976fd50062905d61fae183f769637cb0f68ba59a"}, - {file = "watchfiles-0.22.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:067dea90c43bf837d41e72e546196e674f68c23702d3ef80e4e816937b0a3ffd"}, - {file = "watchfiles-0.22.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbf8a20266136507abf88b0df2328e6a9a7c7309e8daff124dda3803306a9fdb"}, - {file = "watchfiles-0.22.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1235c11510ea557fe21be5d0e354bae2c655a8ee6519c94617fe63e05bca4171"}, - {file = "watchfiles-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2444dc7cb9d8cc5ab88ebe792a8d75709d96eeef47f4c8fccb6df7c7bc5be71"}, - {file = "watchfiles-0.22.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c5af2347d17ab0bd59366db8752d9e037982e259cacb2ba06f2c41c08af02c39"}, - {file = "watchfiles-0.22.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9624a68b96c878c10437199d9a8b7d7e542feddda8d5ecff58fdc8e67b460848"}, - {file = "watchfiles-0.22.0-cp310-none-win32.whl", hash = "sha256:4b9f2a128a32a2c273d63eb1fdbf49ad64852fc38d15b34eaa3f7ca2f0d2b797"}, - {file = "watchfiles-0.22.0-cp310-none-win_amd64.whl", hash = "sha256:2627a91e8110b8de2406d8b2474427c86f5a62bf7d9ab3654f541f319ef22bcb"}, - {file = "watchfiles-0.22.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8c39987a1397a877217be1ac0fb1d8b9f662c6077b90ff3de2c05f235e6a8f96"}, - {file = "watchfiles-0.22.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a927b3034d0672f62fb2ef7ea3c9fc76d063c4b15ea852d1db2dc75fe2c09696"}, - {file = "watchfiles-0.22.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:052d668a167e9fc345c24203b104c313c86654dd6c0feb4b8a6dfc2462239249"}, - {file = "watchfiles-0.22.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e45fb0d70dda1623a7045bd00c9e036e6f1f6a85e4ef2c8ae602b1dfadf7550"}, - {file = "watchfiles-0.22.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c49b76a78c156979759d759339fb62eb0549515acfe4fd18bb151cc07366629c"}, - {file = "watchfiles-0.22.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4a65474fd2b4c63e2c18ac67a0c6c66b82f4e73e2e4d940f837ed3d2fd9d4da"}, - {file = "watchfiles-0.22.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1cc0cba54f47c660d9fa3218158b8963c517ed23bd9f45fe463f08262a4adae1"}, - {file = "watchfiles-0.22.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94ebe84a035993bb7668f58a0ebf998174fb723a39e4ef9fce95baabb42b787f"}, - {file = "watchfiles-0.22.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e0f0a874231e2839abbf473256efffe577d6ee2e3bfa5b540479e892e47c172d"}, - {file = "watchfiles-0.22.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:213792c2cd3150b903e6e7884d40660e0bcec4465e00563a5fc03f30ea9c166c"}, - {file = "watchfiles-0.22.0-cp311-none-win32.whl", hash = "sha256:b44b70850f0073b5fcc0b31ede8b4e736860d70e2dbf55701e05d3227a154a67"}, - {file = "watchfiles-0.22.0-cp311-none-win_amd64.whl", hash = "sha256:00f39592cdd124b4ec5ed0b1edfae091567c72c7da1487ae645426d1b0ffcad1"}, - {file = "watchfiles-0.22.0-cp311-none-win_arm64.whl", hash = "sha256:3218a6f908f6a276941422b035b511b6d0d8328edd89a53ae8c65be139073f84"}, - {file = "watchfiles-0.22.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:c7b978c384e29d6c7372209cbf421d82286a807bbcdeb315427687f8371c340a"}, - {file = "watchfiles-0.22.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bd4c06100bce70a20c4b81e599e5886cf504c9532951df65ad1133e508bf20be"}, - {file = "watchfiles-0.22.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:425440e55cd735386ec7925f64d5dde392e69979d4c8459f6bb4e920210407f2"}, - {file = "watchfiles-0.22.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:68fe0c4d22332d7ce53ad094622b27e67440dacefbaedd29e0794d26e247280c"}, - {file = "watchfiles-0.22.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a8a31bfd98f846c3c284ba694c6365620b637debdd36e46e1859c897123aa232"}, - {file = "watchfiles-0.22.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc2e8fe41f3cac0660197d95216c42910c2b7e9c70d48e6d84e22f577d106fc1"}, - {file = "watchfiles-0.22.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55b7cc10261c2786c41d9207193a85c1db1b725cf87936df40972aab466179b6"}, - {file = "watchfiles-0.22.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28585744c931576e535860eaf3f2c0ec7deb68e3b9c5a85ca566d69d36d8dd27"}, - {file = "watchfiles-0.22.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:00095dd368f73f8f1c3a7982a9801190cc88a2f3582dd395b289294f8975172b"}, - {file = "watchfiles-0.22.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:52fc9b0dbf54d43301a19b236b4a4614e610605f95e8c3f0f65c3a456ffd7d35"}, - {file = "watchfiles-0.22.0-cp312-none-win32.whl", hash = "sha256:581f0a051ba7bafd03e17127735d92f4d286af941dacf94bcf823b101366249e"}, - {file = "watchfiles-0.22.0-cp312-none-win_amd64.whl", hash = "sha256:aec83c3ba24c723eac14225194b862af176d52292d271c98820199110e31141e"}, - {file = "watchfiles-0.22.0-cp312-none-win_arm64.whl", hash = "sha256:c668228833c5619f6618699a2c12be057711b0ea6396aeaece4ded94184304ea"}, - {file = "watchfiles-0.22.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d47e9ef1a94cc7a536039e46738e17cce058ac1593b2eccdede8bf72e45f372a"}, - {file = "watchfiles-0.22.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:28f393c1194b6eaadcdd8f941307fc9bbd7eb567995232c830f6aef38e8a6e88"}, - {file = "watchfiles-0.22.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd64f3a4db121bc161644c9e10a9acdb836853155a108c2446db2f5ae1778c3d"}, - {file = "watchfiles-0.22.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2abeb79209630da981f8ebca30a2c84b4c3516a214451bfc5f106723c5f45843"}, - {file = "watchfiles-0.22.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4cc382083afba7918e32d5ef12321421ef43d685b9a67cc452a6e6e18920890e"}, - {file = "watchfiles-0.22.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d048ad5d25b363ba1d19f92dcf29023988524bee6f9d952130b316c5802069cb"}, - {file = "watchfiles-0.22.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:103622865599f8082f03af4214eaff90e2426edff5e8522c8f9e93dc17caee13"}, - {file = "watchfiles-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3e1f3cf81f1f823e7874ae563457828e940d75573c8fbf0ee66818c8b6a9099"}, - {file = "watchfiles-0.22.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8597b6f9dc410bdafc8bb362dac1cbc9b4684a8310e16b1ff5eee8725d13dcd6"}, - {file = "watchfiles-0.22.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0b04a2cbc30e110303baa6d3ddce8ca3664bc3403be0f0ad513d1843a41c97d1"}, - {file = "watchfiles-0.22.0-cp38-none-win32.whl", hash = "sha256:b610fb5e27825b570554d01cec427b6620ce9bd21ff8ab775fc3a32f28bba63e"}, - {file = "watchfiles-0.22.0-cp38-none-win_amd64.whl", hash = "sha256:fe82d13461418ca5e5a808a9e40f79c1879351fcaeddbede094028e74d836e86"}, - {file = "watchfiles-0.22.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:3973145235a38f73c61474d56ad6199124e7488822f3a4fc97c72009751ae3b0"}, - {file = "watchfiles-0.22.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:280a4afbc607cdfc9571b9904b03a478fc9f08bbeec382d648181c695648202f"}, - {file = "watchfiles-0.22.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a0d883351a34c01bd53cfa75cd0292e3f7e268bacf2f9e33af4ecede7e21d1d"}, - {file = "watchfiles-0.22.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9165bcab15f2b6d90eedc5c20a7f8a03156b3773e5fb06a790b54ccecdb73385"}, - {file = "watchfiles-0.22.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc1b9b56f051209be458b87edb6856a449ad3f803315d87b2da4c93b43a6fe72"}, - {file = "watchfiles-0.22.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8dc1fc25a1dedf2dd952909c8e5cb210791e5f2d9bc5e0e8ebc28dd42fed7562"}, - {file = "watchfiles-0.22.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dc92d2d2706d2b862ce0568b24987eba51e17e14b79a1abcd2edc39e48e743c8"}, - {file = "watchfiles-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97b94e14b88409c58cdf4a8eaf0e67dfd3ece7e9ce7140ea6ff48b0407a593ec"}, - {file = "watchfiles-0.22.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:96eec15e5ea7c0b6eb5bfffe990fc7c6bd833acf7e26704eb18387fb2f5fd087"}, - {file = "watchfiles-0.22.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:28324d6b28bcb8d7c1041648d7b63be07a16db5510bea923fc80b91a2a6cbed6"}, - {file = "watchfiles-0.22.0-cp39-none-win32.whl", hash = "sha256:8c3e3675e6e39dc59b8fe5c914a19d30029e36e9f99468dddffd432d8a7b1c93"}, - {file = "watchfiles-0.22.0-cp39-none-win_amd64.whl", hash = "sha256:25c817ff2a86bc3de3ed2df1703e3d24ce03479b27bb4527c57e722f8554d971"}, - {file = "watchfiles-0.22.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b810a2c7878cbdecca12feae2c2ae8af59bea016a78bc353c184fa1e09f76b68"}, - {file = "watchfiles-0.22.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:f7e1f9c5d1160d03b93fc4b68a0aeb82fe25563e12fbcdc8507f8434ab6f823c"}, - {file = "watchfiles-0.22.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:030bc4e68d14bcad2294ff68c1ed87215fbd9a10d9dea74e7cfe8a17869785ab"}, - {file = "watchfiles-0.22.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ace7d060432acde5532e26863e897ee684780337afb775107c0a90ae8dbccfd2"}, - {file = "watchfiles-0.22.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5834e1f8b71476a26df97d121c0c0ed3549d869124ed2433e02491553cb468c2"}, - {file = "watchfiles-0.22.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:0bc3b2f93a140df6806c8467c7f51ed5e55a931b031b5c2d7ff6132292e803d6"}, - {file = "watchfiles-0.22.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8fdebb655bb1ba0122402352b0a4254812717a017d2dc49372a1d47e24073795"}, - {file = "watchfiles-0.22.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c8e0aa0e8cc2a43561e0184c0513e291ca891db13a269d8d47cb9841ced7c71"}, - {file = "watchfiles-0.22.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2f350cbaa4bb812314af5dab0eb8d538481e2e2279472890864547f3fe2281ed"}, - {file = "watchfiles-0.22.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:7a74436c415843af2a769b36bf043b6ccbc0f8d784814ba3d42fc961cdb0a9dc"}, - {file = "watchfiles-0.22.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00ad0bcd399503a84cc688590cdffbe7a991691314dde5b57b3ed50a41319a31"}, - {file = "watchfiles-0.22.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72a44e9481afc7a5ee3291b09c419abab93b7e9c306c9ef9108cb76728ca58d2"}, - {file = "watchfiles-0.22.0.tar.gz", hash = "sha256:988e981aaab4f3955209e7e28c7794acdb690be1efa7f16f8ea5aba7ffdadacb"}, + {file = "watchfiles-0.23.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:bee8ce357a05c20db04f46c22be2d1a2c6a8ed365b325d08af94358e0688eeb4"}, + {file = "watchfiles-0.23.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4ccd3011cc7ee2f789af9ebe04745436371d36afe610028921cab9f24bb2987b"}, + {file = "watchfiles-0.23.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb02d41c33be667e6135e6686f1bb76104c88a312a18faa0ef0262b5bf7f1a0f"}, + {file = "watchfiles-0.23.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7cf12ac34c444362f3261fb3ff548f0037ddd4c5bb85f66c4be30d2936beb3c5"}, + {file = "watchfiles-0.23.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0b2c25040a3c0ce0e66c7779cc045fdfbbb8d59e5aabfe033000b42fe44b53e"}, + {file = "watchfiles-0.23.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ecf2be4b9eece4f3da8ba5f244b9e51932ebc441c0867bd6af46a3d97eb068d6"}, + {file = "watchfiles-0.23.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40cb8fa00028908211eb9f8d47744dca21a4be6766672e1ff3280bee320436f1"}, + {file = "watchfiles-0.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f48c917ffd36ff9a5212614c2d0d585fa8b064ca7e66206fb5c095015bc8207"}, + {file = "watchfiles-0.23.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:9d183e3888ada88185ab17064079c0db8c17e32023f5c278d7bf8014713b1b5b"}, + {file = "watchfiles-0.23.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9837edf328b2805346f91209b7e660f65fb0e9ca18b7459d075d58db082bf981"}, + {file = "watchfiles-0.23.0-cp310-none-win32.whl", hash = "sha256:296e0b29ab0276ca59d82d2da22cbbdb39a23eed94cca69aed274595fb3dfe42"}, + {file = "watchfiles-0.23.0-cp310-none-win_amd64.whl", hash = "sha256:4ea756e425ab2dfc8ef2a0cb87af8aa7ef7dfc6fc46c6f89bcf382121d4fff75"}, + {file = "watchfiles-0.23.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:e397b64f7aaf26915bf2ad0f1190f75c855d11eb111cc00f12f97430153c2eab"}, + {file = "watchfiles-0.23.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b4ac73b02ca1824ec0a7351588241fd3953748d3774694aa7ddb5e8e46aef3e3"}, + {file = "watchfiles-0.23.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:130a896d53b48a1cecccfa903f37a1d87dbb74295305f865a3e816452f6e49e4"}, + {file = "watchfiles-0.23.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c5e7803a65eb2d563c73230e9d693c6539e3c975ccfe62526cadde69f3fda0cf"}, + {file = "watchfiles-0.23.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1aa4cc85202956d1a65c88d18c7b687b8319dbe6b1aec8969784ef7a10e7d1a"}, + {file = "watchfiles-0.23.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:87f889f6e58849ddb7c5d2cb19e2e074917ed1c6e3ceca50405775166492cca8"}, + {file = "watchfiles-0.23.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:37fd826dac84c6441615aa3f04077adcc5cac7194a021c9f0d69af20fb9fa788"}, + {file = "watchfiles-0.23.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee7db6e36e7a2c15923072e41ea24d9a0cf39658cb0637ecc9307b09d28827e1"}, + {file = "watchfiles-0.23.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2368c5371c17fdcb5a2ea71c5c9d49f9b128821bfee69503cc38eae00feb3220"}, + {file = "watchfiles-0.23.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:857af85d445b9ba9178db95658c219dbd77b71b8264e66836a6eba4fbf49c320"}, + {file = "watchfiles-0.23.0-cp311-none-win32.whl", hash = "sha256:1d636c8aeb28cdd04a4aa89030c4b48f8b2954d8483e5f989774fa441c0ed57b"}, + {file = "watchfiles-0.23.0-cp311-none-win_amd64.whl", hash = "sha256:46f1d8069a95885ca529645cdbb05aea5837d799965676e1b2b1f95a4206313e"}, + {file = "watchfiles-0.23.0-cp311-none-win_arm64.whl", hash = "sha256:e495ed2a7943503766c5d1ff05ae9212dc2ce1c0e30a80d4f0d84889298fa304"}, + {file = "watchfiles-0.23.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:1db691bad0243aed27c8354b12d60e8e266b75216ae99d33e927ff5238d270b5"}, + {file = "watchfiles-0.23.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:62d2b18cb1edaba311fbbfe83fb5e53a858ba37cacb01e69bc20553bb70911b8"}, + {file = "watchfiles-0.23.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e087e8fdf1270d000913c12e6eca44edd02aad3559b3e6b8ef00f0ce76e0636f"}, + {file = "watchfiles-0.23.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dd41d5c72417b87c00b1b635738f3c283e737d75c5fa5c3e1c60cd03eac3af77"}, + {file = "watchfiles-0.23.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e5f3ca0ff47940ce0a389457b35d6df601c317c1e1a9615981c474452f98de1"}, + {file = "watchfiles-0.23.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6991e3a78f642368b8b1b669327eb6751439f9f7eaaa625fae67dd6070ecfa0b"}, + {file = "watchfiles-0.23.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7f7252f52a09f8fa5435dc82b6af79483118ce6bd51eb74e6269f05ee22a7b9f"}, + {file = "watchfiles-0.23.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e01bcb8d767c58865207a6c2f2792ad763a0fe1119fb0a430f444f5b02a5ea0"}, + {file = "watchfiles-0.23.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:8e56fbcdd27fce061854ddec99e015dd779cae186eb36b14471fc9ae713b118c"}, + {file = "watchfiles-0.23.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bd3e2d64500a6cad28bcd710ee6269fbeb2e5320525acd0cfab5f269ade68581"}, + {file = "watchfiles-0.23.0-cp312-none-win32.whl", hash = "sha256:eb99c954291b2fad0eff98b490aa641e128fbc4a03b11c8a0086de8b7077fb75"}, + {file = "watchfiles-0.23.0-cp312-none-win_amd64.whl", hash = "sha256:dccc858372a56080332ea89b78cfb18efb945da858fabeb67f5a44fa0bcb4ebb"}, + {file = "watchfiles-0.23.0-cp312-none-win_arm64.whl", hash = "sha256:6c21a5467f35c61eafb4e394303720893066897fca937bade5b4f5877d350ff8"}, + {file = "watchfiles-0.23.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:ba31c32f6b4dceeb2be04f717811565159617e28d61a60bb616b6442027fd4b9"}, + {file = "watchfiles-0.23.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:85042ab91814fca99cec4678fc063fb46df4cbb57b4835a1cc2cb7a51e10250e"}, + {file = "watchfiles-0.23.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24655e8c1c9c114005c3868a3d432c8aa595a786b8493500071e6a52f3d09217"}, + {file = "watchfiles-0.23.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6b1a950ab299a4a78fd6369a97b8763732bfb154fdb433356ec55a5bce9515c1"}, + {file = "watchfiles-0.23.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8d3c5cd327dd6ce0edfc94374fb5883d254fe78a5e9d9dfc237a1897dc73cd1"}, + {file = "watchfiles-0.23.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ff785af8bacdf0be863ec0c428e3288b817e82f3d0c1d652cd9c6d509020dd0"}, + {file = "watchfiles-0.23.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:02b7ba9d4557149410747353e7325010d48edcfe9d609a85cb450f17fd50dc3d"}, + {file = "watchfiles-0.23.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48a1b05c0afb2cd2f48c1ed2ae5487b116e34b93b13074ed3c22ad5c743109f0"}, + {file = "watchfiles-0.23.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:109a61763e7318d9f821b878589e71229f97366fa6a5c7720687d367f3ab9eef"}, + {file = "watchfiles-0.23.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:9f8e6bb5ac007d4a4027b25f09827ed78cbbd5b9700fd6c54429278dacce05d1"}, + {file = "watchfiles-0.23.0-cp313-none-win32.whl", hash = "sha256:f46c6f0aec8d02a52d97a583782d9af38c19a29900747eb048af358a9c1d8e5b"}, + {file = "watchfiles-0.23.0-cp313-none-win_amd64.whl", hash = "sha256:f449afbb971df5c6faeb0a27bca0427d7b600dd8f4a068492faec18023f0dcff"}, + {file = "watchfiles-0.23.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:2dddc2487d33e92f8b6222b5fb74ae2cfde5e8e6c44e0248d24ec23befdc5366"}, + {file = "watchfiles-0.23.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e75695cc952e825fa3e0684a7f4a302f9128721f13eedd8dbd3af2ba450932b8"}, + {file = "watchfiles-0.23.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2537ef60596511df79b91613a5bb499b63f46f01a11a81b0a2b0dedf645d0a9c"}, + {file = "watchfiles-0.23.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:20b423b58f5fdde704a226b598a2d78165fe29eb5621358fe57ea63f16f165c4"}, + {file = "watchfiles-0.23.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b98732ec893975455708d6fc9a6daab527fc8bbe65be354a3861f8c450a632a4"}, + {file = "watchfiles-0.23.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee1f5fcbf5bc33acc0be9dd31130bcba35d6d2302e4eceafafd7d9018c7755ab"}, + {file = "watchfiles-0.23.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8f195338a5a7b50a058522b39517c50238358d9ad8284fd92943643144c0c03"}, + {file = "watchfiles-0.23.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:524fcb8d59b0dbee2c9b32207084b67b2420f6431ed02c18bd191e6c575f5c48"}, + {file = "watchfiles-0.23.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0eff099a4df36afaa0eea7a913aa64dcf2cbd4e7a4f319a73012210af4d23810"}, + {file = "watchfiles-0.23.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a8323daae27ea290ba3350c70c836c0d2b0fb47897fa3b0ca6a5375b952b90d3"}, + {file = "watchfiles-0.23.0-cp38-none-win32.whl", hash = "sha256:aafea64a3ae698695975251f4254df2225e2624185a69534e7fe70581066bc1b"}, + {file = "watchfiles-0.23.0-cp38-none-win_amd64.whl", hash = "sha256:c846884b2e690ba62a51048a097acb6b5cd263d8bd91062cd6137e2880578472"}, + {file = "watchfiles-0.23.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a753993635eccf1ecb185dedcc69d220dab41804272f45e4aef0a67e790c3eb3"}, + {file = "watchfiles-0.23.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6bb91fa4d0b392f0f7e27c40981e46dda9eb0fbc84162c7fb478fe115944f491"}, + {file = "watchfiles-0.23.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1f67312efa3902a8e8496bfa9824d3bec096ff83c4669ea555c6bdd213aa516"}, + {file = "watchfiles-0.23.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7ca6b71dcc50d320c88fb2d88ecd63924934a8abc1673683a242a7ca7d39e781"}, + {file = "watchfiles-0.23.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2aec5c29915caf08771d2507da3ac08e8de24a50f746eb1ed295584ba1820330"}, + {file = "watchfiles-0.23.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1733b9bc2c8098c6bdb0ff7a3d7cb211753fecb7bd99bdd6df995621ee1a574b"}, + {file = "watchfiles-0.23.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:02ff5d7bd066c6a7673b17c8879cd8ee903078d184802a7ee851449c43521bdd"}, + {file = "watchfiles-0.23.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18e2de19801b0eaa4c5292a223effb7cfb43904cb742c5317a0ac686ed604765"}, + {file = "watchfiles-0.23.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:8ada449e22198c31fb013ae7e9add887e8d2bd2335401abd3cbc55f8c5083647"}, + {file = "watchfiles-0.23.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3af1b05361e1cc497bf1be654a664750ae61f5739e4bb094a2be86ec8c6db9b6"}, + {file = "watchfiles-0.23.0-cp39-none-win32.whl", hash = "sha256:486bda18be5d25ab5d932699ceed918f68eb91f45d018b0343e3502e52866e5e"}, + {file = "watchfiles-0.23.0-cp39-none-win_amd64.whl", hash = "sha256:d2d42254b189a346249424fb9bb39182a19289a2409051ee432fb2926bad966a"}, + {file = "watchfiles-0.23.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:6a9265cf87a5b70147bfb2fec14770ed5b11a5bb83353f0eee1c25a81af5abfe"}, + {file = "watchfiles-0.23.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9f02a259fcbbb5fcfe7a0805b1097ead5ba7a043e318eef1db59f93067f0b49b"}, + {file = "watchfiles-0.23.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ebaebb53b34690da0936c256c1cdb0914f24fb0e03da76d185806df9328abed"}, + {file = "watchfiles-0.23.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd257f98cff9c6cb39eee1a83c7c3183970d8a8d23e8cf4f47d9a21329285cee"}, + {file = "watchfiles-0.23.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:aba037c1310dd108411d27b3d5815998ef0e83573e47d4219f45753c710f969f"}, + {file = "watchfiles-0.23.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:a96ac14e184aa86dc43b8a22bb53854760a58b2966c2b41580de938e9bf26ed0"}, + {file = "watchfiles-0.23.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:11698bb2ea5e991d10f1f4f83a39a02f91e44e4bd05f01b5c1ec04c9342bf63c"}, + {file = "watchfiles-0.23.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:efadd40fca3a04063d40c4448c9303ce24dd6151dc162cfae4a2a060232ebdcb"}, + {file = "watchfiles-0.23.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:556347b0abb4224c5ec688fc58214162e92a500323f50182f994f3ad33385dcb"}, + {file = "watchfiles-0.23.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:1cf7f486169986c4b9d34087f08ce56a35126600b6fef3028f19ca16d5889071"}, + {file = "watchfiles-0.23.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f18de0f82c62c4197bea5ecf4389288ac755896aac734bd2cc44004c56e4ac47"}, + {file = "watchfiles-0.23.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:532e1f2c491274d1333a814e4c5c2e8b92345d41b12dc806cf07aaff786beb66"}, + {file = "watchfiles-0.23.0.tar.gz", hash = "sha256:9338ade39ff24f8086bb005d16c29f8e9f19e55b18dcb04dfa26fcbc09da497b"}, ] [package.dependencies] @@ -2880,7 +2903,6 @@ anyio = ">=3.0.0" name = "websocket-client" version = "1.8.0" description = "WebSocket client for Python with low level API options" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2895,96 +2917,108 @@ test = ["websockets"] [[package]] name = "websockets" -version = "12.0" +version = "13.0" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "websockets-12.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d554236b2a2006e0ce16315c16eaa0d628dab009c33b63ea03f41c6107958374"}, - {file = "websockets-12.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2d225bb6886591b1746b17c0573e29804619c8f755b5598d875bb4235ea639be"}, - {file = "websockets-12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:eb809e816916a3b210bed3c82fb88eaf16e8afcf9c115ebb2bacede1797d2547"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c588f6abc13f78a67044c6b1273a99e1cf31038ad51815b3b016ce699f0d75c2"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5aa9348186d79a5f232115ed3fa9020eab66d6c3437d72f9d2c8ac0c6858c558"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6350b14a40c95ddd53e775dbdbbbc59b124a5c8ecd6fbb09c2e52029f7a9f480"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:70ec754cc2a769bcd218ed8d7209055667b30860ffecb8633a834dde27d6307c"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6e96f5ed1b83a8ddb07909b45bd94833b0710f738115751cdaa9da1fb0cb66e8"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4d87be612cbef86f994178d5186add3d94e9f31cc3cb499a0482b866ec477603"}, - {file = "websockets-12.0-cp310-cp310-win32.whl", hash = "sha256:befe90632d66caaf72e8b2ed4d7f02b348913813c8b0a32fae1cc5fe3730902f"}, - {file = "websockets-12.0-cp310-cp310-win_amd64.whl", hash = "sha256:363f57ca8bc8576195d0540c648aa58ac18cf85b76ad5202b9f976918f4219cf"}, - {file = "websockets-12.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5d873c7de42dea355d73f170be0f23788cf3fa9f7bed718fd2830eefedce01b4"}, - {file = "websockets-12.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3f61726cae9f65b872502ff3c1496abc93ffbe31b278455c418492016e2afc8f"}, - {file = "websockets-12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed2fcf7a07334c77fc8a230755c2209223a7cc44fc27597729b8ef5425aa61a3"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e332c210b14b57904869ca9f9bf4ca32f5427a03eeb625da9b616c85a3a506c"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5693ef74233122f8ebab026817b1b37fe25c411ecfca084b29bc7d6efc548f45"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e9e7db18b4539a29cc5ad8c8b252738a30e2b13f033c2d6e9d0549b45841c04"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6e2df67b8014767d0f785baa98393725739287684b9f8d8a1001eb2839031447"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:bea88d71630c5900690fcb03161ab18f8f244805c59e2e0dc4ffadae0a7ee0ca"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dff6cdf35e31d1315790149fee351f9e52978130cef6c87c4b6c9b3baf78bc53"}, - {file = "websockets-12.0-cp311-cp311-win32.whl", hash = "sha256:3e3aa8c468af01d70332a382350ee95f6986db479ce7af14d5e81ec52aa2b402"}, - {file = "websockets-12.0-cp311-cp311-win_amd64.whl", hash = "sha256:25eb766c8ad27da0f79420b2af4b85d29914ba0edf69f547cc4f06ca6f1d403b"}, - {file = "websockets-12.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0e6e2711d5a8e6e482cacb927a49a3d432345dfe7dea8ace7b5790df5932e4df"}, - {file = "websockets-12.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:dbcf72a37f0b3316e993e13ecf32f10c0e1259c28ffd0a85cee26e8549595fbc"}, - {file = "websockets-12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12743ab88ab2af1d17dd4acb4645677cb7063ef4db93abffbf164218a5d54c6b"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b645f491f3c48d3f8a00d1fce07445fab7347fec54a3e65f0725d730d5b99cb"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9893d1aa45a7f8b3bc4510f6ccf8db8c3b62120917af15e3de247f0780294b92"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f38a7b376117ef7aff996e737583172bdf535932c9ca021746573bce40165ed"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:f764ba54e33daf20e167915edc443b6f88956f37fb606449b4a5b10ba42235a5"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:1e4b3f8ea6a9cfa8be8484c9221ec0257508e3a1ec43c36acdefb2a9c3b00aa2"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9fdf06fd06c32205a07e47328ab49c40fc1407cdec801d698a7c41167ea45113"}, - {file = "websockets-12.0-cp312-cp312-win32.whl", hash = "sha256:baa386875b70cbd81798fa9f71be689c1bf484f65fd6fb08d051a0ee4e79924d"}, - {file = "websockets-12.0-cp312-cp312-win_amd64.whl", hash = "sha256:ae0a5da8f35a5be197f328d4727dbcfafa53d1824fac3d96cdd3a642fe09394f"}, - {file = "websockets-12.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5f6ffe2c6598f7f7207eef9a1228b6f5c818f9f4d53ee920aacd35cec8110438"}, - {file = "websockets-12.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9edf3fc590cc2ec20dc9d7a45108b5bbaf21c0d89f9fd3fd1685e223771dc0b2"}, - {file = "websockets-12.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8572132c7be52632201a35f5e08348137f658e5ffd21f51f94572ca6c05ea81d"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:604428d1b87edbf02b233e2c207d7d528460fa978f9e391bd8aaf9c8311de137"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1a9d160fd080c6285e202327aba140fc9a0d910b09e423afff4ae5cbbf1c7205"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87b4aafed34653e465eb77b7c93ef058516cb5acf3eb21e42f33928616172def"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b2ee7288b85959797970114deae81ab41b731f19ebcd3bd499ae9ca0e3f1d2c8"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7fa3d25e81bfe6a89718e9791128398a50dec6d57faf23770787ff441d851967"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a571f035a47212288e3b3519944f6bf4ac7bc7553243e41eac50dd48552b6df7"}, - {file = "websockets-12.0-cp38-cp38-win32.whl", hash = "sha256:3c6cc1360c10c17463aadd29dd3af332d4a1adaa8796f6b0e9f9df1fdb0bad62"}, - {file = "websockets-12.0-cp38-cp38-win_amd64.whl", hash = "sha256:1bf386089178ea69d720f8db6199a0504a406209a0fc23e603b27b300fdd6892"}, - {file = "websockets-12.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ab3d732ad50a4fbd04a4490ef08acd0517b6ae6b77eb967251f4c263011a990d"}, - {file = "websockets-12.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a1d9697f3337a89691e3bd8dc56dea45a6f6d975f92e7d5f773bc715c15dde28"}, - {file = "websockets-12.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1df2fbd2c8a98d38a66f5238484405b8d1d16f929bb7a33ed73e4801222a6f53"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23509452b3bc38e3a057382c2e941d5ac2e01e251acce7adc74011d7d8de434c"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e5fc14ec6ea568200ea4ef46545073da81900a2b67b3e666f04adf53ad452ec"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46e71dbbd12850224243f5d2aeec90f0aaa0f2dde5aeeb8fc8df21e04d99eff9"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b81f90dcc6c85a9b7f29873beb56c94c85d6f0dac2ea8b60d995bd18bf3e2aae"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:a02413bc474feda2849c59ed2dfb2cddb4cd3d2f03a2fedec51d6e959d9b608b"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bbe6013f9f791944ed31ca08b077e26249309639313fff132bfbf3ba105673b9"}, - {file = "websockets-12.0-cp39-cp39-win32.whl", hash = "sha256:cbe83a6bbdf207ff0541de01e11904827540aa069293696dd528a6640bd6a5f6"}, - {file = "websockets-12.0-cp39-cp39-win_amd64.whl", hash = "sha256:fc4e7fa5414512b481a2483775a8e8be7803a35b30ca805afa4998a84f9fd9e8"}, - {file = "websockets-12.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:248d8e2446e13c1d4326e0a6a4e9629cb13a11195051a73acf414812700badbd"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f44069528d45a933997a6fef143030d8ca8042f0dfaad753e2906398290e2870"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c4e37d36f0d19f0a4413d3e18c0d03d0c268ada2061868c1e6f5ab1a6d575077"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d829f975fc2e527a3ef2f9c8f25e553eb7bc779c6665e8e1d52aa22800bb38b"}, - {file = "websockets-12.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:2c71bd45a777433dd9113847af751aae36e448bc6b8c361a566cb043eda6ec30"}, - {file = "websockets-12.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0bee75f400895aef54157b36ed6d3b308fcab62e5260703add87f44cee9c82a6"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:423fc1ed29f7512fceb727e2d2aecb952c46aa34895e9ed96071821309951123"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27a5e9964ef509016759f2ef3f2c1e13f403725a5e6a1775555994966a66e931"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3181df4583c4d3994d31fb235dc681d2aaad744fbdbf94c4802485ececdecf2"}, - {file = "websockets-12.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:b067cb952ce8bf40115f6c19f478dc71c5e719b7fbaa511359795dfd9d1a6468"}, - {file = "websockets-12.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:00700340c6c7ab788f176d118775202aadea7602c5cc6be6ae127761c16d6b0b"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e469d01137942849cff40517c97a30a93ae79917752b34029f0ec72df6b46399"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffefa1374cd508d633646d51a8e9277763a9b78ae71324183693959cf94635a7"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba0cab91b3956dfa9f512147860783a1829a8d905ee218a9837c18f683239611"}, - {file = "websockets-12.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2cb388a5bfb56df4d9a406783b7f9dbefb888c09b71629351cc6b036e9259370"}, - {file = "websockets-12.0-py3-none-any.whl", hash = "sha256:dc284bbc8d7c78a6c69e0c7325ab46ee5e40bb4d50e494d8131a07ef47500e9e"}, - {file = "websockets-12.0.tar.gz", hash = "sha256:81df9cbcbb6c260de1e007e58c011bfebe2dafc8435107b0537f393dd38c8b1b"}, + {file = "websockets-13.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ad4fa707ff9e2ffee019e946257b5300a45137a58f41fbd9a4db8e684ab61528"}, + {file = "websockets-13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6fd757f313c13c34dae9f126d3ba4cf97175859c719e57c6a614b781c86b617e"}, + {file = "websockets-13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cbac2eb7ce0fac755fb983c9247c4a60c4019bcde4c0e4d167aeb17520cc7ef1"}, + {file = "websockets-13.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4b83cf7354cbbc058e97b3e545dceb75b8d9cf17fd5a19db419c319ddbaaf7a"}, + {file = "websockets-13.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9202c0010c78fad1041e1c5285232b6508d3633f92825687549540a70e9e5901"}, + {file = "websockets-13.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e6566e79c8c7cbea75ec450f6e1828945fc5c9a4769ceb1c7b6e22470539712"}, + {file = "websockets-13.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e7fcad070dcd9ad37a09d89a4cbc2a5e3e45080b88977c0da87b3090f9f55ead"}, + {file = "websockets-13.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a8f7d65358a25172db00c69bcc7df834155ee24229f560d035758fd6613111a"}, + {file = "websockets-13.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:63b702fb31e3f058f946ccdfa551f4d57a06f7729c369e8815eb18643099db37"}, + {file = "websockets-13.0-cp310-cp310-win32.whl", hash = "sha256:3a20cf14ba7b482c4a1924b5e061729afb89c890ca9ed44ac4127c6c5986e424"}, + {file = "websockets-13.0-cp310-cp310-win_amd64.whl", hash = "sha256:587245f0704d0bb675f919898d7473e8827a6d578e5a122a21756ca44b811ec8"}, + {file = "websockets-13.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:06df8306c241c235075d2ae77367038e701e53bc8c1bb4f6644f4f53aa6dedd0"}, + {file = "websockets-13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:85a1f92a02f0b8c1bf02699731a70a8a74402bb3f82bee36e7768b19a8ed9709"}, + {file = "websockets-13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9ed02c604349068d46d87ef4c2012c112c791f2bec08671903a6bb2bd9c06784"}, + {file = "websockets-13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b89849171b590107f6724a7b0790736daead40926ddf47eadf998b4ff51d6414"}, + {file = "websockets-13.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:939a16849d71203628157a5e4a495da63967c744e1e32018e9b9e2689aca64d4"}, + {file = "websockets-13.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad818cdac37c0ad4c58e51cb4964eae4f18b43c4a83cb37170b0d90c31bd80cf"}, + {file = "websockets-13.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cbfe82a07596a044de78bb7a62519e71690c5812c26c5f1d4b877e64e4f46309"}, + {file = "websockets-13.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e07e76c49f39c5b45cbd7362b94f001ae209a3ea4905ae9a09cfd53b3c76373d"}, + {file = "websockets-13.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:372f46a0096cfda23c88f7e42349a33f8375e10912f712e6b496d3a9a557290f"}, + {file = "websockets-13.0-cp311-cp311-win32.whl", hash = "sha256:376a43a4fd96725f13450d3d2e98f4f36c3525c562ab53d9a98dd2950dca9a8a"}, + {file = "websockets-13.0-cp311-cp311-win_amd64.whl", hash = "sha256:2be1382a4daa61e2f3e2be3b3c86932a8db9d1f85297feb6e9df22f391f94452"}, + {file = "websockets-13.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b5407c34776b9b77bd89a5f95eb0a34aaf91889e3f911c63f13035220eb50107"}, + {file = "websockets-13.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4782ec789f059f888c1e8fdf94383d0e64b531cffebbf26dd55afd53ab487ca4"}, + {file = "websockets-13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c8feb8e19ef65c9994e652c5b0324abd657bedd0abeb946fb4f5163012c1e730"}, + {file = "websockets-13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3f3d2e20c442b58dbac593cb1e02bc02d149a86056cc4126d977ad902472e3b"}, + {file = "websockets-13.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e39d393e0ab5b8bd01717cc26f2922026050188947ff54fe6a49dc489f7750b7"}, + {file = "websockets-13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f661a4205741bdc88ac9c2b2ec003c72cee97e4acd156eb733662ff004ba429"}, + {file = "websockets-13.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:384129ad0490e06bab2b98c1da9b488acb35bb11e2464c728376c6f55f0d45f3"}, + {file = "websockets-13.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:df5c0eff91f61b8205a6c9f7b255ff390cdb77b61c7b41f79ca10afcbb22b6cb"}, + {file = "websockets-13.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:02cc9bb1a887dac0e08bf657c5d00aa3fac0d03215d35a599130c2034ae6663a"}, + {file = "websockets-13.0-cp312-cp312-win32.whl", hash = "sha256:d9726d2c9bd6aed8cb994d89b3910ca0079406edce3670886ec828a73e7bdd53"}, + {file = "websockets-13.0-cp312-cp312-win_amd64.whl", hash = "sha256:fa0839f35322f7b038d8adcf679e2698c3a483688cc92e3bd15ee4fb06669e9a"}, + {file = "websockets-13.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:da7e501e59857e8e3e9d10586139dc196b80445a591451ca9998aafba1af5278"}, + {file = "websockets-13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a00e1e587c655749afb5b135d8d3edcfe84ec6db864201e40a882e64168610b3"}, + {file = "websockets-13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a7fbf2a8fe7556a8f4e68cb3e736884af7bf93653e79f6219f17ebb75e97d8f0"}, + {file = "websockets-13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ea9c9c7443a97ea4d84d3e4d42d0e8c4235834edae652993abcd2aff94affd7"}, + {file = "websockets-13.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35c2221b539b360203f3f9ad168e527bf16d903e385068ae842c186efb13d0ea"}, + {file = "websockets-13.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:358d37c5c431dd050ffb06b4b075505aae3f4f795d7fff9794e5ed96ce99b998"}, + {file = "websockets-13.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:038e7a0f1bfafc7bf52915ab3506b7a03d1e06381e9f60440c856e8918138151"}, + {file = "websockets-13.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fd038bc9e2c134847f1e0ce3191797fad110756e690c2fdd9702ed34e7a43abb"}, + {file = "websockets-13.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93b8c2008f372379fb6e5d2b3f7c9ec32f7b80316543fd3a5ace6610c5cde1b0"}, + {file = "websockets-13.0-cp313-cp313-win32.whl", hash = "sha256:851fd0afb3bc0b73f7c5b5858975d42769a5fdde5314f4ef2c106aec63100687"}, + {file = "websockets-13.0-cp313-cp313-win_amd64.whl", hash = "sha256:7d14901fdcf212804970c30ab9ee8f3f0212e620c7ea93079d6534863444fb4e"}, + {file = "websockets-13.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ae7a519a56a714f64c3445cabde9fc2fc927e7eae44f413eae187cddd9e54178"}, + {file = "websockets-13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5575031472ca87302aeb2ce2c2349f4c6ea978c86a9d1289bc5d16058ad4c10a"}, + {file = "websockets-13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9895df6cd0bfe79d09bcd1dbdc03862846f26fbd93797153de954306620c1d00"}, + {file = "websockets-13.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4de299c947a54fca9ce1c5fd4a08eb92ffce91961becb13bd9195f7c6e71b47"}, + {file = "websockets-13.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:05c25f7b849702950b6fd0e233989bb73a0d2bc83faa3b7233313ca395205f6d"}, + {file = "websockets-13.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ede95125a30602b1691a4b1da88946bf27dae283cf30f22cd2cb8ca4b2e0d119"}, + {file = "websockets-13.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:addf0a16e4983280efed272d8cb3b2e05f0051755372461e7d966b80a6554e16"}, + {file = "websockets-13.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:06b3186e97bf9a33921fa60734d5ed90f2a9b407cce8d23c7333a0984049ef61"}, + {file = "websockets-13.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:eae368cac85adc4c7dc3b0d5f84ffcca609d658db6447387300478e44db70796"}, + {file = "websockets-13.0-cp38-cp38-win32.whl", hash = "sha256:337837ac788d955728b1ab01876d72b73da59819a3388e1c5e8e05c3999f1afa"}, + {file = "websockets-13.0-cp38-cp38-win_amd64.whl", hash = "sha256:f66e00e42f25ca7e91076366303e11c82572ca87cc5aae51e6e9c094f315ab41"}, + {file = "websockets-13.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:94c1c02721139fe9940b38d28fb15b4b782981d800d5f40f9966264fbf23dcc8"}, + {file = "websockets-13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bd4ba86513430513e2aa25a441bb538f6f83734dc368a2c5d18afdd39097aa33"}, + {file = "websockets-13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a1ab8f0e0cadc5be5f3f9fa11a663957fecbf483d434762c8dfb8aa44948944a"}, + {file = "websockets-13.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3670def5d3dfd5af6f6e2b3b243ea8f1f72d8da1ef927322f0703f85c90d9603"}, + {file = "websockets-13.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6058b6be92743358885ad6dcdecb378fde4a4c74d4dd16a089d07580c75a0e80"}, + {file = "websockets-13.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:516062a0a8ef5ecbfa4acbaec14b199fc070577834f9fe3d40800a99f92523ca"}, + {file = "websockets-13.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:da7e918d82e7bdfc6f66d31febe1b2e28a1ca3387315f918de26f5e367f61572"}, + {file = "websockets-13.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9cc7f35dcb49a4e32db82a849fcc0714c4d4acc9d2273aded2d61f87d7f660b7"}, + {file = "websockets-13.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f5737c53eb2c8ed8f64b50d3dafd3c1dae739f78aa495a288421ac1b3de82717"}, + {file = "websockets-13.0-cp39-cp39-win32.whl", hash = "sha256:265e1f0d3f788ce8ef99dca591a1aec5263b26083ca0934467ad9a1d1181067c"}, + {file = "websockets-13.0-cp39-cp39-win_amd64.whl", hash = "sha256:4d70c89e3d3b347a7c4d3c33f8d323f0584c9ceb69b82c2ef8a174ca84ea3d4a"}, + {file = "websockets-13.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:602cbd010d8c21c8475f1798b705bb18567eb189c533ab5ef568bc3033fdf417"}, + {file = "websockets-13.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:bf8eb5dca4f484a60f5327b044e842e0d7f7cdbf02ea6dc4a4f811259f1f1f0b"}, + {file = "websockets-13.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89d795c1802d99a643bf689b277e8604c14b5af1bc0a31dade2cd7a678087212"}, + {file = "websockets-13.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:788bc841d250beccff67a20a5a53a15657a60111ef9c0c0a97fbdd614fae0fe2"}, + {file = "websockets-13.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7334752052532c156d28b8eaf3558137e115c7871ea82adff69b6d94a7bee273"}, + {file = "websockets-13.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e7a1963302947332c3039e3f66209ec73b1626f8a0191649e0713c391e9f5b0d"}, + {file = "websockets-13.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2e1cf4e1eb84b4fd74a47688e8b0940c89a04ad9f6937afa43d468e71128cd68"}, + {file = "websockets-13.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:c026ee729c4ce55708a14b839ba35086dfae265fc12813b62d34ce33f4980c1c"}, + {file = "websockets-13.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5f9d23fbbf96eefde836d9692670bfc89e2d159f456d499c5efcf6a6281c1af"}, + {file = "websockets-13.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ad684cb7efce227d756bae3e8484f2e56aa128398753b54245efdfbd1108f2c"}, + {file = "websockets-13.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1e10b3fbed7be4a59831d3a939900e50fcd34d93716e433d4193a4d0d1d335d"}, + {file = "websockets-13.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d42a818e634f789350cd8fb413a3f5eec1cf0400a53d02062534c41519f5125c"}, + {file = "websockets-13.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:e5ba5e9b332267d0f2c33ede390061850f1ac3ee6cd1bdcf4c5ea33ead971966"}, + {file = "websockets-13.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:f9af457ed593e35f467140d8b61d425495b127744a9d65d45a366f8678449a23"}, + {file = "websockets-13.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcea3eb58c09c3a31cc83b45c06d5907f02ddaf10920aaa6443975310f699b95"}, + {file = "websockets-13.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c210d1460dc8d326ffdef9703c2f83269b7539a1690ad11ae04162bc1878d33d"}, + {file = "websockets-13.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b32f38bc81170fd56d0482d505b556e52bf9078b36819a8ba52624bd6667e39e"}, + {file = "websockets-13.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:81a11a1ddd5320429db47c04d35119c3e674d215173d87aaeb06ae80f6e9031f"}, + {file = "websockets-13.0-py3-none-any.whl", hash = "sha256:dbbac01e80aee253d44c4f098ab3cc17c822518519e869b284cfbb8cd16cc9de"}, + {file = "websockets-13.0.tar.gz", hash = "sha256:b7bf950234a482b7461afdb2ec99eee3548ec4d53f418c7990bb79c620476602"}, ] [[package]] name = "wheel" -version = "0.43.0" +version = "0.44.0" description = "A built-package format for Python" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "wheel-0.43.0-py3-none-any.whl", hash = "sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81"}, - {file = "wheel-0.43.0.tar.gz", hash = "sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85"}, + {file = "wheel-0.44.0-py3-none-any.whl", hash = "sha256:2376a90c98cc337d18623527a97c31797bd02bad0033d41547043a1cbfbe448f"}, + {file = "wheel-0.44.0.tar.gz", hash = "sha256:a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49"}, ] [package.extras] @@ -2994,7 +3028,6 @@ test = ["pytest (>=6.0.0)", "setuptools (>=65)"] name = "wrapt" version = "1.16.0" description = "Module for decorators, wrappers and monkey patching." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3074,7 +3107,6 @@ files = [ name = "wsproto" version = "1.2.0" description = "WebSockets state-machine based protocol implementation" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -3087,14 +3119,13 @@ h11 = ">=0.9.0,<1" [[package]] name = "zipp" -version = "3.19.2" +version = "3.20.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.19.2-py3-none-any.whl", hash = "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c"}, - {file = "zipp-3.19.2.tar.gz", hash = "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19"}, + {file = "zipp-3.20.0-py3-none-any.whl", hash = "sha256:58da6168be89f0be59beb194da1250516fdaa062ccebd30127ac65d30045e10d"}, + {file = "zipp-3.20.0.tar.gz", hash = "sha256:0145e43d89664cfe1a2e533adc75adafed82fe2da404b4bbb6b026c0157bdb31"}, ] [package.extras] @@ -3104,4 +3135,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "6ccb5032cfabd61c45fd11151c91adfb3e4aae7260fadc7184248e65207d27f0" +content-hash = "72701f0d9fa4a2b3501b0a412888c8e063c14108795cbe64b554a98440c4d2b2" diff --git a/pyproject.toml b/pyproject.toml index 111c5c1913..bbe5a20f2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ httpx = ">=0.25.1,<1.0" twine = ">=4.0.0,<6.0" tomlkit = ">=0.12.4,<1.0" lazy_loader = ">=0.4" -reflex-chakra = ">=0.1.1a1" +reflex-chakra = ">=0.1.1a1,<0.6" [tool.poetry.group.dev.dependencies] pytest = ">=7.1.2,<8.0" From 503163bb77c2363aea0a3872c0efedf2f111f856 Mon Sep 17 00:00:00 2001 From: elvis kahoro Date: Fri, 23 Aug 2024 18:29:33 -0700 Subject: [PATCH 05/30] Add comments to DataList components (#3827) * fix: Adding missing comments to the data list * fix: Ran make pyi --- reflex/components/radix/themes/components/data_list.py | 5 +++++ reflex/components/radix/themes/components/data_list.pyi | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/reflex/components/radix/themes/components/data_list.py b/reflex/components/radix/themes/components/data_list.py index e5ce75464d..8b95d24c6b 100644 --- a/reflex/components/radix/themes/components/data_list.py +++ b/reflex/components/radix/themes/components/data_list.py @@ -29,6 +29,7 @@ class DataListItem(RadixThemesComponent): tag = "DataList.Item" + # The alignment of the data list item within its container. align: Var[Responsive[Literal["start", "center", "end", "baseline", "stretch"]]] @@ -37,12 +38,16 @@ class DataListLabel(RadixThemesComponent): tag = "DataList.Label" + # The width of the component width: Var[Responsive[str]] + # The minimum width of the component min_width: Var[Responsive[str]] + # The maximum width of the component max_width: Var[Responsive[str]] + # The color scheme for the DataList component. color_scheme: Var[LiteralAccentColor] diff --git a/reflex/components/radix/themes/components/data_list.pyi b/reflex/components/radix/themes/components/data_list.pyi index 4fe0541a25..8eb49e9f51 100644 --- a/reflex/components/radix/themes/components/data_list.pyi +++ b/reflex/components/radix/themes/components/data_list.pyi @@ -213,6 +213,7 @@ class DataListItem(RadixThemesComponent): Args: *children: Child components. + align: The alignment of the data list item within its container. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -363,6 +364,10 @@ class DataListLabel(RadixThemesComponent): Args: *children: Child components. + width: The width of the component + min_width: The minimum width of the component + max_width: The maximum width of the component + color_scheme: The color scheme for the DataList component. style: The style of the component. key: A unique key for the component. id: The id for the component. From 953f3367907c447c44cc4e0acf7fb18d84496a79 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 26 Aug 2024 13:28:18 -0700 Subject: [PATCH 06/30] fully migrate vars into new system (#3743) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fully migrate vars into new system * i hate rufffff (no i don't) * fix silly pright issues (except colormode and state) * remove all instances of Var.create * create immutable callable var and get rid of more base vars * implement hash for all functions * get reflex-web to compile * get it to compile reflex-web successfully * fix tests * fix pyi * use override from typing_extension * put plotly inside of a catch * dicts are unusable sadly * fix silly mistake * overload equals to special case immutable var * improve test_cond * solve more CI issues, down to 94 failures * down to 20 errors * down to 13 errors * pass all testcases * fix pyright issues * reorder things * use get origin more * use fixed_type logic * various optimizations * go back to passing test cases * use less boilerplate * remove unnecessary print message * remove weird comment * add test for html issue * add type ignore * fix another silly issue * override get all var data for var operations call * make integration tests pass * fix immutable call var * better logic for finding parent class * use even better logic for finding state wrt computedvar * only choose the ones that are defined in the same module * small dict to large dict * [REF-3591] Remove chakra-related files from immutable vars PR (#3821) * Add comments to html metadata component (#3731) * fix: add verification for path /404 (#3723) Co-authored-by: coolstorm * Use the new state name when setting `is_hydrated` to false (#3738) * Use `._is_mutable()` to account for parent state proxy (#3739) When a parent state proxy is set, also allow child StateProxy._self_mutable to override the parent's `_is_mutable()`. * bump to 0.5.9 (#3746) * add message when installing requirements.txt is needed for chosen template during init (#3750) * #3752 bugfix add domain for XAxis (#3764) * fix appharness app_source typing (#3777) * fix import clash between connectionToaster and hooks.useState (#3749) * use different registry when in china, fixes #3700 (#3702) * do not reload compilation if using local app in AppHarness (#3790) * do not reload if using local app * Update reflex/testing.py Co-authored-by: Masen Furer --------- Co-authored-by: Masen Furer * Bump memory on relevant actions (#3781) Co-authored-by: Alek Petuskey * [REF-3334] Validate Toast Props (#3793) * [REF-3536][REF-3537][REF-3541] Move chakra components into its repo(reflex-chakra) (#3798) * fix get_uuid_string_var (#3795) * minor State cleanup (#3768) * Fix code wrap in markdown (#3755) --------- Co-authored-by: Alek Petuskey Co-authored-by: Manas Gupta <53006261+Manas1820@users.noreply.github.com> Co-authored-by: coolstorm Co-authored-by: Thomas Brandého Co-authored-by: Shubhankar Dimri Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Co-authored-by: Khaleel Al-Adhami Co-authored-by: Alek Petuskey Co-authored-by: Elijah Ahianyo * pyproject.toml: bump to 0.6.0a1 * pyproject.toml: depend on reflex-chakra>=0.6.0a New Var system support in reflex-chakra 0.6.0a1 * poetry.lock: relock dependencies * integration: bump listening timeout to 1200 seconds * integration: bump listening timeout to 1800 seconds * Use cached_var_no_lock to avoid ImmutableVar deadlocks (#3835) * Use cached_var_no_lock to avoid ImmutableVar deadlocks ImmutableVar subclasses will always return the same value for a _var_name or _get_all_var_data so there is no need to use a per-class lock to protect a cached attribute on an instance, and doing so actually is observed to cause deadlocks when a particular _cached_var_name creates new LiteralVar instances and attempts to serialize them. * remove unused module global --------- Co-authored-by: Masen Furer Co-authored-by: Alek Petuskey Co-authored-by: Manas Gupta <53006261+Manas1820@users.noreply.github.com> Co-authored-by: coolstorm Co-authored-by: Thomas Brandého Co-authored-by: Shubhankar Dimri Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Co-authored-by: Alek Petuskey Co-authored-by: Elijah Ahianyo --- integration/test_form_submit.py | 2 + integration/test_tailwind.py | 2 +- integration/test_var_operations.py | 23 +- poetry.lock | 18 +- pyproject.toml | 4 +- reflex/__init__.py | 3 +- reflex/__init__.pyi | 2 +- reflex/app.py | 3 +- reflex/base.py | 5 +- reflex/compiler/compiler.py | 3 +- reflex/components/base/app_wrap.py | 6 +- reflex/components/base/app_wrap.pyi | 42 +- reflex/components/base/bare.py | 9 +- reflex/components/base/body.pyi | 42 +- reflex/components/base/document.pyi | 202 +- reflex/components/base/error_boundary.py | 16 +- reflex/components/base/error_boundary.pyi | 46 +- reflex/components/base/fragment.pyi | 42 +- reflex/components/base/head.pyi | 82 +- reflex/components/base/link.pyi | 82 +- reflex/components/base/meta.pyi | 162 +- reflex/components/base/script.py | 3 +- reflex/components/base/script.pyi | 54 +- reflex/components/component.py | 122 +- reflex/components/core/banner.py | 119 +- reflex/components/core/banner.pyi | 274 +-- .../components/core/client_side_routing.pyi | 82 +- reflex/components/core/clipboard.pyi | 46 +- reflex/components/core/cond.py | 57 +- reflex/components/core/debounce.pyi | 46 +- reflex/components/core/foreach.py | 3 +- reflex/components/core/html.pyi | 42 +- reflex/components/core/match.py | 72 +- reflex/components/core/upload.py | 40 +- reflex/components/core/upload.pyi | 183 +- reflex/components/datadisplay/code.py | 79 +- reflex/components/datadisplay/code.pyi | 44 +- reflex/components/datadisplay/dataeditor.py | 5 +- reflex/components/datadisplay/dataeditor.pyi | 76 +- reflex/components/el/element.pyi | 42 +- reflex/components/el/elements/base.pyi | 42 +- reflex/components/el/elements/forms.py | 30 +- reflex/components/el/elements/forms.pyi | 593 ++---- reflex/components/el/elements/inline.pyi | 1122 ++++------- reflex/components/el/elements/media.pyi | 842 +++----- reflex/components/el/elements/metadata.pyi | 242 +-- reflex/components/el/elements/other.pyi | 282 +-- reflex/components/el/elements/scripts.pyi | 122 +- reflex/components/el/elements/sectioning.pyi | 602 +++--- reflex/components/el/elements/tables.pyi | 402 ++-- reflex/components/el/elements/typography.pyi | 602 +++--- reflex/components/gridjs/datatable.py | 20 +- reflex/components/gridjs/datatable.pyi | 82 +- reflex/components/lucide/icon.pyi | 82 +- reflex/components/markdown/markdown.py | 46 +- reflex/components/markdown/markdown.pyi | 67 +- reflex/components/moment/moment.pyi | 46 +- reflex/components/next/base.pyi | 42 +- reflex/components/next/image.py | 4 - reflex/components/next/image.pyi | 50 +- reflex/components/next/link.pyi | 42 +- reflex/components/next/video.pyi | 42 +- reflex/components/plotly/plotly.pyi | 82 +- .../components/radix/primitives/accordion.py | 11 +- .../components/radix/primitives/accordion.pyi | 284 +-- reflex/components/radix/primitives/base.pyi | 82 +- reflex/components/radix/primitives/drawer.pyi | 416 ++-- reflex/components/radix/primitives/form.pyi | 420 ++-- .../components/radix/primitives/progress.pyi | 202 +- reflex/components/radix/primitives/slider.pyi | 206 +- reflex/components/radix/themes/base.py | 12 +- reflex/components/radix/themes/base.pyi | 282 +-- reflex/components/radix/themes/color_mode.py | 10 +- reflex/components/radix/themes/color_mode.pyi | 134 +- .../radix/themes/components/alert_dialog.pyi | 290 +-- .../radix/themes/components/aspect_ratio.pyi | 42 +- .../radix/themes/components/avatar.pyi | 42 +- .../radix/themes/components/badge.pyi | 42 +- .../radix/themes/components/button.pyi | 42 +- .../radix/themes/components/callout.pyi | 202 +- .../radix/themes/components/card.pyi | 42 +- .../radix/themes/components/checkbox.py | 5 +- .../radix/themes/components/checkbox.pyi | 134 +- .../themes/components/checkbox_cards.pyi | 82 +- .../themes/components/checkbox_group.pyi | 82 +- .../radix/themes/components/context_menu.pyi | 342 ++-- .../radix/themes/components/data_list.pyi | 162 +- .../radix/themes/components/dialog.pyi | 296 ++- .../radix/themes/components/dropdown_menu.pyi | 348 ++-- .../radix/themes/components/hover_card.pyi | 166 +- .../radix/themes/components/icon_button.pyi | 42 +- .../radix/themes/components/inset.pyi | 42 +- .../radix/themes/components/popover.pyi | 176 +- .../radix/themes/components/progress.pyi | 42 +- .../radix/themes/components/radio.pyi | 42 +- .../radix/themes/components/radio_cards.pyi | 84 +- .../radix/themes/components/radio_group.py | 48 +- .../radix/themes/components/radio_group.pyi | 166 +- .../radix/themes/components/scroll_area.pyi | 42 +- .../themes/components/segmented_control.pyi | 86 +- .../radix/themes/components/select.pyi | 386 ++-- .../radix/themes/components/separator.py | 5 +- .../radix/themes/components/separator.pyi | 42 +- .../radix/themes/components/skeleton.pyi | 42 +- .../radix/themes/components/slider.pyi | 48 +- .../radix/themes/components/spinner.pyi | 42 +- .../radix/themes/components/switch.pyi | 46 +- .../radix/themes/components/table.pyi | 282 +-- .../radix/themes/components/tabs.pyi | 210 +- .../radix/themes/components/text_area.pyi | 52 +- .../radix/themes/components/text_field.py | 3 +- .../radix/themes/components/text_field.pyi | 142 +- .../radix/themes/components/tooltip.pyi | 48 +- .../components/radix/themes/layout/base.pyi | 42 +- reflex/components/radix/themes/layout/box.pyi | 42 +- .../components/radix/themes/layout/center.pyi | 42 +- .../radix/themes/layout/container.py | 5 +- .../radix/themes/layout/container.pyi | 42 +- .../components/radix/themes/layout/flex.pyi | 42 +- .../components/radix/themes/layout/grid.pyi | 42 +- .../components/radix/themes/layout/list.pyi | 202 +- .../components/radix/themes/layout/section.py | 5 +- .../radix/themes/layout/section.pyi | 42 +- .../components/radix/themes/layout/spacer.pyi | 42 +- .../components/radix/themes/layout/stack.pyi | 122 +- .../radix/themes/typography/blockquote.pyi | 42 +- .../radix/themes/typography/code.pyi | 42 +- .../radix/themes/typography/heading.pyi | 42 +- .../radix/themes/typography/link.pyi | 42 +- .../radix/themes/typography/text.pyi | 282 +-- reflex/components/react_player/audio.pyi | 90 +- .../components/react_player/react_player.pyi | 90 +- reflex/components/react_player/video.pyi | 90 +- reflex/components/recharts/cartesian.py | 40 +- reflex/components/recharts/cartesian.pyi | 734 +++---- reflex/components/recharts/charts.py | 5 +- reflex/components/recharts/charts.pyi | 432 ++-- reflex/components/recharts/general.py | 15 +- reflex/components/recharts/general.pyi | 202 +- reflex/components/recharts/polar.py | 21 +- reflex/components/recharts/polar.pyi | 168 +- reflex/components/recharts/recharts.pyi | 82 +- reflex/components/sonner/toast.py | 15 +- reflex/components/sonner/toast.pyi | 42 +- reflex/components/suneditor/editor.pyi | 72 +- reflex/components/tags/iter_tag.py | 21 +- reflex/components/tags/tag.py | 13 +- reflex/event.py | 77 +- reflex/experimental/__init__.py | 2 - reflex/experimental/client_state.py | 40 +- reflex/experimental/layout.pyi | 204 +- reflex/experimental/vars/base.py | 583 ------ reflex/experimental/vars/function.py | 290 --- reflex/experimental/vars/number.py | 1458 -------------- .../{experimental/vars => ivars}/__init__.py | 0 reflex/ivars/base.py | 1794 +++++++++++++++++ reflex/ivars/function.py | 223 ++ reflex/ivars/number.py | 1203 +++++++++++ reflex/{experimental/vars => ivars}/object.py | 634 +++--- .../{experimental/vars => ivars}/sequence.py | 1428 ++++++------- reflex/state.py | 69 +- reflex/style.py | 70 +- reflex/utils/format.py | 66 +- reflex/utils/pyi_generator.py | 2 +- reflex/utils/types.py | 10 +- reflex/vars.py | 63 +- reflex/vars.pyi | 5 +- scripts/integration.sh | 2 +- tests/components/base/test_bare.py | 15 +- tests/components/base/test_script.py | 10 +- tests/components/core/test_banner.py | 7 +- tests/components/core/test_colors.py | 52 +- tests/components/core/test_cond.py | 25 +- tests/components/core/test_debounce.py | 14 +- tests/components/core/test_foreach.py | 2 +- tests/components/core/test_html.py | 23 +- tests/components/core/test_match.py | 62 +- tests/components/datadisplay/test_code.py | 2 +- tests/components/forms/test_uploads.py | 36 +- tests/components/media/test_image.py | 13 +- tests/components/test_component.py | 132 +- tests/components/test_component_state.py | 4 +- tests/components/test_tag.py | 11 +- tests/test_app.py | 8 +- tests/test_event.py | 66 +- tests/test_state.py | 48 +- tests/test_style.py | 86 +- tests/test_var.py | 56 +- tests/utils/test_format.py | 27 +- 189 files changed, 11534 insertions(+), 14807 deletions(-) delete mode 100644 reflex/experimental/vars/base.py delete mode 100644 reflex/experimental/vars/function.py delete mode 100644 reflex/experimental/vars/number.py rename reflex/{experimental/vars => ivars}/__init__.py (100%) create mode 100644 reflex/ivars/base.py create mode 100644 reflex/ivars/function.py create mode 100644 reflex/ivars/number.py rename reflex/{experimental/vars => ivars}/object.py (55%) rename reflex/{experimental/vars => ivars}/sequence.py (50%) diff --git a/integration/test_form_submit.py b/integration/test_form_submit.py index 7858cce770..acc6bca964 100644 --- a/integration/test_form_submit.py +++ b/integration/test_form_submit.py @@ -272,6 +272,8 @@ async def get_form_data(): form_data = format.collect_form_dict_names(form_data) + print(form_data) + assert form_data["name_input"] == "foo" assert form_data["pin_input"] == pin_values assert form_data["number_input"] == "-3" diff --git a/integration/test_tailwind.py b/integration/test_tailwind.py index 491eba5386..a3d90e6452 100644 --- a/integration/test_tailwind.py +++ b/integration/test_tailwind.py @@ -109,7 +109,7 @@ def test_tailwind_app(tailwind_app: AppHarness, tailwind_disabled: bool): assert len(paragraphs) == 3 for p in paragraphs: assert tailwind_app.poll_for_content(p, exp_not_equal="") == PARAGRAPH_TEXT - assert p.value_of_css_property("font-family") == "monospace" + assert p.value_of_css_property("font-family") == '"monospace"' if tailwind_disabled: # expect default color, not "text-red-500" from tailwind utility class assert p.value_of_css_property("color") not in TEXT_RED_500_COLOR diff --git a/integration/test_var_operations.py b/integration/test_var_operations.py index e88449b69a..7a8f5473a6 100644 --- a/integration/test_var_operations.py +++ b/integration/test_var_operations.py @@ -17,6 +17,8 @@ def VarOperations(): import reflex_chakra as rc import reflex as rx + from reflex.ivars.base import LiteralVar + from reflex.ivars.sequence import ArrayVar class VarOperationState(rx.State): int_var1: int = 10 @@ -31,8 +33,8 @@ class VarOperationState(rx.State): str_var2: str = "second" str_var3: str = "ThIrD" str_var4: str = "a long string" - dict1: Dict = {1: 2} - dict2: Dict = {3: 4} + dict1: Dict[int, int] = {1: 2} + dict2: Dict[int, int] = {3: 4} html_str: str = "
hello
" app = rx.App(state=rx.State) @@ -549,29 +551,29 @@ def index(): "second", query=[VarOperationState.str_var2], ), - rx.text(rx.Var.range(2, 5).join(","), id="list_join_range1"), - rx.text(rx.Var.range(2, 10, 2).join(","), id="list_join_range2"), - rx.text(rx.Var.range(5, 0, -1).join(","), id="list_join_range3"), - rx.text(rx.Var.range(0, 3).join(","), id="list_join_range4"), + rx.text(ArrayVar.range(2, 5).join(","), id="list_join_range1"), + rx.text(ArrayVar.range(2, 10, 2).join(","), id="list_join_range2"), + rx.text(ArrayVar.range(5, 0, -1).join(","), id="list_join_range3"), + rx.text(ArrayVar.range(0, 3).join(","), id="list_join_range4"), rx.box( rx.foreach( - rx.Var.range(0, 2), + ArrayVar.range(0, 2), lambda x: rx.text(VarOperationState.list1[x], as_="p"), ), id="foreach_list_arg", ), rx.box( rx.foreach( - rx.Var.range(0, 2), + ArrayVar.range(0, 2), lambda x, ix: rx.text(VarOperationState.list1[ix], as_="p"), ), id="foreach_list_ix", ), rx.box( rx.foreach( - rx.Var.create_safe(list(range(0, 3))).to(List[int]), + LiteralVar.create(list(range(0, 3))).to(ArrayVar, List[int]), lambda x: rx.foreach( - rx.Var.range(x), + ArrayVar.range(x), lambda y: rx.text(VarOperationState.list1[y], as_="p"), ), ), @@ -785,6 +787,7 @@ def test_var_operations(driver, var_operations: AppHarness): ] for tag, expected in tests: + print(tag) assert driver.find_element(By.ID, tag).text == expected # Highlight component with var query (does not plumb ID) diff --git a/poetry.lock b/poetry.lock index bfcdc929b4..c67e72d6a6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -779,13 +779,13 @@ license = ["ukkonen"] [[package]] name = "idna" -version = "3.7" +version = "3.8" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, + {file = "idna-3.8-py3-none-any.whl", hash = "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac"}, + {file = "idna-3.8.tar.gz", hash = "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"}, ] [[package]] @@ -2153,17 +2153,17 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" [[package]] name = "reflex-chakra" -version = "0.1.1a1" +version = "0.6.0a1" description = "reflex using chakra components" optional = false python-versions = "<4.0,>=3.8" files = [ - {file = "reflex_chakra-0.1.1a1-py3-none-any.whl", hash = "sha256:e27a3ffb171802a5309a4a7215e7f894810a4a8f0753e2779b5a7010ef36173c"}, - {file = "reflex_chakra-0.1.1a1.tar.gz", hash = "sha256:f224d42255fde675a65a622cdb19bff0e073edafe94b15019bfd8b21a461801c"}, + {file = "reflex_chakra-0.6.0a1-py3-none-any.whl", hash = "sha256:68c22e00591530c38acedb20ee9c192109a3591f3e58fb3a51c9e939b13c66ad"}, + {file = "reflex_chakra-0.6.0a1.tar.gz", hash = "sha256:9061790bb59134cf2200461de45f582987cef29032f82864165a3c5badb86cf5"}, ] [package.dependencies] -reflex = ">=0.5.9" +reflex = ">=0.6.0a" [[package]] name = "reflex-hosting-cli" @@ -3135,4 +3135,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "72701f0d9fa4a2b3501b0a412888c8e063c14108795cbe64b554a98440c4d2b2" +content-hash = "4b609c46858e2a6766b9c9b759833a1366dbe7bb64b3332f339a9c9f713a870f" diff --git a/pyproject.toml b/pyproject.toml index bbe5a20f2c..92a096f7bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "reflex" -version = "0.5.9" +version = "0.6.0a1" description = "Web apps in pure Python." license = "Apache-2.0" authors = [ @@ -61,7 +61,7 @@ httpx = ">=0.25.1,<1.0" twine = ">=4.0.0,<6.0" tomlkit = ">=0.12.4,<1.0" lazy_loader = ">=0.4" -reflex-chakra = ">=0.1.1a1,<0.6" +reflex-chakra = ">=0.6.0a" [tool.poetry.group.dev.dependencies] pytest = ">=7.1.2,<8.0" diff --git a/reflex/__init__.py b/reflex/__init__.py index a4f6dad333..abfec245cc 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -324,7 +324,7 @@ "style": ["Style", "toggle_color_mode"], "utils.imports": ["ImportVar"], "utils.serializers": ["serializer"], - "vars": ["cached_var", "Var"], + "vars": ["Var"], } _SUBMODULES: set[str] = { @@ -338,6 +338,7 @@ "testing", "utils", "vars", + "ivars", "config", "compiler", } diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 2c89545db3..c7aefd4127 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -12,6 +12,7 @@ from . import compiler as compiler from . import components as components from . import config as config from . import event as event +from . import ivars as ivars from . import model as model from . import style as style from . import testing as testing @@ -189,7 +190,6 @@ from .style import toggle_color_mode as toggle_color_mode from .utils.imports import ImportVar as ImportVar from .utils.serializers import serializer as serializer from .vars import Var as Var -from .vars import cached_var as cached_var del compat RADIX_THEMES_MAPPING: dict diff --git a/reflex/app.py b/reflex/app.py index c9c84b24b2..3ce4413149 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -465,7 +465,7 @@ def _generate_component(component: Component | ComponentCallable) -> Component: raise except TypeError as e: message = str(e) - if "BaseVar" in message or "ComputedVar" in message: + if "Var" in message: raise VarOperationTypeError( "You may be trying to use an invalid Python function on a state var. " "When referencing a var inside your render code, only limited var operations are supported. " @@ -1128,6 +1128,7 @@ def _process_background( Task if the event was backgroundable, otherwise None """ substate, handler = state._get_event_handler(event) + if not handler.is_background: return None diff --git a/reflex/base.py b/reflex/base.py index 2eca636003..5a2a6d2a98 100644 --- a/reflex/base.py +++ b/reflex/base.py @@ -110,14 +110,15 @@ def add_field(cls, var: Any, default_value: Any): var: The variable to add a pydantic field for. default_value: The default value of the field """ + var_name = var._var_name.split(".")[-1] new_field = ModelField.infer( - name=var._var_name, + name=var_name, value=default_value, annotation=var._var_type, class_validators=None, config=cls.__config__, # type: ignore ) - cls.__fields__.update({var._var_name: new_field}) + cls.__fields__.update({var_name: new_field}) def get_value(self, key: str) -> Any: """Get the value of a field. diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index fe7270ee76..0b6cb17023 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -18,6 +18,7 @@ StatefulComponent, ) from reflex.config import get_config +from reflex.ivars.base import ImmutableVar from reflex.state import BaseState from reflex.style import SYSTEM_COLOR_MODE from reflex.utils.exec import is_prod_mode @@ -81,7 +82,7 @@ def _compile_contexts(state: Optional[Type[BaseState]], theme: Component | None) The compiled context file. """ appearance = getattr(theme, "appearance", None) - if appearance is None or Var.create_safe(appearance)._var_name == "inherit": + if appearance is None or str(ImmutableVar.create_safe(appearance)) == "inherit": appearance = SYSTEM_COLOR_MODE last_compiled_time = str(datetime.now()) diff --git a/reflex/components/base/app_wrap.py b/reflex/components/base/app_wrap.py index 76bf2d99be..7d6a085b4c 100644 --- a/reflex/components/base/app_wrap.py +++ b/reflex/components/base/app_wrap.py @@ -2,7 +2,7 @@ from reflex.components.base.fragment import Fragment from reflex.components.component import Component -from reflex.vars import Var +from reflex.ivars.base import ImmutableVar class AppWrap(Fragment): @@ -15,6 +15,4 @@ def create(cls) -> Component: Returns: A new AppWrap component containing {children}. """ - return super().create( - Var.create("{children}", _var_is_local=False, _var_is_string=False) - ) + return super().create(ImmutableVar.create("children")) diff --git a/reflex/components/base/app_wrap.pyi b/reflex/components/base/app_wrap.pyi index f57f46b026..576f8cd69a 100644 --- a/reflex/components/base/app_wrap.pyi +++ b/reflex/components/base/app_wrap.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.base.fragment import Fragment from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class AppWrap(Fragment): @overload @@ -22,50 +22,40 @@ class AppWrap(Fragment): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AppWrap": diff --git a/reflex/components/base/bare.py b/reflex/components/base/bare.py index 0de7307dbc..dca9a92870 100644 --- a/reflex/components/base/bare.py +++ b/reflex/components/base/bare.py @@ -7,13 +7,14 @@ from reflex.components.component import Component from reflex.components.tags import Tag from reflex.components.tags.tagless import Tagless +from reflex.ivars.base import ImmutableVar from reflex.vars import Var class Bare(Component): """A component with no tag.""" - contents: Var[str] + contents: Var[Any] @classmethod def create(cls, contents: Any) -> Component: @@ -25,13 +26,17 @@ def create(cls, contents: Any) -> Component: Returns: The component. """ - if isinstance(contents, Var) and contents._var_data: + if isinstance(contents, ImmutableVar): + return cls(contents=contents) + if isinstance(contents, Var) and contents._get_all_var_data(): contents = contents.to(str) else: contents = str(contents) if contents is not None else "" return cls(contents=contents) # type: ignore def _render(self) -> Tag: + if isinstance(self.contents, ImmutableVar): + return Tagless(contents=f"{{{str(self.contents)}}}") return Tagless(contents=str(self.contents)) def _get_vars(self, include_children: bool = False) -> Iterator[Var]: diff --git a/reflex/components/base/body.pyi b/reflex/components/base/body.pyi index 443712ac9e..57ff1b7b7a 100644 --- a/reflex/components/base/body.pyi +++ b/reflex/components/base/body.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Body(Component): @overload @@ -22,50 +22,40 @@ class Body(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Body": diff --git a/reflex/components/base/document.pyi b/reflex/components/base/document.pyi index 428decc8ea..77065d8450 100644 --- a/reflex/components/base/document.pyi +++ b/reflex/components/base/document.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class NextDocumentLib(Component): @overload @@ -22,50 +22,40 @@ class NextDocumentLib(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "NextDocumentLib": @@ -99,50 +89,40 @@ class Html(NextDocumentLib): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Html": @@ -175,50 +155,40 @@ class DocumentHead(NextDocumentLib): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DocumentHead": @@ -251,50 +221,40 @@ class Main(NextDocumentLib): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Main": @@ -327,50 +287,40 @@ class NextScript(NextDocumentLib): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "NextScript": diff --git a/reflex/components/base/error_boundary.py b/reflex/components/base/error_boundary.py index e90f0ed63b..058976498a 100644 --- a/reflex/components/base/error_boundary.py +++ b/reflex/components/base/error_boundary.py @@ -9,6 +9,8 @@ from reflex.components.el import div, p from reflex.constants import Hooks, Imports from reflex.event import EventChain, EventHandler +from reflex.ivars.base import ImmutableVar +from reflex.ivars.function import FunctionVar from reflex.utils.imports import ImportVar from reflex.vars import Var @@ -20,14 +22,14 @@ class ErrorBoundary(Component): tag = "ErrorBoundary" # Fired when the boundary catches an error. - on_error: EventHandler[lambda error, info: [error, info]] = Var.create_safe( # type: ignore - "logFrontendError", _var_is_string=False, _var_is_local=False - ).to(EventChain) + on_error: EventHandler[lambda error, info: [error, info]] = ImmutableVar( # type: ignore + "logFrontendError" + ).to(FunctionVar, EventChain) # Rendered instead of the children when an error is caught. - Fallback_component: Var[Component] = Var.create_safe( - "Fallback", _var_is_string=False, _var_is_local=False - ).to(Component) + Fallback_component: Var[Component] = ImmutableVar.create_safe("Fallback")._replace( + _var_type=Component + ) def add_imports(self) -> dict[str, list[ImportVar]]: """Add imports for the component. @@ -56,7 +58,7 @@ def add_custom_code(self) -> List[str]: fallback_container = div( p("Ooops...Unknown Reflex error has occured:"), p( - Var.create("error.message", _var_is_local=False, _var_is_string=False), + ImmutableVar.create("error.message"), color="red", ), p("Please contact the support."), diff --git a/reflex/components/base/error_boundary.pyi b/reflex/components/base/error_boundary.pyi index 5bc260b3cd..4777b09e99 100644 --- a/reflex/components/base/error_boundary.pyi +++ b/reflex/components/base/error_boundary.pyi @@ -9,7 +9,7 @@ from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportVar -from reflex.vars import BaseVar, Var +from reflex.vars import Var class ErrorBoundary(Component): def add_imports(self) -> dict[str, list[ImportVar]]: ... @@ -27,53 +27,41 @@ class ErrorBoundary(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_error: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ErrorBoundary": diff --git a/reflex/components/base/fragment.pyi b/reflex/components/base/fragment.pyi index 8c6f4c8919..fae72cc9c6 100644 --- a/reflex/components/base/fragment.pyi +++ b/reflex/components/base/fragment.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Fragment(Component): @overload @@ -22,50 +22,40 @@ class Fragment(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Fragment": diff --git a/reflex/components/base/head.pyi b/reflex/components/base/head.pyi index b5477259d0..0414571378 100644 --- a/reflex/components/base/head.pyi +++ b/reflex/components/base/head.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component, MemoizationLeaf from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class NextHeadLib(Component): @overload @@ -22,50 +22,40 @@ class NextHeadLib(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "NextHeadLib": @@ -98,50 +88,40 @@ class Head(NextHeadLib, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Head": diff --git a/reflex/components/base/link.pyi b/reflex/components/base/link.pyi index ecee03ef2b..80388a3272 100644 --- a/reflex/components/base/link.pyi +++ b/reflex/components/base/link.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class RawLink(Component): @overload @@ -24,50 +24,40 @@ class RawLink(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RawLink": @@ -109,50 +99,40 @@ class ScriptTag(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ScriptTag": diff --git a/reflex/components/base/meta.pyi b/reflex/components/base/meta.pyi index 10e357a2ea..372d202f9d 100644 --- a/reflex/components/base/meta.pyi +++ b/reflex/components/base/meta.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Title(Component): def render(self) -> dict: ... @@ -23,50 +23,40 @@ class Title(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Title": @@ -104,50 +94,40 @@ class Meta(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Meta": @@ -190,50 +170,40 @@ class Description(Meta): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Description": @@ -276,50 +246,40 @@ class Image(Meta): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Image": diff --git a/reflex/components/base/script.py b/reflex/components/base/script.py index bef2f036b3..7b0596966c 100644 --- a/reflex/components/base/script.py +++ b/reflex/components/base/script.py @@ -9,6 +9,7 @@ from reflex.components.component import Component from reflex.event import EventHandler +from reflex.ivars.base import LiteralVar from reflex.vars import Var @@ -31,7 +32,7 @@ class Script(Component): # When the script will execute: afterInteractive (defer-like behavior) | beforeInteractive | lazyOnload (async-like behavior) strategy: Var[Literal["afterInteractive", "beforeInteractive", "lazyOnload"]] = ( - Var.create_safe("afterInteractive", _var_is_string=True) + LiteralVar.create("afterInteractive") ) # Triggered when the script is loading diff --git a/reflex/components/base/script.pyi b/reflex/components/base/script.pyi index 5165f5fd48..311485b660 100644 --- a/reflex/components/base/script.pyi +++ b/reflex/components/base/script.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Script(Component): @overload @@ -29,59 +29,43 @@ class Script(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_error: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_load: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_load: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_ready: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Script": diff --git a/reflex/components/component.py b/reflex/components/component.py index bb3e9053f2..0a9da1adca 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -43,11 +43,12 @@ call_event_handler, get_handler_args, ) +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.style import Style, format_as_emotion from reflex.utils import console, format, imports, types from reflex.utils.imports import ImportDict, ImportVar, ParsedImportDict, parse_imports from reflex.utils.serializers import serializer -from reflex.vars import BaseVar, Var, VarData +from reflex.vars import BaseVar, ImmutableVarData, Var, VarData class BaseComponent(Base, ABC): @@ -320,9 +321,8 @@ def __init_subclass__(cls, **kwargs): # Set default values for any props. if types._issubclass(field.type_, Var): field.required = False - field.default = Var.create( - field.default, _var_is_string=isinstance(field.default, str) - ) + if field.default is not None: + field.default = LiteralVar.create(field.default) elif types._issubclass(field.type_, EventHandler): field.required = False @@ -351,10 +351,7 @@ def __init__(self, *args, **kwargs): "id": kwargs.get("id"), "children": children, **{ - prop: Var.create( - kwargs[prop], - _var_is_string=False if isinstance(kwargs[prop], str) else None, - ) + prop: LiteralVar.create(kwargs[prop]) for prop in self.get_initial_props() if prop in kwargs }, @@ -401,10 +398,10 @@ def __init__(self, *args, **kwargs): passed_types = None try: # Try to create a var from the value. - kwargs[key] = Var.create( - value, - _var_is_string=False if isinstance(value, str) else None, - ) + if isinstance(value, Var): + kwargs[key] = value + else: + kwargs[key] = LiteralVar.create(value) # Check that the var type is not None. if kwargs[key] is None: @@ -448,7 +445,6 @@ def __init__(self, *args, **kwargs): raise TypeError( f"Invalid var passed for prop {type(self).__name__}.{key}, expected type {expected_type}, got value {value_name} of type {passed_types or passed_type}." ) - # Check if the key is an event trigger. if key in component_specific_triggers: # Temporarily disable full control for event triggers. @@ -513,7 +509,9 @@ def _create_event_chain( # If it's an event chain var, return it. if isinstance(value, Var): if value._var_type is not EventChain: - raise ValueError(f"Invalid event chain: {value}") + raise ValueError( + f"Invalid event chain: {repr(value)} of type {type(value)}" + ) return value elif isinstance(value, EventChain): # Trust that the caller knows what they're doing passing an EventChain directly @@ -692,9 +690,7 @@ def _render(self, props: dict[str, Any] | None = None) -> Tag: # Add ref to element if `id` is not None. ref = self.get_ref() if ref is not None: - props["ref"] = Var.create( - ref, _var_is_local=False, _var_is_string=False - ) + props["ref"] = ImmutableVar.create(ref) else: props = props.copy() @@ -809,7 +805,7 @@ def validate_children(children): else ( Fragment.create(*child) if isinstance(child, tuple) - else Bare.create(contents=Var.create(child, _var_is_string=True)) + else Bare.create(contents=LiteralVar.create(child)) ) ) for child in children @@ -936,7 +932,12 @@ def _get_style(self) -> dict: """ if isinstance(self.style, Var): return {"css": self.style} - return {"css": Var.create(format_as_emotion(self.style))} + emotion_style = format_as_emotion(self.style) + return ( + {"css": LiteralVar.create(emotion_style)} + if emotion_style is not None + else {} + ) def render(self) -> Dict: """Render the component. @@ -1091,10 +1092,10 @@ def _get_vars(self, include_children: bool = False) -> list[Var]: # Style keeps track of its own VarData instance, so embed in a temp Var that is yielded. if isinstance(self.style, dict) and self.style or isinstance(self.style, Var): vars.append( - BaseVar( + ImmutableVar( _var_name="style", _var_type=str, - _var_data=self.style._var_data, + _var_data=ImmutableVarData.merge(self.style._var_data), ) ) @@ -1113,10 +1114,8 @@ def _get_vars(self, include_children: bool = False) -> list[Var]: vars.append(comp_prop) elif isinstance(comp_prop, str): # Collapse VarData encoded in f-strings. - var = Var.create_safe( - comp_prop, _var_is_string=isinstance(comp_prop, str) - ) - if var._var_data is not None: + var = LiteralVar.create(comp_prop) + if var._get_all_var_data() is not None: vars.append(var) # Get Vars associated with children. @@ -1124,7 +1123,8 @@ def _get_vars(self, include_children: bool = False) -> list[Var]: for child in self.children: if not isinstance(child, Component): continue - vars.extend(child._get_vars(include_children=include_children)) + child_vars = child._get_vars(include_children=include_children) + vars.extend(child_vars) return vars @@ -1329,13 +1329,13 @@ def _get_hooks_imports(self) -> ParsedImportDict: other_imports = [] user_hooks = self._get_hooks() - if ( - user_hooks is not None - and isinstance(user_hooks, Var) - and user_hooks._var_data is not None - and user_hooks._var_data.imports - ): - other_imports.append(user_hooks._var_data.imports) + user_hooks_data = ( + VarData.merge(user_hooks._get_all_var_data()) + if user_hooks is not None and isinstance(user_hooks, Var) + else None + ) + if user_hooks_data is not None: + other_imports.append(user_hooks_data.imports) other_imports.extend( hook_imports for hook_imports in self._get_added_hooks().values() ) @@ -1358,8 +1358,9 @@ def _get_imports(self) -> ParsedImportDict: event_imports = Imports.EVENTS if self.event_triggers else {} # Collect imports from Vars used directly by this component. + var_datas = [var._get_all_var_data() for var in self._get_vars()] var_imports = [ - var._var_data.imports for var in self._get_vars() if var._var_data + var_data.imports for var_data in var_datas if var_data is not None ] added_import_dicts: list[ParsedImportDict] = [] @@ -1427,7 +1428,7 @@ def _get_ref_hook(self) -> str | None: """ ref = self.get_ref() if ref is not None: - return f"const {ref} = useRef(null); {str(Var.create_safe(ref, _var_is_string=False).as_ref())} = {ref};" + return f"const {ref} = useRef(null); {str(ImmutableVar.create_safe(ref).as_ref())} = {ref};" def _get_vars_hooks(self) -> dict[str, None]: """Get the hooks required by vars referenced in this component. @@ -1437,8 +1438,13 @@ def _get_vars_hooks(self) -> dict[str, None]: """ vars_hooks = {} for var in self._get_vars(): - if var._var_data: - vars_hooks.update(var._var_data.hooks) + var_data = var._get_all_var_data() + if var_data is not None: + vars_hooks.update( + var_data.hooks + if isinstance(var_data.hooks, dict) + else {k: None for k in var_data.hooks} + ) return vars_hooks def _get_events_hooks(self) -> dict[str, None]: @@ -1487,11 +1493,12 @@ def _get_added_hooks(self) -> dict[str, ImportDict]: def extract_var_hooks(hook: Var): _imports = {} - if hook._var_data is not None: - for sub_hook in hook._var_data.hooks: + var_data = VarData.merge(hook._get_all_var_data()) + if var_data is not None: + for sub_hook in var_data.hooks: code[sub_hook] = {} - if hook._var_data.imports: - _imports = hook._var_data.imports + if var_data.imports: + _imports = var_data.imports if str(hook) in code: code[str(hook)] = imports.merge_imports(code[str(hook)], _imports) else: @@ -1505,6 +1512,7 @@ def extract_var_hooks(hook: Var): extract_var_hooks(hook) else: code[hook] = {} + return code def _get_hooks(self) -> str | None: @@ -1561,7 +1569,7 @@ def get_ref(self) -> str | None: The ref name. """ # do not create a ref if the id is dynamic or unspecified - if self.id is None or isinstance(self.id, BaseVar): + if self.id is None or isinstance(self.id, (BaseVar, ImmutableVar)): return None return format.format_ref(self.id) @@ -1707,7 +1715,7 @@ def __init__(self, *args, **kwargs): # Handle subclasses of Base. if isinstance(value, Base): - base_value = Var.create(value) + base_value = LiteralVar.create(value) # Track hooks and imports associated with Component instances. if base_value is not None and isinstance(value, Component): @@ -1721,7 +1729,7 @@ def __init__(self, *args, **kwargs): else: value = base_value else: - value = Var.create(value, _var_is_string=isinstance(value, str)) + value = LiteralVar.create(value) # Set the prop. self.props[format.to_camel_case(key)] = value @@ -1800,19 +1808,19 @@ def _render(self) -> Tag: """ return super()._render(props=self.props) - def get_prop_vars(self) -> List[BaseVar]: + def get_prop_vars(self) -> List[ImmutableVar]: """Get the prop vars. Returns: The prop vars. """ return [ - BaseVar( + ImmutableVar( _var_name=name, _var_type=( prop._var_type if types._isinstance(prop, Var) else type(prop) ), - ) + ).guess_type() for name, prop in self.props.items() ] @@ -1825,9 +1833,11 @@ def _get_vars(self, include_children: bool = False) -> list[Var]: Returns: Each var referenced by the component (props, styles, event handlers). """ - return super()._get_vars(include_children=include_children) + [ - prop for prop in self.props.values() if isinstance(prop, Var) - ] + return ( + super()._get_vars(include_children=include_children) + + [prop for prop in self.props.values() if isinstance(prop, Var)] + + self.get_component(self)._get_vars(include_children=include_children) + ) @lru_cache(maxsize=None) # noqa def get_component(self) -> Component: @@ -1981,7 +1991,7 @@ def create(cls, component: Component) -> StatefulComponent | None: if not should_memoize: # Determine if any Vars have associated data. for prop_var in component._get_vars(): - if prop_var._var_data: + if prop_var._get_all_var_data(): should_memoize = True break @@ -1996,7 +2006,7 @@ def create(cls, component: Component) -> StatefulComponent | None: should_memoize = True break child = cls._child_var(child) - if isinstance(child, Var) and child._var_data: + if isinstance(child, Var) and child._get_all_var_data(): should_memoize = True break @@ -2187,12 +2197,12 @@ def _get_memoized_event_triggers( # Calculate Var dependencies accessed by the handler for useCallback dep array. var_deps = ["addEvents", "Event"] for arg in event_args: - if arg._var_data is None: + if arg._get_all_var_data() is None: continue - for hook in arg._var_data.hooks: + for hook in arg._get_all_var_data().hooks: var_deps.extend(cls._get_hook_deps(hook)) memo_var_data = VarData.merge( - *[var._var_data for var in event_args], + *[var._get_all_var_data() for var in event_args], VarData( imports={"react": [ImportVar(tag="useCallback")]}, ), @@ -2200,7 +2210,7 @@ def _get_memoized_event_triggers( # Store the memoized function name and hook code for this event trigger. trigger_memo[event_trigger] = ( - Var.create_safe(memo_name, _var_is_string=False)._replace( + ImmutableVar.create_safe(memo_name)._replace( _var_type=EventChain, merge_var_data=memo_var_data ), f"const {memo_name} = useCallback({rendered_chain}, [{', '.join(var_deps)}])", diff --git a/reflex/components/core/banner.py b/reflex/components/core/banner.py index c6b46696c6..4c4f587eef 100644 --- a/reflex/components/core/banner.py +++ b/reflex/components/core/banner.py @@ -4,7 +4,6 @@ from typing import Optional -from reflex.components.base.bare import Bare from reflex.components.component import Component from reflex.components.core.cond import cond from reflex.components.el.elements.typography import Div @@ -19,71 +18,64 @@ from reflex.components.sonner.toast import Toaster, ToastProps from reflex.constants import Dirs, Hooks, Imports from reflex.constants.compiler import CompileVars -from reflex.utils.imports import ImportDict, ImportVar -from reflex.utils.serializers import serialize -from reflex.vars import Var, VarData +from reflex.ivars.base import ImmutableVar, LiteralVar +from reflex.ivars.function import FunctionStringVar +from reflex.ivars.number import BooleanVar +from reflex.ivars.sequence import LiteralArrayVar +from reflex.utils.imports import ImportVar +from reflex.vars import ImmutableVarData, Var, VarData connect_error_var_data: VarData = VarData( # type: ignore imports=Imports.EVENTS, hooks={Hooks.EVENTS: None}, ) -connect_errors: Var = Var.create_safe( +connect_errors: Var = ImmutableVar.create_safe( value=CompileVars.CONNECT_ERROR, - _var_is_local=True, - _var_is_string=False, _var_data=connect_error_var_data, ) -connection_error: Var = Var.create_safe( - value="(connectErrors.length > 0) ? connectErrors[connectErrors.length - 1].message : ''", - _var_is_local=False, - _var_is_string=False, +connection_error: Var = ImmutableVar.create_safe( + value="((connectErrors.length > 0) ? connectErrors[connectErrors.length - 1].message : '')", _var_data=connect_error_var_data, ) -connection_errors_count: Var = Var.create_safe( +connection_errors_count: Var = ImmutableVar.create_safe( value="connectErrors.length", - _var_is_string=False, - _var_is_local=False, _var_data=connect_error_var_data, ) -has_connection_errors: Var = Var.create_safe( - value="connectErrors.length > 0", - _var_is_string=False, +has_connection_errors: Var = ImmutableVar.create_safe( + value="(connectErrors.length > 0)", _var_data=connect_error_var_data, -).to(bool) +).to(BooleanVar) -has_too_many_connection_errors: Var = Var.create_safe( - value="connectErrors.length >= 2", - _var_is_string=False, +has_too_many_connection_errors: Var = ImmutableVar.create_safe( + value="(connectErrors.length >= 2)", _var_data=connect_error_var_data, -).to(bool) +).to(BooleanVar) -class WebsocketTargetURL(Bare): +class WebsocketTargetURL(ImmutableVar): """A component that renders the websocket target URL.""" - def add_imports(self) -> ImportDict: - """Add imports for the websocket target URL component. - - Returns: - The import dict. - """ - return { - f"/{Dirs.STATE_PATH}": [ImportVar(tag="getBackendURL")], - "/env.json": [ImportVar(tag="env", is_default=True)], - } - @classmethod - def create(cls) -> Component: + def create(cls) -> ImmutableVar: """Create a websocket target URL component. Returns: The websocket target URL component. """ - return super().create(contents="{getBackendURL(env.EVENT).href}") + return ImmutableVar( + _var_name="getBackendURL(env.EVENT).href", + _var_data=ImmutableVarData( + imports={ + "/env.json": [ImportVar(tag="env", is_default=True)], + f"/{Dirs.STATE_PATH}": [ImportVar(tag="getBackendURL")], + }, + ), + _var_type=WebsocketTargetURL, + ) def default_connection_error() -> list[str | Var | Component]: @@ -112,24 +104,34 @@ def add_hooks(self) -> list[str | Var]: toast_id = "websocket-error" target_url = WebsocketTargetURL.create() props = ToastProps( # type: ignore - description=Var.create( - f"`Check if server is reachable at ${target_url}`", - _var_is_string=False, - _var_is_local=False, + description=LiteralVar.create( + f"Check if server is reachable at {target_url}", ), close_button=True, duration=120000, id=toast_id, ) - hook = Var.create_safe( - f""" -const toast_props = {serialize(props)}; -const [userDismissed, setUserDismissed] = useState(false); -useEffect(() => {{ - if ({has_too_many_connection_errors}) {{ + + individual_hooks = [ + f"const toast_props = {str(LiteralVar.create(props))};", + f"const [userDismissed, setUserDismissed] = useState(false);", + FunctionStringVar( + "useEffect", + _var_data=VarData( + imports={ + "react": ["useEffect", "useState"], + **dict(target_url._get_all_var_data().imports), # type: ignore + } + ), + ).call( + # TODO: This breaks the assumption that Vars are JS expressions + ImmutableVar.create_safe( + f""" +() => {{ + if ({str(has_too_many_connection_errors)}) {{ if (!userDismissed) {{ toast.error( - `Cannot connect to server: {connection_error}.`, + `Cannot connect to server: ${{{connection_error}}}.`, {{...toast_props, onDismiss: () => setUserDismissed(true)}}, ) }} @@ -137,20 +139,16 @@ def add_hooks(self) -> list[str | Var]: toast.dismiss("{toast_id}"); setUserDismissed(false); // after reconnection reset dismissed state }} -}}, [{connect_errors}]);""", - _var_is_string=False, - ) - imports: ImportDict = { - "react": ["useEffect", "useState"], - **target_url._get_imports(), # type: ignore - } - hook._var_data = VarData.merge( - connect_errors._var_data, - VarData(imports=imports), - ) +}} +""" + ), + LiteralArrayVar.create([connect_errors]), + ), + ] + return [ Hooks.EVENTS, - hook, + *individual_hooks, ] @classmethod @@ -240,6 +238,7 @@ def create(cls, *children, **props) -> Icon: Returns: The icon component with default props applied. """ + pulse_var = ImmutableVar.create("pulse") return super().create( "wifi_off", color=props.pop("color", "crimson"), @@ -248,7 +247,7 @@ def create(cls, *children, **props) -> Icon: position=props.pop("position", "fixed"), bottom=props.pop("botton", "33px"), right=props.pop("right", "33px"), - animation=Var.create(f"${{pulse}} 1s infinite", _var_is_string=True), + animation=LiteralVar.create(f"{pulse_var} 1s infinite"), **props, ) diff --git a/reflex/components/core/banner.pyi b/reflex/components/core/banner.pyi index b9b6d506fb..6327afe0b3 100644 --- a/reflex/components/core/banner.pyi +++ b/reflex/components/core/banner.pyi @@ -5,15 +5,15 @@ # ------------------------------------------------------ from typing import Any, Callable, Dict, Literal, Optional, Union, overload -from reflex.components.base.bare import Bare from reflex.components.component import Component from reflex.components.el.elements.typography import Div from reflex.components.lucide.icon import Icon from reflex.components.sonner.toast import Toaster, ToastProps from reflex.event import EventHandler, EventSpec +from reflex.ivars.base import ImmutableVar from reflex.style import Style -from reflex.utils.imports import ImportDict, ImportVar -from reflex.vars import BaseVar, Var, VarData +from reflex.utils.imports import ImportVar +from reflex.vars import Var, VarData connect_error_var_data: VarData connect_errors: Var @@ -22,73 +22,9 @@ connection_errors_count: Var has_connection_errors: Var has_too_many_connection_errors: Var -class WebsocketTargetURL(Bare): - def add_imports(self) -> ImportDict: ... - @overload +class WebsocketTargetURL(ImmutableVar): @classmethod - def create( # type: ignore - cls, - *children, - contents: Optional[Union[Var[str], str]] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - **props, - ) -> "WebsocketTargetURL": - """Create a websocket target URL component. - - Returns: - The websocket target URL component. - """ - ... + def create(cls) -> ImmutableVar: ... # type: ignore def default_connection_error() -> list[str | Var | Component]: ... @@ -140,50 +76,40 @@ class ConnectionToaster(Toaster): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ConnectionToaster": @@ -230,50 +156,40 @@ class ConnectionBanner(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ConnectionBanner": @@ -299,50 +215,40 @@ class ConnectionModal(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ConnectionModal": @@ -369,50 +275,40 @@ class WifiOffPulse(Icon): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "WifiOffPulse": @@ -472,50 +368,40 @@ class ConnectionPulser(Div): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ConnectionPulser": diff --git a/reflex/components/core/client_side_routing.pyi b/reflex/components/core/client_side_routing.pyi index 7562f6f5c0..605293ee81 100644 --- a/reflex/components/core/client_side_routing.pyi +++ b/reflex/components/core/client_side_routing.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var route_not_found: Var @@ -26,50 +26,40 @@ class ClientSideRouting(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ClientSideRouting": @@ -105,50 +95,40 @@ class Default404Page(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Default404Page": diff --git a/reflex/components/core/clipboard.pyi b/reflex/components/core/clipboard.pyi index 29ad80c2f6..aaeac985c3 100644 --- a/reflex/components/core/clipboard.pyi +++ b/reflex/components/core/clipboard.pyi @@ -9,7 +9,7 @@ from reflex.components.base.fragment import Fragment from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportVar -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Clipboard(Fragment): @overload @@ -27,53 +27,41 @@ class Clipboard(Fragment): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_paste: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_paste: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Clipboard": diff --git a/reflex/components/core/cond.py b/reflex/components/core/cond.py index 5d9ab75440..80dd35f0f9 100644 --- a/reflex/components/core/cond.py +++ b/reflex/components/core/cond.py @@ -2,17 +2,17 @@ from __future__ import annotations -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Optional, overload from reflex.components.base.fragment import Fragment from reflex.components.component import BaseComponent, Component, MemoizationLeaf from reflex.components.tags import CondTag, Tag from reflex.constants import Dirs -from reflex.constants.colors import Color +from reflex.ivars.base import ImmutableVar, LiteralVar +from reflex.ivars.number import TernaryOperator from reflex.style import LIGHT_COLOR_MODE, resolved_color_mode -from reflex.utils import format from reflex.utils.imports import ImportDict, ImportVar -from reflex.vars import BaseVar, Var, VarData +from reflex.vars import Var, VarData _IS_TRUE_IMPORT: ImportDict = { f"/{Dirs.STATE_PATH}": [ImportVar(tag="isTrue")], @@ -104,7 +104,7 @@ def add_imports(self) -> ImportDict: The import dict for the component. """ cond_imports: dict[str, str | ImportVar | list[str | ImportVar]] = getattr( - self.cond._var_data, "imports", {} + VarData.merge(self.cond._get_all_var_data()), "imports", {} ) return {**cond_imports, **_IS_TRUE_IMPORT} @@ -118,10 +118,10 @@ def cond(condition: Any, c1: Component) -> Component: ... @overload -def cond(condition: Any, c1: Any, c2: Any) -> BaseVar: ... +def cond(condition: Any, c1: Any, c2: Any) -> ImmutableVar: ... -def cond(condition: Any, c1: Any, c2: Any = None): +def cond(condition: Any, c1: Any, c2: Any = None) -> Component | ImmutableVar: """Create a conditional component or Prop. Args: @@ -135,14 +135,10 @@ def cond(condition: Any, c1: Any, c2: Any = None): Raises: ValueError: If the arguments are invalid. """ - var_datas: list[VarData | None] = [ - VarData( # type: ignore - imports=_IS_TRUE_IMPORT, - ), - ] - + if isinstance(condition, Var) and not isinstance(condition, ImmutableVar): + condition._var_is_local = True # Convert the condition to a Var. - cond_var = Var.create(condition) + cond_var = LiteralVar.create(condition) assert cond_var is not None, "The condition must be set." # If the first component is a component, create a Cond component. @@ -151,8 +147,6 @@ def cond(condition: Any, c1: Any, c2: Any = None): c2, BaseComponent ), "Both arguments must be components." return Cond.create(cond_var, c1, c2) - if isinstance(c1, Var): - var_datas.append(c1._var_data) # Otherwise, create a conditional Var. # Check that the second argument is valid. @@ -160,37 +154,20 @@ def cond(condition: Any, c1: Any, c2: Any = None): raise ValueError("Both arguments must be props.") if c2 is None: raise ValueError("For conditional vars, the second argument must be set.") - if isinstance(c2, Var): - var_datas.append(c2._var_data) def create_var(cond_part): - return Var.create_safe( - cond_part, - _var_is_string=isinstance(cond_part, (str, Color)), - ) + return LiteralVar.create(cond_part) # convert the truth and false cond parts into vars so the _var_data can be obtained. c1 = create_var(c1) c2 = create_var(c2) - var_datas.extend([c1._var_data, c2._var_data]) - - c1_type = c1._var_type if isinstance(c1, Var) else type(c1) - c2_type = c2._var_type if isinstance(c2, Var) else type(c2) - - var_type = c1_type if c1_type == c2_type else Union[c1_type, c2_type] # Create the conditional var. - return cond_var._replace( - _var_name=format.format_cond( - cond=cond_var._var_full_name, - true_value=c1, - false_value=c2, - is_prop=True, - ), - _var_type=var_type, - _var_is_local=False, - _var_full_name_needs_state_prefix=False, - merge_var_data=VarData.merge(*var_datas), + return TernaryOperator.create( + condition=cond_var.to(bool), # type: ignore + if_true=c1, + if_false=c2, + _var_data=VarData(imports=_IS_TRUE_IMPORT), ) @@ -205,7 +182,7 @@ def color_mode_cond(light: Any, dark: Any = None) -> Var | Component: The conditional component or prop. """ return cond( - resolved_color_mode == Var.create(LIGHT_COLOR_MODE, _var_is_string=True), + resolved_color_mode == LiteralVar.create(LIGHT_COLOR_MODE), light, dark, ) diff --git a/reflex/components/core/debounce.pyi b/reflex/components/core/debounce.pyi index 59e87f3661..486fcc2842 100644 --- a/reflex/components/core/debounce.pyi +++ b/reflex/components/core/debounce.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Type, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var DEFAULT_DEBOUNCE_TIMEOUT = 300 @@ -31,53 +31,41 @@ class DebounceInput(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DebounceInput": diff --git a/reflex/components/core/foreach.py b/reflex/components/core/foreach.py index 44e0685dd5..327680a2be 100644 --- a/reflex/components/core/foreach.py +++ b/reflex/components/core/foreach.py @@ -9,6 +9,7 @@ from reflex.components.component import Component from reflex.components.tags import IterTag from reflex.constants import MemoizationMode +from reflex.ivars.base import ImmutableVar from reflex.state import ComponentState from reflex.utils import console from reflex.vars import Var @@ -61,7 +62,7 @@ def create( deprecation_version="0.5.0", removal_version="0.6.0", ) - iterable = Var.create_safe(iterable, _var_is_string=False) + iterable = ImmutableVar.create_safe(iterable) if iterable._var_type == Any: raise ForeachVarError( f"Could not foreach over var `{iterable._var_full_name}` of type Any. " diff --git a/reflex/components/core/html.pyi b/reflex/components/core/html.pyi index 62bec00639..c3d2ed06fa 100644 --- a/reflex/components/core/html.pyi +++ b/reflex/components/core/html.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.el.elements.typography import Div from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Html(Div): @overload @@ -49,50 +49,40 @@ class Html(Div): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Html": diff --git a/reflex/components/core/match.py b/reflex/components/core/match.py index e85739605b..3ddef38c63 100644 --- a/reflex/components/core/match.py +++ b/reflex/components/core/match.py @@ -5,13 +5,13 @@ from reflex.components.base import Fragment from reflex.components.component import BaseComponent, Component, MemoizationLeaf -from reflex.components.core.colors import Color from reflex.components.tags import MatchTag, Tag +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.style import Style from reflex.utils import format, types from reflex.utils.exceptions import MatchTypeError from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var, VarData +from reflex.vars import ImmutableVarData, Var, VarData class Match(MemoizationLeaf): @@ -27,7 +27,7 @@ class Match(MemoizationLeaf): default: Any @classmethod - def create(cls, cond: Any, *cases) -> Union[Component, BaseVar]: + def create(cls, cond: Any, *cases) -> Union[Component, Var]: """Create a Match Component. Args: @@ -46,7 +46,7 @@ def create(cls, cond: Any, *cases) -> Union[Component, BaseVar]: cls._validate_return_types(match_cases) - if default is None and types._issubclass(type(match_cases[0][-1]), BaseVar): + if default is None and types._issubclass(type(match_cases[0][-1]), Var): raise ValueError( "For cases with return types as Vars, a default case must be provided" ) @@ -56,7 +56,7 @@ def create(cls, cond: Any, *cases) -> Union[Component, BaseVar]: ) @classmethod - def _create_condition_var(cls, cond: Any) -> BaseVar: + def _create_condition_var(cls, cond: Any) -> Var: """Convert the condition to a Var. Args: @@ -68,16 +68,16 @@ def _create_condition_var(cls, cond: Any) -> BaseVar: Raises: ValueError: If the condition is not provided. """ - match_cond_var = Var.create(cond, _var_is_string=isinstance(cond, str)) + match_cond_var = LiteralVar.create(cond) if match_cond_var is None: raise ValueError("The condition must be set") - return match_cond_var # type: ignore + return match_cond_var @classmethod def _process_cases( cls, cases: List - ) -> Tuple[List, Optional[Union[BaseVar, BaseComponent]]]: + ) -> Tuple[List, Optional[Union[Var, BaseComponent]]]: """Process the list of match cases and the catchall default case. Args: @@ -94,6 +94,9 @@ def _process_cases( if len([case for case in cases if not isinstance(case, tuple)]) > 1: raise ValueError("rx.match can only have one default case.") + if not cases: + raise ValueError("rx.match should have at least one case.") + # Get the default case which should be the last non-tuple arg if not isinstance(cases[-1], tuple): default = cases.pop() @@ -103,7 +106,7 @@ def _process_cases( else default ) - return cases, default # type: ignore + return cases, default @classmethod def _create_case_var_with_var_data(cls, case_element): @@ -117,17 +120,12 @@ def _create_case_var_with_var_data(cls, case_element): Returns: The case element Var. """ - _var_data = case_element._var_data if isinstance(case_element, Style) else None # type: ignore - case_element = Var.create( - case_element, - _var_is_string=isinstance(case_element, (str, Color)), - ) - if _var_data is not None: - case_element._var_data = VarData.merge(case_element._var_data, _var_data) # type: ignore + _var_data = case_element._var_data if isinstance(case_element, Style) else None + case_element = LiteralVar.create(case_element, _var_data=_var_data) return case_element @classmethod - def _process_match_cases(cls, cases: List) -> List[List[BaseVar]]: + def _process_match_cases(cls, cases: List) -> List[List[Var]]: """Process the individual match cases. Args: @@ -159,7 +157,7 @@ def _process_match_cases(cls, cases: List) -> List[List[BaseVar]]: if not isinstance(element, BaseComponent) else element ) - if not isinstance(el, (BaseVar, BaseComponent)): + if not isinstance(el, (Var, BaseComponent)): raise ValueError("Case element must be a var or component") case_list.append(el) @@ -168,7 +166,7 @@ def _process_match_cases(cls, cases: List) -> List[List[BaseVar]]: return match_cases @classmethod - def _validate_return_types(cls, match_cases: List[List[BaseVar]]) -> None: + def _validate_return_types(cls, match_cases: List[List[Var]]) -> None: """Validate that match cases have the same return types. Args: @@ -182,14 +180,14 @@ def _validate_return_types(cls, match_cases: List[List[BaseVar]]) -> None: if types._isinstance(first_case_return, BaseComponent): return_type = BaseComponent - elif types._isinstance(first_case_return, BaseVar): - return_type = BaseVar + elif types._isinstance(first_case_return, Var): + return_type = Var for index, case in enumerate(match_cases): if not types._issubclass(type(case[-1]), return_type): raise MatchTypeError( f"Match cases should have the same return types. Case {index} with return " - f"value `{case[-1]._var_name if isinstance(case[-1], BaseVar) else textwrap.shorten(str(case[-1]), width=250)}`" + f"value `{case[-1]._var_name if isinstance(case[-1], Var) else textwrap.shorten(str(case[-1]), width=250)}`" f" of type {type(case[-1])!r} is not {return_type}" ) @@ -197,9 +195,9 @@ def _validate_return_types(cls, match_cases: List[List[BaseVar]]) -> None: def _create_match_cond_var_or_component( cls, match_cond_var: Var, - match_cases: List[List[BaseVar]], - default: Optional[Union[BaseVar, BaseComponent]], - ) -> Union[Component, BaseVar]: + match_cases: List[List[Var]], + default: Optional[Union[Var, BaseComponent]], + ) -> Union[Component, Var]: """Create and return the match condition var or component. Args: @@ -230,28 +228,22 @@ def _create_match_cond_var_or_component( # Validate the match cases (as well as the default case) to have Var return types. if any( - case for case in match_cases if not types._isinstance(case[-1], BaseVar) - ) or not types._isinstance(default, BaseVar): + case for case in match_cases if not types._isinstance(case[-1], Var) + ) or not types._isinstance(default, Var): raise ValueError("Return types of match cases should be Vars.") - # match cases and default should all be Vars at this point. - # Retrieve var data of every var in the match cases and default. - var_data = [ - *[el._var_data for case in match_cases for el in case], - default._var_data, # type: ignore - ] - - return match_cond_var._replace( + return ImmutableVar( _var_name=format.format_match( cond=match_cond_var._var_name_unwrapped, match_cases=match_cases, # type: ignore default=default, # type: ignore ), _var_type=default._var_type, # type: ignore - _var_is_local=False, - _var_full_name_needs_state_prefix=False, - _var_is_string=False, - merge_var_data=VarData.merge(*var_data), + _var_data=ImmutableVarData.merge( + match_cond_var._get_all_var_data(), + *[el._get_all_var_data() for case in match_cases for el in case], + default._get_all_var_data(), # type: ignore + ), ) def _render(self) -> Tag: @@ -275,7 +267,7 @@ def add_imports(self) -> ImportDict: Returns: The import dict. """ - return getattr(self.cond._var_data, "imports", {}) + return getattr(VarData.merge(self.cond._get_all_var_data()), "imports", {}) match = Match.create diff --git a/reflex/components/core/upload.py b/reflex/components/core/upload.py index 3c21132531..df9146c4d9 100644 --- a/reflex/components/core/upload.py +++ b/reflex/components/core/upload.py @@ -19,8 +19,10 @@ call_script, parse_args_spec, ) +from reflex.ivars.base import ImmutableCallableVar, ImmutableVar +from reflex.ivars.sequence import LiteralStringVar from reflex.utils.imports import ImportVar -from reflex.vars import BaseVar, CallableVar, Var, VarData +from reflex.vars import ImmutableVarData, Var, VarData DEFAULT_UPLOAD_ID: str = "default" @@ -35,8 +37,8 @@ ) -@CallableVar -def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> BaseVar: +@ImmutableCallableVar +def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar: """Get the file upload drop trigger. This var is passed to the dropzone component to update the file list when a @@ -48,23 +50,25 @@ def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> BaseVar: Returns: A var referencing the file upload drop trigger. """ - id_var = Var.create_safe(id_, _var_is_string=True) + id_var = LiteralStringVar.create(id_) var_name = f"""e => setFilesById(filesById => {{ const updatedFilesById = Object.assign({{}}, filesById); - updatedFilesById[{id_var._var_name_unwrapped}] = e; + updatedFilesById[{str(id_var)}] = e; return updatedFilesById; }}) """ - return BaseVar( + return ImmutableVar( _var_name=var_name, _var_type=EventChain, - _var_data=VarData.merge(upload_files_context_var_data, id_var._var_data), + _var_data=ImmutableVarData.merge( + upload_files_context_var_data, id_var._get_all_var_data() + ), ) -@CallableVar -def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> BaseVar: +@ImmutableCallableVar +def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar: """Get the list of selected files. Args: @@ -73,12 +77,14 @@ def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> BaseVar: Returns: A var referencing the list of selected file paths. """ - id_var = Var.create_safe(id_, _var_is_string=True) - return BaseVar( - _var_name=f"(filesById[{id_var._var_name_unwrapped}] ? filesById[{id_var._var_name_unwrapped}].map((f) => (f.path || f.name)) : [])", + id_var = LiteralStringVar.create(id_) + return ImmutableVar( + _var_name=f"(filesById[{str(id_var)}] ? filesById[{str(id_var)}].map((f) => (f.path || f.name)) : [])", _var_type=List[str], - _var_data=VarData.merge(upload_files_context_var_data, id_var._var_data), - ) + _var_data=ImmutableVarData.merge( + upload_files_context_var_data, id_var._get_all_var_data() + ), + ).guess_type() @CallableEventSpec @@ -245,7 +251,7 @@ def create(cls, *children, **props) -> Component: # The file input to use. upload = Input.create(type="file") upload.special_props = { - BaseVar(_var_name="{...getInputProps()}", _var_type=None) + ImmutableVar(_var_name="...getInputProps()", _var_type=None) } # The dropzone to use. @@ -254,7 +260,9 @@ def create(cls, *children, **props) -> Component: *children, **{k: v for k, v in props.items() if k not in supported_props}, ) - zone.special_props = {BaseVar(_var_name="{...getRootProps()}", _var_type=None)} + zone.special_props = { + ImmutableVar(_var_name="...getRootProps()", _var_type=None) + } # Create the component. upload_props["id"] = props.get("id", DEFAULT_UPLOAD_ID) diff --git a/reflex/components/core/upload.pyi b/reflex/components/core/upload.pyi index 54bb351dea..ff5085514c 100644 --- a/reflex/components/core/upload.pyi +++ b/reflex/components/core/upload.pyi @@ -12,16 +12,17 @@ from reflex.event import ( EventHandler, EventSpec, ) +from reflex.ivars.base import ImmutableCallableVar, ImmutableVar from reflex.style import Style -from reflex.vars import BaseVar, CallableVar, Var, VarData +from reflex.vars import Var, VarData DEFAULT_UPLOAD_ID: str upload_files_context_var_data: VarData -@CallableVar -def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> BaseVar: ... -@CallableVar -def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> BaseVar: ... +@ImmutableCallableVar +def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar: ... +@ImmutableCallableVar +def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar: ... @CallableEventSpec def clear_selected_files(id_: str = DEFAULT_UPLOAD_ID) -> EventSpec: ... def cancel_upload(upload_id: str) -> EventSpec: ... @@ -43,50 +44,40 @@ class UploadFilesProvider(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "UploadFilesProvider": @@ -130,53 +121,41 @@ class Upload(MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_drop: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Upload": @@ -227,53 +206,41 @@ class StyledUpload(Upload): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_drop: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "StyledUpload": @@ -324,53 +291,41 @@ class UploadNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_drop: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "StyledUpload": diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py index 47cba3736d..779d4c5d3a 100644 --- a/reflex/components/datadisplay/code.py +++ b/reflex/components/datadisplay/code.py @@ -2,9 +2,10 @@ from __future__ import annotations -import re from typing import Dict, Literal, Optional, Union +from typing_extensions import get_args + from reflex.components.component import Component from reflex.components.core.cond import color_mode_cond from reflex.components.lucide.icon import Icon @@ -12,6 +13,7 @@ from reflex.components.radix.themes.layout.box import Box from reflex.constants.colors import Color from reflex.event import set_clipboard +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.style import Style from reflex.utils import format from reflex.utils.imports import ImportDict, ImportVar @@ -349,6 +351,20 @@ ] +def replace_quotes_with_camel_case(value: str) -> str: + """Replaces quotes in the given string with camel case format. + + Args: + value (str): The string to be processed. + + Returns: + str: The processed string with quotes replaced by camel case. + """ + for theme in get_args(LiteralCodeBlockTheme): + value = value.replace(f'"{theme}"', format.to_camel_case(theme)) + return value + + class CodeBlock(Component): """A code block.""" @@ -389,32 +405,42 @@ def add_imports(self) -> ImportDict: The import dict. """ imports_: ImportDict = {} - themes = re.findall(r"`(.*?)`", self.theme._var_name) - if not themes: - themes = [self.theme._var_name] + + themeString = str(self.theme) + + selected_themes = [] + + for possibleTheme in get_args(LiteralCodeBlockTheme): + if format.to_camel_case(possibleTheme) in themeString: + selected_themes.append(possibleTheme) + if possibleTheme in themeString: + selected_themes.append(possibleTheme) + + selected_themes = sorted(set(map(self.convert_theme_name, selected_themes))) imports_.update( { - f"react-syntax-highlighter/dist/cjs/styles/prism/{self.convert_theme_name(theme)}": [ + f"react-syntax-highlighter/dist/cjs/styles/prism/{theme}": [ ImportVar( - tag=format.to_camel_case(self.convert_theme_name(theme)), + tag=format.to_camel_case(theme), is_default=True, install=False, ) ] - for theme in themes + for theme in selected_themes } ) if ( self.language is not None - and self.language._var_name in LiteralCodeLanguage.__args__ # type: ignore + and (language_without_quotes := str(self.language).replace('"', "")) + in LiteralCodeLanguage.__args__ # type: ignore ): imports_[ - f"react-syntax-highlighter/dist/cjs/languages/prism/{self.language._var_name}" + f"react-syntax-highlighter/dist/cjs/languages/prism/{language_without_quotes}" ] = [ ImportVar( - tag=format.to_camel_case(self.language._var_name), + tag=format.to_camel_case(language_without_quotes), is_default=True, install=False, ) @@ -425,9 +451,10 @@ def add_imports(self) -> ImportDict: def _get_custom_code(self) -> Optional[str]: if ( self.language is not None - and self.language._var_name in LiteralCodeLanguage.__args__ # type: ignore + and (language_without_quotes := str(self.language).replace('"', "")) + in LiteralCodeLanguage.__args__ # type: ignore ): - return f"{self.alias}.registerLanguage('{self.language._var_name}', {format.to_camel_case(self.language._var_name)})" + return f"{self.alias}.registerLanguage('{language_without_quotes}', {format.to_camel_case(language_without_quotes)})" @classmethod def create( @@ -453,7 +480,10 @@ def create( if "theme" not in props: # Default color scheme responds to global color mode. - props["theme"] = color_mode_cond(light="one-light", dark="one-dark") + props["theme"] = color_mode_cond( + light=ImmutableVar.create_safe("oneLight"), + dark=ImmutableVar.create_safe("oneDark"), + ) # react-syntax-highlighter doesnt have an explicit "light" or "dark" theme so we use one-light and one-dark # themes respectively to ensure code compatibility. @@ -484,7 +514,7 @@ def create( if children: props["code"] = children[0] if not isinstance(props["code"], Var): - props["code"] = Var.create(props["code"], _var_is_string=True) + props["code"] = LiteralVar.create(props["code"]) # Create the component. code_block = super().create( @@ -503,18 +533,15 @@ def add_style(self): def _render(self): out = super()._render() - predicate, qmark, value = self.theme._var_name.partition("?") - out.add_props( - style=Var.create( - format.to_camel_case(f"{predicate}{qmark}{value.replace('`', '')}"), - _var_is_local=False, - _var_is_string=False, - ) - ).remove_props("theme", "code") - if self.code is not None: - out.special_props.add( - Var.create_safe(f"children={str(self.code)}", _var_is_string=False) - ) + + theme = self.theme._replace( + _var_name=replace_quotes_with_camel_case(str(self.theme)) + ) + + out.add_props(style=theme).remove_props("theme", "code").add_props( + children=self.code + ) + return out @staticmethod diff --git a/reflex/components/datadisplay/code.pyi b/reflex/components/datadisplay/code.pyi index a60838b8e6..015cc0708a 100644 --- a/reflex/components/datadisplay/code.pyi +++ b/reflex/components/datadisplay/code.pyi @@ -10,7 +10,7 @@ from reflex.constants.colors import Color from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var LiteralCodeBlockTheme = Literal[ "a11y-dark", @@ -341,6 +341,8 @@ LiteralCodeLanguage = Literal[ "zig", ] +def replace_quotes_with_camel_case(value: str) -> str: ... + class CodeBlock(Component): def add_imports(self) -> ImportDict: ... @overload @@ -1030,50 +1032,40 @@ class CodeBlock(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CodeBlock": diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index c6d9c19811..f3296e0b70 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -9,6 +9,7 @@ from reflex.components.component import Component, NoSSRComponent from reflex.components.literals import LiteralRowMarker from reflex.event import EventHandler +from reflex.ivars.base import ImmutableVar from reflex.utils import console, format, types from reflex.utils.imports import ImportDict, ImportVar from reflex.utils.serializers import serializer @@ -293,9 +294,7 @@ def add_hooks(self) -> list[str]: # Define the name of the getData callback associated with this component and assign to get_cell_content. data_callback = f"getData_{editor_id}" - self.get_cell_content = Var.create( - data_callback, _var_is_local=False, _var_is_string=False - ) # type: ignore + self.get_cell_content = ImmutableVar.create(data_callback) # type: ignore code = [f"function {data_callback}([col, row])" "{"] diff --git a/reflex/components/datadisplay/dataeditor.pyi b/reflex/components/datadisplay/dataeditor.pyi index 21ee461c35..b40890b73c 100644 --- a/reflex/components/datadisplay/dataeditor.pyi +++ b/reflex/components/datadisplay/dataeditor.pyi @@ -12,7 +12,7 @@ from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.utils.serializers import serializer -from reflex.vars import BaseVar, Var +from reflex.vars import Var class GridColumnIcons(Enum): Array = "array" @@ -135,98 +135,86 @@ class DataEditor(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_cell_activated: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_cell_clicked: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_cell_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_cell_edited: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_column_resize: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_delete: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_delete: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_finished_editing: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_group_header_clicked: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_group_header_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_group_header_renamed: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_header_clicked: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_header_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_header_menu_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_item_hovered: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_row_appended: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_selection_cleared: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DataEditor": diff --git a/reflex/components/el/element.pyi b/reflex/components/el/element.pyi index ce87335c39..f18d9008c6 100644 --- a/reflex/components/el/element.pyi +++ b/reflex/components/el/element.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Element(Component): @overload @@ -22,50 +22,40 @@ class Element(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Element": diff --git a/reflex/components/el/elements/base.pyi b/reflex/components/el/elements/base.pyi index 14ee5b62cf..d802cc2ee9 100644 --- a/reflex/components/el/elements/base.pyi +++ b/reflex/components/el/elements/base.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.el.element import Element from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class BaseHTML(Element): @overload @@ -46,50 +46,40 @@ class BaseHTML(Element): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "BaseHTML": diff --git a/reflex/components/el/elements/forms.py b/reflex/components/el/elements/forms.py index cdad212aa9..dfbdc4c1f2 100644 --- a/reflex/components/el/elements/forms.py +++ b/reflex/components/el/elements/forms.py @@ -11,13 +11,14 @@ from reflex.components.tags.tag import Tag from reflex.constants import Dirs, EventTriggers from reflex.event import EventChain, EventHandler +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.utils.format import format_event_chain from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var, VarData from .base import BaseHTML -FORM_DATA = Var.create("form_data", _var_is_string=False) +FORM_DATA = ImmutableVar.create("form_data") HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string( """ const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => { @@ -184,7 +185,7 @@ def add_hooks(self) -> list[str]: HANDLE_SUBMIT_JS_JINJA2.render( handle_submit_unique_name=self.handle_submit_unique_name, form_data=FORM_DATA, - field_ref_mapping=str(Var.create_safe(self._get_form_refs())), + field_ref_mapping=str(LiteralVar.create(self._get_form_refs())), on_submit_event_chain=format_event_chain( self.event_triggers[EventTriggers.ON_SUBMIT] ), @@ -197,7 +198,7 @@ def _render(self) -> Tag: if EventTriggers.ON_SUBMIT in self.event_triggers: render_tag.add_props( **{ - EventTriggers.ON_SUBMIT: BaseVar( + EventTriggers.ON_SUBMIT: ImmutableVar( _var_name=f"handleSubmit_{self.handle_submit_unique_name}", _var_type=EventChain, ) @@ -212,21 +213,18 @@ def _get_form_refs(self) -> Dict[str, Any]: # when ref start with refs_ it's an array of refs, so we need different method # to collect data if ref.startswith("refs_"): - ref_var = Var.create_safe(ref[:-3], _var_is_string=False).as_ref() - form_refs[ref[5:-3]] = Var.create_safe( + ref_var = ImmutableVar.create_safe(ref[:-3]).as_ref() + form_refs[ref[len("refs_") : -3]] = ImmutableVar.create_safe( f"getRefValues({str(ref_var)})", - _var_is_local=False, - _var_is_string=False, - _var_data=ref_var._var_data, + _var_data=VarData.merge(ref_var._get_all_var_data()), ) else: - ref_var = Var.create_safe(ref, _var_is_string=False).as_ref() - form_refs[ref[4:]] = Var.create_safe( + ref_var = ImmutableVar.create_safe(ref).as_ref() + form_refs[ref[4:]] = ImmutableVar.create_safe( f"getRefValue({str(ref_var)})", - _var_is_local=False, - _var_is_string=False, - _var_data=ref_var._var_data, + _var_data=VarData.merge(ref_var._get_all_var_data()), ) + # print(repr(form_refs)) return form_refs def _get_vars(self, include_children: bool = True) -> Iterator[Var]: @@ -631,7 +629,7 @@ def _render(self) -> Tag: f"(e) => enterKeySubmitOnKeyDown(e, {self.enter_key_submit._var_name_unwrapped})", _var_is_local=False, _var_is_string=False, - _var_data=self.enter_key_submit._var_data, + _var_data=VarData.merge(self.enter_key_submit._get_all_var_data()), ) ) if self.auto_height is not None: @@ -640,7 +638,7 @@ def _render(self) -> Tag: f"(e) => autoHeightOnInput(e, {self.auto_height._var_name_unwrapped})", _var_is_local=False, _var_is_string=False, - _var_data=self.auto_height._var_data, + _var_data=VarData.merge(self.auto_height._get_all_var_data()), ) ) return tag diff --git a/reflex/components/el/elements/forms.pyi b/reflex/components/el/elements/forms.pyi index 31a56e9bee..7b20571ebb 100644 --- a/reflex/components/el/elements/forms.pyi +++ b/reflex/components/el/elements/forms.pyi @@ -9,13 +9,14 @@ from jinja2 import Environment from reflex.components.el.element import Element from reflex.event import EventHandler, EventSpec +from reflex.ivars.base import ImmutableVar from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML -FORM_DATA = Var.create("form_data", _var_is_string=False) +FORM_DATA = ImmutableVar.create("form_data") HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string( "\n const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {\n const $form = ev.target\n ev.preventDefault()\n const {{ form_data }} = {...Object.fromEntries(new FormData($form).entries()), ...{{ field_ref_mapping }}}\n\n {{ on_submit_event_chain }}\n\n if ({{ reset_on_submit }}) {\n $form.reset()\n }\n })\n " ) @@ -71,50 +72,40 @@ class Button(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Button": @@ -198,50 +189,40 @@ class Datalist(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Datalist": @@ -293,50 +274,40 @@ class Fieldset(Element): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Fieldset": @@ -411,53 +382,41 @@ class Form(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_submit: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Form": @@ -583,59 +542,45 @@ class Input(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_key_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Input": @@ -743,50 +688,40 @@ class Label(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Label": @@ -861,50 +796,40 @@ class Legend(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Legend": @@ -984,50 +909,40 @@ class Meter(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Meter": @@ -1109,50 +1024,40 @@ class Optgroup(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Optgroup": @@ -1231,50 +1136,40 @@ class Option(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Option": @@ -1354,50 +1249,40 @@ class Output(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Output": @@ -1476,50 +1361,40 @@ class Progress(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Progress": @@ -1605,53 +1480,41 @@ class Select(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Select": @@ -1754,59 +1617,45 @@ class Textarea(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_key_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Textarea": diff --git a/reflex/components/el/elements/inline.pyi b/reflex/components/el/elements/inline.pyi index c4cd4286fe..dfddf5f105 100644 --- a/reflex/components/el/elements/inline.pyi +++ b/reflex/components/el/elements/inline.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML @@ -58,50 +58,40 @@ class A(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "A": @@ -183,50 +173,40 @@ class Abbr(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Abbr": @@ -299,50 +279,40 @@ class B(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "B": @@ -415,50 +385,40 @@ class Bdi(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Bdi": @@ -531,50 +491,40 @@ class Bdo(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Bdo": @@ -647,50 +597,40 @@ class Br(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Br": @@ -763,50 +703,40 @@ class Cite(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Cite": @@ -879,50 +809,40 @@ class Code(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Code": @@ -996,50 +916,40 @@ class Data(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Data": @@ -1113,50 +1023,40 @@ class Dfn(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Dfn": @@ -1229,50 +1129,40 @@ class Em(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Em": @@ -1345,50 +1235,40 @@ class I(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "I": @@ -1461,50 +1341,40 @@ class Kbd(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Kbd": @@ -1577,50 +1447,40 @@ class Mark(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Mark": @@ -1694,50 +1554,40 @@ class Q(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Q": @@ -1811,50 +1661,40 @@ class Rp(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Rp": @@ -1927,50 +1767,40 @@ class Rt(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Rt": @@ -2043,50 +1873,40 @@ class Ruby(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Ruby": @@ -2159,50 +1979,40 @@ class S(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "S": @@ -2275,50 +2085,40 @@ class Samp(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Samp": @@ -2391,50 +2191,40 @@ class Small(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Small": @@ -2507,50 +2297,40 @@ class Span(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Span": @@ -2623,50 +2403,40 @@ class Strong(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Strong": @@ -2739,50 +2509,40 @@ class Sub(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Sub": @@ -2855,50 +2615,40 @@ class Sup(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Sup": @@ -2972,50 +2722,40 @@ class Time(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Time": @@ -3089,50 +2829,40 @@ class U(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "U": @@ -3205,50 +2935,40 @@ class Wbr(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Wbr": diff --git a/reflex/components/el/elements/media.pyi b/reflex/components/el/elements/media.pyi index ba5f141379..cf673ddf96 100644 --- a/reflex/components/el/elements/media.pyi +++ b/reflex/components/el/elements/media.pyi @@ -9,7 +9,7 @@ from reflex import ComponentNamespace from reflex.constants.colors import Color from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML @@ -62,50 +62,40 @@ class Area(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Area": @@ -199,50 +189,40 @@ class Audio(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Audio": @@ -341,50 +321,40 @@ class Img(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Img": @@ -471,50 +441,40 @@ class Map(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Map": @@ -593,50 +553,40 @@ class Track(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Track": @@ -728,50 +678,40 @@ class Video(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Video": @@ -856,50 +796,40 @@ class Embed(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Embed": @@ -985,50 +915,40 @@ class Iframe(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Iframe": @@ -1115,50 +1035,40 @@ class Object(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Object": @@ -1236,50 +1146,40 @@ class Picture(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Picture": @@ -1352,50 +1252,40 @@ class Portal(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Portal": @@ -1473,50 +1363,40 @@ class Source(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Source": @@ -1597,50 +1477,40 @@ class Svg(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Svg": @@ -1720,50 +1590,40 @@ class Circle(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Circle": @@ -1847,50 +1707,40 @@ class Rect(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Rect": @@ -1972,50 +1822,40 @@ class Polygon(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Polygon": @@ -2090,50 +1930,40 @@ class Defs(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Defs": @@ -2213,50 +2043,40 @@ class LinearGradient(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "LinearGradient": @@ -2343,50 +2163,40 @@ class Stop(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Stop": @@ -2463,50 +2273,40 @@ class Path(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Path": @@ -2589,50 +2389,40 @@ class SVG(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Svg": diff --git a/reflex/components/el/elements/metadata.pyi b/reflex/components/el/elements/metadata.pyi index e08c1d723e..cb7e1dca9d 100644 --- a/reflex/components/el/elements/metadata.pyi +++ b/reflex/components/el/elements/metadata.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.el.element import Element from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML @@ -50,50 +50,40 @@ class Base(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Base": @@ -166,50 +156,40 @@ class Head(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Head": @@ -295,50 +275,40 @@ class Link(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Link": @@ -424,50 +394,40 @@ class Meta(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Meta": @@ -520,50 +480,40 @@ class Title(Element): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Title": @@ -597,50 +547,40 @@ class StyleEl(Element): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "StyleEl": diff --git a/reflex/components/el/elements/other.pyi b/reflex/components/el/elements/other.pyi index 6dc5d0aa16..89b50b085e 100644 --- a/reflex/components/el/elements/other.pyi +++ b/reflex/components/el/elements/other.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML @@ -48,50 +48,40 @@ class Details(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Details": @@ -166,50 +156,40 @@ class Dialog(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Dialog": @@ -283,50 +263,40 @@ class Summary(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Summary": @@ -399,50 +369,40 @@ class Slot(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Slot": @@ -515,50 +475,40 @@ class Template(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Template": @@ -631,50 +581,40 @@ class Math(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Math": @@ -748,50 +688,40 @@ class Html(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Html": diff --git a/reflex/components/el/elements/scripts.pyi b/reflex/components/el/elements/scripts.pyi index d7858dde8a..9923d8c6b6 100644 --- a/reflex/components/el/elements/scripts.pyi +++ b/reflex/components/el/elements/scripts.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML @@ -47,50 +47,40 @@ class Canvas(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Canvas": @@ -163,50 +153,40 @@ class Noscript(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Noscript": @@ -292,50 +272,40 @@ class Script(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Script": diff --git a/reflex/components/el/elements/sectioning.pyi b/reflex/components/el/elements/sectioning.pyi index a6ea47d9c1..2d1cc457dc 100644 --- a/reflex/components/el/elements/sectioning.pyi +++ b/reflex/components/el/elements/sectioning.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML @@ -47,50 +47,40 @@ class Body(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Body": @@ -163,50 +153,40 @@ class Address(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Address": @@ -279,50 +259,40 @@ class Article(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Article": @@ -395,50 +365,40 @@ class Aside(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Aside": @@ -511,50 +471,40 @@ class Footer(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Footer": @@ -627,50 +577,40 @@ class Header(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Header": @@ -743,50 +683,40 @@ class H1(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "H1": @@ -859,50 +789,40 @@ class H2(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "H2": @@ -975,50 +895,40 @@ class H3(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "H3": @@ -1091,50 +1001,40 @@ class H4(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "H4": @@ -1207,50 +1107,40 @@ class H5(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "H5": @@ -1323,50 +1213,40 @@ class H6(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "H6": @@ -1439,50 +1319,40 @@ class Main(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Main": @@ -1555,50 +1425,40 @@ class Nav(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Nav": @@ -1671,50 +1531,40 @@ class Section(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Section": diff --git a/reflex/components/el/elements/tables.pyi b/reflex/components/el/elements/tables.pyi index d06d0cf6db..39ca144b86 100644 --- a/reflex/components/el/elements/tables.pyi +++ b/reflex/components/el/elements/tables.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML @@ -48,50 +48,40 @@ class Caption(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Caption": @@ -167,50 +157,40 @@ class Col(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Col": @@ -287,50 +267,40 @@ class Colgroup(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Colgroup": @@ -407,50 +377,40 @@ class Table(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Table": @@ -526,50 +486,40 @@ class Tbody(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Tbody": @@ -647,50 +597,40 @@ class Td(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Td": @@ -768,50 +708,40 @@ class Tfoot(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Tfoot": @@ -890,50 +820,40 @@ class Th(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Th": @@ -1012,50 +932,40 @@ class Thead(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Thead": @@ -1130,50 +1040,40 @@ class Tr(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Tr": diff --git a/reflex/components/el/elements/typography.pyi b/reflex/components/el/elements/typography.pyi index a6deb12e45..9263764412 100644 --- a/reflex/components/el/elements/typography.pyi +++ b/reflex/components/el/elements/typography.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import BaseHTML @@ -48,50 +48,40 @@ class Blockquote(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Blockquote": @@ -165,50 +155,40 @@ class Dd(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Dd": @@ -281,50 +261,40 @@ class Div(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Div": @@ -397,50 +367,40 @@ class Dl(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Dl": @@ -513,50 +473,40 @@ class Dt(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Dt": @@ -629,50 +579,40 @@ class Figcaption(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Figcaption": @@ -746,50 +686,40 @@ class Hr(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Hr": @@ -863,50 +793,40 @@ class Li(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Li": @@ -980,50 +900,40 @@ class Menu(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Menu": @@ -1100,50 +1010,40 @@ class Ol(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Ol": @@ -1219,50 +1119,40 @@ class P(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "P": @@ -1335,50 +1225,40 @@ class Pre(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Pre": @@ -1451,50 +1331,40 @@ class Ul(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Ul": @@ -1569,50 +1439,40 @@ class Ins(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Ins": @@ -1689,50 +1549,40 @@ class Del(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Del": diff --git a/reflex/components/gridjs/datatable.py b/reflex/components/gridjs/datatable.py index 6d856cf454..47069843b4 100644 --- a/reflex/components/gridjs/datatable.py +++ b/reflex/components/gridjs/datatable.py @@ -6,10 +6,11 @@ from reflex.components.component import Component from reflex.components.tags import Tag +from reflex.ivars.base import ImmutableComputedVar from reflex.utils import types from reflex.utils.imports import ImportDict from reflex.utils.serializers import serialize -from reflex.vars import BaseVar, ComputedVar, Var +from reflex.vars import ComputedVar, Var class Gridjs(Component): @@ -65,14 +66,17 @@ def create(cls, *children, **props): # The annotation should be provided if data is a computed var. We need this to know how to # render pandas dataframes. - if isinstance(data, ComputedVar) and data._var_type == Any: + if ( + isinstance(data, (ComputedVar, ImmutableComputedVar)) + and data._var_type == Any + ): raise ValueError( "Annotation of the computed var assigned to the data field should be provided." ) if ( columns is not None - and isinstance(columns, ComputedVar) + and isinstance(columns, (ComputedVar, ImmutableComputedVar)) and columns._var_type == Any ): raise ValueError( @@ -97,6 +101,8 @@ def create(cls, *children, **props): "column field should be specified when the data field is a list type" ) + print("props", props) + # Create the component. return super().create( *children, @@ -113,17 +119,13 @@ def add_imports(self) -> ImportDict: def _render(self) -> Tag: if isinstance(self.data, Var) and types.is_dataframe(self.data._var_type): - self.columns = BaseVar( + self.columns = self.data._replace( _var_name=f"{self.data._var_name}.columns", _var_type=List[Any], - _var_full_name_needs_state_prefix=True, - _var_data=self.data._var_data, ) - self.data = BaseVar( + self.data = self.data._replace( _var_name=f"{self.data._var_name}.data", _var_type=List[List[Any]], - _var_full_name_needs_state_prefix=True, - _var_data=self.data._var_data, ) if types.is_dataframe(type(self.data)): # If given a pandas df break up the data and columns diff --git a/reflex/components/gridjs/datatable.pyi b/reflex/components/gridjs/datatable.pyi index ee8bf6f3a0..8f0a427b1f 100644 --- a/reflex/components/gridjs/datatable.pyi +++ b/reflex/components/gridjs/datatable.pyi @@ -9,7 +9,7 @@ from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Gridjs(Component): @overload @@ -23,50 +23,40 @@ class Gridjs(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Gridjs": @@ -105,50 +95,40 @@ class DataTable(Gridjs): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DataTable": diff --git a/reflex/components/lucide/icon.pyi b/reflex/components/lucide/icon.pyi index 7fc7ee38d3..8fafa2827f 100644 --- a/reflex/components/lucide/icon.pyi +++ b/reflex/components/lucide/icon.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class LucideIconComponent(Component): @overload @@ -22,50 +22,40 @@ class LucideIconComponent(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "LucideIconComponent": @@ -99,50 +89,40 @@ class Icon(LucideIconComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Icon": diff --git a/reflex/components/markdown/markdown.py b/reflex/components/markdown/markdown.py index db38e7d0e4..272b576a2d 100644 --- a/reflex/components/markdown/markdown.py +++ b/reflex/components/markdown/markdown.py @@ -17,29 +17,26 @@ from reflex.components.radix.themes.typography.link import Link from reflex.components.radix.themes.typography.text import Text from reflex.components.tags.tag import Tag +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.utils import types from reflex.utils.imports import ImportDict, ImportVar from reflex.vars import Var # Special vars used in the component map. -_CHILDREN = Var.create_safe("children", _var_is_local=False, _var_is_string=False) -_PROPS = Var.create_safe("...props", _var_is_local=False, _var_is_string=False) -_MOCK_ARG = Var.create_safe("", _var_is_string=False) +_CHILDREN = ImmutableVar.create_safe("children") +_PROPS = ImmutableVar.create_safe("...props") +_MOCK_ARG = ImmutableVar.create_safe("") # Special remark plugins. -_REMARK_MATH = Var.create_safe("remarkMath", _var_is_local=False, _var_is_string=False) -_REMARK_GFM = Var.create_safe("remarkGfm", _var_is_local=False, _var_is_string=False) -_REMARK_UNWRAP_IMAGES = Var.create_safe( - "remarkUnwrapImages", _var_is_local=False, _var_is_string=False -) -_REMARK_PLUGINS = Var.create_safe([_REMARK_MATH, _REMARK_GFM, _REMARK_UNWRAP_IMAGES]) +_REMARK_MATH = ImmutableVar.create_safe("remarkMath") +_REMARK_GFM = ImmutableVar.create_safe("remarkGfm") +_REMARK_UNWRAP_IMAGES = ImmutableVar.create_safe("remarkUnwrapImages") +_REMARK_PLUGINS = LiteralVar.create([_REMARK_MATH, _REMARK_GFM, _REMARK_UNWRAP_IMAGES]) # Special rehype plugins. -_REHYPE_KATEX = Var.create_safe( - "rehypeKatex", _var_is_local=False, _var_is_string=False -) -_REHYPE_RAW = Var.create_safe("rehypeRaw", _var_is_local=False, _var_is_string=False) -_REHYPE_PLUGINS = Var.create_safe([_REHYPE_KATEX, _REHYPE_RAW]) +_REHYPE_KATEX = ImmutableVar.create_safe("rehypeKatex") +_REHYPE_RAW = ImmutableVar.create_safe("rehypeRaw") +_REHYPE_PLUGINS = LiteralVar.create([_REHYPE_KATEX, _REHYPE_RAW]) # These tags do NOT get props passed to them NO_PROPS_TAGS = ("ul", "ol", "li") @@ -208,10 +205,11 @@ def get_component(self, tag: str, **props) -> Component: children_prop = props.pop("children", None) if children_prop is not None: special_props.add( - Var.create_safe(f"children={str(children_prop)}", _var_is_string=False) + Var.create_safe( + f"children={{{str(children_prop)}}}", _var_is_string=False + ) ) children = [] - # Get the component. component = self.component_map[tag](*children, **props).set( special_props=special_props @@ -237,7 +235,7 @@ def format_component_map(self) -> dict[str, str]: The formatted component map. """ components = { - tag: f"{{({{node, {_CHILDREN._var_name}, {_PROPS._var_name}}}) => {self.format_component(tag)}}}" + tag: f"{{({{node, {_CHILDREN._var_name}, {_PROPS._var_name}}}) => ({self.format_component(tag)})}}" for tag in self.component_map } @@ -260,7 +258,7 @@ def format_component_map(self) -> dict[str, str]: return inline ? ( {self.format_component("code")} ) : ( - {self.format_component("codeblock", language=Var.create_safe("language", _var_is_local=False, _var_is_string=False))} + {self.format_component("codeblock", language=ImmutableVar.create_safe("language"))} ); }}}}""".replace("\n", " ") @@ -287,7 +285,7 @@ def _get_custom_code(self) -> str | None: function {self._get_component_map_name()} () {{ {formatted_hooks} return ( - {str(Var.create(self.format_component_map()))} + {str(ImmutableVar.create_safe(self.format_component_map()))} ) }} """ @@ -299,14 +297,10 @@ def _render(self) -> Tag: .add_props( remark_plugins=_REMARK_PLUGINS, rehype_plugins=_REHYPE_PLUGINS, + components=ImmutableVar.create_safe( + f"{self._get_component_map_name()}()" + ), ) .remove_props("componentMap", "componentMapHash") ) - tag.special_props.add( - Var.create_safe( - f"components={{{self._get_component_map_name()}()}}", - _var_is_local=True, - _var_is_string=False, - ), - ) return tag diff --git a/reflex/components/markdown/markdown.pyi b/reflex/components/markdown/markdown.pyi index e0eb434544..299cb99ff5 100644 --- a/reflex/components/markdown/markdown.pyi +++ b/reflex/components/markdown/markdown.pyi @@ -8,24 +8,21 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var -_CHILDREN = Var.create_safe("children", _var_is_local=False, _var_is_string=False) -_PROPS = Var.create_safe("...props", _var_is_local=False, _var_is_string=False) -_MOCK_ARG = Var.create_safe("", _var_is_string=False) -_REMARK_MATH = Var.create_safe("remarkMath", _var_is_local=False, _var_is_string=False) -_REMARK_GFM = Var.create_safe("remarkGfm", _var_is_local=False, _var_is_string=False) -_REMARK_UNWRAP_IMAGES = Var.create_safe( - "remarkUnwrapImages", _var_is_local=False, _var_is_string=False -) -_REMARK_PLUGINS = Var.create_safe([_REMARK_MATH, _REMARK_GFM, _REMARK_UNWRAP_IMAGES]) -_REHYPE_KATEX = Var.create_safe( - "rehypeKatex", _var_is_local=False, _var_is_string=False -) -_REHYPE_RAW = Var.create_safe("rehypeRaw", _var_is_local=False, _var_is_string=False) -_REHYPE_PLUGINS = Var.create_safe([_REHYPE_KATEX, _REHYPE_RAW]) +_CHILDREN = ImmutableVar.create_safe("children") +_PROPS = ImmutableVar.create_safe("...props") +_MOCK_ARG = ImmutableVar.create_safe("") +_REMARK_MATH = ImmutableVar.create_safe("remarkMath") +_REMARK_GFM = ImmutableVar.create_safe("remarkGfm") +_REMARK_UNWRAP_IMAGES = ImmutableVar.create_safe("remarkUnwrapImages") +_REMARK_PLUGINS = LiteralVar.create([_REMARK_MATH, _REMARK_GFM, _REMARK_UNWRAP_IMAGES]) +_REHYPE_KATEX = ImmutableVar.create_safe("rehypeKatex") +_REHYPE_RAW = ImmutableVar.create_safe("rehypeRaw") +_REHYPE_PLUGINS = LiteralVar.create([_REHYPE_KATEX, _REHYPE_RAW]) NO_PROPS_TAGS = ("ul", "ol", "li") @lru_cache @@ -45,50 +42,40 @@ class Markdown(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Markdown": diff --git a/reflex/components/moment/moment.pyi b/reflex/components/moment/moment.pyi index 5497a5336e..05c7ffc961 100644 --- a/reflex/components/moment/moment.pyi +++ b/reflex/components/moment/moment.pyi @@ -10,7 +10,7 @@ from reflex.components.component import NoSSRComponent from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var class MomentDelta(Base): years: Optional[int] @@ -56,53 +56,41 @@ class Moment(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Moment": diff --git a/reflex/components/next/base.pyi b/reflex/components/next/base.pyi index fd561fbecf..c8b9934d80 100644 --- a/reflex/components/next/base.pyi +++ b/reflex/components/next/base.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class NextComponent(Component): ... @@ -24,50 +24,40 @@ class NextComponent(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "NextComponent": diff --git a/reflex/components/next/image.py b/reflex/components/next/image.py index 108d174525..817bf590a4 100644 --- a/reflex/components/next/image.py +++ b/reflex/components/next/image.py @@ -102,8 +102,4 @@ def check_prop_type(prop_name, prop_value): # mysteriously, following `sizes` prop is needed to avoid blury images. props["sizes"] = "100vw" - src = props.get("src", None) - if src is not None and not isinstance(src, (Var)): - props["src"] = Var.create(value=src, _var_is_string=True) - return super().create(*children, **props) diff --git a/reflex/components/next/image.pyi b/reflex/components/next/image.pyi index a27a3420cb..e6b902cb02 100644 --- a/reflex/components/next/image.pyi +++ b/reflex/components/next/image.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import NextComponent @@ -37,56 +37,42 @@ class Image(NextComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_error: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_load: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_load: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Image": diff --git a/reflex/components/next/link.pyi b/reflex/components/next/link.pyi index 06d138176f..c25ca82588 100644 --- a/reflex/components/next/link.pyi +++ b/reflex/components/next/link.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class NextLink(Component): @overload @@ -24,50 +24,40 @@ class NextLink(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "NextLink": diff --git a/reflex/components/next/video.pyi b/reflex/components/next/video.pyi index eb28fab465..13b39a4f8f 100644 --- a/reflex/components/next/video.pyi +++ b/reflex/components/next/video.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import NextComponent @@ -26,50 +26,40 @@ class Video(NextComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Video": diff --git a/reflex/components/plotly/plotly.pyi b/reflex/components/plotly/plotly.pyi index 219f113bc9..c308e160fa 100644 --- a/reflex/components/plotly/plotly.pyi +++ b/reflex/components/plotly/plotly.pyi @@ -10,7 +10,7 @@ from reflex.components.component import NoSSRComponent from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils import console -from reflex.vars import BaseVar, Var +from reflex.vars import Var try: from plotly.graph_objects import Figure, layout @@ -46,103 +46,89 @@ class Plotly(NoSSRComponent): autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_after_plot: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_animated: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_animating_frame: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_animation_interrupted: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_autosize: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_before_hover: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_button_clicked: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_deselect: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_hover: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_hover: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_redraw: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_redraw: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_relayout: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_relayouting: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_restyle: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_selected: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_selecting: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_transition_interrupted: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_transitioning: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_unhover: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Plotly": diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index b93bbf284e..da32d747b5 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -11,6 +11,7 @@ from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.components.radix.themes.base import LiteralAccentColor, LiteralRadius from reflex.event import EventHandler +from reflex.ivars.base import LiteralVar from reflex.style import Style from reflex.vars import Var, get_uuid_string_var @@ -102,10 +103,10 @@ class AccordionRoot(AccordionComponent): radius: Var[LiteralRadius] # The time in milliseconds to animate open and close - duration: Var[int] = Var.create_safe(DEFAULT_ANIMATION_DURATION) + duration: Var[int] = LiteralVar.create(DEFAULT_ANIMATION_DURATION) # The easing function to use for the animation. - easing: Var[str] = Var.create_safe(DEFAULT_ANIMATION_EASING, _var_is_string=True) + easing: Var[str] = LiteralVar.create(DEFAULT_ANIMATION_EASING) # Whether to show divider lines between items. show_dividers: Var[bool] @@ -464,14 +465,12 @@ def add_style(self) -> dict[str, Any] | None: Returns: The style of the component. """ - slideDown = Var.create( + slideDown = LiteralVar.create( f"${{slideDown}} var(--animation-duration) var(--animation-easing)", - _var_is_string=True, ) - slideUp = Var.create( + slideUp = LiteralVar.create( f"${{slideUp}} var(--animation-duration) var(--animation-easing)", - _var_is_string=True, ) return { diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 7cc1059ab8..edf0111831 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -10,7 +10,7 @@ from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var LiteralAccordionType = Literal["single", "multiple"] LiteralAccordionDir = Literal["ltr", "rtl"] @@ -101,50 +101,40 @@ class AccordionComponent(RadixPrimitiveComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AccordionComponent": @@ -275,53 +265,43 @@ class AccordionRoot(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_value_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AccordionRoot": @@ -441,50 +421,40 @@ class AccordionItem(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AccordionItem": @@ -595,50 +565,40 @@ class AccordionHeader(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AccordionHeader": @@ -745,50 +705,40 @@ class AccordionTrigger(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AccordionTrigger": @@ -827,50 +777,40 @@ class AccordionIcon(Icon): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AccordionIcon": @@ -974,50 +914,40 @@ class AccordionContent(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AccordionContent": diff --git a/reflex/components/radix/primitives/base.pyi b/reflex/components/radix/primitives/base.pyi index 0ddea6cb50..a94b2263c5 100644 --- a/reflex/components/radix/primitives/base.pyi +++ b/reflex/components/radix/primitives/base.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class RadixPrimitiveComponent(Component): @overload @@ -23,50 +23,40 @@ class RadixPrimitiveComponent(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadixPrimitiveComponent": @@ -101,50 +91,40 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadixPrimitiveComponentWithClassName": diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi index dcbebfa15c..c40bdf53df 100644 --- a/reflex/components/radix/primitives/drawer.pyi +++ b/reflex/components/radix/primitives/drawer.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class DrawerComponent(RadixPrimitiveComponent): @overload @@ -24,50 +24,40 @@ class DrawerComponent(RadixPrimitiveComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerComponent": @@ -118,53 +108,43 @@ class DrawerRoot(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerRoot": @@ -208,50 +188,40 @@ class DrawerTrigger(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerTrigger": @@ -279,50 +249,40 @@ class DrawerPortal(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerPortal": @@ -357,65 +317,55 @@ class DrawerContent(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_close_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_interact_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerContent": @@ -454,50 +404,40 @@ class DrawerOverlay(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerOverlay": @@ -532,50 +472,40 @@ class DrawerClose(DrawerTrigger): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerClose": @@ -603,50 +533,40 @@ class DrawerTitle(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerTitle": @@ -681,50 +601,40 @@ class DrawerDescription(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerDescription": @@ -780,53 +690,43 @@ class Drawer(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerRoot": diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index 43bd0bbd2f..758630c4a6 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.el.elements.forms import Form as HTMLForm from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .base import RadixPrimitiveComponentWithClassName @@ -26,50 +26,40 @@ class FormComponent(RadixPrimitiveComponentWithClassName): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FormComponent": @@ -144,56 +134,44 @@ class FormRoot(FormComponent, HTMLForm): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_clear_server_errors: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_submit: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FormRoot": @@ -258,50 +236,40 @@ class FormField(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FormField": @@ -339,50 +307,40 @@ class FormLabel(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FormLabel": @@ -417,50 +375,40 @@ class FormControl(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FormControl": @@ -545,50 +493,40 @@ class FormMessage(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FormMessage": @@ -626,50 +564,40 @@ class FormValidityState(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FormValidityState": @@ -704,50 +632,40 @@ class FormSubmit(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FormSubmit": @@ -823,56 +741,44 @@ class Form(FormRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_clear_server_errors: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_submit: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Form": @@ -979,56 +885,44 @@ class FormNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_clear_server_errors: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_submit: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Form": diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index 99609c0fc4..f1c817587b 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class ProgressComponent(RadixPrimitiveComponentWithClassName): @overload @@ -24,50 +24,40 @@ class ProgressComponent(RadixPrimitiveComponentWithClassName): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ProgressComponent": @@ -109,50 +99,40 @@ class ProgressRoot(ProgressComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ProgressRoot": @@ -253,50 +233,40 @@ class ProgressIndicator(ProgressComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ProgressIndicator": @@ -404,50 +374,40 @@ class Progress(ProgressRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Progress": @@ -556,50 +516,40 @@ class ProgressNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Progress": diff --git a/reflex/components/radix/primitives/slider.pyi b/reflex/components/radix/primitives/slider.pyi index 0094bc3bbd..9ce737df47 100644 --- a/reflex/components/radix/primitives/slider.pyi +++ b/reflex/components/radix/primitives/slider.pyi @@ -9,7 +9,7 @@ from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var LiteralSliderOrientation = Literal["horizontal", "vertical"] LiteralSliderDir = Literal["ltr", "rtl"] @@ -27,50 +27,40 @@ class SliderComponent(RadixPrimitiveComponentWithClassName): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SliderComponent": @@ -122,56 +112,46 @@ class SliderRoot(SliderComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_value_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_value_commit: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SliderRoot": @@ -207,50 +187,40 @@ class SliderTrack(SliderComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SliderTrack": @@ -286,50 +256,40 @@ class SliderRange(SliderComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SliderRange": @@ -365,50 +325,40 @@ class SliderThumb(SliderComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SliderThumb": diff --git a/reflex/components/radix/themes/base.py b/reflex/components/radix/themes/base.py index e0e05cc816..5a7fb2d996 100644 --- a/reflex/components/radix/themes/base.py +++ b/reflex/components/radix/themes/base.py @@ -7,6 +7,7 @@ from reflex.components import Component from reflex.components.tags import Tag from reflex.config import get_config +from reflex.ivars.base import ImmutableVar from reflex.utils.imports import ImportDict, ImportVar from reflex.vars import Var @@ -113,6 +114,11 @@ def create( component.alias = "RadixThemes" + ( component.tag or component.__class__.__name__ ) + # value = props.get("value") + # if value is not None and component.alias == "RadixThemesSelect.Root": + # lv = LiteralVar.create(value) + # print(repr(lv)) + # print(f"Warning: Value {value} is not used in {component.alias}.") return component @staticmethod @@ -230,10 +236,8 @@ def add_imports(self) -> ImportDict | list[ImportDict]: def _render(self, props: dict[str, Any] | None = None) -> Tag: tag = super()._render(props) tag.add_props( - css=Var.create( - "{{...theme.styles.global[':root'], ...theme.styles.global.body}}", - _var_is_local=False, - _var_is_string=False, + css=ImmutableVar.create( + f"{{...theme.styles.global[':root'], ...theme.styles.global.body}}" ), ) return tag diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi index 3014b50137..5aea55d908 100644 --- a/reflex/components/radix/themes/base.pyi +++ b/reflex/components/radix/themes/base.pyi @@ -9,7 +9,7 @@ from reflex.components import Component from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"] LiteralJustify = Literal["start", "center", "end", "between"] @@ -103,50 +103,40 @@ class CommonMarginProps(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CommonMarginProps": @@ -187,50 +177,40 @@ class RadixLoadingProp(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadixLoadingProp": @@ -264,50 +244,40 @@ class RadixThemesComponent(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadixThemesComponent": @@ -343,50 +313,40 @@ class RadixThemesTriggerComponent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadixThemesTriggerComponent": @@ -505,50 +465,40 @@ class Theme(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Theme": @@ -595,50 +545,40 @@ class ThemePanel(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ThemePanel": @@ -675,50 +615,40 @@ class RadixThemesColorModeProvider(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadixThemesColorModeProvider": diff --git a/reflex/components/radix/themes/color_mode.py b/reflex/components/radix/themes/color_mode.py index 8243a822af..511a2ea31e 100644 --- a/reflex/components/radix/themes/color_mode.py +++ b/reflex/components/radix/themes/color_mode.py @@ -17,7 +17,6 @@ from __future__ import annotations -import dataclasses from typing import Literal, get_args from reflex.components.component import BaseComponent @@ -25,6 +24,7 @@ from reflex.components.lucide.icon import Icon from reflex.components.radix.themes.components.dropdown_menu import dropdown_menu from reflex.components.radix.themes.components.switch import Switch +from reflex.ivars.base import ImmutableVar from reflex.style import ( LIGHT_COLOR_MODE, color_mode, @@ -33,7 +33,7 @@ toggle_color_mode, ) from reflex.utils import console -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .components.icon_button import IconButton @@ -195,7 +195,7 @@ def create(cls, *children, **props): ) -class ColorModeNamespace(BaseVar): +class ColorModeNamespace(ImmutableVar): """Namespace for color mode components.""" icon = staticmethod(ColorModeIcon.create) @@ -204,5 +204,7 @@ class ColorModeNamespace(BaseVar): color_mode = color_mode_var_and_namespace = ColorModeNamespace( - **dataclasses.asdict(color_mode) + _var_name=color_mode._var_name, + _var_type=color_mode._var_type, + _var_data=color_mode.get_default_value(), ) diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi index 474c4cf360..3ad5e46d34 100644 --- a/reflex/components/radix/themes/color_mode.pyi +++ b/reflex/components/radix/themes/color_mode.pyi @@ -3,7 +3,6 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -import dataclasses from typing import Any, Callable, Dict, Literal, Optional, Union, get_args, overload from reflex.components.component import BaseComponent @@ -12,11 +11,12 @@ from reflex.components.core.cond import Cond from reflex.components.lucide.icon import Icon from reflex.components.radix.themes.components.switch import Switch from reflex.event import EventHandler, EventSpec +from reflex.ivars.base import ImmutableVar from reflex.style import ( Style, color_mode, ) -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .components.icon_button import IconButton @@ -38,50 +38,40 @@ class ColorModeIcon(Cond): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ColorModeIcon": @@ -250,50 +240,40 @@ class ColorModeIconButton(IconButton): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ColorModeIconButton": @@ -454,53 +434,41 @@ class ColorModeSwitch(Switch): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ColorModeSwitch": @@ -533,11 +501,13 @@ class ColorModeSwitch(Switch): """ ... -class ColorModeNamespace(BaseVar): +class ColorModeNamespace(ImmutableVar): icon = staticmethod(ColorModeIcon.create) button = staticmethod(ColorModeIconButton.create) switch = staticmethod(ColorModeSwitch.create) color_mode = color_mode_var_and_namespace = ColorModeNamespace( - **dataclasses.asdict(color_mode) + _var_name=color_mode._var_name, + _var_type=color_mode._var_type, + _var_data=color_mode.get_default_value(), ) diff --git a/reflex/components/radix/themes/components/alert_dialog.pyi b/reflex/components/radix/themes/components/alert_dialog.pyi index 406d5eb2dc..4cb9e966cf 100644 --- a/reflex/components/radix/themes/components/alert_dialog.pyi +++ b/reflex/components/radix/themes/components/alert_dialog.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent, RadixThemesTriggerComponent @@ -29,53 +29,43 @@ class AlertDialogRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AlertDialogRoot": @@ -112,50 +102,40 @@ class AlertDialogTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AlertDialogTrigger": @@ -219,59 +199,49 @@ class AlertDialogContent(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_close_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AlertDialogContent": @@ -325,50 +295,40 @@ class AlertDialogTitle(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AlertDialogTitle": @@ -404,50 +364,40 @@ class AlertDialogDescription(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AlertDialogDescription": @@ -483,50 +433,40 @@ class AlertDialogAction(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AlertDialogAction": @@ -553,50 +493,40 @@ class AlertDialogCancel(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AlertDialogCancel": diff --git a/reflex/components/radix/themes/components/aspect_ratio.pyi b/reflex/components/radix/themes/components/aspect_ratio.pyi index 08109b740a..612c67a296 100644 --- a/reflex/components/radix/themes/components/aspect_ratio.pyi +++ b/reflex/components/radix/themes/components/aspect_ratio.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -24,50 +24,40 @@ class AspectRatio(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AspectRatio": diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi index 894ee6f676..c0476d543d 100644 --- a/reflex/components/radix/themes/components/avatar.pyi +++ b/reflex/components/radix/themes/components/avatar.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -114,50 +114,40 @@ class Avatar(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Avatar": diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index 74d6dec240..327fe2b90f 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -135,50 +135,40 @@ class Badge(elements.Span, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Badge": diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index 877b7630be..95a80c84e7 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import ( RadixLoadingProp, @@ -158,50 +158,40 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Button": diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index 2085fb4f55..04e1d13178 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -133,50 +133,40 @@ class CalloutRoot(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CalloutRoot": @@ -257,50 +247,40 @@ class CalloutIcon(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CalloutIcon": @@ -376,50 +356,40 @@ class CalloutText(elements.P, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CalloutText": @@ -578,50 +548,40 @@ class Callout(CalloutRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Callout": @@ -786,50 +746,40 @@ class CalloutNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Callout": diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index dc12b7d884..142cc74484 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -68,50 +68,40 @@ class Card(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Card": diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index 4751c49955..f191ce613e 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -7,6 +7,7 @@ from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.event import EventHandler +from reflex.ivars.base import LiteralVar from reflex.vars import Var from ..base import ( @@ -115,9 +116,7 @@ class HighLevelCheckbox(RadixThemesComponent): on_change: EventHandler[lambda e0: [e0]] @classmethod - def create( - cls, text: Var[str] = Var.create_safe("", _var_is_string=True), **props - ) -> Component: + def create(cls, text: Var[str] = LiteralVar.create(""), **props) -> Component: """Create a checkbox with a label. Args: diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index d21018e1d6..52441eef4c 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -115,53 +115,41 @@ class Checkbox(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Checkbox": @@ -294,53 +282,41 @@ class HighLevelCheckbox(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HighLevelCheckbox": @@ -470,53 +446,41 @@ class CheckboxNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HighLevelCheckbox": diff --git a/reflex/components/radix/themes/components/checkbox_cards.pyi b/reflex/components/radix/themes/components/checkbox_cards.pyi index c35754bde2..d7be8a056e 100644 --- a/reflex/components/radix/themes/components/checkbox_cards.pyi +++ b/reflex/components/radix/themes/components/checkbox_cards.pyi @@ -9,7 +9,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -148,50 +148,40 @@ class CheckboxCardsRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CheckboxCardsRoot": @@ -233,50 +223,40 @@ class CheckboxCardsItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CheckboxCardsItem": diff --git a/reflex/components/radix/themes/components/checkbox_group.pyi b/reflex/components/radix/themes/components/checkbox_group.pyi index 334ee3dd38..8a730b870c 100644 --- a/reflex/components/radix/themes/components/checkbox_group.pyi +++ b/reflex/components/radix/themes/components/checkbox_group.pyi @@ -9,7 +9,7 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -107,50 +107,40 @@ class CheckboxGroupRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CheckboxGroupRoot": @@ -194,50 +184,40 @@ class CheckboxGroupItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CheckboxGroupItem": diff --git a/reflex/components/radix/themes/components/context_menu.pyi b/reflex/components/radix/themes/components/context_menu.pyi index dbe23ee81d..e2f9d01e29 100644 --- a/reflex/components/radix/themes/components/context_menu.pyi +++ b/reflex/components/radix/themes/components/context_menu.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -26,53 +26,43 @@ class ContextMenuRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ContextMenuRoot": @@ -110,50 +100,40 @@ class ContextMenuTrigger(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ContextMenuTrigger": @@ -265,65 +245,55 @@ class ContextMenuContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_close_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_focus_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_interact_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ContextMenuContent": @@ -365,50 +335,40 @@ class ContextMenuSub(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ContextMenuSub": @@ -445,50 +405,40 @@ class ContextMenuSubTrigger(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ContextMenuSubTrigger": @@ -526,62 +476,52 @@ class ContextMenuSubContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_focus_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_interact_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ContextMenuSubContent": @@ -681,50 +621,40 @@ class ContextMenuItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ContextMenuItem": @@ -762,50 +692,40 @@ class ContextMenuSeparator(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ContextMenuSeparator": diff --git a/reflex/components/radix/themes/components/data_list.pyi b/reflex/components/radix/themes/components/data_list.pyi index 8eb49e9f51..93d00c86b2 100644 --- a/reflex/components/radix/themes/components/data_list.pyi +++ b/reflex/components/radix/themes/components/data_list.pyi @@ -9,7 +9,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -60,50 +60,40 @@ class DataListRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DataListRoot": @@ -159,50 +149,40 @@ class DataListItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DataListItem": @@ -310,50 +290,40 @@ class DataListLabel(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DataListLabel": @@ -393,50 +363,40 @@ class DataListValue(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DataListValue": diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index 0f05ca4069..02b1a6c9f7 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent, RadixThemesTriggerComponent @@ -27,53 +27,43 @@ class DialogRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DialogRoot": @@ -110,50 +100,40 @@ class DialogTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DialogTrigger": @@ -180,50 +160,40 @@ class DialogTitle(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DialogTitle": @@ -295,65 +265,55 @@ class DialogContent(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_close_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_interact_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DialogContent": @@ -406,50 +366,40 @@ class DialogDescription(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DialogDescription": @@ -485,50 +435,40 @@ class DialogClose(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DialogClose": @@ -561,53 +501,43 @@ class Dialog(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DialogRoot": diff --git a/reflex/components/radix/themes/components/dropdown_menu.pyi b/reflex/components/radix/themes/components/dropdown_menu.pyi index d2b9216e1a..df7b235894 100644 --- a/reflex/components/radix/themes/components/dropdown_menu.pyi +++ b/reflex/components/radix/themes/components/dropdown_menu.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent, RadixThemesTriggerComponent @@ -36,53 +36,43 @@ class DropdownMenuRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DropdownMenuRoot": @@ -123,50 +113,40 @@ class DropdownMenuTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DropdownMenuTrigger": @@ -297,65 +277,55 @@ class DropdownMenuContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_close_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_focus_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_interact_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DropdownMenuContent": @@ -410,50 +380,40 @@ class DropdownMenuSubTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DropdownMenuSubTrigger": @@ -482,53 +442,43 @@ class DropdownMenuSub(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DropdownMenuSub": @@ -585,62 +535,52 @@ class DropdownMenuSubContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_focus_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_interact_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DropdownMenuSubContent": @@ -752,53 +692,41 @@ class DropdownMenuItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_select: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_select: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DropdownMenuItem": @@ -839,50 +767,40 @@ class DropdownMenuSeparator(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DropdownMenuSeparator": diff --git a/reflex/components/radix/themes/components/hover_card.pyi b/reflex/components/radix/themes/components/hover_card.pyi index 0d43f387f2..ad56a83027 100644 --- a/reflex/components/radix/themes/components/hover_card.pyi +++ b/reflex/components/radix/themes/components/hover_card.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent, RadixThemesTriggerComponent @@ -30,53 +30,43 @@ class HoverCardRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HoverCardRoot": @@ -116,50 +106,40 @@ class HoverCardTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HoverCardTrigger": @@ -230,50 +210,40 @@ class HoverCardContent(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HoverCardContent": @@ -335,53 +305,43 @@ class HoverCard(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HoverCardRoot": diff --git a/reflex/components/radix/themes/components/icon_button.pyi b/reflex/components/radix/themes/components/icon_button.pyi index 25de639384..b5c75a9b6c 100644 --- a/reflex/components/radix/themes/components/icon_button.pyi +++ b/reflex/components/radix/themes/components/icon_button.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import ( RadixLoadingProp, @@ -158,50 +158,40 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "IconButton": diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index 0106a23b2c..3671d2a5ca 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -133,50 +133,40 @@ class Inset(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Inset": diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index 82bec124b3..d8bd9d1d6f 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent, RadixThemesTriggerComponent @@ -28,53 +28,43 @@ class PopoverRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "PopoverRoot": @@ -112,50 +102,40 @@ class PopoverTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "PopoverTrigger": @@ -233,68 +213,58 @@ class PopoverContent(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_close_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_focus_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_interact_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "PopoverContent": @@ -352,50 +322,40 @@ class PopoverClose(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "PopoverClose": diff --git a/reflex/components/radix/themes/components/progress.pyi b/reflex/components/radix/themes/components/progress.pyi index 514061ba7f..a647e94e64 100644 --- a/reflex/components/radix/themes/components/progress.pyi +++ b/reflex/components/radix/themes/components/progress.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -113,50 +113,40 @@ class Progress(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Progress": diff --git a/reflex/components/radix/themes/components/radio.pyi b/reflex/components/radix/themes/components/radio.pyi index e00a6db581..5c1b303fa0 100644 --- a/reflex/components/radix/themes/components/radio.pyi +++ b/reflex/components/radix/themes/components/radio.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -104,50 +104,40 @@ class Radio(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Radio": diff --git a/reflex/components/radix/themes/components/radio_cards.pyi b/reflex/components/radix/themes/components/radio_cards.pyi index 4feb78d20a..2c0bf002b0 100644 --- a/reflex/components/radix/themes/components/radio_cards.pyi +++ b/reflex/components/radix/themes/components/radio_cards.pyi @@ -9,7 +9,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -162,53 +162,43 @@ class RadioCardsRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_value_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadioCardsRoot": @@ -262,50 +252,40 @@ class RadioCardsItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadioCardsItem": diff --git a/reflex/components/radix/themes/components/radio_group.py b/reflex/components/radix/themes/components/radio_group.py index 20ccbd5b5a..049e47b292 100644 --- a/reflex/components/radix/themes/components/radio_group.py +++ b/reflex/components/radix/themes/components/radio_group.py @@ -10,6 +10,8 @@ from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.event import EventHandler +from reflex.ivars.base import ImmutableVar, LiteralVar +from reflex.ivars.sequence import StringVar from reflex.vars import Var from ..base import ( @@ -27,14 +29,10 @@ class RadioGroupRoot(RadixThemesComponent): tag = "RadioGroup.Root" # The size of the radio group: "1" | "2" | "3" - size: Var[Responsive[Literal["1", "2", "3"]]] = Var.create_safe( - "2", _var_is_string=True - ) + size: Var[Responsive[Literal["1", "2", "3"]]] = LiteralVar.create("2") # The variant of the radio group - variant: Var[Literal["classic", "surface", "soft"]] = Var.create_safe( - "classic", _var_is_string=True - ) + variant: Var[Literal["classic", "surface", "soft"]] = LiteralVar.create("classic") # The color of the radio group color_scheme: Var[LiteralAccentColor] @@ -86,20 +84,16 @@ class HighLevelRadioGroup(RadixThemesComponent): items: Var[List[str]] # The direction of the radio group. - direction: Var[LiteralFlexDirection] = Var.create_safe( - "column", _var_is_string=True - ) + direction: Var[LiteralFlexDirection] = LiteralVar.create("column") # The gap between the items of the radio group. - spacing: Var[LiteralSpacing] = Var.create_safe("2", _var_is_string=True) + spacing: Var[LiteralSpacing] = LiteralVar.create("2") # The size of the radio group. - size: Var[Literal["1", "2", "3"]] = Var.create_safe("2", _var_is_string=True) + size: Var[Literal["1", "2", "3"]] = LiteralVar.create("2") # The variant of the radio group - variant: Var[Literal["classic", "surface", "soft"]] = Var.create_safe( - "classic", _var_is_string=True - ) + variant: Var[Literal["classic", "surface", "soft"]] = LiteralVar.create("classic") # The color of the radio group color_scheme: Var[LiteralAccentColor] @@ -147,34 +141,29 @@ def create( color_scheme = props.pop("color_scheme", None) default_value = props.pop("default_value", "") - default_value = Var.create(default_value, _var_is_string=True) + default_value = LiteralVar.create(default_value) # convert only non-strings to json(JSON.stringify) so quotes are not rendered # for string literal types. if isinstance(default_value, str) or ( isinstance(default_value, Var) and default_value._var_type is str ): - default_value = Var.create(default_value, _var_is_string=True) # type: ignore + default_value = LiteralVar.create(default_value) # type: ignore else: - default_value = ( - Var.create(default_value, _var_is_string=False) - .to_string() # type: ignore - ._replace(_var_is_local=False) - ) + default_value = ImmutableVar.create_safe(default_value).to_string() - def radio_group_item(value: str | Var) -> Component: - item_value = Var.create(value, _var_is_string=False) # type: ignore + def radio_group_item(value: Var) -> Component: item_value = rx.cond( - item_value._type() == str, # type: ignore - item_value, - item_value.to_string()._replace(_var_is_local=False), # type: ignore - )._replace(_var_type=str) + value._type() == "string", + value, + value.to_string(), + ).to(StringVar) return Text.create( Flex.create( RadioGroupItem.create( value=item_value, - disabled=props.get("disabled", Var.create(False)), + disabled=props.get("disabled", LiteralVar.create(False)), ), item_value, spacing="2", @@ -183,8 +172,7 @@ def radio_group_item(value: str | Var) -> Component: as_="label", ) - items = Var.create(items) # type: ignore - children = [rx.foreach(items, radio_group_item)] + children = [rx.foreach(LiteralVar.create(items), radio_group_item)] return RadioGroupRoot.create( Flex.create( diff --git a/reflex/components/radix/themes/components/radio_group.pyi b/reflex/components/radix/themes/components/radio_group.pyi index 0452450ff0..8fb19ae677 100644 --- a/reflex/components/radix/themes/components/radio_group.pyi +++ b/reflex/components/radix/themes/components/radio_group.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -112,53 +112,41 @@ class RadioGroupRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadioGroupRoot": @@ -206,50 +194,40 @@ class RadioGroupItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadioGroupItem": @@ -378,50 +356,40 @@ class HighLevelRadioGroup(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HighLevelRadioGroup": @@ -557,50 +525,40 @@ class RadioGroup(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HighLevelRadioGroup": diff --git a/reflex/components/radix/themes/components/scroll_area.pyi b/reflex/components/radix/themes/components/scroll_area.pyi index e7d2018da3..8b4e44df52 100644 --- a/reflex/components/radix/themes/components/scroll_area.pyi +++ b/reflex/components/radix/themes/components/scroll_area.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -36,50 +36,40 @@ class ScrollArea(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ScrollArea": diff --git a/reflex/components/radix/themes/components/segmented_control.pyi b/reflex/components/radix/themes/components/segmented_control.pyi index 4ac662e135..f284dab771 100644 --- a/reflex/components/radix/themes/components/segmented_control.pyi +++ b/reflex/components/radix/themes/components/segmented_control.pyi @@ -9,7 +9,7 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -114,53 +114,41 @@ class SegmentedControlRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SegmentedControlRoot": @@ -202,50 +190,40 @@ class SegmentedControlItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SegmentedControlItem": diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index 125ced252d..e2657b7ce0 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -43,56 +43,44 @@ class SelectRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SelectRoot": @@ -211,50 +199,40 @@ class SelectTrigger(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SelectTrigger": @@ -380,59 +358,49 @@ class SelectContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_close_auto_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SelectContent": @@ -476,50 +444,40 @@ class SelectGroup(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SelectGroup": @@ -557,50 +515,40 @@ class SelectItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SelectItem": @@ -638,50 +586,40 @@ class SelectLabel(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SelectLabel": @@ -717,50 +655,40 @@ class SelectSeparator(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SelectSeparator": @@ -899,56 +827,44 @@ class HighLevelSelect(SelectRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HighLevelSelect": @@ -1107,56 +1023,44 @@ class Select(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HighLevelSelect": diff --git a/reflex/components/radix/themes/components/separator.py b/reflex/components/radix/themes/components/separator.py index fbc4458789..81f83194bf 100644 --- a/reflex/components/radix/themes/components/separator.py +++ b/reflex/components/radix/themes/components/separator.py @@ -3,6 +3,7 @@ from typing import Literal from reflex.components.core.breakpoints import Responsive +from reflex.ivars.base import LiteralVar from reflex.vars import Var from ..base import ( @@ -19,9 +20,7 @@ class Separator(RadixThemesComponent): tag = "Separator" # The size of the select: "1" | "2" | "3" | "4" - size: Var[Responsive[LiteralSeperatorSize]] = Var.create_safe( - "4", _var_is_string=True - ) + size: Var[Responsive[LiteralSeperatorSize]] = LiteralVar.create("4") # The color of the select color_scheme: Var[LiteralAccentColor] diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi index 0c5dc64ec5..15670f51a9 100644 --- a/reflex/components/radix/themes/components/separator.pyi +++ b/reflex/components/radix/themes/components/separator.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -113,50 +113,40 @@ class Separator(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Separator": diff --git a/reflex/components/radix/themes/components/skeleton.pyi b/reflex/components/radix/themes/components/skeleton.pyi index 3f2c048f6f..d6c6bbb03c 100644 --- a/reflex/components/radix/themes/components/skeleton.pyi +++ b/reflex/components/radix/themes/components/skeleton.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixLoadingProp, RadixThemesComponent @@ -43,50 +43,40 @@ class Skeleton(RadixLoadingProp, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Skeleton": diff --git a/reflex/components/radix/themes/components/slider.pyi b/reflex/components/radix/themes/components/slider.pyi index 57fda44d27..362451bfe2 100644 --- a/reflex/components/radix/themes/components/slider.pyi +++ b/reflex/components/radix/themes/components/slider.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -133,56 +133,44 @@ class Slider(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_value_commit: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Slider": diff --git a/reflex/components/radix/themes/components/spinner.pyi b/reflex/components/radix/themes/components/spinner.pyi index f061e58133..7fa62734a9 100644 --- a/reflex/components/radix/themes/components/spinner.pyi +++ b/reflex/components/radix/themes/components/spinner.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixLoadingProp, RadixThemesComponent @@ -38,50 +38,40 @@ class Spinner(RadixLoadingProp, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Spinner": diff --git a/reflex/components/radix/themes/components/switch.pyi b/reflex/components/radix/themes/components/switch.pyi index cd01cc6048..a0f85dbac1 100644 --- a/reflex/components/radix/themes/components/switch.pyi +++ b/reflex/components/radix/themes/components/switch.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -118,53 +118,41 @@ class Switch(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Switch": diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 01b4e61c4f..9cac240f27 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -66,50 +66,40 @@ class TableRoot(elements.Table, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TableRoot": @@ -190,50 +180,40 @@ class TableHeader(elements.Thead, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TableHeader": @@ -316,50 +296,40 @@ class TableRow(elements.Tr, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TableRow": @@ -447,50 +417,40 @@ class TableColumnHeaderCell(elements.Th, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TableColumnHeaderCell": @@ -573,50 +533,40 @@ class TableBody(elements.Tbody, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TableBody": @@ -703,50 +653,40 @@ class TableCell(elements.Td, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TableCell": @@ -838,50 +778,40 @@ class TableRowHeaderCell(elements.Th, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TableRowHeaderCell": diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index 7d324e96d3..0fb33b16dd 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -40,53 +40,41 @@ class TabsRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TabsRoot": @@ -136,50 +124,40 @@ class TabsList(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TabsList": @@ -281,50 +259,40 @@ class TabsTrigger(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TabsTrigger": @@ -365,50 +333,40 @@ class TabsContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TabsContent": @@ -461,53 +419,41 @@ class Tabs(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TabsRoot": diff --git a/reflex/components/radix/themes/components/text_area.pyi b/reflex/components/radix/themes/components/text_area.pyi index 231158c841..9a8a478734 100644 --- a/reflex/components/radix/themes/components/text_area.pyi +++ b/reflex/components/radix/themes/components/text_area.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -168,59 +168,45 @@ class TextArea(RadixThemesComponent, elements.Textarea): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_key_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TextArea": diff --git a/reflex/components/radix/themes/components/text_field.py b/reflex/components/radix/themes/components/text_field.py index c6d7ddf487..aca4228401 100644 --- a/reflex/components/radix/themes/components/text_field.py +++ b/reflex/components/radix/themes/components/text_field.py @@ -10,6 +10,7 @@ from reflex.components.core.debounce import DebounceInput from reflex.components.el import elements from reflex.event import EventHandler +from reflex.ivars.base import LiteralVar from reflex.style import Style, format_as_emotion from reflex.utils import console from reflex.vars import Var @@ -154,7 +155,7 @@ def create_root_deprecated(cls, *children, **props) -> Component: style = Style(template.style) style.update(child.style) child._get_style = lambda style=style: { - "css": Var.create(format_as_emotion(style)) + "css": LiteralVar.create(format_as_emotion(style)) } for trigger in template.event_triggers: if trigger not in child.event_triggers: diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi index 86ba7e70f6..5d6df2f265 100644 --- a/reflex/components/radix/themes/components/text_field.pyi +++ b/reflex/components/radix/themes/components/text_field.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -149,59 +149,45 @@ class TextFieldRoot(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_key_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TextFieldRoot": @@ -332,50 +318,40 @@ class TextFieldSlot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TextFieldSlot": @@ -534,59 +510,45 @@ class TextField(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_key_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "TextFieldRoot": diff --git a/reflex/components/radix/themes/components/tooltip.pyi b/reflex/components/radix/themes/components/tooltip.pyi index 0628acff16..a2344958ff 100644 --- a/reflex/components/radix/themes/components/tooltip.pyi +++ b/reflex/components/radix/themes/components/tooltip.pyi @@ -7,7 +7,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -62,59 +62,49 @@ class Tooltip(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_escape_key_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_pointer_down_outside: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Tooltip": diff --git a/reflex/components/radix/themes/layout/base.pyi b/reflex/components/radix/themes/layout/base.pyi index 83e0e018f8..21fed38eff 100644 --- a/reflex/components/radix/themes/layout/base.pyi +++ b/reflex/components/radix/themes/layout/base.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import CommonMarginProps, RadixThemesComponent @@ -201,50 +201,40 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "LayoutComponent": diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi index 9c4bd800d9..6bcd75cada 100644 --- a/reflex/components/radix/themes/layout/box.pyi +++ b/reflex/components/radix/themes/layout/box.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -48,50 +48,40 @@ class Box(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Box": diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index bbdf51d07d..93f8848983 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .flex import Flex @@ -125,50 +125,40 @@ class Center(Flex): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Center": diff --git a/reflex/components/radix/themes/layout/container.py b/reflex/components/radix/themes/layout/container.py index c0f1c7dc8b..4ed18031d5 100644 --- a/reflex/components/radix/themes/layout/container.py +++ b/reflex/components/radix/themes/layout/container.py @@ -6,6 +6,7 @@ from reflex.components.core.breakpoints import Responsive from reflex.components.el import elements +from reflex.ivars.base import LiteralVar from reflex.style import STACK_CHILDREN_FULL_WIDTH from reflex.vars import Var @@ -23,9 +24,7 @@ class Container(elements.Div, RadixThemesComponent): tag = "Container" # The size of the container: "1" - "4" (default "3") - size: Var[Responsive[LiteralContainerSize]] = Var.create_safe( - "3", _var_is_string=True - ) + size: Var[Responsive[LiteralContainerSize]] = LiteralVar.create("3") @classmethod def create( diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi index 4e4c0bae32..3c2013b8e4 100644 --- a/reflex/components/radix/themes/layout/container.pyi +++ b/reflex/components/radix/themes/layout/container.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -65,50 +65,40 @@ class Container(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Container": diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index f4e851d091..a49f082627 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -128,50 +128,40 @@ class Flex(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Flex": diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index 1acc6f9b1b..c11d1dfcdd 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -157,50 +157,40 @@ class Grid(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Grid": diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index f6cc3141ef..bf8da641cc 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -9,7 +9,7 @@ from reflex.components.component import Component, ComponentNamespace from reflex.components.el.elements.typography import Li, Ol, Ul from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var LiteralListStyleTypeUnordered = Literal["none", "disc", "circle", "square"] LiteralListStyleTypeOrdered = Literal[ @@ -84,50 +84,40 @@ class BaseList(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "BaseList": @@ -191,50 +181,40 @@ class UnorderedList(BaseList, Ul): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "UnorderedList": @@ -315,50 +295,40 @@ class OrderedList(BaseList, Ol): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "OrderedList": @@ -437,50 +407,40 @@ class ListItem(Li): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ListItem": @@ -575,50 +535,40 @@ class List(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "BaseList": diff --git a/reflex/components/radix/themes/layout/section.py b/reflex/components/radix/themes/layout/section.py index d9b27bdf95..a3e58be861 100644 --- a/reflex/components/radix/themes/layout/section.py +++ b/reflex/components/radix/themes/layout/section.py @@ -6,6 +6,7 @@ from reflex.components.core.breakpoints import Responsive from reflex.components.el import elements +from reflex.ivars.base import LiteralVar from reflex.vars import Var from ..base import RadixThemesComponent @@ -19,9 +20,7 @@ class Section(elements.Section, RadixThemesComponent): tag = "Section" # The size of the section: "1" - "3" (default "2") - size: Var[Responsive[LiteralSectionSize]] = Var.create_safe( - "2", _var_is_string=True - ) + size: Var[Responsive[LiteralSectionSize]] = LiteralVar.create("2") section = Section.create diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi index 31cf355e89..b4e1050d81 100644 --- a/reflex/components/radix/themes/layout/section.pyi +++ b/reflex/components/radix/themes/layout/section.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -62,50 +62,40 @@ class Section(elements.Section, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Section": diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index aedd9b041e..652c1a0b09 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .flex import Flex @@ -125,50 +125,40 @@ class Spacer(Flex): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Spacer": diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index 0296f92ca7..4ba630fc23 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import LiteralAlign, LiteralSpacing from .flex import Flex @@ -93,50 +93,40 @@ class Stack(Flex): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Stack": @@ -248,50 +238,40 @@ class VStack(Stack): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "VStack": @@ -403,50 +383,40 @@ class HStack(Stack): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "HStack": diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi index 5ffe713556..3ab3c829b4 100644 --- a/reflex/components/radix/themes/typography/blockquote.pyi +++ b/reflex/components/radix/themes/typography/blockquote.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -139,50 +139,40 @@ class Blockquote(elements.Blockquote, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Blockquote": diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi index f1fc274e18..f30a39f9a5 100644 --- a/reflex/components/radix/themes/typography/code.pyi +++ b/reflex/components/radix/themes/typography/code.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -144,50 +144,40 @@ class Code(elements.Code, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Code": diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi index 1dad3b97f0..d1fe262189 100644 --- a/reflex/components/radix/themes/typography/heading.pyi +++ b/reflex/components/radix/themes/typography/heading.pyi @@ -9,7 +9,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -164,50 +164,40 @@ class Heading(elements.H1, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Heading": diff --git a/reflex/components/radix/themes/typography/link.pyi b/reflex/components/radix/themes/typography/link.pyi index ab29e8f597..54cebee64d 100644 --- a/reflex/components/radix/themes/typography/link.pyi +++ b/reflex/components/radix/themes/typography/link.pyi @@ -12,7 +12,7 @@ from reflex.components.next.link import NextLink from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -176,50 +176,40 @@ class Link(RadixThemesComponent, A, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Link": diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index 1d7857a5dc..919ed17e03 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from ..base import RadixThemesComponent @@ -231,50 +231,40 @@ class Text(elements.Span, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Text": @@ -518,50 +508,40 @@ class Span(Text): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Span": @@ -645,50 +625,40 @@ class Em(elements.Em, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Em": @@ -770,50 +740,40 @@ class Kbd(elements.Kbd, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Kbd": @@ -891,50 +851,40 @@ class Quote(elements.Q, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Quote": @@ -1011,50 +961,40 @@ class Strong(elements.Strong, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Strong": @@ -1294,50 +1234,40 @@ class TextNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Text": diff --git a/reflex/components/react_player/audio.pyi b/reflex/components/react_player/audio.pyi index f138d3fd8f..f84122403e 100644 --- a/reflex/components/react_player/audio.pyi +++ b/reflex/components/react_player/audio.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.react_player.react_player import ReactPlayer from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Audio(ReactPlayer): pass @@ -33,98 +33,72 @@ class Audio(ReactPlayer): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_buffer: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_buffer: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_buffer_end: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_click_preview: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_disable_pip: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_duration: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_enable_pip: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_ended: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_error: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_ended: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_pause: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_play: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_pause: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_play: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_playback_quality_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_playback_rate_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_progress: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_ready: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_seek: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_start: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_seek: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_start: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Audio": diff --git a/reflex/components/react_player/react_player.pyi b/reflex/components/react_player/react_player.pyi index 79e38353aa..c9e8ba5692 100644 --- a/reflex/components/react_player/react_player.pyi +++ b/reflex/components/react_player/react_player.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.component import NoSSRComponent from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class ReactPlayer(NoSSRComponent): @overload @@ -31,98 +31,72 @@ class ReactPlayer(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_buffer: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_buffer: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_buffer_end: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_click_preview: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_disable_pip: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_duration: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_enable_pip: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_ended: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_error: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_ended: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_pause: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_play: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_pause: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_play: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_playback_quality_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_playback_rate_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_progress: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_ready: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_seek: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_start: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_seek: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_start: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ReactPlayer": diff --git a/reflex/components/react_player/video.pyi b/reflex/components/react_player/video.pyi index 4016c6f44b..7f7c1fda19 100644 --- a/reflex/components/react_player/video.pyi +++ b/reflex/components/react_player/video.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Optional, Union, overload from reflex.components.react_player.react_player import ReactPlayer from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Video(ReactPlayer): pass @@ -33,98 +33,72 @@ class Video(ReactPlayer): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_buffer: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_buffer: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_buffer_end: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_click_preview: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_disable_pip: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_duration: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_enable_pip: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_ended: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_error: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_ended: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_pause: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_play: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_pause: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_play: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_playback_quality_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_playback_rate_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_progress: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_ready: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_seek: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_start: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_seek: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_start: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Video": diff --git a/reflex/components/recharts/cartesian.py b/reflex/components/recharts/cartesian.py index 0f2ec2f329..4c76e82ea4 100644 --- a/reflex/components/recharts/cartesian.py +++ b/reflex/components/recharts/cartesian.py @@ -7,6 +7,7 @@ from reflex.constants import EventTriggers from reflex.constants.colors import Color from reflex.event import EventHandler +from reflex.ivars.base import LiteralVar from reflex.vars import Var from .recharts import ( @@ -86,7 +87,7 @@ class Axis(Recharts): tick_count: Var[int] # If set false, no axis tick lines will be drawn. - tick_line: Var[bool] = Var.create_safe(False) + tick_line: Var[bool] = LiteralVar.create(False) # The length of tick line. tick_size: Var[int] @@ -95,7 +96,7 @@ class Axis(Recharts): min_tick_gap: Var[int] # The stroke color of axis - stroke: Var[Union[str, Color]] = Var.create_safe(Color("gray", 9)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 9)) # The text anchor of axis text_anchor: Var[str] # 'start', 'middle', 'end' @@ -136,7 +137,10 @@ class XAxis(Axis): x_axis_id: Var[Union[str, int]] # Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden - include_hidden: Var[bool] = Var.create_safe(False) + include_hidden: Var[bool] = LiteralVar.create(False) + + # The range of the axis. Work best in conjuction with allow_data_overflow. + domain: Var[List] # The range of the axis. Work best in conjuction with allow_data_overflow. domain: Var[List] @@ -190,10 +194,10 @@ class Brush(Recharts): alias = "RechartsBrush" # Stroke color - stroke: Var[Union[str, Color]] = Var.create_safe(Color("gray", 9)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 9)) # The fill color of brush. - fill: Var[Union[str, Color]] = Var.create_safe(Color("gray", 2)) + fill: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 2)) # The key of data displayed in the axis. data_key: Var[Union[str, int]] @@ -293,22 +297,22 @@ class Area(Cartesian): alias = "RechartsArea" # The color of the line stroke. - stroke: Var[Union[str, Color]] = Var.create_safe(Color("accent", 9)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9)) # The width of the line stroke. - stroke_width: Var[int] = Var.create_safe(1) + stroke_width: Var[int] = LiteralVar.create(1) # The color of the area fill. - fill: Var[Union[str, Color]] = Var.create_safe(Color("accent", 5)) + fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 5)) # The interpolation type of area. And customized interpolation function can be set to type. 'basis' | 'basisClosed' | 'basisOpen' | 'bumpX' | 'bumpY' | 'bump' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' | - type_: Var[LiteralAreaType] = Var.create_safe("monotone", _var_is_string=True) + type_: Var[LiteralAreaType] = LiteralVar.create("monotone") # If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally. dot: Var[Union[bool, Dict[str, Any]]] # The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. - active_dot: Var[Union[bool, Dict[str, Any]]] = Var.create_safe( + active_dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create( { "stroke": Color("accent", 2), "fill": Color("accent", 10), @@ -345,7 +349,7 @@ class Bar(Cartesian): stroke_width: Var[int] # The width of the line stroke. - fill: Var[Union[str, Color]] = Var.create_safe(Color("accent", 9)) + fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9)) # If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally. background: Var[bool] @@ -406,13 +410,13 @@ class Line(Cartesian): type_: Var[LiteralAreaType] # The color of the line stroke. - stroke: Var[Union[str, Color]] = Var.create_safe(Color("accent", 9)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9)) # The width of the line stroke. stroke_width: Var[int] # The dot is shown when mouse enter a line chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. - dot: Var[Union[bool, Dict[str, Any]]] = Var.create_safe( + dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create( { "stroke": Color("accent", 10), "fill": Color("accent", 4), @@ -420,7 +424,7 @@ class Line(Cartesian): ) # The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. - active_dot: Var[Union[bool, Dict[str, Any]]] = Var.create_safe( + active_dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create( { "stroke": Color("accent", 2), "fill": Color("accent", 10), @@ -478,7 +482,7 @@ class Scatter(Recharts): line_type: Var[LiteralLineType] # The fill - fill: Var[Union[str, Color]] = Var.create_safe(Color("accent", 9)) + fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9)) # the name name: Var[Union[str, int]] @@ -555,7 +559,7 @@ class Funnel(Recharts): animation_easing: Var[LiteralAnimationEasing] # stroke color - stroke: Var[Union[str, Color]] = Var.create_safe(Color("gray", 3)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 3)) # Valid children components _valid_children: List[str] = ["LabelList", "Cell"] @@ -608,7 +612,7 @@ class ErrorBar(Recharts): width: Var[int] # The stroke color of error bar. - stroke: Var[Union[str, Color]] = Var.create_safe(Color("gray", 8)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 8)) # The stroke width of error bar. stroke_width: Var[int] @@ -798,7 +802,7 @@ class CartesianGrid(Grid): stroke_dasharray: Var[str] # the stroke color of grid - stroke: Var[Union[str, Color]] = Var.create_safe(Color("gray", 7)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 7)) class CartesianAxis(Grid): diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi index 498ed74442..0ffbd6c534 100644 --- a/reflex/components/recharts/cartesian.pyi +++ b/reflex/components/recharts/cartesian.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload from reflex.constants.colors import Color from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .recharts import ( Recharts, @@ -94,50 +94,40 @@ class Axis(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Axis": @@ -267,50 +257,40 @@ class XAxis(Axis): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "XAxis": @@ -443,50 +423,40 @@ class YAxis(Axis): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "YAxis": @@ -589,50 +559,40 @@ class ZAxis(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ZAxis": @@ -683,9 +643,7 @@ class Brush(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, **props, ) -> "Brush": """Create the component. @@ -770,50 +728,40 @@ class Cartesian(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Cartesian": @@ -945,50 +893,40 @@ class Area(Cartesian): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Area": @@ -1098,55 +1036,45 @@ class Bar(Cartesian): autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_animation_end: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_animation_start: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Bar": @@ -1293,50 +1221,40 @@ class Line(Cartesian): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Line": @@ -1453,50 +1371,40 @@ class Scatter(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Scatter": @@ -1589,55 +1497,45 @@ class Funnel(Recharts): autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_animation_end: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_animation_start: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Funnel": @@ -1686,50 +1584,40 @@ class ErrorBar(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ErrorBar": @@ -1777,50 +1665,40 @@ class Reference(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Reference": @@ -1873,50 +1751,40 @@ class ReferenceLine(Reference): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ReferenceLine": @@ -1974,50 +1842,40 @@ class ReferenceDot(Reference): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ReferenceDot": @@ -2076,50 +1934,40 @@ class ReferenceArea(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ReferenceArea": @@ -2167,50 +2015,40 @@ class Grid(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Grid": @@ -2263,50 +2101,40 @@ class CartesianGrid(Grid): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CartesianGrid": @@ -2374,50 +2202,40 @@ class CartesianAxis(Grid): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CartesianAxis": diff --git a/reflex/components/recharts/charts.py b/reflex/components/recharts/charts.py index 0f52545d0a..37b865b1d4 100644 --- a/reflex/components/recharts/charts.py +++ b/reflex/components/recharts/charts.py @@ -9,6 +9,7 @@ from reflex.constants import EventTriggers from reflex.constants.colors import Color from reflex.event import EventHandler +from reflex.ivars.base import LiteralVar from reflex.vars import Var from .recharts import ( @@ -156,10 +157,10 @@ class BarChart(CategoricalChartBase): alias = "RechartsBarChart" # The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number - bar_category_gap: Var[Union[str, int]] = Var.create_safe("10%", _var_is_string=True) # type: ignore + bar_category_gap: Var[Union[str, int]] = LiteralVar.create("10%") # The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number - bar_gap: Var[Union[str, int]] = Var.create_safe(4) # type: ignore + bar_gap: Var[Union[str, int]] = LiteralVar.create(4) # type: ignore # The width of all the bars in the chart. Number bar_size: Var[int] diff --git a/reflex/components/recharts/charts.pyi b/reflex/components/recharts/charts.pyi index 9984bd8c5a..48bde74832 100644 --- a/reflex/components/recharts/charts.pyi +++ b/reflex/components/recharts/charts.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload from reflex.constants.colors import Color from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .recharts import ( RechartsCharts, @@ -28,50 +28,40 @@ class ChartBase(RechartsCharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ChartBase": @@ -126,50 +116,40 @@ class CategoricalChartBase(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "CategoricalChartBase": @@ -237,50 +217,40 @@ class AreaChart(CategoricalChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "AreaChart": @@ -347,50 +317,40 @@ class BarChart(CategoricalChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "BarChart": @@ -456,50 +416,40 @@ class LineChart(CategoricalChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "LineChart": @@ -571,50 +521,40 @@ class ComposedChart(CategoricalChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ComposedChart": @@ -663,50 +603,40 @@ class PieChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "PieChart": @@ -753,14 +683,12 @@ class RadarChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadarChart": @@ -816,50 +744,40 @@ class RadialBarChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadialBarChart": @@ -909,29 +827,27 @@ class ScatterChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ScatterChart": @@ -972,50 +888,40 @@ class FunnelChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "FunnelChart": @@ -1068,55 +974,45 @@ class Treemap(RechartsCharts): autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_animation_end: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_animation_start: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Treemap": diff --git a/reflex/components/recharts/general.py b/reflex/components/recharts/general.py index 613e6fbf00..4f81ea8338 100644 --- a/reflex/components/recharts/general.py +++ b/reflex/components/recharts/general.py @@ -7,6 +7,7 @@ from reflex.components.component import MemoizationLeaf from reflex.constants.colors import Color from reflex.event import EventHandler +from reflex.ivars.base import LiteralVar from reflex.vars import Var from .recharts import ( @@ -139,7 +140,7 @@ class GraphingTooltip(Recharts): filter_null: Var[bool] # If set false, no cursor will be drawn when tooltip is active. - cursor: Var[Union[Dict[str, Any], bool]] = Var.create_safe( + cursor: Var[Union[Dict[str, Any], bool]] = LiteralVar.create( { "strokeWidth": 1, "fill": Color("gray", 3), @@ -150,7 +151,7 @@ class GraphingTooltip(Recharts): view_box: Var[Dict[str, Any]] # The style of default tooltip content item which is a li element. DEFAULT: {} - item_style: Var[Dict[str, Any]] = Var.create_safe( + item_style: Var[Dict[str, Any]] = LiteralVar.create( { "color": Color("gray", 12), } @@ -159,7 +160,7 @@ class GraphingTooltip(Recharts): # The style of tooltip wrapper which is a dom element. DEFAULT: {} wrapper_style: Var[Dict[str, Any]] # The style of tooltip content which is a dom element. DEFAULT: {} - content_style: Var[Dict[str, Any]] = Var.create_safe( + content_style: Var[Dict[str, Any]] = LiteralVar.create( { "background": Color("gray", 1), "borderColor": Color("gray", 4), @@ -168,10 +169,10 @@ class GraphingTooltip(Recharts): ) # The style of default tooltip label which is a p element. DEFAULT: {} - label_style: Var[Dict[str, Any]] = Var.create_safe({"color": Color("gray", 11)}) + label_style: Var[Dict[str, Any]] = LiteralVar.create({"color": Color("gray", 11)}) # This option allows the tooltip to extend beyond the viewBox of the chart itself. DEFAULT: { x: false, y: false } - allow_escape_view_box: Var[Dict[str, bool]] = Var.create_safe( + allow_escape_view_box: Var[Dict[str, bool]] = LiteralVar.create( {"x": False, "y": False} ) @@ -231,10 +232,10 @@ class LabelList(Recharts): offset: Var[int] # The fill color of each label - fill: Var[Union[str, Color]] = Var.create_safe(Color("gray", 10)) + fill: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10)) # The stroke color of each label - stroke: Var[Union[str, Color]] = Var.create_safe("none", _var_is_string=True) + stroke: Var[Union[str, Color]] = LiteralVar.create("none") responsive_container = ResponsiveContainer.create diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi index 9dd2ae19c0..be6a0d42f9 100644 --- a/reflex/components/recharts/general.pyi +++ b/reflex/components/recharts/general.pyi @@ -9,7 +9,7 @@ from reflex.components.component import MemoizationLeaf from reflex.constants.colors import Color from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .recharts import ( Recharts, @@ -33,50 +33,40 @@ class ResponsiveContainer(Recharts, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "ResponsiveContainer": @@ -169,50 +159,40 @@ class Legend(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Legend": @@ -280,50 +260,40 @@ class GraphingTooltip(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "GraphingTooltip": @@ -421,50 +391,40 @@ class Label(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Label": @@ -551,50 +511,40 @@ class LabelList(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "LabelList": diff --git a/reflex/components/recharts/polar.py b/reflex/components/recharts/polar.py index 64fa00ecd5..76347352be 100644 --- a/reflex/components/recharts/polar.py +++ b/reflex/components/recharts/polar.py @@ -7,6 +7,7 @@ from reflex.constants import EventTriggers from reflex.constants.colors import Color from reflex.event import EventHandler +from reflex.ivars.base import LiteralVar from reflex.vars import Var from .recharts import ( @@ -72,10 +73,10 @@ class Pie(Recharts): _valid_children: List[str] = ["Cell", "LabelList"] # Stoke color - stroke: Var[Union[str, Color]] = Var.create_safe(Color("accent", 9)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9)) # Fill color - fill: Var[Union[str, Color]] = Var.create_safe(Color("accent", 3)) + fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 3)) def get_event_triggers(self) -> dict[str, Union[Var, Any]]: """Get the event triggers that pass the component's value to the handler. @@ -110,13 +111,13 @@ class Radar(Recharts): dot: Var[bool] # Stoke color - stroke: Var[Union[str, Color]] = Var.create_safe(Color("accent", 9)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9)) # Fill color - fill: Var[str] = Var.create_safe(Color("accent", 3)) + fill: Var[str] = LiteralVar.create(Color("accent", 3)) # opacity - fill_opacity: Var[float] = Var.create_safe(0.6) + fill_opacity: Var[float] = LiteralVar.create(0.6) # The type of icon in legend. If set to 'none', no legend item will be rendered. legend_type: Var[str] @@ -218,7 +219,7 @@ class PolarAngleAxis(Recharts): axis_line_type: Var[str] # If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props mergered by the internal calculated props and the option. - tick_line: Var[Union[bool, Dict[str, Any]]] = Var.create_safe(False) + tick_line: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(False) # The width or height of tick. tick: Var[Union[int, str]] @@ -230,7 +231,7 @@ class PolarAngleAxis(Recharts): orient: Var[str] # The stroke color of axis - stroke: Var[Union[str, Color]] = Var.create_safe(Color("gray", 10)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10)) # Allow the axis has duplicated categorys or not when the type of axis is "category". allow_duplicated_category: Var[bool] @@ -292,7 +293,7 @@ class PolarGrid(Recharts): grid_type: Var[LiteralGridType] # The stroke color of grid - stroke: Var[Union[str, Color]] = Var.create_safe(Color("gray", 10)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10)) # Valid children components _valid_children: List[str] = ["RadarChart", "RadiarBarChart"] @@ -342,10 +343,10 @@ class PolarRadiusAxis(Recharts): _valid_children: List[str] = ["Label"] # The domain of the polar radius axis, specifying the minimum and maximum values. - domain: Var[List[int]] = Var.create_safe([0, 250]) + domain: Var[List[int]] = LiteralVar.create([0, 250]) # The stroke color of axis - stroke: Var[Union[str, Color]] = Var.create_safe(Color("gray", 10)) + stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10)) def get_event_triggers(self) -> dict[str, Union[Var, Any]]: """Get the event triggers that pass the component's value to the handler. diff --git a/reflex/components/recharts/polar.pyi b/reflex/components/recharts/polar.pyi index d91186296b..81fb74b276 100644 --- a/reflex/components/recharts/polar.pyi +++ b/reflex/components/recharts/polar.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload from reflex.constants.colors import Color from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var from .recharts import ( Recharts, @@ -74,23 +74,21 @@ class Pie(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Pie": @@ -155,50 +153,40 @@ class Radar(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Radar": @@ -262,28 +250,26 @@ class RadialBar(Recharts): autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_animation_end: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_animation_start: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RadialBar": @@ -341,50 +327,40 @@ class PolarAngleAxis(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "PolarAngleAxis": @@ -439,50 +415,40 @@ class PolarGrid(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "PolarGrid": @@ -580,23 +546,21 @@ class PolarRadiusAxis(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "PolarRadiusAxis": diff --git a/reflex/components/recharts/recharts.pyi b/reflex/components/recharts/recharts.pyi index 409285eb52..695ecab48f 100644 --- a/reflex/components/recharts/recharts.pyi +++ b/reflex/components/recharts/recharts.pyi @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload from reflex.components.component import Component, MemoizationLeaf, NoSSRComponent from reflex.event import EventHandler, EventSpec from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Recharts(Component): def render(self) -> Dict: ... @@ -23,50 +23,40 @@ class Recharts(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Recharts": @@ -99,50 +89,40 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "RechartsCharts": diff --git a/reflex/components/sonner/toast.py b/reflex/components/sonner/toast.py index e00eaad4e5..07e18b1561 100644 --- a/reflex/components/sonner/toast.py +++ b/reflex/components/sonner/toast.py @@ -14,6 +14,7 @@ EventSpec, call_script, ) +from reflex.ivars.base import LiteralVar from reflex.style import Style, resolved_color_mode from reflex.utils import format from reflex.utils.imports import ImportVar @@ -197,21 +198,19 @@ class Toaster(Component): theme: Var[str] = resolved_color_mode # whether to show rich colors - rich_colors: Var[bool] = Var.create_safe(True) + rich_colors: Var[bool] = LiteralVar.create(True) # whether to expand the toast - expand: Var[bool] = Var.create_safe(True) + expand: Var[bool] = LiteralVar.create(True) # the number of toasts that are currently visible visible_toasts: Var[int] # the position of the toast - position: Var[LiteralPosition] = Var.create_safe( - "bottom-right", _var_is_string=True - ) + position: Var[LiteralPosition] = LiteralVar.create("bottom-right") # whether to show the close button - close_button: Var[bool] = Var.create_safe(False) + close_button: Var[bool] = LiteralVar.create(False) # offset of the toast offset: Var[str] @@ -356,7 +355,7 @@ def toast_dismiss(id: Var | str | None = None): if isinstance(id, Var): dismiss = f"{toast_ref}.dismiss({id._var_name_unwrapped})" - dismiss_var_data = id._var_data + dismiss_var_data = id._get_all_var_data() elif isinstance(id, str): dismiss = f"{toast_ref}.dismiss('{id}')" else: @@ -365,7 +364,7 @@ def toast_dismiss(id: Var | str | None = None): dismiss, _var_is_string=False, _var_is_local=True, - _var_data=dismiss_var_data, + _var_data=VarData.merge(dismiss_var_data), ) return call_script(dismiss_action) diff --git a/reflex/components/sonner/toast.pyi b/reflex/components/sonner/toast.pyi index c7e6269151..8826e9df7a 100644 --- a/reflex/components/sonner/toast.pyi +++ b/reflex/components/sonner/toast.pyi @@ -12,7 +12,7 @@ from reflex.components.props import PropsBase from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.serializers import serializer -from reflex.vars import BaseVar, Var +from reflex.vars import Var LiteralPosition = Literal[ "top-left", @@ -120,50 +120,40 @@ class Toaster(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Toaster": diff --git a/reflex/components/suneditor/editor.pyi b/reflex/components/suneditor/editor.pyi index 8a86e02702..b1bc8a8301 100644 --- a/reflex/components/suneditor/editor.pyi +++ b/reflex/components/suneditor/editor.pyi @@ -11,7 +11,7 @@ from reflex.components.component import NoSSRComponent from reflex.event import EventHandler, EventSpec from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars import BaseVar, Var +from reflex.vars import Var class EditorButtonList(list, enum.Enum): BASIC = [["font", "fontSize"], ["fontColor"], ["horizontalRule"], ["link", "image"]] @@ -122,77 +122,55 @@ class Editor(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_copy: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_cut: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_copy: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_cut: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_input: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_load: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_input: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_load: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_paste: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_paste: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_resize_editor: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, toggle_code_view: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, toggle_full_screen: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Editor": diff --git a/reflex/components/tags/iter_tag.py b/reflex/components/tags/iter_tag.py index 95a496b715..0828f8b10a 100644 --- a/reflex/components/tags/iter_tag.py +++ b/reflex/components/tags/iter_tag.py @@ -6,7 +6,8 @@ from typing import TYPE_CHECKING, Any, Callable, List, Tuple, Type, Union, get_args from reflex.components.tags.tag import Tag -from reflex.vars import BaseVar, Var +from reflex.ivars.base import ImmutableVar +from reflex.vars import Var if TYPE_CHECKING: from reflex.components.component import Component @@ -53,10 +54,10 @@ def get_index_var(self) -> Var: Returns: The index var. """ - return BaseVar( + return ImmutableVar( _var_name=self.index_var_name, _var_type=int, - ) + ).guess_type() def get_arg_var(self) -> Var: """Get the arg var for the tag (with curly braces). @@ -66,10 +67,10 @@ def get_arg_var(self) -> Var: Returns: The arg var. """ - return BaseVar( + return ImmutableVar( _var_name=self.arg_var_name, _var_type=self.get_iterable_var_type(), - ) + ).guess_type() def get_index_var_arg(self) -> Var: """Get the index var for the tag (without curly braces). @@ -79,11 +80,10 @@ def get_index_var_arg(self) -> Var: Returns: The index var. """ - return BaseVar( + return ImmutableVar( _var_name=self.index_var_name, _var_type=int, - _var_is_local=True, - ) + ).guess_type() def get_arg_var_arg(self) -> Var: """Get the arg var for the tag (without curly braces). @@ -93,11 +93,10 @@ def get_arg_var_arg(self) -> Var: Returns: The arg var. """ - return BaseVar( + return ImmutableVar( _var_name=self.arg_var_name, _var_type=self.get_iterable_var_type(), - _var_is_local=True, - ) + ).guess_type() def render_component(self) -> Component: """Render the component. diff --git a/reflex/components/tags/tag.py b/reflex/components/tags/tag.py index bacea6a415..9a8cca11f5 100644 --- a/reflex/components/tags/tag.py +++ b/reflex/components/tags/tag.py @@ -6,6 +6,7 @@ from reflex.base import Base from reflex.event import EventChain +from reflex.ivars.base import LiteralVar from reflex.utils import format, types from reflex.vars import Var @@ -41,7 +42,7 @@ def __init__(self, *args, **kwargs): # Convert any props to vars. if "props" in kwargs: kwargs["props"] = { - name: Var.create(value, _var_is_string=False) + name: LiteralVar.create(value) for name, value in kwargs["props"].items() } super().__init__(*args, **kwargs) @@ -63,14 +64,12 @@ def add_props(self, **kwargs: Optional[Any]) -> Tag: Returns: The tag with the props added. """ - from reflex.components.core.colors import Color - self.props.update( { - format.to_camel_case(name, allow_hyphens=True): prop - if types._isinstance(prop, Union[EventChain, dict]) - else Var.create( - prop, _var_is_string=isinstance(prop, Color) + format.to_camel_case(name, allow_hyphens=True): ( + prop + if types._isinstance(prop, Union[EventChain, dict]) + else LiteralVar.create(prop) ) # rx.color is always a string for name, prop in kwargs.items() if self.is_valid_prop(prop) diff --git a/reflex/event.py b/reflex/event.py index 7e98ade38d..6d0577c6fe 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -18,9 +18,12 @@ from reflex import constants from reflex.base import Base +from reflex.ivars.base import ImmutableVar, LiteralVar +from reflex.ivars.function import FunctionStringVar, FunctionVar +from reflex.ivars.object import ObjectVar from reflex.utils import format from reflex.utils.types import ArgsSpec -from reflex.vars import BaseVar, Var +from reflex.vars import ImmutableVarData, Var try: from typing import Annotated @@ -186,7 +189,7 @@ def __call__(self, *args: Any) -> EventSpec: # Get the function args. fn_args = inspect.getfullargspec(self.fn).args[1:] - fn_args = (Var.create_safe(arg, _var_is_string=False) for arg in fn_args) + fn_args = (ImmutableVar.create_safe(arg) for arg in fn_args) # Construct the payload. values = [] @@ -197,7 +200,7 @@ def __call__(self, *args: Any) -> EventSpec: # Otherwise, convert to JSON. try: - values.append(Var.create(arg, _var_is_string=isinstance(arg, str))) + values.append(LiteralVar.create(arg)) except TypeError as e: raise EventHandlerTypeError( f"Arguments to event handlers must be Vars or JSON-serializable. Got {arg} of type {type(arg)}." @@ -264,13 +267,13 @@ def add_args(self, *args: Var) -> EventSpec: # Get the remaining unfilled function args. fn_args = inspect.getfullargspec(self.handler.fn).args[1 + len(self.args) :] - fn_args = (Var.create_safe(arg, _var_is_string=False) for arg in fn_args) + fn_args = (ImmutableVar.create_safe(arg) for arg in fn_args) # Construct the payload. values = [] for arg in args: try: - values.append(Var.create(arg, _var_is_string=isinstance(arg, str))) + values.append(LiteralVar.create(arg)) except TypeError as e: raise EventHandlerTypeError( f"Arguments to event handlers must be Vars or JSON-serializable. Got {arg} of type {type(arg)}." @@ -388,15 +391,16 @@ def as_event_spec(self, handler: EventHandler) -> EventSpec: upload_id = self.upload_id or DEFAULT_UPLOAD_ID spec_args = [ ( - Var.create_safe("files", _var_is_string=False), - Var.create_safe( - f"filesById[{Var.create_safe(upload_id, _var_is_string=True)._var_name_unwrapped}]", - _var_is_string=False, - )._replace(_var_data=upload_files_context_var_data), + ImmutableVar.create_safe("files"), + ImmutableVar( + _var_name="filesById", + _var_type=Dict[str, Any], + _var_data=ImmutableVarData.merge(upload_files_context_var_data), + ).to(ObjectVar)[LiteralVar.create(upload_id)], ), ( - Var.create_safe("upload_id", _var_is_string=False), - Var.create_safe(upload_id, _var_is_string=True), + ImmutableVar.create_safe("upload_id"), + LiteralVar.create(upload_id), ), ] if self.on_upload_progress is not None: @@ -424,11 +428,10 @@ def as_event_spec(self, handler: EventHandler) -> EventSpec: formatted_chain = str(format.format_prop(on_upload_progress_chain)) spec_args.append( ( - Var.create_safe("on_upload_progress", _var_is_string=False), - BaseVar( - _var_name=formatted_chain.strip("{}"), - _var_type=EventChain, - ), + ImmutableVar.create_safe("on_upload_progress"), + FunctionStringVar( + formatted_chain.strip("{}"), + ).to(FunctionVar, EventChain), ), ) return EventSpec( @@ -465,8 +468,8 @@ def fn(): handler=EventHandler(fn=fn), args=tuple( ( - Var.create_safe(k, _var_is_string=False), - Var.create_safe(v, _var_is_string=isinstance(v, str)), + ImmutableVar.create_safe(k), + LiteralVar.create(v), ) for k, v in kwargs.items() ), @@ -542,7 +545,7 @@ def set_focus(ref: str) -> EventSpec: return server_side( "_set_focus", get_fn_signature(set_focus), - ref=Var.create_safe(format.format_ref(ref), _var_is_string=True), + ref=LiteralVar.create(format.format_ref(ref)), ) @@ -573,7 +576,7 @@ def set_value(ref: str, value: Any) -> EventSpec: return server_side( "_set_value", get_fn_signature(set_value), - ref=Var.create_safe(format.format_ref(ref), _var_is_string=True), + ref=LiteralVar.create(format.format_ref(ref)), value=value, ) @@ -711,15 +714,11 @@ def download( url = "data:text/plain," + urllib.parse.quote(data) elif isinstance(data, Var): # Need to check on the frontend if the Var already looks like a data: URI. - is_data_url = data._replace( - _var_name=( - f"typeof {data._var_full_name} == 'string' && " - f"{data._var_full_name}.startsWith('data:')" - ), - _var_type=bool, - _var_is_string=False, - _var_full_name_needs_state_prefix=False, - ) + + is_data_url = (data._type() == "string") & ( + data.to(str).startswith("data:") + ) # type: ignore + # If it's a data: URI, use it as is, otherwise convert the Var to JSON in a data: URI. url = cond( # type: ignore is_data_url, @@ -757,11 +756,13 @@ def _callback_arg_spec(eval_result): def call_script( javascript_code: str | Var[str], - callback: EventSpec - | EventHandler - | Callable - | List[EventSpec | EventHandler | Callable] - | None = None, + callback: ( + EventSpec + | EventHandler + | Callable + | List[EventSpec | EventHandler | Callable] + | None + ) = None, ) -> EventSpec: """Create an event handler that executes arbitrary javascript code. @@ -865,10 +866,8 @@ def parse_args_spec(arg_spec: ArgsSpec): annotations = get_type_hints(arg_spec) return arg_spec( *[ - BaseVar( - _var_name=f"_{l_arg}", - _var_type=annotations.get(l_arg, FrontendEvent), - _var_is_local=True, + ImmutableVar(f"_{l_arg}").to( + ObjectVar, annotations.get(l_arg, FrontendEvent) ) for l_arg in spec.args ] diff --git a/reflex/experimental/__init__.py b/reflex/experimental/__init__.py index 060f7e7f15..f0eca0c845 100644 --- a/reflex/experimental/__init__.py +++ b/reflex/experimental/__init__.py @@ -8,7 +8,6 @@ from ..utils.console import warn from . import hooks as hooks -from . import vars as vars from .assets import asset as asset from .client_state import ClientStateVar as ClientStateVar from .layout import layout as layout @@ -43,7 +42,6 @@ def toast(self): asset=asset, client_state=ClientStateVar.create, hooks=hooks, - vars=vars, layout=layout, progress=progress, PropsBase=PropsBase, diff --git a/reflex/experimental/client_state.py b/reflex/experimental/client_state.py index 3033b94dd2..af3056c4d5 100644 --- a/reflex/experimental/client_state.py +++ b/reflex/experimental/client_state.py @@ -8,8 +8,10 @@ from reflex import constants from reflex.event import EventChain, EventHandler, EventSpec, call_script +from reflex.ivars.base import ImmutableVar, LiteralVar +from reflex.ivars.function import FunctionVar from reflex.utils.imports import ImportVar -from reflex.vars import Var, VarData, get_unique_variable_name +from reflex.vars import ImmutableVarData, Var, VarData, get_unique_variable_name NoValue = object() @@ -109,12 +111,11 @@ def create( var_name = get_unique_variable_name() assert isinstance(var_name, str), "var_name must be a string." if default is NoValue: - default_var = Var.create_safe("", _var_is_local=False, _var_is_string=False) - elif not isinstance(default, Var): - default_var = Var.create_safe( - default, - _var_is_string=isinstance(default, str), + default_var = ImmutableVar.create_safe( + "", _var_is_local=False, _var_is_string=False ) + elif not isinstance(default, Var): + default_var = LiteralVar.create(default) else: default_var = default setter_name = f"set{var_name.capitalize()}" @@ -157,12 +158,10 @@ def value(self) -> Var: an accessor for the client state variable. """ return ( - Var.create_safe( + ImmutableVar.create_safe( _client_state_ref(self._getter_name) if self._global_ref - else self._getter_name, - _var_is_local=False, - _var_is_string=False, + else self._getter_name ) .to(self._var_type) ._replace( @@ -192,25 +191,18 @@ def set_value(self, value: Any = NoValue) -> Var: ) if value is not NoValue: # This is a hack to make it work like an EventSpec taking an arg - value = Var.create_safe(value, _var_is_string=isinstance(value, str)) + value = LiteralVar.create(value) if not value._var_is_string and value._var_full_name.startswith("_"): arg = value._var_name_unwrapped.partition(".")[0] else: arg = "" setter = f"({arg}) => {setter}({value._var_name_unwrapped})" - return ( - Var.create_safe( - setter, - _var_is_local=False, - _var_is_string=False, - ) - .to(EventChain) - ._replace( - merge_var_data=VarData( # type: ignore - imports=_refs_import if self._global_ref else {} - ) - ) - ) + return ImmutableVar( + _var_name=setter, + _var_data=ImmutableVarData( + imports=_refs_import if self._global_ref else {} + ), + ).to(FunctionVar, EventChain) @property def set(self) -> Var: diff --git a/reflex/experimental/layout.pyi b/reflex/experimental/layout.pyi index 68e7e1ecdd..8799b4961d 100644 --- a/reflex/experimental/layout.pyi +++ b/reflex/experimental/layout.pyi @@ -13,7 +13,7 @@ from reflex.components.radix.themes.layout.box import Box from reflex.event import EventHandler, EventSpec from reflex.state import ComponentState from reflex.style import Style -from reflex.vars import BaseVar, Var +from reflex.vars import Var class Sidebar(Box, MemoizationLeaf): @overload @@ -51,50 +51,40 @@ class Sidebar(Box, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Sidebar": @@ -146,53 +136,43 @@ class DrawerSidebar(DrawerRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_open_change: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "DrawerSidebar": @@ -227,50 +207,40 @@ class SidebarTrigger(Fragment): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "SidebarTrigger": @@ -322,50 +292,40 @@ class Layout(Box): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Layout": @@ -420,50 +380,40 @@ class LayoutNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, + on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_double_click: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, + on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, + on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None, on_unmount: Optional[ - Union[EventHandler, EventSpec, list, Callable, BaseVar] + Union[EventHandler, EventSpec, list, Callable, Var] ] = None, **props, ) -> "Layout": diff --git a/reflex/experimental/vars/base.py b/reflex/experimental/vars/base.py deleted file mode 100644 index 7da1e6537a..0000000000 --- a/reflex/experimental/vars/base.py +++ /dev/null @@ -1,583 +0,0 @@ -"""Collection of base classes.""" - -from __future__ import annotations - -import dataclasses -import functools -import inspect -import sys -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Dict, - Generic, - List, - Optional, - Set, - Tuple, - Type, - TypeVar, - Union, - overload, -) - -from typing_extensions import ParamSpec, get_origin - -from reflex import constants -from reflex.base import Base -from reflex.utils import serializers, types -from reflex.utils.exceptions import VarTypeError -from reflex.vars import ( - ImmutableVarData, - Var, - VarData, - _decode_var_immutable, - _extract_var_data, - _global_vars, -) - -if TYPE_CHECKING: - from .function import FunctionVar, ToFunctionOperation - from .number import ( - BooleanVar, - NumberVar, - ToBooleanVarOperation, - ToNumberVarOperation, - ) - from .object import ObjectVar, ToObjectOperation - from .sequence import ArrayVar, StringVar, ToArrayOperation, ToStringOperation - -VAR_TYPE = TypeVar("VAR_TYPE") - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class ImmutableVar(Var, Generic[VAR_TYPE]): - """Base class for immutable vars.""" - - # The name of the var. - _var_name: str = dataclasses.field() - - # The type of the var. - _var_type: types.GenericType = dataclasses.field(default=Any) - - # Extra metadata associated with the Var - _var_data: Optional[ImmutableVarData] = dataclasses.field(default=None) - - def __str__(self) -> str: - """String representation of the var. Guaranteed to be a valid Javascript expression. - - Returns: - The name of the var. - """ - return self._var_name - - @property - def _var_is_local(self) -> bool: - """Whether this is a local javascript variable. - - Returns: - False - """ - return False - - @property - def _var_is_string(self) -> bool: - """Whether the var is a string literal. - - Returns: - False - """ - return False - - @property - def _var_full_name_needs_state_prefix(self) -> bool: - """Whether the full name of the var needs a _var_state prefix. - - Returns: - False - """ - return False - - def __post_init__(self): - """Post-initialize the var.""" - # Decode any inline Var markup and apply it to the instance - _var_data, _var_name = _decode_var_immutable(self._var_name) - - if _var_data or _var_name != self._var_name: - self.__init__( - _var_name=_var_name, - _var_type=self._var_type, - _var_data=ImmutableVarData.merge(self._var_data, _var_data), - ) - - def __hash__(self) -> int: - """Define a hash function for the var. - - Returns: - The hash of the var. - """ - return hash((self._var_name, self._var_type, self._var_data)) - - def _get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - return self._var_data - - def _replace(self, merge_var_data=None, **kwargs: Any): - """Make a copy of this Var with updated fields. - - Args: - merge_var_data: VarData to merge into the existing VarData. - **kwargs: Var fields to update. - - Returns: - A new ImmutableVar with the updated fields overwriting the corresponding fields in this Var. - - Raises: - TypeError: If _var_is_local, _var_is_string, or _var_full_name_needs_state_prefix is not None. - """ - if kwargs.get("_var_is_local", False) is not False: - raise TypeError( - "The _var_is_local argument is not supported for ImmutableVar." - ) - - if kwargs.get("_var_is_string", False) is not False: - raise TypeError( - "The _var_is_string argument is not supported for ImmutableVar." - ) - - if kwargs.get("_var_full_name_needs_state_prefix", False) is not False: - raise TypeError( - "The _var_full_name_needs_state_prefix argument is not supported for ImmutableVar." - ) - - field_values = dict( - _var_name=kwargs.pop("_var_name", self._var_name), - _var_type=kwargs.pop("_var_type", self._var_type), - _var_data=ImmutableVarData.merge( - kwargs.get("_var_data", self._var_data), merge_var_data - ), - ) - return type(self)(**field_values) - - @classmethod - def create( - cls, - value: Any, - _var_is_local: bool | None = None, - _var_is_string: bool | None = None, - _var_data: VarData | None = None, - ) -> ImmutableVar | Var | None: - """Create a var from a value. - - Args: - value: The value to create the var from. - _var_is_local: Whether the var is local. Deprecated. - _var_is_string: Whether the var is a string literal. Deprecated. - _var_data: Additional hooks and imports associated with the Var. - - Returns: - The var. - - Raises: - VarTypeError: If the value is JSON-unserializable. - TypeError: If _var_is_local or _var_is_string is not None. - """ - if _var_is_local is not None: - raise TypeError( - "The _var_is_local argument is not supported for ImmutableVar." - ) - - if _var_is_string is not None: - raise TypeError( - "The _var_is_string argument is not supported for ImmutableVar." - ) - - from reflex.utils import format - - # Check for none values. - if value is None: - return None - - # If the value is already a var, do nothing. - if isinstance(value, Var): - return value - - # Try to pull the imports and hooks from contained values. - if not isinstance(value, str): - _var_data = VarData.merge(*_extract_var_data(value), _var_data) - - # Try to serialize the value. - type_ = type(value) - if type_ in types.JSONType: - name = value - else: - name, _serialized_type = serializers.serialize(value, get_type=True) - if name is None: - raise VarTypeError( - f"No JSON serializer found for var {value} of type {type_}." - ) - name = name if isinstance(name, str) else format.json_dumps(name) - - return cls( - _var_name=name, - _var_type=type_, - _var_data=( - ImmutableVarData( - state=_var_data.state, - imports=_var_data.imports, - hooks=_var_data.hooks, - ) - if _var_data - else None - ), - ) - - @classmethod - def create_safe( - cls, - value: Any, - _var_is_local: bool | None = None, - _var_is_string: bool | None = None, - _var_data: VarData | None = None, - ) -> Var | ImmutableVar: - """Create a var from a value, asserting that it is not None. - - Args: - value: The value to create the var from. - _var_is_local: Whether the var is local. Deprecated. - _var_is_string: Whether the var is a string literal. Deprecated. - _var_data: Additional hooks and imports associated with the Var. - - Returns: - The var. - """ - var = cls.create( - value, - _var_is_local=_var_is_local, - _var_is_string=_var_is_string, - _var_data=_var_data, - ) - assert var is not None - return var - - def __format__(self, format_spec: str) -> str: - """Format the var into a Javascript equivalent to an f-string. - - Args: - format_spec: The format specifier (Ignored for now). - - Returns: - The formatted var. - """ - hashed_var = hash(self) - - _global_vars[hashed_var] = self - - # Encode the _var_data into the formatted output for tracking purposes. - return f"{constants.REFLEX_VAR_OPENING_TAG}{hashed_var}{constants.REFLEX_VAR_CLOSING_TAG}{self._var_name}" - - @overload - def to( - self, output: Type[NumberVar], var_type: type[int] | type[float] = float - ) -> ToNumberVarOperation: ... - - @overload - def to(self, output: Type[BooleanVar]) -> ToBooleanVarOperation: ... - - @overload - def to( - self, - output: Type[ArrayVar], - var_type: type[list] | type[tuple] | type[set] = list, - ) -> ToArrayOperation: ... - - @overload - def to(self, output: Type[StringVar]) -> ToStringOperation: ... - - @overload - def to( - self, output: Type[ObjectVar], var_type: types.GenericType = dict - ) -> ToObjectOperation: ... - - @overload - def to( - self, output: Type[FunctionVar], var_type: Type[Callable] = Callable - ) -> ToFunctionOperation: ... - - @overload - def to( - self, output: Type[OUTPUT], var_type: types.GenericType | None = None - ) -> OUTPUT: ... - - def to( - self, output: Type[OUTPUT], var_type: types.GenericType | None = None - ) -> Var: - """Convert the var to a different type. - - Args: - output: The output type. - var_type: The type of the var. - - Raises: - TypeError: If the var_type is not a supported type for the output. - - Returns: - The converted var. - """ - from .number import ( - BooleanVar, - NumberVar, - ToBooleanVarOperation, - ToNumberVarOperation, - ) - - fixed_type = ( - var_type - if var_type is None or inspect.isclass(var_type) - else get_origin(var_type) - ) - - if issubclass(output, NumberVar): - if fixed_type is not None and not issubclass(fixed_type, (int, float)): - raise TypeError( - f"Unsupported type {var_type} for NumberVar. Must be int or float." - ) - return ToNumberVarOperation(self, var_type or float) - if issubclass(output, BooleanVar): - return ToBooleanVarOperation(self) - - from .sequence import ArrayVar, StringVar, ToArrayOperation, ToStringOperation - - if issubclass(output, ArrayVar): - if fixed_type is not None and not issubclass( - fixed_type, (list, tuple, set) - ): - raise TypeError( - f"Unsupported type {var_type} for ArrayVar. Must be list, tuple, or set." - ) - return ToArrayOperation(self, var_type or list) - if issubclass(output, StringVar): - return ToStringOperation(self) - - from .object import ObjectVar, ToObjectOperation - - if issubclass(output, ObjectVar): - return ToObjectOperation(self, var_type or dict) - - from .function import FunctionVar, ToFunctionOperation - - if issubclass(output, FunctionVar): - if fixed_type is not None and not issubclass(fixed_type, Callable): - raise TypeError( - f"Unsupported type {var_type} for FunctionVar. Must be Callable." - ) - return ToFunctionOperation(self, var_type or Callable) - - return output( - _var_name=self._var_name, - _var_type=self._var_type if var_type is None else var_type, - _var_data=self._var_data, - ) - - def guess_type(self) -> ImmutableVar: - """Guess the type of the var. - - Returns: - The guessed type. - """ - from .number import NumberVar - from .object import ObjectVar - from .sequence import ArrayVar, StringVar - - if self._var_type is Any: - return self - - var_type = self._var_type - - fixed_type = var_type if inspect.isclass(var_type) else get_origin(var_type) - - if issubclass(fixed_type, (int, float)): - return self.to(NumberVar, var_type) - if issubclass(fixed_type, dict): - return self.to(ObjectVar, var_type) - if issubclass(fixed_type, (list, tuple, set)): - return self.to(ArrayVar, var_type) - if issubclass(fixed_type, str): - return self.to(StringVar) - if issubclass(fixed_type, Base): - return self.to(ObjectVar, var_type) - return self - - -OUTPUT = TypeVar("OUTPUT", bound=ImmutableVar) - - -class LiteralVar(ImmutableVar): - """Base class for immutable literal vars.""" - - @classmethod - def create( - cls, - value: Any, - _var_data: VarData | None = None, - ) -> Var: - """Create a var from a value. - - Args: - value: The value to create the var from. - _var_data: Additional hooks and imports associated with the Var. - - Returns: - The var. - - Raises: - TypeError: If the value is not a supported type for LiteralVar. - """ - if isinstance(value, Var): - if _var_data is None: - return value - return value._replace(merge_var_data=_var_data) - - if value is None: - return ImmutableVar.create_safe("null", _var_data=_var_data) - - from .object import LiteralObjectVar - - if isinstance(value, Base): - return LiteralObjectVar( - value.dict(), _var_type=type(value), _var_data=_var_data - ) - - from .number import LiteralBooleanVar, LiteralNumberVar - from .sequence import LiteralArrayVar, LiteralStringVar - - if isinstance(value, str): - return LiteralStringVar.create(value, _var_data=_var_data) - - type_mapping = { - int: LiteralNumberVar, - float: LiteralNumberVar, - bool: LiteralBooleanVar, - dict: LiteralObjectVar, - list: LiteralArrayVar, - tuple: LiteralArrayVar, - set: LiteralArrayVar, - } - - constructor = type_mapping.get(type(value)) - - if constructor is None: - raise TypeError(f"Unsupported type {type(value)} for LiteralVar.") - - return constructor(value, _var_data=_var_data) - - def __post_init__(self): - """Post-initialize the var.""" - - def json(self) -> str: - """Serialize the var to a JSON string. - - Raises: - NotImplementedError: If the method is not implemented. - """ - raise NotImplementedError( - "LiteralVar subclasses must implement the json method." - ) - - -P = ParamSpec("P") -T = TypeVar("T", bound=ImmutableVar) - - -def var_operation(*, output: Type[T]) -> Callable[[Callable[P, str]], Callable[P, T]]: - """Decorator for creating a var operation. - - Example: - ```python - @var_operation(output=NumberVar) - def add(a: NumberVar, b: NumberVar): - return f"({a} + {b})" - ``` - - Args: - output: The output type of the operation. - - Returns: - The decorator. - """ - - def decorator(func: Callable[P, str], output=output): - @functools.wraps(func) - def wrapper(*args: P.args, **kwargs: P.kwargs) -> T: - args_vars = [ - LiteralVar.create(arg) if not isinstance(arg, Var) else arg - for arg in args - ] - kwargs_vars = { - key: LiteralVar.create(value) if not isinstance(value, Var) else value - for key, value in kwargs.items() - } - return output( - _var_name=func(*args_vars, **kwargs_vars), # type: ignore - _var_data=VarData.merge( - *[arg._get_all_var_data() for arg in args if isinstance(arg, Var)], - *[ - arg._get_all_var_data() - for arg in kwargs.values() - if isinstance(arg, Var) - ], - ), - ) - - return wrapper - - return decorator - - -def unionize(*args: Type) -> Type: - """Unionize the types. - - Args: - args: The types to unionize. - - Returns: - The unionized types. - """ - if not args: - return Any - first, *rest = args - if not rest: - return first - return Union[first, unionize(*rest)] - - -def figure_out_type(value: Any) -> Type: - """Figure out the type of the value. - - Args: - value: The value to figure out the type of. - - Returns: - The type of the value. - """ - if isinstance(value, list): - return List[unionize(*(figure_out_type(v) for v in value))] - if isinstance(value, set): - return Set[unionize(*(figure_out_type(v) for v in value))] - if isinstance(value, tuple): - return Tuple[unionize(*(figure_out_type(v) for v in value)), ...] - if isinstance(value, dict): - return Dict[ - unionize(*(figure_out_type(k) for k in value)), - unionize(*(figure_out_type(v) for v in value.values())), - ] - return type(value) diff --git a/reflex/experimental/vars/function.py b/reflex/experimental/vars/function.py deleted file mode 100644 index 4514a482d1..0000000000 --- a/reflex/experimental/vars/function.py +++ /dev/null @@ -1,290 +0,0 @@ -"""Immutable function vars.""" - -from __future__ import annotations - -import dataclasses -import sys -from functools import cached_property -from typing import Any, Callable, Optional, Tuple, Type, Union - -from reflex.experimental.vars.base import ImmutableVar, LiteralVar -from reflex.vars import ImmutableVarData, Var, VarData - - -class FunctionVar(ImmutableVar[Callable]): - """Base class for immutable function vars.""" - - def __call__(self, *args: Var | Any) -> ArgsFunctionOperation: - """Call the function with the given arguments. - - Args: - *args: The arguments to call the function with. - - Returns: - The function call operation. - """ - return ArgsFunctionOperation( - ("...args",), - VarOperationCall(self, *args, ImmutableVar.create_safe("...args")), - ) - - def call(self, *args: Var | Any) -> VarOperationCall: - """Call the function with the given arguments. - - Args: - *args: The arguments to call the function with. - - Returns: - The function call operation. - """ - return VarOperationCall(self, *args) - - -class FunctionStringVar(FunctionVar): - """Base class for immutable function vars from a string.""" - - def __init__(self, func: str, _var_data: VarData | None = None) -> None: - """Initialize the function var. - - Args: - func: The function to call. - _var_data: Additional hooks and imports associated with the Var. - """ - super(FunctionVar, self).__init__( - _var_name=func, - _var_type=Callable, - _var_data=ImmutableVarData.merge(_var_data), - ) - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class VarOperationCall(ImmutableVar): - """Base class for immutable vars that are the result of a function call.""" - - _func: Optional[FunctionVar] = dataclasses.field(default=None) - _args: Tuple[Union[Var, Any], ...] = dataclasses.field(default_factory=tuple) - - def __init__( - self, func: FunctionVar, *args: Var | Any, _var_data: VarData | None = None - ): - """Initialize the function call var. - - Args: - func: The function to call. - *args: The arguments to call the function with. - _var_data: Additional hooks and imports associated with the Var. - """ - super(VarOperationCall, self).__init__( - _var_name="", - _var_type=Any, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_func", func) - object.__setattr__(self, "_args", args) - object.__delattr__(self, "_var_name") - - def __getattr__(self, name): - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute of the var. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - return f"({str(self._func)}({', '.join([str(LiteralVar.create(arg)) for arg in self._args])}))" - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - self._func._get_all_var_data() if self._func is not None else None, - *[var._get_all_var_data() for var in self._args], - self._var_data, - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. - - Returns: - The VarData of the components and all of its children. - """ - return self._cached_get_all_var_data - - def __post_init__(self): - """Post-initialize the var.""" - pass - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class ArgsFunctionOperation(FunctionVar): - """Base class for immutable function defined via arguments and return expression.""" - - _args_names: Tuple[str, ...] = dataclasses.field(default_factory=tuple) - _return_expr: Union[Var, Any] = dataclasses.field(default=None) - - def __init__( - self, - args_names: Tuple[str, ...], - return_expr: Var | Any, - _var_data: VarData | None = None, - ) -> None: - """Initialize the function with arguments var. - - Args: - args_names: The names of the arguments. - return_expr: The return expression of the function. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ArgsFunctionOperation, self).__init__( - _var_name=f"", - _var_type=Callable, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_args_names", args_names) - object.__setattr__(self, "_return_expr", return_expr) - object.__delattr__(self, "_var_name") - - def __getattr__(self, name): - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute of the var. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - return f"(({', '.join(self._args_names)}) => ({str(LiteralVar.create(self._return_expr))}))" - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - self._return_expr._get_all_var_data(), - self._var_data, - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. - - Returns: - The VarData of the components and all of its children. - """ - return self._cached_get_all_var_data - - def __post_init__(self): - """Post-initialize the var.""" - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class ToFunctionOperation(FunctionVar): - """Base class of converting a var to a function.""" - - _original_var: Var = dataclasses.field( - default_factory=lambda: LiteralVar.create(None) - ) - - def __init__( - self, - original_var: Var, - _var_type: Type[Callable] = Callable, - _var_data: VarData | None = None, - ) -> None: - """Initialize the function with arguments var. - - Args: - original_var: The original var to convert to a function. - _var_type: The type of the function. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ToFunctionOperation, self).__init__( - _var_name=f"", - _var_type=_var_type, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_original_var", original_var) - object.__delattr__(self, "_var_name") - - def __getattr__(self, name): - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute of the var. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - return str(self._original_var) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - self._original_var._get_all_var_data(), - self._var_data, - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. - - Returns: - The VarData of the components and all of its children. - """ - return self._cached_get_all_var_data diff --git a/reflex/experimental/vars/number.py b/reflex/experimental/vars/number.py deleted file mode 100644 index 6bd3a7ff76..0000000000 --- a/reflex/experimental/vars/number.py +++ /dev/null @@ -1,1458 +0,0 @@ -"""Immutable number vars.""" - -from __future__ import annotations - -import dataclasses -import json -import sys -from functools import cached_property -from typing import Any, Union - -from reflex.experimental.vars.base import ( - ImmutableVar, - LiteralVar, -) -from reflex.vars import ImmutableVarData, Var, VarData - - -class NumberVar(ImmutableVar[Union[int, float]]): - """Base class for immutable number vars.""" - - def __add__(self, other: number_types | boolean_types) -> NumberAddOperation: - """Add two numbers. - - Args: - other: The other number. - - Returns: - The number addition operation. - """ - return NumberAddOperation(self, +other) - - def __radd__(self, other: number_types | boolean_types) -> NumberAddOperation: - """Add two numbers. - - Args: - other: The other number. - - Returns: - The number addition operation. - """ - return NumberAddOperation(+other, self) - - def __sub__(self, other: number_types | boolean_types) -> NumberSubtractOperation: - """Subtract two numbers. - - Args: - other: The other number. - - Returns: - The number subtraction operation. - """ - return NumberSubtractOperation(self, +other) - - def __rsub__(self, other: number_types | boolean_types) -> NumberSubtractOperation: - """Subtract two numbers. - - Args: - other: The other number. - - Returns: - The number subtraction operation. - """ - return NumberSubtractOperation(+other, self) - - def __abs__(self) -> NumberAbsoluteOperation: - """Get the absolute value of the number. - - Returns: - The number absolute operation. - """ - return NumberAbsoluteOperation(self) - - def __mul__(self, other: number_types | boolean_types) -> NumberMultiplyOperation: - """Multiply two numbers. - - Args: - other: The other number. - - Returns: - The number multiplication operation. - """ - return NumberMultiplyOperation(self, +other) - - def __rmul__(self, other: number_types | boolean_types) -> NumberMultiplyOperation: - """Multiply two numbers. - - Args: - other: The other number. - - Returns: - The number multiplication operation. - """ - return NumberMultiplyOperation(+other, self) - - def __truediv__(self, other: number_types | boolean_types) -> NumberTrueDivision: - """Divide two numbers. - - Args: - other: The other number. - - Returns: - The number true division operation. - """ - return NumberTrueDivision(self, +other) - - def __rtruediv__(self, other: number_types | boolean_types) -> NumberTrueDivision: - """Divide two numbers. - - Args: - other: The other number. - - Returns: - The number true division operation. - """ - return NumberTrueDivision(+other, self) - - def __floordiv__(self, other: number_types | boolean_types) -> NumberFloorDivision: - """Floor divide two numbers. - - Args: - other: The other number. - - Returns: - The number floor division operation. - """ - return NumberFloorDivision(self, +other) - - def __rfloordiv__(self, other: number_types | boolean_types) -> NumberFloorDivision: - """Floor divide two numbers. - - Args: - other: The other number. - - Returns: - The number floor division operation. - """ - return NumberFloorDivision(+other, self) - - def __mod__(self, other: number_types | boolean_types) -> NumberModuloOperation: - """Modulo two numbers. - - Args: - other: The other number. - - Returns: - The number modulo operation. - """ - return NumberModuloOperation(self, +other) - - def __rmod__(self, other: number_types | boolean_types) -> NumberModuloOperation: - """Modulo two numbers. - - Args: - other: The other number. - - Returns: - The number modulo operation. - """ - return NumberModuloOperation(+other, self) - - def __pow__(self, other: number_types | boolean_types) -> NumberExponentOperation: - """Exponentiate two numbers. - - Args: - other: The other number. - - Returns: - The number exponent operation. - """ - return NumberExponentOperation(self, +other) - - def __rpow__(self, other: number_types | boolean_types) -> NumberExponentOperation: - """Exponentiate two numbers. - - Args: - other: The other number. - - Returns: - The number exponent operation. - """ - return NumberExponentOperation(+other, self) - - def __neg__(self) -> NumberNegateOperation: - """Negate the number. - - Returns: - The number negation operation. - """ - return NumberNegateOperation(self) - - def __and__(self, other: number_types | boolean_types) -> BooleanAndOperation: - """Boolean AND two numbers. - - Args: - other: The other number. - - Returns: - The boolean AND operation. - """ - boolified_other = other.bool() if isinstance(other, Var) else bool(other) - return BooleanAndOperation(self.bool(), boolified_other) - - def __rand__(self, other: number_types | boolean_types) -> BooleanAndOperation: - """Boolean AND two numbers. - - Args: - other: The other number. - - Returns: - The boolean AND operation. - """ - boolified_other = other.bool() if isinstance(other, Var) else bool(other) - return BooleanAndOperation(boolified_other, self.bool()) - - def __or__(self, other: number_types | boolean_types) -> BooleanOrOperation: - """Boolean OR two numbers. - - Args: - other: The other number. - - Returns: - The boolean OR operation. - """ - boolified_other = other.bool() if isinstance(other, Var) else bool(other) - return BooleanOrOperation(self.bool(), boolified_other) - - def __ror__(self, other: number_types | boolean_types) -> BooleanOrOperation: - """Boolean OR two numbers. - - Args: - other: The other number. - - Returns: - The boolean OR operation. - """ - boolified_other = other.bool() if isinstance(other, Var) else bool(other) - return BooleanOrOperation(boolified_other, self.bool()) - - def __invert__(self) -> BooleanNotOperation: - """Boolean NOT the number. - - Returns: - The boolean NOT operation. - """ - return BooleanNotOperation(self.bool()) - - def __pos__(self) -> NumberVar: - """Positive the number. - - Returns: - The number. - """ - return self - - def __round__(self) -> NumberRoundOperation: - """Round the number. - - Returns: - The number round operation. - """ - return NumberRoundOperation(self) - - def __ceil__(self) -> NumberCeilOperation: - """Ceil the number. - - Returns: - The number ceil operation. - """ - return NumberCeilOperation(self) - - def __floor__(self) -> NumberFloorOperation: - """Floor the number. - - Returns: - The number floor operation. - """ - return NumberFloorOperation(self) - - def __trunc__(self) -> NumberTruncOperation: - """Trunc the number. - - Returns: - The number trunc operation. - """ - return NumberTruncOperation(self) - - def __lt__(self, other: number_types | boolean_types) -> LessThanOperation: - """Less than comparison. - - Args: - other: The other number. - - Returns: - The result of the comparison. - """ - return LessThanOperation(self, +other) - - def __le__(self, other: number_types | boolean_types) -> LessThanOrEqualOperation: - """Less than or equal comparison. - - Args: - other: The other number. - - Returns: - The result of the comparison. - """ - return LessThanOrEqualOperation(self, +other) - - def __eq__(self, other: number_types | boolean_types) -> EqualOperation: - """Equal comparison. - - Args: - other: The other number. - - Returns: - The result of the comparison. - """ - return EqualOperation(self, +other) - - def __ne__(self, other: number_types | boolean_types) -> NotEqualOperation: - """Not equal comparison. - - Args: - other: The other number. - - Returns: - The result of the comparison. - """ - return NotEqualOperation(self, +other) - - def __gt__(self, other: number_types | boolean_types) -> GreaterThanOperation: - """Greater than comparison. - - Args: - other: The other number. - - Returns: - The result of the comparison. - """ - return GreaterThanOperation(self, +other) - - def __ge__( - self, other: number_types | boolean_types - ) -> GreaterThanOrEqualOperation: - """Greater than or equal comparison. - - Args: - other: The other number. - - Returns: - The result of the comparison. - """ - return GreaterThanOrEqualOperation(self, +other) - - def bool(self) -> NotEqualOperation: - """Boolean conversion. - - Returns: - The boolean value of the number. - """ - return NotEqualOperation(self, 0) - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class BinaryNumberOperation(NumberVar): - """Base class for immutable number vars that are the result of a binary operation.""" - - a: number_types = dataclasses.field(default=0) - b: number_types = dataclasses.field(default=0) - - def __init__( - self, - a: number_types, - b: number_types, - _var_data: VarData | None = None, - ): - """Initialize the binary number operation var. - - Args: - a: The first number. - b: The second number. - _var_data: Additional hooks and imports associated with the Var. - """ - super(BinaryNumberOperation, self).__init__( - _var_name="", - _var_type=float, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__setattr__(self, "b", b) - object.__delattr__(self, "_var_name") - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Raises: - NotImplementedError: Must be implemented by subclasses - """ - raise NotImplementedError( - "BinaryNumberOperation must implement _cached_var_name" - ) - - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(BinaryNumberOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralNumberVar(self.b) - return ImmutableVarData.merge( - first_value._get_all_var_data(), - second_value._get_all_var_data(), - self._var_data, - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class UnaryNumberOperation(NumberVar): - """Base class for immutable number vars that are the result of a unary operation.""" - - a: number_types = dataclasses.field(default=0) - - def __init__( - self, - a: number_types, - _var_data: VarData | None = None, - ): - """Initialize the unary number operation var. - - Args: - a: The number. - _var_data: Additional hooks and imports associated with the Var. - """ - super(UnaryNumberOperation, self).__init__( - _var_name="", - _var_type=float, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__delattr__(self, "_var_name") - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Raises: - NotImplementedError: Must be implemented by subclasses. - """ - raise NotImplementedError( - "UnaryNumberOperation must implement _cached_var_name" - ) - - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(UnaryNumberOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - return ImmutableVarData.merge(value._get_all_var_data(), self._var_data) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - - -class NumberAddOperation(BinaryNumberOperation): - """Base class for immutable number vars that are the result of an addition operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralNumberVar(self.b) - return f"({str(first_value)} + {str(second_value)})" - - -class NumberSubtractOperation(BinaryNumberOperation): - """Base class for immutable number vars that are the result of a subtraction operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralNumberVar(self.b) - return f"({str(first_value)} - {str(second_value)})" - - -class NumberAbsoluteOperation(UnaryNumberOperation): - """Base class for immutable number vars that are the result of an absolute operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - return f"Math.abs({str(value)})" - - -class NumberMultiplyOperation(BinaryNumberOperation): - """Base class for immutable number vars that are the result of a multiplication operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralNumberVar(self.b) - return f"({str(first_value)} * {str(second_value)})" - - -class NumberNegateOperation(UnaryNumberOperation): - """Base class for immutable number vars that are the result of a negation operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - return f"-({str(value)})" - - -class NumberTrueDivision(BinaryNumberOperation): - """Base class for immutable number vars that are the result of a true division operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralNumberVar(self.b) - return f"({str(first_value)} / {str(second_value)})" - - -class NumberFloorDivision(BinaryNumberOperation): - """Base class for immutable number vars that are the result of a floor division operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralNumberVar(self.b) - return f"Math.floor({str(first_value)} / {str(second_value)})" - - -class NumberModuloOperation(BinaryNumberOperation): - """Base class for immutable number vars that are the result of a modulo operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralNumberVar(self.b) - return f"({str(first_value)} % {str(second_value)})" - - -class NumberExponentOperation(BinaryNumberOperation): - """Base class for immutable number vars that are the result of an exponent operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralNumberVar(self.b) - return f"({str(first_value)} ** {str(second_value)})" - - -class NumberRoundOperation(UnaryNumberOperation): - """Base class for immutable number vars that are the result of a round operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - return f"Math.round({str(value)})" - - -class NumberCeilOperation(UnaryNumberOperation): - """Base class for immutable number vars that are the result of a ceil operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - return f"Math.ceil({str(value)})" - - -class NumberFloorOperation(UnaryNumberOperation): - """Base class for immutable number vars that are the result of a floor operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - return f"Math.floor({str(value)})" - - -class NumberTruncOperation(UnaryNumberOperation): - """Base class for immutable number vars that are the result of a trunc operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - value = self.a if isinstance(self.a, Var) else LiteralNumberVar(self.a) - return f"Math.trunc({str(value)})" - - -class BooleanVar(ImmutableVar[bool]): - """Base class for immutable boolean vars.""" - - def __and__(self, other: bool) -> BooleanAndOperation: - """AND two booleans. - - Args: - other: The other boolean. - - Returns: - The boolean AND operation. - """ - return BooleanAndOperation(self, other) - - def __rand__(self, other: bool) -> BooleanAndOperation: - """AND two booleans. - - Args: - other: The other boolean. - - Returns: - The boolean AND operation. - """ - return BooleanAndOperation(other, self) - - def __or__(self, other: bool) -> BooleanOrOperation: - """OR two booleans. - - Args: - other: The other boolean. - - Returns: - The boolean OR operation. - """ - return BooleanOrOperation(self, other) - - def __ror__(self, other: bool) -> BooleanOrOperation: - """OR two booleans. - - Args: - other: The other boolean. - - Returns: - The boolean OR operation. - """ - return BooleanOrOperation(other, self) - - def __invert__(self) -> BooleanNotOperation: - """NOT the boolean. - - Returns: - The boolean NOT operation. - """ - return BooleanNotOperation(self) - - def __int__(self) -> BooleanToIntOperation: - """Convert the boolean to an int. - - Returns: - The boolean to int operation. - """ - return BooleanToIntOperation(self) - - def __pos__(self) -> BooleanToIntOperation: - """Convert the boolean to an int. - - Returns: - The boolean to int operation. - """ - return BooleanToIntOperation(self) - - def bool(self) -> BooleanVar: - """Boolean conversion. - - Returns: - The boolean value of the boolean. - """ - return self - - def __lt__(self, other: boolean_types | number_types) -> LessThanOperation: - """Less than comparison. - - Args: - other: The other boolean. - - Returns: - The result of the comparison. - """ - return LessThanOperation(+self, +other) - - def __le__(self, other: boolean_types | number_types) -> LessThanOrEqualOperation: - """Less than or equal comparison. - - Args: - other: The other boolean. - - Returns: - The result of the comparison. - """ - return LessThanOrEqualOperation(+self, +other) - - def __eq__(self, other: boolean_types | number_types) -> EqualOperation: - """Equal comparison. - - Args: - other: The other boolean. - - Returns: - The result of the comparison. - """ - return EqualOperation(+self, +other) - - def __ne__(self, other: boolean_types | number_types) -> NotEqualOperation: - """Not equal comparison. - - Args: - other: The other boolean. - - Returns: - The result of the comparison. - """ - return NotEqualOperation(+self, +other) - - def __gt__(self, other: boolean_types | number_types) -> GreaterThanOperation: - """Greater than comparison. - - Args: - other: The other boolean. - - Returns: - The result of the comparison. - """ - return GreaterThanOperation(+self, +other) - - def __ge__( - self, other: boolean_types | number_types - ) -> GreaterThanOrEqualOperation: - """Greater than or equal comparison. - - Args: - other: The other boolean. - - Returns: - The result of the comparison. - """ - return GreaterThanOrEqualOperation(+self, +other) - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class BooleanToIntOperation(NumberVar): - """Base class for immutable number vars that are the result of a boolean to int operation.""" - - a: boolean_types = dataclasses.field(default=False) - - def __init__( - self, - a: boolean_types, - _var_data: VarData | None = None, - ): - """Initialize the boolean to int operation var. - - Args: - a: The boolean. - _var_data: Additional hooks and imports associated with the Var. - """ - super(BooleanToIntOperation, self).__init__( - _var_name="", - _var_type=int, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__delattr__(self, "_var_name") - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - return f"({str(self.a)} ? 1 : 0)" - - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(BooleanToIntOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - self.a._get_all_var_data() if isinstance(self.a, Var) else None, - self._var_data, - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class NumberComparisonOperation(BooleanVar): - """Base class for immutable boolean vars that are the result of a comparison operation.""" - - a: number_types = dataclasses.field(default=0) - b: number_types = dataclasses.field(default=0) - - def __init__( - self, - a: number_types, - b: number_types, - _var_data: VarData | None = None, - ): - """Initialize the comparison operation var. - - Args: - a: The first value. - b: The second value. - _var_data: Additional hooks and imports associated with the Var. - """ - super(NumberComparisonOperation, self).__init__( - _var_name="", - _var_type=bool, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__setattr__(self, "b", b) - object.__delattr__(self, "_var_name") - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Raises: - NotImplementedError: Must be implemented by subclasses. - """ - raise NotImplementedError("ComparisonOperation must implement _cached_var_name") - - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(NumberComparisonOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return ImmutableVarData.merge( - first_value._get_all_var_data(), second_value._get_all_var_data() - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - - -class GreaterThanOperation(NumberComparisonOperation): - """Base class for immutable boolean vars that are the result of a greater than operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return f"({str(first_value)} > {str(second_value)})" - - -class GreaterThanOrEqualOperation(NumberComparisonOperation): - """Base class for immutable boolean vars that are the result of a greater than or equal operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return f"({str(first_value)} >= {str(second_value)})" - - -class LessThanOperation(NumberComparisonOperation): - """Base class for immutable boolean vars that are the result of a less than operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return f"({str(first_value)} < {str(second_value)})" - - -class LessThanOrEqualOperation(NumberComparisonOperation): - """Base class for immutable boolean vars that are the result of a less than or equal operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return f"({str(first_value)} <= {str(second_value)})" - - -class EqualOperation(NumberComparisonOperation): - """Base class for immutable boolean vars that are the result of an equal operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return f"({str(first_value)} == {str(second_value)})" - - -class NotEqualOperation(NumberComparisonOperation): - """Base class for immutable boolean vars that are the result of a not equal operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return f"({str(first_value)} != {str(second_value)})" - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class LogicalOperation(BooleanVar): - """Base class for immutable boolean vars that are the result of a logical operation.""" - - a: boolean_types = dataclasses.field(default=False) - b: boolean_types = dataclasses.field(default=False) - - def __init__( - self, a: boolean_types, b: boolean_types, _var_data: VarData | None = None - ): - """Initialize the logical operation var. - - Args: - a: The first value. - b: The second value. - _var_data: Additional hooks and imports associated with the Var. - """ - super(LogicalOperation, self).__init__( - _var_name="", - _var_type=bool, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__setattr__(self, "b", b) - object.__delattr__(self, "_var_name") - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Raises: - NotImplementedError: Must be implemented by subclasses. - """ - raise NotImplementedError("LogicalOperation must implement _cached_var_name") - - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(LogicalOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return ImmutableVarData.merge( - first_value._get_all_var_data(), second_value._get_all_var_data() - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - - -class BooleanAndOperation(LogicalOperation): - """Base class for immutable boolean vars that are the result of a logical AND operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return f"({str(first_value)} && {str(second_value)})" - - -class BooleanOrOperation(LogicalOperation): - """Base class for immutable boolean vars that are the result of a logical OR operation.""" - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - first_value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - second_value = self.b if isinstance(self.b, Var) else LiteralVar.create(self.b) - return f"({str(first_value)} || {str(second_value)})" - - -class BooleanNotOperation(BooleanVar): - """Base class for immutable boolean vars that are the result of a logical NOT operation.""" - - a: boolean_types = dataclasses.field() - - def __init__(self, a: boolean_types, _var_data: VarData | None = None): - """Initialize the logical NOT operation var. - - Args: - a: The value. - _var_data: Additional hooks and imports associated with the Var. - """ - super(BooleanNotOperation, self).__init__( - _var_name="", - _var_type=bool, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__delattr__(self, "_var_name") - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - return f"!({str(value)})" - - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(BooleanNotOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - value = self.a if isinstance(self.a, Var) else LiteralVar.create(self.a) - return ImmutableVarData.merge(value._get_all_var_data()) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class LiteralBooleanVar(LiteralVar, BooleanVar): - """Base class for immutable literal boolean vars.""" - - _var_value: bool = dataclasses.field(default=False) - - def __init__( - self, - _var_value: bool, - _var_data: VarData | None = None, - ): - """Initialize the boolean var. - - Args: - _var_value: The value of the var. - _var_data: Additional hooks and imports associated with the Var. - """ - super(LiteralBooleanVar, self).__init__( - _var_name="true" if _var_value else "false", - _var_type=bool, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_var_value", _var_value) - - def __hash__(self) -> int: - """Hash the var. - - Returns: - The hash of the var. - """ - return hash((self.__class__.__name__, self._var_value)) - - def json(self) -> str: - """Get the JSON representation of the var. - - Returns: - The JSON representation of the var. - """ - return "true" if self._var_value else "false" - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class LiteralNumberVar(LiteralVar, NumberVar): - """Base class for immutable literal number vars.""" - - _var_value: float | int = dataclasses.field(default=0) - - def __init__( - self, - _var_value: float | int, - _var_data: VarData | None = None, - ): - """Initialize the number var. - - Args: - _var_value: The value of the var. - _var_data: Additional hooks and imports associated with the Var. - """ - super(LiteralNumberVar, self).__init__( - _var_name=str(_var_value), - _var_type=type(_var_value), - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_var_value", _var_value) - - def __hash__(self) -> int: - """Hash the var. - - Returns: - The hash of the var. - """ - return hash((self.__class__.__name__, self._var_value)) - - def json(self) -> str: - """Get the JSON representation of the var. - - Returns: - The JSON representation of the var. - """ - return json.dumps(self._var_value) - - -number_types = Union[NumberVar, LiteralNumberVar, int, float] -boolean_types = Union[BooleanVar, LiteralBooleanVar, bool] - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class ToNumberVarOperation(NumberVar): - """Base class for immutable number vars that are the result of a number operation.""" - - _original_value: Var = dataclasses.field( - default_factory=lambda: LiteralNumberVar(0) - ) - - def __init__( - self, - _original_value: Var, - _var_type: type[int] | type[float] = float, - _var_data: VarData | None = None, - ): - """Initialize the number var. - - Args: - _original_value: The original value. - _var_type: The type of the Var. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ToNumberVarOperation, self).__init__( - _var_name="", - _var_type=_var_type, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_original_value", _original_value) - object.__delattr__(self, "_var_name") - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - return str(self._original_value) - - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ToNumberVarOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - self._original_value._get_all_var_data(), self._var_data - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - - -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class ToBooleanVarOperation(BooleanVar): - """Base class for immutable boolean vars that are the result of a boolean operation.""" - - _original_value: Var = dataclasses.field( - default_factory=lambda: LiteralBooleanVar(False) - ) - - def __init__( - self, - _original_value: Var, - _var_data: VarData | None = None, - ): - """Initialize the boolean var. - - Args: - _original_value: The original value. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ToBooleanVarOperation, self).__init__( - _var_name="", - _var_type=bool, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_original_value", _original_value) - object.__delattr__(self, "_var_name") - - @cached_property - def _cached_var_name(self) -> str: - """The name of the var. - - Returns: - The name of the var. - """ - return str(self._original_value) - - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ToBooleanVarOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - self._original_value._get_all_var_data(), self._var_data - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data diff --git a/reflex/experimental/vars/__init__.py b/reflex/ivars/__init__.py similarity index 100% rename from reflex/experimental/vars/__init__.py rename to reflex/ivars/__init__.py diff --git a/reflex/ivars/base.py b/reflex/ivars/base.py new file mode 100644 index 0000000000..de970ff641 --- /dev/null +++ b/reflex/ivars/base.py @@ -0,0 +1,1794 @@ +"""Collection of base classes.""" + +from __future__ import annotations + +import contextlib +import dataclasses +import datetime +import dis +import functools +import inspect +import json +import sys +import warnings +from types import CodeType, FunctionType +from typing import ( + TYPE_CHECKING, + Any, + Callable, + Dict, + Generic, + List, + Literal, + Optional, + Sequence, + Set, + Tuple, + Type, + TypeVar, + Union, + cast, + get_args, + overload, +) + +from typing_extensions import ParamSpec, get_origin, get_type_hints, override + +from reflex import constants +from reflex.base import Base +from reflex.constants.colors import Color +from reflex.utils import console, imports, serializers, types +from reflex.utils.exceptions import VarDependencyError, VarTypeError, VarValueError +from reflex.utils.format import format_state_name +from reflex.vars import ( + ComputedVar, + ImmutableVarData, + Var, + VarData, + _decode_var_immutable, + _extract_var_data, + _global_vars, +) + +if TYPE_CHECKING: + from reflex.state import BaseState + + from .function import FunctionVar, ToFunctionOperation + from .number import ( + BooleanVar, + NumberVar, + ToBooleanVarOperation, + ToNumberVarOperation, + ) + from .object import ObjectVar, ToObjectOperation + from .sequence import ArrayVar, StringVar, ToArrayOperation, ToStringOperation + + +VAR_TYPE = TypeVar("VAR_TYPE") + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ImmutableVar(Var, Generic[VAR_TYPE]): + """Base class for immutable vars.""" + + # The name of the var. + _var_name: str = dataclasses.field() + + # The type of the var. + _var_type: types.GenericType = dataclasses.field(default=Any) + + # Extra metadata associated with the Var + _var_data: Optional[ImmutableVarData] = dataclasses.field(default=None) + + def __str__(self) -> str: + """String representation of the var. Guaranteed to be a valid Javascript expression. + + Returns: + The name of the var. + """ + return self._var_name + + @property + def _var_is_local(self) -> bool: + """Whether this is a local javascript variable. + + Returns: + False + """ + return False + + @property + def _var_is_string(self) -> bool: + """Whether the var is a string literal. + + Returns: + False + """ + return False + + @property + def _var_full_name_needs_state_prefix(self) -> bool: + """Whether the full name of the var needs a _var_state prefix. + + Returns: + False + """ + return False + + def __post_init__(self): + """Post-initialize the var.""" + # Decode any inline Var markup and apply it to the instance + _var_data, _var_name = _decode_var_immutable(self._var_name) + + if _var_data or _var_name != self._var_name: + self.__init__( + _var_name=_var_name, + _var_type=self._var_type, + _var_data=ImmutableVarData.merge(self._var_data, _var_data), + ) + + def __hash__(self) -> int: + """Define a hash function for the var. + + Returns: + The hash of the var. + """ + return hash((self._var_name, self._var_type, self._var_data)) + + def _get_all_var_data(self) -> ImmutableVarData | None: + """Get all VarData associated with the Var. + + Returns: + The VarData of the components and all of its children. + """ + return self._var_data + + def _replace(self, merge_var_data=None, **kwargs: Any): + """Make a copy of this Var with updated fields. + + Args: + merge_var_data: VarData to merge into the existing VarData. + **kwargs: Var fields to update. + + Returns: + A new ImmutableVar with the updated fields overwriting the corresponding fields in this Var. + + Raises: + TypeError: If _var_is_local, _var_is_string, or _var_full_name_needs_state_prefix is not None. + """ + if kwargs.get("_var_is_local", False) is not False: + raise TypeError( + "The _var_is_local argument is not supported for ImmutableVar." + ) + + if kwargs.get("_var_is_string", False) is not False: + raise TypeError( + "The _var_is_string argument is not supported for ImmutableVar." + ) + + if kwargs.get("_var_full_name_needs_state_prefix", False) is not False: + raise TypeError( + "The _var_full_name_needs_state_prefix argument is not supported for ImmutableVar." + ) + + return dataclasses.replace( + self, + _var_data=ImmutableVarData.merge( + kwargs.get("_var_data", self._var_data), merge_var_data + ), + **kwargs, + ) + + @classmethod + def create( + cls, + value: Any, + _var_is_local: bool | None = None, + _var_is_string: bool | None = None, + _var_data: VarData | None = None, + ) -> ImmutableVar | Var | None: + """Create a var from a value. + + Args: + value: The value to create the var from. + _var_is_local: Whether the var is local. Deprecated. + _var_is_string: Whether the var is a string literal. Deprecated. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The var. + + Raises: + VarTypeError: If the value is JSON-unserializable. + TypeError: If _var_is_local or _var_is_string is not None. + """ + if _var_is_local is not None: + raise TypeError( + "The _var_is_local argument is not supported for ImmutableVar." + ) + + if _var_is_string is not None: + raise TypeError( + "The _var_is_string argument is not supported for ImmutableVar." + ) + + from reflex.utils import format + + # Check for none values. + if value is None: + return None + + # If the value is already a var, do nothing. + if isinstance(value, Var): + return value + + # Try to pull the imports and hooks from contained values. + if not isinstance(value, str): + _var_data = VarData.merge(*_extract_var_data(value), _var_data) + + # Try to serialize the value. + type_ = type(value) + if type_ in types.JSONType: + name = value + else: + name, _serialized_type = serializers.serialize(value, get_type=True) + if name is None: + raise VarTypeError( + f"No JSON serializer found for var {value} of type {type_}." + ) + name = name if isinstance(name, str) else format.json_dumps(name) + + return cls( + _var_name=name, + _var_type=type_, + _var_data=( + ImmutableVarData( + state=_var_data.state, + imports=_var_data.imports, + hooks=_var_data.hooks, + ) + if _var_data + else None + ), + ) + + @classmethod + def create_safe( + cls, + value: Any, + _var_is_local: bool | None = None, + _var_is_string: bool | None = None, + _var_data: VarData | None = None, + ) -> Var | ImmutableVar: + """Create a var from a value, asserting that it is not None. + + Args: + value: The value to create the var from. + _var_is_local: Whether the var is local. Deprecated. + _var_is_string: Whether the var is a string literal. Deprecated. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The var. + """ + var = cls.create( + value, + _var_is_local=_var_is_local, + _var_is_string=_var_is_string, + _var_data=_var_data, + ) + assert var is not None + return var + + def __format__(self, format_spec: str) -> str: + """Format the var into a Javascript equivalent to an f-string. + + Args: + format_spec: The format specifier (Ignored for now). + + Returns: + The formatted var. + """ + hashed_var = hash(self) + + _global_vars[hashed_var] = self + + # Encode the _var_data into the formatted output for tracking purposes. + return f"{constants.REFLEX_VAR_OPENING_TAG}{hashed_var}{constants.REFLEX_VAR_CLOSING_TAG}{self._var_name}" + + @overload + def to( + self, output: Type[NumberVar], var_type: type[int] | type[float] = float + ) -> ToNumberVarOperation: ... + + @overload + def to(self, output: Type[BooleanVar]) -> ToBooleanVarOperation: ... + + @overload + def to( + self, + output: Type[ArrayVar], + var_type: type[list] | type[tuple] | type[set] = list, + ) -> ToArrayOperation: ... + + @overload + def to(self, output: Type[StringVar]) -> ToStringOperation: ... + + @overload + def to( + self, output: Type[ObjectVar], var_type: types.GenericType = dict + ) -> ToObjectOperation: ... + + @overload + def to( + self, output: Type[FunctionVar], var_type: Type[Callable] = Callable + ) -> ToFunctionOperation: ... + + @overload + def to( + self, + output: Type[OUTPUT] | types.GenericType, + var_type: types.GenericType | None = None, + ) -> OUTPUT: ... + + def to( + self, + output: Type[OUTPUT] | types.GenericType, + var_type: types.GenericType | None = None, + ) -> Var: + """Convert the var to a different type. + + Args: + output: The output type. + var_type: The type of the var. + + Raises: + TypeError: If the var_type is not a supported type for the output. + + Returns: + The converted var. + """ + from .function import FunctionVar, ToFunctionOperation + from .number import ( + BooleanVar, + NumberVar, + ToBooleanVarOperation, + ToNumberVarOperation, + ) + from .object import ObjectVar, ToObjectOperation + from .sequence import ArrayVar, StringVar, ToArrayOperation, ToStringOperation + + fixed_type = get_origin(var_type) or var_type + + fixed_output_type = get_origin(output) or output + + # If the first argument is a python type, we map it to the corresponding Var type. + if fixed_output_type is dict: + return self.to(ObjectVar, output) + if fixed_output_type in (list, tuple, set): + return self.to(ArrayVar, output) + if fixed_output_type in (int, float): + return self.to(NumberVar, output) + if fixed_output_type is str: + return self.to(StringVar, output) + if fixed_output_type is bool: + return self.to(BooleanVar, output) + + if issubclass(output, NumberVar): + if fixed_type is not None and not issubclass(fixed_type, (int, float)): + raise TypeError( + f"Unsupported type {var_type} for NumberVar. Must be int or float." + ) + return ToNumberVarOperation.create(self, var_type or float) + + if issubclass(output, BooleanVar): + return ToBooleanVarOperation.create(self) + + if issubclass(output, ArrayVar): + if fixed_type is not None and not issubclass( + fixed_type, (list, tuple, set) + ): + raise TypeError( + f"Unsupported type {var_type} for ArrayVar. Must be list, tuple, or set." + ) + return ToArrayOperation.create(self, var_type or list) + + if issubclass(output, StringVar): + return ToStringOperation.create(self) + + if issubclass(output, (ObjectVar, Base)): + return ToObjectOperation.create(self, var_type or dict) + + if issubclass(output, FunctionVar): + # if fixed_type is not None and not issubclass(fixed_type, Callable): + # raise TypeError( + # f"Unsupported type {var_type} for FunctionVar. Must be Callable." + # ) + return ToFunctionOperation.create(self, var_type or Callable) + + # If we can't determine the first argument, we just replace the _var_type. + if not issubclass(output, Var) or var_type is None: + return dataclasses.replace( + self, + _var_type=output, + ) + + # We couldn't determine the output type to be any other Var type, so we replace the _var_type. + if var_type is not None: + return dataclasses.replace( + self, + _var_type=var_type, + ) + + return self + + def guess_type(self) -> ImmutableVar: + """Guesses the type of the variable based on its `_var_type` attribute. + + Returns: + ImmutableVar: The guessed type of the variable. + + Raises: + TypeError: If the type is not supported for guessing. + """ + from .number import NumberVar + from .object import ObjectVar + from .sequence import ArrayVar, StringVar + + var_type = self._var_type + if types.is_optional(var_type): + var_type = types.get_args(var_type)[0] + + if var_type is Any: + return self + + fixed_type = get_origin(var_type) or var_type + + if fixed_type is Union: + return self + + if not inspect.isclass(fixed_type): + raise TypeError(f"Unsupported type {var_type} for guess_type.") + + if issubclass(fixed_type, (int, float)): + return self.to(NumberVar, self._var_type) + if issubclass(fixed_type, dict): + return self.to(ObjectVar, self._var_type) + if issubclass(fixed_type, (list, tuple, set)): + return self.to(ArrayVar, self._var_type) + if issubclass(fixed_type, str): + return self.to(StringVar) + if issubclass(fixed_type, Base): + return self.to(ObjectVar, self._var_type) + return self + + def get_default_value(self) -> Any: + """Get the default value of the var. + + Returns: + The default value of the var. + + Raises: + ImportError: If the var is a dataframe and pandas is not installed. + """ + if types.is_optional(self._var_type): + return None + + type_ = ( + get_origin(self._var_type) + if types.is_generic_alias(self._var_type) + else self._var_type + ) + if type_ is Literal: + args = get_args(self._var_type) + return args[0] if args else None + if issubclass(type_, str): + return "" + if issubclass(type_, types.get_args(Union[int, float])): + return 0 + if issubclass(type_, bool): + return False + if issubclass(type_, list): + return [] + if issubclass(type_, dict): + return {} + if issubclass(type_, tuple): + return () + if types.is_dataframe(type_): + try: + import pandas as pd + + return pd.DataFrame() + except ImportError as e: + raise ImportError( + "Please install pandas to use dataframes in your app." + ) from e + return set() if issubclass(type_, set) else None + + def get_setter_name(self, include_state: bool = True) -> str: + """Get the name of the var's generated setter function. + + Args: + include_state: Whether to include the state name in the setter name. + + Returns: + The name of the setter function. + """ + var_name_parts = self._var_name.split(".") + setter = constants.SETTER_PREFIX + var_name_parts[-1] + if self._var_data is None: + return setter + if not include_state or self._var_data.state == "": + return setter + return ".".join((self._var_data.state, setter)) + + def get_setter(self) -> Callable[[BaseState, Any], None]: + """Get the var's setter function. + + Returns: + A function that that creates a setter for the var. + """ + actual_name = self._var_name.split(".")[-1] + + def setter(state: BaseState, value: Any): + """Get the setter for the var. + + Args: + state: The state within which we add the setter function. + value: The value to set. + """ + if self._var_type in [int, float]: + try: + value = self._var_type(value) + setattr(state, actual_name, value) + except ValueError: + console.debug( + f"{type(state).__name__}.{self._var_name}: Failed conversion of {value} to '{self._var_type.__name__}'. Value not set.", + ) + else: + setattr(state, actual_name, value) + + setter.__qualname__ = self.get_setter_name() + + return setter + + def __eq__(self, other: Var | Any) -> BooleanVar: + """Check if the current variable is equal to the given variable. + + Args: + other (Var | Any): The variable to compare with. + + Returns: + BooleanVar: A BooleanVar object representing the result of the equality check. + """ + from .number import EqualOperation + + return EqualOperation.create(self, other) + + def __ne__(self, other: Var | Any) -> BooleanVar: + """Check if the current object is not equal to the given object. + + Parameters: + other (Var | Any): The object to compare with. + + Returns: + BooleanVar: A BooleanVar object representing the result of the comparison. + """ + from .number import EqualOperation + + return ~EqualOperation.create(self, other) + + def __gt__(self, other: Var | Any) -> BooleanVar: + """Compare the current instance with another variable and return a BooleanVar representing the result of the greater than operation. + + Args: + other (Var | Any): The variable to compare with. + + Returns: + BooleanVar: A BooleanVar representing the result of the greater than operation. + """ + from .number import GreaterThanOperation + + return GreaterThanOperation.create(self, other) + + def __ge__(self, other: Var | Any) -> BooleanVar: + """Check if the value of this variable is greater than or equal to the value of another variable or object. + + Args: + other (Var | Any): The variable or object to compare with. + + Returns: + BooleanVar: A BooleanVar object representing the result of the comparison. + """ + from .number import GreaterThanOrEqualOperation + + return GreaterThanOrEqualOperation.create(self, other) + + def __lt__(self, other: Var | Any) -> BooleanVar: + """Compare the current instance with another variable using the less than (<) operator. + + Args: + other: The variable to compare with. + + Returns: + A `BooleanVar` object representing the result of the comparison. + """ + from .number import LessThanOperation + + return LessThanOperation.create(self, other) + + def __le__(self, other: Var | Any) -> BooleanVar: + """Compare if the current instance is less than or equal to the given value. + + Args: + other: The value to compare with. + + Returns: + A BooleanVar object representing the result of the comparison. + """ + from .number import LessThanOrEqualOperation + + return LessThanOrEqualOperation.create(self, other) + + def bool(self) -> BooleanVar: + """Convert the var to a boolean. + + Returns: + The boolean var. + """ + from .number import ToBooleanVarOperation + + return ToBooleanVarOperation.create(self) + + def __and__(self, other: Var | Any) -> ImmutableVar: + """Perform a logical AND operation on the current instance and another variable. + + Args: + other: The variable to perform the logical AND operation with. + + Returns: + A `BooleanVar` object representing the result of the logical AND operation. + """ + return AndOperation.create(self, other) + + def __rand__(self, other: Var | Any) -> ImmutableVar: + """Perform a logical AND operation on the current instance and another variable. + + Args: + other: The variable to perform the logical AND operation with. + + Returns: + A `BooleanVar` object representing the result of the logical AND operation. + """ + return AndOperation.create(other, self) + + def __or__(self, other: Var | Any) -> ImmutableVar: + """Perform a logical OR operation on the current instance and another variable. + + Args: + other: The variable to perform the logical OR operation with. + + Returns: + A `BooleanVar` object representing the result of the logical OR operation. + """ + return OrOperation.create(self, other) + + def __ror__(self, other: Var | Any) -> ImmutableVar: + """Perform a logical OR operation on the current instance and another variable. + + Args: + other: The variable to perform the logical OR operation with. + + Returns: + A `BooleanVar` object representing the result of the logical OR operation. + """ + return OrOperation.create(other, self) + + def __invert__(self) -> BooleanVar: + """Perform a logical NOT operation on the current instance. + + Returns: + A `BooleanVar` object representing the result of the logical NOT operation. + """ + from .number import BooleanNotOperation + + return BooleanNotOperation.create(self.bool()) + + def to_string(self) -> ImmutableVar: + """Convert the var to a string. + + Returns: + The string var. + """ + from .function import JSON_STRINGIFY + from .sequence import StringVar + + return JSON_STRINGIFY.call(self).to(StringVar) + + def as_ref(self) -> ImmutableVar: + """Get a reference to the var. + + Returns: + The reference to the var. + """ + from .object import ObjectVar + + refs = ImmutableVar( + _var_name="refs", + _var_data=ImmutableVarData( + imports={ + f"/{constants.Dirs.STATE_PATH}": [imports.ImportVar(tag="refs")] + } + ), + ).to(ObjectVar) + return refs[LiteralVar.create(str(self))] + + def _type(self) -> StringVar: + """Returns the type of the object. + + This method uses the `typeof` function from the `FunctionStringVar` class + to determine the type of the object. + + Returns: + StringVar: A string variable representing the type of the object. + """ + from .function import FunctionStringVar + from .sequence import StringVar + + type_of = FunctionStringVar("typeof") + return type_of.call(self).to(StringVar) + + +OUTPUT = TypeVar("OUTPUT", bound=ImmutableVar) + + +class LiteralVar(ImmutableVar): + """Base class for immutable literal vars.""" + + @classmethod + def create( + cls, + value: Any, + _var_data: VarData | None = None, + ) -> Var: + """Create a var from a value. + + Args: + value: The value to create the var from. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The var. + + Raises: + TypeError: If the value is not a supported type for LiteralVar. + """ + from .number import LiteralBooleanVar, LiteralNumberVar + from .object import LiteralObjectVar + from .sequence import LiteralArrayVar, LiteralStringVar + + if isinstance(value, Var): + if _var_data is None: + return value + return value._replace(merge_var_data=_var_data) + + if isinstance(value, str): + return LiteralStringVar.create(value, _var_data=_var_data) + + if isinstance(value, bool): + return LiteralBooleanVar.create(value, _var_data=_var_data) + + if isinstance(value, (int, float)): + return LiteralNumberVar.create(value, _var_data=_var_data) + + if isinstance(value, dict): + return LiteralObjectVar.create(value, _var_data=_var_data) + + if isinstance(value, Color): + return LiteralStringVar.create(f"{value}", _var_data=_var_data) + + if isinstance(value, (list, tuple, set)): + return LiteralArrayVar.create(value, _var_data=_var_data) + + if value is None: + return ImmutableVar.create_safe("null", _var_data=_var_data) + + from reflex.event import EventChain, EventSpec + from reflex.utils.format import get_event_handler_parts + + from .function import ArgsFunctionOperation, FunctionStringVar + from .object import LiteralObjectVar + + if isinstance(value, EventSpec): + event_name = LiteralVar.create( + ".".join(filter(None, get_event_handler_parts(value.handler))) + ) + event_args = LiteralVar.create( + {str(name): value for name, value in value.args} + ) + event_client_name = LiteralVar.create(value.client_handler_name) + return FunctionStringVar("Event").call( + event_name, + event_args, + *([event_client_name] if value.client_handler_name else []), + ) + + if isinstance(value, EventChain): + sig = inspect.signature(value.args_spec) # type: ignore + if sig.parameters: + arg_def = tuple((f"_{p}" for p in sig.parameters)) + arg_def_expr = LiteralVar.create( + [ImmutableVar.create_safe(arg) for arg in arg_def] + ) + else: + # add a default argument for addEvents if none were specified in value.args_spec + # used to trigger the preventDefault() on the event. + arg_def = ("...args",) + arg_def_expr = ImmutableVar.create_safe("args") + + return ArgsFunctionOperation.create( + arg_def, + FunctionStringVar.create("addEvents").call( + LiteralVar.create( + [LiteralVar.create(event) for event in value.events] + ), + arg_def_expr, + LiteralVar.create(value.event_actions), + ), + ) + + try: + from plotly.graph_objects import Figure, layout + from plotly.io import to_json + + if isinstance(value, Figure): + return LiteralObjectVar.create( + json.loads(str(to_json(value))), + _var_type=Figure, + _var_data=_var_data, + ) + + if isinstance(value, layout.Template): + return LiteralObjectVar.create( + { + "data": json.loads(str(to_json(value.data))), + "layout": json.loads(str(to_json(value.layout))), + }, + _var_type=layout.Template, + _var_data=_var_data, + ) + except ImportError: + pass + + try: + import base64 + import io + + from PIL.Image import MIME + from PIL.Image import Image as Img + + if isinstance(value, Img): + with io.BytesIO() as buffer: + image_format = getattr(value, "format", None) or "PNG" + value.save(buffer, format=image_format) + try: + # Newer method to get the mime type, but does not always work. + mimetype = value.get_format_mimetype() # type: ignore + except AttributeError: + try: + # Fallback method + mimetype = MIME[image_format] + except KeyError: + # Unknown mime_type: warn and return image/png and hope the browser can sort it out. + warnings.warn( # noqa: B028 + f"Unknown mime type for {value} {image_format}. Defaulting to image/png" + ) + mimetype = "image/png" + return LiteralStringVar.create( + f"data:{mimetype};base64,{base64.b64encode(buffer.getvalue()).decode()}", + _var_data=_var_data, + ) + except ImportError: + pass + + if isinstance(value, Base): + return LiteralObjectVar.create( + {k: (None if callable(v) else v) for k, v in value.dict().items()}, + _var_type=type(value), + _var_data=_var_data, + ) + + raise TypeError( + f"Unsupported type {type(value)} for LiteralVar. Tried to create a LiteralVar from {value}." + ) + + def __post_init__(self): + """Post-initialize the var.""" + + def json(self) -> str: + """Serialize the var to a JSON string. + + Raises: + NotImplementedError: If the method is not implemented. + """ + raise NotImplementedError( + "LiteralVar subclasses must implement the json method." + ) + + +P = ParamSpec("P") +T = TypeVar("T", bound=ImmutableVar) + + +def var_operation(*, output: Type[T]) -> Callable[[Callable[P, str]], Callable[P, T]]: + """Decorator for creating a var operation. + + Example: + ```python + @var_operation(output=NumberVar) + def add(a: NumberVar, b: NumberVar): + return f"({a} + {b})" + ``` + + Args: + output: The output type of the operation. + + Returns: + The decorator. + """ + + def decorator(func: Callable[P, str], output=output): + @functools.wraps(func) + def wrapper(*args: P.args, **kwargs: P.kwargs) -> T: + args_vars = [ + LiteralVar.create(arg) if not isinstance(arg, Var) else arg + for arg in args + ] + kwargs_vars = { + key: LiteralVar.create(value) if not isinstance(value, Var) else value + for key, value in kwargs.items() + } + return output( + _var_name=func(*args_vars, **kwargs_vars), # type: ignore + _var_data=VarData.merge( + *[arg._get_all_var_data() for arg in args if isinstance(arg, Var)], + *[ + arg._get_all_var_data() + for arg in kwargs.values() + if isinstance(arg, Var) + ], + ), + ) + + return wrapper + + return decorator + + +def unionize(*args: Type) -> Type: + """Unionize the types. + + Args: + args: The types to unionize. + + Returns: + The unionized types. + """ + if not args: + return Any + first, *rest = args + if not rest: + return first + return Union[first, unionize(*rest)] + + +def figure_out_type(value: Any) -> types.GenericType: + """Figure out the type of the value. + + Args: + value: The value to figure out the type of. + + Returns: + The type of the value. + """ + if isinstance(value, list): + return List[unionize(*(figure_out_type(v) for v in value))] + if isinstance(value, set): + return Set[unionize(*(figure_out_type(v) for v in value))] + if isinstance(value, tuple): + return Tuple[unionize(*(figure_out_type(v) for v in value)), ...] + if isinstance(value, dict): + return Dict[ + unionize(*(figure_out_type(k) for k in value)), + unionize(*(figure_out_type(v) for v in value.values())), + ] + if isinstance(value, Var): + return value._var_type + return type(value) + + +class cached_property_no_lock(functools.cached_property): + """A special version of functools.cached_property that does not use a lock.""" + + def __init__(self, func): + """Initialize the cached_property_no_lock. + + Args: + func: The function to cache. + """ + super().__init__(func) + self.lock = contextlib.nullcontext() + + +class CachedVarOperation: + """Base class for cached var operations to lower boilerplate code.""" + + def __post_init__(self): + """Post-initialize the CachedVarOperation.""" + object.__delattr__(self, "_var_name") + + def __getattr__(self, name: str) -> Any: + """Get an attribute of the var. + + Args: + name: The name of the attribute. + + Returns: + The attribute. + """ + if name == "_var_name": + return self._cached_var_name + + parent_classes = inspect.getmro(self.__class__) + + return parent_classes[parent_classes.index(CachedVarOperation) + 1].__getattr__( # type: ignore + self, name + ) + + def _get_all_var_data(self) -> ImmutableVarData | None: + """Get all VarData associated with the Var. + + Returns: + The VarData of the components and all of its children. + """ + return self._cached_get_all_var_data + + @cached_property_no_lock + def _cached_get_all_var_data(self) -> ImmutableVarData | None: + """Get the cached VarData. + + Returns: + The cached VarData. + """ + return ImmutableVarData.merge( + *map( + lambda value: ( + value._get_all_var_data() if isinstance(value, Var) else None + ), + map( + lambda field: getattr(self, field.name), + dataclasses.fields(self), # type: ignore + ), + ), + self._var_data, + ) + + def __hash__(self) -> int: + """Calculate the hash of the object. + + Returns: + The hash of the object. + """ + return hash( + ( + self.__class__.__name__, + *[ + getattr(self, field.name) + for field in dataclasses.fields(self) # type: ignore + if field.name not in ["_var_name", "_var_data", "_var_type"] + ], + ) + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class AndOperation(CachedVarOperation, ImmutableVar): + """Class for the logical AND operation.""" + + # The first var. + _var1: Var = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) + + # The second var. + _var2: Var = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """Get the cached var name. + + Returns: + The cached var name. + """ + return f"({str(self._var1)} && {str(self._var2)})" + + def __hash__(self) -> int: + """Calculates the hash value of the object. + + Returns: + int: The hash value of the object. + """ + return hash((self.__class__.__name__, self._var1, self._var2)) + + @classmethod + def create( + cls, var1: Var | Any, var2: Var | Any, _var_data: VarData | None = None + ) -> AndOperation: + """Create an AndOperation. + + Args: + var1: The first var. + var2: The second var. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The AndOperation. + """ + var1, var2 = map(LiteralVar.create, (var1, var2)) + return AndOperation( + _var_name="", + _var_type=unionize(var1._var_type, var2._var_type), + _var_data=ImmutableVarData.merge(_var_data), + _var1=var1, + _var2=var2, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class OrOperation(CachedVarOperation, ImmutableVar): + """Class for the logical OR operation.""" + + # The first var. + _var1: Var = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) + + # The second var. + _var2: Var = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """Get the cached var name. + + Returns: + The cached var name. + """ + return f"({str(self._var1)} || {str(self._var2)})" + + def __hash__(self) -> int: + """Calculates the hash value for the object. + + Returns: + int: The hash value of the object. + """ + return hash((self.__class__.__name__, self._var1, self._var2)) + + @classmethod + def create( + cls, var1: Var | Any, var2: Var | Any, _var_data: VarData | None = None + ) -> OrOperation: + """Create an OrOperation. + + Args: + var1: The first var. + var2: The second var. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The OrOperation. + """ + var1, var2 = map(LiteralVar.create, (var1, var2)) + return OrOperation( + _var_name="", + _var_type=unionize(var1._var_type, var2._var_type), + _var_data=ImmutableVarData.merge(_var_data), + _var1=var1, + _var2=var2, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ImmutableCallableVar(ImmutableVar): + """Decorate a Var-returning function to act as both a Var and a function. + + This is used as a compatibility shim for replacing Var objects in the + API with functions that return a family of Var. + """ + + fn: Callable[..., Var] = dataclasses.field( + default_factory=lambda: lambda: ImmutableVar(_var_name="undefined") + ) + original_var: Var = dataclasses.field( + default_factory=lambda: ImmutableVar(_var_name="undefined") + ) + + def __init__(self, fn: Callable[..., Var]): + """Initialize a CallableVar. + + Args: + fn: The function to decorate (must return Var) + """ + original_var = fn() + super(ImmutableCallableVar, self).__init__( + _var_name=original_var._var_name, + _var_type=original_var._var_type, + _var_data=ImmutableVarData.merge(original_var._get_all_var_data()), + ) + object.__setattr__(self, "fn", fn) + object.__setattr__(self, "original_var", original_var) + + def __call__(self, *args, **kwargs) -> Var: + """Call the decorated function. + + Args: + *args: The args to pass to the function. + **kwargs: The kwargs to pass to the function. + + Returns: + The Var returned from calling the function. + """ + return self.fn(*args, **kwargs) + + def __hash__(self) -> int: + """Calculate the hash of the object. + + Returns: + The hash of the object. + """ + return hash((self.__class__.__name__, self.original_var)) + + +RETURN_TYPE = TypeVar("RETURN_TYPE") + +DICT_KEY = TypeVar("DICT_KEY") +DICT_VAL = TypeVar("DICT_VAL") + +LIST_INSIDE = TypeVar("LIST_INSIDE") + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ImmutableComputedVar(ImmutableVar[RETURN_TYPE]): + """A field with computed getters.""" + + # Whether to track dependencies and cache computed values + _cache: bool = dataclasses.field(default=False) + + # Whether the computed var is a backend var + _backend: bool = dataclasses.field(default=False) + + # The initial value of the computed var + _initial_value: RETURN_TYPE | types.Unset = dataclasses.field(default=types.Unset()) + + # Explicit var dependencies to track + _static_deps: set[str] = dataclasses.field(default_factory=set) + + # Whether var dependencies should be auto-determined + _auto_deps: bool = dataclasses.field(default=True) + + # Interval at which the computed var should be updated + _update_interval: Optional[datetime.timedelta] = dataclasses.field(default=None) + + _fget: Callable[[BaseState], RETURN_TYPE] = dataclasses.field( + default_factory=lambda: lambda _: None + ) # type: ignore + + def __init__( + self, + fget: Callable[[BASE_STATE], RETURN_TYPE], + initial_value: RETURN_TYPE | types.Unset = types.Unset(), + cache: bool = False, + deps: Optional[List[Union[str, Var]]] = None, + auto_deps: bool = True, + interval: Optional[Union[int, datetime.timedelta]] = None, + backend: bool | None = None, + **kwargs, + ): + """Initialize a ComputedVar. + + Args: + fget: The getter function. + initial_value: The initial value of the computed var. + cache: Whether to cache the computed value. + deps: Explicit var dependencies to track. + auto_deps: Whether var dependencies should be auto-determined. + interval: Interval at which the computed var should be updated. + backend: Whether the computed var is a backend var. + **kwargs: additional attributes to set on the instance + + Raises: + TypeError: If the computed var dependencies are not Var instances or var names. + """ + hints = get_type_hints(fget) + hint = hints.get("return", Any) + + kwargs["_var_name"] = kwargs.pop("_var_name", fget.__name__) + kwargs["_var_type"] = kwargs.pop("_var_type", hint) + + super(ImmutableComputedVar, self).__init__( + _var_name=kwargs.pop("_var_name"), + _var_type=kwargs.pop("_var_type"), + _var_data=ImmutableVarData.merge(kwargs.pop("_var_data", None)), + ) + + if backend is None: + backend = fget.__name__.startswith("_") + + object.__setattr__(self, "_backend", backend) + object.__setattr__(self, "_initial_value", initial_value) + object.__setattr__(self, "_cache", cache) + + if isinstance(interval, int): + interval = datetime.timedelta(seconds=interval) + + object.__setattr__(self, "_update_interval", interval) + + if deps is None: + deps = [] + else: + for dep in deps: + if isinstance(dep, Var): + continue + if isinstance(dep, str) and dep != "": + continue + raise TypeError( + "ComputedVar dependencies must be Var instances or var names (non-empty strings)." + ) + object.__setattr__( + self, + "_static_deps", + {dep._var_name if isinstance(dep, Var) else dep for dep in deps}, + ) + object.__setattr__(self, "_auto_deps", auto_deps) + + object.__setattr__(self, "_fget", fget) + + @override + def _replace(self, merge_var_data=None, **kwargs: Any) -> ImmutableComputedVar: + """Replace the attributes of the ComputedVar. + + Args: + merge_var_data: VarData to merge into the existing VarData. + **kwargs: Var fields to update. + + Returns: + The new ComputedVar instance. + + Raises: + TypeError: If kwargs contains keys that are not allowed. + """ + field_values = dict( + fget=kwargs.pop("fget", self._fget), + initial_value=kwargs.pop("initial_value", self._initial_value), + cache=kwargs.pop("cache", self._cache), + deps=kwargs.pop("deps", self._static_deps), + auto_deps=kwargs.pop("auto_deps", self._auto_deps), + interval=kwargs.pop("interval", self._update_interval), + backend=kwargs.pop("backend", self._backend), + _var_name=kwargs.pop("_var_name", self._var_name), + _var_type=kwargs.pop("_var_type", self._var_type), + _var_data=kwargs.pop( + "_var_data", VarData.merge(self._var_data, merge_var_data) + ), + ) + + if kwargs: + unexpected_kwargs = ", ".join(kwargs.keys()) + raise TypeError(f"Unexpected keyword arguments: {unexpected_kwargs}") + + return ImmutableComputedVar(**field_values) + + @property + def _cache_attr(self) -> str: + """Get the attribute used to cache the value on the instance. + + Returns: + An attribute name. + """ + return f"__cached_{self._var_name}" + + @property + def _last_updated_attr(self) -> str: + """Get the attribute used to store the last updated timestamp. + + Returns: + An attribute name. + """ + return f"__last_updated_{self._var_name}" + + def needs_update(self, instance: BaseState) -> bool: + """Check if the computed var needs to be updated. + + Args: + instance: The state instance that the computed var is attached to. + + Returns: + True if the computed var needs to be updated, False otherwise. + """ + if self._update_interval is None: + return False + last_updated = getattr(instance, self._last_updated_attr, None) + if last_updated is None: + return True + return datetime.datetime.now() - last_updated > self._update_interval + + @overload + def __get__( + self: ImmutableComputedVar[int] | ImmutableComputedVar[float], + instance: None, + owner: Type, + ) -> NumberVar: ... + + @overload + def __get__( + self: ImmutableComputedVar[str], + instance: None, + owner: Type, + ) -> StringVar: ... + + @overload + def __get__( + self: ImmutableComputedVar[dict[DICT_KEY, DICT_VAL]], + instance: None, + owner: Type, + ) -> ObjectVar[dict[DICT_KEY, DICT_VAL]]: ... + + @overload + def __get__( + self: ImmutableComputedVar[list[LIST_INSIDE]], + instance: None, + owner: Type, + ) -> ArrayVar[list[LIST_INSIDE]]: ... + + @overload + def __get__( + self: ImmutableComputedVar[set[LIST_INSIDE]], + instance: None, + owner: Type, + ) -> ArrayVar[set[LIST_INSIDE]]: ... + + @overload + def __get__( + self: ImmutableComputedVar[tuple[LIST_INSIDE, ...]], + instance: None, + owner: Type, + ) -> ArrayVar[tuple[LIST_INSIDE, ...]]: ... + + @overload + def __get__( + self, instance: None, owner: Type + ) -> ImmutableComputedVar[RETURN_TYPE]: ... + + @overload + def __get__(self, instance: BaseState, owner: Type) -> RETURN_TYPE: ... + + def __get__(self, instance: BaseState | None, owner): + """Get the ComputedVar value. + + If the value is already cached on the instance, return the cached value. + + Args: + instance: the instance of the class accessing this computed var. + owner: the class that this descriptor is attached to. + + Returns: + The value of the var for the given instance. + """ + if instance is None: + from reflex.state import BaseState + + path_to_function = self.fget.__qualname__.split(".") + class_name_where_defined = ( + path_to_function[-2] if len(path_to_function) > 1 else owner.__name__ + ) + + def contains_class_name(states: Sequence[Type]) -> bool: + return any(c.__name__ == class_name_where_defined for c in states) + + def is_not_mixin(state: Type[BaseState]) -> bool: + return not state._mixin + + def length_of_state(state: Type[BaseState]) -> int: + return len(inspect.getmro(state)) + + class_where_defined = cast( + Type[BaseState], + min( + filter( + lambda state: state.__module__ == self.fget.__module__, + filter( + is_not_mixin, + filter( + lambda state: contains_class_name( + inspect.getmro(state) + ), + inspect.getmro(owner), + ), + ), + ), + default=owner, + key=length_of_state, + ), + ) + + return self._replace( + _var_name=format_state_name(class_where_defined.get_full_name()) + + "." + + self._var_name, + merge_var_data=ImmutableVarData.from_state(class_where_defined), + ).guess_type() + + if not self._cache: + return self.fget(instance) + + # handle caching + if not hasattr(instance, self._cache_attr) or self.needs_update(instance): + # Set cache attr on state instance. + setattr(instance, self._cache_attr, self.fget(instance)) + # Ensure the computed var gets serialized to redis. + instance._was_touched = True + # Set the last updated timestamp on the state instance. + setattr(instance, self._last_updated_attr, datetime.datetime.now()) + return getattr(instance, self._cache_attr) + + def _deps( + self, + objclass: Type, + obj: FunctionType | CodeType | None = None, + self_name: Optional[str] = None, + ) -> set[str]: + """Determine var dependencies of this ComputedVar. + + Save references to attributes accessed on "self". Recursively called + when the function makes a method call on "self" or define comprehensions + or nested functions that may reference "self". + + Args: + objclass: the class obj this ComputedVar is attached to. + obj: the object to disassemble (defaults to the fget function). + self_name: if specified, look for this name in LOAD_FAST and LOAD_DEREF instructions. + + Returns: + A set of variable names accessed by the given obj. + + Raises: + VarValueError: if the function references the get_state, parent_state, or substates attributes + (cannot track deps in a related state, only implicitly via parent state). + """ + if not self._auto_deps: + return self._static_deps + d = self._static_deps.copy() + if obj is None: + fget = self._fget + if fget is not None: + obj = cast(FunctionType, fget) + else: + return set() + with contextlib.suppress(AttributeError): + # unbox functools.partial + obj = cast(FunctionType, obj.func) # type: ignore + with contextlib.suppress(AttributeError): + # unbox EventHandler + obj = cast(FunctionType, obj.fn) # type: ignore + + if self_name is None and isinstance(obj, FunctionType): + try: + # the first argument to the function is the name of "self" arg + self_name = obj.__code__.co_varnames[0] + except (AttributeError, IndexError): + self_name = None + if self_name is None: + # cannot reference attributes on self if method takes no args + return set() + + invalid_names = ["get_state", "parent_state", "substates", "get_substate"] + self_is_top_of_stack = False + for instruction in dis.get_instructions(obj): + if ( + instruction.opname in ("LOAD_FAST", "LOAD_DEREF") + and instruction.argval == self_name + ): + # bytecode loaded the class instance to the top of stack, next load instruction + # is referencing an attribute on self + self_is_top_of_stack = True + continue + if self_is_top_of_stack and instruction.opname in ( + "LOAD_ATTR", + "LOAD_METHOD", + ): + try: + ref_obj = getattr(objclass, instruction.argval) + except Exception: + ref_obj = None + if instruction.argval in invalid_names: + raise VarValueError( + f"Cached var {self._var_full_name} cannot access arbitrary state via `{instruction.argval}`." + ) + if callable(ref_obj): + # recurse into callable attributes + d.update( + self._deps( + objclass=objclass, + obj=ref_obj, + ) + ) + # recurse into property fget functions + elif isinstance(ref_obj, property) and not isinstance( + ref_obj, ImmutableComputedVar + ): + d.update( + self._deps( + objclass=objclass, + obj=ref_obj.fget, # type: ignore + ) + ) + elif ( + instruction.argval in objclass.backend_vars + or instruction.argval in objclass.vars + ): + # var access + d.add(instruction.argval) + elif instruction.opname == "LOAD_CONST" and isinstance( + instruction.argval, CodeType + ): + # recurse into nested functions / comprehensions, which can reference + # instance attributes from the outer scope + d.update( + self._deps( + objclass=objclass, + obj=instruction.argval, + self_name=self_name, + ) + ) + self_is_top_of_stack = False + return d + + def mark_dirty(self, instance) -> None: + """Mark this ComputedVar as dirty. + + Args: + instance: the state instance that needs to recompute the value. + """ + with contextlib.suppress(AttributeError): + delattr(instance, self._cache_attr) + + def _determine_var_type(self) -> Type: + """Get the type of the var. + + Returns: + The type of the var. + """ + hints = get_type_hints(self._fget) + if "return" in hints: + return hints["return"] + return Any + + @property + def __class__(self) -> Type: + """Get the class of the var. + + Returns: + The class of the var. + """ + return ComputedVar + + @property + def fget(self) -> Callable[[BaseState], RETURN_TYPE]: + """Get the getter function. + + Returns: + The getter function. + """ + return self._fget + + +if TYPE_CHECKING: + BASE_STATE = TypeVar("BASE_STATE", bound=BaseState) + + +@overload +def immutable_computed_var( + fget: None = None, + initial_value: Any | types.Unset = types.Unset(), + cache: bool = False, + deps: Optional[List[Union[str, Var]]] = None, + auto_deps: bool = True, + interval: Optional[Union[datetime.timedelta, int]] = None, + backend: bool | None = None, + **kwargs, +) -> Callable[ + [Callable[[BASE_STATE], RETURN_TYPE]], ImmutableComputedVar[RETURN_TYPE] +]: ... + + +@overload +def immutable_computed_var( + fget: Callable[[BASE_STATE], RETURN_TYPE], + initial_value: RETURN_TYPE | types.Unset = types.Unset(), + cache: bool = False, + deps: Optional[List[Union[str, Var]]] = None, + auto_deps: bool = True, + interval: Optional[Union[datetime.timedelta, int]] = None, + backend: bool | None = None, + **kwargs, +) -> ImmutableComputedVar[RETURN_TYPE]: ... + + +def immutable_computed_var( + fget: Callable[[BASE_STATE], Any] | None = None, + initial_value: Any | types.Unset = types.Unset(), + cache: bool = False, + deps: Optional[List[Union[str, Var]]] = None, + auto_deps: bool = True, + interval: Optional[Union[datetime.timedelta, int]] = None, + backend: bool | None = None, + **kwargs, +) -> ( + ImmutableComputedVar | Callable[[Callable[[BASE_STATE], Any]], ImmutableComputedVar] +): + """A ComputedVar decorator with or without kwargs. + + Args: + fget: The getter function. + initial_value: The initial value of the computed var. + cache: Whether to cache the computed value. + deps: Explicit var dependencies to track. + auto_deps: Whether var dependencies should be auto-determined. + interval: Interval at which the computed var should be updated. + backend: Whether the computed var is a backend var. + **kwargs: additional attributes to set on the instance + + Returns: + A ComputedVar instance. + + Raises: + ValueError: If caching is disabled and an update interval is set. + VarDependencyError: If user supplies dependencies without caching. + """ + if cache is False and interval is not None: + raise ValueError("Cannot set update interval without caching.") + + if cache is False and (deps is not None or auto_deps is False): + raise VarDependencyError("Cannot track dependencies without caching.") + + if fget is not None: + return ImmutableComputedVar(fget, cache=cache) + + def wrapper(fget: Callable[[BASE_STATE], Any]) -> ImmutableComputedVar: + return ImmutableComputedVar( + fget, + initial_value=initial_value, + cache=cache, + deps=deps, + auto_deps=auto_deps, + interval=interval, + backend=backend, + **kwargs, + ) + + return wrapper diff --git a/reflex/ivars/function.py b/reflex/ivars/function.py new file mode 100644 index 0000000000..1a987b1cfd --- /dev/null +++ b/reflex/ivars/function.py @@ -0,0 +1,223 @@ +"""Immutable function vars.""" + +from __future__ import annotations + +import dataclasses +import sys +from typing import Any, Callable, Optional, Tuple, Type, Union + +from reflex.utils.types import GenericType +from reflex.vars import ImmutableVarData, Var, VarData + +from .base import CachedVarOperation, ImmutableVar, LiteralVar, cached_property_no_lock + + +class FunctionVar(ImmutableVar[Callable]): + """Base class for immutable function vars.""" + + def __call__(self, *args: Var | Any) -> ArgsFunctionOperation: + """Call the function with the given arguments. + + Args: + *args: The arguments to call the function with. + + Returns: + The function call operation. + """ + return ArgsFunctionOperation.create( + ("...args",), + VarOperationCall.create(self, *args, ImmutableVar.create_safe("...args")), + ) + + def call(self, *args: Var | Any) -> VarOperationCall: + """Call the function with the given arguments. + + Args: + *args: The arguments to call the function with. + + Returns: + The function call operation. + """ + return VarOperationCall.create(self, *args) + + +class FunctionStringVar(FunctionVar): + """Base class for immutable function vars from a string.""" + + @classmethod + def create( + cls, + func: str, + _var_type: Type[Callable] = Callable, + _var_data: VarData | None = None, + ) -> FunctionStringVar: + """Create a new function var from a string. + + Args: + func: The function to call. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The function var. + """ + return cls( + _var_name=func, + _var_type=_var_type, + _var_data=ImmutableVarData.merge(_var_data), + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class VarOperationCall(CachedVarOperation, ImmutableVar): + """Base class for immutable vars that are the result of a function call.""" + + _func: Optional[FunctionVar] = dataclasses.field(default=None) + _args: Tuple[Union[Var, Any], ...] = dataclasses.field(default_factory=tuple) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._func)}({', '.join([str(LiteralVar.create(arg)) for arg in self._args])}))" + + @cached_property_no_lock + def _cached_get_all_var_data(self) -> ImmutableVarData | None: + """Get all the var data associated with the var. + + Returns: + All the var data associated with the var. + """ + return ImmutableVarData.merge( + self._func._get_all_var_data() if self._func is not None else None, + *[LiteralVar.create(arg)._get_all_var_data() for arg in self._args], + self._var_data, + ) + + @classmethod + def create( + cls, + func: FunctionVar, + *args: Var | Any, + _var_type: GenericType = Any, + _var_data: VarData | None = None, + ) -> VarOperationCall: + """Create a new function call var. + + Args: + func: The function to call. + *args: The arguments to call the function with. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The function call var. + """ + return cls( + _var_name="", + _var_type=_var_type, + _var_data=ImmutableVarData.merge(_var_data), + _func=func, + _args=args, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ArgsFunctionOperation(CachedVarOperation, FunctionVar): + """Base class for immutable function defined via arguments and return expression.""" + + _args_names: Tuple[str, ...] = dataclasses.field(default_factory=tuple) + _return_expr: Union[Var, Any] = dataclasses.field(default=None) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"(({', '.join(self._args_names)}) => ({str(LiteralVar.create(self._return_expr))}))" + + @classmethod + def create( + cls, + args_names: Tuple[str, ...], + return_expr: Var | Any, + _var_type: GenericType = Callable, + _var_data: VarData | None = None, + ) -> ArgsFunctionOperation: + """Create a new function var. + + Args: + args_names: The names of the arguments. + return_expr: The return expression of the function. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The function var. + """ + return cls( + _var_name="", + _var_type=_var_type, + _var_data=ImmutableVarData.merge(_var_data), + _args_names=args_names, + _return_expr=return_expr, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ToFunctionOperation(CachedVarOperation, FunctionVar): + """Base class of converting a var to a function.""" + + _original_var: Var = dataclasses.field( + default_factory=lambda: LiteralVar.create(None) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return str(self._original_var) + + @classmethod + def create( + cls, + original_var: Var, + _var_type: GenericType = Callable, + _var_data: VarData | None = None, + ) -> ToFunctionOperation: + """Create a new function var. + + Args: + original_var: The original var to convert to a function. + _var_type: The type of the function. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The function var. + """ + return cls( + _var_name="", + _var_type=_var_type, + _var_data=ImmutableVarData.merge(_var_data), + _original_var=original_var, + ) + + +JSON_STRINGIFY = FunctionStringVar.create("JSON.stringify") diff --git a/reflex/ivars/number.py b/reflex/ivars/number.py new file mode 100644 index 0000000000..241a1b5953 --- /dev/null +++ b/reflex/ivars/number.py @@ -0,0 +1,1203 @@ +"""Immutable number vars.""" + +from __future__ import annotations + +import dataclasses +import json +import sys +from typing import Any, Union + +from reflex.vars import ImmutableVarData, Var, VarData + +from .base import ( + CachedVarOperation, + ImmutableVar, + LiteralVar, + cached_property_no_lock, + unionize, +) + + +class NumberVar(ImmutableVar[Union[int, float]]): + """Base class for immutable number vars.""" + + def __add__(self, other: number_types | boolean_types) -> NumberAddOperation: + """Add two numbers. + + Args: + other: The other number. + + Returns: + The number addition operation. + """ + return NumberAddOperation.create(self, +other) + + def __radd__(self, other: number_types | boolean_types) -> NumberAddOperation: + """Add two numbers. + + Args: + other: The other number. + + Returns: + The number addition operation. + """ + return NumberAddOperation.create(+other, self) + + def __sub__(self, other: number_types | boolean_types) -> NumberSubtractOperation: + """Subtract two numbers. + + Args: + other: The other number. + + Returns: + The number subtraction operation. + """ + return NumberSubtractOperation.create(self, +other) + + def __rsub__(self, other: number_types | boolean_types) -> NumberSubtractOperation: + """Subtract two numbers. + + Args: + other: The other number. + + Returns: + The number subtraction operation. + """ + return NumberSubtractOperation.create(+other, self) + + def __abs__(self) -> NumberAbsoluteOperation: + """Get the absolute value of the number. + + Returns: + The number absolute operation. + """ + return NumberAbsoluteOperation.create(self) + + def __mul__(self, other: number_types | boolean_types) -> NumberMultiplyOperation: + """Multiply two numbers. + + Args: + other: The other number. + + Returns: + The number multiplication operation. + """ + return NumberMultiplyOperation.create(self, +other) + + def __rmul__(self, other: number_types | boolean_types) -> NumberMultiplyOperation: + """Multiply two numbers. + + Args: + other: The other number. + + Returns: + The number multiplication operation. + """ + return NumberMultiplyOperation.create(+other, self) + + def __truediv__(self, other: number_types | boolean_types) -> NumberTrueDivision: + """Divide two numbers. + + Args: + other: The other number. + + Returns: + The number true division operation. + """ + return NumberTrueDivision.create(self, +other) + + def __rtruediv__(self, other: number_types | boolean_types) -> NumberTrueDivision: + """Divide two numbers. + + Args: + other: The other number. + + Returns: + The number true division operation. + """ + return NumberTrueDivision.create(+other, self) + + def __floordiv__(self, other: number_types | boolean_types) -> NumberFloorDivision: + """Floor divide two numbers. + + Args: + other: The other number. + + Returns: + The number floor division operation. + """ + return NumberFloorDivision.create(self, +other) + + def __rfloordiv__(self, other: number_types | boolean_types) -> NumberFloorDivision: + """Floor divide two numbers. + + Args: + other: The other number. + + Returns: + The number floor division operation. + """ + return NumberFloorDivision.create(+other, self) + + def __mod__(self, other: number_types | boolean_types) -> NumberModuloOperation: + """Modulo two numbers. + + Args: + other: The other number. + + Returns: + The number modulo operation. + """ + return NumberModuloOperation.create(self, +other) + + def __rmod__(self, other: number_types | boolean_types) -> NumberModuloOperation: + """Modulo two numbers. + + Args: + other: The other number. + + Returns: + The number modulo operation. + """ + return NumberModuloOperation.create(+other, self) + + def __pow__(self, other: number_types | boolean_types) -> NumberExponentOperation: + """Exponentiate two numbers. + + Args: + other: The other number. + + Returns: + The number exponent operation. + """ + return NumberExponentOperation.create(self, +other) + + def __rpow__(self, other: number_types | boolean_types) -> NumberExponentOperation: + """Exponentiate two numbers. + + Args: + other: The other number. + + Returns: + The number exponent operation. + """ + return NumberExponentOperation.create(+other, self) + + def __neg__(self) -> NumberNegateOperation: + """Negate the number. + + Returns: + The number negation operation. + """ + return NumberNegateOperation.create(self) + + def __invert__(self) -> BooleanNotOperation: + """Boolean NOT the number. + + Returns: + The boolean NOT operation. + """ + return BooleanNotOperation.create(self.bool()) + + def __pos__(self) -> NumberVar: + """Positive the number. + + Returns: + The number. + """ + return self + + def __round__(self) -> NumberRoundOperation: + """Round the number. + + Returns: + The number round operation. + """ + return NumberRoundOperation.create(self) + + def __ceil__(self) -> NumberCeilOperation: + """Ceil the number. + + Returns: + The number ceil operation. + """ + return NumberCeilOperation.create(self) + + def __floor__(self) -> NumberFloorOperation: + """Floor the number. + + Returns: + The number floor operation. + """ + return NumberFloorOperation.create(self) + + def __trunc__(self) -> NumberTruncOperation: + """Trunc the number. + + Returns: + The number trunc operation. + """ + return NumberTruncOperation.create(self) + + def __lt__(self, other: Any) -> LessThanOperation: + """Less than comparison. + + Args: + other: The other number. + + Returns: + The result of the comparison. + """ + if isinstance(other, (NumberVar, BooleanVar, int, float, bool)): + return LessThanOperation.create(self, +other) + return LessThanOperation.create(self, other) + + def __le__(self, other: Any) -> LessThanOrEqualOperation: + """Less than or equal comparison. + + Args: + other: The other number. + + Returns: + The result of the comparison. + """ + if isinstance(other, (NumberVar, BooleanVar, int, float, bool)): + return LessThanOrEqualOperation.create(self, +other) + return LessThanOrEqualOperation.create(self, other) + + def __eq__(self, other: Any) -> EqualOperation: + """Equal comparison. + + Args: + other: The other number. + + Returns: + The result of the comparison. + """ + if isinstance(other, (NumberVar, BooleanVar, int, float, bool)): + return EqualOperation.create(self, +other) + return EqualOperation.create(self, other) + + def __ne__(self, other: Any) -> NotEqualOperation: + """Not equal comparison. + + Args: + other: The other number. + + Returns: + The result of the comparison. + """ + if isinstance(other, (NumberVar, BooleanVar, int, float, bool)): + return NotEqualOperation.create(self, +other) + return NotEqualOperation.create(self, other) + + def __gt__(self, other: Any) -> GreaterThanOperation: + """Greater than comparison. + + Args: + other: The other number. + + Returns: + The result of the comparison. + """ + if isinstance(other, (NumberVar, BooleanVar, int, float, bool)): + return GreaterThanOperation.create(self, +other) + return GreaterThanOperation.create(self, other) + + def __ge__(self, other: Any) -> GreaterThanOrEqualOperation: + """Greater than or equal comparison. + + Args: + other: The other number. + + Returns: + The result of the comparison. + """ + if isinstance(other, (NumberVar, BooleanVar, int, float, bool)): + return GreaterThanOrEqualOperation.create(self, +other) + return GreaterThanOrEqualOperation.create(self, other) + + def bool(self) -> NotEqualOperation: + """Boolean conversion. + + Returns: + The boolean value of the number. + """ + return NotEqualOperation.create(self, 0) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class BinaryNumberOperation(CachedVarOperation, NumberVar): + """Base class for immutable number vars that are the result of a binary operation.""" + + _lhs: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) + _rhs: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Raises: + NotImplementedError: Must be implemented by subclasses + """ + raise NotImplementedError( + "BinaryNumberOperation must implement _cached_var_name" + ) + + @classmethod + def create( + cls, lhs: number_types, rhs: number_types, _var_data: VarData | None = None + ): + """Create the binary number operation var. + + Args: + lhs: The first number. + rhs: The second number. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The binary number operation var. + """ + _lhs, _rhs = map( + lambda v: LiteralNumberVar.create(v) if not isinstance(v, NumberVar) else v, + (lhs, rhs), + ) + return cls( + _var_name="", + _var_type=unionize(_lhs._var_type, _rhs._var_type), + _var_data=ImmutableVarData.merge(_var_data), + _lhs=_lhs, + _rhs=_rhs, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class UnaryNumberOperation(CachedVarOperation, NumberVar): + """Base class for immutable number vars that are the result of a unary operation.""" + + _value: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Raises: + NotImplementedError: Must be implemented by subclasses. + """ + raise NotImplementedError( + "UnaryNumberOperation must implement _cached_var_name" + ) + + @classmethod + def create(cls, value: NumberVar, _var_data: VarData | None = None): + """Create the unary number operation var. + + Args: + value: The number. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The unary number operation var. + """ + return cls( + _var_name="", + _var_type=value._var_type, + _var_data=ImmutableVarData.merge(_var_data), + _value=value, + ) + + +class NumberAddOperation(BinaryNumberOperation): + """Base class for immutable number vars that are the result of an addition operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} + {str(self._rhs)})" + + +class NumberSubtractOperation(BinaryNumberOperation): + """Base class for immutable number vars that are the result of a subtraction operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} - {str(self._rhs)})" + + +class NumberAbsoluteOperation(UnaryNumberOperation): + """Base class for immutable number vars that are the result of an absolute operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"Math.abs({str(self._value)})" + + +class NumberMultiplyOperation(BinaryNumberOperation): + """Base class for immutable number vars that are the result of a multiplication operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} * {str(self._rhs)})" + + +class NumberNegateOperation(UnaryNumberOperation): + """Base class for immutable number vars that are the result of a negation operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"-({str(self._value)})" + + +class NumberTrueDivision(BinaryNumberOperation): + """Base class for immutable number vars that are the result of a true division operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} / {str(self._rhs)})" + + +class NumberFloorDivision(BinaryNumberOperation): + """Base class for immutable number vars that are the result of a floor division operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"Math.floor({str(self._lhs)} / {str(self._rhs)})" + + +class NumberModuloOperation(BinaryNumberOperation): + """Base class for immutable number vars that are the result of a modulo operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} % {str(self._rhs)})" + + +class NumberExponentOperation(BinaryNumberOperation): + """Base class for immutable number vars that are the result of an exponent operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} ** {str(self._rhs)})" + + +class NumberRoundOperation(UnaryNumberOperation): + """Base class for immutable number vars that are the result of a round operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"Math.round({str(self._value)})" + + +class NumberCeilOperation(UnaryNumberOperation): + """Base class for immutable number vars that are the result of a ceil operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"Math.ceil({str(self._value)})" + + +class NumberFloorOperation(UnaryNumberOperation): + """Base class for immutable number vars that are the result of a floor operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"Math.floor({str(self._value)})" + + +class NumberTruncOperation(UnaryNumberOperation): + """Base class for immutable number vars that are the result of a trunc operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"Math.trunc({str(self._value)})" + + +class BooleanVar(ImmutableVar[bool]): + """Base class for immutable boolean vars.""" + + def __invert__(self) -> BooleanNotOperation: + """NOT the boolean. + + Returns: + The boolean NOT operation. + """ + return BooleanNotOperation.create(self) + + def __int__(self) -> BooleanToIntOperation: + """Convert the boolean to an int. + + Returns: + The boolean to int operation. + """ + return BooleanToIntOperation.create(self) + + def __pos__(self) -> BooleanToIntOperation: + """Convert the boolean to an int. + + Returns: + The boolean to int operation. + """ + return BooleanToIntOperation.create(self) + + def bool(self) -> BooleanVar: + """Boolean conversion. + + Returns: + The boolean value of the boolean. + """ + return self + + def __lt__(self, other: boolean_types | number_types) -> LessThanOperation: + """Less than comparison. + + Args: + other: The other boolean. + + Returns: + The result of the comparison. + """ + return LessThanOperation.create(+self, +other) + + def __le__(self, other: boolean_types | number_types) -> LessThanOrEqualOperation: + """Less than or equal comparison. + + Args: + other: The other boolean. + + Returns: + The result of the comparison. + """ + return LessThanOrEqualOperation.create(+self, +other) + + def __eq__(self, other: boolean_types | number_types) -> EqualOperation: + """Equal comparison. + + Args: + other: The other boolean. + + Returns: + The result of the comparison. + """ + return EqualOperation.create(+self, +other) + + def __ne__(self, other: boolean_types | number_types) -> NotEqualOperation: + """Not equal comparison. + + Args: + other: The other boolean. + + Returns: + The result of the comparison. + """ + return NotEqualOperation.create(+self, +other) + + def __gt__(self, other: boolean_types | number_types) -> GreaterThanOperation: + """Greater than comparison. + + Args: + other: The other boolean. + + Returns: + The result of the comparison. + """ + return GreaterThanOperation.create(+self, +other) + + def __ge__( + self, other: boolean_types | number_types + ) -> GreaterThanOrEqualOperation: + """Greater than or equal comparison. + + Args: + other: The other boolean. + + Returns: + The result of the comparison. + """ + return GreaterThanOrEqualOperation.create(+self, +other) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class BooleanToIntOperation(CachedVarOperation, NumberVar): + """Base class for immutable number vars that are the result of a boolean to int operation.""" + + _value: BooleanVar = dataclasses.field( + default_factory=lambda: LiteralBooleanVar.create(False) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._value)} ? 1 : 0)" + + @classmethod + def create(cls, value: BooleanVar, _var_data: VarData | None = None): + """Create the boolean to int operation var. + + Args: + value: The boolean. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The boolean to int operation var. + """ + return cls( + _var_name="", + _var_type=int, + _var_data=ImmutableVarData.merge(_var_data), + _value=value, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ComparisonOperation(CachedVarOperation, BooleanVar): + """Base class for immutable boolean vars that are the result of a comparison operation.""" + + _lhs: Var = dataclasses.field( + default_factory=lambda: LiteralBooleanVar.create(False) + ) + _rhs: Var = dataclasses.field( + default_factory=lambda: LiteralBooleanVar.create(False) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Raises: + NotImplementedError: Must be implemented by subclasses. + """ + raise NotImplementedError("ComparisonOperation must implement _cached_var_name") + + @classmethod + def create(cls, lhs: Var | Any, rhs: Var | Any, _var_data: VarData | None = None): + """Create the comparison operation var. + + Args: + lhs: The first value. + rhs: The second value. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The comparison operation var. + """ + lhs, rhs = map(LiteralVar.create, (lhs, rhs)) + return cls( + _var_name="", + _var_type=bool, + _var_data=ImmutableVarData.merge(_var_data), + _lhs=lhs, + _rhs=rhs, + ) + + +class GreaterThanOperation(ComparisonOperation): + """Base class for immutable boolean vars that are the result of a greater than operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} > {str(self._rhs)})" + + +class GreaterThanOrEqualOperation(ComparisonOperation): + """Base class for immutable boolean vars that are the result of a greater than or equal operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} >= {str(self._rhs)})" + + +class LessThanOperation(ComparisonOperation): + """Base class for immutable boolean vars that are the result of a less than operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} < {str(self._rhs)})" + + +class LessThanOrEqualOperation(ComparisonOperation): + """Base class for immutable boolean vars that are the result of a less than or equal operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} <= {str(self._rhs)})" + + +class EqualOperation(ComparisonOperation): + """Base class for immutable boolean vars that are the result of an equal operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} === {str(self._rhs)})" + + +class NotEqualOperation(ComparisonOperation): + """Base class for immutable boolean vars that are the result of a not equal operation.""" + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"({str(self._lhs)} !== {str(self._rhs)})" + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class LogicalOperation(CachedVarOperation, BooleanVar): + """Base class for immutable boolean vars that are the result of a logical operation.""" + + _lhs: BooleanVar = dataclasses.field( + default_factory=lambda: LiteralBooleanVar.create(False) + ) + _rhs: BooleanVar = dataclasses.field( + default_factory=lambda: LiteralBooleanVar.create(False) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Raises: + NotImplementedError: Must be implemented by subclasses. + """ + raise NotImplementedError("LogicalOperation must implement _cached_var_name") + + @classmethod + def create( + cls, lhs: boolean_types, rhs: boolean_types, _var_data: VarData | None = None + ): + """Create the logical operation var. + + Args: + lhs: The first boolean. + rhs: The second boolean. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The logical operation var. + """ + lhs, rhs = map( + lambda v: ( + LiteralBooleanVar.create(v) if not isinstance(v, BooleanVar) else v + ), + (lhs, rhs), + ) + return cls( + _var_name="", + _var_type=bool, + _var_data=ImmutableVarData.merge(_var_data), + _lhs=lhs, + _rhs=rhs, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class BooleanNotOperation(CachedVarOperation, BooleanVar): + """Base class for immutable boolean vars that are the result of a logical NOT operation.""" + + _value: BooleanVar = dataclasses.field( + default_factory=lambda: LiteralBooleanVar.create(False) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"!({str(self._value)})" + + @classmethod + def create(cls, value: boolean_types, _var_data: VarData | None = None): + """Create the logical NOT operation var. + + Args: + value: The value. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The logical NOT operation var. + """ + value = value if isinstance(value, Var) else LiteralBooleanVar.create(value) + return cls( + _var_name="", + _var_type=bool, + _var_data=ImmutableVarData.merge(_var_data), + _value=value, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class LiteralBooleanVar(LiteralVar, BooleanVar): + """Base class for immutable literal boolean vars.""" + + _var_value: bool = dataclasses.field(default=False) + + def json(self) -> str: + """Get the JSON representation of the var. + + Returns: + The JSON representation of the var. + """ + return "true" if self._var_value else "false" + + def __hash__(self) -> int: + """Calculate the hash value of the object. + + Returns: + int: The hash value of the object. + """ + return hash((self.__class__.__name__, self._var_value)) + + @classmethod + def create(cls, value: bool, _var_data: VarData | None = None): + """Create the boolean var. + + Args: + value: The value of the var. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The boolean var. + """ + return cls( + _var_name="true" if value else "false", + _var_type=bool, + _var_data=ImmutableVarData.merge(_var_data), + _var_value=value, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class LiteralNumberVar(LiteralVar, NumberVar): + """Base class for immutable literal number vars.""" + + _var_value: float | int = dataclasses.field(default=0) + + def json(self) -> str: + """Get the JSON representation of the var. + + Returns: + The JSON representation of the var. + """ + return json.dumps(self._var_value) + + def __hash__(self) -> int: + """Calculate the hash value of the object. + + Returns: + int: The hash value of the object. + """ + return hash((self.__class__.__name__, self._var_value)) + + @classmethod + def create(cls, value: float | int, _var_data: VarData | None = None): + """Create the number var. + + Args: + value: The value of the var. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The number var. + """ + return cls( + _var_name=str(value), + _var_type=type(value), + _var_data=ImmutableVarData.merge(_var_data), + _var_value=value, + ) + + +number_types = Union[NumberVar, int, float] +boolean_types = Union[BooleanVar, bool] + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ToNumberVarOperation(CachedVarOperation, NumberVar): + """Base class for immutable number vars that are the result of a number operation.""" + + _original_value: Var = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return str(self._original_value) + + @classmethod + def create( + cls, + value: Var, + _var_type: type[int] | type[float] = float, + _var_data: VarData | None = None, + ): + """Create the number var. + + Args: + value: The value of the var. + _var_type: The type of the Var. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The number var. + """ + return cls( + _var_name="", + _var_type=_var_type, + _var_data=ImmutableVarData.merge(_var_data), + _original_value=value, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ToBooleanVarOperation(CachedVarOperation, BooleanVar): + """Base class for immutable boolean vars that are the result of a boolean operation.""" + + _original_value: Var = dataclasses.field( + default_factory=lambda: LiteralBooleanVar.create(False) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"Boolean({str(self._original_value)})" + + @classmethod + def create( + cls, + value: Var, + _var_data: VarData | None = None, + ): + """Create the boolean var. + + Args: + value: The value of the var. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The boolean var. + """ + return cls( + _var_name="", + _var_type=bool, + _var_data=ImmutableVarData.merge(_var_data), + _original_value=value, + ) + + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class TernaryOperator(CachedVarOperation, ImmutableVar): + """Base class for immutable vars that are the result of a ternary operation.""" + + _condition: BooleanVar = dataclasses.field( + default_factory=lambda: LiteralBooleanVar.create(False) + ) + _if_true: Var = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) + _if_false: Var = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) + + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return ( + f"({str(self._condition)} ? {str(self._if_true)} : {str(self._if_false)})" + ) + + @classmethod + def create( + cls, + condition: boolean_types, + if_true: Var | Any, + if_false: Var | Any, + _var_data: VarData | None = None, + ): + """Create the ternary operation var. + + Args: + condition: The condition. + if_true: The value if the condition is true. + if_false: The value if the condition is false. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The ternary operation var. + """ + condition = ( + condition + if isinstance(condition, Var) + else LiteralBooleanVar.create(condition) + ) + _if_true, _if_false = map( + lambda v: (LiteralVar.create(v) if not isinstance(v, Var) else v), + (if_true, if_false), + ) + return TernaryOperator( + _var_name="", + _var_type=unionize(_if_true._var_type, _if_false._var_type), + _var_data=ImmutableVarData.merge(_var_data), + _condition=condition, + _if_true=_if_true, + _if_false=_if_false, + ) diff --git a/reflex/experimental/vars/object.py b/reflex/ivars/object.py similarity index 55% rename from reflex/experimental/vars/object.py rename to reflex/ivars/object.py index a227f0d7cb..4586ffa0a6 100644 --- a/reflex/experimental/vars/object.py +++ b/reflex/ivars/object.py @@ -5,7 +5,6 @@ import dataclasses import sys import typing -from functools import cached_property from inspect import isclass from typing import ( Any, @@ -22,18 +21,22 @@ from typing_extensions import get_origin -from reflex.experimental.vars.base import ( +from reflex.utils import types +from reflex.utils.exceptions import VarAttributeError +from reflex.utils.types import GenericType, get_attribute_access_type +from reflex.vars import ImmutableVarData, Var, VarData + +from .base import ( + CachedVarOperation, ImmutableVar, LiteralVar, + cached_property_no_lock, figure_out_type, ) -from reflex.experimental.vars.number import NumberVar -from reflex.experimental.vars.sequence import ArrayVar, StringVar -from reflex.utils.exceptions import VarAttributeError -from reflex.utils.types import GenericType, get_attribute_access_type -from reflex.vars import ImmutableVarData, Var, VarData +from .number import BooleanVar, NumberVar +from .sequence import ArrayVar, StringVar -OBJECT_TYPE = TypeVar("OBJECT_TYPE") +OBJECT_TYPE = TypeVar("OBJECT_TYPE", bound=Dict) KEY_TYPE = TypeVar("KEY_TYPE") VALUE_TYPE = TypeVar("VALUE_TYPE") @@ -46,23 +49,13 @@ class ObjectVar(ImmutableVar[OBJECT_TYPE]): """Base class for immutable object vars.""" - @overload - def _key_type(self: ObjectVar[Dict[KEY_TYPE, VALUE_TYPE]]) -> KEY_TYPE: ... - - @overload - def _key_type(self) -> Type: ... - def _key_type(self) -> Type: """Get the type of the keys of the object. Returns: The type of the keys of the object. """ - fixed_type = ( - self._var_type if isclass(self._var_type) else get_origin(self._var_type) - ) - args = get_args(self._var_type) if issubclass(fixed_type, dict) else () - return args[0] if args else Any + return str @overload def _value_type(self: ObjectVar[Dict[KEY_TYPE, VALUE_TYPE]]) -> VALUE_TYPE: ... @@ -76,27 +69,19 @@ def _value_type(self) -> Type: Returns: The type of the values of the object. """ - fixed_type = ( - self._var_type if isclass(self._var_type) else get_origin(self._var_type) - ) + fixed_type = get_origin(self._var_type) or self._var_type + if not isclass(fixed_type): + return Any args = get_args(self._var_type) if issubclass(fixed_type, dict) else () return args[1] if args else Any - @overload - def keys( - self: ObjectVar[Dict[KEY_TYPE, VALUE_TYPE]], - ) -> ArrayVar[List[KEY_TYPE]]: ... - - @overload - def keys(self) -> ArrayVar: ... - - def keys(self) -> ArrayVar: + def keys(self) -> ArrayVar[List[str]]: """Get the keys of the object. Returns: The keys of the object. """ - return ObjectKeysOperation(self) + return ObjectKeysOperation.create(self) @overload def values( @@ -112,12 +97,12 @@ def values(self) -> ArrayVar: Returns: The values of the object. """ - return ObjectValuesOperation(self) + return ObjectValuesOperation.create(self) @overload def entries( self: ObjectVar[Dict[KEY_TYPE, VALUE_TYPE]], - ) -> ArrayVar[List[Tuple[KEY_TYPE, VALUE_TYPE]]]: ... + ) -> ArrayVar[List[Tuple[str, VALUE_TYPE]]]: ... @overload def entries(self) -> ArrayVar: ... @@ -128,7 +113,7 @@ def entries(self) -> ArrayVar: Returns: The entries of the object. """ - return ObjectEntriesOperation(self) + return ObjectEntriesOperation.create(self) def merge(self, other: ObjectVar) -> ObjectMergeOperation: """Merge two objects. @@ -139,7 +124,7 @@ def merge(self, other: ObjectVar) -> ObjectMergeOperation: Returns: The merged object. """ - return ObjectMergeOperation(self, other) + return ObjectMergeOperation.create(self, other) # NoReturn is used here to catch when key value is Any @overload @@ -197,7 +182,7 @@ def __getitem__(self, key: Var | Any) -> ImmutableVar: Returns: The item from the object. """ - return ObjectItemOperation(self, key).guess_type() + return ObjectItemOperation.create(self, key).guess_type() # NoReturn is used here to catch when key value is Any @overload @@ -258,19 +243,36 @@ def __getattr__(self, name) -> ImmutableVar: Returns: The attribute of the var. """ - fixed_type = ( - self._var_type if isclass(self._var_type) else get_origin(self._var_type) - ) - if not issubclass(fixed_type, dict): - attribute_type = get_attribute_access_type(self._var_type, name) + if name.startswith("__") and name.endswith("__"): + return getattr(super(type(self), self), name) + + var_type = self._var_type + + if types.is_optional(var_type): + var_type = get_args(var_type)[0] + + fixed_type = var_type if isclass(var_type) else get_origin(var_type) + if isclass(fixed_type) and not issubclass(fixed_type, dict): + attribute_type = get_attribute_access_type(var_type, name) if attribute_type is None: raise VarAttributeError( - f"The State var `{self._var_name}` has no attribute '{name}' or may have been annotated " + f"The State var `{str(self)}` has no attribute '{name}' or may have been annotated " f"wrongly." ) - return ObjectItemOperation(self, name, attribute_type).guess_type() + return ObjectItemOperation.create(self, name, attribute_type).guess_type() else: - return ObjectItemOperation(self, name).guess_type() + return ObjectItemOperation.create(self, name).guess_type() + + def contains(self, key: Var | Any) -> BooleanVar: + """Check if the object contains a key. + + Args: + key: The key to check. + + Returns: + The result of the check. + """ + return ObjectHasOwnProperty.create(self, key) @dataclasses.dataclass( @@ -278,38 +280,13 @@ def __getattr__(self, name) -> ImmutableVar: frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class LiteralObjectVar(LiteralVar, ObjectVar[OBJECT_TYPE]): +class LiteralObjectVar(CachedVarOperation, ObjectVar[OBJECT_TYPE], LiteralVar): """Base class for immutable literal object vars.""" _var_value: Dict[Union[Var, Any], Union[Var, Any]] = dataclasses.field( default_factory=dict ) - def __init__( - self: LiteralObjectVar[OBJECT_TYPE], - _var_value: OBJECT_TYPE, - _var_type: Type[OBJECT_TYPE] | None = None, - _var_data: VarData | None = None, - ): - """Initialize the object var. - - Args: - _var_value: The value of the var. - _var_type: The type of the var. - _var_data: Additional hooks and imports associated with the Var. - """ - super(LiteralObjectVar, self).__init__( - _var_name="", - _var_type=(figure_out_type(_var_value) if _var_type is None else _var_type), - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__( - self, - "_var_value", - _var_value, - ) - object.__delattr__(self, "_var_name") - def _key_type(self) -> Type: """Get the type of the keys of the object. @@ -328,20 +305,7 @@ def _value_type(self) -> Type: args_list = typing.get_args(self._var_type) return args_list[1] if args_list else Any - def __getattr__(self, name): - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute of the var. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. @@ -359,35 +323,6 @@ def _cached_var_name(self) -> str: + " })" ) - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. - - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - *[ - value._get_all_var_data() - for key, value in self._var_value - if isinstance(value, Var) - ], - *[ - key._get_all_var_data() - for key, value in self._var_value - if isinstance(key, Var) - ], - self._var_data, - ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. - - Returns: - The VarData of the components and all of its children. - """ - return self._cached_get_all_var_data - def json(self) -> str: """Get the JSON representation of the object. @@ -413,38 +348,60 @@ def __hash__(self) -> int: """ return hash((self.__class__.__name__, self._var_name)) + @cached_property_no_lock + def _cached_get_all_var_data(self) -> ImmutableVarData | None: + """Get all the var data. -@dataclasses.dataclass( - eq=False, - frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, -) -class ObjectToArrayOperation(ArrayVar): - """Base class for object to array operations.""" - - value: ObjectVar = dataclasses.field(default_factory=lambda: LiteralObjectVar({})) + Returns: + The var data. + """ + return ImmutableVarData.merge( + *[LiteralVar.create(var)._get_all_var_data() for var in self._var_value], + *[ + LiteralVar.create(var)._get_all_var_data() + for var in self._var_value.values() + ], + self._var_data, + ) - def __init__( - self, - _var_value: ObjectVar, - _var_type: Type = list, + @classmethod + def create( + cls, + _var_value: OBJECT_TYPE, + _var_type: GenericType | None = None, _var_data: VarData | None = None, - ): - """Initialize the object to array operation. + ) -> LiteralObjectVar[OBJECT_TYPE]: + """Create the literal object var. Args: - _var_value: The value of the operation. - _var_data: Additional hooks and imports associated with the operation. + _var_value: The value of the var. + _var_type: The type of the var. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The literal object var. """ - super(ObjectToArrayOperation, self).__init__( + return LiteralObjectVar( _var_name="", - _var_type=_var_type, + _var_type=(figure_out_type(_var_value) if _var_type is None else _var_type), _var_data=ImmutableVarData.merge(_var_data), + _var_value=_var_value, ) - object.__setattr__(self, "value", _var_value) - object.__delattr__(self, "_var_name") - @cached_property + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ObjectToArrayOperation(CachedVarOperation, ArrayVar): + """Base class for object to array operations.""" + + _value: ObjectVar = dataclasses.field( + default_factory=lambda: LiteralObjectVar.create({}) + ) + + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the operation. @@ -455,122 +412,133 @@ def _cached_var_name(self) -> str: "ObjectToArrayOperation must implement _cached_var_name" ) - def __getattr__(self, name): - """Get an attribute of the operation. + @classmethod + def create( + cls, + value: ObjectVar, + _var_type: GenericType | None = None, + _var_data: VarData | None = None, + ) -> ObjectToArrayOperation: + """Create the object to array operation. Args: - name: The name of the attribute. + value: The value of the operation. + _var_data: Additional hooks and imports associated with the operation. Returns: - The attribute of the operation. + The object to array operation. """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) + return cls( + _var_name="", + _var_type=list if _var_type is None else _var_type, + _var_data=ImmutableVarData.merge(_var_data), + _value=value, + ) - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the operation. - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - self.value._get_all_var_data(), - self._var_data, - ) +class ObjectKeysOperation(ObjectToArrayOperation): + """Operation to get the keys of an object.""" - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the operation. Returns: - The VarData of the components and all of its children. + The name of the operation. """ - return self._cached_get_all_var_data - - -class ObjectKeysOperation(ObjectToArrayOperation): - """Operation to get the keys of an object.""" + return f"Object.keys({str(self._value)})" - def __init__( - self, + @classmethod + def create( + cls, value: ObjectVar, _var_data: VarData | None = None, - ): - """Initialize the object keys operation. + ) -> ObjectKeysOperation: + """Create the object keys operation. Args: value: The value of the operation. _var_data: Additional hooks and imports associated with the operation. + + Returns: + The object keys operation. """ - super(ObjectKeysOperation, self).__init__( - value, List[value._key_type()], _var_data + return cls( + _var_name="", + _var_type=List[str], + _var_data=ImmutableVarData.merge(_var_data), + _value=value, ) - @cached_property + +class ObjectValuesOperation(ObjectToArrayOperation): + """Operation to get the values of an object.""" + + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the operation. Returns: The name of the operation. """ - return f"Object.keys({self.value._var_name})" - - -class ObjectValuesOperation(ObjectToArrayOperation): - """Operation to get the values of an object.""" + return f"Object.values({str(self._value)})" - def __init__( - self, + @classmethod + def create( + cls, value: ObjectVar, _var_data: VarData | None = None, - ): - """Initialize the object values operation. + ) -> ObjectValuesOperation: + """Create the object values operation. Args: value: The value of the operation. _var_data: Additional hooks and imports associated with the operation. + + Returns: + The object values operation. """ - super(ObjectValuesOperation, self).__init__( - value, List[value._value_type()], _var_data + return cls( + _var_name="", + _var_type=List[value._value_type()], + _var_data=ImmutableVarData.merge(_var_data), + _value=value, ) - @cached_property + +class ObjectEntriesOperation(ObjectToArrayOperation): + """Operation to get the entries of an object.""" + + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the operation. Returns: The name of the operation. """ - return f"Object.values({self.value._var_name})" + return f"Object.entries({str(self._value)})" - -class ObjectEntriesOperation(ObjectToArrayOperation): - """Operation to get the entries of an object.""" - - def __init__( - self, + @classmethod + def create( + cls, value: ObjectVar, _var_data: VarData | None = None, - ): - """Initialize the object entries operation. + ) -> ObjectEntriesOperation: + """Create the object entries operation. Args: value: The value of the operation. _var_data: Additional hooks and imports associated with the operation. - """ - super(ObjectEntriesOperation, self).__init__( - value, List[Tuple[value._key_type(), value._value_type()]], _var_data - ) - - @cached_property - def _cached_var_name(self) -> str: - """The name of the operation. Returns: - The name of the operation. + The object entries operation. """ - return f"Object.entries({self.value._var_name})" + return cls( + _var_name="", + _var_type=List[Tuple[str, value._value_type()]], + _var_data=ImmutableVarData.merge(_var_data), + _value=value, + ) @dataclasses.dataclass( @@ -578,227 +546,193 @@ def _cached_var_name(self) -> str: frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ObjectMergeOperation(ObjectVar): +class ObjectMergeOperation(CachedVarOperation, ObjectVar): """Operation to merge two objects.""" - left: ObjectVar = dataclasses.field(default_factory=lambda: LiteralObjectVar({})) - right: ObjectVar = dataclasses.field(default_factory=lambda: LiteralObjectVar({})) - - def __init__( - self, - left: ObjectVar, - right: ObjectVar, - _var_data: VarData | None = None, - ): - """Initialize the object merge operation. - - Args: - left: The left object to merge. - right: The right object to merge. - _var_data: Additional hooks and imports associated with the operation. - """ - super(ObjectMergeOperation, self).__init__( - _var_name="", - _var_type=left._var_type, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "left", left) - object.__setattr__(self, "right", right) - object.__delattr__(self, "_var_name") + _lhs: ObjectVar = dataclasses.field( + default_factory=lambda: LiteralObjectVar.create({}) + ) + _rhs: ObjectVar = dataclasses.field( + default_factory=lambda: LiteralObjectVar.create({}) + ) - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the operation. Returns: The name of the operation. """ - return f"Object.assign({self.left._var_name}, {self.right._var_name})" + return f"({{...{str(self._lhs)}, ...{str(self._rhs)}}})" - def __getattr__(self, name): - """Get an attribute of the operation. + @classmethod + def create( + cls, + lhs: ObjectVar, + rhs: ObjectVar, + _var_data: VarData | None = None, + ) -> ObjectMergeOperation: + """Create the object merge operation. Args: - name: The name of the attribute. - - Returns: - The attribute of the operation. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the operation. + lhs: The left object to merge. + rhs: The right object to merge. + _var_data: Additional hooks and imports associated with the operation. Returns: - The VarData of the components and all of its children. + The object merge operation. """ - return ImmutableVarData.merge( - self.left._get_all_var_data(), - self.right._get_all_var_data(), - self._var_data, + # TODO: Figure out how to merge the types + return cls( + _var_name="", + _var_type=lhs._var_type, + _var_data=ImmutableVarData.merge(_var_data), + _lhs=lhs, + _rhs=rhs, ) - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. - - Returns: - The VarData of the components and all of its children. - """ - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ObjectItemOperation(ImmutableVar): +class ObjectItemOperation(CachedVarOperation, ImmutableVar): """Operation to get an item from an object.""" - value: ObjectVar = dataclasses.field(default_factory=lambda: LiteralObjectVar({})) - key: Var | Any = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) + _object: ObjectVar = dataclasses.field( + default_factory=lambda: LiteralObjectVar.create({}) + ) + _key: Var | Any = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) - def __init__( - self, - value: ObjectVar, + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the operation. + + Returns: + The name of the operation. + """ + if types.is_optional(self._object._var_type): + return f"{str(self._object)}?.[{str(self._key)}]" + return f"{str(self._object)}[{str(self._key)}]" + + @classmethod + def create( + cls, + object: ObjectVar, key: Var | Any, _var_type: GenericType | None = None, _var_data: VarData | None = None, - ): - """Initialize the object item operation. + ) -> ObjectItemOperation: + """Create the object item operation. Args: - value: The value of the operation. + object: The object to get the item from. key: The key to get from the object. + _var_type: The type of the item. _var_data: Additional hooks and imports associated with the operation. + + Returns: + The object item operation. """ - super(ObjectItemOperation, self).__init__( + return cls( _var_name="", - _var_type=value._value_type() if _var_type is None else _var_type, + _var_type=object._value_type() if _var_type is None else _var_type, _var_data=ImmutableVarData.merge(_var_data), + _object=object, + _key=key if isinstance(key, Var) else LiteralVar.create(key), ) - object.__setattr__(self, "value", value) - object.__setattr__( - self, "key", key if isinstance(key, Var) else LiteralVar.create(key) - ) - object.__delattr__(self, "_var_name") - @cached_property + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ToObjectOperation(CachedVarOperation, ObjectVar): + """Operation to convert a var to an object.""" + + _original_var: Var = dataclasses.field( + default_factory=lambda: LiteralObjectVar.create({}) + ) + + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the operation. Returns: The name of the operation. """ - return f"{str(self.value)}[{str(self.key)}]" + return str(self._original_var) - def __getattr__(self, name): - """Get an attribute of the operation. + @classmethod + def create( + cls, + original_var: Var, + _var_type: GenericType | None = None, + _var_data: VarData | None = None, + ) -> ToObjectOperation: + """Create the to object operation. Args: - name: The name of the attribute. - - Returns: - The attribute of the operation. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the operation. + original_var: The original var to convert. + _var_type: The type of the var. + _var_data: Additional hooks and imports associated with the operation. Returns: - The VarData of the components and all of its children. + The to object operation. """ - return ImmutableVarData.merge( - self.value._get_all_var_data(), - self.key._get_all_var_data(), - self._var_data, + return cls( + _var_name="", + _var_type=dict if _var_type is None else _var_type, + _var_data=ImmutableVarData.merge(_var_data), + _original_var=original_var, ) - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. - - Returns: - The VarData of the components and all of its children. - """ - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ToObjectOperation(ObjectVar): - """Operation to convert a var to an object.""" - - _original_var: Var = dataclasses.field(default_factory=lambda: LiteralObjectVar({})) +class ObjectHasOwnProperty(CachedVarOperation, BooleanVar): + """Operation to check if an object has a property.""" - def __init__( - self, - _original_var: Var, - _var_type: Type = dict, - _var_data: VarData | None = None, - ): - """Initialize the to object operation. - - Args: - _original_var: The original var to convert. - _var_type: The type of the var. - _var_data: Additional hooks and imports associated with the operation. - """ - super(ToObjectOperation, self).__init__( - _var_name="", - _var_type=_var_type, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_original_var", _original_var) - object.__delattr__(self, "_var_name") + _object: ObjectVar = dataclasses.field( + default_factory=lambda: LiteralObjectVar.create({}) + ) + _key: Var | Any = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the operation. Returns: The name of the operation. """ - return str(self._original_var) + return f"{str(self._object)}.hasOwnProperty({str(self._key)})" - def __getattr__(self, name): - """Get an attribute of the operation. + @classmethod + def create( + cls, + object: ObjectVar, + key: Var | Any, + _var_data: VarData | None = None, + ) -> ObjectHasOwnProperty: + """Create the object has own property operation. Args: - name: The name of the attribute. - - Returns: - The attribute of the operation. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the operation. + object: The object to check. + key: The key to check. + _var_data: Additional hooks and imports associated with the operation. Returns: - The VarData of the components and all of its children. + The object has own property operation. """ - return ImmutableVarData.merge( - self._original_var._get_all_var_data(), - self._var_data, + return cls( + _var_name="", + _var_type=bool, + _var_data=ImmutableVarData.merge(_var_data), + _object=object, + _key=key if isinstance(key, Var) else LiteralVar.create(key), ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. - - Returns: - The VarData of the components and all of its children. - """ - return self._cached_get_all_var_data diff --git a/reflex/experimental/vars/sequence.py b/reflex/ivars/sequence.py similarity index 50% rename from reflex/experimental/vars/sequence.py rename to reflex/ivars/sequence.py index f622159a62..d05ec5aad6 100644 --- a/reflex/experimental/vars/sequence.py +++ b/reflex/ivars/sequence.py @@ -3,13 +3,11 @@ from __future__ import annotations import dataclasses -import functools import inspect import json import re import sys import typing -from functools import cached_property from typing import ( TYPE_CHECKING, Any, @@ -18,6 +16,7 @@ Literal, Set, Tuple, + Type, TypeVar, Union, overload, @@ -27,20 +26,28 @@ from reflex import constants from reflex.constants.base import REFLEX_VAR_OPENING_TAG -from reflex.experimental.vars.base import ( +from reflex.utils.types import GenericType +from reflex.vars import ( + ImmutableVarData, + Var, + VarData, + _global_vars, +) + +from .base import ( + CachedVarOperation, ImmutableVar, LiteralVar, + cached_property_no_lock, figure_out_type, unionize, ) -from reflex.experimental.vars.number import ( +from .number import ( BooleanVar, LiteralNumberVar, NotEqualOperation, NumberVar, ) -from reflex.utils.types import GenericType -from reflex.vars import ImmutableVarData, Var, VarData, _global_vars if TYPE_CHECKING: from .object import ObjectVar @@ -58,7 +65,7 @@ def __add__(self, other: StringVar | str) -> ConcatVarOperation: Returns: The string concatenation operation. """ - return ConcatVarOperation(self, other) + return ConcatVarOperation.create(self, other) def __radd__(self, other: StringVar | str) -> ConcatVarOperation: """Concatenate two strings. @@ -69,29 +76,29 @@ def __radd__(self, other: StringVar | str) -> ConcatVarOperation: Returns: The string concatenation operation. """ - return ConcatVarOperation(other, self) + return ConcatVarOperation.create(other, self) - def __mul__(self, other: int) -> ConcatVarOperation: - """Concatenate two strings. + def __mul__(self, other: NumberVar | int) -> StringVar: + """Multiply the sequence by a number or an integer. Args: - other: The other string. + other (NumberVar | int): The number or integer to multiply the sequence by. Returns: - The string concatenation operation. + StringVar: The resulting sequence after multiplication. """ - return ConcatVarOperation(*[self for _ in range(other)]) + return (self.split() * other).join() - def __rmul__(self, other: int) -> ConcatVarOperation: - """Concatenate two strings. + def __rmul__(self, other: NumberVar | int) -> StringVar: + """Multiply the sequence by a number or an integer. Args: - other: The other string. + other (NumberVar | int): The number or integer to multiply the sequence by. Returns: - The string concatenation operation. + StringVar: The resulting sequence after multiplication. """ - return ConcatVarOperation(*[self for _ in range(other)]) + return (self.split() * other).join() @overload def __getitem__(self, i: slice) -> ArrayJoinOperation: ... @@ -112,7 +119,7 @@ def __getitem__( """ if isinstance(i, slice): return self.split()[i].join() - return StringItemOperation(self, i) + return StringItemOperation.create(self, i) def length(self) -> NumberVar: """Get the length of the string. @@ -122,29 +129,29 @@ def length(self) -> NumberVar: """ return self.split().length() - def lower(self) -> StringLowerOperation: + def lower(self) -> StringVar: """Convert the string to lowercase. Returns: The string lower operation. """ - return StringLowerOperation(self) + return StringLowerOperation.create(self) - def upper(self) -> StringUpperOperation: + def upper(self) -> StringVar: """Convert the string to uppercase. Returns: The string upper operation. """ - return StringUpperOperation(self) + return StringUpperOperation.create(self) - def strip(self) -> StringStripOperation: + def strip(self) -> StringVar: """Strip the string. Returns: The string strip operation. """ - return StringStripOperation(self) + return StringStripOperation.create(self) def bool(self) -> NotEqualOperation: """Boolean conversion. @@ -152,7 +159,7 @@ def bool(self) -> NotEqualOperation: Returns: The boolean value of the string. """ - return NotEqualOperation(self.length(), 0) + return NotEqualOperation.create(self.length(), 0) def reversed(self) -> ArrayJoinOperation: """Reverse the string. @@ -171,7 +178,7 @@ def contains(self, other: StringVar | str) -> StringContainsOperation: Returns: The string contains operation. """ - return StringContainsOperation(self, other) + return StringContainsOperation.create(self, other) def split(self, separator: StringVar | str = "") -> StringSplitOperation: """Split the string. @@ -182,7 +189,18 @@ def split(self, separator: StringVar | str = "") -> StringSplitOperation: Returns: The string split operation. """ - return StringSplitOperation(self, separator) + return StringSplitOperation.create(self, separator) + + def startswith(self, prefix: StringVar | str) -> StringStartsWithOperation: + """Check if the string starts with a prefix. + + Args: + prefix: The prefix. + + Returns: + The string starts with operation. + """ + return StringStartsWithOperation.create(self, prefix) @dataclasses.dataclass( @@ -190,31 +208,14 @@ def split(self, separator: StringVar | str = "") -> StringSplitOperation: frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class StringToStringOperation(StringVar): +class StringToStringOperation(CachedVarOperation, StringVar): """Base class for immutable string vars that are the result of a string to string operation.""" - a: StringVar = dataclasses.field( + _value: StringVar = dataclasses.field( default_factory=lambda: LiteralStringVar.create("") ) - def __init__(self, a: StringVar | str, _var_data: VarData | None = None): - """Initialize the string to string operation var. - - Args: - a: The string. - _var_data: Additional hooks and imports associated with the Var. - """ - super(StringToStringOperation, self).__init__( - _var_name="", - _var_type=str, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__( - self, "a", a if isinstance(a, Var) else LiteralStringVar.create(a) - ) - object.__delattr__(self, "_var_name") - - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. @@ -225,72 +226,66 @@ def _cached_var_name(self) -> str: "StringToStringOperation must implement _cached_var_name" ) - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + value: StringVar, + _var_data: VarData | None = None, + ) -> StringVar: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(StringToStringOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + value: The value to create the var from. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.a._get_all_var_data() if isinstance(self.a, Var) else None, - self._var_data, + return cls( + _var_name="", + _var_type=str, + _var_data=ImmutableVarData.merge(_var_data), + _value=value, ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - class StringLowerOperation(StringToStringOperation): """Base class for immutable string vars that are the result of a string lower operation.""" - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.toLowerCase()" + return f"{str(self._value)}.toLowerCase()" class StringUpperOperation(StringToStringOperation): """Base class for immutable string vars that are the result of a string upper operation.""" - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.toUpperCase()" + return f"{str(self._value)}.toUpperCase()" class StringStripOperation(StringToStringOperation): """Base class for immutable string vars that are the result of a string strip operation.""" - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.trim()" + return f"{str(self._value)}.trim()" @dataclasses.dataclass( @@ -298,212 +293,216 @@ def _cached_var_name(self) -> str: frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class StringContainsOperation(BooleanVar): +class StringContainsOperation(CachedVarOperation, BooleanVar): """Base class for immutable boolean vars that are the result of a string contains operation.""" - a: StringVar = dataclasses.field( + _haystack: StringVar = dataclasses.field( default_factory=lambda: LiteralStringVar.create("") ) - b: StringVar = dataclasses.field( + _needle: StringVar = dataclasses.field( default_factory=lambda: LiteralStringVar.create("") ) - def __init__( - self, a: StringVar | str, b: StringVar | str, _var_data: VarData | None = None - ): - """Initialize the string contains operation var. + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"{str(self._haystack)}.includes({str(self._needle)})" + + @classmethod + def create( + cls, + haystack: StringVar | str, + needle: StringVar | str, + _var_data: VarData | None = None, + ) -> StringContainsOperation: + """Create a var from a string value. Args: - a: The first string. - b: The second string. + haystack: The haystack. + needle: The needle. _var_data: Additional hooks and imports associated with the Var. + + Returns: + The var. """ - super(StringContainsOperation, self).__init__( + return cls( _var_name="", _var_type=bool, _var_data=ImmutableVarData.merge(_var_data), + _haystack=( + haystack + if isinstance(haystack, Var) + else LiteralStringVar.create(haystack) + ), + _needle=( + needle if isinstance(needle, Var) else LiteralStringVar.create(needle) + ), ) - object.__setattr__( - self, "a", a if isinstance(a, Var) else LiteralStringVar.create(a) - ) - object.__setattr__( - self, "b", b if isinstance(b, Var) else LiteralStringVar.create(b) - ) - object.__delattr__(self, "_var_name") - @cached_property + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class StringStartsWithOperation(CachedVarOperation, BooleanVar): + """Base class for immutable boolean vars that are the result of a string starts with operation.""" + + _full_string: StringVar = dataclasses.field( + default_factory=lambda: LiteralStringVar.create("") + ) + _prefix: StringVar = dataclasses.field( + default_factory=lambda: LiteralStringVar.create("") + ) + + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.includes({str(self.b)})" + return f"{str(self._full_string)}.startsWith({str(self._prefix)})" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + full_string: StringVar | str, + prefix: StringVar | str, + _var_data: VarData | None = None, + ) -> StringStartsWithOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(StringContainsOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + full_string: The full string. + prefix: The prefix. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.a._get_all_var_data(), self.b._get_all_var_data(), self._var_data + return cls( + _var_name="", + _var_type=bool, + _var_data=ImmutableVarData.merge(_var_data), + _full_string=( + full_string + if isinstance(full_string, Var) + else LiteralStringVar.create(full_string) + ), + _prefix=( + prefix if isinstance(prefix, Var) else LiteralStringVar.create(prefix) + ), ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class StringItemOperation(StringVar): +class StringItemOperation(CachedVarOperation, StringVar): """Base class for immutable string vars that are the result of a string item operation.""" - a: StringVar = dataclasses.field( + _string: StringVar = dataclasses.field( default_factory=lambda: LiteralStringVar.create("") ) - i: NumberVar = dataclasses.field(default_factory=lambda: LiteralNumberVar(0)) - - def __init__( - self, a: StringVar | str, i: int | NumberVar, _var_data: VarData | None = None - ): - """Initialize the string item operation var. - - Args: - a: The string. - i: The index. - _var_data: Additional hooks and imports associated with the Var. - """ - super(StringItemOperation, self).__init__( - _var_name="", - _var_type=str, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__( - self, "a", a if isinstance(a, Var) else LiteralStringVar.create(a) - ) - object.__setattr__(self, "i", i if isinstance(i, Var) else LiteralNumberVar(i)) - object.__delattr__(self, "_var_name") + _index: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.at({str(self.i)})" + return f"{str(self._string)}.at({str(self._index)})" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + string: StringVar | str, + index: NumberVar | int, + _var_data: VarData | None = None, + ) -> StringItemOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(StringItemOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + string: The string. + index: The index. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.a._get_all_var_data(), self.i._get_all_var_data(), self._var_data + return cls( + _var_name="", + _var_type=str, + _var_data=ImmutableVarData.merge(_var_data), + _string=( + string if isinstance(string, Var) else LiteralStringVar.create(string) + ), + _index=( + index if isinstance(index, Var) else LiteralNumberVar.create(index) + ), ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - -class ArrayJoinOperation(StringVar): +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ArrayJoinOperation(CachedVarOperation, StringVar): """Base class for immutable string vars that are the result of an array join operation.""" - a: ArrayVar = dataclasses.field(default_factory=lambda: LiteralArrayVar([])) - b: StringVar = dataclasses.field( + _array: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) + _sep: StringVar = dataclasses.field( default_factory=lambda: LiteralStringVar.create("") ) - def __init__( - self, a: ArrayVar, b: StringVar | str, _var_data: VarData | None = None - ): - """Initialize the array join operation var. - - Args: - a: The array. - b: The separator. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ArrayJoinOperation, self).__init__( - _var_name="", - _var_type=str, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__setattr__( - self, "b", b if isinstance(b, Var) else LiteralStringVar.create(b) - ) - object.__delattr__(self, "_var_name") - - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.join({str(self.b)})" + return f"{str(self._array)}.join({str(self._sep)})" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + array: ArrayVar, + sep: StringVar | str = "", + _var_data: VarData | None = None, + ) -> ArrayJoinOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ArrayJoinOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + array: The array. + sep: The separator. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.a._get_all_var_data(), self.b._get_all_var_data(), self._var_data + return cls( + _var_name="", + _var_type=str, + _var_data=ImmutableVarData.merge(_var_data), + _array=array, + _sep=sep if isinstance(sep, Var) else LiteralStringVar.create(sep), ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - # Compile regex for finding reflex var tags. _decode_var_pattern_re = ( @@ -522,24 +521,6 @@ class LiteralStringVar(LiteralVar, StringVar): _var_value: str = dataclasses.field(default="") - def __init__( - self, - _var_value: str, - _var_data: VarData | None = None, - ): - """Initialize the string var. - - Args: - _var_value: The value of the var. - _var_data: Additional hooks and imports associated with the Var. - """ - super(LiteralStringVar, self).__init__( - _var_name=f'"{_var_value}"', - _var_type=str, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "_var_value", _var_value) - @classmethod def create( cls, @@ -573,8 +554,8 @@ def json_loads(s): # Find all tags while m := _decode_var_pattern.search(value): start, end = m.span() - if start > 0: - strings_and_vals.append(value[:start]) + + strings_and_vals.append(value[:start]) serialized_data = m.group(1) @@ -596,23 +577,41 @@ def json_loads(s): var_data.interpolations = [ (realstart, realstart + string_length) ] + var_content = value[end : (end + string_length)] + if ( + var_content[0] == "{" + and var_content[-1] == "}" + and strings_and_vals + and strings_and_vals[-1][-1] == "$" + ): + strings_and_vals[-1] = strings_and_vals[-1][:-1] + var_content = "(" + var_content[1:-1] + ")" strings_and_vals.append( - ImmutableVar.create_safe( - value[end : (end + string_length)], _var_data=var_data - ) + ImmutableVar.create_safe(var_content, _var_data=var_data) ) value = value[(end + string_length) :] offset += end - start - if value: - strings_and_vals.append(value) + strings_and_vals.append(value) + + filtered_strings_and_vals = [ + s for s in strings_and_vals if isinstance(s, Var) or s + ] - return ConcatVarOperation(*strings_and_vals, _var_data=_var_data) + if len(filtered_strings_and_vals) == 1: + return filtered_strings_and_vals[0].to(StringVar) # type: ignore + + return ConcatVarOperation.create( + *filtered_strings_and_vals, + _var_data=_var_data, + ) return LiteralStringVar( - value, - _var_data=_var_data, + _var_name=json.dumps(value), + _var_type=str, + _var_data=ImmutableVarData.merge(_var_data), + _var_value=value, ) def __hash__(self) -> int: @@ -637,61 +636,47 @@ def json(self) -> str: frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ConcatVarOperation(StringVar): +class ConcatVarOperation(CachedVarOperation, StringVar): """Representing a concatenation of literal string vars.""" - _var_value: Tuple[Union[Var, str], ...] = dataclasses.field(default_factory=tuple) - - def __init__(self, *value: Var | str, _var_data: VarData | None = None): - """Initialize the operation of concatenating literal string vars. - - Args: - value: The values to concatenate. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ConcatVarOperation, self).__init__( - _var_name="", _var_data=ImmutableVarData.merge(_var_data), _var_type=str - ) - object.__setattr__(self, "_var_value", value) - object.__delattr__(self, "_var_name") - - def __getattr__(self, name): - """Get an attribute of the var. + _var_value: Tuple[Var, ...] = dataclasses.field(default_factory=tuple) - Args: - name: The name of the attribute. - - Returns: - The attribute of the var. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return ( - "(" - + "+".join( - [ - str(element) if isinstance(element, Var) else f'"{element}"' - for element in self._var_value - ] - ) - + ")" - ) + list_of_strs: List[Union[str, Var]] = [] + last_string = "" + for var in self._var_value: + if isinstance(var, LiteralStringVar): + last_string += var._var_value + else: + if last_string: + list_of_strs.append(last_string) + last_string = "" + list_of_strs.append(var) - @cached_property + if last_string: + list_of_strs.append(last_string) + + list_of_strs_filtered = [ + str(LiteralVar.create(s)) for s in list_of_strs if isinstance(s, Var) or s + ] + + if len(list_of_strs_filtered) == 1: + return list_of_strs_filtered[0] + + return "(" + "+".join(list_of_strs_filtered) + ")" + + @cached_property_no_lock def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + """Get all the VarData associated with the Var. Returns: - The VarData of the components and all of its children. + The VarData associated with the Var. """ return ImmutableVarData.merge( *[ @@ -702,17 +687,27 @@ def _cached_get_all_var_data(self) -> ImmutableVarData | None: self._var_data, ) - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. + @classmethod + def create( + cls, + *value: Var | str, + _var_data: VarData | None = None, + ) -> ConcatVarOperation: + """Create a var from a string value. + + Args: + value: The values to concatenate. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return self._cached_get_all_var_data - - def __post_init__(self): - """Post-initialize the var.""" - pass + return cls( + _var_name="", + _var_type=str, + _var_data=ImmutableVarData.merge(_var_data), + _var_value=tuple(map(LiteralVar.create, value)), + ) ARRAY_VAR_TYPE = TypeVar("ARRAY_VAR_TYPE", bound=Union[List, Tuple, Set]) @@ -728,8 +723,6 @@ def __post_init__(self): class ArrayVar(ImmutableVar[ARRAY_VAR_TYPE]): """Base class for immutable array vars.""" - from reflex.experimental.vars.sequence import StringVar - def join(self, sep: StringVar | str = "") -> ArrayJoinOperation: """Join the elements of the array. @@ -739,9 +732,7 @@ def join(self, sep: StringVar | str = "") -> ArrayJoinOperation: Returns: The joined elements. """ - from reflex.experimental.vars.sequence import ArrayJoinOperation - - return ArrayJoinOperation(self, sep) + return ArrayJoinOperation.create(self, sep) def reverse(self) -> ArrayVar[ARRAY_VAR_TYPE]: """Reverse the array. @@ -749,7 +740,18 @@ def reverse(self) -> ArrayVar[ARRAY_VAR_TYPE]: Returns: The reversed array. """ - return ArrayReverseOperation(self) + return ArrayReverseOperation.create(self) + + def __add__(self, other: ArrayVar[ARRAY_VAR_TYPE]) -> ArrayConcatOperation: + """Concatenate two arrays. + + Parameters: + other (ArrayVar[ARRAY_VAR_TYPE]): The other array to concatenate. + + Returns: + ArrayConcatOperation: The concatenation of the two arrays. + """ + return ArrayConcatOperation.create(self, other) @overload def __getitem__(self, i: slice) -> ArrayVar[ARRAY_VAR_TYPE]: ... @@ -853,8 +855,8 @@ def __getitem__( The array slice operation. """ if isinstance(i, slice): - return ArraySliceOperation(self, i) - return ArrayItemOperation(self, i).guess_type() + return ArraySliceOperation.create(self, i) + return ArrayItemOperation.create(self, i).guess_type() def length(self) -> NumberVar: """Get the length of the array. @@ -862,7 +864,7 @@ def length(self) -> NumberVar: Returns: The length of the array. """ - return ArrayLengthOperation(self) + return ArrayLengthOperation.create(self) @overload @classmethod @@ -902,7 +904,7 @@ def range( start = first_endpoint end = second_endpoint - return RangeOperation(start, end, step or 1) + return RangeOperation.create(start, end, step or 1) def contains(self, other: Any) -> BooleanVar: """Check if the array contains an element. @@ -913,7 +915,20 @@ def contains(self, other: Any) -> BooleanVar: Returns: The array contains operation. """ - return ArrayContainsOperation(self, other) + return ArrayContainsOperation.create(self, other) + + def __mul__(self, other: NumberVar | int) -> ArrayVar[ARRAY_VAR_TYPE]: + """Multiply the sequence by a number or integer. + + Parameters: + other (NumberVar | int): The number or integer to multiply the sequence by. + + Returns: + ArrayVar[ARRAY_VAR_TYPE]: The result of multiplying the sequence by the given number or integer. + """ + return ArrayRepeatOperation.create(self, other) + + __rmul__ = __mul__ # type: ignore LIST_ELEMENT = TypeVar("LIST_ELEMENT") @@ -930,48 +945,14 @@ def contains(self, other: Any) -> BooleanVar: frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class LiteralArrayVar(LiteralVar, ArrayVar[ARRAY_VAR_TYPE]): +class LiteralArrayVar(CachedVarOperation, LiteralVar, ArrayVar[ARRAY_VAR_TYPE]): """Base class for immutable literal array vars.""" _var_value: Union[ List[Union[Var, Any]], Set[Union[Var, Any]], Tuple[Union[Var, Any], ...] ] = dataclasses.field(default_factory=list) - def __init__( - self: LiteralArrayVar[ARRAY_VAR_TYPE], - _var_value: ARRAY_VAR_TYPE, - _var_type: type[ARRAY_VAR_TYPE] | None = None, - _var_data: VarData | None = None, - ): - """Initialize the array var. - - Args: - _var_value: The value of the var. - _var_type: The type of the var. - _var_data: Additional hooks and imports associated with the Var. - """ - super(LiteralArrayVar, self).__init__( - _var_name="", - _var_data=ImmutableVarData.merge(_var_data), - _var_type=(figure_out_type(_var_value) if _var_type is None else _var_type), - ) - object.__setattr__(self, "_var_value", _var_value) - object.__delattr__(self, "_var_name") - - def __getattr__(self, name): - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute of the var. - """ - if name == "_var_name": - return self._cached_var_name - return super(type(self), self).__getattr__(name) - - @functools.cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. @@ -986,30 +967,21 @@ def _cached_var_name(self) -> str: + "]" ) - @functools.cached_property + @cached_property_no_lock def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + """Get all the VarData associated with the Var. Returns: - The VarData of the components and all of its children. + The VarData associated with the Var. """ return ImmutableVarData.merge( *[ - var._get_all_var_data() - for var in self._var_value - if isinstance(var, Var) + LiteralVar.create(element)._get_all_var_data() + for element in self._var_value ], self._var_data, ) - def _get_all_var_data(self) -> ImmutableVarData | None: - """Wrapper method for cached property. - - Returns: - The VarData of the components and all of its children. - """ - return self._cached_get_all_var_data - def __hash__(self) -> int: """Get the hash of the var. @@ -1032,108 +1004,95 @@ def json(self) -> str: + "]" ) + @classmethod + def create( + cls, + value: ARRAY_VAR_TYPE, + _var_type: Type[ARRAY_VAR_TYPE] | None = None, + _var_data: VarData | None = None, + ) -> LiteralArrayVar[ARRAY_VAR_TYPE]: + """Create a var from a string value. + + Args: + value: The value to create the var from. + _var_data: Additional hooks and imports associated with the Var. + + Returns: + The var. + """ + return cls( + _var_name="", + _var_type=figure_out_type(value) if _var_type is None else _var_type, + _var_data=ImmutableVarData.merge(_var_data), + _var_value=value, + ) + @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class StringSplitOperation(ArrayVar): +class StringSplitOperation(CachedVarOperation, ArrayVar): """Base class for immutable array vars that are the result of a string split operation.""" - a: StringVar = dataclasses.field( + _string: StringVar = dataclasses.field( default_factory=lambda: LiteralStringVar.create("") ) - b: StringVar = dataclasses.field( + _sep: StringVar = dataclasses.field( default_factory=lambda: LiteralStringVar.create("") ) - def __init__( - self, a: StringVar | str, b: StringVar | str, _var_data: VarData | None = None - ): - """Initialize the string split operation var. - - Args: - a: The string. - b: The separator. - _var_data: Additional hooks and imports associated with the Var. - """ - super(StringSplitOperation, self).__init__( - _var_name="", - _var_type=List[str], - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__( - self, "a", a if isinstance(a, Var) else LiteralStringVar.create(a) - ) - object.__setattr__( - self, "b", b if isinstance(b, Var) else LiteralStringVar.create(b) - ) - object.__delattr__(self, "_var_name") - - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.split({str(self.b)})" + return f"{str(self._string)}.split({str(self._sep)})" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + string: StringVar | str, + sep: StringVar | str, + _var_data: VarData | None = None, + ) -> StringSplitOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(StringSplitOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + string: The string. + sep: The separator. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.a._get_all_var_data(), self.b._get_all_var_data(), self._var_data + return cls( + _var_name="", + _var_type=List[str], + _var_data=ImmutableVarData.merge(_var_data), + _string=( + string if isinstance(string, Var) else LiteralStringVar.create(string) + ), + _sep=(sep if isinstance(sep, Var) else LiteralStringVar.create(sep)), ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ArrayToArrayOperation(ArrayVar): +class ArrayToArrayOperation(CachedVarOperation, ArrayVar): """Base class for immutable array vars that are the result of an array to array operation.""" - a: ArrayVar = dataclasses.field(default_factory=lambda: LiteralArrayVar([])) - - def __init__(self, a: ArrayVar, _var_data: VarData | None = None): - """Initialize the array to array operation var. - - Args: - a: The string. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ArrayToArrayOperation, self).__init__( - _var_name="", - _var_type=a._var_type, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__delattr__(self, "_var_name") + _value: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. @@ -1144,64 +1103,43 @@ def _cached_var_name(self) -> str: "ArrayToArrayOperation must implement _cached_var_name" ) - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + value: ArrayVar, + _var_data: VarData | None = None, + ) -> ArrayToArrayOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ArrayToArrayOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + value: The value to create the var from. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.a._get_all_var_data() if isinstance(self.a, Var) else None, - self._var_data, + return cls( + _var_name="", + _var_type=value._var_type, + _var_data=ImmutableVarData.merge(_var_data), + _value=value, ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ArraySliceOperation(ArrayVar): +class ArraySliceOperation(CachedVarOperation, ArrayVar): """Base class for immutable string vars that are the result of a string slice operation.""" - a: ArrayVar = dataclasses.field(default_factory=lambda: LiteralArrayVar([])) + _array: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) _slice: slice = dataclasses.field(default_factory=lambda: slice(None, None, None)) - def __init__(self, a: ArrayVar, _slice: slice, _var_data: VarData | None = None): - """Initialize the string slice operation var. - - Args: - a: The string. - _slice: The slice. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ArraySliceOperation, self).__init__( - _var_name="", - _var_type=a._var_type, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__setattr__(self, "_slice", _slice) - object.__delattr__(self, "_var_name") - - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. @@ -1224,79 +1162,67 @@ def _cached_var_name(self) -> str: else ImmutableVar.create_safe("undefined") ) if step is None: - return ( - f"{str(self.a)}.slice({str(normalized_start)}, {str(normalized_end)})" - ) + return f"{str(self._array)}.slice({str(normalized_start)}, {str(normalized_end)})" if not isinstance(step, Var): if step < 0: actual_start = end + 1 if end is not None else 0 - actual_end = start + 1 if start is not None else self.a.length() + actual_end = start + 1 if start is not None else self._array.length() return str( - ArraySliceOperation( - ArrayReverseOperation( - ArraySliceOperation(self.a, slice(actual_start, actual_end)) + ArraySliceOperation.create( + ArrayReverseOperation.create( + ArraySliceOperation.create( + self._array, slice(actual_start, actual_end) + ) ), slice(None, None, -step), ) ) if step == 0: raise ValueError("slice step cannot be zero") - return f"{str(self.a)}.slice({str(normalized_start)}, {str(normalized_end)}).filter((_, i) => i % {str(step)} === 0)" + return f"{str(self._array)}.slice({str(normalized_start)}, {str(normalized_end)}).filter((_, i) => i % {str(step)} === 0)" actual_start_reverse = end + 1 if end is not None else 0 - actual_end_reverse = start + 1 if start is not None else self.a.length() + actual_end_reverse = start + 1 if start is not None else self._array.length() - return f"{str(self.step)} > 0 ? {str(self.a)}.slice({str(normalized_start)}, {str(normalized_end)}).filter((_, i) => i % {str(step)} === 0) : {str(self.a)}.slice({str(actual_start_reverse)}, {str(actual_end_reverse)}).reverse().filter((_, i) => i % {str(-step)} === 0)" + return f"{str(self.step)} > 0 ? {str(self._array)}.slice({str(normalized_start)}, {str(normalized_end)}).filter((_, i) => i % {str(step)} === 0) : {str(self._array)}.slice({str(actual_start_reverse)}, {str(actual_end_reverse)}).reverse().filter((_, i) => i % {str(-step)} === 0)" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + array: ArrayVar, + slice: slice, + _var_data: VarData | None = None, + ) -> ArraySliceOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ArraySliceOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + array: The array. + slice: The slice. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.a._get_all_var_data(), - *[ - slice_value._get_all_var_data() - for slice_value in ( - self._slice.start, - self._slice.stop, - self._slice.step, - ) - if slice_value is not None and isinstance(slice_value, Var) - ], - self._var_data, + return cls( + _var_name="", + _var_type=array._var_type, + _var_data=ImmutableVarData.merge(_var_data), + _array=array, + _slice=slice, ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - class ArrayReverseOperation(ArrayToArrayOperation): """Base class for immutable string vars that are the result of a string reverse operation.""" - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.reverse()" + return f"{str(self._value)}.slice().reverse()" @dataclasses.dataclass( @@ -1304,29 +1230,14 @@ def _cached_var_name(self) -> str: frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ArrayToNumberOperation(NumberVar): +class ArrayToNumberOperation(CachedVarOperation, NumberVar): """Base class for immutable number vars that are the result of an array to number operation.""" - a: ArrayVar = dataclasses.field( - default_factory=lambda: LiteralArrayVar([]), + _array: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]), ) - def __init__(self, a: ArrayVar, _var_data: VarData | None = None): - """Initialize the string to number operation var. - - Args: - a: The array. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ArrayToNumberOperation, self).__init__( - _var_name="", - _var_type=int, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a if isinstance(a, Var) else LiteralArrayVar(a)) - object.__delattr__(self, "_var_name") - - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. @@ -1337,43 +1248,40 @@ def _cached_var_name(self) -> str: "StringToNumberOperation must implement _cached_var_name" ) - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + array: ArrayVar, + _var_data: VarData | None = None, + ) -> ArrayToNumberOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ArrayToNumberOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + array: The array. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge(self.a._get_all_var_data(), self._var_data) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data + return cls( + _var_name="", + _var_type=int, + _var_data=ImmutableVarData.merge(_var_data), + _array=array, + ) class ArrayLengthOperation(ArrayToNumberOperation): """Base class for immutable number vars that are the result of an array length operation.""" - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.length" + return f"{str(self._array)}.length" def is_tuple_type(t: GenericType) -> bool: @@ -1395,370 +1303,348 @@ def is_tuple_type(t: GenericType) -> bool: frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ArrayItemOperation(ImmutableVar): +class ArrayItemOperation(CachedVarOperation, ImmutableVar): """Base class for immutable array vars that are the result of an array item operation.""" - a: ArrayVar = dataclasses.field(default_factory=lambda: LiteralArrayVar([])) - i: NumberVar = dataclasses.field(default_factory=lambda: LiteralNumberVar(0)) - - def __init__( - self, - a: ArrayVar, - i: NumberVar | int, - _var_data: VarData | None = None, - ): - """Initialize the array item operation var. - - Args: - a: The array. - i: The index. - _var_data: Additional hooks and imports associated with the Var. - """ - args = typing.get_args(a._var_type) - if args and isinstance(i, int) and is_tuple_type(a._var_type): - element_type = args[i % len(args)] - else: - element_type = unionize(*args) - super(ArrayItemOperation, self).__init__( - _var_name="", - _var_type=element_type, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a if isinstance(a, Var) else LiteralArrayVar(a)) - object.__setattr__( - self, - "i", - i if isinstance(i, Var) else LiteralNumberVar(i), - ) - object.__delattr__(self, "_var_name") + _array: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) + _index: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.at({str(self.i)})" + return f"{str(self._array)}.at({str(self._index)})" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + array: ArrayVar, + index: NumberVar | int, + _var_type: GenericType | None = None, + _var_data: VarData | None = None, + ) -> ArrayItemOperation: + """Create a var from a string value. Args: - name: The name of the attribute. + array: The array. + index: The index. + _var_data: Additional hooks and imports associated with the Var. Returns: - The attribute value. + The var. """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ArrayItemOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + args = typing.get_args(array._var_type) + if args and isinstance(index, int) and is_tuple_type(array._var_type): + element_type = args[index % len(args)] + else: + element_type = unionize(*args) - Returns: - The VarData of the components and all of its children. - """ - return ImmutableVarData.merge( - self.a._get_all_var_data(), self.i._get_all_var_data(), self._var_data + return cls( + _var_name="", + _var_type=element_type if _var_type is None else _var_type, + _var_data=ImmutableVarData.merge(_var_data), + _array=array, + _index=index if isinstance(index, Var) else LiteralNumberVar.create(index), ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class RangeOperation(ArrayVar): +class RangeOperation(CachedVarOperation, ArrayVar): """Base class for immutable array vars that are the result of a range operation.""" - start: NumberVar = dataclasses.field(default_factory=lambda: LiteralNumberVar(0)) - end: NumberVar = dataclasses.field(default_factory=lambda: LiteralNumberVar(0)) - step: NumberVar = dataclasses.field(default_factory=lambda: LiteralNumberVar(1)) - - def __init__( - self, - start: NumberVar | int, - end: NumberVar | int, - step: NumberVar | int, - _var_data: VarData | None = None, - ): - """Initialize the range operation var. - - Args: - start: The start of the range. - end: The end of the range. - step: The step of the range. - _var_data: Additional hooks and imports associated with the Var. - """ - super(RangeOperation, self).__init__( - _var_name="", - _var_type=List[int], - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__( - self, - "start", - start if isinstance(start, Var) else LiteralNumberVar(start), - ) - object.__setattr__( - self, - "end", - end if isinstance(end, Var) else LiteralNumberVar(end), - ) - object.__setattr__( - self, - "step", - step if isinstance(step, Var) else LiteralNumberVar(step), - ) - object.__delattr__(self, "_var_name") + _start: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) + _stop: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) + _step: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(1) + ) - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - start, end, step = self.start, self.end, self.step + start, end, step = self._start, self._stop, self._step return f"Array.from({{ length: ({str(end)} - {str(start)}) / {str(step)} }}, (_, i) => {str(start)} + i * {str(step)})" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + start: NumberVar | int, + stop: NumberVar | int, + step: NumberVar | int, + _var_data: VarData | None = None, + ) -> RangeOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(RangeOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + start: The start of the range. + stop: The end of the range. + step: The step of the range. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.start._get_all_var_data(), - self.end._get_all_var_data(), - self.step._get_all_var_data(), - self._var_data, + return cls( + _var_name="", + _var_type=List[int], + _var_data=ImmutableVarData.merge(_var_data), + _start=start if isinstance(start, Var) else LiteralNumberVar.create(start), + _stop=stop if isinstance(stop, Var) else LiteralNumberVar.create(stop), + _step=step if isinstance(step, Var) else LiteralNumberVar.create(step), ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ArrayContainsOperation(BooleanVar): +class ArrayContainsOperation(CachedVarOperation, BooleanVar): """Base class for immutable boolean vars that are the result of an array contains operation.""" - a: ArrayVar = dataclasses.field(default_factory=lambda: LiteralArrayVar([])) - b: Var = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) - - def __init__(self, a: ArrayVar, b: Any | Var, _var_data: VarData | None = None): - """Initialize the array contains operation var. - - Args: - a: The array. - b: The element to check for. - _var_data: Additional hooks and imports associated with the Var. - """ - super(ArrayContainsOperation, self).__init__( - _var_name="", - _var_type=bool, - _var_data=ImmutableVarData.merge(_var_data), - ) - object.__setattr__(self, "a", a) - object.__setattr__(self, "b", b if isinstance(b, Var) else LiteralVar.create(b)) - object.__delattr__(self, "_var_name") + _haystack: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) + _needle: Var = dataclasses.field(default_factory=lambda: LiteralVar.create(None)) - @cached_property + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return f"{str(self.a)}.includes({str(self.b)})" + return f"{str(self._haystack)}.includes({str(self._needle)})" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + haystack: ArrayVar, + needle: Any | Var, + _var_data: VarData | None = None, + ) -> ArrayContainsOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ArrayContainsOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + haystack: The array. + needle: The element to check for. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.a._get_all_var_data(), self.b._get_all_var_data(), self._var_data + return cls( + _var_name="", + _var_type=bool, + _var_data=ImmutableVarData.merge(_var_data), + _haystack=haystack, + _needle=needle if isinstance(needle, Var) else LiteralVar.create(needle), ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ToStringOperation(StringVar): +class ToStringOperation(CachedVarOperation, StringVar): """Base class for immutable string vars that are the result of a to string operation.""" - original_var: Var = dataclasses.field( + _original_var: Var = dataclasses.field( default_factory=lambda: LiteralStringVar.create("") ) - def __init__(self, original_var: Var, _var_data: VarData | None = None): - """Initialize the to string operation var. + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return str(self._original_var) + + @classmethod + def create( + cls, + original_var: Var, + _var_data: VarData | None = None, + ) -> ToStringOperation: + """Create a var from a string value. Args: original_var: The original var. _var_data: Additional hooks and imports associated with the Var. + + Returns: + The var. """ - super(ToStringOperation, self).__init__( + return cls( _var_name="", _var_type=str, _var_data=ImmutableVarData.merge(_var_data), + _original_var=original_var, ) - object.__setattr__( - self, - "original_var", - original_var, - ) - object.__delattr__(self, "_var_name") - @cached_property + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ToArrayOperation(CachedVarOperation, ArrayVar): + """Base class for immutable array vars that are the result of a to array operation.""" + + _original_var: Var = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) + + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return str(self.original_var) + return str(self._original_var) - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + original_var: Var, + _var_type: type[list] | type[set] | type[tuple] | None = None, + _var_data: VarData | None = None, + ) -> ToArrayOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ToStringOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + original_var: The original var. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.original_var._get_all_var_data(), self._var_data + return cls( + _var_name="", + _var_type=list if _var_type is None else _var_type, + _var_data=ImmutableVarData.merge(_var_data), + _original_var=original_var, ) - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data - @dataclasses.dataclass( eq=False, frozen=True, **{"slots": True} if sys.version_info >= (3, 10) else {}, ) -class ToArrayOperation(ArrayVar): - """Base class for immutable array vars that are the result of a to array operation.""" +class ArrayRepeatOperation(CachedVarOperation, ArrayVar): + """Base class for immutable array vars that are the result of an array repeat operation.""" - original_var: Var = dataclasses.field(default_factory=lambda: LiteralArrayVar([])) + _array: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) + _count: NumberVar = dataclasses.field( + default_factory=lambda: LiteralNumberVar.create(0) + ) - def __init__( - self, - original_var: Var, - _var_type: type[list] | type[set] | type[tuple] = list, + @cached_property_no_lock + def _cached_var_name(self) -> str: + """The name of the var. + + Returns: + The name of the var. + """ + return f"Array.from({{ length: {str(self._count)} }}).flatMap(() => {str(self._array)})" + + @classmethod + def create( + cls, + array: ArrayVar, + count: NumberVar | int, _var_data: VarData | None = None, - ): - """Initialize the to array operation var. + ) -> ArrayRepeatOperation: + """Create a var from a string value. Args: - original_var: The original var. - _var_type: The type of the array. + array: The array. + count: The number of times to repeat the array. _var_data: Additional hooks and imports associated with the Var. + + Returns: + The var. """ - super(ToArrayOperation, self).__init__( + return cls( _var_name="", - _var_type=_var_type, + _var_type=array._var_type, _var_data=ImmutableVarData.merge(_var_data), + _array=array, + _count=count if isinstance(count, Var) else LiteralNumberVar.create(count), ) - object.__setattr__( - self, - "original_var", - original_var, - ) - object.__delattr__(self, "_var_name") - @cached_property + +@dataclasses.dataclass( + eq=False, + frozen=True, + **{"slots": True} if sys.version_info >= (3, 10) else {}, +) +class ArrayConcatOperation(CachedVarOperation, ArrayVar): + """Base class for immutable array vars that are the result of an array concat operation.""" + + _lhs: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) + _rhs: ArrayVar = dataclasses.field( + default_factory=lambda: LiteralArrayVar.create([]) + ) + + @cached_property_no_lock def _cached_var_name(self) -> str: """The name of the var. Returns: The name of the var. """ - return str(self.original_var) + return f"[...{str(self._lhs)}, ...{str(self._rhs)}]" - def __getattr__(self, name: str) -> Any: - """Get an attribute of the var. + @classmethod + def create( + cls, + lhs: ArrayVar, + rhs: ArrayVar, + _var_data: VarData | None = None, + ) -> ArrayConcatOperation: + """Create a var from a string value. Args: - name: The name of the attribute. - - Returns: - The attribute value. - """ - if name == "_var_name": - return self._cached_var_name - getattr(super(ToArrayOperation, self), name) - - @cached_property - def _cached_get_all_var_data(self) -> ImmutableVarData | None: - """Get all VarData associated with the Var. + lhs: The left-hand side array. + rhs: The right-hand side array. + _var_data: Additional hooks and imports associated with the Var. Returns: - The VarData of the components and all of its children. + The var. """ - return ImmutableVarData.merge( - self.original_var._get_all_var_data(), self._var_data + # TODO: Figure out how to merge the types of a and b + return cls( + _var_name="", + _var_type=Union[lhs._var_type, rhs._var_type], + _var_data=ImmutableVarData.merge(_var_data), + _lhs=lhs, + _rhs=rhs, ) - - def _get_all_var_data(self) -> ImmutableVarData | None: - return self._cached_get_all_var_data diff --git a/reflex/state.py b/reflex/state.py index 228530fdac..6712edd81b 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -32,6 +32,7 @@ from sqlalchemy.orm import DeclarativeBase from reflex.config import get_config +from reflex.ivars.base import ImmutableComputedVar, ImmutableVar, immutable_computed_var try: import pydantic.v1 as pydantic @@ -56,14 +57,18 @@ from reflex.utils.exec import is_testing_env from reflex.utils.serializers import SerializedType, serialize, serializer from reflex.utils.types import override -from reflex.vars import BaseVar, ComputedVar, Var, computed_var +from reflex.vars import ( + ComputedVar, + ImmutableVarData, + Var, +) if TYPE_CHECKING: from reflex.components.component import Component Delta = Dict[str, Any] -var = computed_var +var = immutable_computed_var # If the state is this large, it's considered a performance issue. @@ -299,10 +304,10 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): vars: ClassVar[Dict[str, Var]] = {} # The base vars of the class. - base_vars: ClassVar[Dict[str, BaseVar]] = {} + base_vars: ClassVar[Dict[str, ImmutableVar]] = {} # The computed vars of the class. - computed_vars: ClassVar[Dict[str, ComputedVar]] = {} + computed_vars: ClassVar[Dict[str, Union[ComputedVar, ImmutableComputedVar]]] = {} # Vars inherited by the parent state. inherited_vars: ClassVar[Dict[str, Var]] = {} @@ -415,7 +420,7 @@ def __repr__(self) -> str: return f"{self.__class__.__name__}({self.dict()})" @classmethod - def _get_computed_vars(cls) -> list[ComputedVar]: + def _get_computed_vars(cls) -> list[Union[ComputedVar, ImmutableComputedVar]]: """Helper function to get all computed vars of a instance. Returns: @@ -425,7 +430,7 @@ def _get_computed_vars(cls) -> list[ComputedVar]: v for mixin in cls._mixins() + [cls] for v in mixin.__dict__.values() - if isinstance(v, ComputedVar) + if isinstance(v, (ComputedVar, ImmutableComputedVar)) ] @classmethod @@ -521,13 +526,18 @@ def __init_subclass__(cls, mixin: bool = False, **kwargs): # Set the base and computed vars. cls.base_vars = { - f.name: BaseVar(_var_name=f.name, _var_type=f.outer_type_)._var_set_state( - cls - ) + f.name: ImmutableVar( + _var_name=format.format_state_name(cls.get_full_name()) + "." + f.name, + _var_type=f.outer_type_, + _var_data=ImmutableVarData.from_state(cls), + ).guess_type() for f in cls.get_fields().values() if f.name not in cls.get_skip_vars() } - cls.computed_vars = {v._var_name: v._var_set_state(cls) for v in computed_vars} + cls.computed_vars = { + v._var_name: v._replace(merge_var_data=ImmutableVarData.from_state(cls)) + for v in computed_vars + } cls.vars = { **cls.inherited_vars, **cls.base_vars, @@ -548,12 +558,12 @@ def __init_subclass__(cls, mixin: bool = False, **kwargs): for mixin in cls._mixins(): for name, value in mixin.__dict__.items(): - if isinstance(value, ComputedVar): + if isinstance(value, (ComputedVar, ImmutableComputedVar)): fget = cls._copy_fn(value.fget) - newcv = value._replace(fget=fget) + newcv = value._replace( + fget=fget, _var_data=ImmutableVarData.from_state(cls) + ) # cleanup refs to mixin cls in var_data - newcv._var_data = None - newcv._var_set_state(cls) setattr(cls, name, newcv) cls.computed_vars[newcv._var_name] = newcv cls.vars[newcv._var_name] = newcv @@ -847,7 +857,7 @@ def get_class_var(cls, path: Sequence[str]) -> Any: return getattr(substate, name) @classmethod - def _init_var(cls, prop: BaseVar): + def _init_var(cls, prop: ImmutableVar): """Initialize a variable. Args: @@ -890,8 +900,11 @@ def add_var(cls, name: str, type_: Any, default_value: Any = None): ) # create the variable based on name and type - var = BaseVar(_var_name=name, _var_type=type_) - var._var_set_state(cls) + var = ImmutableVar( + _var_name=format.format_state_name(cls.get_full_name()) + "." + name, + _var_type=type_, + _var_data=ImmutableVarData.from_state(cls), + ).guess_type() # add the pydantic field dynamically (must be done before _init_var) cls.add_field(var, default_value) @@ -910,13 +923,18 @@ def add_var(cls, name: str, type_: Any, default_value: Any = None): cls._init_var_dependency_dicts() @classmethod - def _set_var(cls, prop: BaseVar): + def _set_var(cls, prop: ImmutableVar): """Set the var as a class member. Args: prop: The var instance to set. """ - setattr(cls, prop._var_name, prop) + acutal_var_name = ( + prop._var_name + if "." not in prop._var_name + else prop._var_name.split(".")[-1] + ) + setattr(cls, acutal_var_name, prop) @classmethod def _create_event_handler(cls, fn): @@ -936,7 +954,7 @@ def _create_setvar(cls): cls.setvar = cls.event_handlers["setvar"] = EventHandlerSetVar(state_cls=cls) @classmethod - def _create_setter(cls, prop: BaseVar): + def _create_setter(cls, prop: ImmutableVar): """Create a setter for the var. Args: @@ -949,14 +967,17 @@ def _create_setter(cls, prop: BaseVar): setattr(cls, setter_name, event_handler) @classmethod - def _set_default_value(cls, prop: BaseVar): + def _set_default_value(cls, prop: ImmutableVar): """Set the default value for the var. Args: prop: The var to set the default value for. """ # Get the pydantic field for the var. - field = cls.get_fields()[prop._var_name] + if "." in prop._var_name: + field = cls.get_fields()[prop._var_name.split(".")[-1]] + else: + field = cls.get_fields()[prop._var_name] if field.required: default_value = prop.get_default_value() if default_value is not None: @@ -968,7 +989,7 @@ def _set_default_value(cls, prop: BaseVar): and not types.is_optional(prop._var_type) ): # Ensure frontend uses null coalescing when accessing. - prop._var_type = Optional[prop._var_type] + object.__setattr__(prop, "_var_type", Optional[prop._var_type]) @staticmethod def _get_base_functions() -> dict[str, FunctionType]: @@ -1774,7 +1795,7 @@ def dict( # Include initial computed vars. prop_name: ( cv._initial_value - if isinstance(cv, ComputedVar) + if isinstance(cv, (ComputedVar, ImmutableComputedVar)) and not isinstance(cv._initial_value, types.Unset) else self.get_value(getattr(self, prop_name)) ) diff --git a/reflex/style.py b/reflex/style.py index e4a6220902..a2083f6344 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -7,9 +7,11 @@ from reflex import constants from reflex.components.core.breakpoints import Breakpoints, breakpoints_values from reflex.event import EventChain +from reflex.ivars.base import ImmutableCallableVar, ImmutableVar, LiteralVar +from reflex.ivars.function import FunctionVar from reflex.utils import format from reflex.utils.imports import ImportVar -from reflex.vars import BaseVar, CallableVar, Var, VarData +from reflex.vars import ImmutableVarData, Var, VarData VarData.update_forward_refs() # Ensure all type definitions are resolved @@ -25,7 +27,7 @@ } -def _color_mode_var(_var_name: str, _var_type: Type = str) -> BaseVar: +def _color_mode_var(_var_name: str, _var_type: Type = str) -> ImmutableVar: """Create a Var that destructs the _var_name from ColorModeContext. Args: @@ -33,24 +35,22 @@ def _color_mode_var(_var_name: str, _var_type: Type = str) -> BaseVar: _var_type: The type of the Var. Returns: - The BaseVar for accessing _var_name from ColorModeContext. + The Var that resolves to the color mode. """ - return BaseVar( + return ImmutableVar( _var_name=_var_name, _var_type=_var_type, - _var_is_local=False, - _var_is_string=False, - _var_data=VarData( + _var_data=ImmutableVarData( imports=color_mode_imports, hooks={f"const {{ {_var_name} }} = useContext(ColorModeContext)": None}, ), - ) + ).guess_type() -@CallableVar +@ImmutableCallableVar def set_color_mode( new_color_mode: LiteralColorMode | Var[LiteralColorMode] | None = None, -) -> BaseVar[EventChain]: +) -> Var[EventChain]: """Create an EventChain Var that sets the color mode to a specific value. Note: `set_color_mode` is not a real event and cannot be triggered from a @@ -70,11 +70,14 @@ def set_color_mode( return base_setter if not isinstance(new_color_mode, Var): - new_color_mode = Var.create_safe(new_color_mode, _var_is_string=True) - return base_setter._replace( - _var_name=f"() => {base_setter._var_name}({new_color_mode._var_name_unwrapped})", - merge_var_data=new_color_mode._var_data, - ) + new_color_mode = LiteralVar.create(new_color_mode) + + return ImmutableVar( + f"() => {str(base_setter)}({str(new_color_mode)})", + _var_data=ImmutableVarData.merge( + base_setter._get_all_var_data(), new_color_mode._get_all_var_data() + ), + ).to(FunctionVar, EventChain) # Var resolves to the current color mode for the app ("light", "dark" or "system") @@ -111,7 +114,9 @@ def media_query(breakpoint_expr: str): return f"@media screen and (min-width: {breakpoint_expr})" -def convert_item(style_item: str | Var) -> tuple[str, VarData | None]: +def convert_item( + style_item: int | str | Var, +) -> tuple[str | Var, VarData | ImmutableVarData | None]: """Format a single value in a style dictionary. Args: @@ -121,21 +126,20 @@ def convert_item(style_item: str | Var) -> tuple[str, VarData | None]: The formatted style item and any associated VarData. """ if isinstance(style_item, Var): - # If the value is a Var, extract the var_data and cast as str. - return str(style_item), style_item._var_data + return style_item, style_item._get_all_var_data() - # Otherwise, convert to Var to collapse VarData encoded in f-string. - new_var = Var.create(style_item, _var_is_string=False) - if new_var is not None and new_var._var_data: - # The wrapped backtick is used to identify the Var for interpolation. - return f"`{str(new_var)}`", new_var._var_data + # if isinstance(style_item, str) and REFLEX_VAR_OPENING_TAG not in style_item: + # return style_item, None - return style_item, None + # Otherwise, convert to Var to collapse VarData encoded in f-string. + new_var = LiteralVar.create(style_item) + var_data = new_var._get_all_var_data() if new_var is not None else None + return new_var, var_data def convert_list( responsive_list: list[str | dict | Var], -) -> tuple[list[str | dict], VarData | None]: +) -> tuple[list[str | dict[str, Var | list | dict]], VarData | None]: """Format a responsive value list. Args: @@ -157,7 +161,9 @@ def convert_list( return converted_value, VarData.merge(*item_var_datas) -def convert(style_dict): +def convert( + style_dict: dict[str, Var | dict | list | str], +) -> tuple[dict[str, str | list | dict], VarData | None]: """Format a style dictionary. Args: @@ -175,7 +181,11 @@ def update_out_dict(return_value, keys_to_update): for key, value in style_dict.items(): keys = format_style_key(key) - if isinstance(value, dict): + if isinstance(value, Var): + return_val = value + new_var_data = value._get_all_var_data() + update_out_dict(return_val, keys) + elif isinstance(value, dict): # Recursively format nested style dictionaries. return_val, new_var_data = convert(value) update_out_dict(return_val, keys) @@ -254,12 +264,10 @@ def __setitem__(self, key: str, value: Any): value: The value to set. """ # Create a Var to collapse VarData encoded in f-string. - _var = Var.create(value, _var_is_string=False) + _var = LiteralVar.create(value) if _var is not None: # Carry the imports/hooks when setting a Var as a value. - self._var_data = VarData.merge( - self._var_data if hasattr(self, "_var_data") else None, _var._var_data - ) + self._var_data = VarData.merge(self._var_data, _var._get_all_var_data()) super().__setitem__(key, value) diff --git a/reflex/utils/format.py b/reflex/utils/format.py index 59bbbd91cf..e7d85a93e8 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -272,8 +272,10 @@ def format_f_string_prop(prop: BaseVar) -> str: Returns: The formatted string. """ + from reflex.ivars.base import VarData + s = prop._var_full_name - var_data = prop._var_data + var_data = VarData.merge(prop._get_all_var_data()) interps = var_data.interpolations if var_data else [] parts: List[str] = [] @@ -421,6 +423,7 @@ def format_prop( # import here to avoid circular import. from reflex.event import EventChain from reflex.utils import serializers + from reflex.vars import VarData try: # Handle var props. @@ -428,7 +431,8 @@ def format_prop( if not prop._var_is_local or prop._var_is_string: return str(prop) if isinstance(prop, BaseVar) and types._issubclass(prop._var_type, str): - if prop._var_data and prop._var_data.interpolations: + var_data = VarData.merge(prop._get_all_var_data()) + if var_data and var_data.interpolations: return format_f_string_prop(prop) return format_string(prop._var_full_name) prop = prop._var_full_name @@ -483,11 +487,26 @@ def format_props(*single_props, **key_value_props) -> list[str]: The formatted props list. """ # Format all the props. + from reflex.ivars.base import ImmutableVar, LiteralVar + return [ - f"{name}={format_prop(prop)}" + ( + f"{name}={format_prop(prop)}" + if isinstance(prop, Var) and not isinstance(prop, ImmutableVar) + else ( + f"{name}={{{format_prop(prop if isinstance(prop, Var) else LiteralVar.create(prop))}}}" + ) + ) for name, prop in sorted(key_value_props.items()) if prop is not None - ] + [str(prop) for prop in single_props] + ] + [ + ( + str(prop) + if isinstance(prop, Var) and not isinstance(prop, ImmutableVar) + else f"{{{str(LiteralVar.create(prop))}}}" + ) + for prop in single_props + ] def get_event_handler_parts(handler: EventHandler) -> tuple[str, str]: @@ -502,13 +521,13 @@ def get_event_handler_parts(handler: EventHandler) -> tuple[str, str]: # Get the class that defines the event handler. parts = handler.fn.__qualname__.split(".") - # If there's no enclosing class, just return the function name. - if len(parts) == 1: - return ("", parts[-1]) - # Get the state full name state_full_name = handler.state_full_name + # If there's no enclosing class, just return the function name. + if not state_full_name: + return ("", parts[-1]) + # Get the function name name = parts[-1] @@ -613,11 +632,13 @@ def format_event_chain( def format_queue_events( - events: EventSpec - | EventHandler - | Callable - | List[EventSpec | EventHandler | Callable] - | None = None, + events: ( + EventSpec + | EventHandler + | Callable + | List[EventSpec | EventHandler | Callable] + | None + ) = None, args_spec: Optional[ArgsSpec] = None, ) -> Var[EventChain]: """Format a list of event handler / event spec as a javascript callback. @@ -645,11 +666,10 @@ def format_queue_events( call_event_fn, call_event_handler, ) + from reflex.ivars import FunctionVar, ImmutableVar if not events: - return Var.create_safe( - "() => null", _var_is_string=False, _var_is_local=False - ).to(EventChain) + return ImmutableVar("(() => null)").to(FunctionVar, EventChain) # If no spec is provided, the function will take no arguments. def _default_args_spec(): @@ -682,12 +702,10 @@ def _default_args_spec(): # Return the final code snippet, expecting queueEvents, processEvent, and socket to be in scope. # Typically this snippet will _only_ run from within an rx.call_script eval context. - return Var.create_safe( + return ImmutableVar( f"{arg_def} => {{queueEvents([{','.join(payloads)}], {constants.CompileVars.SOCKET}); " f"processEvent({constants.CompileVars.SOCKET})}}", - _var_is_string=False, - _var_is_local=False, - ).to(EventChain) + ).to(FunctionVar, EventChain) def format_query_params(router_data: dict[str, Any]) -> dict[str, str]: @@ -786,8 +804,8 @@ def format_array_ref(refs: str, idx: Var | None) -> str: """ clean_ref = re.sub(r"[^\w]+", "_", refs) if idx is not None: - idx._var_is_local = True - return f"refs_{clean_ref}[{idx}]" + # idx._var_is_local = True + return f"refs_{clean_ref}[{str(idx)}]" return f"refs_{clean_ref}" @@ -938,7 +956,9 @@ def format_data_editor_cell(cell: Any): Returns: The formatted cell. """ + from reflex.ivars.base import ImmutableVar + return { - "kind": Var.create(value="GridCellKind.Text", _var_is_string=False), + "kind": ImmutableVar.create("GridCellKind.Text"), "data": cell, } diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index d279e3910c..f96a4c0467 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -433,7 +433,7 @@ def _generate_component_create_functiondef( ast.arg( arg=trigger, annotation=ast.Name( - id="Optional[Union[EventHandler, EventSpec, list, Callable, BaseVar]]" + id="Optional[Union[EventHandler, EventSpec, list, Callable, Var]]" ), ), ast.Constant(value=None), diff --git a/reflex/utils/types.py b/reflex/utils/types.py index 32438b9e68..c164bb93e9 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -491,10 +491,18 @@ def is_backend_base_variable(name: str, cls: Type) -> bool: return False if callable(value): return False + from reflex.ivars.base import ImmutableComputedVar from reflex.vars import ComputedVar if isinstance( - value, (types.FunctionType, property, cached_property, ComputedVar) + value, + ( + types.FunctionType, + property, + cached_property, + ComputedVar, + ImmutableComputedVar, + ), ): return False diff --git a/reflex/vars.py b/reflex/vars.py index 795ab4759b..a3d40722d5 100644 --- a/reflex/vars.py +++ b/reflex/vars.py @@ -345,6 +345,33 @@ def __eq__(self, other: Any) -> bool: == imports.collapse_imports(other.imports) ) + @classmethod + def from_state(cls, state: Type[BaseState] | str) -> ImmutableVarData: + """Set the state of the var. + + Args: + state: The state to set or the full name of the state. + + Returns: + The var with the set state. + """ + from reflex.utils import format + + state_name = state if isinstance(state, str) else state.get_full_name() + new_var_data = ImmutableVarData( + state=state_name, + hooks={ + "const {0} = useContext(StateContexts.{0})".format( + format.format_state_name(state_name) + ): None + }, + imports={ + f"/{constants.Dirs.CONTEXTS_PATH}": [ImportVar(tag="StateContexts")], + "react": [ImportVar(tag="useContext")], + }, + ) + return new_var_data + def _decode_var_immutable(value: str) -> tuple[ImmutableVarData | None, str]: """Decode the state name from a formatted var. @@ -384,7 +411,7 @@ def json_loads(s): ): # This is a global immutable var. var = _global_vars[int(serialized_data)] - var_data = var._var_data + var_data = var._get_all_var_data() if var_data is not None: realstart = start + offset @@ -727,7 +754,10 @@ def _decode(self) -> Any: try: return json.loads(self._var_name) except ValueError: - return self._var_name + try: + return json.loads(self.json()) + except (ValueError, NotImplementedError): + return self._var_name def equals(self, other: Var) -> bool: """Check if two vars are equal. @@ -738,6 +768,16 @@ def equals(self, other: Var) -> bool: Returns: Whether the vars are equal. """ + from reflex.ivars import ImmutableVar + + if isinstance(other, ImmutableVar) or isinstance(self, ImmutableVar): + return ( + self._var_name == other._var_name + and self._var_type == other._var_type + and ImmutableVarData.merge(self._get_all_var_data()) + == ImmutableVarData.merge(other._get_all_var_data()) + ) + return ( self._var_name == other._var_name and self._var_type == other._var_type @@ -800,11 +840,19 @@ def __str__(self) -> str: """ from reflex.utils import format - out = ( - self._var_full_name - if self._var_is_local - else format.wrap(self._var_full_name, "{") - ) + if self._var_is_local: + console.deprecate( + feature_name="Local Vars", + reason=( + "Setting _var_is_local to True does not have any effect anymore. " + "Use the new ImmutableVar instead." + ), + deprecation_version="0.5.9", + removal_version="0.6.0", + ) + out = self._var_full_name + else: + out = format.wrap(self._var_full_name, "{") if self._var_is_string: out = format.format_string(out) return out @@ -1009,7 +1057,6 @@ def __getattr__(self, name: str) -> Var: return self._replace( _var_name=f"{self._var_name}{'?' if is_optional else ''}.{name}", _var_type=type_, - _var_is_string=False, ) if name in REPLACED_NAMES: diff --git a/reflex/vars.pyi b/reflex/vars.pyi index 47d433374d..8c923f03e0 100644 --- a/reflex/vars.pyi +++ b/reflex/vars.pyi @@ -63,6 +63,8 @@ class ImmutableVarData: def merge( cls, *others: ImmutableVarData | VarData | None ) -> ImmutableVarData | None: ... + @classmethod + def from_state(cls, state: Type[BaseState] | str) -> ImmutableVarData: ... def _decode_var_immutable(value: str) -> tuple[ImmutableVarData, str]: ... @@ -150,8 +152,9 @@ class Var: @property def _var_full_name(self) -> str: ... def _var_set_state(self, state: Type[BaseState] | str) -> Any: ... - def _get_all_var_data(self) -> VarData: ... + def _get_all_var_data(self) -> VarData | ImmutableVarData: ... def json(self) -> str: ... + def _type(self) -> Var: ... @dataclass(eq=False) class BaseVar(Var): diff --git a/scripts/integration.sh b/scripts/integration.sh index dc8b5d5537..17ba66ec79 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -34,4 +34,4 @@ if [ -f /proc/$pid/winpid ]; then echo "Windows detected, passing winpid $pid to port waiter" fi -python scripts/wait_for_listening_port.py $check_ports --timeout=900 --server-pid "$pid" +python scripts/wait_for_listening_port.py $check_ports --timeout=1800 --server-pid "$pid" diff --git a/tests/components/base/test_bare.py b/tests/components/base/test_bare.py index 264d136cb0..adc7ac1b05 100644 --- a/tests/components/base/test_bare.py +++ b/tests/components/base/test_bare.py @@ -1,16 +1,21 @@ import pytest from reflex.components.base.bare import Bare +from reflex.ivars.base import ImmutableVar + +STATE_VAR = ImmutableVar.create_safe("default_state.name") @pytest.mark.parametrize( "contents,expected", [ - ("hello", "hello"), - ("{}", "{}"), - (None, ""), - ("${default_state.name}", "${default_state.name}"), - ("{state.name}", "{state.name}"), + ("hello", '{"hello"}'), + ("{}", '{"{}"}'), + (None, '{""}'), + (STATE_VAR, "{default_state.name}"), + # This behavior is now unsupported. + # ("${default_state.name}", "${default_state.name}"), + # ("{state.name}", "{state.name}"), ], ) def test_fstrings(contents, expected): diff --git a/tests/components/base/test_script.py b/tests/components/base/test_script.py index 372178d5f2..c6b67da11c 100644 --- a/tests/components/base/test_script.py +++ b/tests/components/base/test_script.py @@ -13,7 +13,7 @@ def test_script_inline(): assert render_dict["name"] == "Script" assert not render_dict["contents"] assert len(render_dict["children"]) == 1 - assert render_dict["children"][0]["contents"] == "{`let x = 42`}" + assert render_dict["children"][0]["contents"] == '{"let x = 42"}' def test_script_src(): @@ -23,7 +23,7 @@ def test_script_src(): assert render_dict["name"] == "Script" assert not render_dict["contents"] assert not render_dict["children"] - assert "src={`foo.js`}" in render_dict["props"] + assert 'src={"foo.js"}' in render_dict["props"] def test_script_neither(): @@ -58,14 +58,14 @@ def test_script_event_handler(): ) render_dict = component.render() assert ( - f'onReady={{(...args) => addEvents([Event("{EvState.get_full_name()}.on_ready", {{}})], args, {{}})}}' + f'onReady={{((...args) => ((addEvents([(Event("{EvState.get_full_name()}.on_ready", ({{ }})))], args, ({{ }})))))}}' in render_dict["props"] ) assert ( - f'onLoad={{(...args) => addEvents([Event("{EvState.get_full_name()}.on_load", {{}})], args, {{}})}}' + f'onLoad={{((...args) => ((addEvents([(Event("{EvState.get_full_name()}.on_load", ({{ }})))], args, ({{ }})))))}}' in render_dict["props"] ) assert ( - f'onError={{(...args) => addEvents([Event("{EvState.get_full_name()}.on_error", {{}})], args, {{}})}}' + f'onError={{((...args) => ((addEvents([(Event("{EvState.get_full_name()}.on_error", ({{ }})))], args, ({{ }})))))}}' in render_dict["props"] ) diff --git a/tests/components/core/test_banner.py b/tests/components/core/test_banner.py index 184a65cc9e..f46ee16b1a 100644 --- a/tests/components/core/test_banner.py +++ b/tests/components/core/test_banner.py @@ -9,8 +9,11 @@ def test_websocket_target_url(): url = WebsocketTargetURL.create() - _imports = url._get_all_imports(collapse=True) - assert tuple(_imports) == ("/utils/state", "/env.json") + var_data = url._get_all_var_data() + assert var_data is not None + assert sorted(tuple((key for key, _ in var_data.imports))) == sorted( + ("/utils/state", "/env.json") + ) def test_connection_banner(): diff --git a/tests/components/core/test_colors.py b/tests/components/core/test_colors.py index 0c14c8a7c1..d5d5dc9958 100644 --- a/tests/components/core/test_colors.py +++ b/tests/components/core/test_colors.py @@ -3,7 +3,7 @@ import reflex as rx from reflex.components.datadisplay.code import CodeBlock from reflex.constants.colors import Color -from reflex.vars import Var +from reflex.ivars.base import LiteralVar class ColorState(rx.State): @@ -18,38 +18,38 @@ class ColorState(rx.State): def create_color_var(color): - return Var.create(color) + return LiteralVar.create(color) @pytest.mark.parametrize( "color, expected", [ - (create_color_var(rx.color("mint")), "var(--mint-7)"), - (create_color_var(rx.color("mint", 3)), "var(--mint-3)"), - (create_color_var(rx.color("mint", 3, True)), "var(--mint-a3)"), + (create_color_var(rx.color("mint")), '"var(--mint-7)"'), + (create_color_var(rx.color("mint", 3)), '"var(--mint-3)"'), + (create_color_var(rx.color("mint", 3, True)), '"var(--mint-a3)"'), ( create_color_var(rx.color(ColorState.color, ColorState.shade)), # type: ignore - f"var(--${{{color_state_name}.color}}-${{{color_state_name}.shade}})", + f'("var(--"+{str(color_state_name)}.color+"-"+{str(color_state_name)}.shade+")")', ), ( create_color_var(rx.color(f"{ColorState.color}", f"{ColorState.shade}")), # type: ignore - f"var(--${{{color_state_name}.color}}-${{{color_state_name}.shade}})", + f'("var(--"+{str(color_state_name)}.color+"-"+{str(color_state_name)}.shade+")")', ), ( create_color_var( rx.color(f"{ColorState.color_part}ato", f"{ColorState.shade}") # type: ignore ), - f"var(--${{{color_state_name}.color_part}}ato-${{{color_state_name}.shade}})", + f'("var(--"+{str(color_state_name)}.color_part+"ato-"+{str(color_state_name)}.shade+")")', ), ( create_color_var(f'{rx.color(ColorState.color, f"{ColorState.shade}")}'), # type: ignore - f"var(--${{{color_state_name}.color}}-${{{color_state_name}.shade}})", + f'("var(--"+{str(color_state_name)}.color+"-"+{str(color_state_name)}.shade+")")', ), ( create_color_var( f'{rx.color(f"{ColorState.color}", f"{ColorState.shade}")}' # type: ignore ), - f"var(--${{{color_state_name}.color}}-${{{color_state_name}.shade}})", + f'("var(--"+{str(color_state_name)}.color+"-"+{str(color_state_name)}.shade+")")', ), ], ) @@ -67,11 +67,11 @@ def test_color(color, expected): [ ( rx.cond(True, rx.color("mint"), rx.color("tomato", 5)), - "{isTrue(true) ? `var(--mint-7)` : `var(--tomato-5)`}", + '(Boolean(true) ? "var(--mint-7)" : "var(--tomato-5)")', ), ( rx.cond(True, rx.color(ColorState.color), rx.color(ColorState.color, 5)), # type: ignore - f"{{isTrue(true) ? `var(--${{{color_state_name}.color}}-7)` : `var(--${{{color_state_name}.color}}-5)`}}", + f'(Boolean(true) ? ("var(--"+{str(color_state_name)}.color+"-7)") : ("var(--"+{str(color_state_name)}.color+"-5)"))', ), ( rx.match( @@ -80,9 +80,9 @@ def test_color(color, expected): ("second", rx.color("tomato", 5)), rx.color(ColorState.color, 2), # type: ignore ), - "{(() => { switch (JSON.stringify(`condition`)) {case JSON.stringify(`first`): return (`var(--mint-7)`);" - " break;case JSON.stringify(`second`): return (`var(--tomato-5)`); break;default: " - f"return (`var(--${{{color_state_name}.color}}-2)`); break;}};}})()}}", + '(() => { switch (JSON.stringify("condition")) {case JSON.stringify("first"): return ("var(--mint-7)");' + ' break;case JSON.stringify("second"): return ("var(--tomato-5)"); break;default: ' + f'return (("var(--"+{str(color_state_name)}.color+"-2)")); break;}};}})()', ), ( rx.match( @@ -91,10 +91,10 @@ def test_color(color, expected): ("second", rx.color(ColorState.color, 5)), # type: ignore rx.color(ColorState.color, 2), # type: ignore ), - "{(() => { switch (JSON.stringify(`condition`)) {case JSON.stringify(`first`): " - f"return (`var(--${{{color_state_name}.color}}-7)`); break;case JSON.stringify(`second`): " - f"return (`var(--${{{color_state_name}.color}}-5)`); break;default: " - f"return (`var(--${{{color_state_name}.color}}-2)`); break;}};}})()}}", + '(() => { switch (JSON.stringify("condition")) {case JSON.stringify("first"): ' + f'return (("var(--"+{str(color_state_name)}.color+"-7)")); break;case JSON.stringify("second"): ' + f'return (("var(--"+{str(color_state_name)}.color+"-5)")); break;default: ' + f'return (("var(--"+{str(color_state_name)}.color+"-2)")); break;}};}})()', ), ], ) @@ -105,12 +105,12 @@ def test_color_with_conditionals(cond_var, expected): @pytest.mark.parametrize( "color, expected", [ - (create_color_var(rx.color("red")), "{`var(--red-7)`}"), - (create_color_var(rx.color("green", shade=1)), "{`var(--green-1)`}"), - (create_color_var(rx.color("blue", alpha=True)), "{`var(--blue-a7)`}"), - ("red", "red"), - ("green", "green"), - ("blue", "blue"), + (create_color_var(rx.color("red")), '"var(--red-7)"'), + (create_color_var(rx.color("green", shade=1)), '"var(--green-1)"'), + (create_color_var(rx.color("blue", alpha=True)), '"var(--blue-a7)"'), + ("red", '"red"'), + ("green", '"green"'), + ("blue", '"blue"'), ], ) def test_radix_color(color, expected): @@ -122,4 +122,4 @@ def test_radix_color(color, expected): expected (str): The expected custom_style string, radix or literal """ code_block = CodeBlock.create("Hello World", background_color=color) - assert code_block.custom_style["backgroundColor"].__format__("") == expected # type: ignore + assert str(code_block.custom_style["backgroundColor"]) == expected # type: ignore diff --git a/tests/components/core/test_cond.py b/tests/components/core/test_cond.py index e18be22175..e3fc40ae36 100644 --- a/tests/components/core/test_cond.py +++ b/tests/components/core/test_cond.py @@ -6,9 +6,10 @@ from reflex.components.base.fragment import Fragment from reflex.components.core.cond import Cond, cond from reflex.components.radix.themes.typography.text import Text +from reflex.ivars.base import ImmutableVar, LiteralVar, immutable_computed_var from reflex.state import BaseState, State from reflex.utils.format import format_state_name -from reflex.vars import BaseVar, Var, computed_var +from reflex.vars import Var @pytest.fixture @@ -21,8 +22,8 @@ class CondState(BaseState): def test_f_string_cond_interpolation(): # make sure backticks inside interpolation don't get escaped - var = Var.create(f"x {cond(True, 'a', 'b')}") - assert str(var) == "x ${isTrue(true) ? `a` : `b`}" + var = LiteralVar.create(f"x {cond(True, 'a', 'b')}") + assert str(var) == '("x "+(Boolean(true) ? "a" : "b"))' @pytest.mark.parametrize( @@ -57,7 +58,7 @@ def test_validate_cond(cond_state: BaseState): [true_value_text] = true_value["children"] assert true_value_text["name"] == "RadixThemesText" - assert true_value_text["children"][0]["contents"] == "{`cond is True`}" + assert true_value_text["children"][0]["contents"] == '{"cond is True"}' # false value false_value = condition["false_value"] @@ -65,7 +66,7 @@ def test_validate_cond(cond_state: BaseState): [false_value_text] = false_value["children"] assert false_value_text["name"] == "RadixThemesText" - assert false_value_text["children"][0]["contents"] == "{`cond is False`}" + assert false_value_text["children"][0]["contents"] == '{"cond is False"}' @pytest.mark.parametrize( @@ -93,10 +94,10 @@ def test_prop_cond(c1: Any, c2: Any): assert isinstance(prop_cond, Var) if not isinstance(c1, Var): - c1 = json.dumps(c1).replace('"', "`") + c1 = json.dumps(c1) if not isinstance(c2, Var): - c2 = json.dumps(c2).replace('"', "`") - assert str(prop_cond) == f"{{isTrue(true) ? {c1} : {c2}}}" + c2 = json.dumps(c2) + assert str(prop_cond) == f"(Boolean(true) ? {c1} : {c2})" def test_cond_no_mix(): @@ -125,23 +126,23 @@ def test_cond_computed_var(): """Test if cond works with computed vars.""" class CondStateComputed(State): - @computed_var + @immutable_computed_var def computed_int(self) -> int: return 0 - @computed_var + @immutable_computed_var def computed_str(self) -> str: return "a string" comp = cond(True, CondStateComputed.computed_int, CondStateComputed.computed_str) # TODO: shouln't this be a ComputedVar? - assert isinstance(comp, BaseVar) + assert isinstance(comp, ImmutableVar) state_name = format_state_name(CondStateComputed.get_full_name()) assert ( str(comp) - == f"{{isTrue(true) ? {state_name}.computed_int : {state_name}.computed_str}}" + == f"(Boolean(true) ? {state_name}.computed_int : {state_name}.computed_str)" ) assert comp._var_type == Union[int, str] diff --git a/tests/components/core/test_debounce.py b/tests/components/core/test_debounce.py index 8ad15ea58a..95feb7ae69 100644 --- a/tests/components/core/test_debounce.py +++ b/tests/components/core/test_debounce.py @@ -4,8 +4,8 @@ import reflex as rx from reflex.components.core.debounce import DEFAULT_DEBOUNCE_TIMEOUT +from reflex.ivars.base import LiteralVar from reflex.state import BaseState -from reflex.vars import BaseVar def test_create_no_child(): @@ -60,11 +60,7 @@ def test_render_child_props(): assert "css" in tag.props and isinstance(tag.props["css"], rx.Var) for prop in ["foo", "bar", "baz", "quuc"]: assert prop in str(tag.props["css"]) - assert tag.props["value"].equals( - BaseVar( - _var_name="real", _var_type=str, _var_is_local=True, _var_is_string=False - ) - ) + assert tag.props["value"].equals(LiteralVar.create("real")) assert len(tag.props["onChange"].events) == 1 assert tag.props["onChange"].events[0].handler == S.on_change assert tag.contents == "" @@ -156,11 +152,7 @@ def test_render_child_props_recursive(): assert "css" in tag.props and isinstance(tag.props["css"], rx.Var) for prop in ["foo", "bar", "baz", "quuc"]: assert prop in str(tag.props["css"]) - assert tag.props["value"].equals( - BaseVar( - _var_name="outer", _var_type=str, _var_is_local=True, _var_is_string=False - ) - ) + assert tag.props["value"].equals(LiteralVar.create("outer")) assert tag.props["forceNotifyOnBlur"]._var_name == "false" assert tag.props["forceNotifyByEnter"]._var_name == "false" assert tag.props["debounceTimeout"]._var_name == "42" diff --git a/tests/components/core/test_foreach.py b/tests/components/core/test_foreach.py index 6e4fa6b5e5..f1fae2577f 100644 --- a/tests/components/core/test_foreach.py +++ b/tests/components/core/test_foreach.py @@ -278,7 +278,7 @@ def test_foreach_component_styles(): ) ) component._add_style_recursive({box: {"color": "red"}}) - assert 'css={{"color": "red"}}' in str(component) + assert 'css={({ ["color"] : "red" })}' in str(component) def test_foreach_component_state(): diff --git a/tests/components/core/test_html.py b/tests/components/core/test_html.py index 325bdcaf95..4847e1d5af 100644 --- a/tests/components/core/test_html.py +++ b/tests/components/core/test_html.py @@ -1,6 +1,7 @@ import pytest from reflex.components.core.html import Html +from reflex.state import State def test_html_no_children(): @@ -15,8 +16,26 @@ def test_html_many_children(): def test_html_create(): html = Html.create("

Hello !

") - assert str(html.dangerouslySetInnerHTML) == '{"__html": "

Hello !

"}' # type: ignore + assert str(html.dangerouslySetInnerHTML) == '({ ["__html"] : "

Hello !

" })' # type: ignore assert ( str(html) - == '
Hello !

"}}/>' + == '
Hello !

" })}/>' + ) + + +def test_html_fstring_create(): + class TestState(State): + """The app state.""" + + myvar: str = "Blue" + + html = Html.create(f"

Hello {TestState.myvar}!

") + + assert ( + str(html.dangerouslySetInnerHTML) # type: ignore + == f'({{ ["__html"] : ("

Hello "+{str(TestState.myvar)}+"!

") }})' + ) + assert ( + str(html) + == f'
' # type: ignore ) diff --git a/tests/components/core/test_match.py b/tests/components/core/test_match.py index 883386ebdb..1843b914d5 100644 --- a/tests/components/core/test_match.py +++ b/tests/components/core/test_match.py @@ -1,4 +1,4 @@ -from typing import Tuple +from typing import Dict, List, Tuple import pytest @@ -6,7 +6,7 @@ from reflex.components.core.match import Match from reflex.state import BaseState from reflex.utils.exceptions import MatchTypeError -from reflex.vars import BaseVar +from reflex.vars import Var class MatchState(BaseState): @@ -35,7 +35,7 @@ def test_match_components(): [match_child] = match_dict["children"] assert match_child["name"] == "match" - assert str(match_child["cond"]) == f"{{{MatchState.get_name()}.value}}" + assert str(match_child["cond"]) == f"{MatchState.get_name()}.value" match_cases = match_child["match_cases"] assert len(match_cases) == 6 @@ -44,7 +44,7 @@ def test_match_components(): assert match_cases[0][0]._var_type == int first_return_value_render = match_cases[0][1].render() assert first_return_value_render["name"] == "RadixThemesText" - assert first_return_value_render["children"][0]["contents"] == "{`first value`}" + assert first_return_value_render["children"][0]["contents"] == '{"first value"}' assert match_cases[1][0]._var_name == "2" assert match_cases[1][0]._var_type == int @@ -52,36 +52,36 @@ def test_match_components(): assert match_cases[1][1]._var_type == int second_return_value_render = match_cases[1][2].render() assert second_return_value_render["name"] == "RadixThemesText" - assert second_return_value_render["children"][0]["contents"] == "{`second value`}" + assert second_return_value_render["children"][0]["contents"] == '{"second value"}' assert match_cases[2][0]._var_name == "[1, 2]" - assert match_cases[2][0]._var_type == list + assert match_cases[2][0]._var_type == List[int] third_return_value_render = match_cases[2][1].render() assert third_return_value_render["name"] == "RadixThemesText" - assert third_return_value_render["children"][0]["contents"] == "{`third value`}" + assert third_return_value_render["children"][0]["contents"] == '{"third value"}' - assert match_cases[3][0]._var_name == "random" + assert match_cases[3][0]._var_name == '"random"' assert match_cases[3][0]._var_type == str fourth_return_value_render = match_cases[3][1].render() assert fourth_return_value_render["name"] == "RadixThemesText" - assert fourth_return_value_render["children"][0]["contents"] == "{`fourth value`}" + assert fourth_return_value_render["children"][0]["contents"] == '{"fourth value"}' - assert match_cases[4][0]._var_name == '{"foo": "bar"}' - assert match_cases[4][0]._var_type == dict + assert match_cases[4][0]._var_name == '({ ["foo"] : "bar" })' + assert match_cases[4][0]._var_type == Dict[str, str] fifth_return_value_render = match_cases[4][1].render() assert fifth_return_value_render["name"] == "RadixThemesText" - assert fifth_return_value_render["children"][0]["contents"] == "{`fifth value`}" + assert fifth_return_value_render["children"][0]["contents"] == '{"fifth value"}' - assert match_cases[5][0]._var_name == f"(({MatchState.get_name()}.num) + (1))" + assert match_cases[5][0]._var_name == f"({MatchState.get_name()}.num + 1)" assert match_cases[5][0]._var_type == int fifth_return_value_render = match_cases[5][1].render() assert fifth_return_value_render["name"] == "RadixThemesText" - assert fifth_return_value_render["children"][0]["contents"] == "{`sixth value`}" + assert fifth_return_value_render["children"][0]["contents"] == '{"sixth value"}' default = match_child["default"].render() assert default["name"] == "RadixThemesText" - assert default["children"][0]["contents"] == "{`default value`}" + assert default["children"][0]["contents"] == '{"default value"}' @pytest.mark.parametrize( @@ -99,12 +99,12 @@ def test_match_components(): (MatchState.string, f"{MatchState.value} - string"), "default value", ), - f"(() => {{ switch (JSON.stringify({MatchState.get_name()}.value)) {{case JSON.stringify(1): return (`first`); break;case JSON.stringify(2): case JSON.stringify(3): return " - "(`second value`); break;case JSON.stringify([1, 2]): return (`third-value`); break;case JSON.stringify(`random`): " - 'return (`fourth_value`); break;case JSON.stringify({"foo": "bar"}): return (`fifth value`); ' - f"break;case JSON.stringify((({MatchState.get_name()}.num) + (1))): return (`sixth value`); break;case JSON.stringify(`${{{MatchState.get_name()}.value}} - string`): " - f"return ({MatchState.get_name()}.string); break;case JSON.stringify({MatchState.get_name()}.string): return (`${{{MatchState.get_name()}.value}} - string`); break;default: " - "return (`default value`); break;};})()", + f'(() => {{ switch (JSON.stringify({MatchState.get_name()}.value)) {{case JSON.stringify(1): return ("first"); break;case JSON.stringify(2): case JSON.stringify(3): return ' + '("second value"); break;case JSON.stringify([1, 2]): return ("third-value"); break;case JSON.stringify("random"): ' + 'return ("fourth_value"); break;case JSON.stringify(({ ["foo"] : "bar" })): return ("fifth value"); ' + f'break;case JSON.stringify(({MatchState.get_name()}.num + 1)): return ("sixth value"); break;case JSON.stringify(({MatchState.get_name()}.value+" - string")): ' + f'return ({MatchState.get_name()}.string); break;case JSON.stringify({MatchState.get_name()}.string): return (({MatchState.get_name()}.value+" - string")); break;default: ' + 'return ("default value"); break;};})()', ), ( ( @@ -118,11 +118,11 @@ def test_match_components(): (MatchState.string, f"{MatchState.value} - string"), MatchState.string, ), - f"(() => {{ switch (JSON.stringify({MatchState.get_name()}.value)) {{case JSON.stringify(1): return (`first`); break;case JSON.stringify(2): case JSON.stringify(3): return " - "(`second value`); break;case JSON.stringify([1, 2]): return (`third-value`); break;case JSON.stringify(`random`): " - 'return (`fourth_value`); break;case JSON.stringify({"foo": "bar"}): return (`fifth value`); ' - f"break;case JSON.stringify((({MatchState.get_name()}.num) + (1))): return (`sixth value`); break;case JSON.stringify(`${{{MatchState.get_name()}.value}} - string`): " - f"return ({MatchState.get_name()}.string); break;case JSON.stringify({MatchState.get_name()}.string): return (`${{{MatchState.get_name()}.value}} - string`); break;default: " + f'(() => {{ switch (JSON.stringify({MatchState.get_name()}.value)) {{case JSON.stringify(1): return ("first"); break;case JSON.stringify(2): case JSON.stringify(3): return ' + '("second value"); break;case JSON.stringify([1, 2]): return ("third-value"); break;case JSON.stringify("random"): ' + 'return ("fourth_value"); break;case JSON.stringify(({ ["foo"] : "bar" })): return ("fifth value"); ' + f'break;case JSON.stringify(({MatchState.get_name()}.num + 1)): return ("sixth value"); break;case JSON.stringify(({MatchState.get_name()}.value+" - string")): ' + f'return ({MatchState.get_name()}.string); break;case JSON.stringify({MatchState.get_name()}.string): return (({MatchState.get_name()}.value+" - string")); break;default: ' f"return ({MatchState.get_name()}.string); break;}};}})()", ), ], @@ -135,7 +135,7 @@ def test_match_vars(cases, expected): expected: The expected var full name. """ match_comp = Match.create(MatchState.value, *cases) - assert isinstance(match_comp, BaseVar) + assert isinstance(match_comp, Var) assert match_comp._var_full_name == expected @@ -247,8 +247,8 @@ def test_match_case_tuple_elements(match_case): (MatchState.num + 1, "black"), rx.text("default value"), ), - "Match cases should have the same return types. Case 3 with return value `red` of type " - " is not ", + 'Match cases should have the same return types. Case 3 with return value `"red"` of type ' + " is not ", ), ( ( @@ -260,8 +260,8 @@ def test_match_case_tuple_elements(match_case): ([1, 2], rx.text("third value")), rx.text("default value"), ), - "Match cases should have the same return types. Case 3 with return value ` {`first value`} ` " - "of type is not ", + 'Match cases should have the same return types. Case 3 with return value ` {"first value"} ` ' + "of type is not ", ), ], ) diff --git a/tests/components/datadisplay/test_code.py b/tests/components/datadisplay/test_code.py index 64452e90cd..49fbae09f5 100644 --- a/tests/components/datadisplay/test_code.py +++ b/tests/components/datadisplay/test_code.py @@ -4,7 +4,7 @@ @pytest.mark.parametrize( - "theme, expected", [("light", "one-light"), ("dark", "one-dark")] + "theme, expected", [("light", '"one-light"'), ("dark", '"one-dark"')] ) def test_code_light_dark_theme(theme, expected): code_block = CodeBlock.create(theme=theme) diff --git a/tests/components/forms/test_uploads.py b/tests/components/forms/test_uploads.py index f8856a20f7..3b2ee014f2 100644 --- a/tests/components/forms/test_uploads.py +++ b/tests/components/forms/test_uploads.py @@ -83,11 +83,11 @@ def test_upload_root_component_render(upload_root_component): # upload assert upload["name"] == "ReactDropzone" assert upload["props"] == [ - "id={`default`}", + 'id={"default"}', "multiple={true}", "onDrop={e => setFilesById(filesById => {\n" " const updatedFilesById = Object.assign({}, filesById);\n" - " updatedFilesById[`default`] = e;\n" + ' updatedFilesById["default"] = e;\n' " return updatedFilesById;\n" " })\n" " }", @@ -99,23 +99,23 @@ def test_upload_root_component_render(upload_root_component): [box] = upload["children"] assert box["name"] == "RadixThemesBox" assert box["props"] == [ - "className={`rx-Upload`}", - 'css={{"border": "1px dotted black"}}', + 'className={"rx-Upload"}', + 'css={({ ["border"] : "1px dotted black" })}', "{...getRootProps()}", ] # input, button and text inside of box [input, button, text] = box["children"] assert input["name"] == "input" - assert input["props"] == ["type={`file`}", "{...getInputProps()}"] + assert input["props"] == ['type={"file"}', "{...getInputProps()}"] assert button["name"] == "RadixThemesButton" - assert button["children"][0]["contents"] == "{`select file`}" + assert button["children"][0]["contents"] == '{"select file"}' assert text["name"] == "RadixThemesText" assert ( text["children"][0]["contents"] - == "{`Drag and drop files here or click to select files`}" + == '{"Drag and drop files here or click to select files"}' ) @@ -130,11 +130,11 @@ def test_upload_component_render(upload_component): # upload assert upload["name"] == "ReactDropzone" assert upload["props"] == [ - "id={`default`}", + 'id={"default"}', "multiple={true}", "onDrop={e => setFilesById(filesById => {\n" " const updatedFilesById = Object.assign({}, filesById);\n" - " updatedFilesById[`default`] = e;\n" + ' updatedFilesById["default"] = e;\n' " return updatedFilesById;\n" " })\n" " }", @@ -146,23 +146,23 @@ def test_upload_component_render(upload_component): [box] = upload["children"] assert box["name"] == "RadixThemesBox" assert box["props"] == [ - "className={`rx-Upload`}", - 'css={{"border": "1px dotted black", "padding": "5em", "textAlign": "center"}}', + 'className={"rx-Upload"}', + 'css={({ ["border"] : "1px dotted black", ["padding"] : "5em", ["textAlign"] : "center" })}', "{...getRootProps()}", ] # input, button and text inside of box [input, button, text] = box["children"] assert input["name"] == "input" - assert input["props"] == ["type={`file`}", "{...getInputProps()}"] + assert input["props"] == ['type={"file"}', "{...getInputProps()}"] assert button["name"] == "RadixThemesButton" - assert button["children"][0]["contents"] == "{`select file`}" + assert button["children"][0]["contents"] == '{"select file"}' assert text["name"] == "RadixThemesText" assert ( text["children"][0]["contents"] - == "{`Drag and drop files here or click to select files`}" + == '{"Drag and drop files here or click to select files"}' ) @@ -175,13 +175,13 @@ def test_upload_component_with_props_render(upload_component_with_props): upload = upload_component_with_props.render() assert upload["props"] == [ - "id={`default`}", + 'id={"default"}', "maxFiles={2}", "multiple={true}", "noDrag={true}", "onDrop={e => setFilesById(filesById => {\n" " const updatedFilesById = Object.assign({}, filesById);\n" - " updatedFilesById[`default`] = e;\n" + ' updatedFilesById["default"] = e;\n' " return updatedFilesById;\n" " })\n" " }", @@ -193,11 +193,11 @@ def test_upload_component_id_with_special_chars(upload_component_id_special): upload = upload_component_id_special.render() assert upload["props"] == [ - r"id={`#spec!\`al-_98ID`}", + r'id={"#spec!`al-_98ID"}', "multiple={true}", "onDrop={e => setFilesById(filesById => {\n" " const updatedFilesById = Object.assign({}, filesById);\n" - " updatedFilesById[`#spec!\\`al-_98ID`] = e;\n" + ' updatedFilesById["#spec!`al-_98ID"] = e;\n' " return updatedFilesById;\n" " })\n" " }", diff --git a/tests/components/media/test_image.py b/tests/components/media/test_image.py index a39895c679..ba8353260f 100644 --- a/tests/components/media/test_image.py +++ b/tests/components/media/test_image.py @@ -6,6 +6,7 @@ import reflex as rx from reflex.components.next.image import Image # type: ignore +from reflex.ivars.sequence import StringVar from reflex.utils.serializers import serialize, serialize_image @@ -36,9 +37,13 @@ def test_set_src_str(): """Test that setting the src works.""" image = rx.image(src="pic2.jpeg") # when using next/image, we explicitly create a _var_is_str Var - # assert str(image.src) == "{`pic2.jpeg`}" # type: ignore + assert str(image.src) in ( # type: ignore + '"pic2.jpeg"', + "'pic2.jpeg'", + "`pic2.jpeg`", + ) # For plain rx.el.img, an explicit var is not created, so the quoting happens later - assert str(image.src) == "pic2.jpeg" # type: ignore + # assert str(image.src) == "pic2.jpeg" # type: ignore def test_set_src_img(pil_image: Img): @@ -48,7 +53,7 @@ def test_set_src_img(pil_image: Img): pil_image: The image to serialize. """ image = Image.create(src=pil_image) - assert str(image.src._var_name) == serialize_image(pil_image) # type: ignore + assert str(image.src._var_name) == '"' + serialize_image(pil_image) + '"' # type: ignore def test_render(pil_image: Img): @@ -58,4 +63,4 @@ def test_render(pil_image: Img): pil_image: The image to serialize. """ image = Image.create(src=pil_image) - assert image.src._var_is_string # type: ignore + assert isinstance(image.src, StringVar) # type: ignore diff --git a/tests/components/test_component.py b/tests/components/test_component.py index 3d32a53d7a..45350a5c5f 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -18,6 +18,7 @@ ) from reflex.constants import EventTriggers from reflex.event import EventChain, EventHandler, parse_args_spec +from reflex.ivars.base import LiteralVar from reflex.state import BaseState from reflex.style import Style from reflex.utils import imports @@ -230,8 +231,8 @@ def test_set_style_attrs(component1): component1: A test component. """ component = component1(color="white", text_align="center") - assert component.style["color"] == "white" - assert component.style["textAlign"] == "center" + assert str(component.style["color"]) == '"white"' + assert str(component.style["textAlign"]) == '"center"' def test_custom_attrs(component1): @@ -255,7 +256,10 @@ def test_create_component(component1): c = component1.create(*children, **attrs) assert isinstance(c, component1) assert c.children == children - assert c.style == {"color": "white", "textAlign": "center"} + assert ( + str(LiteralVar.create(c.style)) + == '({ ["color"] : "white", ["textAlign"] : "center" })' + ) @pytest.mark.parametrize( @@ -419,8 +423,8 @@ def test_add_style(component1, component2): } c1 = component1()._add_style_recursive(style) # type: ignore c2 = component2()._add_style_recursive(style) # type: ignore - assert c1.style["color"] == "white" - assert c2.style["color"] == "black" + assert str(c1.style["color"]) == '"white"' + assert str(c2.style["color"]) == '"black"' def test_add_style_create(component1, component2): @@ -436,8 +440,8 @@ def test_add_style_create(component1, component2): } c1 = component1()._add_style_recursive(style) # type: ignore c2 = component2()._add_style_recursive(style) # type: ignore - assert c1.style["color"] == "white" - assert c2.style["color"] == "black" + assert str(c1.style["color"]) == '"white"' + assert str(c2.style["color"]) == '"black"' def test_get_imports(component1, component2): @@ -607,8 +611,8 @@ def test_create_filters_none_props(test_component): assert "prop4" not in component.get_props() # Assert that the style prop is present in the component's props - assert component.style["color"] == "white" - assert component.style["text-align"] == "center" + assert str(component.style["color"]) == '"white"' + assert str(component.style["text-align"]) == '"center"' @pytest.mark.parametrize("children", [((None,),), ("foo", ("bar", (None,)))]) @@ -635,7 +639,7 @@ def test_component_create_unallowed_types(children, test_component): "children": [ { "name": "RadixThemesText", - "props": ["as={`p`}"], + "props": ['as={"p"}'], "contents": "", "args": None, "special_props": set(), @@ -643,7 +647,7 @@ def test_component_create_unallowed_types(children, test_component): { "name": "", "props": [], - "contents": "{`first_text`}", + "contents": '{"first_text"}', "args": None, "special_props": set(), "children": [], @@ -670,7 +674,7 @@ def test_component_create_unallowed_types(children, test_component): "args": None, "autofocus": False, "children": [], - "contents": "{`first_text`}", + "contents": '{"first_text"}', "name": "", "props": [], "special_props": set(), @@ -678,7 +682,7 @@ def test_component_create_unallowed_types(children, test_component): ], "contents": "", "name": "RadixThemesText", - "props": ["as={`p`}"], + "props": ['as={"p"}'], "special_props": set(), }, { @@ -689,7 +693,7 @@ def test_component_create_unallowed_types(children, test_component): "args": None, "autofocus": False, "children": [], - "contents": "{`second_text`}", + "contents": '{"second_text"}', "name": "", "props": [], "special_props": set(), @@ -697,7 +701,7 @@ def test_component_create_unallowed_types(children, test_component): ], "contents": "", "name": "RadixThemesText", - "props": ["as={`p`}"], + "props": ['as={"p"}'], "special_props": set(), }, ], @@ -721,7 +725,7 @@ def test_component_create_unallowed_types(children, test_component): "args": None, "autofocus": False, "children": [], - "contents": "{`first_text`}", + "contents": '{"first_text"}', "name": "", "props": [], "special_props": set(), @@ -729,7 +733,7 @@ def test_component_create_unallowed_types(children, test_component): ], "contents": "", "name": "RadixThemesText", - "props": ["as={`p`}"], + "props": ['as={"p"}'], "special_props": set(), }, { @@ -748,7 +752,7 @@ def test_component_create_unallowed_types(children, test_component): "args": None, "autofocus": False, "children": [], - "contents": "{`second_text`}", + "contents": '{"second_text"}', "name": "", "props": [], "special_props": set(), @@ -756,7 +760,7 @@ def test_component_create_unallowed_types(children, test_component): ], "contents": "", "name": "RadixThemesText", - "props": ["as={`p`}"], + "props": ['as={"p"}'], "special_props": set(), } ], @@ -825,9 +829,9 @@ def get_event_triggers(self) -> Dict[str, Any]: comp = C1.create(on_foo=C1State.mock_handler) assert comp.render()["props"][0] == ( - "onFoo={(__e,_alpha,_bravo,_charlie) => addEvents(" - f'[Event("{C1State.get_full_name()}.mock_handler", {{_e:__e.target.value,_bravo:_bravo["nested"],_charlie:((_charlie.custom) + (42))}})], ' - "[__e,_alpha,_bravo,_charlie], {})}" + "onFoo={((__e, _alpha, _bravo, _charlie) => ((addEvents(" + f'[(Event("{C1State.get_full_name()}.mock_handler", ({{ ["_e"] : __e["target"]["value"], ["_bravo"] : _bravo["nested"], ["_charlie"] : (_charlie["custom"] + 42) }})))], ' + "[__e, _alpha, _bravo, _charlie], ({ })))))}" ) @@ -1003,10 +1007,10 @@ def test_component_with_only_valid_children(fixture, request): @pytest.mark.parametrize( "component,rendered", [ - (rx.text("hi"), "\n {`hi`}\n"), + (rx.text("hi"), '\n {"hi"}\n'), ( rx.box(rc.heading("test", size="md")), - "\n \n {`test`}\n\n", + '\n \n {"test"}\n\n', ), ], ) @@ -1061,7 +1065,7 @@ def test_stateful_banner(): assert isinstance(stateful_component, StatefulComponent) -TEST_VAR = Var.create_safe("test")._replace( +TEST_VAR = LiteralVar.create("test")._replace( merge_var_data=VarData( hooks={"useTest": None}, imports={"test": [ImportVar(tag="test")]}, @@ -1069,36 +1073,36 @@ def test_stateful_banner(): interpolations=[], ) ) -FORMATTED_TEST_VAR = Var.create(f"foo{TEST_VAR}bar") -STYLE_VAR = TEST_VAR._replace(_var_name="style", _var_is_local=False) +FORMATTED_TEST_VAR = LiteralVar.create(f"foo{TEST_VAR}bar") +STYLE_VAR = TEST_VAR._replace(_var_name="style") EVENT_CHAIN_VAR = TEST_VAR._replace(_var_type=EventChain) ARG_VAR = Var.create("arg") -TEST_VAR_DICT_OF_DICT = Var.create_safe({"a": {"b": "test"}})._replace( - merge_var_data=TEST_VAR._var_data -) -FORMATTED_TEST_VAR_DICT_OF_DICT = Var.create_safe({"a": {"b": f"footestbar"}})._replace( +TEST_VAR_DICT_OF_DICT = LiteralVar.create({"a": {"b": "test"}})._replace( merge_var_data=TEST_VAR._var_data ) +FORMATTED_TEST_VAR_DICT_OF_DICT = LiteralVar.create( + {"a": {"b": f"footestbar"}} +)._replace(merge_var_data=TEST_VAR._var_data) -TEST_VAR_LIST_OF_LIST = Var.create_safe([["test"]])._replace( +TEST_VAR_LIST_OF_LIST = LiteralVar.create([["test"]])._replace( merge_var_data=TEST_VAR._var_data ) -FORMATTED_TEST_VAR_LIST_OF_LIST = Var.create_safe([["footestbar"]])._replace( +FORMATTED_TEST_VAR_LIST_OF_LIST = LiteralVar.create([["footestbar"]])._replace( merge_var_data=TEST_VAR._var_data ) -TEST_VAR_LIST_OF_LIST_OF_LIST = Var.create_safe([[["test"]]])._replace( - merge_var_data=TEST_VAR._var_data -) -FORMATTED_TEST_VAR_LIST_OF_LIST_OF_LIST = Var.create_safe([[["footestbar"]]])._replace( +TEST_VAR_LIST_OF_LIST_OF_LIST = LiteralVar.create([[["test"]]])._replace( merge_var_data=TEST_VAR._var_data ) +FORMATTED_TEST_VAR_LIST_OF_LIST_OF_LIST = LiteralVar.create( + [[["footestbar"]]] +)._replace(merge_var_data=TEST_VAR._var_data) -TEST_VAR_LIST_OF_DICT = Var.create_safe([{"a": "test"}])._replace( +TEST_VAR_LIST_OF_DICT = LiteralVar.create([{"a": "test"}])._replace( merge_var_data=TEST_VAR._var_data ) -FORMATTED_TEST_VAR_LIST_OF_DICT = Var.create_safe([{"a": "footestbar"}])._replace( +FORMATTED_TEST_VAR_LIST_OF_DICT = LiteralVar.create([{"a": "footestbar"}])._replace( merge_var_data=TEST_VAR._var_data ) @@ -1187,7 +1191,7 @@ def handler2(self, arg): id="direct-special_props", ), pytest.param( - rx.fragment(special_props={Var.create(f"foo{TEST_VAR}bar")}), + rx.fragment(special_props={LiteralVar.create(f"foo{TEST_VAR}bar")}), [FORMATTED_TEST_VAR], id="fstring-special_props", ), @@ -1296,6 +1300,8 @@ def test_get_vars(component, exp_vars): comp_vars, sorted(exp_vars, key=lambda v: v._var_name), ): + # print(str(comp_var), str(exp_var)) + # print(comp_var._get_all_var_data(), exp_var._get_all_var_data()) assert comp_var.equals(exp_var) @@ -1335,9 +1341,11 @@ def test_instantiate_all_components(): continue component = getattr( rx, - component_name - if not isinstance(component_name, tuple) - else component_name[1], + ( + component_name + if not isinstance(component_name, tuple) + else component_name[1] + ), ) if isinstance(component, type) and issubclass(component, Component): component.create() @@ -1595,14 +1603,14 @@ class C2(C1): c1 = C1.create(prop1="prop1_1", prop2="prop2_1") rendered_c1 = c1.render() - assert "renamed_prop1={`prop1_1`}" in rendered_c1["props"] - assert "renamed_prop2={`prop2_1`}" in rendered_c1["props"] + assert 'renamed_prop1={"prop1_1"}' in rendered_c1["props"] + assert 'renamed_prop2={"prop2_1"}' in rendered_c1["props"] c2 = C2.create(prop1="prop1_2", prop2="prop2_2", prop3="prop3_2") rendered_c2 = c2.render() - assert "renamed_prop1={`prop1_2`}" in rendered_c2["props"] - assert "subclass_prop2={`prop2_2`}" in rendered_c2["props"] - assert "renamed_prop3={`prop3_2`}" in rendered_c2["props"] + assert 'renamed_prop1={"prop1_2"}' in rendered_c2["props"] + assert 'subclass_prop2={"prop2_2"}' in rendered_c2["props"] + assert 'renamed_prop3={"prop3_2"}' in rendered_c2["props"] def test_deprecated_props(capsys): @@ -1626,9 +1634,9 @@ class C1(Component): assert not out_err.out c1_1_render = c1_1.render() - assert "type={`type1`}" in c1_1_render["props"] - assert "min={`min1`}" in c1_1_render["props"] - assert "max={`max1`}" in c1_1_render["props"] + assert 'type={"type1"}' in c1_1_render["props"] + assert 'min={"min1"}' in c1_1_render["props"] + assert 'max={"max1"}' in c1_1_render["props"] # Deprecation warning is emitted with underscore suffix, # but the component still works. @@ -1638,9 +1646,9 @@ class C1(Component): assert not out_err.err c1_2_render = c1_2.render() - assert "type={`type2`}" in c1_2_render["props"] - assert "min={`min2`}" in c1_2_render["props"] - assert "max={`max2`}" in c1_2_render["props"] + assert 'type={"type2"}' in c1_2_render["props"] + assert 'min={"min2"}' in c1_2_render["props"] + assert 'max={"max2"}' in c1_2_render["props"] class C2(Component): tag = "C2" @@ -1656,9 +1664,9 @@ class C2(Component): assert not out_err.out c2_1_render = c2_1.render() - assert "type={`type1`}" in c2_1_render["props"] - assert "min={`min1`}" in c2_1_render["props"] - assert "max={`max1`}" in c2_1_render["props"] + assert 'type={"type1"}' in c2_1_render["props"] + assert 'min={"min1"}' in c2_1_render["props"] + assert 'max={"max1"}' in c2_1_render["props"] def test_custom_component_get_imports(): @@ -2008,11 +2016,11 @@ def test_add_style_embedded_vars(test_state: BaseState): Args: test_state: A test state. """ - v0 = Var.create_safe("parent")._replace( + v0 = LiteralVar.create("parent")._replace( merge_var_data=VarData(hooks={"useParent": None}), # type: ignore ) v1 = rx.color("plum", 10) - v2 = Var.create_safe("text")._replace( + v2 = LiteralVar.create("text")._replace( merge_var_data=VarData(hooks={"useText": None}), # type: ignore ) @@ -2045,7 +2053,7 @@ def add_style(self): assert "useParent" in page._get_all_hooks_internal() assert ( str(page).count( - f'css={{{{"fakeParent": "parent", "color": "var(--plum-10)", "fake": "text", "margin": `${{{test_state.get_name()}.num}}%`}}}}' + f'css={{({{ ["fakeParent"] : "parent", ["color"] : "var(--plum-10)", ["fake"] : "text", ["margin"] : ({test_state.get_name()}.num+"%") }})}}' ) == 1 ) @@ -2066,10 +2074,10 @@ def add_style(self): assert len(page.children[0].children) == 1 # Expect the style to be added to the child of the foreach - assert 'css={{"color": "red"}}' in str(page.children[0].children[0]) + assert 'css={({ ["color"] : "red" })}' in str(page.children[0].children[0]) # Expect only one instance of this CSS dict in the rendered page - assert str(page).count('css={{"color": "red"}}') == 1 + assert str(page).count('css={({ ["color"] : "red" })}') == 1 class TriggerState(rx.State): diff --git a/tests/components/test_component_state.py b/tests/components/test_component_state.py index 0dc0956e24..574997ba53 100644 --- a/tests/components/test_component_state.py +++ b/tests/components/test_component_state.py @@ -35,8 +35,8 @@ def get_component(cls, *children, **props): assert cs1.State.increment != cs2.State.increment assert len(cs1.children) == 1 - assert cs1.children[0].render() == Bare.create("{`a`}").render() + assert cs1.children[0].render() == Bare.create("a").render() assert cs1.id == "a" assert len(cs2.children) == 1 - assert cs2.children[0].render() == Bare.create("{`b`}").render() + assert cs2.children[0].render() == Bare.create("b").render() assert cs2.id == "b" diff --git a/tests/components/test_tag.py b/tests/components/test_tag.py index 2fb2f4563d..d43f73842b 100644 --- a/tests/components/test_tag.py +++ b/tests/components/test_tag.py @@ -3,6 +3,7 @@ import pytest from reflex.components.tags import CondTag, Tag, tagless +from reflex.ivars.base import LiteralVar from reflex.vars import BaseVar, Var @@ -12,8 +13,8 @@ ({}, []), ({"key-hypen": 1}, ["key-hypen={1}"]), ({"key": 1}, ["key={1}"]), - ({"key": "value"}, ["key={`value`}"]), - ({"key": True, "key2": "value2"}, ["key={true}", "key2={`value2`}"]), + ({"key": "value"}, ['key={"value"}']), + ({"key": True, "key2": "value2"}, ["key={true}", 'key2={"value2"}']), ], ) def test_format_props(props: Dict[str, Var], test_props: List): @@ -53,8 +54,8 @@ def test_is_valid_prop(prop: Var, valid: bool): def test_add_props(): """Test that the props are added.""" tag = Tag().add_props(key="value", key2=42, invalid=None, invalid2={}) - assert tag.props["key"].equals(Var.create("value")) - assert tag.props["key2"].equals(Var.create(42)) + assert tag.props["key"].equals(LiteralVar.create("value")) + assert tag.props["key2"].equals(LiteralVar.create(42)) assert "invalid" not in tag.props assert "invalid2" not in tag.props @@ -102,7 +103,7 @@ def test_format_tag(tag: Tag, expected: Dict): assert tag_dict["name"] == expected["name"] assert tag_dict["contents"] == expected["contents"] for prop, prop_value in tag_dict["props"].items(): - assert prop_value.equals(Var.create_safe(expected["props"][prop])) + assert prop_value.equals(LiteralVar.create(expected["props"][prop])) def test_format_cond_tag(): diff --git a/tests/test_app.py b/tests/test_app.py index 17afd2bb73..efaca4234d 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -1252,7 +1252,7 @@ def test_app_wrap_compile_theme(compilable_app: tuple[App, Path]): "function AppWrap({children}) {" "return (" "" - "" + "" "" "{children}" "" @@ -1434,16 +1434,16 @@ def page2(): assert isinstance((fragment_wrapper := app.pages["index"].children[0]), Fragment) assert isinstance((first_text := fragment_wrapper.children[0]), Text) - assert str(first_text.children[0].contents) == "{`first`}" # type: ignore + assert str(first_text.children[0].contents) == '"first"' # type: ignore assert isinstance((second_text := fragment_wrapper.children[1]), Text) - assert str(second_text.children[0].contents) == "{`second`}" # type: ignore + assert str(second_text.children[0].contents) == '"second"' # type: ignore # Test page with trailing comma. assert isinstance( (page2_fragment_wrapper := app.pages["page2"].children[0]), Fragment ) assert isinstance((third_text := page2_fragment_wrapper.children[0]), Text) - assert str(third_text.children[0].contents) == "{`third`}" # type: ignore + assert str(third_text.children[0].contents) == '"third"' # type: ignore @pytest.mark.parametrize("export", (True, False)) diff --git a/tests/test_event.py b/tests/test_event.py index 284542a434..a484e0a3c3 100644 --- a/tests/test_event.py +++ b/tests/test_event.py @@ -1,10 +1,10 @@ -import json from typing import List import pytest from reflex import event from reflex.event import Event, EventHandler, EventSpec, call_event_handler, fix_events +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.state import BaseState from reflex.utils import format from reflex.vars import Var @@ -70,7 +70,7 @@ def test_fn_with_args(_, arg1, arg2): event_spec = handler("first", "second") # type: ignore assert ( format.format_event(event_spec) - == 'Event("test_fn_with_args", {arg1:`first`,arg2:`second`})' + == 'Event("test_fn_with_args", {arg1:"first",arg2:"second"})' ) first, second = 123, "456" @@ -78,14 +78,14 @@ def test_fn_with_args(_, arg1, arg2): event_spec = handler(first, second) # type: ignore assert ( format.format_event(event_spec) - == 'Event("test_fn_with_args", {arg1:123,arg2:`456`})' + == 'Event("test_fn_with_args", {arg1:123,arg2:"456"})' ) assert event_spec.handler == handler assert event_spec.args[0][0].equals(Var.create_safe("arg1")) assert event_spec.args[0][1].equals(Var.create_safe(first)) assert event_spec.args[1][0].equals(Var.create_safe("arg2")) - assert event_spec.args[1][1].equals(Var.create_safe(second)) + assert event_spec.args[1][1].equals(LiteralVar.create(second)) handler = EventHandler(fn=test_fn_with_args) with pytest.raises(TypeError): @@ -160,15 +160,15 @@ def test_fn_with_args(_, arg1, arg2): [ ( ("/path", None, None), - 'Event("_redirect", {path:`/path`,external:false,replace:false})', + 'Event("_redirect", {path:"/path",external:false,replace:false})', ), ( ("/path", True, None), - 'Event("_redirect", {path:`/path`,external:true,replace:false})', + 'Event("_redirect", {path:"/path",external:true,replace:false})', ), ( ("/path", False, None), - 'Event("_redirect", {path:`/path`,external:false,replace:false})', + 'Event("_redirect", {path:"/path",external:false,replace:false})', ), ( (Var.create_safe("path"), None, None), @@ -176,11 +176,11 @@ def test_fn_with_args(_, arg1, arg2): ), ( ("/path", None, True), - 'Event("_redirect", {path:`/path`,external:false,replace:true})', + 'Event("_redirect", {path:"/path",external:false,replace:true})', ), ( ("/path", True, True), - 'Event("_redirect", {path:`/path`,external:true,replace:true})', + 'Event("_redirect", {path:"/path",external:true,replace:true})', ), ], ) @@ -213,10 +213,10 @@ def test_event_console_log(): spec = event.console_log("message") assert isinstance(spec, EventSpec) assert spec.handler.fn.__qualname__ == "_console" - assert spec.args[0][0].equals(Var.create_safe("message")) - assert spec.args[0][1].equals(Var.create_safe("message")) - assert format.format_event(spec) == 'Event("_console", {message:`message`})' - spec = event.console_log(Var.create_safe("message")) + assert spec.args[0][0].equals(ImmutableVar(_var_name="message", _var_type=str)) + assert spec.args[0][1].equals(LiteralVar.create("message")) + assert format.format_event(spec) == 'Event("_console", {message:"message"})' + spec = event.console_log(ImmutableVar.create_safe("message")) assert format.format_event(spec) == 'Event("_console", {message:message})' @@ -225,10 +225,10 @@ def test_event_window_alert(): spec = event.window_alert("message") assert isinstance(spec, EventSpec) assert spec.handler.fn.__qualname__ == "_alert" - assert spec.args[0][0].equals(Var.create_safe("message")) - assert spec.args[0][1].equals(Var.create_safe("message")) - assert format.format_event(spec) == 'Event("_alert", {message:`message`})' - spec = event.window_alert(Var.create_safe("message")) + assert spec.args[0][0].equals(ImmutableVar(_var_name="message", _var_type=str)) + assert spec.args[0][1].equals(LiteralVar.create("message")) + assert format.format_event(spec) == 'Event("_alert", {message:"message"})' + spec = event.window_alert(ImmutableVar.create_safe("message")) assert format.format_event(spec) == 'Event("_alert", {message:message})' @@ -238,10 +238,10 @@ def test_set_focus(): assert isinstance(spec, EventSpec) assert spec.handler.fn.__qualname__ == "_set_focus" assert spec.args[0][0].equals(Var.create_safe("ref")) - assert spec.args[0][1].equals(Var.create_safe("ref_input1")) - assert format.format_event(spec) == 'Event("_set_focus", {ref:`ref_input1`})' + assert spec.args[0][1].equals(LiteralVar.create("ref_input1")) + assert format.format_event(spec) == 'Event("_set_focus", {ref:"ref_input1"})' spec = event.set_focus("input1") - assert format.format_event(spec) == 'Event("_set_focus", {ref:`ref_input1`})' + assert format.format_event(spec) == 'Event("_set_focus", {ref:"ref_input1"})' def test_set_value(): @@ -250,16 +250,16 @@ def test_set_value(): assert isinstance(spec, EventSpec) assert spec.handler.fn.__qualname__ == "_set_value" assert spec.args[0][0].equals(Var.create_safe("ref")) - assert spec.args[0][1].equals(Var.create_safe("ref_input1")) + assert spec.args[0][1].equals(LiteralVar.create("ref_input1")) assert spec.args[1][0].equals(Var.create_safe("value")) - assert spec.args[1][1].equals(Var.create_safe("")) + assert spec.args[1][1].equals(LiteralVar.create("")) assert ( - format.format_event(spec) == 'Event("_set_value", {ref:`ref_input1`,value:``})' + format.format_event(spec) == 'Event("_set_value", {ref:"ref_input1",value:""})' ) - spec = event.set_value("input1", Var.create_safe("message")) + spec = event.set_value("input1", ImmutableVar.create_safe("message")) assert ( format.format_event(spec) - == 'Event("_set_value", {ref:`ref_input1`,value:message})' + == 'Event("_set_value", {ref:"ref_input1",value:message})' ) @@ -269,12 +269,12 @@ def test_remove_cookie(): assert isinstance(spec, EventSpec) assert spec.handler.fn.__qualname__ == "_remove_cookie" assert spec.args[0][0].equals(Var.create_safe("key")) - assert spec.args[0][1].equals(Var.create_safe("testkey")) + assert spec.args[0][1].equals(LiteralVar.create("testkey")) assert spec.args[1][0].equals(Var.create_safe("options")) - assert spec.args[1][1].equals(Var.create_safe({"path": "/"})) + assert spec.args[1][1].equals(LiteralVar.create({"path": "/"})) assert ( format.format_event(spec) - == 'Event("_remove_cookie", {key:`testkey`,options:{"path": "/"}})' + == 'Event("_remove_cookie", {key:"testkey",options:({ ["path"] : "/" })})' ) @@ -290,12 +290,12 @@ def test_remove_cookie_with_options(): assert isinstance(spec, EventSpec) assert spec.handler.fn.__qualname__ == "_remove_cookie" assert spec.args[0][0].equals(Var.create_safe("key")) - assert spec.args[0][1].equals(Var.create_safe("testkey")) + assert spec.args[0][1].equals(LiteralVar.create("testkey")) assert spec.args[1][0].equals(Var.create_safe("options")) - assert spec.args[1][1].equals(Var.create_safe(options)) + assert spec.args[1][1].equals(LiteralVar.create(options)) assert ( format.format_event(spec) - == f'Event("_remove_cookie", {{key:`testkey`,options:{json.dumps(options)}}})' + == f'Event("_remove_cookie", {{key:"testkey",options:{str(LiteralVar.create(options))}}})' ) @@ -314,9 +314,9 @@ def test_remove_local_storage(): assert isinstance(spec, EventSpec) assert spec.handler.fn.__qualname__ == "_remove_local_storage" assert spec.args[0][0].equals(Var.create_safe("key")) - assert spec.args[0][1].equals(Var.create_safe("testkey")) + assert spec.args[0][1].equals(LiteralVar.create("testkey")) assert ( - format.format_event(spec) == 'Event("_remove_local_storage", {key:`testkey`})' + format.format_event(spec) == 'Event("_remove_local_storage", {key:"testkey"})' ) diff --git a/tests/test_state.py b/tests/test_state.py index 1a014739d5..d34e771cb8 100644 --- a/tests/test_state.py +++ b/tests/test_state.py @@ -40,7 +40,7 @@ from reflex.testing import chdir from reflex.utils import format, prerequisites, types from reflex.utils.format import json_dumps -from reflex.vars import BaseVar, ComputedVar +from reflex.vars import BaseVar, ComputedVar, Var from tests.states.mutation import MutableSQLAModel, MutableTestState from .states import GenState @@ -266,8 +266,8 @@ def test_base_class_vars(test_state): if field in test_state.get_skip_vars(): continue prop = getattr(cls, field) - assert isinstance(prop, BaseVar) - assert prop._var_name == field + assert isinstance(prop, Var) + assert prop._var_name.split(".")[-1] == field assert cls.num1._var_type == int assert cls.num2._var_type == float @@ -395,30 +395,27 @@ def test_default_setters(test_state): def test_class_indexing_with_vars(): """Test that we can index into a state var with another var.""" prop = TestState.array[TestState.num1] - assert ( - str(prop) == f"{{{TestState.get_name()}.array.at({TestState.get_name()}.num1)}}" - ) + assert str(prop) == f"{TestState.get_name()}.array.at({TestState.get_name()}.num1)" prop = TestState.mapping["a"][TestState.num1] assert ( str(prop) - == f'{{{TestState.get_name()}.mapping["a"].at({TestState.get_name()}.num1)}}' + == f'{TestState.get_name()}.mapping["a"].at({TestState.get_name()}.num1)' ) prop = TestState.mapping[TestState.map_key] assert ( - str(prop) - == f"{{{TestState.get_name()}.mapping[{TestState.get_name()}.map_key]}}" + str(prop) == f"{TestState.get_name()}.mapping[{TestState.get_name()}.map_key]" ) def test_class_attributes(): """Test that we can get class attributes.""" prop = TestState.obj.prop1 - assert str(prop) == f"{{{TestState.get_name()}.obj.prop1}}" + assert str(prop) == f'{TestState.get_name()}.obj["prop1"]' prop = TestState.complex[1].prop1 - assert str(prop) == f"{{{TestState.get_name()}.complex[1].prop1}}" + assert str(prop) == f'{TestState.get_name()}.complex[1]["prop1"]' def test_get_parent_state(): @@ -1064,7 +1061,8 @@ def test_dirty_computed_var_from_backend_var( Args: interdependent_state: A state with varying Var dependencies. """ - assert InterdependentState._v3._backend is True + # Accessing ._v3 returns the immutable var it represents instead of the actual computed var + # assert InterdependentState._v3._backend is True interdependent_state._v2 = 2 assert interdependent_state.get_delta() == { interdependent_state.get_full_name(): {"v2x2": 4, "v3x2": 4}, @@ -2604,15 +2602,23 @@ class UnionState(BaseState): c3r: Custom3 = Custom3(c2r=Custom2(c1r=Custom1(foo=""))) custom_union: Union[Custom1, Custom2, Custom3] = Custom1(foo="") - assert UnionState.c3.c2._var_name == "c3?.c2" # type: ignore - assert UnionState.c3.c2.c1._var_name == "c3?.c2?.c1" # type: ignore - assert UnionState.c3.c2.c1.foo._var_name == "c3?.c2?.c1?.foo" # type: ignore - assert UnionState.c3.c2.c1r.foo._var_name == "c3?.c2?.c1r.foo" # type: ignore - assert UnionState.c3.c2r.c1._var_name == "c3?.c2r.c1" # type: ignore - assert UnionState.c3.c2r.c1.foo._var_name == "c3?.c2r.c1?.foo" # type: ignore - assert UnionState.c3.c2r.c1r.foo._var_name == "c3?.c2r.c1r.foo" # type: ignore - assert UnionState.c3i.c2._var_name == "c3i.c2" # type: ignore - assert UnionState.c3r.c2._var_name == "c3r.c2" # type: ignore + assert str(UnionState.c3.c2) == f'{str(UnionState.c3)}?.["c2"]' # type: ignore + assert str(UnionState.c3.c2.c1) == f'{str(UnionState.c3)}?.["c2"]?.["c1"]' # type: ignore + assert ( + str(UnionState.c3.c2.c1.foo) == f'{str(UnionState.c3)}?.["c2"]?.["c1"]?.["foo"]' # type: ignore + ) + assert ( + str(UnionState.c3.c2.c1r.foo) == f'{str(UnionState.c3)}?.["c2"]?.["c1r"]["foo"]' # type: ignore + ) + assert str(UnionState.c3.c2r.c1) == f'{str(UnionState.c3)}?.["c2r"]["c1"]' # type: ignore + assert ( + str(UnionState.c3.c2r.c1.foo) == f'{str(UnionState.c3)}?.["c2r"]["c1"]?.["foo"]' # type: ignore + ) + assert ( + str(UnionState.c3.c2r.c1r.foo) == f'{str(UnionState.c3)}?.["c2r"]["c1r"]["foo"]' # type: ignore + ) + assert str(UnionState.c3i.c2) == f'{str(UnionState.c3i)}["c2"]' # type: ignore + assert str(UnionState.c3r.c2) == f'{str(UnionState.c3r)}["c2"]' # type: ignore assert UnionState.custom_union.foo is not None # type: ignore assert UnionState.custom_union.c1 is not None # type: ignore assert UnionState.custom_union.c1r is not None # type: ignore diff --git a/tests/test_style.py b/tests/test_style.py index 825d72a9d2..8fa443cdf6 100644 --- a/tests/test_style.py +++ b/tests/test_style.py @@ -1,18 +1,19 @@ from __future__ import annotations -from typing import Any +from typing import Any, Dict import pytest import reflex as rx from reflex import style from reflex.components.component import evaluate_style_namespaces +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.style import Style -from reflex.vars import Var, VarData +from reflex.vars import ImmutableVarData, Var, VarData test_style = [ ({"a": 1}, {"a": 1}), - ({"a": Var.create("abc")}, {"a": "abc"}), + ({"a": LiteralVar.create("abc")}, {"a": "abc"}), ({"test_case": 1}, {"testCase": 1}), ({"test_case": {"a": 1}}, {"testCase": {"a": 1}}), ({":test_case": {"a": 1}}, {":testCase": {"a": 1}}), @@ -21,8 +22,8 @@ {"::-webkit-scrollbar": {"display": "none"}}, {"::-webkit-scrollbar": {"display": "none"}}, ), - ({"margin_y": "2rem"}, {"marginBottom": "2rem", "marginTop": "2rem"}), - ({"marginY": "2rem"}, {"marginBottom": "2rem", "marginTop": "2rem"}), + ({"margin_y": "2rem"}, {"marginTop": "2rem", "marginBottom": "2rem"}), + ({"marginY": "2rem"}, {"marginTop": "2rem", "marginBottom": "2rem"}), ( {"::-webkit-scrollbar": {"bgColor": "red"}}, {"::-webkit-scrollbar": {"backgroundColor": "red"}}, @@ -49,7 +50,7 @@ def test_convert(style_dict, expected): expected: The expected formatted style. """ converted_dict, _var_data = style.convert(style_dict) - assert converted_dict == expected + assert LiteralVar.create(converted_dict).equals(LiteralVar.create(expected)) @pytest.mark.parametrize( @@ -63,7 +64,9 @@ def test_create_style(style_dict, expected): style_dict: The style to check. expected: The expected formatted style. """ - assert style.Style(style_dict) == expected + assert LiteralVar.create(style.Style(style_dict)).equals( + LiteralVar.create(expected) + ) def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): @@ -87,39 +90,47 @@ def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): @pytest.mark.parametrize( ("kwargs", "style_dict", "expected_get_style"), [ - ({}, {}, {"css": None}), - ({"color": "hotpink"}, {}, {"css": Var.create(Style({"color": "hotpink"}))}), - ({}, {"color": "red"}, {"css": Var.create(Style({"color": "red"}))}), + ({}, {}, {}), + ( + {"color": "hotpink"}, + {}, + {"css": LiteralVar.create(Style({"color": "hotpink"}))}, + ), + ({}, {"color": "red"}, {"css": LiteralVar.create(Style({"color": "red"}))}), ( {"color": "hotpink"}, {"color": "red"}, - {"css": Var.create(Style({"color": "hotpink"}))}, + {"css": LiteralVar.create(Style({"color": "hotpink"}))}, ), ( {"_hover": {"color": "hotpink"}}, {}, - {"css": Var.create(Style({"&:hover": {"color": "hotpink"}}))}, + {"css": LiteralVar.create(Style({"&:hover": {"color": "hotpink"}}))}, ), ( {}, {"_hover": {"color": "red"}}, - {"css": Var.create(Style({"&:hover": {"color": "red"}}))}, + {"css": LiteralVar.create(Style({"&:hover": {"color": "red"}}))}, ), ( {}, {":hover": {"color": "red"}}, - {"css": Var.create(Style({"&:hover": {"color": "red"}}))}, + {"css": LiteralVar.create(Style({"&:hover": {"color": "red"}}))}, ), ( {}, {"::-webkit-scrollbar": {"display": "none"}}, - {"css": Var.create(Style({"&::-webkit-scrollbar": {"display": "none"}}))}, + { + "css": LiteralVar.create( + Style({"&::-webkit-scrollbar": {"display": "none"}}) + ) + }, ), ( {}, {"::-moz-progress-bar": {"background_color": "red"}}, { - "css": Var.create( + "css": LiteralVar.create( Style({"&::-moz-progress-bar": {"backgroundColor": "red"}}) ) }, @@ -128,7 +139,7 @@ def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): {"color": ["#111", "#222", "#333", "#444", "#555"]}, {}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "@media screen and (min-width: 0)": {"color": "#111"}, @@ -148,7 +159,7 @@ def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): }, {}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "@media screen and (min-width: 0)": {"color": "#111"}, @@ -169,7 +180,7 @@ def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): }, {}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "@media screen and (min-width: 0)": { @@ -209,7 +220,7 @@ def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): }, {}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "&:hover": { @@ -236,7 +247,7 @@ def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): {"_hover": {"color": ["#111", "#222", "#333", "#444", "#555"]}}, {}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "&:hover": { @@ -268,7 +279,7 @@ def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): }, {}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "&:hover": { @@ -307,7 +318,7 @@ def compare_dict_of_var(d1: dict[str, Any], d2: dict[str, Any]): }, {}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "&:hover": { @@ -361,20 +372,20 @@ class StyleState(rx.State): [ ( {"color": StyleState.color}, - {"css": Var.create(Style({"color": StyleState.color}))}, + {"css": LiteralVar.create(Style({"color": StyleState.color}))}, ), ( {"color": f"dark{StyleState.color}"}, { - "css": Var.create_safe(f'{{"color": `dark{StyleState.color}`}}').to( - Style - ) + "css": ImmutableVar.create_safe( + f'({{ ["color"] : ("dark"+{StyleState.color}) }})' + ).to(Dict[str, str]) }, ), ( {"color": StyleState.color, "_hover": {"color": StyleState.color2}}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "color": StyleState.color, @@ -387,7 +398,7 @@ class StyleState(rx.State): ( {"color": [StyleState.color, "gray", StyleState.color2, "yellow", "blue"]}, { - "css": Var.create( + "css": LiteralVar.create( Style( { "@media screen and (min-width: 0)": { @@ -415,7 +426,7 @@ class StyleState(rx.State): ] }, { - "css": Var.create( + "css": LiteralVar.create( Style( { "&:hover": { @@ -453,7 +464,7 @@ class StyleState(rx.State): } }, { - "css": Var.create( + "css": LiteralVar.create( Style( { "&:hover": { @@ -492,7 +503,10 @@ def test_style_via_component_with_state( """ comp = rx.el.div(**kwargs) - assert comp.style._var_data == expected_get_style["css"]._var_data + assert ( + ImmutableVarData.merge(comp.style._var_data) + == expected_get_style["css"]._get_all_var_data() + ) # Assert that style values are equal. compare_dict_of_var(comp._get_style(), expected_get_style) @@ -507,10 +521,10 @@ def test_evaluate_style_namespaces(): def test_style_update_with_var_data(): """Test that .update with a Style containing VarData works.""" - red_var = Var.create_safe("red")._replace( + red_var = LiteralVar.create("red")._replace( merge_var_data=VarData(hooks={"const red = true": None}), # type: ignore ) - blue_var = Var.create_safe("blue", _var_is_local=False)._replace( + blue_var = LiteralVar.create("blue")._replace( merge_var_data=VarData(hooks={"const blue = true": None}), # type: ignore ) @@ -521,7 +535,9 @@ def test_style_update_with_var_data(): ) s2 = Style() s2.update(s1, background_color=f"{blue_var}ish") - assert s2 == {"color": "red", "backgroundColor": "`${blue}ish`"} + assert str(LiteralVar.create(s2)) == str( + LiteralVar.create({"color": "red", "backgroundColor": "blueish"}) + ) assert s2._var_data is not None assert "const red = true" in s2._var_data.hooks assert "const blue = true" in s2._var_data.hooks diff --git a/tests/test_var.py b/tests/test_var.py index 5c67d99247..cca6cbec47 100644 --- a/tests/test_var.py +++ b/tests/test_var.py @@ -8,19 +8,19 @@ from reflex.base import Base from reflex.constants.base import REFLEX_VAR_CLOSING_TAG, REFLEX_VAR_OPENING_TAG -from reflex.experimental.vars.base import ( +from reflex.ivars.base import ( ImmutableVar, LiteralVar, var_operation, ) -from reflex.experimental.vars.function import ArgsFunctionOperation, FunctionStringVar -from reflex.experimental.vars.number import ( +from reflex.ivars.function import ArgsFunctionOperation, FunctionStringVar +from reflex.ivars.number import ( LiteralBooleanVar, LiteralNumberVar, NumberVar, ) -from reflex.experimental.vars.object import LiteralObjectVar -from reflex.experimental.vars.sequence import ( +from reflex.ivars.object import LiteralObjectVar +from reflex.ivars.sequence import ( ArrayVar, ConcatVarOperation, LiteralArrayVar, @@ -892,10 +892,10 @@ def test_literal_var(): def test_function_var(): - addition_func = FunctionStringVar("((a, b) => a + b)") + addition_func = FunctionStringVar.create("((a, b) => a + b)") assert str(addition_func.call(1, 2)) == "(((a, b) => a + b)(1, 2))" - manual_addition_func = ArgsFunctionOperation( + manual_addition_func = ArgsFunctionOperation.create( ("a", "b"), { "args": [ImmutableVar.create_safe("a"), ImmutableVar.create_safe("b")], @@ -913,14 +913,14 @@ def test_function_var(): == "(((...args) => ((((a, b) => a + b)(1, ...args))))(2))" ) - create_hello_statement = ArgsFunctionOperation( + create_hello_statement = ArgsFunctionOperation.create( ("name",), f"Hello, {ImmutableVar.create_safe('name')}!" ) - first_name = LiteralStringVar("Steven") - last_name = LiteralStringVar("Universe") + first_name = LiteralStringVar.create("Steven") + last_name = LiteralStringVar.create("Universe") assert ( str(create_hello_statement.call(f"{first_name} {last_name}")) - == '(((name) => (("Hello, "+name+"!")))(("Steven"+" "+"Universe")))' + == '(((name) => (("Hello, "+name+"!")))("Steven Universe"))' ) @@ -932,7 +932,7 @@ def add(a: Union[NumberVar, int], b: Union[NumberVar, int]) -> str: assert str(add(1, 2)) == "(1 + 2)" assert str(add(a=4, b=-9)) == "(4 + -9)" - five = LiteralNumberVar(5) + five = LiteralNumberVar.create(5) seven = add(2, five) assert isinstance(seven, NumberVar) @@ -952,7 +952,7 @@ def test_string_operations(): def test_all_number_operations(): - starting_number = LiteralNumberVar(-5.4) + starting_number = LiteralNumberVar.create(-5.4) complicated_number = (((-(starting_number + 1)) * 2 / 3) // 2 % 3) ** 2 @@ -967,19 +967,19 @@ def test_all_number_operations(): assert ( str(even_more_complicated_number) - == "!(((Math.abs(Math.floor(((Math.floor(((-((-5.4 + 1)) * 2) / 3) / 2) % 3) ** 2))) != 0) || (true && (Math.round(((Math.floor(((-((-5.4 + 1)) * 2) / 3) / 2) % 3) ** 2)) != 0))))" + == "!(Boolean((Math.abs(Math.floor(((Math.floor(((-((-5.4 + 1)) * 2) / 3) / 2) % 3) ** 2))) || (2 && Math.round(((Math.floor(((-((-5.4 + 1)) * 2) / 3) / 2) % 3) ** 2))))))" ) - assert str(LiteralNumberVar(5) > False) == "(5 > 0)" - assert str(LiteralBooleanVar(False) < 5) == "((false ? 1 : 0) < 5)" + assert str(LiteralNumberVar.create(5) > False) == "(5 > 0)" + assert str(LiteralBooleanVar.create(False) < 5) == "((false ? 1 : 0) < 5)" assert ( - str(LiteralBooleanVar(False) < LiteralBooleanVar(True)) + str(LiteralBooleanVar.create(False) < LiteralBooleanVar.create(True)) == "((false ? 1 : 0) < (true ? 1 : 0))" ) def test_index_operation(): - array_var = LiteralArrayVar([1, 2, 3, 4, 5]) + array_var = LiteralArrayVar.create([1, 2, 3, 4, 5]) assert str(array_var[0]) == "[1, 2, 3, 4, 5].at(0)" assert str(array_var[1:2]) == "[1, 2, 3, 4, 5].slice(1, 2)" assert ( @@ -988,9 +988,9 @@ def test_index_operation(): ) assert ( str(array_var[::-1]) - == "[1, 2, 3, 4, 5].slice(0, [1, 2, 3, 4, 5].length).reverse().slice(undefined, undefined).filter((_, i) => i % 1 === 0)" + == "[1, 2, 3, 4, 5].slice(0, [1, 2, 3, 4, 5].length).slice().reverse().slice(undefined, undefined).filter((_, i) => i % 1 === 0)" ) - assert str(array_var.reverse()) == "[1, 2, 3, 4, 5].reverse()" + assert str(array_var.reverse()) == "[1, 2, 3, 4, 5].slice().reverse()" assert str(array_var[0].to(NumberVar) + 9) == "([1, 2, 3, 4, 5].at(0) + 9)" @@ -999,7 +999,7 @@ def test_array_operations(): assert str(array_var.length()) == "[1, 2, 3, 4, 5].length" assert str(array_var.contains(3)) == "[1, 2, 3, 4, 5].includes(3)" - assert str(array_var.reverse()) == "[1, 2, 3, 4, 5].reverse()" + assert str(array_var.reverse()) == "[1, 2, 3, 4, 5].slice().reverse()" assert ( str(ArrayVar.range(10)) == "Array.from({ length: (10 - 0) / 1 }, (_, i) => 0 + i * 1)" @@ -1019,7 +1019,7 @@ def test_array_operations(): def test_object_operations(): - object_var = LiteralObjectVar({"a": 1, "b": 2, "c": 3}) + object_var = LiteralObjectVar.create({"a": 1, "b": 2, "c": 3}) assert ( str(object_var.keys()) == 'Object.keys(({ ["a"] : 1, ["b"] : 2, ["c"] : 3 }))' @@ -1035,13 +1035,13 @@ def test_object_operations(): assert str(object_var.a) == '({ ["a"] : 1, ["b"] : 2, ["c"] : 3 })["a"]' assert str(object_var["a"]) == '({ ["a"] : 1, ["b"] : 2, ["c"] : 3 })["a"]' assert ( - str(object_var.merge(LiteralObjectVar({"c": 4, "d": 5}))) - == 'Object.assign(({ ["a"] : 1, ["b"] : 2, ["c"] : 3 }), ({ ["c"] : 4, ["d"] : 5 }))' + str(object_var.merge(LiteralObjectVar.create({"c": 4, "d": 5}))) + == '({...({ ["a"] : 1, ["b"] : 2, ["c"] : 3 }), ...({ ["c"] : 4, ["d"] : 5 })})' ) def test_type_chains(): - object_var = LiteralObjectVar({"a": 1, "b": 2, "c": 3}) + object_var = LiteralObjectVar.create({"a": 1, "b": 2, "c": 3}) assert (object_var._key_type(), object_var._value_type()) == (str, int) assert (object_var.keys()._var_type, object_var.values()._var_type) == ( List[str], @@ -1062,7 +1062,7 @@ def test_type_chains(): def test_nested_dict(): - arr = LiteralArrayVar([{"bar": ["foo", "bar"]}], List[Dict[str, List[str]]]) + arr = LiteralArrayVar.create([{"bar": ["foo", "bar"]}], List[Dict[str, List[str]]]) assert ( str(arr[0]["bar"][0]) == '[({ ["bar"] : ["foo", "bar"] })].at(0)["bar"].at(0)' @@ -1720,8 +1720,8 @@ def test_invalid_var_operations(operand1_var: Var, operand2_var, operators: List f"{ATestState.get_full_name()}.value", ), ( - Var.create(f"{ATestState.value} string", _var_is_string=True), - f"`${{{ATestState.get_full_name()}.value}} string`", + LiteralVar.create(f"{ATestState.value} string"), + f'({ATestState.get_full_name()}.value+" string")', ), (Var.create(ATestState.dict_val), f"{ATestState.get_full_name()}.dict_val"), ], diff --git a/tests/utils/test_format.py b/tests/utils/test_format.py index 95ebc047b6..4623f0fb28 100644 --- a/tests/utils/test_format.py +++ b/tests/utils/test_format.py @@ -8,6 +8,7 @@ from reflex.components.tags.tag import Tag from reflex.event import EventChain, EventHandler, EventSpec, FrontendEvent +from reflex.ivars.base import ImmutableVar, LiteralVar from reflex.style import Style from reflex.utils import format from reflex.utils.serializers import serialize_figure @@ -422,19 +423,19 @@ def test_format_cond( ( "state__state.value", [ - [Var.create(1), Var.create("red", _var_is_string=True)], - [Var.create(2), Var.create(3), Var.create("blue", _var_is_string=True)], + [LiteralVar.create(1), LiteralVar.create("red")], + [LiteralVar.create(2), LiteralVar.create(3), LiteralVar.create("blue")], [TestState.mapping, TestState.num1], [ - Var.create(f"{TestState.map_key}-key", _var_is_string=True), - Var.create("return-key", _var_is_string=True), + LiteralVar.create(f"{TestState.map_key}-key"), + LiteralVar.create("return-key"), ], ], - Var.create("yellow", _var_is_string=True), - "(() => { switch (JSON.stringify(state__state.value)) {case JSON.stringify(1): return (`red`); break;case JSON.stringify(2): case JSON.stringify(3): " - f"return (`blue`); break;case JSON.stringify({TestState.get_full_name()}.mapping): return " - f"({TestState.get_full_name()}.num1); break;case JSON.stringify(`${{{TestState.get_full_name()}.map_key}}-key`): return (`return-key`);" - " break;default: return (`yellow`); break;};})()", + LiteralVar.create("yellow"), + '(() => { switch (JSON.stringify(state__state.value)) {case JSON.stringify(1): return ("red"); break;case JSON.stringify(2): case JSON.stringify(3): ' + f'return ("blue"); break;case JSON.stringify({TestState.get_full_name()}.mapping): return ' + f'({TestState.get_full_name()}.num1); break;case JSON.stringify(({TestState.get_full_name()}.map_key+"-key")): return ("return-key");' + ' break;default: return ("yellow"); break;};})()', ) ], ) @@ -541,7 +542,7 @@ def test_format_match( { "h1": f"{{({{node, ...props}}) => }}" }, - '{{"h1": ({node, ...props}) => }}', + '{{"h1": ({node, ...props}) => }}', ), ], ) @@ -558,7 +559,11 @@ def test_format_prop(prop: Var, formatted: str): @pytest.mark.parametrize( "single_props,key_value_props,output", [ - (["string"], {"key": 42}, ["key={42}", "string"]), + ( + [ImmutableVar.create_safe("...props")], + {"key": 42}, + ["key={42}", "{...props}"], + ), ], ) def test_format_props(single_props, key_value_props, output): From bd1bda13250300bf23e239036d201a944f27d143 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 26 Aug 2024 16:26:17 -0700 Subject: [PATCH 07/30] guess_type: if the type is optional, treat it like it's "not None" (#3839) * guess_type: if the type is optional, treat it like it's "not None" When guessing the type for an Optional annotation, the Optional was already being stripped off, but this value was being ignored, except for error messages. So actually use the Optional-stripped value. * Strip Optional when casting Var .to --- reflex/ivars/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reflex/ivars/base.py b/reflex/ivars/base.py index de970ff641..3ccbb53937 100644 --- a/reflex/ivars/base.py +++ b/reflex/ivars/base.py @@ -362,7 +362,11 @@ def to( from .object import ObjectVar, ToObjectOperation from .sequence import ArrayVar, StringVar, ToArrayOperation, ToStringOperation - fixed_type = get_origin(var_type) or var_type + base_type = var_type + if types.is_optional(base_type): + base_type = types.get_args(base_type)[0] + + fixed_type = get_origin(base_type) or base_type fixed_output_type = get_origin(output) or output From d939bade33fd1b2d8410dac7a673d46342426661 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 26 Aug 2024 17:17:39 -0700 Subject: [PATCH 08/30] Fix double-quoting of defaultColorMode (#3840) If the user provided an `appearance` or `color_mode` value to `rx.theme`, then the resulting value ended up being double-double-quoted in the resulting JS output. Instead remove the quotes from the context.js.jinja2 and always pass appearance as a Var. --- reflex/.templates/jinja/web/utils/context.js.jinja2 | 2 +- reflex/compiler/compiler.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reflex/.templates/jinja/web/utils/context.js.jinja2 b/reflex/.templates/jinja/web/utils/context.js.jinja2 index 5f734a0c3b..8faecd9d2e 100644 --- a/reflex/.templates/jinja/web/utils/context.js.jinja2 +++ b/reflex/.templates/jinja/web/utils/context.js.jinja2 @@ -7,7 +7,7 @@ export const initialState = {{ initial_state|json_dumps }} export const initialState = {} {% endif %} -export const defaultColorMode = "{{ default_color_mode }}" +export const defaultColorMode = {{ default_color_mode }} export const ColorModeContext = createContext(null); export const UploadFilesContext = createContext(null); export const DispatchContext = createContext(null); diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 0b6cb17023..46be10015b 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -18,7 +18,7 @@ StatefulComponent, ) from reflex.config import get_config -from reflex.ivars.base import ImmutableVar +from reflex.ivars.base import LiteralVar from reflex.state import BaseState from reflex.style import SYSTEM_COLOR_MODE from reflex.utils.exec import is_prod_mode @@ -82,8 +82,8 @@ def _compile_contexts(state: Optional[Type[BaseState]], theme: Component | None) The compiled context file. """ appearance = getattr(theme, "appearance", None) - if appearance is None or str(ImmutableVar.create_safe(appearance)) == "inherit": - appearance = SYSTEM_COLOR_MODE + if appearance is None or str(LiteralVar.create(appearance)) == '"inherit"': + appearance = LiteralVar.create(SYSTEM_COLOR_MODE) last_compiled_time = str(datetime.now()) return ( From e3ae1aa2b113eecec1ed08c183b9e17972e36d56 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 20 Aug 2024 13:08:05 -0700 Subject: [PATCH 09/30] basic functionality --- reflex/app.py | 25 +++++++++++++++++++++++++ reflex/style.py | 4 +++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/reflex/app.py b/reflex/app.py index 3ce4413149..4929457e36 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -552,6 +552,31 @@ def add_page( meta=meta, ) + def _compile_page(self, route: str): + """Compile a page. + + Args: + route: The route of the page to compile. + """ + uncompiled_page = self.uncompiled_pages[route] + + on_load = uncompiled_page.on_load + + if on_load: + self.load_events[route] = ( + on_load if isinstance(on_load, list) else [on_load] + ) + + self.uncompiled_pages[route] = UncompiledPage( + component=component, + route=route, + title=title, + description=description, + image=image, + on_load=on_load, + meta=meta, + ) + def _compile_page(self, route: str): """Compile a page. diff --git a/reflex/style.py b/reflex/style.py index a2083f6344..b99354e350 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -267,7 +267,9 @@ def __setitem__(self, key: str, value: Any): _var = LiteralVar.create(value) if _var is not None: # Carry the imports/hooks when setting a Var as a value. - self._var_data = VarData.merge(self._var_data, _var._get_all_var_data()) + self._var_data = VarData.merge( + self._var_data if hasattr(self, "_var_data") else None, _var._get_all_var_data + ()) super().__setitem__(key, value) From 9caccf7832fccb528f813d0fb894c67a09f3696d Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 27 Aug 2024 11:43:09 -0700 Subject: [PATCH 10/30] run pyright --- reflex/app.py | 15 ++++++--------- reflex/compiler/compiler.py | 9 +++++++-- reflex/style.py | 5 +++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 4929457e36..0ecd3e4621 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -9,9 +9,6 @@ import functools import inspect import io -import dill -import multiprocess -from pathos import multiprocessing, pools import os import platform import sys @@ -37,6 +34,7 @@ from fastapi.middleware import cors from fastapi.responses import StreamingResponse from fastapi.staticfiles import StaticFiles +from pathos import pools from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn from socketio import ASGIApp, AsyncNamespace, AsyncServer from starlette_admin.contrib.sqla.admin import Admin @@ -50,7 +48,6 @@ from reflex.compiler import utils as compiler_utils from reflex.compiler.compiler import ( ExecutorSafeFunctions, - compile_uncompiled_page_helper, ) from reflex.components.base.app_wrap import AppWrap from reflex.components.base.error_boundary import ErrorBoundary @@ -180,7 +177,7 @@ class OverlayFragment(Fragment): class UncompiledPage: """An uncompiled page.""" - component: Component + component: Union[Component, ComponentCallable] route: str title: str description: str @@ -545,8 +542,8 @@ def add_page( self.uncompiled_pages[route] = UncompiledPage( component=component, route=route, - title=title, - description=description, + title=title or constants.DefaultPage.TITLE, + description=description or constants.DefaultPage.DESCRIPTION, image=image, on_load=on_load, meta=meta, @@ -1018,7 +1015,7 @@ def _submit_work(fn, *args, **kwargs): compile_results.append(future.get()) progress.advance(task) - for route, future in pages_futures: + for _, future in pages_futures: pages_results.append(future.get()) progress.advance(task) @@ -1027,7 +1024,7 @@ def _submit_work(fn, *args, **kwargs): self.pages[route] = component compile_results.append(compiled_page) - for route, component in self.pages.items(): + for _, component in self.pages.items(): # Add component._get_all_imports() to all_imports. all_imports.update(component._get_all_imports()) diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 46be10015b..425132f685 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -515,7 +515,6 @@ def purge_web_pages_dir(): if TYPE_CHECKING: from reflex.app import UncompiledPage - from reflex.event import EventHandler, EventSpec def compile_uncompiled_page_helper(route: str, page: UncompiledPage) -> Component: @@ -596,6 +595,8 @@ def compile_page( Args: route: The route of the page to compile. + component: The component to compile. + state: The app state. Returns: The path and code of the compiled page. @@ -615,9 +616,13 @@ def compile_uncompiled_page( Args: route: The route of the page to compile. + page: The uncompiled page. + state: The app state. + style: The style of the page. + theme: The theme of the page. Returns: - The path and code of the compiled page. + The route, compiled component, and compiled page. """ component = compile_uncompiled_page_helper(route, page) component = component if isinstance(component, Component) else component() diff --git a/reflex/style.py b/reflex/style.py index b99354e350..ad605579ce 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -268,8 +268,9 @@ def __setitem__(self, key: str, value: Any): if _var is not None: # Carry the imports/hooks when setting a Var as a value. self._var_data = VarData.merge( - self._var_data if hasattr(self, "_var_data") else None, _var._get_all_var_data - ()) + self._var_data if hasattr(self, "_var_data") else None, + _var._get_all_var_data(), + ) super().__setitem__(key, value) From 27769a69d9f350e3b7e792e5884c3ac60ca616ed Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 26 Aug 2024 13:28:18 -0700 Subject: [PATCH 11/30] fully migrate vars into new system (#3743) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fully migrate vars into new system * i hate rufffff (no i don't) * fix silly pright issues (except colormode and state) * remove all instances of Var.create * create immutable callable var and get rid of more base vars * implement hash for all functions * get reflex-web to compile * get it to compile reflex-web successfully * fix tests * fix pyi * use override from typing_extension * put plotly inside of a catch * dicts are unusable sadly * fix silly mistake * overload equals to special case immutable var * improve test_cond * solve more CI issues, down to 94 failures * down to 20 errors * down to 13 errors * pass all testcases * fix pyright issues * reorder things * use get origin more * use fixed_type logic * various optimizations * go back to passing test cases * use less boilerplate * remove unnecessary print message * remove weird comment * add test for html issue * add type ignore * fix another silly issue * override get all var data for var operations call * make integration tests pass * fix immutable call var * better logic for finding parent class * use even better logic for finding state wrt computedvar * only choose the ones that are defined in the same module * small dict to large dict * [REF-3591] Remove chakra-related files from immutable vars PR (#3821) * Add comments to html metadata component (#3731) * fix: add verification for path /404 (#3723) Co-authored-by: coolstorm * Use the new state name when setting `is_hydrated` to false (#3738) * Use `._is_mutable()` to account for parent state proxy (#3739) When a parent state proxy is set, also allow child StateProxy._self_mutable to override the parent's `_is_mutable()`. * bump to 0.5.9 (#3746) * add message when installing requirements.txt is needed for chosen template during init (#3750) * #3752 bugfix add domain for XAxis (#3764) * fix appharness app_source typing (#3777) * fix import clash between connectionToaster and hooks.useState (#3749) * use different registry when in china, fixes #3700 (#3702) * do not reload compilation if using local app in AppHarness (#3790) * do not reload if using local app * Update reflex/testing.py Co-authored-by: Masen Furer --------- Co-authored-by: Masen Furer * Bump memory on relevant actions (#3781) Co-authored-by: Alek Petuskey * [REF-3334] Validate Toast Props (#3793) * [REF-3536][REF-3537][REF-3541] Move chakra components into its repo(reflex-chakra) (#3798) * fix get_uuid_string_var (#3795) * minor State cleanup (#3768) * Fix code wrap in markdown (#3755) --------- Co-authored-by: Alek Petuskey Co-authored-by: Manas Gupta <53006261+Manas1820@users.noreply.github.com> Co-authored-by: coolstorm Co-authored-by: Thomas Brandého Co-authored-by: Shubhankar Dimri Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Co-authored-by: Khaleel Al-Adhami Co-authored-by: Alek Petuskey Co-authored-by: Elijah Ahianyo * pyproject.toml: bump to 0.6.0a1 * pyproject.toml: depend on reflex-chakra>=0.6.0a New Var system support in reflex-chakra 0.6.0a1 * poetry.lock: relock dependencies * integration: bump listening timeout to 1200 seconds * integration: bump listening timeout to 1800 seconds * Use cached_var_no_lock to avoid ImmutableVar deadlocks (#3835) * Use cached_var_no_lock to avoid ImmutableVar deadlocks ImmutableVar subclasses will always return the same value for a _var_name or _get_all_var_data so there is no need to use a per-class lock to protect a cached attribute on an instance, and doing so actually is observed to cause deadlocks when a particular _cached_var_name creates new LiteralVar instances and attempts to serialize them. * remove unused module global --------- Co-authored-by: Masen Furer Co-authored-by: Alek Petuskey Co-authored-by: Manas Gupta <53006261+Manas1820@users.noreply.github.com> Co-authored-by: coolstorm Co-authored-by: Thomas Brandého Co-authored-by: Shubhankar Dimri Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Co-authored-by: Alek Petuskey Co-authored-by: Elijah Ahianyo --- reflex/style.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/reflex/style.py b/reflex/style.py index ad605579ce..a2083f6344 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -267,10 +267,7 @@ def __setitem__(self, key: str, value: Any): _var = LiteralVar.create(value) if _var is not None: # Carry the imports/hooks when setting a Var as a value. - self._var_data = VarData.merge( - self._var_data if hasattr(self, "_var_data") else None, - _var._get_all_var_data(), - ) + self._var_data = VarData.merge(self._var_data, _var._get_all_var_data()) super().__setitem__(key, value) From 1053a316fce3c1c01a68b2012c922bfbcac65e42 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 20 Aug 2024 13:08:05 -0700 Subject: [PATCH 12/30] basic functionality --- reflex/app.py | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/reflex/app.py b/reflex/app.py index 0ecd3e4621..36a0771616 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -9,6 +9,8 @@ import functools import inspect import io +import multiprocess +from pathos import multiprocessing, pools import os import platform import sys @@ -177,7 +179,7 @@ class OverlayFragment(Fragment): class UncompiledPage: """An uncompiled page.""" - component: Union[Component, ComponentCallable] + component: Component route: str title: str description: str @@ -239,6 +241,9 @@ class App(MiddlewareMixin, LifespanMixin, Base): # A map from a route to an uncompiled page. PRIVATE. uncompiled_pages: Dict[str, UncompiledPage] = {} + # A map from a route to an uncompiled page. PRIVATE. + uncompiled_pages: Dict[str, UncompiledPage] = {} + # A map from a page route to the component to render. Users should use `add_page`. PRIVATE. pages: Dict[str, Component] = {} @@ -534,6 +539,31 @@ def add_page( state = self.state if self.state else State state.setup_dynamic_args(get_route_args(route)) + if on_load: + self.load_events[route] = ( + on_load if isinstance(on_load, list) else [on_load] + ) + + self.uncompiled_pages[route] = UncompiledPage( + component=component, + route=route, + title=title, + description=description, + image=image, + on_load=on_load, + meta=meta, + ) + + def _compile_page(self, route: str): + """Compile a page. + + Args: + route: The route of the page to compile. + """ + uncompiled_page = self.uncompiled_pages[route] + + on_load = uncompiled_page.on_load + if on_load: self.load_events[route] = ( on_load if isinstance(on_load, list) else [on_load] From 955907a0957f8a67117fa5492f339ab5ee9e6000 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 21 Aug 2024 19:24:55 -0700 Subject: [PATCH 13/30] reorder page evaluation --- reflex/app.py | 52 ++------------------------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 36a0771616..9bc6dc4fc0 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -9,6 +9,7 @@ import functools import inspect import io +import dill import multiprocess from pathos import multiprocessing, pools import os @@ -50,6 +51,7 @@ from reflex.compiler import utils as compiler_utils from reflex.compiler.compiler import ( ExecutorSafeFunctions, + compile_uncompiled_page_helper, ) from reflex.components.base.app_wrap import AppWrap from reflex.components.base.error_boundary import ErrorBoundary @@ -554,56 +556,6 @@ def add_page( meta=meta, ) - def _compile_page(self, route: str): - """Compile a page. - - Args: - route: The route of the page to compile. - """ - uncompiled_page = self.uncompiled_pages[route] - - on_load = uncompiled_page.on_load - - if on_load: - self.load_events[route] = ( - on_load if isinstance(on_load, list) else [on_load] - ) - - self.uncompiled_pages[route] = UncompiledPage( - component=component, - route=route, - title=title or constants.DefaultPage.TITLE, - description=description or constants.DefaultPage.DESCRIPTION, - image=image, - on_load=on_load, - meta=meta, - ) - - def _compile_page(self, route: str): - """Compile a page. - - Args: - route: The route of the page to compile. - """ - uncompiled_page = self.uncompiled_pages[route] - - on_load = uncompiled_page.on_load - - if on_load: - self.load_events[route] = ( - on_load if isinstance(on_load, list) else [on_load] - ) - - self.uncompiled_pages[route] = UncompiledPage( - component=component, - route=route, - title=title, - description=description, - image=image, - on_load=on_load, - meta=meta, - ) - def _compile_page(self, route: str): """Compile a page. From c926c8e4eb6dba2e8a623dc262b6a3240f814df2 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 26 Aug 2024 13:28:18 -0700 Subject: [PATCH 14/30] fully migrate vars into new system (#3743) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fully migrate vars into new system * i hate rufffff (no i don't) * fix silly pright issues (except colormode and state) * remove all instances of Var.create * create immutable callable var and get rid of more base vars * implement hash for all functions * get reflex-web to compile * get it to compile reflex-web successfully * fix tests * fix pyi * use override from typing_extension * put plotly inside of a catch * dicts are unusable sadly * fix silly mistake * overload equals to special case immutable var * improve test_cond * solve more CI issues, down to 94 failures * down to 20 errors * down to 13 errors * pass all testcases * fix pyright issues * reorder things * use get origin more * use fixed_type logic * various optimizations * go back to passing test cases * use less boilerplate * remove unnecessary print message * remove weird comment * add test for html issue * add type ignore * fix another silly issue * override get all var data for var operations call * make integration tests pass * fix immutable call var * better logic for finding parent class * use even better logic for finding state wrt computedvar * only choose the ones that are defined in the same module * small dict to large dict * [REF-3591] Remove chakra-related files from immutable vars PR (#3821) * Add comments to html metadata component (#3731) * fix: add verification for path /404 (#3723) Co-authored-by: coolstorm * Use the new state name when setting `is_hydrated` to false (#3738) * Use `._is_mutable()` to account for parent state proxy (#3739) When a parent state proxy is set, also allow child StateProxy._self_mutable to override the parent's `_is_mutable()`. * bump to 0.5.9 (#3746) * add message when installing requirements.txt is needed for chosen template during init (#3750) * #3752 bugfix add domain for XAxis (#3764) * fix appharness app_source typing (#3777) * fix import clash between connectionToaster and hooks.useState (#3749) * use different registry when in china, fixes #3700 (#3702) * do not reload compilation if using local app in AppHarness (#3790) * do not reload if using local app * Update reflex/testing.py Co-authored-by: Masen Furer --------- Co-authored-by: Masen Furer * Bump memory on relevant actions (#3781) Co-authored-by: Alek Petuskey * [REF-3334] Validate Toast Props (#3793) * [REF-3536][REF-3537][REF-3541] Move chakra components into its repo(reflex-chakra) (#3798) * fix get_uuid_string_var (#3795) * minor State cleanup (#3768) * Fix code wrap in markdown (#3755) --------- Co-authored-by: Alek Petuskey Co-authored-by: Manas Gupta <53006261+Manas1820@users.noreply.github.com> Co-authored-by: coolstorm Co-authored-by: Thomas Brandého Co-authored-by: Shubhankar Dimri Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Co-authored-by: Khaleel Al-Adhami Co-authored-by: Alek Petuskey Co-authored-by: Elijah Ahianyo * pyproject.toml: bump to 0.6.0a1 * pyproject.toml: depend on reflex-chakra>=0.6.0a New Var system support in reflex-chakra 0.6.0a1 * poetry.lock: relock dependencies * integration: bump listening timeout to 1200 seconds * integration: bump listening timeout to 1800 seconds * Use cached_var_no_lock to avoid ImmutableVar deadlocks (#3835) * Use cached_var_no_lock to avoid ImmutableVar deadlocks ImmutableVar subclasses will always return the same value for a _var_name or _get_all_var_data so there is no need to use a per-class lock to protect a cached attribute on an instance, and doing so actually is observed to cause deadlocks when a particular _cached_var_name creates new LiteralVar instances and attempts to serialize them. * remove unused module global --------- Co-authored-by: Masen Furer Co-authored-by: Alek Petuskey Co-authored-by: Manas Gupta <53006261+Manas1820@users.noreply.github.com> Co-authored-by: coolstorm Co-authored-by: Thomas Brandého Co-authored-by: Shubhankar Dimri Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Co-authored-by: Alek Petuskey Co-authored-by: Elijah Ahianyo --- reflex/ivars/base.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/reflex/ivars/base.py b/reflex/ivars/base.py index 3ccbb53937..de970ff641 100644 --- a/reflex/ivars/base.py +++ b/reflex/ivars/base.py @@ -362,11 +362,7 @@ def to( from .object import ObjectVar, ToObjectOperation from .sequence import ArrayVar, StringVar, ToArrayOperation, ToStringOperation - base_type = var_type - if types.is_optional(base_type): - base_type = types.get_args(base_type)[0] - - fixed_type = get_origin(base_type) or base_type + fixed_type = get_origin(var_type) or var_type fixed_output_type = get_origin(output) or output From 3772fb2f2d04d892d323a64510ba3ec6d6696178 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 26 Aug 2024 16:26:17 -0700 Subject: [PATCH 15/30] guess_type: if the type is optional, treat it like it's "not None" (#3839) * guess_type: if the type is optional, treat it like it's "not None" When guessing the type for an Optional annotation, the Optional was already being stripped off, but this value was being ignored, except for error messages. So actually use the Optional-stripped value. * Strip Optional when casting Var .to --- reflex/ivars/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reflex/ivars/base.py b/reflex/ivars/base.py index de970ff641..3ccbb53937 100644 --- a/reflex/ivars/base.py +++ b/reflex/ivars/base.py @@ -362,7 +362,11 @@ def to( from .object import ObjectVar, ToObjectOperation from .sequence import ArrayVar, StringVar, ToArrayOperation, ToStringOperation - fixed_type = get_origin(var_type) or var_type + base_type = var_type + if types.is_optional(base_type): + base_type = types.get_args(base_type)[0] + + fixed_type = get_origin(base_type) or base_type fixed_output_type = get_origin(output) or output From 5af03683e91f8f1a9812705fb221db2b511fbb51 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 27 Aug 2024 12:15:36 -0700 Subject: [PATCH 16/30] run format --- reflex/app.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 9bc6dc4fc0..d399a99418 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -9,9 +9,6 @@ import functools import inspect import io -import dill -import multiprocess -from pathos import multiprocessing, pools import os import platform import sys @@ -51,7 +48,6 @@ from reflex.compiler import utils as compiler_utils from reflex.compiler.compiler import ( ExecutorSafeFunctions, - compile_uncompiled_page_helper, ) from reflex.components.base.app_wrap import AppWrap from reflex.components.base.error_boundary import ErrorBoundary @@ -181,7 +177,7 @@ class OverlayFragment(Fragment): class UncompiledPage: """An uncompiled page.""" - component: Component + component: Component | ComponentCallable route: str title: str description: str @@ -549,8 +545,8 @@ def add_page( self.uncompiled_pages[route] = UncompiledPage( component=component, route=route, - title=title, - description=description, + title=title or constants.DefaultPage.TITLE, + description=description or constants.DefaultPage.DESCRIPTION, image=image, on_load=on_load, meta=meta, From 5adc10691c60bf66448b3a25e3ecc2ea2bf02b68 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 27 Aug 2024 15:59:25 -0700 Subject: [PATCH 17/30] use original mp --- reflex/app.py | 51 ++++++++++++++++++++++++------------- reflex/compiler/compiler.py | 13 +++++----- reflex/style.py | 5 +++- 3 files changed, 45 insertions(+), 24 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index d399a99418..aebbbc3a0a 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -3,12 +3,14 @@ from __future__ import annotations import asyncio +import concurrent.futures import contextlib import copy import dataclasses import functools import inspect import io +import multiprocessing import os import platform import sys @@ -34,7 +36,6 @@ from fastapi.middleware import cors from fastapi.responses import StreamingResponse from fastapi.staticfiles import StaticFiles -from pathos import pools from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn from socketio import ASGIApp, AsyncNamespace, AsyncServer from starlette_admin.contrib.sqla.admin import Admin @@ -48,6 +49,7 @@ from reflex.compiler import utils as compiler_utils from reflex.compiler.compiler import ( ExecutorSafeFunctions, + compile_theme, ) from reflex.components.base.app_wrap import AppWrap from reflex.components.base.error_boundary import ErrorBoundary @@ -934,9 +936,27 @@ def get_compilation_time() -> str: for route in self.uncompiled_pages: self._compile_page(route) - executor = pools.ProcessPool() + executor = concurrent.futures.ProcessPoolExecutor( + max_workers=int(os.environ.get("REFLEX_COMPILE_PROCESSES", 0)) or None, + mp_context=multiprocessing.get_context("fork"), + ) else: - executor = pools.ThreadPool() + executor = concurrent.futures.ThreadPoolExecutor( + max_workers=int(os.environ.get("REFLEX_COMPILE_THREADS", 0)) or None, + ) + + for route, component in self.pages.items(): + component._add_style_recursive(self.style, self.theme) + + ExecutorSafeFunctions.COMPONENTS[route] = component + + for route, page in self.uncompiled_pages.items(): + if route in self.pages: + continue + + ExecutorSafeFunctions.UNCOMPILED_PAGES[route] = page + + ExecutorSafeFunctions.STATE = self.state pages_results = [] @@ -945,39 +965,36 @@ def get_compilation_time() -> str: pages_futures = [] def _submit_work(fn, *args, **kwargs): - f = executor.apipe(fn, *args, **kwargs) + f = executor.submit(fn, *args, **kwargs) + # f = executor.apipe(fn, *args, **kwargs) result_futures.append(f) # Compile all page components. - for route, page in self.uncompiled_pages.items(): + for route in self.uncompiled_pages: if route in self.pages: continue - f = executor.apipe( + f = executor.submit( ExecutorSafeFunctions.compile_uncompiled_page, route, - page, self.state, self.style, self.theme, ) - pages_futures.append((route, f)) + pages_futures.append(f) # Compile the pre-compiled pages. - for route, component in self.pages.items(): - component._add_style_recursive(self.style, self.theme) + for route in self.pages: _submit_work( ExecutorSafeFunctions.compile_page, route, - component, - self.state, ) # Compile the root stylesheet with base styles. _submit_work(compiler.compile_root_stylesheet, self.stylesheets) # Compile the theme. - _submit_work(ExecutorSafeFunctions.compile_theme, self.style) + _submit_work(compile_theme, self.style) # Compile the Tailwind config. if config.tailwind is not None: @@ -989,12 +1006,12 @@ def _submit_work(fn, *args, **kwargs): _submit_work(compiler.remove_tailwind_from_postcss) # Wait for all compilation tasks to complete. - for future in result_futures: - compile_results.append(future.get()) + for future in concurrent.futures.as_completed(result_futures): + compile_results.append(future.result()) progress.advance(task) - for _, future in pages_futures: - pages_results.append(future.get()) + for future in concurrent.futures.as_completed(pages_futures): + pages_results.append(future.result()) progress.advance(task) for route, component, compiled_page in pages_results: diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 425132f685..b99a862d8a 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -587,10 +587,12 @@ class ExecutorSafeFunctions: """ + COMPONENTS: Dict[str, Component] = {} + UNCOMPILED_PAGES: Dict[str, UncompiledPage] = {} + STATE: Optional[Type[BaseState]] = None + @classmethod - def compile_page( - cls, route: str, component: Component, state: Type[BaseState] - ) -> tuple[str, str]: + def compile_page(cls, route: str) -> tuple[str, str]: """Compile a page. Args: @@ -601,13 +603,12 @@ def compile_page( Returns: The path and code of the compiled page. """ - return compile_page(route, component, state) + return compile_page(route, cls.COMPONENTS[route], cls.STATE) @classmethod def compile_uncompiled_page( cls, route: str, - page: UncompiledPage, state: Type[BaseState], style: ComponentStyle, theme: Component, @@ -624,7 +625,7 @@ def compile_uncompiled_page( Returns: The route, compiled component, and compiled page. """ - component = compile_uncompiled_page_helper(route, page) + component = compile_uncompiled_page_helper(route, cls.UNCOMPILED_PAGES[route]) component = component if isinstance(component, Component) else component() component._add_style_recursive(style, theme) return route, component, compile_page(route, component, state) diff --git a/reflex/style.py b/reflex/style.py index a2083f6344..0a8bb8db4f 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -267,7 +267,10 @@ def __setitem__(self, key: str, value: Any): _var = LiteralVar.create(value) if _var is not None: # Carry the imports/hooks when setting a Var as a value. - self._var_data = VarData.merge(self._var_data, _var._get_all_var_data()) + self._var_data = VarData.merge( + self._var_data, + _var._get_all_var_data(), + ) super().__setitem__(key, value) From a6c7f5241dbbfb3c27219b7826ec44da9e4dd50c Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 27 Aug 2024 16:09:36 -0700 Subject: [PATCH 18/30] evaluate page regardless --- reflex/app.py | 43 ++++++++++++++++--------------------- reflex/compiler/compiler.py | 14 ++++++------ 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index aebbbc3a0a..4b2404e8bd 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -176,7 +176,7 @@ class OverlayFragment(Fragment): @dataclasses.dataclass( frozen=True, ) -class UncompiledPage: +class UnevaluatedPage: """An uncompiled page.""" component: Component | ComponentCallable @@ -238,11 +238,8 @@ class App(MiddlewareMixin, LifespanMixin, Base): # Attributes to add to the html root tag of every page. html_custom_attrs: Optional[Dict[str, str]] = None - # A map from a route to an uncompiled page. PRIVATE. - uncompiled_pages: Dict[str, UncompiledPage] = {} - - # A map from a route to an uncompiled page. PRIVATE. - uncompiled_pages: Dict[str, UncompiledPage] = {} + # A map from a route to an unevaluated page. PRIVATE. + unevaluated_pages: Dict[str, UnevaluatedPage] = {} # A map from a page route to the component to render. Users should use `add_page`. PRIVATE. pages: Dict[str, Component] = {} @@ -517,13 +514,13 @@ def add_page( # Check if the route given is valid verify_route_validity(route) - if route in self.uncompiled_pages and os.getenv(constants.RELOAD_CONFIG): + if route in self.unevaluated_pages and os.getenv(constants.RELOAD_CONFIG): # when the app is reloaded(typically for app harness tests), we should maintain # the latest render function of a route.This applies typically to decorated pages # since they are only added when app._compile is called. - self.uncompiled_pages.pop(route) + self.unevaluated_pages.pop(route) - if route in self.uncompiled_pages: + if route in self.unevaluated_pages: route_name = ( f"`{route}` or `/`" if route == constants.PageNames.INDEX_ROUTE @@ -544,7 +541,7 @@ def add_page( on_load if isinstance(on_load, list) else [on_load] ) - self.uncompiled_pages[route] = UncompiledPage( + self.unevaluated_pages[route] = UnevaluatedPage( component=component, route=route, title=title or constants.DefaultPage.TITLE, @@ -560,8 +557,8 @@ def _compile_page(self, route: str): Args: route: The route of the page to compile. """ - component = compiler.compile_uncompiled_page_helper( - route, self.uncompiled_pages[route] + component = compiler.compile_unevaluated_page( + route, self.unevaluated_pages[route] ) # Add the page. @@ -842,7 +839,7 @@ def _compile(self, export: bool = False): """ from reflex.utils.exceptions import ReflexRuntimeError - print("Compiling the app...") + self.pages = {} self._enable_state() @@ -850,17 +847,16 @@ def get_compilation_time() -> str: return str(datetime.now().time()).split(".")[0] # Render a default 404 page if the user didn't supply one - if constants.Page404.SLUG not in self.uncompiled_pages: + if constants.Page404.SLUG not in self.unevaluated_pages: self.add_custom_404_page() # Add the optional endpoints (_upload) self._add_optional_endpoints() + for route in self.unevaluated_pages: + self._compile_page(route) + if not self._should_compile(): - for route in self.uncompiled_pages: - if route in self.pages: - continue - self._compile_page(route) return self._validate_var_dependencies() @@ -880,7 +876,7 @@ def get_compilation_time() -> str: progress.start() task = progress.add_task( f"[{get_compilation_time()}] Compiling:", - total=len(self.uncompiled_pages) + total=len(self.unevaluated_pages) + fixed_pages_within_executor + adhoc_steps_without_executor, ) @@ -933,9 +929,6 @@ def get_compilation_time() -> str: platform.system() in ("Linux", "Darwin") and os.environ.get("REFLEX_COMPILE_PROCESSES") is not None ): - for route in self.uncompiled_pages: - self._compile_page(route) - executor = concurrent.futures.ProcessPoolExecutor( max_workers=int(os.environ.get("REFLEX_COMPILE_PROCESSES", 0)) or None, mp_context=multiprocessing.get_context("fork"), @@ -950,7 +943,7 @@ def get_compilation_time() -> str: ExecutorSafeFunctions.COMPONENTS[route] = component - for route, page in self.uncompiled_pages.items(): + for route, page in self.unevaluated_pages.items(): if route in self.pages: continue @@ -970,12 +963,12 @@ def _submit_work(fn, *args, **kwargs): result_futures.append(f) # Compile all page components. - for route in self.uncompiled_pages: + for route in self.unevaluated_pages: if route in self.pages: continue f = executor.submit( - ExecutorSafeFunctions.compile_uncompiled_page, + ExecutorSafeFunctions.compile_unevaluated_page, route, self.state, self.style, diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index b99a862d8a..bf79c6e857 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -514,10 +514,10 @@ def purge_web_pages_dir(): if TYPE_CHECKING: - from reflex.app import UncompiledPage + from reflex.app import UnevaluatedPage -def compile_uncompiled_page_helper(route: str, page: UncompiledPage) -> Component: +def compile_unevaluated_page(route: str, page: UnevaluatedPage) -> Component: """Compiles an uncompiled page into a component and adds meta information. Args: @@ -588,7 +588,7 @@ class ExecutorSafeFunctions: """ COMPONENTS: Dict[str, Component] = {} - UNCOMPILED_PAGES: Dict[str, UncompiledPage] = {} + UNCOMPILED_PAGES: Dict[str, UnevaluatedPage] = {} STATE: Optional[Type[BaseState]] = None @classmethod @@ -606,18 +606,18 @@ def compile_page(cls, route: str) -> tuple[str, str]: return compile_page(route, cls.COMPONENTS[route], cls.STATE) @classmethod - def compile_uncompiled_page( + def compile_unevaluated_page( cls, route: str, state: Type[BaseState], style: ComponentStyle, theme: Component, ) -> tuple[str, Component, tuple[str, str]]: - """Compile an uncompiled page. + """Compile an unevaluated page. Args: route: The route of the page to compile. - page: The uncompiled page. + page: The unevaluated page. state: The app state. style: The style of the page. theme: The theme of the page. @@ -625,7 +625,7 @@ def compile_uncompiled_page( Returns: The route, compiled component, and compiled page. """ - component = compile_uncompiled_page_helper(route, cls.UNCOMPILED_PAGES[route]) + component = compile_unevaluated_page(route, cls.UNCOMPILED_PAGES[route]) component = component if isinstance(component, Component) else component() component._add_style_recursive(style, theme) return route, component, compile_page(route, component, state) From 4f0807ad4bbdd20ef0072dd90d081070f90a18a1 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 27 Aug 2024 16:11:47 -0700 Subject: [PATCH 19/30] use old typing --- reflex/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 4b2404e8bd..094dead797 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -179,13 +179,13 @@ class OverlayFragment(Fragment): class UnevaluatedPage: """An uncompiled page.""" - component: Component | ComponentCallable + component: Union[Component, ComponentCallable] route: str title: str description: str image: str on_load: Union[EventHandler, EventSpec, list[EventHandler | EventSpec], None] - meta: list[dict[str, str]] + meta: List[Dict[str, str]] class App(MiddlewareMixin, LifespanMixin, Base): From 738eead72919f5535b895981774be4888a1fb514 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 27 Aug 2024 16:19:49 -0700 Subject: [PATCH 20/30] dangit pydantic --- reflex/app.py | 1 - reflex/compiler/compiler.py | 24 +++++++++++------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 094dead797..be894fc403 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -970,7 +970,6 @@ def _submit_work(fn, *args, **kwargs): f = executor.submit( ExecutorSafeFunctions.compile_unevaluated_page, route, - self.state, self.style, self.theme, ) diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index bf79c6e857..6b0a864289 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -106,7 +106,7 @@ def _compile_contexts(state: Optional[Type[BaseState]], theme: Component | None) def _compile_page( component: Component, - state: Type[BaseState], + state: Type[BaseState] | None, ) -> str: """Compile the component given the app state. @@ -121,7 +121,7 @@ def _compile_page( imports = utils.compile_imports(imports) # Compile the code to render the component. - kwargs = {"state_name": state.get_name()} if state else {} + kwargs = {"state_name": state.get_name()} if state is not None else {} return templates.PAGE.render( imports=imports, @@ -403,7 +403,7 @@ def compile_contexts( def compile_page( - path: str, component: Component, state: Type[BaseState] + path: str, component: Component, state: Type[BaseState] | None ) -> tuple[str, str]: """Compile a single page. @@ -521,11 +521,11 @@ def compile_unevaluated_page(route: str, page: UnevaluatedPage) -> Component: """Compiles an uncompiled page into a component and adds meta information. Args: - route (str): The route of the page. - page (UncompiledPage): The uncompiled page object. + route: The route of the page. + page: The uncompiled page object. Returns: - Component: The compiled component. + The compiled component. """ # Generate the component if it is a callable. component = page.component @@ -597,8 +597,6 @@ def compile_page(cls, route: str) -> tuple[str, str]: Args: route: The route of the page to compile. - component: The component to compile. - state: The app state. Returns: The path and code of the compiled page. @@ -609,16 +607,13 @@ def compile_page(cls, route: str) -> tuple[str, str]: def compile_unevaluated_page( cls, route: str, - state: Type[BaseState], style: ComponentStyle, - theme: Component, + theme: Component | None, ) -> tuple[str, Component, tuple[str, str]]: """Compile an unevaluated page. Args: route: The route of the page to compile. - page: The unevaluated page. - state: The app state. style: The style of the page. theme: The theme of the page. @@ -628,12 +623,15 @@ def compile_unevaluated_page( component = compile_unevaluated_page(route, cls.UNCOMPILED_PAGES[route]) component = component if isinstance(component, Component) else component() component._add_style_recursive(style, theme) - return route, component, compile_page(route, component, state) + return route, component, compile_page(route, component, cls.STATE) @classmethod def compile_theme(cls, style: ComponentStyle | None) -> tuple[str, str]: """Compile the theme. + Args: + style: The style to compile. + Returns: The path and code of the compiled theme. From b5d8c1ea10323577525c8e6f12814081311fdb06 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 27 Aug 2024 16:26:54 -0700 Subject: [PATCH 21/30] i have two braincells and they are NOT collaborating --- reflex/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/app.py b/reflex/app.py index be894fc403..101d8bb4c4 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -184,7 +184,7 @@ class UnevaluatedPage: title: str description: str image: str - on_load: Union[EventHandler, EventSpec, list[EventHandler | EventSpec], None] + on_load: Union[EventHandler, EventSpec, List[Union[EventHandler, EventSpec]], None] meta: List[Dict[str, str]] From 23e08a62e7a24d57fe6637314440e9aafb77a15c Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 27 Aug 2024 16:50:58 -0700 Subject: [PATCH 22/30] adjust testcases --- reflex/app.py | 9 +++++---- reflex/compiler/compiler.py | 30 +++++++++++++++++++++++++----- tests/test_app.py | 21 +++++++++++++++++---- 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 101d8bb4c4..b530a2ff77 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -557,10 +557,13 @@ def _compile_page(self, route: str): Args: route: The route of the page to compile. """ - component = compiler.compile_unevaluated_page( - route, self.unevaluated_pages[route] + component, enable_state = compiler.compile_unevaluated_page( + route, self.unevaluated_pages[route], self.state ) + if enable_state: + self._enable_state() + # Add the page. self._check_routes_conflict(route) self.pages[route] = component @@ -841,8 +844,6 @@ def _compile(self, export: bool = False): self.pages = {} - self._enable_state() - def get_compilation_time() -> str: return str(datetime.now().time()).split(".")[0] diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 6b0a864289..fb1c6ebc95 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -5,7 +5,7 @@ import os from datetime import datetime from pathlib import Path -from typing import TYPE_CHECKING, Dict, Iterable, Optional, Type, Union +from typing import TYPE_CHECKING, Dict, Iterable, Optional, Tuple, Type, Union from reflex import constants from reflex.compiler import templates, utils @@ -517,15 +517,18 @@ def purge_web_pages_dir(): from reflex.app import UnevaluatedPage -def compile_unevaluated_page(route: str, page: UnevaluatedPage) -> Component: +def compile_unevaluated_page( + route: str, page: UnevaluatedPage, state: Type[BaseState] | None = None +) -> Tuple[Component, bool]: """Compiles an uncompiled page into a component and adds meta information. Args: route: The route of the page. page: The uncompiled page object. + state: The state of the app. Returns: - The compiled component. + The compiled component and whether state should be enabled. """ # Generate the component if it is a callable. component = page.component @@ -535,6 +538,21 @@ def compile_unevaluated_page(route: str, page: UnevaluatedPage) -> Component: if isinstance(component, tuple): component = Fragment.create(*component) + enable_state = False + # Ensure state is enabled if this page uses state. + if state is None: + if page.on_load or component._has_stateful_event_triggers(): + enable_state = True + else: + for var in component._get_vars(include_children=True): + var_data = var._get_all_var_data() + if not var_data: + continue + if not var_data.state: + continue + enable_state = True + break + from reflex.app import OverlayFragment from reflex.utils.format import make_default_page_title @@ -559,7 +577,7 @@ def compile_unevaluated_page(route: str, page: UnevaluatedPage) -> Component: **meta_args, ) - return component + return component, enable_state class ExecutorSafeFunctions: @@ -620,7 +638,9 @@ def compile_unevaluated_page( Returns: The route, compiled component, and compiled page. """ - component = compile_unevaluated_page(route, cls.UNCOMPILED_PAGES[route]) + component, enable_state = compile_unevaluated_page( + route, cls.UNCOMPILED_PAGES[route] + ) component = component if isinstance(component, Component) else component() component._add_style_recursive(style, theme) return route, component, compile_page(route, component, cls.STATE) diff --git a/tests/test_app.py b/tests/test_app.py index efaca4234d..6c5a63dd4a 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -237,9 +237,12 @@ def test_add_page_default_route(app: App, index_page, about_page): about_page: The about page. """ assert app.pages == {} + assert app.unevaluated_pages == {} app.add_page(index_page) + app._compile_page("index") assert app.pages.keys() == {"index"} app.add_page(about_page) + app._compile_page("about") assert app.pages.keys() == {"index", "about"} @@ -252,8 +255,9 @@ def test_add_page_set_route(app: App, index_page, windows_platform: bool): windows_platform: Whether the system is windows. """ route = "test" if windows_platform else "/test" - assert app.pages == {} + assert app.unevaluated_pages == {} app.add_page(index_page, route=route) + app._compile_page("test") assert app.pages.keys() == {"test"} @@ -269,8 +273,9 @@ def test_add_page_set_route_dynamic(index_page, windows_platform: bool): route = "/test/[dynamic]" if windows_platform: route.lstrip("/").replace("/", "\\") - assert app.pages == {} + assert app.unevaluated_pages == {} app.add_page(index_page, route=route) + app._compile_page("test/[dynamic]") assert app.pages.keys() == {"test/[dynamic]"} assert "dynamic" in app.state.computed_vars assert app.state.computed_vars["dynamic"]._deps(objclass=EmptyState) == { @@ -288,9 +293,9 @@ def test_add_page_set_route_nested(app: App, index_page, windows_platform: bool) windows_platform: Whether the system is windows. """ route = "test\\nested" if windows_platform else "/test/nested" - assert app.pages == {} + assert app.unevaluated_pages == {} app.add_page(index_page, route=route) - assert app.pages.keys() == {route.strip(os.path.sep)} + assert app.unevaluated_pages.keys() == {route.strip(os.path.sep)} def test_add_page_invalid_api_route(app: App, index_page): @@ -1201,6 +1206,7 @@ def test_overlay_component( app.add_page(rx.box("Index"), route="/test") # overlay components are wrapped during compile only + app._compile_page("test") app._setup_overlay_component() page = app.pages["test"] @@ -1330,6 +1336,7 @@ def test_app_state_determination(): # Add a page with `on_load` enables state. a1.add_page(rx.box("About"), route="/about", on_load=rx.console_log("")) + a1._compile_page("about") assert a1.state is not None a2 = App() @@ -1337,6 +1344,7 @@ def test_app_state_determination(): # Referencing a state Var enables state. a2.add_page(rx.box(rx.text(GenState.value)), route="/") + a2._compile_page("index") assert a2.state is not None a3 = App() @@ -1344,6 +1352,7 @@ def test_app_state_determination(): # Referencing router enables state. a3.add_page(rx.box(rx.text(State.router.page.full_path)), route="/") + a3._compile_page("index") assert a3.state is not None a4 = App() @@ -1355,6 +1364,7 @@ def test_app_state_determination(): a4.add_page( rx.box(rx.button("Click", on_click=DynamicState.on_counter)), route="/page2" ) + a4._compile_page("page2") assert a4.state is not None @@ -1432,6 +1442,9 @@ def page2(): app.add_page(index) # type: ignore app.add_page(page2) # type: ignore + app._compile_page("index") + app._compile_page("page2") + assert isinstance((fragment_wrapper := app.pages["index"].children[0]), Fragment) assert isinstance((first_text := fragment_wrapper.children[0]), Text) assert str(first_text.children[0].contents) == '"first"' # type: ignore From 7e4e86ec5749eefb7c9d5fdc001d849d8425103d Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 20 Sep 2024 15:19:56 -0700 Subject: [PATCH 23/30] always add the upload endpoint --- reflex/app.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 84b7552c11..ed436c7949 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -66,7 +66,7 @@ Default404Page, wait_for_client_redirect, ) -from reflex.components.core.upload import Upload, get_upload_dir +from reflex.components.core.upload import get_upload_dir from reflex.components.radix import themes from reflex.config import get_config from reflex.event import Event, EventHandler, EventSpec, window_alert @@ -404,15 +404,15 @@ def _add_default_endpoints(self): def _add_optional_endpoints(self): """Add optional api endpoints (_upload).""" # To upload files. - if Upload.is_used: - self.api.post(str(constants.Endpoint.UPLOAD))(upload(self)) - - # To access uploaded files. - self.api.mount( - str(constants.Endpoint.UPLOAD), - StaticFiles(directory=get_upload_dir()), - name="uploaded_files", - ) + + self.api.post(str(constants.Endpoint.UPLOAD))(upload(self)) + + # To access uploaded files. + self.api.mount( + str(constants.Endpoint.UPLOAD), + StaticFiles(directory=get_upload_dir()), + name="uploaded_files", + ) if codespaces.is_running_in_codespaces(): self.api.get(str(constants.Endpoint.AUTH_CODESPACE))( codespaces.auth_codespace From 0b916fe3706142a07ed1c20bbeb873c8095aff30 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 23 Sep 2024 12:10:09 -0700 Subject: [PATCH 24/30] retrieve upload but after evaluate component --- reflex/app.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index ed436c7949..bea7049cd4 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -66,7 +66,7 @@ Default404Page, wait_for_client_redirect, ) -from reflex.components.core.upload import get_upload_dir +from reflex.components.core.upload import Upload, get_upload_dir from reflex.components.radix import themes from reflex.config import get_config from reflex.event import Event, EventHandler, EventSpec, window_alert @@ -408,11 +408,12 @@ def _add_optional_endpoints(self): self.api.post(str(constants.Endpoint.UPLOAD))(upload(self)) # To access uploaded files. - self.api.mount( - str(constants.Endpoint.UPLOAD), - StaticFiles(directory=get_upload_dir()), - name="uploaded_files", - ) + if Upload.is_used: + self.api.mount( + str(constants.Endpoint.UPLOAD), + StaticFiles(directory=get_upload_dir()), + name="uploaded_files", + ) if codespaces.is_running_in_codespaces(): self.api.get(str(constants.Endpoint.AUTH_CODESPACE))( codespaces.auth_codespace @@ -855,12 +856,12 @@ def get_compilation_time() -> str: if constants.Page404.SLUG not in self.unevaluated_pages: self.add_custom_404_page() - # Add the optional endpoints (_upload) - self._add_optional_endpoints() - for route in self.unevaluated_pages: self._compile_page(route) + # Add the optional endpoints (_upload) + self._add_optional_endpoints() + if not self._should_compile(): return From 68b45272338390e2144527f8082940586db35714 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 2 Oct 2024 12:07:31 -0700 Subject: [PATCH 25/30] check against none Co-authored-by: Masen Furer --- reflex/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index bea7049cd4..2bc88fdedd 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -546,8 +546,8 @@ def add_page( self.unevaluated_pages[route] = UnevaluatedPage( component=component, route=route, - title=title or constants.DefaultPage.TITLE, - description=description or constants.DefaultPage.DESCRIPTION, + title=title if title is not None else constants.DefaultPage.TITLE, + description=description if description is not None else constants.DefaultPage.DESCRIPTION, image=image, on_load=on_load, meta=meta, From 7dba0a3bcfffe15eb6be52bcb70dc5604dda29e7 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 2 Oct 2024 12:10:23 -0700 Subject: [PATCH 26/30] make it var --- reflex/app.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 2bc88fdedd..49f69203c7 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -19,6 +19,7 @@ from datetime import datetime from pathlib import Path from typing import ( + TYPE_CHECKING, Any, AsyncIterator, Callable, @@ -92,6 +93,9 @@ from reflex.utils.exec import is_prod_mode, is_testing_env, should_skip_compile from reflex.utils.imports import ImportVar +if TYPE_CHECKING: + from reflex.vars import Var + # Define custom types. ComponentCallable = Callable[[], Component] Reducer = Callable[[Event], Coroutine[Any, Any, StateUpdate]] @@ -182,8 +186,8 @@ class UnevaluatedPage: component: Union[Component, ComponentCallable] route: str - title: str - description: str + title: Union[Var, str] + description: Union[Var, str] image: str on_load: Union[EventHandler, EventSpec, List[Union[EventHandler, EventSpec]], None] meta: List[Dict[str, str]] @@ -478,8 +482,8 @@ def add_page( self, component: Component | ComponentCallable, route: str | None = None, - title: str | None = None, - description: str | None = None, + title: str | Var | None = None, + description: str | Var | None = None, image: str = constants.DefaultPage.IMAGE, on_load: ( EventHandler | EventSpec | list[EventHandler | EventSpec] | None @@ -547,7 +551,9 @@ def add_page( component=component, route=route, title=title if title is not None else constants.DefaultPage.TITLE, - description=description if description is not None else constants.DefaultPage.DESCRIPTION, + description=description + if description is not None + else constants.DefaultPage.DESCRIPTION, image=image, on_load=on_load, meta=meta, From 1df7c8ddf7e7094febd91dbb3a3f2c495220fe53 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 4 Oct 2024 14:19:47 -0700 Subject: [PATCH 27/30] fix page title --- reflex/app.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 076622922d..fb1cdbae3e 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -186,8 +186,8 @@ class UnevaluatedPage: component: Union[Component, ComponentCallable] route: str - title: Union[Var, str] - description: Union[Var, str] + title: Union[Var, str, None] + description: Union[Var, str, None] image: str on_load: Union[EventHandler, EventSpec, List[Union[EventHandler, EventSpec]], None] meta: List[Dict[str, str]] @@ -407,12 +407,11 @@ def _add_default_endpoints(self): def _add_optional_endpoints(self): """Add optional api endpoints (_upload).""" - # To upload files. - - self.api.post(str(constants.Endpoint.UPLOAD))(upload(self)) - - # To access uploaded files. if Upload.is_used: + # To upload files. + self.api.post(str(constants.Endpoint.UPLOAD))(upload(self)) + + # To access uploaded files. self.api.mount( str(constants.Endpoint.UPLOAD), StaticFiles(directory=get_upload_dir()), @@ -536,10 +535,8 @@ def add_page( self.unevaluated_pages[route] = UnevaluatedPage( component=component, route=route, - title=title if title is not None else constants.DefaultPage.TITLE, - description=description - if description is not None - else constants.DefaultPage.DESCRIPTION, + title=title, + description=description, image=image, on_load=on_load, meta=meta, @@ -551,6 +548,7 @@ def _compile_page(self, route: str): Args: route: The route of the page to compile. """ + print(f"Compiling page: {route} {self.unevaluated_pages[route]}") component, enable_state = compiler.compile_unevaluated_page( route, self.unevaluated_pages[route], self.state ) From c288b931b38878c448d15b8fd3af236e7fb69bfa Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 4 Oct 2024 14:23:26 -0700 Subject: [PATCH 28/30] don't change style.py --- reflex/style.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/reflex/style.py b/reflex/style.py index e07027adaa..4ebd42ac31 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -285,10 +285,7 @@ def __setitem__(self, key: str, value: Any): _var = LiteralVar.create(value) if _var is not None: # Carry the imports/hooks when setting a Var as a value. - self._var_data = VarData.merge( - self._var_data, - _var._get_all_var_data(), - ) + self._var_data = VarData.merge(self._var_data, _var._get_all_var_data()) super().__setitem__(key, value) From a5bf262a4913a86b48dbff906b2e1844291032a1 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 4 Oct 2024 14:30:24 -0700 Subject: [PATCH 29/30] fix counter --- reflex/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index fb1cdbae3e..d4103bb180 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -548,7 +548,6 @@ def _compile_page(self, route: str): Args: route: The route of the page to compile. """ - print(f"Compiling page: {route} {self.unevaluated_pages[route]}") component, enable_state = compiler.compile_unevaluated_page( route, self.unevaluated_pages[route], self.state ) @@ -1038,15 +1037,17 @@ def _submit_work(fn, *args, **kwargs): progress.advance(task) - # Compile the contexts before fork. + # Compile the contexts. compile_results.append( compiler.compile_contexts(self.state, self.theme), ) + progress.advance(task) # Compile the app root. compile_results.append( compiler.compile_app(app_root), ) + progress.advance(task) # Compile custom components. *custom_components_result, custom_components_imports = ( From d6caf6a42ba92dff11e4b8a8ade7455ccef017eb Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 23 Oct 2024 15:10:13 -0700 Subject: [PATCH 30/30] remove duplicated logic --- reflex/app.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 6ea3444548..961388fde6 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -946,21 +946,6 @@ def get_compilation_time() -> str: pages_results = [] - for route, component in self.pages.items(): - component._add_style_recursive(self.style, self.theme) - - ExecutorSafeFunctions.COMPONENTS[route] = component - - for route, page in self.unevaluated_pages.items(): - if route in self.pages: - continue - - ExecutorSafeFunctions.UNCOMPILED_PAGES[route] = page - - ExecutorSafeFunctions.STATE = self.state - - pages_results = [] - with executor: result_futures = [] pages_futures = []