client_side_routing.pyi 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. """Stub file for reflex/components/core/client_side_routing.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from reflex import constants
  10. from reflex.components.component import Component
  11. from reflex.components.core.cond import cond
  12. from reflex.vars import Var
  13. route_not_found: Var
  14. class ClientSideRouting(Component):
  15. def add_hooks(self) -> list[str]: ...
  16. def render(self) -> str: ...
  17. @overload
  18. @classmethod
  19. def create( # type: ignore
  20. cls,
  21. *children,
  22. style: Optional[Style] = None,
  23. key: Optional[Any] = None,
  24. id: Optional[Any] = None,
  25. class_name: Optional[Any] = None,
  26. autofocus: Optional[bool] = None,
  27. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  28. on_blur: Optional[
  29. Union[EventHandler, EventSpec, list, function, BaseVar]
  30. ] = None,
  31. on_click: Optional[
  32. Union[EventHandler, EventSpec, list, function, BaseVar]
  33. ] = None,
  34. on_context_menu: Optional[
  35. Union[EventHandler, EventSpec, list, function, BaseVar]
  36. ] = None,
  37. on_double_click: Optional[
  38. Union[EventHandler, EventSpec, list, function, BaseVar]
  39. ] = None,
  40. on_focus: Optional[
  41. Union[EventHandler, EventSpec, list, function, BaseVar]
  42. ] = None,
  43. on_mount: Optional[
  44. Union[EventHandler, EventSpec, list, function, BaseVar]
  45. ] = None,
  46. on_mouse_down: Optional[
  47. Union[EventHandler, EventSpec, list, function, BaseVar]
  48. ] = None,
  49. on_mouse_enter: Optional[
  50. Union[EventHandler, EventSpec, list, function, BaseVar]
  51. ] = None,
  52. on_mouse_leave: Optional[
  53. Union[EventHandler, EventSpec, list, function, BaseVar]
  54. ] = None,
  55. on_mouse_move: Optional[
  56. Union[EventHandler, EventSpec, list, function, BaseVar]
  57. ] = None,
  58. on_mouse_out: Optional[
  59. Union[EventHandler, EventSpec, list, function, BaseVar]
  60. ] = None,
  61. on_mouse_over: Optional[
  62. Union[EventHandler, EventSpec, list, function, BaseVar]
  63. ] = None,
  64. on_mouse_up: Optional[
  65. Union[EventHandler, EventSpec, list, function, BaseVar]
  66. ] = None,
  67. on_scroll: Optional[
  68. Union[EventHandler, EventSpec, list, function, BaseVar]
  69. ] = None,
  70. on_unmount: Optional[
  71. Union[EventHandler, EventSpec, list, function, BaseVar]
  72. ] = None,
  73. **props
  74. ) -> "ClientSideRouting":
  75. """Create the component.
  76. Args:
  77. *children: The children of the component.
  78. style: The style of the component.
  79. key: A unique key for the component.
  80. id: The id for the component.
  81. class_name: The class name for the component.
  82. autofocus: Whether the component should take the focus once the page is loaded
  83. custom_attrs: custom attribute
  84. **props: The props of the component.
  85. Returns:
  86. The component.
  87. """
  88. ...
  89. def wait_for_client_redirect(component) -> Component: ...
  90. class Default404Page(Component):
  91. @overload
  92. @classmethod
  93. def create( # type: ignore
  94. cls,
  95. *children,
  96. status_code: Optional[Union[Var[int], int]] = None,
  97. style: Optional[Style] = None,
  98. key: Optional[Any] = None,
  99. id: Optional[Any] = None,
  100. class_name: Optional[Any] = None,
  101. autofocus: Optional[bool] = None,
  102. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  103. on_blur: Optional[
  104. Union[EventHandler, EventSpec, list, function, BaseVar]
  105. ] = None,
  106. on_click: Optional[
  107. Union[EventHandler, EventSpec, list, function, BaseVar]
  108. ] = None,
  109. on_context_menu: Optional[
  110. Union[EventHandler, EventSpec, list, function, BaseVar]
  111. ] = None,
  112. on_double_click: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_focus: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_mount: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. on_mouse_down: Optional[
  122. Union[EventHandler, EventSpec, list, function, BaseVar]
  123. ] = None,
  124. on_mouse_enter: Optional[
  125. Union[EventHandler, EventSpec, list, function, BaseVar]
  126. ] = None,
  127. on_mouse_leave: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_mouse_move: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_mouse_out: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_mouse_over: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. on_mouse_up: Optional[
  140. Union[EventHandler, EventSpec, list, function, BaseVar]
  141. ] = None,
  142. on_scroll: Optional[
  143. Union[EventHandler, EventSpec, list, function, BaseVar]
  144. ] = None,
  145. on_unmount: Optional[
  146. Union[EventHandler, EventSpec, list, function, BaseVar]
  147. ] = None,
  148. **props
  149. ) -> "Default404Page":
  150. """Create the component.
  151. Args:
  152. *children: The children of the component.
  153. style: The style of the component.
  154. key: A unique key for the component.
  155. id: The id for the component.
  156. class_name: The class name for the component.
  157. autofocus: Whether the component should take the focus once the page is loaded
  158. custom_attrs: custom attribute
  159. **props: The props of the component.
  160. Returns:
  161. The component.
  162. """
  163. ...