code.pyi 50 KB

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