shiki_code_block.pyi 69 KB

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