code.pyi 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188
  1. """Stub file for reflex/components/datadisplay/code.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/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 typing import Dict, Literal, Optional, Union
  10. from reflex.components.component import Component
  11. from reflex.components.forms import Button
  12. from reflex.components.layout import Box
  13. from reflex.components.libs.chakra import ChakraComponent
  14. from reflex.components.media import Icon
  15. from reflex.event import set_clipboard
  16. from reflex.style import Style
  17. from reflex.utils import format, imports
  18. from reflex.utils.imports import ImportVar
  19. from reflex.vars import Var
  20. LiteralCodeBlockTheme = Literal[
  21. "a11y-dark",
  22. "atom-dark",
  23. "cb",
  24. "coldark-cold",
  25. "coldark-dark",
  26. "coy",
  27. "coy-without-shadows",
  28. "darcula",
  29. "dark",
  30. "dracula",
  31. "duotone-dark",
  32. "duotone-earth",
  33. "duotone-forest",
  34. "duotone-light",
  35. "duotone-sea",
  36. "duotone-space",
  37. "funky",
  38. "ghcolors",
  39. "gruvbox-dark",
  40. "gruvbox-light",
  41. "holi-theme",
  42. "hopscotch",
  43. "light",
  44. "lucario",
  45. "material-dark",
  46. "material-light",
  47. "material-oceanic",
  48. "night-owl",
  49. "nord",
  50. "okaidia",
  51. "one-dark",
  52. "one-light",
  53. "pojoaque",
  54. "prism",
  55. "shades-of-purple",
  56. "solarized-dark-atom",
  57. "solarizedlight",
  58. "synthwave84",
  59. "tomorrow",
  60. "twilight",
  61. "vs",
  62. "vs-dark",
  63. "vsc-dark-plus",
  64. "xonokai",
  65. "z-touch",
  66. ]
  67. LiteralCodeLanguage = Literal[
  68. "abap",
  69. "abnf",
  70. "actionscript",
  71. "ada",
  72. "agda",
  73. "al",
  74. "antlr4",
  75. "apacheconf",
  76. "apex",
  77. "apl",
  78. "applescript",
  79. "aql",
  80. "arduino",
  81. "arff",
  82. "asciidoc",
  83. "asm6502",
  84. "asmatmel",
  85. "aspnet",
  86. "autohotkey",
  87. "autoit",
  88. "avisynth",
  89. "avro-idl",
  90. "bash",
  91. "basic",
  92. "batch",
  93. "bbcode",
  94. "bicep",
  95. "birb",
  96. "bison",
  97. "bnf",
  98. "brainfuck",
  99. "brightscript",
  100. "bro",
  101. "bsl",
  102. "c",
  103. "cfscript",
  104. "chaiscript",
  105. "cil",
  106. "clike",
  107. "clojure",
  108. "cmake",
  109. "cobol",
  110. "coffeescript",
  111. "concurnas",
  112. "coq",
  113. "core",
  114. "cpp",
  115. "crystal",
  116. "csharp",
  117. "cshtml",
  118. "csp",
  119. "css",
  120. "css-extras",
  121. "csv",
  122. "cypher",
  123. "d",
  124. "dart",
  125. "dataweave",
  126. "dax",
  127. "dhall",
  128. "diff",
  129. "django",
  130. "dns-zone-file",
  131. "docker",
  132. "dot",
  133. "ebnf",
  134. "editorconfig",
  135. "eiffel",
  136. "ejs",
  137. "elixir",
  138. "elm",
  139. "erb",
  140. "erlang",
  141. "etlua",
  142. "excel-formula",
  143. "factor",
  144. "false",
  145. "firestore-security-rules",
  146. "flow",
  147. "fortran",
  148. "fsharp",
  149. "ftl",
  150. "gap",
  151. "gcode",
  152. "gdscript",
  153. "gedcom",
  154. "gherkin",
  155. "git",
  156. "glsl",
  157. "gml",
  158. "gn",
  159. "go",
  160. "go-module",
  161. "graphql",
  162. "groovy",
  163. "haml",
  164. "handlebars",
  165. "haskell",
  166. "haxe",
  167. "hcl",
  168. "hlsl",
  169. "hoon",
  170. "hpkp",
  171. "hsts",
  172. "http",
  173. "ichigojam",
  174. "icon",
  175. "icu-message-format",
  176. "idris",
  177. "iecst",
  178. "ignore",
  179. "index",
  180. "inform7",
  181. "ini",
  182. "io",
  183. "j",
  184. "java",
  185. "javadoc",
  186. "javadoclike",
  187. "javascript",
  188. "javastacktrace",
  189. "jexl",
  190. "jolie",
  191. "jq",
  192. "js-extras",
  193. "js-templates",
  194. "jsdoc",
  195. "json",
  196. "json5",
  197. "jsonp",
  198. "jsstacktrace",
  199. "jsx",
  200. "julia",
  201. "keepalived",
  202. "keyman",
  203. "kotlin",
  204. "kumir",
  205. "kusto",
  206. "latex",
  207. "latte",
  208. "less",
  209. "lilypond",
  210. "liquid",
  211. "lisp",
  212. "livescript",
  213. "llvm",
  214. "log",
  215. "lolcode",
  216. "lua",
  217. "magma",
  218. "makefile",
  219. "markdown",
  220. "markup",
  221. "markup-templating",
  222. "matlab",
  223. "maxscript",
  224. "mel",
  225. "mermaid",
  226. "mizar",
  227. "mongodb",
  228. "monkey",
  229. "moonscript",
  230. "n1ql",
  231. "n4js",
  232. "nand2tetris-hdl",
  233. "naniscript",
  234. "nasm",
  235. "neon",
  236. "nevod",
  237. "nginx",
  238. "nim",
  239. "nix",
  240. "nsis",
  241. "objectivec",
  242. "ocaml",
  243. "opencl",
  244. "openqasm",
  245. "oz",
  246. "parigp",
  247. "parser",
  248. "pascal",
  249. "pascaligo",
  250. "pcaxis",
  251. "peoplecode",
  252. "perl",
  253. "php",
  254. "php-extras",
  255. "phpdoc",
  256. "plsql",
  257. "powerquery",
  258. "powershell",
  259. "processing",
  260. "prolog",
  261. "promql",
  262. "properties",
  263. "protobuf",
  264. "psl",
  265. "pug",
  266. "puppet",
  267. "pure",
  268. "purebasic",
  269. "purescript",
  270. "python",
  271. "q",
  272. "qml",
  273. "qore",
  274. "qsharp",
  275. "r",
  276. "racket",
  277. "reason",
  278. "regex",
  279. "rego",
  280. "renpy",
  281. "rest",
  282. "rip",
  283. "roboconf",
  284. "robotframework",
  285. "ruby",
  286. "rust",
  287. "sas",
  288. "sass",
  289. "scala",
  290. "scheme",
  291. "scss",
  292. "shell-session",
  293. "smali",
  294. "smalltalk",
  295. "smarty",
  296. "sml",
  297. "solidity",
  298. "solution-file",
  299. "soy",
  300. "sparql",
  301. "splunk-spl",
  302. "sqf",
  303. "sql",
  304. "squirrel",
  305. "stan",
  306. "stylus",
  307. "swift",
  308. "systemd",
  309. "t4-cs",
  310. "t4-templating",
  311. "t4-vb",
  312. "tap",
  313. "tcl",
  314. "textile",
  315. "toml",
  316. "tremor",
  317. "tsx",
  318. "tt2",
  319. "turtle",
  320. "twig",
  321. "typescript",
  322. "typoscript",
  323. "unrealscript",
  324. "uorazor",
  325. "uri",
  326. "v",
  327. "vala",
  328. "vbnet",
  329. "velocity",
  330. "verilog",
  331. "vhdl",
  332. "vim",
  333. "visual-basic",
  334. "warpscript",
  335. "wasm",
  336. "web-idl",
  337. "wiki",
  338. "wolfram",
  339. "wren",
  340. "xeora",
  341. "xml-doc",
  342. "xojo",
  343. "xquery",
  344. "yaml",
  345. "yang",
  346. "zig",
  347. ]
  348. class CodeBlock(Component):
  349. @overload
  350. @classmethod
  351. def create( # type: ignore
  352. cls,
  353. *children,
  354. can_copy: Optional[bool] = False,
  355. copy_button: Optional[Union[bool, Component]] = None,
  356. theme: Optional[
  357. Union[
  358. Var[
  359. Literal[
  360. "a11y-dark",
  361. "atom-dark",
  362. "cb",
  363. "coldark-cold",
  364. "coldark-dark",
  365. "coy",
  366. "coy-without-shadows",
  367. "darcula",
  368. "dark",
  369. "dracula",
  370. "duotone-dark",
  371. "duotone-earth",
  372. "duotone-forest",
  373. "duotone-light",
  374. "duotone-sea",
  375. "duotone-space",
  376. "funky",
  377. "ghcolors",
  378. "gruvbox-dark",
  379. "gruvbox-light",
  380. "holi-theme",
  381. "hopscotch",
  382. "light",
  383. "lucario",
  384. "material-dark",
  385. "material-light",
  386. "material-oceanic",
  387. "night-owl",
  388. "nord",
  389. "okaidia",
  390. "one-dark",
  391. "one-light",
  392. "pojoaque",
  393. "prism",
  394. "shades-of-purple",
  395. "solarized-dark-atom",
  396. "solarizedlight",
  397. "synthwave84",
  398. "tomorrow",
  399. "twilight",
  400. "vs",
  401. "vs-dark",
  402. "vsc-dark-plus",
  403. "xonokai",
  404. "z-touch",
  405. ]
  406. ],
  407. Literal[
  408. "a11y-dark",
  409. "atom-dark",
  410. "cb",
  411. "coldark-cold",
  412. "coldark-dark",
  413. "coy",
  414. "coy-without-shadows",
  415. "darcula",
  416. "dark",
  417. "dracula",
  418. "duotone-dark",
  419. "duotone-earth",
  420. "duotone-forest",
  421. "duotone-light",
  422. "duotone-sea",
  423. "duotone-space",
  424. "funky",
  425. "ghcolors",
  426. "gruvbox-dark",
  427. "gruvbox-light",
  428. "holi-theme",
  429. "hopscotch",
  430. "light",
  431. "lucario",
  432. "material-dark",
  433. "material-light",
  434. "material-oceanic",
  435. "night-owl",
  436. "nord",
  437. "okaidia",
  438. "one-dark",
  439. "one-light",
  440. "pojoaque",
  441. "prism",
  442. "shades-of-purple",
  443. "solarized-dark-atom",
  444. "solarizedlight",
  445. "synthwave84",
  446. "tomorrow",
  447. "twilight",
  448. "vs",
  449. "vs-dark",
  450. "vsc-dark-plus",
  451. "xonokai",
  452. "z-touch",
  453. ],
  454. ]
  455. ] = None,
  456. language: Optional[
  457. Union[
  458. Var[
  459. Literal[
  460. "abap",
  461. "abnf",
  462. "actionscript",
  463. "ada",
  464. "agda",
  465. "al",
  466. "antlr4",
  467. "apacheconf",
  468. "apex",
  469. "apl",
  470. "applescript",
  471. "aql",
  472. "arduino",
  473. "arff",
  474. "asciidoc",
  475. "asm6502",
  476. "asmatmel",
  477. "aspnet",
  478. "autohotkey",
  479. "autoit",
  480. "avisynth",
  481. "avro-idl",
  482. "bash",
  483. "basic",
  484. "batch",
  485. "bbcode",
  486. "bicep",
  487. "birb",
  488. "bison",
  489. "bnf",
  490. "brainfuck",
  491. "brightscript",
  492. "bro",
  493. "bsl",
  494. "c",
  495. "cfscript",
  496. "chaiscript",
  497. "cil",
  498. "clike",
  499. "clojure",
  500. "cmake",
  501. "cobol",
  502. "coffeescript",
  503. "concurnas",
  504. "coq",
  505. "core",
  506. "cpp",
  507. "crystal",
  508. "csharp",
  509. "cshtml",
  510. "csp",
  511. "css",
  512. "css-extras",
  513. "csv",
  514. "cypher",
  515. "d",
  516. "dart",
  517. "dataweave",
  518. "dax",
  519. "dhall",
  520. "diff",
  521. "django",
  522. "dns-zone-file",
  523. "docker",
  524. "dot",
  525. "ebnf",
  526. "editorconfig",
  527. "eiffel",
  528. "ejs",
  529. "elixir",
  530. "elm",
  531. "erb",
  532. "erlang",
  533. "etlua",
  534. "excel-formula",
  535. "factor",
  536. "false",
  537. "firestore-security-rules",
  538. "flow",
  539. "fortran",
  540. "fsharp",
  541. "ftl",
  542. "gap",
  543. "gcode",
  544. "gdscript",
  545. "gedcom",
  546. "gherkin",
  547. "git",
  548. "glsl",
  549. "gml",
  550. "gn",
  551. "go",
  552. "go-module",
  553. "graphql",
  554. "groovy",
  555. "haml",
  556. "handlebars",
  557. "haskell",
  558. "haxe",
  559. "hcl",
  560. "hlsl",
  561. "hoon",
  562. "hpkp",
  563. "hsts",
  564. "http",
  565. "ichigojam",
  566. "icon",
  567. "icu-message-format",
  568. "idris",
  569. "iecst",
  570. "ignore",
  571. "index",
  572. "inform7",
  573. "ini",
  574. "io",
  575. "j",
  576. "java",
  577. "javadoc",
  578. "javadoclike",
  579. "javascript",
  580. "javastacktrace",
  581. "jexl",
  582. "jolie",
  583. "jq",
  584. "js-extras",
  585. "js-templates",
  586. "jsdoc",
  587. "json",
  588. "json5",
  589. "jsonp",
  590. "jsstacktrace",
  591. "jsx",
  592. "julia",
  593. "keepalived",
  594. "keyman",
  595. "kotlin",
  596. "kumir",
  597. "kusto",
  598. "latex",
  599. "latte",
  600. "less",
  601. "lilypond",
  602. "liquid",
  603. "lisp",
  604. "livescript",
  605. "llvm",
  606. "log",
  607. "lolcode",
  608. "lua",
  609. "magma",
  610. "makefile",
  611. "markdown",
  612. "markup",
  613. "markup-templating",
  614. "matlab",
  615. "maxscript",
  616. "mel",
  617. "mermaid",
  618. "mizar",
  619. "mongodb",
  620. "monkey",
  621. "moonscript",
  622. "n1ql",
  623. "n4js",
  624. "nand2tetris-hdl",
  625. "naniscript",
  626. "nasm",
  627. "neon",
  628. "nevod",
  629. "nginx",
  630. "nim",
  631. "nix",
  632. "nsis",
  633. "objectivec",
  634. "ocaml",
  635. "opencl",
  636. "openqasm",
  637. "oz",
  638. "parigp",
  639. "parser",
  640. "pascal",
  641. "pascaligo",
  642. "pcaxis",
  643. "peoplecode",
  644. "perl",
  645. "php",
  646. "php-extras",
  647. "phpdoc",
  648. "plsql",
  649. "powerquery",
  650. "powershell",
  651. "processing",
  652. "prolog",
  653. "promql",
  654. "properties",
  655. "protobuf",
  656. "psl",
  657. "pug",
  658. "puppet",
  659. "pure",
  660. "purebasic",
  661. "purescript",
  662. "python",
  663. "q",
  664. "qml",
  665. "qore",
  666. "qsharp",
  667. "r",
  668. "racket",
  669. "reason",
  670. "regex",
  671. "rego",
  672. "renpy",
  673. "rest",
  674. "rip",
  675. "roboconf",
  676. "robotframework",
  677. "ruby",
  678. "rust",
  679. "sas",
  680. "sass",
  681. "scala",
  682. "scheme",
  683. "scss",
  684. "shell-session",
  685. "smali",
  686. "smalltalk",
  687. "smarty",
  688. "sml",
  689. "solidity",
  690. "solution-file",
  691. "soy",
  692. "sparql",
  693. "splunk-spl",
  694. "sqf",
  695. "sql",
  696. "squirrel",
  697. "stan",
  698. "stylus",
  699. "swift",
  700. "systemd",
  701. "t4-cs",
  702. "t4-templating",
  703. "t4-vb",
  704. "tap",
  705. "tcl",
  706. "textile",
  707. "toml",
  708. "tremor",
  709. "tsx",
  710. "tt2",
  711. "turtle",
  712. "twig",
  713. "typescript",
  714. "typoscript",
  715. "unrealscript",
  716. "uorazor",
  717. "uri",
  718. "v",
  719. "vala",
  720. "vbnet",
  721. "velocity",
  722. "verilog",
  723. "vhdl",
  724. "vim",
  725. "visual-basic",
  726. "warpscript",
  727. "wasm",
  728. "web-idl",
  729. "wiki",
  730. "wolfram",
  731. "wren",
  732. "xeora",
  733. "xml-doc",
  734. "xojo",
  735. "xquery",
  736. "yaml",
  737. "yang",
  738. "zig",
  739. ]
  740. ],
  741. Literal[
  742. "abap",
  743. "abnf",
  744. "actionscript",
  745. "ada",
  746. "agda",
  747. "al",
  748. "antlr4",
  749. "apacheconf",
  750. "apex",
  751. "apl",
  752. "applescript",
  753. "aql",
  754. "arduino",
  755. "arff",
  756. "asciidoc",
  757. "asm6502",
  758. "asmatmel",
  759. "aspnet",
  760. "autohotkey",
  761. "autoit",
  762. "avisynth",
  763. "avro-idl",
  764. "bash",
  765. "basic",
  766. "batch",
  767. "bbcode",
  768. "bicep",
  769. "birb",
  770. "bison",
  771. "bnf",
  772. "brainfuck",
  773. "brightscript",
  774. "bro",
  775. "bsl",
  776. "c",
  777. "cfscript",
  778. "chaiscript",
  779. "cil",
  780. "clike",
  781. "clojure",
  782. "cmake",
  783. "cobol",
  784. "coffeescript",
  785. "concurnas",
  786. "coq",
  787. "core",
  788. "cpp",
  789. "crystal",
  790. "csharp",
  791. "cshtml",
  792. "csp",
  793. "css",
  794. "css-extras",
  795. "csv",
  796. "cypher",
  797. "d",
  798. "dart",
  799. "dataweave",
  800. "dax",
  801. "dhall",
  802. "diff",
  803. "django",
  804. "dns-zone-file",
  805. "docker",
  806. "dot",
  807. "ebnf",
  808. "editorconfig",
  809. "eiffel",
  810. "ejs",
  811. "elixir",
  812. "elm",
  813. "erb",
  814. "erlang",
  815. "etlua",
  816. "excel-formula",
  817. "factor",
  818. "false",
  819. "firestore-security-rules",
  820. "flow",
  821. "fortran",
  822. "fsharp",
  823. "ftl",
  824. "gap",
  825. "gcode",
  826. "gdscript",
  827. "gedcom",
  828. "gherkin",
  829. "git",
  830. "glsl",
  831. "gml",
  832. "gn",
  833. "go",
  834. "go-module",
  835. "graphql",
  836. "groovy",
  837. "haml",
  838. "handlebars",
  839. "haskell",
  840. "haxe",
  841. "hcl",
  842. "hlsl",
  843. "hoon",
  844. "hpkp",
  845. "hsts",
  846. "http",
  847. "ichigojam",
  848. "icon",
  849. "icu-message-format",
  850. "idris",
  851. "iecst",
  852. "ignore",
  853. "index",
  854. "inform7",
  855. "ini",
  856. "io",
  857. "j",
  858. "java",
  859. "javadoc",
  860. "javadoclike",
  861. "javascript",
  862. "javastacktrace",
  863. "jexl",
  864. "jolie",
  865. "jq",
  866. "js-extras",
  867. "js-templates",
  868. "jsdoc",
  869. "json",
  870. "json5",
  871. "jsonp",
  872. "jsstacktrace",
  873. "jsx",
  874. "julia",
  875. "keepalived",
  876. "keyman",
  877. "kotlin",
  878. "kumir",
  879. "kusto",
  880. "latex",
  881. "latte",
  882. "less",
  883. "lilypond",
  884. "liquid",
  885. "lisp",
  886. "livescript",
  887. "llvm",
  888. "log",
  889. "lolcode",
  890. "lua",
  891. "magma",
  892. "makefile",
  893. "markdown",
  894. "markup",
  895. "markup-templating",
  896. "matlab",
  897. "maxscript",
  898. "mel",
  899. "mermaid",
  900. "mizar",
  901. "mongodb",
  902. "monkey",
  903. "moonscript",
  904. "n1ql",
  905. "n4js",
  906. "nand2tetris-hdl",
  907. "naniscript",
  908. "nasm",
  909. "neon",
  910. "nevod",
  911. "nginx",
  912. "nim",
  913. "nix",
  914. "nsis",
  915. "objectivec",
  916. "ocaml",
  917. "opencl",
  918. "openqasm",
  919. "oz",
  920. "parigp",
  921. "parser",
  922. "pascal",
  923. "pascaligo",
  924. "pcaxis",
  925. "peoplecode",
  926. "perl",
  927. "php",
  928. "php-extras",
  929. "phpdoc",
  930. "plsql",
  931. "powerquery",
  932. "powershell",
  933. "processing",
  934. "prolog",
  935. "promql",
  936. "properties",
  937. "protobuf",
  938. "psl",
  939. "pug",
  940. "puppet",
  941. "pure",
  942. "purebasic",
  943. "purescript",
  944. "python",
  945. "q",
  946. "qml",
  947. "qore",
  948. "qsharp",
  949. "r",
  950. "racket",
  951. "reason",
  952. "regex",
  953. "rego",
  954. "renpy",
  955. "rest",
  956. "rip",
  957. "roboconf",
  958. "robotframework",
  959. "ruby",
  960. "rust",
  961. "sas",
  962. "sass",
  963. "scala",
  964. "scheme",
  965. "scss",
  966. "shell-session",
  967. "smali",
  968. "smalltalk",
  969. "smarty",
  970. "sml",
  971. "solidity",
  972. "solution-file",
  973. "soy",
  974. "sparql",
  975. "splunk-spl",
  976. "sqf",
  977. "sql",
  978. "squirrel",
  979. "stan",
  980. "stylus",
  981. "swift",
  982. "systemd",
  983. "t4-cs",
  984. "t4-templating",
  985. "t4-vb",
  986. "tap",
  987. "tcl",
  988. "textile",
  989. "toml",
  990. "tremor",
  991. "tsx",
  992. "tt2",
  993. "turtle",
  994. "twig",
  995. "typescript",
  996. "typoscript",
  997. "unrealscript",
  998. "uorazor",
  999. "uri",
  1000. "v",
  1001. "vala",
  1002. "vbnet",
  1003. "velocity",
  1004. "verilog",
  1005. "vhdl",
  1006. "vim",
  1007. "visual-basic",
  1008. "warpscript",
  1009. "wasm",
  1010. "web-idl",
  1011. "wiki",
  1012. "wolfram",
  1013. "wren",
  1014. "xeora",
  1015. "xml-doc",
  1016. "xojo",
  1017. "xquery",
  1018. "yaml",
  1019. "yang",
  1020. "zig",
  1021. ],
  1022. ]
  1023. ] = None,
  1024. show_line_numbers: Optional[Union[Var[bool], bool]] = None,
  1025. starting_line_number: Optional[Union[Var[int], int]] = None,
  1026. wrap_long_lines: Optional[Union[Var[bool], bool]] = None,
  1027. custom_style: Optional[Dict[str, str]] = None,
  1028. code_tag_props: Optional[Union[Var[Dict[str, str]], Dict[str, str]]] = None,
  1029. style: Optional[Style] = None,
  1030. key: Optional[Any] = None,
  1031. id: Optional[Any] = None,
  1032. class_name: Optional[Any] = None,
  1033. autofocus: Optional[bool] = None,
  1034. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1035. on_blur: Optional[
  1036. Union[EventHandler, EventSpec, list, function, BaseVar]
  1037. ] = None,
  1038. on_click: Optional[
  1039. Union[EventHandler, EventSpec, list, function, BaseVar]
  1040. ] = None,
  1041. on_context_menu: Optional[
  1042. Union[EventHandler, EventSpec, list, function, BaseVar]
  1043. ] = None,
  1044. on_double_click: Optional[
  1045. Union[EventHandler, EventSpec, list, function, BaseVar]
  1046. ] = None,
  1047. on_focus: Optional[
  1048. Union[EventHandler, EventSpec, list, function, BaseVar]
  1049. ] = None,
  1050. on_mount: Optional[
  1051. Union[EventHandler, EventSpec, list, function, BaseVar]
  1052. ] = None,
  1053. on_mouse_down: Optional[
  1054. Union[EventHandler, EventSpec, list, function, BaseVar]
  1055. ] = None,
  1056. on_mouse_enter: Optional[
  1057. Union[EventHandler, EventSpec, list, function, BaseVar]
  1058. ] = None,
  1059. on_mouse_leave: Optional[
  1060. Union[EventHandler, EventSpec, list, function, BaseVar]
  1061. ] = None,
  1062. on_mouse_move: Optional[
  1063. Union[EventHandler, EventSpec, list, function, BaseVar]
  1064. ] = None,
  1065. on_mouse_out: Optional[
  1066. Union[EventHandler, EventSpec, list, function, BaseVar]
  1067. ] = None,
  1068. on_mouse_over: Optional[
  1069. Union[EventHandler, EventSpec, list, function, BaseVar]
  1070. ] = None,
  1071. on_mouse_up: Optional[
  1072. Union[EventHandler, EventSpec, list, function, BaseVar]
  1073. ] = None,
  1074. on_scroll: Optional[
  1075. Union[EventHandler, EventSpec, list, function, BaseVar]
  1076. ] = None,
  1077. on_unmount: Optional[
  1078. Union[EventHandler, EventSpec, list, function, BaseVar]
  1079. ] = None,
  1080. **props
  1081. ) -> "CodeBlock":
  1082. """Create a text component.
  1083. Args:
  1084. *children: The children of the component.
  1085. can_copy: Whether a copy button should appears.
  1086. copy_button: A custom copy button to override the default one.
  1087. theme: The theme to use ("light" or "dark").
  1088. language: The language to use.
  1089. show_line_numbers: If this is enabled line numbers will be shown next to the code block.
  1090. starting_line_number: The starting line number to use.
  1091. wrap_long_lines: Whether to wrap long lines.
  1092. custom_style: A custom style for the code block.
  1093. code_tag_props: Props passed down to the code tag.
  1094. style: The style of the component.
  1095. key: A unique key for the component.
  1096. id: The id for the component.
  1097. class_name: The class name for the component.
  1098. autofocus: Whether the component should take the focus once the page is loaded
  1099. custom_attrs: custom attribute
  1100. **props: The props to pass to the component.
  1101. Returns:
  1102. The text component.
  1103. """
  1104. ...
  1105. class Code(ChakraComponent):
  1106. @overload
  1107. @classmethod
  1108. def create( # type: ignore
  1109. cls,
  1110. *children,
  1111. style: Optional[Style] = None,
  1112. key: Optional[Any] = None,
  1113. id: Optional[Any] = None,
  1114. class_name: Optional[Any] = None,
  1115. autofocus: Optional[bool] = None,
  1116. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1117. on_blur: Optional[
  1118. Union[EventHandler, EventSpec, list, function, BaseVar]
  1119. ] = None,
  1120. on_click: Optional[
  1121. Union[EventHandler, EventSpec, list, function, BaseVar]
  1122. ] = None,
  1123. on_context_menu: Optional[
  1124. Union[EventHandler, EventSpec, list, function, BaseVar]
  1125. ] = None,
  1126. on_double_click: Optional[
  1127. Union[EventHandler, EventSpec, list, function, BaseVar]
  1128. ] = None,
  1129. on_focus: Optional[
  1130. Union[EventHandler, EventSpec, list, function, BaseVar]
  1131. ] = None,
  1132. on_mount: Optional[
  1133. Union[EventHandler, EventSpec, list, function, BaseVar]
  1134. ] = None,
  1135. on_mouse_down: Optional[
  1136. Union[EventHandler, EventSpec, list, function, BaseVar]
  1137. ] = None,
  1138. on_mouse_enter: Optional[
  1139. Union[EventHandler, EventSpec, list, function, BaseVar]
  1140. ] = None,
  1141. on_mouse_leave: Optional[
  1142. Union[EventHandler, EventSpec, list, function, BaseVar]
  1143. ] = None,
  1144. on_mouse_move: Optional[
  1145. Union[EventHandler, EventSpec, list, function, BaseVar]
  1146. ] = None,
  1147. on_mouse_out: Optional[
  1148. Union[EventHandler, EventSpec, list, function, BaseVar]
  1149. ] = None,
  1150. on_mouse_over: Optional[
  1151. Union[EventHandler, EventSpec, list, function, BaseVar]
  1152. ] = None,
  1153. on_mouse_up: Optional[
  1154. Union[EventHandler, EventSpec, list, function, BaseVar]
  1155. ] = None,
  1156. on_scroll: Optional[
  1157. Union[EventHandler, EventSpec, list, function, BaseVar]
  1158. ] = None,
  1159. on_unmount: Optional[
  1160. Union[EventHandler, EventSpec, list, function, BaseVar]
  1161. ] = None,
  1162. **props
  1163. ) -> "Code":
  1164. """Create the component.
  1165. Args:
  1166. *children: The children of the component.
  1167. style: The style of the component.
  1168. key: A unique key for the component.
  1169. id: The id for the component.
  1170. class_name: The class name for the component.
  1171. autofocus: Whether the component should take the focus once the page is loaded
  1172. custom_attrs: custom attribute
  1173. **props: The props of the component.
  1174. Returns:
  1175. The component.
  1176. Raises:
  1177. TypeError: If an invalid child is passed.
  1178. """
  1179. ...