reflex-components-code 0.9.0__py3-none-any.whl

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