scripts.pyi 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. """Stub file for reflex/components/el/elements/scripts.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Optional, Union, overload
  6. from reflex.event import BASE_STATE, EventType
  7. from reflex.style import Style
  8. from reflex.vars.base import Var
  9. from .base import BaseHTML
  10. class Canvas(BaseHTML):
  11. @overload
  12. @classmethod
  13. def create( # type: ignore
  14. cls,
  15. *children,
  16. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  17. auto_capitalize: Optional[
  18. Union[Var[Union[bool, int, str]], bool, int, str]
  19. ] = None,
  20. content_editable: Optional[
  21. Union[Var[Union[bool, int, str]], bool, int, str]
  22. ] = None,
  23. context_menu: Optional[
  24. Union[Var[Union[bool, int, str]], bool, int, str]
  25. ] = None,
  26. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  27. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  28. enter_key_hint: Optional[
  29. Union[Var[Union[bool, int, str]], bool, int, str]
  30. ] = None,
  31. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  32. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  33. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  34. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  35. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  36. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  37. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  38. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  39. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  40. style: Optional[Style] = None,
  41. key: Optional[Any] = None,
  42. id: Optional[Any] = None,
  43. class_name: Optional[Any] = None,
  44. autofocus: Optional[bool] = None,
  45. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  46. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  47. on_click: Optional[EventType[[], BASE_STATE]] = None,
  48. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  49. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  50. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  51. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  52. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  53. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  54. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  55. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  56. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  57. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  58. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  59. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  60. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  61. **props,
  62. ) -> "Canvas":
  63. """Create the component.
  64. Args:
  65. *children: The children of the component.
  66. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  67. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  68. content_editable: Indicates whether the element's content is editable.
  69. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  70. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  71. draggable: Defines whether the element can be dragged.
  72. enter_key_hint: Hints what media types the media element is able to play.
  73. hidden: Defines whether the element is hidden.
  74. input_mode: Defines the type of the element.
  75. item_prop: Defines the name of the element for metadata purposes.
  76. lang: Defines the language used in the element.
  77. role: Defines the role of the element.
  78. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  79. spell_check: Defines whether the element may be checked for spelling errors.
  80. tab_index: Defines the position of the current element in the tabbing order.
  81. title: Defines a tooltip for the element.
  82. style: The style of the component.
  83. key: A unique key for the component.
  84. id: The id for the component.
  85. class_name: The class name for the component.
  86. autofocus: Whether the component should take the focus once the page is loaded
  87. custom_attrs: custom attribute
  88. **props: The props of the component.
  89. Returns:
  90. The component.
  91. """
  92. ...
  93. class Noscript(BaseHTML):
  94. @overload
  95. @classmethod
  96. def create( # type: ignore
  97. cls,
  98. *children,
  99. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  100. auto_capitalize: Optional[
  101. Union[Var[Union[bool, int, str]], bool, int, str]
  102. ] = None,
  103. content_editable: Optional[
  104. Union[Var[Union[bool, int, str]], bool, int, str]
  105. ] = None,
  106. context_menu: Optional[
  107. Union[Var[Union[bool, int, str]], bool, int, str]
  108. ] = None,
  109. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  110. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  111. enter_key_hint: Optional[
  112. Union[Var[Union[bool, int, str]], bool, int, str]
  113. ] = None,
  114. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  115. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  116. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  117. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  118. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  119. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  120. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  121. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  122. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  123. style: Optional[Style] = None,
  124. key: Optional[Any] = None,
  125. id: Optional[Any] = None,
  126. class_name: Optional[Any] = None,
  127. autofocus: Optional[bool] = None,
  128. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  129. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  130. on_click: Optional[EventType[[], BASE_STATE]] = None,
  131. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  132. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  133. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  134. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  135. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  136. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  137. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  138. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  139. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  140. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  141. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  142. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  143. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  144. **props,
  145. ) -> "Noscript":
  146. """Create the component.
  147. Args:
  148. *children: The children of the component.
  149. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  150. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  151. content_editable: Indicates whether the element's content is editable.
  152. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  153. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  154. draggable: Defines whether the element can be dragged.
  155. enter_key_hint: Hints what media types the media element is able to play.
  156. hidden: Defines whether the element is hidden.
  157. input_mode: Defines the type of the element.
  158. item_prop: Defines the name of the element for metadata purposes.
  159. lang: Defines the language used in the element.
  160. role: Defines the role of the element.
  161. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  162. spell_check: Defines whether the element may be checked for spelling errors.
  163. tab_index: Defines the position of the current element in the tabbing order.
  164. title: Defines a tooltip for the element.
  165. style: The style of the component.
  166. key: A unique key for the component.
  167. id: The id for the component.
  168. class_name: The class name for the component.
  169. autofocus: Whether the component should take the focus once the page is loaded
  170. custom_attrs: custom attribute
  171. **props: The props of the component.
  172. Returns:
  173. The component.
  174. """
  175. ...
  176. class Script(BaseHTML):
  177. @overload
  178. @classmethod
  179. def create( # type: ignore
  180. cls,
  181. *children,
  182. async_: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  183. char_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  184. cross_origin: Optional[
  185. Union[Var[Union[bool, int, str]], bool, int, str]
  186. ] = None,
  187. defer: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  188. integrity: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  189. language: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  190. referrer_policy: Optional[
  191. Union[Var[Union[bool, int, str]], bool, int, str]
  192. ] = None,
  193. src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  194. type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  195. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  196. auto_capitalize: Optional[
  197. Union[Var[Union[bool, int, str]], bool, int, str]
  198. ] = None,
  199. content_editable: Optional[
  200. Union[Var[Union[bool, int, str]], bool, int, str]
  201. ] = None,
  202. context_menu: Optional[
  203. Union[Var[Union[bool, int, str]], bool, int, str]
  204. ] = None,
  205. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  206. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  207. enter_key_hint: Optional[
  208. Union[Var[Union[bool, int, str]], bool, int, str]
  209. ] = None,
  210. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  211. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  212. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  213. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  214. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  215. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  216. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  217. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  218. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  219. style: Optional[Style] = None,
  220. key: Optional[Any] = None,
  221. id: Optional[Any] = None,
  222. class_name: Optional[Any] = None,
  223. autofocus: Optional[bool] = None,
  224. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  225. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  226. on_click: Optional[EventType[[], BASE_STATE]] = None,
  227. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  228. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  229. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  230. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  231. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  232. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  233. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  234. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  235. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  236. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  237. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  238. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  239. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  240. **props,
  241. ) -> "Script":
  242. """Create the component.
  243. Args:
  244. *children: The children of the component.
  245. async_: Indicates that the script should be executed asynchronously
  246. char_set: Character encoding of the external script
  247. cross_origin: Configures the CORS requests for the script
  248. defer: Indicates that the script should be executed after the page has finished parsing
  249. integrity: Security feature allowing browsers to verify what they fetch
  250. language: Specifies the scripting language used in the type attribute
  251. referrer_policy: Specifies which referrer information to send when fetching the script
  252. src: URL of an external script
  253. type: Specifies the MIME type of the script
  254. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  255. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  256. content_editable: Indicates whether the element's content is editable.
  257. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  258. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  259. draggable: Defines whether the element can be dragged.
  260. enter_key_hint: Hints what media types the media element is able to play.
  261. hidden: Defines whether the element is hidden.
  262. input_mode: Defines the type of the element.
  263. item_prop: Defines the name of the element for metadata purposes.
  264. lang: Defines the language used in the element.
  265. role: Defines the role of the element.
  266. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  267. spell_check: Defines whether the element may be checked for spelling errors.
  268. tab_index: Defines the position of the current element in the tabbing order.
  269. title: Defines a tooltip for the element.
  270. style: The style of the component.
  271. key: A unique key for the component.
  272. id: The id for the component.
  273. class_name: The class name for the component.
  274. autofocus: Whether the component should take the focus once the page is loaded
  275. custom_attrs: custom attribute
  276. **props: The props of the component.
  277. Returns:
  278. The component.
  279. """
  280. ...
  281. canvas = Canvas.create
  282. noscript = Noscript.create
  283. script = Script.create