scripts.pyi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  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, Callable, Dict, Optional, Union, overload
  6. from reflex.event import EventHandler, EventSpec
  7. from reflex.ivars.base import ImmutableVar
  8. from reflex.style import Style
  9. from reflex.vars import Var
  10. from .base import BaseHTML
  11. class Canvas(BaseHTML):
  12. @overload
  13. @classmethod
  14. def create( # type: ignore
  15. cls,
  16. *children,
  17. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  18. auto_capitalize: Optional[
  19. Union[Var[Union[bool, int, str]], str, int, bool]
  20. ] = None,
  21. content_editable: Optional[
  22. Union[Var[Union[bool, int, str]], str, int, bool]
  23. ] = None,
  24. context_menu: Optional[
  25. Union[Var[Union[bool, int, str]], str, int, bool]
  26. ] = None,
  27. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  28. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  29. enter_key_hint: Optional[
  30. Union[Var[Union[bool, int, str]], str, int, bool]
  31. ] = None,
  32. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  33. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  34. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  35. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  36. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  37. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  38. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  39. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  40. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  41. style: Optional[Style] = None,
  42. key: Optional[Any] = None,
  43. id: Optional[Any] = None,
  44. class_name: Optional[Any] = None,
  45. autofocus: Optional[bool] = None,
  46. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  47. on_blur: Optional[
  48. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  49. ] = None,
  50. on_click: Optional[
  51. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  52. ] = None,
  53. on_context_menu: Optional[
  54. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  55. ] = None,
  56. on_double_click: Optional[
  57. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  58. ] = None,
  59. on_focus: Optional[
  60. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  61. ] = None,
  62. on_mount: Optional[
  63. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  64. ] = None,
  65. on_mouse_down: Optional[
  66. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  67. ] = None,
  68. on_mouse_enter: Optional[
  69. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  70. ] = None,
  71. on_mouse_leave: Optional[
  72. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  73. ] = None,
  74. on_mouse_move: Optional[
  75. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  76. ] = None,
  77. on_mouse_out: Optional[
  78. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  79. ] = None,
  80. on_mouse_over: Optional[
  81. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  82. ] = None,
  83. on_mouse_up: Optional[
  84. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  85. ] = None,
  86. on_scroll: Optional[
  87. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  88. ] = None,
  89. on_unmount: Optional[
  90. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  91. ] = None,
  92. **props,
  93. ) -> "Canvas":
  94. """Create the component.
  95. Args:
  96. *children: The children of the component.
  97. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  98. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  99. content_editable: Indicates whether the element's content is editable.
  100. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  101. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  102. draggable: Defines whether the element can be dragged.
  103. enter_key_hint: Hints what media types the media element is able to play.
  104. hidden: Defines whether the element is hidden.
  105. input_mode: Defines the type of the element.
  106. item_prop: Defines the name of the element for metadata purposes.
  107. lang: Defines the language used in the element.
  108. role: Defines the role of the element.
  109. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  110. spell_check: Defines whether the element may be checked for spelling errors.
  111. tab_index: Defines the position of the current element in the tabbing order.
  112. title: Defines a tooltip for the element.
  113. style: The style of the component.
  114. key: A unique key for the component.
  115. id: The id for the component.
  116. class_name: The class name for the component.
  117. autofocus: Whether the component should take the focus once the page is loaded
  118. custom_attrs: custom attribute
  119. **props: The props of the component.
  120. Returns:
  121. The component.
  122. """
  123. ...
  124. class Noscript(BaseHTML):
  125. @overload
  126. @classmethod
  127. def create( # type: ignore
  128. cls,
  129. *children,
  130. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  131. auto_capitalize: Optional[
  132. Union[Var[Union[bool, int, str]], str, int, bool]
  133. ] = None,
  134. content_editable: Optional[
  135. Union[Var[Union[bool, int, str]], str, int, bool]
  136. ] = None,
  137. context_menu: Optional[
  138. Union[Var[Union[bool, int, str]], str, int, bool]
  139. ] = None,
  140. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  141. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  142. enter_key_hint: Optional[
  143. Union[Var[Union[bool, int, str]], str, int, bool]
  144. ] = None,
  145. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  146. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  147. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  148. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  149. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  150. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  151. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  152. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  153. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  154. style: Optional[Style] = None,
  155. key: Optional[Any] = None,
  156. id: Optional[Any] = None,
  157. class_name: Optional[Any] = None,
  158. autofocus: Optional[bool] = None,
  159. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  160. on_blur: Optional[
  161. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  162. ] = None,
  163. on_click: Optional[
  164. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  165. ] = None,
  166. on_context_menu: Optional[
  167. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  168. ] = None,
  169. on_double_click: Optional[
  170. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  171. ] = None,
  172. on_focus: Optional[
  173. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  174. ] = None,
  175. on_mount: Optional[
  176. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  177. ] = None,
  178. on_mouse_down: Optional[
  179. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  180. ] = None,
  181. on_mouse_enter: Optional[
  182. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  183. ] = None,
  184. on_mouse_leave: Optional[
  185. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  186. ] = None,
  187. on_mouse_move: Optional[
  188. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  189. ] = None,
  190. on_mouse_out: Optional[
  191. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  192. ] = None,
  193. on_mouse_over: Optional[
  194. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  195. ] = None,
  196. on_mouse_up: Optional[
  197. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  198. ] = None,
  199. on_scroll: Optional[
  200. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  201. ] = None,
  202. on_unmount: Optional[
  203. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  204. ] = None,
  205. **props,
  206. ) -> "Noscript":
  207. """Create the component.
  208. Args:
  209. *children: The children of the component.
  210. access_key: No unique attributes, only common ones are inherited Provides a hint for generating a keyboard shortcut for the current element.
  211. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  212. content_editable: Indicates whether the element's content is editable.
  213. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  214. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  215. draggable: Defines whether the element can be dragged.
  216. enter_key_hint: Hints what media types the media element is able to play.
  217. hidden: Defines whether the element is hidden.
  218. input_mode: Defines the type of the element.
  219. item_prop: Defines the name of the element for metadata purposes.
  220. lang: Defines the language used in the element.
  221. role: Defines the role of the element.
  222. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  223. spell_check: Defines whether the element may be checked for spelling errors.
  224. tab_index: Defines the position of the current element in the tabbing order.
  225. title: Defines a tooltip for the element.
  226. style: The style of the component.
  227. key: A unique key for the component.
  228. id: The id for the component.
  229. class_name: The class name for the component.
  230. autofocus: Whether the component should take the focus once the page is loaded
  231. custom_attrs: custom attribute
  232. **props: The props of the component.
  233. Returns:
  234. The component.
  235. """
  236. ...
  237. class Script(BaseHTML):
  238. @overload
  239. @classmethod
  240. def create( # type: ignore
  241. cls,
  242. *children,
  243. async_: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  244. char_set: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  245. cross_origin: Optional[
  246. Union[Var[Union[bool, int, str]], str, int, bool]
  247. ] = None,
  248. defer: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  249. integrity: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  250. language: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  251. referrer_policy: Optional[
  252. Union[Var[Union[bool, int, str]], str, int, bool]
  253. ] = None,
  254. src: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  255. type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  256. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  257. auto_capitalize: Optional[
  258. Union[Var[Union[bool, int, str]], str, int, bool]
  259. ] = None,
  260. content_editable: Optional[
  261. Union[Var[Union[bool, int, str]], str, int, bool]
  262. ] = None,
  263. context_menu: Optional[
  264. Union[Var[Union[bool, int, str]], str, int, bool]
  265. ] = None,
  266. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  267. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  268. enter_key_hint: Optional[
  269. Union[Var[Union[bool, int, str]], str, int, bool]
  270. ] = None,
  271. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  272. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  273. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  274. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  275. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  276. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  277. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  278. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  279. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  280. style: Optional[Style] = None,
  281. key: Optional[Any] = None,
  282. id: Optional[Any] = None,
  283. class_name: Optional[Any] = None,
  284. autofocus: Optional[bool] = None,
  285. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  286. on_blur: Optional[
  287. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  288. ] = None,
  289. on_click: Optional[
  290. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  291. ] = None,
  292. on_context_menu: Optional[
  293. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  294. ] = None,
  295. on_double_click: Optional[
  296. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  297. ] = None,
  298. on_focus: Optional[
  299. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  300. ] = None,
  301. on_mount: Optional[
  302. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  303. ] = None,
  304. on_mouse_down: Optional[
  305. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  306. ] = None,
  307. on_mouse_enter: Optional[
  308. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  309. ] = None,
  310. on_mouse_leave: Optional[
  311. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  312. ] = None,
  313. on_mouse_move: Optional[
  314. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  315. ] = None,
  316. on_mouse_out: Optional[
  317. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  318. ] = None,
  319. on_mouse_over: Optional[
  320. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  321. ] = None,
  322. on_mouse_up: Optional[
  323. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  324. ] = None,
  325. on_scroll: Optional[
  326. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  327. ] = None,
  328. on_unmount: Optional[
  329. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  330. ] = None,
  331. **props,
  332. ) -> "Script":
  333. """Create the component.
  334. Args:
  335. *children: The children of the component.
  336. async_: Indicates that the script should be executed asynchronously
  337. char_set: Character encoding of the external script
  338. cross_origin: Configures the CORS requests for the script
  339. defer: Indicates that the script should be executed after the page has finished parsing
  340. integrity: Security feature allowing browsers to verify what they fetch
  341. language: Specifies the scripting language used in the type attribute
  342. referrer_policy: Specifies which referrer information to send when fetching the script
  343. src: URL of an external script
  344. type: Specifies the MIME type of the script
  345. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  346. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  347. content_editable: Indicates whether the element's content is editable.
  348. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  349. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  350. draggable: Defines whether the element can be dragged.
  351. enter_key_hint: Hints what media types the media element is able to play.
  352. hidden: Defines whether the element is hidden.
  353. input_mode: Defines the type of the element.
  354. item_prop: Defines the name of the element for metadata purposes.
  355. lang: Defines the language used in the element.
  356. role: Defines the role of the element.
  357. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  358. spell_check: Defines whether the element may be checked for spelling errors.
  359. tab_index: Defines the position of the current element in the tabbing order.
  360. title: Defines a tooltip for the element.
  361. style: The style of the component.
  362. key: A unique key for the component.
  363. id: The id for the component.
  364. class_name: The class name for the component.
  365. autofocus: Whether the component should take the focus once the page is loaded
  366. custom_attrs: custom attribute
  367. **props: The props of the component.
  368. Returns:
  369. The component.
  370. """
  371. ...
  372. canvas = Canvas.create
  373. noscript = Noscript.create
  374. script = Script.create