code.pyi 31 KB

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