code.pyi 30 KB

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