1
0

code.pyi 30 KB

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