code.pyi 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621
  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. import dataclasses
  6. from typing import Any, ClassVar, Dict, Literal, Optional, Union, overload
  7. from reflex.components.component import Component, ComponentNamespace
  8. from reflex.constants.colors import Color
  9. from reflex.event import BASE_STATE, EventType
  10. from reflex.style import Style
  11. from reflex.utils.imports import ImportDict
  12. from reflex.vars.base import Var
  13. LiteralCodeLanguage = Literal[
  14. "abap",
  15. "abnf",
  16. "actionscript",
  17. "ada",
  18. "agda",
  19. "al",
  20. "antlr4",
  21. "apacheconf",
  22. "apex",
  23. "apl",
  24. "applescript",
  25. "aql",
  26. "arduino",
  27. "arff",
  28. "asciidoc",
  29. "asm6502",
  30. "asmatmel",
  31. "aspnet",
  32. "autohotkey",
  33. "autoit",
  34. "avisynth",
  35. "avro-idl",
  36. "bash",
  37. "basic",
  38. "batch",
  39. "bbcode",
  40. "bicep",
  41. "birb",
  42. "bison",
  43. "bnf",
  44. "brainfuck",
  45. "brightscript",
  46. "bro",
  47. "bsl",
  48. "c",
  49. "cfscript",
  50. "chaiscript",
  51. "cil",
  52. "clike",
  53. "clojure",
  54. "cmake",
  55. "cobol",
  56. "coffeescript",
  57. "concurnas",
  58. "coq",
  59. "core",
  60. "cpp",
  61. "crystal",
  62. "csharp",
  63. "cshtml",
  64. "csp",
  65. "css",
  66. "css-extras",
  67. "csv",
  68. "cypher",
  69. "d",
  70. "dart",
  71. "dataweave",
  72. "dax",
  73. "dhall",
  74. "diff",
  75. "django",
  76. "dns-zone-file",
  77. "docker",
  78. "dot",
  79. "ebnf",
  80. "editorconfig",
  81. "eiffel",
  82. "ejs",
  83. "elixir",
  84. "elm",
  85. "erb",
  86. "erlang",
  87. "etlua",
  88. "excel-formula",
  89. "factor",
  90. "false",
  91. "firestore-security-rules",
  92. "flow",
  93. "fortran",
  94. "fsharp",
  95. "ftl",
  96. "gap",
  97. "gcode",
  98. "gdscript",
  99. "gedcom",
  100. "gherkin",
  101. "git",
  102. "glsl",
  103. "gml",
  104. "gn",
  105. "go",
  106. "go-module",
  107. "graphql",
  108. "groovy",
  109. "haml",
  110. "handlebars",
  111. "haskell",
  112. "haxe",
  113. "hcl",
  114. "hlsl",
  115. "hoon",
  116. "hpkp",
  117. "hsts",
  118. "http",
  119. "ichigojam",
  120. "icon",
  121. "icu-message-format",
  122. "idris",
  123. "iecst",
  124. "ignore",
  125. "index",
  126. "inform7",
  127. "ini",
  128. "io",
  129. "j",
  130. "java",
  131. "javadoc",
  132. "javadoclike",
  133. "javascript",
  134. "javastacktrace",
  135. "jexl",
  136. "jolie",
  137. "jq",
  138. "js-extras",
  139. "js-templates",
  140. "jsdoc",
  141. "json",
  142. "json5",
  143. "jsonp",
  144. "jsstacktrace",
  145. "jsx",
  146. "julia",
  147. "keepalived",
  148. "keyman",
  149. "kotlin",
  150. "kumir",
  151. "kusto",
  152. "latex",
  153. "latte",
  154. "less",
  155. "lilypond",
  156. "liquid",
  157. "lisp",
  158. "livescript",
  159. "llvm",
  160. "log",
  161. "lolcode",
  162. "lua",
  163. "magma",
  164. "makefile",
  165. "markdown",
  166. "markup",
  167. "markup-templating",
  168. "matlab",
  169. "maxscript",
  170. "mel",
  171. "mermaid",
  172. "mizar",
  173. "mongodb",
  174. "monkey",
  175. "moonscript",
  176. "n1ql",
  177. "n4js",
  178. "nand2tetris-hdl",
  179. "naniscript",
  180. "nasm",
  181. "neon",
  182. "nevod",
  183. "nginx",
  184. "nim",
  185. "nix",
  186. "nsis",
  187. "objectivec",
  188. "ocaml",
  189. "opencl",
  190. "openqasm",
  191. "oz",
  192. "parigp",
  193. "parser",
  194. "pascal",
  195. "pascaligo",
  196. "pcaxis",
  197. "peoplecode",
  198. "perl",
  199. "php",
  200. "php-extras",
  201. "phpdoc",
  202. "plsql",
  203. "powerquery",
  204. "powershell",
  205. "processing",
  206. "prolog",
  207. "promql",
  208. "properties",
  209. "protobuf",
  210. "psl",
  211. "pug",
  212. "puppet",
  213. "pure",
  214. "purebasic",
  215. "purescript",
  216. "python",
  217. "q",
  218. "qml",
  219. "qore",
  220. "qsharp",
  221. "r",
  222. "racket",
  223. "reason",
  224. "regex",
  225. "rego",
  226. "renpy",
  227. "rest",
  228. "rip",
  229. "roboconf",
  230. "robotframework",
  231. "ruby",
  232. "rust",
  233. "sas",
  234. "sass",
  235. "scala",
  236. "scheme",
  237. "scss",
  238. "shell-session",
  239. "smali",
  240. "smalltalk",
  241. "smarty",
  242. "sml",
  243. "solidity",
  244. "solution-file",
  245. "soy",
  246. "sparql",
  247. "splunk-spl",
  248. "sqf",
  249. "sql",
  250. "squirrel",
  251. "stan",
  252. "stylus",
  253. "swift",
  254. "systemd",
  255. "t4-cs",
  256. "t4-templating",
  257. "t4-vb",
  258. "tap",
  259. "tcl",
  260. "textile",
  261. "toml",
  262. "tremor",
  263. "tsx",
  264. "tt2",
  265. "turtle",
  266. "twig",
  267. "typescript",
  268. "typoscript",
  269. "unrealscript",
  270. "uorazor",
  271. "uri",
  272. "v",
  273. "vala",
  274. "vbnet",
  275. "velocity",
  276. "verilog",
  277. "vhdl",
  278. "vim",
  279. "visual-basic",
  280. "warpscript",
  281. "wasm",
  282. "web-idl",
  283. "wiki",
  284. "wolfram",
  285. "wren",
  286. "xeora",
  287. "xml-doc",
  288. "xojo",
  289. "xquery",
  290. "yaml",
  291. "yang",
  292. "zig",
  293. ]
  294. def construct_theme_var(theme: str) -> Var[Theme]: ...
  295. @dataclasses.dataclass(init=False)
  296. class Theme:
  297. a11y_dark: ClassVar[Var[Theme]] = construct_theme_var("a11yDark")
  298. atom_dark: ClassVar[Var[Theme]] = construct_theme_var("atomDark")
  299. cb: ClassVar[Var[Theme]] = construct_theme_var("cb")
  300. coldark_cold: ClassVar[Var[Theme]] = construct_theme_var("coldarkCold")
  301. coldark_dark: ClassVar[Var[Theme]] = construct_theme_var("coldarkDark")
  302. coy: ClassVar[Var[Theme]] = construct_theme_var("coy")
  303. coy_without_shadows: ClassVar[Var[Theme]] = construct_theme_var("coyWithoutShadows")
  304. darcula: ClassVar[Var[Theme]] = construct_theme_var("darcula")
  305. dark: ClassVar[Var[Theme]] = construct_theme_var("oneDark")
  306. dracula: ClassVar[Var[Theme]] = construct_theme_var("dracula")
  307. duotone_dark: ClassVar[Var[Theme]] = construct_theme_var("duotoneDark")
  308. duotone_earth: ClassVar[Var[Theme]] = construct_theme_var("duotoneEarth")
  309. duotone_forest: ClassVar[Var[Theme]] = construct_theme_var("duotoneForest")
  310. duotone_light: ClassVar[Var[Theme]] = construct_theme_var("duotoneLight")
  311. duotone_sea: ClassVar[Var[Theme]] = construct_theme_var("duotoneSea")
  312. duotone_space: ClassVar[Var[Theme]] = construct_theme_var("duotoneSpace")
  313. funky: ClassVar[Var[Theme]] = construct_theme_var("funky")
  314. ghcolors: ClassVar[Var[Theme]] = construct_theme_var("ghcolors")
  315. gruvbox_dark: ClassVar[Var[Theme]] = construct_theme_var("gruvboxDark")
  316. gruvbox_light: ClassVar[Var[Theme]] = construct_theme_var("gruvboxLight")
  317. holi_theme: ClassVar[Var[Theme]] = construct_theme_var("holiTheme")
  318. hopscotch: ClassVar[Var[Theme]] = construct_theme_var("hopscotch")
  319. light: ClassVar[Var[Theme]] = construct_theme_var("oneLight")
  320. lucario: ClassVar[Var[Theme]] = construct_theme_var("lucario")
  321. material_dark: ClassVar[Var[Theme]] = construct_theme_var("materialDark")
  322. material_light: ClassVar[Var[Theme]] = construct_theme_var("materialLight")
  323. material_oceanic: ClassVar[Var[Theme]] = construct_theme_var("materialOceanic")
  324. night_owl: ClassVar[Var[Theme]] = construct_theme_var("nightOwl")
  325. nord: ClassVar[Var[Theme]] = construct_theme_var("nord")
  326. okaidia: ClassVar[Var[Theme]] = construct_theme_var("okaidia")
  327. one_dark: ClassVar[Var[Theme]] = construct_theme_var("oneDark")
  328. one_light: ClassVar[Var[Theme]] = construct_theme_var("oneLight")
  329. pojoaque: ClassVar[Var[Theme]] = construct_theme_var("pojoaque")
  330. prism: ClassVar[Var[Theme]] = construct_theme_var("prism")
  331. shades_of_purple: ClassVar[Var[Theme]] = construct_theme_var("shadesOfPurple")
  332. solarized_dark_atom: ClassVar[Var[Theme]] = construct_theme_var("solarizedDarkAtom")
  333. solarizedlight: ClassVar[Var[Theme]] = construct_theme_var("solarizedlight")
  334. synthwave84: ClassVar[Var[Theme]] = construct_theme_var("synthwave84")
  335. tomorrow: ClassVar[Var[Theme]] = construct_theme_var("tomorrow")
  336. twilight: ClassVar[Var[Theme]] = construct_theme_var("twilight")
  337. vs: ClassVar[Var[Theme]] = construct_theme_var("vs")
  338. vs_dark: ClassVar[Var[Theme]] = construct_theme_var("vsDark")
  339. vsc_dark_plus: ClassVar[Var[Theme]] = construct_theme_var("vscDarkPlus")
  340. xonokai: ClassVar[Var[Theme]] = construct_theme_var("xonokai")
  341. z_touch: ClassVar[Var[Theme]] = construct_theme_var("zTouch")
  342. for theme_name in dir(Theme):
  343. if theme_name.startswith("_"):
  344. continue
  345. setattr(Theme, theme_name, getattr(Theme, theme_name)._replace(_var_type=Theme))
  346. class CodeBlock(Component):
  347. def add_imports(self) -> ImportDict: ...
  348. @overload
  349. @classmethod
  350. def create( # type: ignore
  351. cls,
  352. *children,
  353. theme: Optional[Union[Theme, Var[Union[Theme, str]], str]] = None,
  354. language: Optional[
  355. Union[
  356. Literal[
  357. "abap",
  358. "abnf",
  359. "actionscript",
  360. "ada",
  361. "agda",
  362. "al",
  363. "antlr4",
  364. "apacheconf",
  365. "apex",
  366. "apl",
  367. "applescript",
  368. "aql",
  369. "arduino",
  370. "arff",
  371. "asciidoc",
  372. "asm6502",
  373. "asmatmel",
  374. "aspnet",
  375. "autohotkey",
  376. "autoit",
  377. "avisynth",
  378. "avro-idl",
  379. "bash",
  380. "basic",
  381. "batch",
  382. "bbcode",
  383. "bicep",
  384. "birb",
  385. "bison",
  386. "bnf",
  387. "brainfuck",
  388. "brightscript",
  389. "bro",
  390. "bsl",
  391. "c",
  392. "cfscript",
  393. "chaiscript",
  394. "cil",
  395. "clike",
  396. "clojure",
  397. "cmake",
  398. "cobol",
  399. "coffeescript",
  400. "concurnas",
  401. "coq",
  402. "core",
  403. "cpp",
  404. "crystal",
  405. "csharp",
  406. "cshtml",
  407. "csp",
  408. "css",
  409. "css-extras",
  410. "csv",
  411. "cypher",
  412. "d",
  413. "dart",
  414. "dataweave",
  415. "dax",
  416. "dhall",
  417. "diff",
  418. "django",
  419. "dns-zone-file",
  420. "docker",
  421. "dot",
  422. "ebnf",
  423. "editorconfig",
  424. "eiffel",
  425. "ejs",
  426. "elixir",
  427. "elm",
  428. "erb",
  429. "erlang",
  430. "etlua",
  431. "excel-formula",
  432. "factor",
  433. "false",
  434. "firestore-security-rules",
  435. "flow",
  436. "fortran",
  437. "fsharp",
  438. "ftl",
  439. "gap",
  440. "gcode",
  441. "gdscript",
  442. "gedcom",
  443. "gherkin",
  444. "git",
  445. "glsl",
  446. "gml",
  447. "gn",
  448. "go",
  449. "go-module",
  450. "graphql",
  451. "groovy",
  452. "haml",
  453. "handlebars",
  454. "haskell",
  455. "haxe",
  456. "hcl",
  457. "hlsl",
  458. "hoon",
  459. "hpkp",
  460. "hsts",
  461. "http",
  462. "ichigojam",
  463. "icon",
  464. "icu-message-format",
  465. "idris",
  466. "iecst",
  467. "ignore",
  468. "index",
  469. "inform7",
  470. "ini",
  471. "io",
  472. "j",
  473. "java",
  474. "javadoc",
  475. "javadoclike",
  476. "javascript",
  477. "javastacktrace",
  478. "jexl",
  479. "jolie",
  480. "jq",
  481. "js-extras",
  482. "js-templates",
  483. "jsdoc",
  484. "json",
  485. "json5",
  486. "jsonp",
  487. "jsstacktrace",
  488. "jsx",
  489. "julia",
  490. "keepalived",
  491. "keyman",
  492. "kotlin",
  493. "kumir",
  494. "kusto",
  495. "latex",
  496. "latte",
  497. "less",
  498. "lilypond",
  499. "liquid",
  500. "lisp",
  501. "livescript",
  502. "llvm",
  503. "log",
  504. "lolcode",
  505. "lua",
  506. "magma",
  507. "makefile",
  508. "markdown",
  509. "markup",
  510. "markup-templating",
  511. "matlab",
  512. "maxscript",
  513. "mel",
  514. "mermaid",
  515. "mizar",
  516. "mongodb",
  517. "monkey",
  518. "moonscript",
  519. "n1ql",
  520. "n4js",
  521. "nand2tetris-hdl",
  522. "naniscript",
  523. "nasm",
  524. "neon",
  525. "nevod",
  526. "nginx",
  527. "nim",
  528. "nix",
  529. "nsis",
  530. "objectivec",
  531. "ocaml",
  532. "opencl",
  533. "openqasm",
  534. "oz",
  535. "parigp",
  536. "parser",
  537. "pascal",
  538. "pascaligo",
  539. "pcaxis",
  540. "peoplecode",
  541. "perl",
  542. "php",
  543. "php-extras",
  544. "phpdoc",
  545. "plsql",
  546. "powerquery",
  547. "powershell",
  548. "processing",
  549. "prolog",
  550. "promql",
  551. "properties",
  552. "protobuf",
  553. "psl",
  554. "pug",
  555. "puppet",
  556. "pure",
  557. "purebasic",
  558. "purescript",
  559. "python",
  560. "q",
  561. "qml",
  562. "qore",
  563. "qsharp",
  564. "r",
  565. "racket",
  566. "reason",
  567. "regex",
  568. "rego",
  569. "renpy",
  570. "rest",
  571. "rip",
  572. "roboconf",
  573. "robotframework",
  574. "ruby",
  575. "rust",
  576. "sas",
  577. "sass",
  578. "scala",
  579. "scheme",
  580. "scss",
  581. "shell-session",
  582. "smali",
  583. "smalltalk",
  584. "smarty",
  585. "sml",
  586. "solidity",
  587. "solution-file",
  588. "soy",
  589. "sparql",
  590. "splunk-spl",
  591. "sqf",
  592. "sql",
  593. "squirrel",
  594. "stan",
  595. "stylus",
  596. "swift",
  597. "systemd",
  598. "t4-cs",
  599. "t4-templating",
  600. "t4-vb",
  601. "tap",
  602. "tcl",
  603. "textile",
  604. "toml",
  605. "tremor",
  606. "tsx",
  607. "tt2",
  608. "turtle",
  609. "twig",
  610. "typescript",
  611. "typoscript",
  612. "unrealscript",
  613. "uorazor",
  614. "uri",
  615. "v",
  616. "vala",
  617. "vbnet",
  618. "velocity",
  619. "verilog",
  620. "vhdl",
  621. "vim",
  622. "visual-basic",
  623. "warpscript",
  624. "wasm",
  625. "web-idl",
  626. "wiki",
  627. "wolfram",
  628. "wren",
  629. "xeora",
  630. "xml-doc",
  631. "xojo",
  632. "xquery",
  633. "yaml",
  634. "yang",
  635. "zig",
  636. ],
  637. Var[
  638. Literal[
  639. "abap",
  640. "abnf",
  641. "actionscript",
  642. "ada",
  643. "agda",
  644. "al",
  645. "antlr4",
  646. "apacheconf",
  647. "apex",
  648. "apl",
  649. "applescript",
  650. "aql",
  651. "arduino",
  652. "arff",
  653. "asciidoc",
  654. "asm6502",
  655. "asmatmel",
  656. "aspnet",
  657. "autohotkey",
  658. "autoit",
  659. "avisynth",
  660. "avro-idl",
  661. "bash",
  662. "basic",
  663. "batch",
  664. "bbcode",
  665. "bicep",
  666. "birb",
  667. "bison",
  668. "bnf",
  669. "brainfuck",
  670. "brightscript",
  671. "bro",
  672. "bsl",
  673. "c",
  674. "cfscript",
  675. "chaiscript",
  676. "cil",
  677. "clike",
  678. "clojure",
  679. "cmake",
  680. "cobol",
  681. "coffeescript",
  682. "concurnas",
  683. "coq",
  684. "core",
  685. "cpp",
  686. "crystal",
  687. "csharp",
  688. "cshtml",
  689. "csp",
  690. "css",
  691. "css-extras",
  692. "csv",
  693. "cypher",
  694. "d",
  695. "dart",
  696. "dataweave",
  697. "dax",
  698. "dhall",
  699. "diff",
  700. "django",
  701. "dns-zone-file",
  702. "docker",
  703. "dot",
  704. "ebnf",
  705. "editorconfig",
  706. "eiffel",
  707. "ejs",
  708. "elixir",
  709. "elm",
  710. "erb",
  711. "erlang",
  712. "etlua",
  713. "excel-formula",
  714. "factor",
  715. "false",
  716. "firestore-security-rules",
  717. "flow",
  718. "fortran",
  719. "fsharp",
  720. "ftl",
  721. "gap",
  722. "gcode",
  723. "gdscript",
  724. "gedcom",
  725. "gherkin",
  726. "git",
  727. "glsl",
  728. "gml",
  729. "gn",
  730. "go",
  731. "go-module",
  732. "graphql",
  733. "groovy",
  734. "haml",
  735. "handlebars",
  736. "haskell",
  737. "haxe",
  738. "hcl",
  739. "hlsl",
  740. "hoon",
  741. "hpkp",
  742. "hsts",
  743. "http",
  744. "ichigojam",
  745. "icon",
  746. "icu-message-format",
  747. "idris",
  748. "iecst",
  749. "ignore",
  750. "index",
  751. "inform7",
  752. "ini",
  753. "io",
  754. "j",
  755. "java",
  756. "javadoc",
  757. "javadoclike",
  758. "javascript",
  759. "javastacktrace",
  760. "jexl",
  761. "jolie",
  762. "jq",
  763. "js-extras",
  764. "js-templates",
  765. "jsdoc",
  766. "json",
  767. "json5",
  768. "jsonp",
  769. "jsstacktrace",
  770. "jsx",
  771. "julia",
  772. "keepalived",
  773. "keyman",
  774. "kotlin",
  775. "kumir",
  776. "kusto",
  777. "latex",
  778. "latte",
  779. "less",
  780. "lilypond",
  781. "liquid",
  782. "lisp",
  783. "livescript",
  784. "llvm",
  785. "log",
  786. "lolcode",
  787. "lua",
  788. "magma",
  789. "makefile",
  790. "markdown",
  791. "markup",
  792. "markup-templating",
  793. "matlab",
  794. "maxscript",
  795. "mel",
  796. "mermaid",
  797. "mizar",
  798. "mongodb",
  799. "monkey",
  800. "moonscript",
  801. "n1ql",
  802. "n4js",
  803. "nand2tetris-hdl",
  804. "naniscript",
  805. "nasm",
  806. "neon",
  807. "nevod",
  808. "nginx",
  809. "nim",
  810. "nix",
  811. "nsis",
  812. "objectivec",
  813. "ocaml",
  814. "opencl",
  815. "openqasm",
  816. "oz",
  817. "parigp",
  818. "parser",
  819. "pascal",
  820. "pascaligo",
  821. "pcaxis",
  822. "peoplecode",
  823. "perl",
  824. "php",
  825. "php-extras",
  826. "phpdoc",
  827. "plsql",
  828. "powerquery",
  829. "powershell",
  830. "processing",
  831. "prolog",
  832. "promql",
  833. "properties",
  834. "protobuf",
  835. "psl",
  836. "pug",
  837. "puppet",
  838. "pure",
  839. "purebasic",
  840. "purescript",
  841. "python",
  842. "q",
  843. "qml",
  844. "qore",
  845. "qsharp",
  846. "r",
  847. "racket",
  848. "reason",
  849. "regex",
  850. "rego",
  851. "renpy",
  852. "rest",
  853. "rip",
  854. "roboconf",
  855. "robotframework",
  856. "ruby",
  857. "rust",
  858. "sas",
  859. "sass",
  860. "scala",
  861. "scheme",
  862. "scss",
  863. "shell-session",
  864. "smali",
  865. "smalltalk",
  866. "smarty",
  867. "sml",
  868. "solidity",
  869. "solution-file",
  870. "soy",
  871. "sparql",
  872. "splunk-spl",
  873. "sqf",
  874. "sql",
  875. "squirrel",
  876. "stan",
  877. "stylus",
  878. "swift",
  879. "systemd",
  880. "t4-cs",
  881. "t4-templating",
  882. "t4-vb",
  883. "tap",
  884. "tcl",
  885. "textile",
  886. "toml",
  887. "tremor",
  888. "tsx",
  889. "tt2",
  890. "turtle",
  891. "twig",
  892. "typescript",
  893. "typoscript",
  894. "unrealscript",
  895. "uorazor",
  896. "uri",
  897. "v",
  898. "vala",
  899. "vbnet",
  900. "velocity",
  901. "verilog",
  902. "vhdl",
  903. "vim",
  904. "visual-basic",
  905. "warpscript",
  906. "wasm",
  907. "web-idl",
  908. "wiki",
  909. "wolfram",
  910. "wren",
  911. "xeora",
  912. "xml-doc",
  913. "xojo",
  914. "xquery",
  915. "yaml",
  916. "yang",
  917. "zig",
  918. ]
  919. ],
  920. ]
  921. ] = None,
  922. code: Optional[Union[Var[str], str]] = None,
  923. show_line_numbers: Optional[Union[Var[bool], bool]] = None,
  924. starting_line_number: Optional[Union[Var[int], int]] = None,
  925. wrap_long_lines: Optional[Union[Var[bool], bool]] = None,
  926. custom_style: Optional[Dict[str, Union[str, Var, Color]]] = None,
  927. code_tag_props: Optional[Union[Dict[str, str], Var[Dict[str, str]]]] = None,
  928. can_copy: Optional[bool] = None,
  929. copy_button: Optional[Union[Component, bool]] = None,
  930. style: Optional[Style] = None,
  931. key: Optional[Any] = None,
  932. id: Optional[Any] = None,
  933. class_name: Optional[Any] = None,
  934. autofocus: Optional[bool] = None,
  935. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  936. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  937. on_click: Optional[EventType[[], BASE_STATE]] = None,
  938. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  939. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  940. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  941. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  942. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  943. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  944. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  945. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  946. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  947. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  948. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  949. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  950. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  951. **props,
  952. ) -> "CodeBlock":
  953. """Create a text component.
  954. Args:
  955. *children: The children of the component.
  956. theme: The theme to use ("light" or "dark").
  957. language: The language to use.
  958. code: The code to display.
  959. show_line_numbers: If this is enabled line numbers will be shown next to the code block.
  960. starting_line_number: The starting line number to use.
  961. wrap_long_lines: Whether to wrap long lines.
  962. custom_style: A custom style for the code block.
  963. code_tag_props: Props passed down to the code tag.
  964. can_copy: Whether a copy button should appear.
  965. copy_button: A custom copy button to override the default one.
  966. style: The style of the component.
  967. key: A unique key for the component.
  968. id: The id for the component.
  969. class_name: The class name for the component.
  970. autofocus: Whether the component should take the focus once the page is loaded
  971. custom_attrs: custom attribute
  972. **props: The props to pass to the component.
  973. Returns:
  974. The text component.
  975. """
  976. ...
  977. def add_style(self): ...
  978. class CodeblockNamespace(ComponentNamespace):
  979. themes = Theme
  980. @staticmethod
  981. def __call__(
  982. *children,
  983. theme: Optional[Union[Theme, Var[Union[Theme, str]], str]] = None,
  984. language: Optional[
  985. Union[
  986. Literal[
  987. "abap",
  988. "abnf",
  989. "actionscript",
  990. "ada",
  991. "agda",
  992. "al",
  993. "antlr4",
  994. "apacheconf",
  995. "apex",
  996. "apl",
  997. "applescript",
  998. "aql",
  999. "arduino",
  1000. "arff",
  1001. "asciidoc",
  1002. "asm6502",
  1003. "asmatmel",
  1004. "aspnet",
  1005. "autohotkey",
  1006. "autoit",
  1007. "avisynth",
  1008. "avro-idl",
  1009. "bash",
  1010. "basic",
  1011. "batch",
  1012. "bbcode",
  1013. "bicep",
  1014. "birb",
  1015. "bison",
  1016. "bnf",
  1017. "brainfuck",
  1018. "brightscript",
  1019. "bro",
  1020. "bsl",
  1021. "c",
  1022. "cfscript",
  1023. "chaiscript",
  1024. "cil",
  1025. "clike",
  1026. "clojure",
  1027. "cmake",
  1028. "cobol",
  1029. "coffeescript",
  1030. "concurnas",
  1031. "coq",
  1032. "core",
  1033. "cpp",
  1034. "crystal",
  1035. "csharp",
  1036. "cshtml",
  1037. "csp",
  1038. "css",
  1039. "css-extras",
  1040. "csv",
  1041. "cypher",
  1042. "d",
  1043. "dart",
  1044. "dataweave",
  1045. "dax",
  1046. "dhall",
  1047. "diff",
  1048. "django",
  1049. "dns-zone-file",
  1050. "docker",
  1051. "dot",
  1052. "ebnf",
  1053. "editorconfig",
  1054. "eiffel",
  1055. "ejs",
  1056. "elixir",
  1057. "elm",
  1058. "erb",
  1059. "erlang",
  1060. "etlua",
  1061. "excel-formula",
  1062. "factor",
  1063. "false",
  1064. "firestore-security-rules",
  1065. "flow",
  1066. "fortran",
  1067. "fsharp",
  1068. "ftl",
  1069. "gap",
  1070. "gcode",
  1071. "gdscript",
  1072. "gedcom",
  1073. "gherkin",
  1074. "git",
  1075. "glsl",
  1076. "gml",
  1077. "gn",
  1078. "go",
  1079. "go-module",
  1080. "graphql",
  1081. "groovy",
  1082. "haml",
  1083. "handlebars",
  1084. "haskell",
  1085. "haxe",
  1086. "hcl",
  1087. "hlsl",
  1088. "hoon",
  1089. "hpkp",
  1090. "hsts",
  1091. "http",
  1092. "ichigojam",
  1093. "icon",
  1094. "icu-message-format",
  1095. "idris",
  1096. "iecst",
  1097. "ignore",
  1098. "index",
  1099. "inform7",
  1100. "ini",
  1101. "io",
  1102. "j",
  1103. "java",
  1104. "javadoc",
  1105. "javadoclike",
  1106. "javascript",
  1107. "javastacktrace",
  1108. "jexl",
  1109. "jolie",
  1110. "jq",
  1111. "js-extras",
  1112. "js-templates",
  1113. "jsdoc",
  1114. "json",
  1115. "json5",
  1116. "jsonp",
  1117. "jsstacktrace",
  1118. "jsx",
  1119. "julia",
  1120. "keepalived",
  1121. "keyman",
  1122. "kotlin",
  1123. "kumir",
  1124. "kusto",
  1125. "latex",
  1126. "latte",
  1127. "less",
  1128. "lilypond",
  1129. "liquid",
  1130. "lisp",
  1131. "livescript",
  1132. "llvm",
  1133. "log",
  1134. "lolcode",
  1135. "lua",
  1136. "magma",
  1137. "makefile",
  1138. "markdown",
  1139. "markup",
  1140. "markup-templating",
  1141. "matlab",
  1142. "maxscript",
  1143. "mel",
  1144. "mermaid",
  1145. "mizar",
  1146. "mongodb",
  1147. "monkey",
  1148. "moonscript",
  1149. "n1ql",
  1150. "n4js",
  1151. "nand2tetris-hdl",
  1152. "naniscript",
  1153. "nasm",
  1154. "neon",
  1155. "nevod",
  1156. "nginx",
  1157. "nim",
  1158. "nix",
  1159. "nsis",
  1160. "objectivec",
  1161. "ocaml",
  1162. "opencl",
  1163. "openqasm",
  1164. "oz",
  1165. "parigp",
  1166. "parser",
  1167. "pascal",
  1168. "pascaligo",
  1169. "pcaxis",
  1170. "peoplecode",
  1171. "perl",
  1172. "php",
  1173. "php-extras",
  1174. "phpdoc",
  1175. "plsql",
  1176. "powerquery",
  1177. "powershell",
  1178. "processing",
  1179. "prolog",
  1180. "promql",
  1181. "properties",
  1182. "protobuf",
  1183. "psl",
  1184. "pug",
  1185. "puppet",
  1186. "pure",
  1187. "purebasic",
  1188. "purescript",
  1189. "python",
  1190. "q",
  1191. "qml",
  1192. "qore",
  1193. "qsharp",
  1194. "r",
  1195. "racket",
  1196. "reason",
  1197. "regex",
  1198. "rego",
  1199. "renpy",
  1200. "rest",
  1201. "rip",
  1202. "roboconf",
  1203. "robotframework",
  1204. "ruby",
  1205. "rust",
  1206. "sas",
  1207. "sass",
  1208. "scala",
  1209. "scheme",
  1210. "scss",
  1211. "shell-session",
  1212. "smali",
  1213. "smalltalk",
  1214. "smarty",
  1215. "sml",
  1216. "solidity",
  1217. "solution-file",
  1218. "soy",
  1219. "sparql",
  1220. "splunk-spl",
  1221. "sqf",
  1222. "sql",
  1223. "squirrel",
  1224. "stan",
  1225. "stylus",
  1226. "swift",
  1227. "systemd",
  1228. "t4-cs",
  1229. "t4-templating",
  1230. "t4-vb",
  1231. "tap",
  1232. "tcl",
  1233. "textile",
  1234. "toml",
  1235. "tremor",
  1236. "tsx",
  1237. "tt2",
  1238. "turtle",
  1239. "twig",
  1240. "typescript",
  1241. "typoscript",
  1242. "unrealscript",
  1243. "uorazor",
  1244. "uri",
  1245. "v",
  1246. "vala",
  1247. "vbnet",
  1248. "velocity",
  1249. "verilog",
  1250. "vhdl",
  1251. "vim",
  1252. "visual-basic",
  1253. "warpscript",
  1254. "wasm",
  1255. "web-idl",
  1256. "wiki",
  1257. "wolfram",
  1258. "wren",
  1259. "xeora",
  1260. "xml-doc",
  1261. "xojo",
  1262. "xquery",
  1263. "yaml",
  1264. "yang",
  1265. "zig",
  1266. ],
  1267. Var[
  1268. Literal[
  1269. "abap",
  1270. "abnf",
  1271. "actionscript",
  1272. "ada",
  1273. "agda",
  1274. "al",
  1275. "antlr4",
  1276. "apacheconf",
  1277. "apex",
  1278. "apl",
  1279. "applescript",
  1280. "aql",
  1281. "arduino",
  1282. "arff",
  1283. "asciidoc",
  1284. "asm6502",
  1285. "asmatmel",
  1286. "aspnet",
  1287. "autohotkey",
  1288. "autoit",
  1289. "avisynth",
  1290. "avro-idl",
  1291. "bash",
  1292. "basic",
  1293. "batch",
  1294. "bbcode",
  1295. "bicep",
  1296. "birb",
  1297. "bison",
  1298. "bnf",
  1299. "brainfuck",
  1300. "brightscript",
  1301. "bro",
  1302. "bsl",
  1303. "c",
  1304. "cfscript",
  1305. "chaiscript",
  1306. "cil",
  1307. "clike",
  1308. "clojure",
  1309. "cmake",
  1310. "cobol",
  1311. "coffeescript",
  1312. "concurnas",
  1313. "coq",
  1314. "core",
  1315. "cpp",
  1316. "crystal",
  1317. "csharp",
  1318. "cshtml",
  1319. "csp",
  1320. "css",
  1321. "css-extras",
  1322. "csv",
  1323. "cypher",
  1324. "d",
  1325. "dart",
  1326. "dataweave",
  1327. "dax",
  1328. "dhall",
  1329. "diff",
  1330. "django",
  1331. "dns-zone-file",
  1332. "docker",
  1333. "dot",
  1334. "ebnf",
  1335. "editorconfig",
  1336. "eiffel",
  1337. "ejs",
  1338. "elixir",
  1339. "elm",
  1340. "erb",
  1341. "erlang",
  1342. "etlua",
  1343. "excel-formula",
  1344. "factor",
  1345. "false",
  1346. "firestore-security-rules",
  1347. "flow",
  1348. "fortran",
  1349. "fsharp",
  1350. "ftl",
  1351. "gap",
  1352. "gcode",
  1353. "gdscript",
  1354. "gedcom",
  1355. "gherkin",
  1356. "git",
  1357. "glsl",
  1358. "gml",
  1359. "gn",
  1360. "go",
  1361. "go-module",
  1362. "graphql",
  1363. "groovy",
  1364. "haml",
  1365. "handlebars",
  1366. "haskell",
  1367. "haxe",
  1368. "hcl",
  1369. "hlsl",
  1370. "hoon",
  1371. "hpkp",
  1372. "hsts",
  1373. "http",
  1374. "ichigojam",
  1375. "icon",
  1376. "icu-message-format",
  1377. "idris",
  1378. "iecst",
  1379. "ignore",
  1380. "index",
  1381. "inform7",
  1382. "ini",
  1383. "io",
  1384. "j",
  1385. "java",
  1386. "javadoc",
  1387. "javadoclike",
  1388. "javascript",
  1389. "javastacktrace",
  1390. "jexl",
  1391. "jolie",
  1392. "jq",
  1393. "js-extras",
  1394. "js-templates",
  1395. "jsdoc",
  1396. "json",
  1397. "json5",
  1398. "jsonp",
  1399. "jsstacktrace",
  1400. "jsx",
  1401. "julia",
  1402. "keepalived",
  1403. "keyman",
  1404. "kotlin",
  1405. "kumir",
  1406. "kusto",
  1407. "latex",
  1408. "latte",
  1409. "less",
  1410. "lilypond",
  1411. "liquid",
  1412. "lisp",
  1413. "livescript",
  1414. "llvm",
  1415. "log",
  1416. "lolcode",
  1417. "lua",
  1418. "magma",
  1419. "makefile",
  1420. "markdown",
  1421. "markup",
  1422. "markup-templating",
  1423. "matlab",
  1424. "maxscript",
  1425. "mel",
  1426. "mermaid",
  1427. "mizar",
  1428. "mongodb",
  1429. "monkey",
  1430. "moonscript",
  1431. "n1ql",
  1432. "n4js",
  1433. "nand2tetris-hdl",
  1434. "naniscript",
  1435. "nasm",
  1436. "neon",
  1437. "nevod",
  1438. "nginx",
  1439. "nim",
  1440. "nix",
  1441. "nsis",
  1442. "objectivec",
  1443. "ocaml",
  1444. "opencl",
  1445. "openqasm",
  1446. "oz",
  1447. "parigp",
  1448. "parser",
  1449. "pascal",
  1450. "pascaligo",
  1451. "pcaxis",
  1452. "peoplecode",
  1453. "perl",
  1454. "php",
  1455. "php-extras",
  1456. "phpdoc",
  1457. "plsql",
  1458. "powerquery",
  1459. "powershell",
  1460. "processing",
  1461. "prolog",
  1462. "promql",
  1463. "properties",
  1464. "protobuf",
  1465. "psl",
  1466. "pug",
  1467. "puppet",
  1468. "pure",
  1469. "purebasic",
  1470. "purescript",
  1471. "python",
  1472. "q",
  1473. "qml",
  1474. "qore",
  1475. "qsharp",
  1476. "r",
  1477. "racket",
  1478. "reason",
  1479. "regex",
  1480. "rego",
  1481. "renpy",
  1482. "rest",
  1483. "rip",
  1484. "roboconf",
  1485. "robotframework",
  1486. "ruby",
  1487. "rust",
  1488. "sas",
  1489. "sass",
  1490. "scala",
  1491. "scheme",
  1492. "scss",
  1493. "shell-session",
  1494. "smali",
  1495. "smalltalk",
  1496. "smarty",
  1497. "sml",
  1498. "solidity",
  1499. "solution-file",
  1500. "soy",
  1501. "sparql",
  1502. "splunk-spl",
  1503. "sqf",
  1504. "sql",
  1505. "squirrel",
  1506. "stan",
  1507. "stylus",
  1508. "swift",
  1509. "systemd",
  1510. "t4-cs",
  1511. "t4-templating",
  1512. "t4-vb",
  1513. "tap",
  1514. "tcl",
  1515. "textile",
  1516. "toml",
  1517. "tremor",
  1518. "tsx",
  1519. "tt2",
  1520. "turtle",
  1521. "twig",
  1522. "typescript",
  1523. "typoscript",
  1524. "unrealscript",
  1525. "uorazor",
  1526. "uri",
  1527. "v",
  1528. "vala",
  1529. "vbnet",
  1530. "velocity",
  1531. "verilog",
  1532. "vhdl",
  1533. "vim",
  1534. "visual-basic",
  1535. "warpscript",
  1536. "wasm",
  1537. "web-idl",
  1538. "wiki",
  1539. "wolfram",
  1540. "wren",
  1541. "xeora",
  1542. "xml-doc",
  1543. "xojo",
  1544. "xquery",
  1545. "yaml",
  1546. "yang",
  1547. "zig",
  1548. ]
  1549. ],
  1550. ]
  1551. ] = None,
  1552. code: Optional[Union[Var[str], str]] = None,
  1553. show_line_numbers: Optional[Union[Var[bool], bool]] = None,
  1554. starting_line_number: Optional[Union[Var[int], int]] = None,
  1555. wrap_long_lines: Optional[Union[Var[bool], bool]] = None,
  1556. custom_style: Optional[Dict[str, Union[str, Var, Color]]] = None,
  1557. code_tag_props: Optional[Union[Dict[str, str], Var[Dict[str, str]]]] = None,
  1558. can_copy: Optional[bool] = None,
  1559. copy_button: Optional[Union[Component, bool]] = None,
  1560. style: Optional[Style] = None,
  1561. key: Optional[Any] = None,
  1562. id: Optional[Any] = None,
  1563. class_name: Optional[Any] = None,
  1564. autofocus: Optional[bool] = None,
  1565. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1566. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  1567. on_click: Optional[EventType[[], BASE_STATE]] = None,
  1568. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  1569. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  1570. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  1571. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  1572. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  1573. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  1574. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  1575. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  1576. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  1577. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  1578. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  1579. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  1580. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  1581. **props,
  1582. ) -> "CodeBlock":
  1583. """Create a text component.
  1584. Args:
  1585. *children: The children of the component.
  1586. theme: The theme to use ("light" or "dark").
  1587. language: The language to use.
  1588. code: The code to display.
  1589. show_line_numbers: If this is enabled line numbers will be shown next to the code block.
  1590. starting_line_number: The starting line number to use.
  1591. wrap_long_lines: Whether to wrap long lines.
  1592. custom_style: A custom style for the code block.
  1593. code_tag_props: Props passed down to the code tag.
  1594. can_copy: Whether a copy button should appear.
  1595. copy_button: A custom copy button to override the default one.
  1596. style: The style of the component.
  1597. key: A unique key for the component.
  1598. id: The id for the component.
  1599. class_name: The class name for the component.
  1600. autofocus: Whether the component should take the focus once the page is loaded
  1601. custom_attrs: custom attribute
  1602. **props: The props to pass to the component.
  1603. Returns:
  1604. The text component.
  1605. """
  1606. ...
  1607. code_block = CodeblockNamespace()