code.pyi 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116
  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.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.constants.colors import Color
  17. from reflex.event import set_clipboard
  18. from reflex.style import Style
  19. from reflex.utils import format, imports
  20. from reflex.utils.imports import 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. @overload
  352. @classmethod
  353. def create( # type: ignore
  354. cls,
  355. *children,
  356. can_copy: Optional[bool] = False,
  357. copy_button: Optional[Union[bool, Component]] = None,
  358. theme: Optional[
  359. Union[
  360. Var[
  361. Literal[
  362. "a11y-dark",
  363. "atom-dark",
  364. "cb",
  365. "coldark-cold",
  366. "coldark-dark",
  367. "coy",
  368. "coy-without-shadows",
  369. "darcula",
  370. "dark",
  371. "dracula",
  372. "duotone-dark",
  373. "duotone-earth",
  374. "duotone-forest",
  375. "duotone-light",
  376. "duotone-sea",
  377. "duotone-space",
  378. "funky",
  379. "ghcolors",
  380. "gruvbox-dark",
  381. "gruvbox-light",
  382. "holi-theme",
  383. "hopscotch",
  384. "light",
  385. "lucario",
  386. "material-dark",
  387. "material-light",
  388. "material-oceanic",
  389. "night-owl",
  390. "nord",
  391. "okaidia",
  392. "one-dark",
  393. "one-light",
  394. "pojoaque",
  395. "prism",
  396. "shades-of-purple",
  397. "solarized-dark-atom",
  398. "solarizedlight",
  399. "synthwave84",
  400. "tomorrow",
  401. "twilight",
  402. "vs",
  403. "vs-dark",
  404. "vsc-dark-plus",
  405. "xonokai",
  406. "z-touch",
  407. ]
  408. ],
  409. Literal[
  410. "a11y-dark",
  411. "atom-dark",
  412. "cb",
  413. "coldark-cold",
  414. "coldark-dark",
  415. "coy",
  416. "coy-without-shadows",
  417. "darcula",
  418. "dark",
  419. "dracula",
  420. "duotone-dark",
  421. "duotone-earth",
  422. "duotone-forest",
  423. "duotone-light",
  424. "duotone-sea",
  425. "duotone-space",
  426. "funky",
  427. "ghcolors",
  428. "gruvbox-dark",
  429. "gruvbox-light",
  430. "holi-theme",
  431. "hopscotch",
  432. "light",
  433. "lucario",
  434. "material-dark",
  435. "material-light",
  436. "material-oceanic",
  437. "night-owl",
  438. "nord",
  439. "okaidia",
  440. "one-dark",
  441. "one-light",
  442. "pojoaque",
  443. "prism",
  444. "shades-of-purple",
  445. "solarized-dark-atom",
  446. "solarizedlight",
  447. "synthwave84",
  448. "tomorrow",
  449. "twilight",
  450. "vs",
  451. "vs-dark",
  452. "vsc-dark-plus",
  453. "xonokai",
  454. "z-touch",
  455. ],
  456. ]
  457. ] = None,
  458. language: Optional[
  459. Union[
  460. Var[
  461. Literal[
  462. "abap",
  463. "abnf",
  464. "actionscript",
  465. "ada",
  466. "agda",
  467. "al",
  468. "antlr4",
  469. "apacheconf",
  470. "apex",
  471. "apl",
  472. "applescript",
  473. "aql",
  474. "arduino",
  475. "arff",
  476. "asciidoc",
  477. "asm6502",
  478. "asmatmel",
  479. "aspnet",
  480. "autohotkey",
  481. "autoit",
  482. "avisynth",
  483. "avro-idl",
  484. "bash",
  485. "basic",
  486. "batch",
  487. "bbcode",
  488. "bicep",
  489. "birb",
  490. "bison",
  491. "bnf",
  492. "brainfuck",
  493. "brightscript",
  494. "bro",
  495. "bsl",
  496. "c",
  497. "cfscript",
  498. "chaiscript",
  499. "cil",
  500. "clike",
  501. "clojure",
  502. "cmake",
  503. "cobol",
  504. "coffeescript",
  505. "concurnas",
  506. "coq",
  507. "core",
  508. "cpp",
  509. "crystal",
  510. "csharp",
  511. "cshtml",
  512. "csp",
  513. "css",
  514. "css-extras",
  515. "csv",
  516. "cypher",
  517. "d",
  518. "dart",
  519. "dataweave",
  520. "dax",
  521. "dhall",
  522. "diff",
  523. "django",
  524. "dns-zone-file",
  525. "docker",
  526. "dot",
  527. "ebnf",
  528. "editorconfig",
  529. "eiffel",
  530. "ejs",
  531. "elixir",
  532. "elm",
  533. "erb",
  534. "erlang",
  535. "etlua",
  536. "excel-formula",
  537. "factor",
  538. "false",
  539. "firestore-security-rules",
  540. "flow",
  541. "fortran",
  542. "fsharp",
  543. "ftl",
  544. "gap",
  545. "gcode",
  546. "gdscript",
  547. "gedcom",
  548. "gherkin",
  549. "git",
  550. "glsl",
  551. "gml",
  552. "gn",
  553. "go",
  554. "go-module",
  555. "graphql",
  556. "groovy",
  557. "haml",
  558. "handlebars",
  559. "haskell",
  560. "haxe",
  561. "hcl",
  562. "hlsl",
  563. "hoon",
  564. "hpkp",
  565. "hsts",
  566. "http",
  567. "ichigojam",
  568. "icon",
  569. "icu-message-format",
  570. "idris",
  571. "iecst",
  572. "ignore",
  573. "index",
  574. "inform7",
  575. "ini",
  576. "io",
  577. "j",
  578. "java",
  579. "javadoc",
  580. "javadoclike",
  581. "javascript",
  582. "javastacktrace",
  583. "jexl",
  584. "jolie",
  585. "jq",
  586. "js-extras",
  587. "js-templates",
  588. "jsdoc",
  589. "json",
  590. "json5",
  591. "jsonp",
  592. "jsstacktrace",
  593. "jsx",
  594. "julia",
  595. "keepalived",
  596. "keyman",
  597. "kotlin",
  598. "kumir",
  599. "kusto",
  600. "latex",
  601. "latte",
  602. "less",
  603. "lilypond",
  604. "liquid",
  605. "lisp",
  606. "livescript",
  607. "llvm",
  608. "log",
  609. "lolcode",
  610. "lua",
  611. "magma",
  612. "makefile",
  613. "markdown",
  614. "markup",
  615. "markup-templating",
  616. "matlab",
  617. "maxscript",
  618. "mel",
  619. "mermaid",
  620. "mizar",
  621. "mongodb",
  622. "monkey",
  623. "moonscript",
  624. "n1ql",
  625. "n4js",
  626. "nand2tetris-hdl",
  627. "naniscript",
  628. "nasm",
  629. "neon",
  630. "nevod",
  631. "nginx",
  632. "nim",
  633. "nix",
  634. "nsis",
  635. "objectivec",
  636. "ocaml",
  637. "opencl",
  638. "openqasm",
  639. "oz",
  640. "parigp",
  641. "parser",
  642. "pascal",
  643. "pascaligo",
  644. "pcaxis",
  645. "peoplecode",
  646. "perl",
  647. "php",
  648. "php-extras",
  649. "phpdoc",
  650. "plsql",
  651. "powerquery",
  652. "powershell",
  653. "processing",
  654. "prolog",
  655. "promql",
  656. "properties",
  657. "protobuf",
  658. "psl",
  659. "pug",
  660. "puppet",
  661. "pure",
  662. "purebasic",
  663. "purescript",
  664. "python",
  665. "q",
  666. "qml",
  667. "qore",
  668. "qsharp",
  669. "r",
  670. "racket",
  671. "reason",
  672. "regex",
  673. "rego",
  674. "renpy",
  675. "rest",
  676. "rip",
  677. "roboconf",
  678. "robotframework",
  679. "ruby",
  680. "rust",
  681. "sas",
  682. "sass",
  683. "scala",
  684. "scheme",
  685. "scss",
  686. "shell-session",
  687. "smali",
  688. "smalltalk",
  689. "smarty",
  690. "sml",
  691. "solidity",
  692. "solution-file",
  693. "soy",
  694. "sparql",
  695. "splunk-spl",
  696. "sqf",
  697. "sql",
  698. "squirrel",
  699. "stan",
  700. "stylus",
  701. "swift",
  702. "systemd",
  703. "t4-cs",
  704. "t4-templating",
  705. "t4-vb",
  706. "tap",
  707. "tcl",
  708. "textile",
  709. "toml",
  710. "tremor",
  711. "tsx",
  712. "tt2",
  713. "turtle",
  714. "twig",
  715. "typescript",
  716. "typoscript",
  717. "unrealscript",
  718. "uorazor",
  719. "uri",
  720. "v",
  721. "vala",
  722. "vbnet",
  723. "velocity",
  724. "verilog",
  725. "vhdl",
  726. "vim",
  727. "visual-basic",
  728. "warpscript",
  729. "wasm",
  730. "web-idl",
  731. "wiki",
  732. "wolfram",
  733. "wren",
  734. "xeora",
  735. "xml-doc",
  736. "xojo",
  737. "xquery",
  738. "yaml",
  739. "yang",
  740. "zig",
  741. ]
  742. ],
  743. Literal[
  744. "abap",
  745. "abnf",
  746. "actionscript",
  747. "ada",
  748. "agda",
  749. "al",
  750. "antlr4",
  751. "apacheconf",
  752. "apex",
  753. "apl",
  754. "applescript",
  755. "aql",
  756. "arduino",
  757. "arff",
  758. "asciidoc",
  759. "asm6502",
  760. "asmatmel",
  761. "aspnet",
  762. "autohotkey",
  763. "autoit",
  764. "avisynth",
  765. "avro-idl",
  766. "bash",
  767. "basic",
  768. "batch",
  769. "bbcode",
  770. "bicep",
  771. "birb",
  772. "bison",
  773. "bnf",
  774. "brainfuck",
  775. "brightscript",
  776. "bro",
  777. "bsl",
  778. "c",
  779. "cfscript",
  780. "chaiscript",
  781. "cil",
  782. "clike",
  783. "clojure",
  784. "cmake",
  785. "cobol",
  786. "coffeescript",
  787. "concurnas",
  788. "coq",
  789. "core",
  790. "cpp",
  791. "crystal",
  792. "csharp",
  793. "cshtml",
  794. "csp",
  795. "css",
  796. "css-extras",
  797. "csv",
  798. "cypher",
  799. "d",
  800. "dart",
  801. "dataweave",
  802. "dax",
  803. "dhall",
  804. "diff",
  805. "django",
  806. "dns-zone-file",
  807. "docker",
  808. "dot",
  809. "ebnf",
  810. "editorconfig",
  811. "eiffel",
  812. "ejs",
  813. "elixir",
  814. "elm",
  815. "erb",
  816. "erlang",
  817. "etlua",
  818. "excel-formula",
  819. "factor",
  820. "false",
  821. "firestore-security-rules",
  822. "flow",
  823. "fortran",
  824. "fsharp",
  825. "ftl",
  826. "gap",
  827. "gcode",
  828. "gdscript",
  829. "gedcom",
  830. "gherkin",
  831. "git",
  832. "glsl",
  833. "gml",
  834. "gn",
  835. "go",
  836. "go-module",
  837. "graphql",
  838. "groovy",
  839. "haml",
  840. "handlebars",
  841. "haskell",
  842. "haxe",
  843. "hcl",
  844. "hlsl",
  845. "hoon",
  846. "hpkp",
  847. "hsts",
  848. "http",
  849. "ichigojam",
  850. "icon",
  851. "icu-message-format",
  852. "idris",
  853. "iecst",
  854. "ignore",
  855. "index",
  856. "inform7",
  857. "ini",
  858. "io",
  859. "j",
  860. "java",
  861. "javadoc",
  862. "javadoclike",
  863. "javascript",
  864. "javastacktrace",
  865. "jexl",
  866. "jolie",
  867. "jq",
  868. "js-extras",
  869. "js-templates",
  870. "jsdoc",
  871. "json",
  872. "json5",
  873. "jsonp",
  874. "jsstacktrace",
  875. "jsx",
  876. "julia",
  877. "keepalived",
  878. "keyman",
  879. "kotlin",
  880. "kumir",
  881. "kusto",
  882. "latex",
  883. "latte",
  884. "less",
  885. "lilypond",
  886. "liquid",
  887. "lisp",
  888. "livescript",
  889. "llvm",
  890. "log",
  891. "lolcode",
  892. "lua",
  893. "magma",
  894. "makefile",
  895. "markdown",
  896. "markup",
  897. "markup-templating",
  898. "matlab",
  899. "maxscript",
  900. "mel",
  901. "mermaid",
  902. "mizar",
  903. "mongodb",
  904. "monkey",
  905. "moonscript",
  906. "n1ql",
  907. "n4js",
  908. "nand2tetris-hdl",
  909. "naniscript",
  910. "nasm",
  911. "neon",
  912. "nevod",
  913. "nginx",
  914. "nim",
  915. "nix",
  916. "nsis",
  917. "objectivec",
  918. "ocaml",
  919. "opencl",
  920. "openqasm",
  921. "oz",
  922. "parigp",
  923. "parser",
  924. "pascal",
  925. "pascaligo",
  926. "pcaxis",
  927. "peoplecode",
  928. "perl",
  929. "php",
  930. "php-extras",
  931. "phpdoc",
  932. "plsql",
  933. "powerquery",
  934. "powershell",
  935. "processing",
  936. "prolog",
  937. "promql",
  938. "properties",
  939. "protobuf",
  940. "psl",
  941. "pug",
  942. "puppet",
  943. "pure",
  944. "purebasic",
  945. "purescript",
  946. "python",
  947. "q",
  948. "qml",
  949. "qore",
  950. "qsharp",
  951. "r",
  952. "racket",
  953. "reason",
  954. "regex",
  955. "rego",
  956. "renpy",
  957. "rest",
  958. "rip",
  959. "roboconf",
  960. "robotframework",
  961. "ruby",
  962. "rust",
  963. "sas",
  964. "sass",
  965. "scala",
  966. "scheme",
  967. "scss",
  968. "shell-session",
  969. "smali",
  970. "smalltalk",
  971. "smarty",
  972. "sml",
  973. "solidity",
  974. "solution-file",
  975. "soy",
  976. "sparql",
  977. "splunk-spl",
  978. "sqf",
  979. "sql",
  980. "squirrel",
  981. "stan",
  982. "stylus",
  983. "swift",
  984. "systemd",
  985. "t4-cs",
  986. "t4-templating",
  987. "t4-vb",
  988. "tap",
  989. "tcl",
  990. "textile",
  991. "toml",
  992. "tremor",
  993. "tsx",
  994. "tt2",
  995. "turtle",
  996. "twig",
  997. "typescript",
  998. "typoscript",
  999. "unrealscript",
  1000. "uorazor",
  1001. "uri",
  1002. "v",
  1003. "vala",
  1004. "vbnet",
  1005. "velocity",
  1006. "verilog",
  1007. "vhdl",
  1008. "vim",
  1009. "visual-basic",
  1010. "warpscript",
  1011. "wasm",
  1012. "web-idl",
  1013. "wiki",
  1014. "wolfram",
  1015. "wren",
  1016. "xeora",
  1017. "xml-doc",
  1018. "xojo",
  1019. "xquery",
  1020. "yaml",
  1021. "yang",
  1022. "zig",
  1023. ],
  1024. ]
  1025. ] = None,
  1026. code: Optional[Union[Var[str], str]] = None,
  1027. show_line_numbers: Optional[Union[Var[bool], bool]] = None,
  1028. starting_line_number: Optional[Union[Var[int], int]] = None,
  1029. wrap_long_lines: Optional[Union[Var[bool], bool]] = None,
  1030. custom_style: Optional[Dict[str, Union[str, Var, Color]]] = None,
  1031. code_tag_props: Optional[Union[Var[Dict[str, str]], Dict[str, str]]] = None,
  1032. style: Optional[Style] = None,
  1033. key: Optional[Any] = None,
  1034. id: Optional[Any] = None,
  1035. class_name: Optional[Any] = None,
  1036. autofocus: Optional[bool] = None,
  1037. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1038. on_blur: Optional[
  1039. Union[EventHandler, EventSpec, list, function, BaseVar]
  1040. ] = None,
  1041. on_click: Optional[
  1042. Union[EventHandler, EventSpec, list, function, BaseVar]
  1043. ] = None,
  1044. on_context_menu: Optional[
  1045. Union[EventHandler, EventSpec, list, function, BaseVar]
  1046. ] = None,
  1047. on_double_click: Optional[
  1048. Union[EventHandler, EventSpec, list, function, BaseVar]
  1049. ] = None,
  1050. on_focus: Optional[
  1051. Union[EventHandler, EventSpec, list, function, BaseVar]
  1052. ] = None,
  1053. on_mount: Optional[
  1054. Union[EventHandler, EventSpec, list, function, BaseVar]
  1055. ] = None,
  1056. on_mouse_down: Optional[
  1057. Union[EventHandler, EventSpec, list, function, BaseVar]
  1058. ] = None,
  1059. on_mouse_enter: Optional[
  1060. Union[EventHandler, EventSpec, list, function, BaseVar]
  1061. ] = None,
  1062. on_mouse_leave: Optional[
  1063. Union[EventHandler, EventSpec, list, function, BaseVar]
  1064. ] = None,
  1065. on_mouse_move: Optional[
  1066. Union[EventHandler, EventSpec, list, function, BaseVar]
  1067. ] = None,
  1068. on_mouse_out: Optional[
  1069. Union[EventHandler, EventSpec, list, function, BaseVar]
  1070. ] = None,
  1071. on_mouse_over: Optional[
  1072. Union[EventHandler, EventSpec, list, function, BaseVar]
  1073. ] = None,
  1074. on_mouse_up: Optional[
  1075. Union[EventHandler, EventSpec, list, function, BaseVar]
  1076. ] = None,
  1077. on_scroll: Optional[
  1078. Union[EventHandler, EventSpec, list, function, BaseVar]
  1079. ] = None,
  1080. on_unmount: Optional[
  1081. Union[EventHandler, EventSpec, list, function, BaseVar]
  1082. ] = None,
  1083. **props
  1084. ) -> "CodeBlock":
  1085. """Create a text component.
  1086. Args:
  1087. *children: The children of the component.
  1088. can_copy: Whether a copy button should appears.
  1089. copy_button: A custom copy button to override the default one.
  1090. theme: The theme to use ("light" or "dark").
  1091. language: The language to use.
  1092. code: The code to display.
  1093. show_line_numbers: If this is enabled line numbers will be shown next to the code block.
  1094. starting_line_number: The starting line number to use.
  1095. wrap_long_lines: Whether to wrap long lines.
  1096. custom_style: A custom style for the code block.
  1097. code_tag_props: Props passed down to the code tag.
  1098. style: The style of the component.
  1099. key: A unique key for the component.
  1100. id: The id for the component.
  1101. class_name: The class name for the component.
  1102. autofocus: Whether the component should take the focus once the page is loaded
  1103. custom_attrs: custom attribute
  1104. **props: The props to pass to the component.
  1105. Returns:
  1106. The text component.
  1107. """
  1108. ...
  1109. def add_style(self) -> Style | None: ...
  1110. @staticmethod
  1111. def convert_theme_name(theme) -> str: ...