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