shiki_code_block.pyi 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190
  1. """Stub file for reflex/components/datadisplay/shiki_code_block.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Literal, Optional, overload
  6. from reflex.base import Base
  7. from reflex.components.component import Component, ComponentNamespace
  8. from reflex.components.markdown.markdown import MarkdownComponentMap
  9. from reflex.components.props import NoExtrasAllowedProps
  10. from reflex.event import EventType
  11. from reflex.style import Style
  12. from reflex.vars.base import Var
  13. from reflex.vars.function import FunctionStringVar
  14. def copy_script() -> Any: ...
  15. SHIKIJS_TRANSFORMER_FNS = {
  16. "transformerNotationDiff",
  17. "transformerNotationHighlight",
  18. "transformerNotationWordHighlight",
  19. "transformerNotationFocus",
  20. "transformerNotationErrorLevel",
  21. "transformerRenderWhitespace",
  22. "transformerMetaHighlight",
  23. "transformerMetaWordHighlight",
  24. "transformerCompactLineOptions",
  25. "transformerRemoveNotationEscape",
  26. }
  27. LINE_NUMBER_STYLING = {
  28. "code": {
  29. "counter-reset": "step",
  30. "counter-increment": "step 0",
  31. "display": "grid",
  32. "line-height": "1.7",
  33. "font-size": "0.875em",
  34. },
  35. "code .line::before": {
  36. "content": "counter(step)",
  37. "counter-increment": "step",
  38. "width": "1rem",
  39. "margin-right": "1.5rem",
  40. "display": "inline-block",
  41. "text-align": "right",
  42. "color": "rgba(115,138,148,.4)",
  43. },
  44. }
  45. BOX_PARENT_STYLING = {
  46. "pre": {
  47. "margin": "0",
  48. "padding": "24px",
  49. "background": "transparent",
  50. "overflow-x": "auto",
  51. "border-radius": "6px",
  52. }
  53. }
  54. THEME_MAPPING = {
  55. "light": "one-light",
  56. "dark": "one-dark-pro",
  57. "a11y-dark": "github-dark",
  58. }
  59. LANGUAGE_MAPPING = {"bash": "shellscript"}
  60. LiteralCodeLanguage = Literal[
  61. "abap",
  62. "actionscript-3",
  63. "ada",
  64. "angular-html",
  65. "angular-ts",
  66. "apache",
  67. "apex",
  68. "apl",
  69. "applescript",
  70. "ara",
  71. "asciidoc",
  72. "asm",
  73. "astro",
  74. "awk",
  75. "ballerina",
  76. "bat",
  77. "beancount",
  78. "berry",
  79. "bibtex",
  80. "bicep",
  81. "blade",
  82. "c",
  83. "cadence",
  84. "clarity",
  85. "clojure",
  86. "cmake",
  87. "cobol",
  88. "codeowners",
  89. "codeql",
  90. "coffee",
  91. "common-lisp",
  92. "coq",
  93. "cpp",
  94. "crystal",
  95. "csharp",
  96. "css",
  97. "csv",
  98. "cue",
  99. "cypher",
  100. "d",
  101. "dart",
  102. "dax",
  103. "desktop",
  104. "diff",
  105. "docker",
  106. "dotenv",
  107. "dream-maker",
  108. "edge",
  109. "elixir",
  110. "elm",
  111. "emacs-lisp",
  112. "erb",
  113. "erlang",
  114. "fennel",
  115. "fish",
  116. "fluent",
  117. "fortran-fixed-form",
  118. "fortran-free-form",
  119. "fsharp",
  120. "gdresource",
  121. "gdscript",
  122. "gdshader",
  123. "genie",
  124. "gherkin",
  125. "git-commit",
  126. "git-rebase",
  127. "gleam",
  128. "glimmer-js",
  129. "glimmer-ts",
  130. "glsl",
  131. "gnuplot",
  132. "go",
  133. "graphql",
  134. "groovy",
  135. "hack",
  136. "haml",
  137. "handlebars",
  138. "haskell",
  139. "haxe",
  140. "hcl",
  141. "hjson",
  142. "hlsl",
  143. "html",
  144. "html-derivative",
  145. "http",
  146. "hxml",
  147. "hy",
  148. "imba",
  149. "ini",
  150. "java",
  151. "javascript",
  152. "jinja",
  153. "jison",
  154. "json",
  155. "json5",
  156. "jsonc",
  157. "jsonl",
  158. "jsonnet",
  159. "jssm",
  160. "jsx",
  161. "julia",
  162. "kotlin",
  163. "kusto",
  164. "latex",
  165. "lean",
  166. "less",
  167. "liquid",
  168. "log",
  169. "logo",
  170. "lua",
  171. "luau",
  172. "make",
  173. "markdown",
  174. "marko",
  175. "matlab",
  176. "mdc",
  177. "mdx",
  178. "mermaid",
  179. "mojo",
  180. "move",
  181. "narrat",
  182. "nextflow",
  183. "nginx",
  184. "nim",
  185. "nix",
  186. "nushell",
  187. "objective-c",
  188. "objective-cpp",
  189. "ocaml",
  190. "pascal",
  191. "perl",
  192. "php",
  193. "plain",
  194. "plsql",
  195. "po",
  196. "postcss",
  197. "powerquery",
  198. "powershell",
  199. "prisma",
  200. "prolog",
  201. "proto",
  202. "pug",
  203. "puppet",
  204. "purescript",
  205. "python",
  206. "qml",
  207. "qmldir",
  208. "qss",
  209. "r",
  210. "racket",
  211. "raku",
  212. "razor",
  213. "reg",
  214. "regexp",
  215. "rel",
  216. "riscv",
  217. "rst",
  218. "ruby",
  219. "rust",
  220. "sas",
  221. "sass",
  222. "scala",
  223. "scheme",
  224. "scss",
  225. "shaderlab",
  226. "shellscript",
  227. "shellsession",
  228. "smalltalk",
  229. "solidity",
  230. "soy",
  231. "sparql",
  232. "splunk",
  233. "sql",
  234. "ssh-config",
  235. "stata",
  236. "stylus",
  237. "svelte",
  238. "swift",
  239. "system-verilog",
  240. "systemd",
  241. "tasl",
  242. "tcl",
  243. "templ",
  244. "terraform",
  245. "tex",
  246. "toml",
  247. "ts-tags",
  248. "tsv",
  249. "tsx",
  250. "turtle",
  251. "twig",
  252. "typescript",
  253. "typespec",
  254. "typst",
  255. "v",
  256. "vala",
  257. "vb",
  258. "verilog",
  259. "vhdl",
  260. "viml",
  261. "vue",
  262. "vue-html",
  263. "vyper",
  264. "wasm",
  265. "wenyan",
  266. "wgsl",
  267. "wikitext",
  268. "wolfram",
  269. "xml",
  270. "xsl",
  271. "yaml",
  272. "zenscript",
  273. "zig",
  274. ]
  275. LiteralCodeTheme = Literal[
  276. "andromeeda",
  277. "aurora-x",
  278. "ayu-dark",
  279. "catppuccin-frappe",
  280. "catppuccin-latte",
  281. "catppuccin-macchiato",
  282. "catppuccin-mocha",
  283. "dark-plus",
  284. "dracula",
  285. "dracula-soft",
  286. "everforest-dark",
  287. "everforest-light",
  288. "github-dark",
  289. "github-dark-default",
  290. "github-dark-dimmed",
  291. "github-dark-high-contrast",
  292. "github-light",
  293. "github-light-default",
  294. "github-light-high-contrast",
  295. "houston",
  296. "laserwave",
  297. "light-plus",
  298. "material-theme",
  299. "material-theme-darker",
  300. "material-theme-lighter",
  301. "material-theme-ocean",
  302. "material-theme-palenight",
  303. "min-dark",
  304. "min-light",
  305. "monokai",
  306. "night-owl",
  307. "nord",
  308. "one-dark-pro",
  309. "one-light",
  310. "plastic",
  311. "poimandres",
  312. "red",
  313. "rose-pine",
  314. "rose-pine-dawn",
  315. "rose-pine-moon",
  316. "slack-dark",
  317. "slack-ochin",
  318. "snazzy-light",
  319. "solarized-dark",
  320. "solarized-light",
  321. "synthwave-84",
  322. "tokyo-night",
  323. "vesper",
  324. "vitesse-black",
  325. "vitesse-dark",
  326. "vitesse-light",
  327. ]
  328. class Position(NoExtrasAllowedProps):
  329. line: int
  330. character: int
  331. class ShikiDecorations(NoExtrasAllowedProps):
  332. start: int | Position
  333. end: int | Position
  334. tag_name: str
  335. properties: dict[str, Any]
  336. always_wrap: bool
  337. class ShikiBaseTransformers(Base):
  338. library: str
  339. fns: list[FunctionStringVar]
  340. style: Style | None
  341. class ShikiJsTransformer(ShikiBaseTransformers):
  342. library: str
  343. fns: list[FunctionStringVar]
  344. style: Style | None
  345. class ShikiCodeBlock(Component, MarkdownComponentMap):
  346. @overload
  347. @classmethod
  348. def create( # type: ignore
  349. cls,
  350. *children,
  351. language: Literal[
  352. "abap",
  353. "actionscript-3",
  354. "ada",
  355. "angular-html",
  356. "angular-ts",
  357. "apache",
  358. "apex",
  359. "apl",
  360. "applescript",
  361. "ara",
  362. "asciidoc",
  363. "asm",
  364. "astro",
  365. "awk",
  366. "ballerina",
  367. "bat",
  368. "beancount",
  369. "berry",
  370. "bibtex",
  371. "bicep",
  372. "blade",
  373. "c",
  374. "cadence",
  375. "clarity",
  376. "clojure",
  377. "cmake",
  378. "cobol",
  379. "codeowners",
  380. "codeql",
  381. "coffee",
  382. "common-lisp",
  383. "coq",
  384. "cpp",
  385. "crystal",
  386. "csharp",
  387. "css",
  388. "csv",
  389. "cue",
  390. "cypher",
  391. "d",
  392. "dart",
  393. "dax",
  394. "desktop",
  395. "diff",
  396. "docker",
  397. "dotenv",
  398. "dream-maker",
  399. "edge",
  400. "elixir",
  401. "elm",
  402. "emacs-lisp",
  403. "erb",
  404. "erlang",
  405. "fennel",
  406. "fish",
  407. "fluent",
  408. "fortran-fixed-form",
  409. "fortran-free-form",
  410. "fsharp",
  411. "gdresource",
  412. "gdscript",
  413. "gdshader",
  414. "genie",
  415. "gherkin",
  416. "git-commit",
  417. "git-rebase",
  418. "gleam",
  419. "glimmer-js",
  420. "glimmer-ts",
  421. "glsl",
  422. "gnuplot",
  423. "go",
  424. "graphql",
  425. "groovy",
  426. "hack",
  427. "haml",
  428. "handlebars",
  429. "haskell",
  430. "haxe",
  431. "hcl",
  432. "hjson",
  433. "hlsl",
  434. "html",
  435. "html-derivative",
  436. "http",
  437. "hxml",
  438. "hy",
  439. "imba",
  440. "ini",
  441. "java",
  442. "javascript",
  443. "jinja",
  444. "jison",
  445. "json",
  446. "json5",
  447. "jsonc",
  448. "jsonl",
  449. "jsonnet",
  450. "jssm",
  451. "jsx",
  452. "julia",
  453. "kotlin",
  454. "kusto",
  455. "latex",
  456. "lean",
  457. "less",
  458. "liquid",
  459. "log",
  460. "logo",
  461. "lua",
  462. "luau",
  463. "make",
  464. "markdown",
  465. "marko",
  466. "matlab",
  467. "mdc",
  468. "mdx",
  469. "mermaid",
  470. "mojo",
  471. "move",
  472. "narrat",
  473. "nextflow",
  474. "nginx",
  475. "nim",
  476. "nix",
  477. "nushell",
  478. "objective-c",
  479. "objective-cpp",
  480. "ocaml",
  481. "pascal",
  482. "perl",
  483. "php",
  484. "plain",
  485. "plsql",
  486. "po",
  487. "postcss",
  488. "powerquery",
  489. "powershell",
  490. "prisma",
  491. "prolog",
  492. "proto",
  493. "pug",
  494. "puppet",
  495. "purescript",
  496. "python",
  497. "qml",
  498. "qmldir",
  499. "qss",
  500. "r",
  501. "racket",
  502. "raku",
  503. "razor",
  504. "reg",
  505. "regexp",
  506. "rel",
  507. "riscv",
  508. "rst",
  509. "ruby",
  510. "rust",
  511. "sas",
  512. "sass",
  513. "scala",
  514. "scheme",
  515. "scss",
  516. "shaderlab",
  517. "shellscript",
  518. "shellsession",
  519. "smalltalk",
  520. "solidity",
  521. "soy",
  522. "sparql",
  523. "splunk",
  524. "sql",
  525. "ssh-config",
  526. "stata",
  527. "stylus",
  528. "svelte",
  529. "swift",
  530. "system-verilog",
  531. "systemd",
  532. "tasl",
  533. "tcl",
  534. "templ",
  535. "terraform",
  536. "tex",
  537. "toml",
  538. "ts-tags",
  539. "tsv",
  540. "tsx",
  541. "turtle",
  542. "twig",
  543. "typescript",
  544. "typespec",
  545. "typst",
  546. "v",
  547. "vala",
  548. "vb",
  549. "verilog",
  550. "vhdl",
  551. "viml",
  552. "vue",
  553. "vue-html",
  554. "vyper",
  555. "wasm",
  556. "wenyan",
  557. "wgsl",
  558. "wikitext",
  559. "wolfram",
  560. "xml",
  561. "xsl",
  562. "yaml",
  563. "zenscript",
  564. "zig",
  565. ]
  566. | Var[
  567. Literal[
  568. "abap",
  569. "actionscript-3",
  570. "ada",
  571. "angular-html",
  572. "angular-ts",
  573. "apache",
  574. "apex",
  575. "apl",
  576. "applescript",
  577. "ara",
  578. "asciidoc",
  579. "asm",
  580. "astro",
  581. "awk",
  582. "ballerina",
  583. "bat",
  584. "beancount",
  585. "berry",
  586. "bibtex",
  587. "bicep",
  588. "blade",
  589. "c",
  590. "cadence",
  591. "clarity",
  592. "clojure",
  593. "cmake",
  594. "cobol",
  595. "codeowners",
  596. "codeql",
  597. "coffee",
  598. "common-lisp",
  599. "coq",
  600. "cpp",
  601. "crystal",
  602. "csharp",
  603. "css",
  604. "csv",
  605. "cue",
  606. "cypher",
  607. "d",
  608. "dart",
  609. "dax",
  610. "desktop",
  611. "diff",
  612. "docker",
  613. "dotenv",
  614. "dream-maker",
  615. "edge",
  616. "elixir",
  617. "elm",
  618. "emacs-lisp",
  619. "erb",
  620. "erlang",
  621. "fennel",
  622. "fish",
  623. "fluent",
  624. "fortran-fixed-form",
  625. "fortran-free-form",
  626. "fsharp",
  627. "gdresource",
  628. "gdscript",
  629. "gdshader",
  630. "genie",
  631. "gherkin",
  632. "git-commit",
  633. "git-rebase",
  634. "gleam",
  635. "glimmer-js",
  636. "glimmer-ts",
  637. "glsl",
  638. "gnuplot",
  639. "go",
  640. "graphql",
  641. "groovy",
  642. "hack",
  643. "haml",
  644. "handlebars",
  645. "haskell",
  646. "haxe",
  647. "hcl",
  648. "hjson",
  649. "hlsl",
  650. "html",
  651. "html-derivative",
  652. "http",
  653. "hxml",
  654. "hy",
  655. "imba",
  656. "ini",
  657. "java",
  658. "javascript",
  659. "jinja",
  660. "jison",
  661. "json",
  662. "json5",
  663. "jsonc",
  664. "jsonl",
  665. "jsonnet",
  666. "jssm",
  667. "jsx",
  668. "julia",
  669. "kotlin",
  670. "kusto",
  671. "latex",
  672. "lean",
  673. "less",
  674. "liquid",
  675. "log",
  676. "logo",
  677. "lua",
  678. "luau",
  679. "make",
  680. "markdown",
  681. "marko",
  682. "matlab",
  683. "mdc",
  684. "mdx",
  685. "mermaid",
  686. "mojo",
  687. "move",
  688. "narrat",
  689. "nextflow",
  690. "nginx",
  691. "nim",
  692. "nix",
  693. "nushell",
  694. "objective-c",
  695. "objective-cpp",
  696. "ocaml",
  697. "pascal",
  698. "perl",
  699. "php",
  700. "plain",
  701. "plsql",
  702. "po",
  703. "postcss",
  704. "powerquery",
  705. "powershell",
  706. "prisma",
  707. "prolog",
  708. "proto",
  709. "pug",
  710. "puppet",
  711. "purescript",
  712. "python",
  713. "qml",
  714. "qmldir",
  715. "qss",
  716. "r",
  717. "racket",
  718. "raku",
  719. "razor",
  720. "reg",
  721. "regexp",
  722. "rel",
  723. "riscv",
  724. "rst",
  725. "ruby",
  726. "rust",
  727. "sas",
  728. "sass",
  729. "scala",
  730. "scheme",
  731. "scss",
  732. "shaderlab",
  733. "shellscript",
  734. "shellsession",
  735. "smalltalk",
  736. "solidity",
  737. "soy",
  738. "sparql",
  739. "splunk",
  740. "sql",
  741. "ssh-config",
  742. "stata",
  743. "stylus",
  744. "svelte",
  745. "swift",
  746. "system-verilog",
  747. "systemd",
  748. "tasl",
  749. "tcl",
  750. "templ",
  751. "terraform",
  752. "tex",
  753. "toml",
  754. "ts-tags",
  755. "tsv",
  756. "tsx",
  757. "turtle",
  758. "twig",
  759. "typescript",
  760. "typespec",
  761. "typst",
  762. "v",
  763. "vala",
  764. "vb",
  765. "verilog",
  766. "vhdl",
  767. "viml",
  768. "vue",
  769. "vue-html",
  770. "vyper",
  771. "wasm",
  772. "wenyan",
  773. "wgsl",
  774. "wikitext",
  775. "wolfram",
  776. "xml",
  777. "xsl",
  778. "yaml",
  779. "zenscript",
  780. "zig",
  781. ]
  782. ]
  783. | None = None,
  784. theme: Literal[
  785. "andromeeda",
  786. "aurora-x",
  787. "ayu-dark",
  788. "catppuccin-frappe",
  789. "catppuccin-latte",
  790. "catppuccin-macchiato",
  791. "catppuccin-mocha",
  792. "dark-plus",
  793. "dracula",
  794. "dracula-soft",
  795. "everforest-dark",
  796. "everforest-light",
  797. "github-dark",
  798. "github-dark-default",
  799. "github-dark-dimmed",
  800. "github-dark-high-contrast",
  801. "github-light",
  802. "github-light-default",
  803. "github-light-high-contrast",
  804. "houston",
  805. "laserwave",
  806. "light-plus",
  807. "material-theme",
  808. "material-theme-darker",
  809. "material-theme-lighter",
  810. "material-theme-ocean",
  811. "material-theme-palenight",
  812. "min-dark",
  813. "min-light",
  814. "monokai",
  815. "night-owl",
  816. "nord",
  817. "one-dark-pro",
  818. "one-light",
  819. "plastic",
  820. "poimandres",
  821. "red",
  822. "rose-pine",
  823. "rose-pine-dawn",
  824. "rose-pine-moon",
  825. "slack-dark",
  826. "slack-ochin",
  827. "snazzy-light",
  828. "solarized-dark",
  829. "solarized-light",
  830. "synthwave-84",
  831. "tokyo-night",
  832. "vesper",
  833. "vitesse-black",
  834. "vitesse-dark",
  835. "vitesse-light",
  836. ]
  837. | Var[
  838. Literal[
  839. "andromeeda",
  840. "aurora-x",
  841. "ayu-dark",
  842. "catppuccin-frappe",
  843. "catppuccin-latte",
  844. "catppuccin-macchiato",
  845. "catppuccin-mocha",
  846. "dark-plus",
  847. "dracula",
  848. "dracula-soft",
  849. "everforest-dark",
  850. "everforest-light",
  851. "github-dark",
  852. "github-dark-default",
  853. "github-dark-dimmed",
  854. "github-dark-high-contrast",
  855. "github-light",
  856. "github-light-default",
  857. "github-light-high-contrast",
  858. "houston",
  859. "laserwave",
  860. "light-plus",
  861. "material-theme",
  862. "material-theme-darker",
  863. "material-theme-lighter",
  864. "material-theme-ocean",
  865. "material-theme-palenight",
  866. "min-dark",
  867. "min-light",
  868. "monokai",
  869. "night-owl",
  870. "nord",
  871. "one-dark-pro",
  872. "one-light",
  873. "plastic",
  874. "poimandres",
  875. "red",
  876. "rose-pine",
  877. "rose-pine-dawn",
  878. "rose-pine-moon",
  879. "slack-dark",
  880. "slack-ochin",
  881. "snazzy-light",
  882. "solarized-dark",
  883. "solarized-light",
  884. "synthwave-84",
  885. "tokyo-night",
  886. "vesper",
  887. "vitesse-black",
  888. "vitesse-dark",
  889. "vitesse-light",
  890. ]
  891. ]
  892. | None = None,
  893. themes: Var[dict[str, str] | list[dict[str, Any]]]
  894. | dict[str, str]
  895. | list[dict[str, Any]]
  896. | None = None,
  897. code: Var[str] | str | None = None,
  898. transformers: Var[list[ShikiBaseTransformers | dict[str, Any]]]
  899. | list[ShikiBaseTransformers | dict[str, Any]]
  900. | None = None,
  901. decorations: Var[list[ShikiDecorations]] | list[ShikiDecorations] | None = None,
  902. style: Style | None = None,
  903. key: Any | None = None,
  904. id: Any | None = None,
  905. class_name: Any | None = None,
  906. autofocus: bool | None = None,
  907. custom_attrs: dict[str, Var | Any] | None = None,
  908. on_blur: Optional[EventType[()]] = None,
  909. on_click: Optional[EventType[()]] = None,
  910. on_context_menu: Optional[EventType[()]] = None,
  911. on_double_click: Optional[EventType[()]] = None,
  912. on_focus: Optional[EventType[()]] = None,
  913. on_mount: Optional[EventType[()]] = None,
  914. on_mouse_down: Optional[EventType[()]] = None,
  915. on_mouse_enter: Optional[EventType[()]] = None,
  916. on_mouse_leave: Optional[EventType[()]] = None,
  917. on_mouse_move: Optional[EventType[()]] = None,
  918. on_mouse_out: Optional[EventType[()]] = None,
  919. on_mouse_over: Optional[EventType[()]] = None,
  920. on_mouse_up: Optional[EventType[()]] = None,
  921. on_scroll: Optional[EventType[()]] = None,
  922. on_unmount: Optional[EventType[()]] = None,
  923. **props,
  924. ) -> "ShikiCodeBlock":
  925. """Create a code block component using [shiki syntax highlighter](https://shiki.matsu.io/).
  926. Args:
  927. *children: The children of the component.
  928. language: The language to use.
  929. theme: The theme to use ("light" or "dark").
  930. themes: The set of themes to use for different modes.
  931. code: The code to display.
  932. transformers: The transformers to use for the syntax highlighter.
  933. decorations: The decorations to use for the syntax highlighter.
  934. style: The style of the component.
  935. key: A unique key for the component.
  936. id: The id for the component.
  937. class_name: The class name for the component.
  938. autofocus: Whether the component should take the focus once the page is loaded
  939. custom_attrs: custom attribute
  940. **props: The props to pass to the component.
  941. Returns:
  942. The code block component.
  943. """
  944. ...
  945. def add_imports(self) -> dict[str, list[str]]: ...
  946. @classmethod
  947. def create_transformer(
  948. cls, library: str, fns: list[str]
  949. ) -> ShikiBaseTransformers: ...
  950. class ShikiHighLevelCodeBlock(ShikiCodeBlock):
  951. @overload
  952. @classmethod
  953. def create( # type: ignore
  954. cls,
  955. *children,
  956. use_transformers: Var[bool] | bool | None = None,
  957. show_line_numbers: Var[bool] | bool | None = None,
  958. can_copy: bool | None = None,
  959. copy_button: Component | bool | None = None,
  960. language: Literal[
  961. "abap",
  962. "actionscript-3",
  963. "ada",
  964. "angular-html",
  965. "angular-ts",
  966. "apache",
  967. "apex",
  968. "apl",
  969. "applescript",
  970. "ara",
  971. "asciidoc",
  972. "asm",
  973. "astro",
  974. "awk",
  975. "ballerina",
  976. "bat",
  977. "beancount",
  978. "berry",
  979. "bibtex",
  980. "bicep",
  981. "blade",
  982. "c",
  983. "cadence",
  984. "clarity",
  985. "clojure",
  986. "cmake",
  987. "cobol",
  988. "codeowners",
  989. "codeql",
  990. "coffee",
  991. "common-lisp",
  992. "coq",
  993. "cpp",
  994. "crystal",
  995. "csharp",
  996. "css",
  997. "csv",
  998. "cue",
  999. "cypher",
  1000. "d",
  1001. "dart",
  1002. "dax",
  1003. "desktop",
  1004. "diff",
  1005. "docker",
  1006. "dotenv",
  1007. "dream-maker",
  1008. "edge",
  1009. "elixir",
  1010. "elm",
  1011. "emacs-lisp",
  1012. "erb",
  1013. "erlang",
  1014. "fennel",
  1015. "fish",
  1016. "fluent",
  1017. "fortran-fixed-form",
  1018. "fortran-free-form",
  1019. "fsharp",
  1020. "gdresource",
  1021. "gdscript",
  1022. "gdshader",
  1023. "genie",
  1024. "gherkin",
  1025. "git-commit",
  1026. "git-rebase",
  1027. "gleam",
  1028. "glimmer-js",
  1029. "glimmer-ts",
  1030. "glsl",
  1031. "gnuplot",
  1032. "go",
  1033. "graphql",
  1034. "groovy",
  1035. "hack",
  1036. "haml",
  1037. "handlebars",
  1038. "haskell",
  1039. "haxe",
  1040. "hcl",
  1041. "hjson",
  1042. "hlsl",
  1043. "html",
  1044. "html-derivative",
  1045. "http",
  1046. "hxml",
  1047. "hy",
  1048. "imba",
  1049. "ini",
  1050. "java",
  1051. "javascript",
  1052. "jinja",
  1053. "jison",
  1054. "json",
  1055. "json5",
  1056. "jsonc",
  1057. "jsonl",
  1058. "jsonnet",
  1059. "jssm",
  1060. "jsx",
  1061. "julia",
  1062. "kotlin",
  1063. "kusto",
  1064. "latex",
  1065. "lean",
  1066. "less",
  1067. "liquid",
  1068. "log",
  1069. "logo",
  1070. "lua",
  1071. "luau",
  1072. "make",
  1073. "markdown",
  1074. "marko",
  1075. "matlab",
  1076. "mdc",
  1077. "mdx",
  1078. "mermaid",
  1079. "mojo",
  1080. "move",
  1081. "narrat",
  1082. "nextflow",
  1083. "nginx",
  1084. "nim",
  1085. "nix",
  1086. "nushell",
  1087. "objective-c",
  1088. "objective-cpp",
  1089. "ocaml",
  1090. "pascal",
  1091. "perl",
  1092. "php",
  1093. "plain",
  1094. "plsql",
  1095. "po",
  1096. "postcss",
  1097. "powerquery",
  1098. "powershell",
  1099. "prisma",
  1100. "prolog",
  1101. "proto",
  1102. "pug",
  1103. "puppet",
  1104. "purescript",
  1105. "python",
  1106. "qml",
  1107. "qmldir",
  1108. "qss",
  1109. "r",
  1110. "racket",
  1111. "raku",
  1112. "razor",
  1113. "reg",
  1114. "regexp",
  1115. "rel",
  1116. "riscv",
  1117. "rst",
  1118. "ruby",
  1119. "rust",
  1120. "sas",
  1121. "sass",
  1122. "scala",
  1123. "scheme",
  1124. "scss",
  1125. "shaderlab",
  1126. "shellscript",
  1127. "shellsession",
  1128. "smalltalk",
  1129. "solidity",
  1130. "soy",
  1131. "sparql",
  1132. "splunk",
  1133. "sql",
  1134. "ssh-config",
  1135. "stata",
  1136. "stylus",
  1137. "svelte",
  1138. "swift",
  1139. "system-verilog",
  1140. "systemd",
  1141. "tasl",
  1142. "tcl",
  1143. "templ",
  1144. "terraform",
  1145. "tex",
  1146. "toml",
  1147. "ts-tags",
  1148. "tsv",
  1149. "tsx",
  1150. "turtle",
  1151. "twig",
  1152. "typescript",
  1153. "typespec",
  1154. "typst",
  1155. "v",
  1156. "vala",
  1157. "vb",
  1158. "verilog",
  1159. "vhdl",
  1160. "viml",
  1161. "vue",
  1162. "vue-html",
  1163. "vyper",
  1164. "wasm",
  1165. "wenyan",
  1166. "wgsl",
  1167. "wikitext",
  1168. "wolfram",
  1169. "xml",
  1170. "xsl",
  1171. "yaml",
  1172. "zenscript",
  1173. "zig",
  1174. ]
  1175. | Var[
  1176. Literal[
  1177. "abap",
  1178. "actionscript-3",
  1179. "ada",
  1180. "angular-html",
  1181. "angular-ts",
  1182. "apache",
  1183. "apex",
  1184. "apl",
  1185. "applescript",
  1186. "ara",
  1187. "asciidoc",
  1188. "asm",
  1189. "astro",
  1190. "awk",
  1191. "ballerina",
  1192. "bat",
  1193. "beancount",
  1194. "berry",
  1195. "bibtex",
  1196. "bicep",
  1197. "blade",
  1198. "c",
  1199. "cadence",
  1200. "clarity",
  1201. "clojure",
  1202. "cmake",
  1203. "cobol",
  1204. "codeowners",
  1205. "codeql",
  1206. "coffee",
  1207. "common-lisp",
  1208. "coq",
  1209. "cpp",
  1210. "crystal",
  1211. "csharp",
  1212. "css",
  1213. "csv",
  1214. "cue",
  1215. "cypher",
  1216. "d",
  1217. "dart",
  1218. "dax",
  1219. "desktop",
  1220. "diff",
  1221. "docker",
  1222. "dotenv",
  1223. "dream-maker",
  1224. "edge",
  1225. "elixir",
  1226. "elm",
  1227. "emacs-lisp",
  1228. "erb",
  1229. "erlang",
  1230. "fennel",
  1231. "fish",
  1232. "fluent",
  1233. "fortran-fixed-form",
  1234. "fortran-free-form",
  1235. "fsharp",
  1236. "gdresource",
  1237. "gdscript",
  1238. "gdshader",
  1239. "genie",
  1240. "gherkin",
  1241. "git-commit",
  1242. "git-rebase",
  1243. "gleam",
  1244. "glimmer-js",
  1245. "glimmer-ts",
  1246. "glsl",
  1247. "gnuplot",
  1248. "go",
  1249. "graphql",
  1250. "groovy",
  1251. "hack",
  1252. "haml",
  1253. "handlebars",
  1254. "haskell",
  1255. "haxe",
  1256. "hcl",
  1257. "hjson",
  1258. "hlsl",
  1259. "html",
  1260. "html-derivative",
  1261. "http",
  1262. "hxml",
  1263. "hy",
  1264. "imba",
  1265. "ini",
  1266. "java",
  1267. "javascript",
  1268. "jinja",
  1269. "jison",
  1270. "json",
  1271. "json5",
  1272. "jsonc",
  1273. "jsonl",
  1274. "jsonnet",
  1275. "jssm",
  1276. "jsx",
  1277. "julia",
  1278. "kotlin",
  1279. "kusto",
  1280. "latex",
  1281. "lean",
  1282. "less",
  1283. "liquid",
  1284. "log",
  1285. "logo",
  1286. "lua",
  1287. "luau",
  1288. "make",
  1289. "markdown",
  1290. "marko",
  1291. "matlab",
  1292. "mdc",
  1293. "mdx",
  1294. "mermaid",
  1295. "mojo",
  1296. "move",
  1297. "narrat",
  1298. "nextflow",
  1299. "nginx",
  1300. "nim",
  1301. "nix",
  1302. "nushell",
  1303. "objective-c",
  1304. "objective-cpp",
  1305. "ocaml",
  1306. "pascal",
  1307. "perl",
  1308. "php",
  1309. "plain",
  1310. "plsql",
  1311. "po",
  1312. "postcss",
  1313. "powerquery",
  1314. "powershell",
  1315. "prisma",
  1316. "prolog",
  1317. "proto",
  1318. "pug",
  1319. "puppet",
  1320. "purescript",
  1321. "python",
  1322. "qml",
  1323. "qmldir",
  1324. "qss",
  1325. "r",
  1326. "racket",
  1327. "raku",
  1328. "razor",
  1329. "reg",
  1330. "regexp",
  1331. "rel",
  1332. "riscv",
  1333. "rst",
  1334. "ruby",
  1335. "rust",
  1336. "sas",
  1337. "sass",
  1338. "scala",
  1339. "scheme",
  1340. "scss",
  1341. "shaderlab",
  1342. "shellscript",
  1343. "shellsession",
  1344. "smalltalk",
  1345. "solidity",
  1346. "soy",
  1347. "sparql",
  1348. "splunk",
  1349. "sql",
  1350. "ssh-config",
  1351. "stata",
  1352. "stylus",
  1353. "svelte",
  1354. "swift",
  1355. "system-verilog",
  1356. "systemd",
  1357. "tasl",
  1358. "tcl",
  1359. "templ",
  1360. "terraform",
  1361. "tex",
  1362. "toml",
  1363. "ts-tags",
  1364. "tsv",
  1365. "tsx",
  1366. "turtle",
  1367. "twig",
  1368. "typescript",
  1369. "typespec",
  1370. "typst",
  1371. "v",
  1372. "vala",
  1373. "vb",
  1374. "verilog",
  1375. "vhdl",
  1376. "viml",
  1377. "vue",
  1378. "vue-html",
  1379. "vyper",
  1380. "wasm",
  1381. "wenyan",
  1382. "wgsl",
  1383. "wikitext",
  1384. "wolfram",
  1385. "xml",
  1386. "xsl",
  1387. "yaml",
  1388. "zenscript",
  1389. "zig",
  1390. ]
  1391. ]
  1392. | None = None,
  1393. theme: Literal[
  1394. "andromeeda",
  1395. "aurora-x",
  1396. "ayu-dark",
  1397. "catppuccin-frappe",
  1398. "catppuccin-latte",
  1399. "catppuccin-macchiato",
  1400. "catppuccin-mocha",
  1401. "dark-plus",
  1402. "dracula",
  1403. "dracula-soft",
  1404. "everforest-dark",
  1405. "everforest-light",
  1406. "github-dark",
  1407. "github-dark-default",
  1408. "github-dark-dimmed",
  1409. "github-dark-high-contrast",
  1410. "github-light",
  1411. "github-light-default",
  1412. "github-light-high-contrast",
  1413. "houston",
  1414. "laserwave",
  1415. "light-plus",
  1416. "material-theme",
  1417. "material-theme-darker",
  1418. "material-theme-lighter",
  1419. "material-theme-ocean",
  1420. "material-theme-palenight",
  1421. "min-dark",
  1422. "min-light",
  1423. "monokai",
  1424. "night-owl",
  1425. "nord",
  1426. "one-dark-pro",
  1427. "one-light",
  1428. "plastic",
  1429. "poimandres",
  1430. "red",
  1431. "rose-pine",
  1432. "rose-pine-dawn",
  1433. "rose-pine-moon",
  1434. "slack-dark",
  1435. "slack-ochin",
  1436. "snazzy-light",
  1437. "solarized-dark",
  1438. "solarized-light",
  1439. "synthwave-84",
  1440. "tokyo-night",
  1441. "vesper",
  1442. "vitesse-black",
  1443. "vitesse-dark",
  1444. "vitesse-light",
  1445. ]
  1446. | Var[
  1447. Literal[
  1448. "andromeeda",
  1449. "aurora-x",
  1450. "ayu-dark",
  1451. "catppuccin-frappe",
  1452. "catppuccin-latte",
  1453. "catppuccin-macchiato",
  1454. "catppuccin-mocha",
  1455. "dark-plus",
  1456. "dracula",
  1457. "dracula-soft",
  1458. "everforest-dark",
  1459. "everforest-light",
  1460. "github-dark",
  1461. "github-dark-default",
  1462. "github-dark-dimmed",
  1463. "github-dark-high-contrast",
  1464. "github-light",
  1465. "github-light-default",
  1466. "github-light-high-contrast",
  1467. "houston",
  1468. "laserwave",
  1469. "light-plus",
  1470. "material-theme",
  1471. "material-theme-darker",
  1472. "material-theme-lighter",
  1473. "material-theme-ocean",
  1474. "material-theme-palenight",
  1475. "min-dark",
  1476. "min-light",
  1477. "monokai",
  1478. "night-owl",
  1479. "nord",
  1480. "one-dark-pro",
  1481. "one-light",
  1482. "plastic",
  1483. "poimandres",
  1484. "red",
  1485. "rose-pine",
  1486. "rose-pine-dawn",
  1487. "rose-pine-moon",
  1488. "slack-dark",
  1489. "slack-ochin",
  1490. "snazzy-light",
  1491. "solarized-dark",
  1492. "solarized-light",
  1493. "synthwave-84",
  1494. "tokyo-night",
  1495. "vesper",
  1496. "vitesse-black",
  1497. "vitesse-dark",
  1498. "vitesse-light",
  1499. ]
  1500. ]
  1501. | None = None,
  1502. themes: Var[dict[str, str] | list[dict[str, Any]]]
  1503. | dict[str, str]
  1504. | list[dict[str, Any]]
  1505. | None = None,
  1506. code: Var[str] | str | None = None,
  1507. transformers: Var[list[ShikiBaseTransformers | dict[str, Any]]]
  1508. | list[ShikiBaseTransformers | dict[str, Any]]
  1509. | None = None,
  1510. decorations: Var[list[ShikiDecorations]] | list[ShikiDecorations] | None = None,
  1511. style: Style | None = None,
  1512. key: Any | None = None,
  1513. id: Any | None = None,
  1514. class_name: Any | None = None,
  1515. autofocus: bool | None = None,
  1516. custom_attrs: dict[str, Var | Any] | None = None,
  1517. on_blur: Optional[EventType[()]] = None,
  1518. on_click: Optional[EventType[()]] = None,
  1519. on_context_menu: Optional[EventType[()]] = None,
  1520. on_double_click: Optional[EventType[()]] = None,
  1521. on_focus: Optional[EventType[()]] = None,
  1522. on_mount: Optional[EventType[()]] = None,
  1523. on_mouse_down: Optional[EventType[()]] = None,
  1524. on_mouse_enter: Optional[EventType[()]] = None,
  1525. on_mouse_leave: Optional[EventType[()]] = None,
  1526. on_mouse_move: Optional[EventType[()]] = None,
  1527. on_mouse_out: Optional[EventType[()]] = None,
  1528. on_mouse_over: Optional[EventType[()]] = None,
  1529. on_mouse_up: Optional[EventType[()]] = None,
  1530. on_scroll: Optional[EventType[()]] = None,
  1531. on_unmount: Optional[EventType[()]] = None,
  1532. **props,
  1533. ) -> "ShikiHighLevelCodeBlock":
  1534. """Create a code block component using [shiki syntax highlighter](https://shiki.matsu.io/).
  1535. Args:
  1536. *children: The children of the component.
  1537. use_transformers: If this is enabled, the default transformers(shikijs transformer) will be used.
  1538. show_line_numbers: If this is enabled line numbers will be shown next to the code block.
  1539. can_copy: Whether a copy button should appear.
  1540. copy_button: copy_button: A custom copy button to override the default one.
  1541. language: The language to use.
  1542. theme: The theme to use ("light" or "dark").
  1543. themes: The set of themes to use for different modes.
  1544. code: The code to display.
  1545. transformers: The transformers to use for the syntax highlighter.
  1546. decorations: The decorations to use for the syntax highlighter.
  1547. style: The style of the component.
  1548. key: A unique key for the component.
  1549. id: The id for the component.
  1550. class_name: The class name for the component.
  1551. autofocus: Whether the component should take the focus once the page is loaded
  1552. custom_attrs: custom attribute
  1553. **props: The props to pass to the component.
  1554. Returns:
  1555. The code block component.
  1556. """
  1557. ...
  1558. class TransformerNamespace(ComponentNamespace):
  1559. shikijs = ShikiJsTransformer
  1560. class CodeblockNamespace(ComponentNamespace):
  1561. root = staticmethod(ShikiCodeBlock.create)
  1562. create_transformer = staticmethod(ShikiCodeBlock.create_transformer)
  1563. transformers = TransformerNamespace()
  1564. @staticmethod
  1565. def __call__(
  1566. *children,
  1567. use_transformers: Var[bool] | bool | None = None,
  1568. show_line_numbers: Var[bool] | bool | None = None,
  1569. can_copy: bool | None = None,
  1570. copy_button: Component | bool | None = None,
  1571. language: Literal[
  1572. "abap",
  1573. "actionscript-3",
  1574. "ada",
  1575. "angular-html",
  1576. "angular-ts",
  1577. "apache",
  1578. "apex",
  1579. "apl",
  1580. "applescript",
  1581. "ara",
  1582. "asciidoc",
  1583. "asm",
  1584. "astro",
  1585. "awk",
  1586. "ballerina",
  1587. "bat",
  1588. "beancount",
  1589. "berry",
  1590. "bibtex",
  1591. "bicep",
  1592. "blade",
  1593. "c",
  1594. "cadence",
  1595. "clarity",
  1596. "clojure",
  1597. "cmake",
  1598. "cobol",
  1599. "codeowners",
  1600. "codeql",
  1601. "coffee",
  1602. "common-lisp",
  1603. "coq",
  1604. "cpp",
  1605. "crystal",
  1606. "csharp",
  1607. "css",
  1608. "csv",
  1609. "cue",
  1610. "cypher",
  1611. "d",
  1612. "dart",
  1613. "dax",
  1614. "desktop",
  1615. "diff",
  1616. "docker",
  1617. "dotenv",
  1618. "dream-maker",
  1619. "edge",
  1620. "elixir",
  1621. "elm",
  1622. "emacs-lisp",
  1623. "erb",
  1624. "erlang",
  1625. "fennel",
  1626. "fish",
  1627. "fluent",
  1628. "fortran-fixed-form",
  1629. "fortran-free-form",
  1630. "fsharp",
  1631. "gdresource",
  1632. "gdscript",
  1633. "gdshader",
  1634. "genie",
  1635. "gherkin",
  1636. "git-commit",
  1637. "git-rebase",
  1638. "gleam",
  1639. "glimmer-js",
  1640. "glimmer-ts",
  1641. "glsl",
  1642. "gnuplot",
  1643. "go",
  1644. "graphql",
  1645. "groovy",
  1646. "hack",
  1647. "haml",
  1648. "handlebars",
  1649. "haskell",
  1650. "haxe",
  1651. "hcl",
  1652. "hjson",
  1653. "hlsl",
  1654. "html",
  1655. "html-derivative",
  1656. "http",
  1657. "hxml",
  1658. "hy",
  1659. "imba",
  1660. "ini",
  1661. "java",
  1662. "javascript",
  1663. "jinja",
  1664. "jison",
  1665. "json",
  1666. "json5",
  1667. "jsonc",
  1668. "jsonl",
  1669. "jsonnet",
  1670. "jssm",
  1671. "jsx",
  1672. "julia",
  1673. "kotlin",
  1674. "kusto",
  1675. "latex",
  1676. "lean",
  1677. "less",
  1678. "liquid",
  1679. "log",
  1680. "logo",
  1681. "lua",
  1682. "luau",
  1683. "make",
  1684. "markdown",
  1685. "marko",
  1686. "matlab",
  1687. "mdc",
  1688. "mdx",
  1689. "mermaid",
  1690. "mojo",
  1691. "move",
  1692. "narrat",
  1693. "nextflow",
  1694. "nginx",
  1695. "nim",
  1696. "nix",
  1697. "nushell",
  1698. "objective-c",
  1699. "objective-cpp",
  1700. "ocaml",
  1701. "pascal",
  1702. "perl",
  1703. "php",
  1704. "plain",
  1705. "plsql",
  1706. "po",
  1707. "postcss",
  1708. "powerquery",
  1709. "powershell",
  1710. "prisma",
  1711. "prolog",
  1712. "proto",
  1713. "pug",
  1714. "puppet",
  1715. "purescript",
  1716. "python",
  1717. "qml",
  1718. "qmldir",
  1719. "qss",
  1720. "r",
  1721. "racket",
  1722. "raku",
  1723. "razor",
  1724. "reg",
  1725. "regexp",
  1726. "rel",
  1727. "riscv",
  1728. "rst",
  1729. "ruby",
  1730. "rust",
  1731. "sas",
  1732. "sass",
  1733. "scala",
  1734. "scheme",
  1735. "scss",
  1736. "shaderlab",
  1737. "shellscript",
  1738. "shellsession",
  1739. "smalltalk",
  1740. "solidity",
  1741. "soy",
  1742. "sparql",
  1743. "splunk",
  1744. "sql",
  1745. "ssh-config",
  1746. "stata",
  1747. "stylus",
  1748. "svelte",
  1749. "swift",
  1750. "system-verilog",
  1751. "systemd",
  1752. "tasl",
  1753. "tcl",
  1754. "templ",
  1755. "terraform",
  1756. "tex",
  1757. "toml",
  1758. "ts-tags",
  1759. "tsv",
  1760. "tsx",
  1761. "turtle",
  1762. "twig",
  1763. "typescript",
  1764. "typespec",
  1765. "typst",
  1766. "v",
  1767. "vala",
  1768. "vb",
  1769. "verilog",
  1770. "vhdl",
  1771. "viml",
  1772. "vue",
  1773. "vue-html",
  1774. "vyper",
  1775. "wasm",
  1776. "wenyan",
  1777. "wgsl",
  1778. "wikitext",
  1779. "wolfram",
  1780. "xml",
  1781. "xsl",
  1782. "yaml",
  1783. "zenscript",
  1784. "zig",
  1785. ]
  1786. | Var[
  1787. Literal[
  1788. "abap",
  1789. "actionscript-3",
  1790. "ada",
  1791. "angular-html",
  1792. "angular-ts",
  1793. "apache",
  1794. "apex",
  1795. "apl",
  1796. "applescript",
  1797. "ara",
  1798. "asciidoc",
  1799. "asm",
  1800. "astro",
  1801. "awk",
  1802. "ballerina",
  1803. "bat",
  1804. "beancount",
  1805. "berry",
  1806. "bibtex",
  1807. "bicep",
  1808. "blade",
  1809. "c",
  1810. "cadence",
  1811. "clarity",
  1812. "clojure",
  1813. "cmake",
  1814. "cobol",
  1815. "codeowners",
  1816. "codeql",
  1817. "coffee",
  1818. "common-lisp",
  1819. "coq",
  1820. "cpp",
  1821. "crystal",
  1822. "csharp",
  1823. "css",
  1824. "csv",
  1825. "cue",
  1826. "cypher",
  1827. "d",
  1828. "dart",
  1829. "dax",
  1830. "desktop",
  1831. "diff",
  1832. "docker",
  1833. "dotenv",
  1834. "dream-maker",
  1835. "edge",
  1836. "elixir",
  1837. "elm",
  1838. "emacs-lisp",
  1839. "erb",
  1840. "erlang",
  1841. "fennel",
  1842. "fish",
  1843. "fluent",
  1844. "fortran-fixed-form",
  1845. "fortran-free-form",
  1846. "fsharp",
  1847. "gdresource",
  1848. "gdscript",
  1849. "gdshader",
  1850. "genie",
  1851. "gherkin",
  1852. "git-commit",
  1853. "git-rebase",
  1854. "gleam",
  1855. "glimmer-js",
  1856. "glimmer-ts",
  1857. "glsl",
  1858. "gnuplot",
  1859. "go",
  1860. "graphql",
  1861. "groovy",
  1862. "hack",
  1863. "haml",
  1864. "handlebars",
  1865. "haskell",
  1866. "haxe",
  1867. "hcl",
  1868. "hjson",
  1869. "hlsl",
  1870. "html",
  1871. "html-derivative",
  1872. "http",
  1873. "hxml",
  1874. "hy",
  1875. "imba",
  1876. "ini",
  1877. "java",
  1878. "javascript",
  1879. "jinja",
  1880. "jison",
  1881. "json",
  1882. "json5",
  1883. "jsonc",
  1884. "jsonl",
  1885. "jsonnet",
  1886. "jssm",
  1887. "jsx",
  1888. "julia",
  1889. "kotlin",
  1890. "kusto",
  1891. "latex",
  1892. "lean",
  1893. "less",
  1894. "liquid",
  1895. "log",
  1896. "logo",
  1897. "lua",
  1898. "luau",
  1899. "make",
  1900. "markdown",
  1901. "marko",
  1902. "matlab",
  1903. "mdc",
  1904. "mdx",
  1905. "mermaid",
  1906. "mojo",
  1907. "move",
  1908. "narrat",
  1909. "nextflow",
  1910. "nginx",
  1911. "nim",
  1912. "nix",
  1913. "nushell",
  1914. "objective-c",
  1915. "objective-cpp",
  1916. "ocaml",
  1917. "pascal",
  1918. "perl",
  1919. "php",
  1920. "plain",
  1921. "plsql",
  1922. "po",
  1923. "postcss",
  1924. "powerquery",
  1925. "powershell",
  1926. "prisma",
  1927. "prolog",
  1928. "proto",
  1929. "pug",
  1930. "puppet",
  1931. "purescript",
  1932. "python",
  1933. "qml",
  1934. "qmldir",
  1935. "qss",
  1936. "r",
  1937. "racket",
  1938. "raku",
  1939. "razor",
  1940. "reg",
  1941. "regexp",
  1942. "rel",
  1943. "riscv",
  1944. "rst",
  1945. "ruby",
  1946. "rust",
  1947. "sas",
  1948. "sass",
  1949. "scala",
  1950. "scheme",
  1951. "scss",
  1952. "shaderlab",
  1953. "shellscript",
  1954. "shellsession",
  1955. "smalltalk",
  1956. "solidity",
  1957. "soy",
  1958. "sparql",
  1959. "splunk",
  1960. "sql",
  1961. "ssh-config",
  1962. "stata",
  1963. "stylus",
  1964. "svelte",
  1965. "swift",
  1966. "system-verilog",
  1967. "systemd",
  1968. "tasl",
  1969. "tcl",
  1970. "templ",
  1971. "terraform",
  1972. "tex",
  1973. "toml",
  1974. "ts-tags",
  1975. "tsv",
  1976. "tsx",
  1977. "turtle",
  1978. "twig",
  1979. "typescript",
  1980. "typespec",
  1981. "typst",
  1982. "v",
  1983. "vala",
  1984. "vb",
  1985. "verilog",
  1986. "vhdl",
  1987. "viml",
  1988. "vue",
  1989. "vue-html",
  1990. "vyper",
  1991. "wasm",
  1992. "wenyan",
  1993. "wgsl",
  1994. "wikitext",
  1995. "wolfram",
  1996. "xml",
  1997. "xsl",
  1998. "yaml",
  1999. "zenscript",
  2000. "zig",
  2001. ]
  2002. ]
  2003. | None = None,
  2004. theme: Literal[
  2005. "andromeeda",
  2006. "aurora-x",
  2007. "ayu-dark",
  2008. "catppuccin-frappe",
  2009. "catppuccin-latte",
  2010. "catppuccin-macchiato",
  2011. "catppuccin-mocha",
  2012. "dark-plus",
  2013. "dracula",
  2014. "dracula-soft",
  2015. "everforest-dark",
  2016. "everforest-light",
  2017. "github-dark",
  2018. "github-dark-default",
  2019. "github-dark-dimmed",
  2020. "github-dark-high-contrast",
  2021. "github-light",
  2022. "github-light-default",
  2023. "github-light-high-contrast",
  2024. "houston",
  2025. "laserwave",
  2026. "light-plus",
  2027. "material-theme",
  2028. "material-theme-darker",
  2029. "material-theme-lighter",
  2030. "material-theme-ocean",
  2031. "material-theme-palenight",
  2032. "min-dark",
  2033. "min-light",
  2034. "monokai",
  2035. "night-owl",
  2036. "nord",
  2037. "one-dark-pro",
  2038. "one-light",
  2039. "plastic",
  2040. "poimandres",
  2041. "red",
  2042. "rose-pine",
  2043. "rose-pine-dawn",
  2044. "rose-pine-moon",
  2045. "slack-dark",
  2046. "slack-ochin",
  2047. "snazzy-light",
  2048. "solarized-dark",
  2049. "solarized-light",
  2050. "synthwave-84",
  2051. "tokyo-night",
  2052. "vesper",
  2053. "vitesse-black",
  2054. "vitesse-dark",
  2055. "vitesse-light",
  2056. ]
  2057. | Var[
  2058. Literal[
  2059. "andromeeda",
  2060. "aurora-x",
  2061. "ayu-dark",
  2062. "catppuccin-frappe",
  2063. "catppuccin-latte",
  2064. "catppuccin-macchiato",
  2065. "catppuccin-mocha",
  2066. "dark-plus",
  2067. "dracula",
  2068. "dracula-soft",
  2069. "everforest-dark",
  2070. "everforest-light",
  2071. "github-dark",
  2072. "github-dark-default",
  2073. "github-dark-dimmed",
  2074. "github-dark-high-contrast",
  2075. "github-light",
  2076. "github-light-default",
  2077. "github-light-high-contrast",
  2078. "houston",
  2079. "laserwave",
  2080. "light-plus",
  2081. "material-theme",
  2082. "material-theme-darker",
  2083. "material-theme-lighter",
  2084. "material-theme-ocean",
  2085. "material-theme-palenight",
  2086. "min-dark",
  2087. "min-light",
  2088. "monokai",
  2089. "night-owl",
  2090. "nord",
  2091. "one-dark-pro",
  2092. "one-light",
  2093. "plastic",
  2094. "poimandres",
  2095. "red",
  2096. "rose-pine",
  2097. "rose-pine-dawn",
  2098. "rose-pine-moon",
  2099. "slack-dark",
  2100. "slack-ochin",
  2101. "snazzy-light",
  2102. "solarized-dark",
  2103. "solarized-light",
  2104. "synthwave-84",
  2105. "tokyo-night",
  2106. "vesper",
  2107. "vitesse-black",
  2108. "vitesse-dark",
  2109. "vitesse-light",
  2110. ]
  2111. ]
  2112. | None = None,
  2113. themes: Var[dict[str, str] | list[dict[str, Any]]]
  2114. | dict[str, str]
  2115. | list[dict[str, Any]]
  2116. | None = None,
  2117. code: Var[str] | str | None = None,
  2118. transformers: Var[list[ShikiBaseTransformers | dict[str, Any]]]
  2119. | list[ShikiBaseTransformers | dict[str, Any]]
  2120. | None = None,
  2121. decorations: Var[list[ShikiDecorations]] | list[ShikiDecorations] | None = None,
  2122. style: Style | None = None,
  2123. key: Any | None = None,
  2124. id: Any | None = None,
  2125. class_name: Any | None = None,
  2126. autofocus: bool | None = None,
  2127. custom_attrs: dict[str, Var | Any] | None = None,
  2128. on_blur: Optional[EventType[()]] = None,
  2129. on_click: Optional[EventType[()]] = None,
  2130. on_context_menu: Optional[EventType[()]] = None,
  2131. on_double_click: Optional[EventType[()]] = None,
  2132. on_focus: Optional[EventType[()]] = None,
  2133. on_mount: Optional[EventType[()]] = None,
  2134. on_mouse_down: Optional[EventType[()]] = None,
  2135. on_mouse_enter: Optional[EventType[()]] = None,
  2136. on_mouse_leave: Optional[EventType[()]] = None,
  2137. on_mouse_move: Optional[EventType[()]] = None,
  2138. on_mouse_out: Optional[EventType[()]] = None,
  2139. on_mouse_over: Optional[EventType[()]] = None,
  2140. on_mouse_up: Optional[EventType[()]] = None,
  2141. on_scroll: Optional[EventType[()]] = None,
  2142. on_unmount: Optional[EventType[()]] = None,
  2143. **props,
  2144. ) -> "ShikiHighLevelCodeBlock":
  2145. """Create a code block component using [shiki syntax highlighter](https://shiki.matsu.io/).
  2146. Args:
  2147. *children: The children of the component.
  2148. use_transformers: If this is enabled, the default transformers(shikijs transformer) will be used.
  2149. show_line_numbers: If this is enabled line numbers will be shown next to the code block.
  2150. can_copy: Whether a copy button should appear.
  2151. copy_button: copy_button: A custom copy button to override the default one.
  2152. language: The language to use.
  2153. theme: The theme to use ("light" or "dark").
  2154. themes: The set of themes to use for different modes.
  2155. code: The code to display.
  2156. transformers: The transformers to use for the syntax highlighter.
  2157. decorations: The decorations to use for the syntax highlighter.
  2158. style: The style of the component.
  2159. key: A unique key for the component.
  2160. id: The id for the component.
  2161. class_name: The class name for the component.
  2162. autofocus: Whether the component should take the focus once the page is loaded
  2163. custom_attrs: custom attribute
  2164. **props: The props to pass to the component.
  2165. Returns:
  2166. The code block component.
  2167. """
  2168. ...
  2169. code_block = CodeblockNamespace()