reflex 0.6.3.post1__py3-none-any.whl → 0.6.4a1__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.

Potentially problematic release.


This version of reflex might be problematic. Click here for more details.

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