code.pyi 30 KB

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