reflex 0.6.0a4__py3-none-any.whl → 0.6.1__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 (57) hide show
  1. reflex/.templates/jinja/web/pages/_app.js.jinja2 +14 -0
  2. reflex/.templates/web/utils/state.js +67 -40
  3. reflex/app.py +9 -5
  4. reflex/app_mixins/lifespan.py +24 -6
  5. reflex/base.py +7 -13
  6. reflex/compiler/utils.py +17 -8
  7. reflex/components/base/bare.py +3 -1
  8. reflex/components/base/meta.py +5 -3
  9. reflex/components/component.py +19 -19
  10. reflex/components/core/cond.py +4 -4
  11. reflex/components/datadisplay/__init__.py +0 -1
  12. reflex/components/datadisplay/__init__.pyi +0 -1
  13. reflex/components/datadisplay/code.py +93 -106
  14. reflex/components/datadisplay/code.pyi +710 -53
  15. reflex/components/datadisplay/logo.py +22 -20
  16. reflex/components/dynamic.py +157 -0
  17. reflex/components/el/elements/forms.py +4 -1
  18. reflex/components/gridjs/datatable.py +2 -1
  19. reflex/components/markdown/markdown.py +10 -6
  20. reflex/components/markdown/markdown.pyi +3 -0
  21. reflex/components/radix/themes/components/progress.py +22 -0
  22. reflex/components/radix/themes/components/progress.pyi +2 -0
  23. reflex/components/radix/themes/components/segmented_control.py +3 -0
  24. reflex/components/radix/themes/components/segmented_control.pyi +2 -0
  25. reflex/components/radix/themes/layout/stack.py +1 -1
  26. reflex/components/recharts/cartesian.py +1 -1
  27. reflex/components/sonner/toast.py +3 -3
  28. reflex/components/tags/iter_tag.py +5 -1
  29. reflex/config.py +2 -2
  30. reflex/constants/base.py +4 -1
  31. reflex/constants/installer.py +8 -1
  32. reflex/event.py +61 -20
  33. reflex/experimental/assets.py +3 -1
  34. reflex/experimental/client_state.py +5 -1
  35. reflex/experimental/misc.py +5 -3
  36. reflex/middleware/hydrate_middleware.py +1 -2
  37. reflex/page.py +10 -3
  38. reflex/reflex.py +20 -3
  39. reflex/state.py +105 -43
  40. reflex/style.py +12 -2
  41. reflex/testing.py +8 -4
  42. reflex/utils/console.py +1 -1
  43. reflex/utils/exceptions.py +4 -0
  44. reflex/utils/exec.py +170 -18
  45. reflex/utils/format.py +6 -44
  46. reflex/utils/path_ops.py +36 -1
  47. reflex/utils/prerequisites.py +42 -14
  48. reflex/utils/serializers.py +7 -46
  49. reflex/utils/types.py +17 -2
  50. reflex/vars/base.py +303 -43
  51. reflex/vars/number.py +3 -0
  52. reflex/vars/sequence.py +43 -0
  53. {reflex-0.6.0a4.dist-info → reflex-0.6.1.dist-info}/METADATA +2 -3
  54. {reflex-0.6.0a4.dist-info → reflex-0.6.1.dist-info}/RECORD +57 -56
  55. {reflex-0.6.0a4.dist-info → reflex-0.6.1.dist-info}/LICENSE +0 -0
  56. {reflex-0.6.0a4.dist-info → reflex-0.6.1.dist-info}/WHEEL +0 -0
  57. {reflex-0.6.0a4.dist-info → reflex-0.6.1.dist-info}/entry_points.txt +0 -0
@@ -3,62 +3,16 @@
3
3
  # ------------------- DO NOT EDIT ----------------------
4
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
5
5
  # ------------------------------------------------------
6
- from typing import Any, Callable, Dict, Literal, Optional, Union, overload
6
+ import dataclasses
7
+ from typing import Any, Callable, ClassVar, Dict, Literal, Optional, Union, overload
7
8
 
8
- from reflex.components.component import Component
9
+ from reflex.components.component import Component, ComponentNamespace
9
10
  from reflex.constants.colors import Color
10
11
  from reflex.event import EventHandler, EventSpec
11
12
  from reflex.style import Style
12
13
  from reflex.utils.imports import ImportDict
13
14
  from reflex.vars.base import Var
14
15
 
15
- LiteralCodeBlockTheme = Literal[
16
- "a11y-dark",
17
- "atom-dark",
18
- "cb",
19
- "coldark-cold",
20
- "coldark-dark",
21
- "coy",
22
- "coy-without-shadows",
23
- "darcula",
24
- "dark",
25
- "dracula",
26
- "duotone-dark",
27
- "duotone-earth",
28
- "duotone-forest",
29
- "duotone-light",
30
- "duotone-sea",
31
- "duotone-space",
32
- "funky",
33
- "ghcolors",
34
- "gruvbox-dark",
35
- "gruvbox-light",
36
- "holi-theme",
37
- "hopscotch",
38
- "light",
39
- "lucario",
40
- "material-dark",
41
- "material-light",
42
- "material-oceanic",
43
- "night-owl",
44
- "nord",
45
- "okaidia",
46
- "one-dark",
47
- "one-light",
48
- "pojoaque",
49
- "prism",
50
- "shades-of-purple",
51
- "solarized-dark-atom",
52
- "solarizedlight",
53
- "synthwave84",
54
- "tomorrow",
55
- "twilight",
56
- "vs",
57
- "vs-dark",
58
- "vsc-dark-plus",
59
- "xonokai",
60
- "z-touch",
61
- ]
62
16
  LiteralCodeLanguage = Literal[
63
17
  "abap",
64
18
  "abnf",
@@ -341,7 +295,59 @@ LiteralCodeLanguage = Literal[
341
295
  "zig",
342
296
  ]
343
297
 
344
- def replace_quotes_with_camel_case(value: str) -> str: ...
298
+ def construct_theme_var(theme: str) -> Var[Theme]: ...
299
+ @dataclasses.dataclass(init=False)
300
+ class Theme:
301
+ a11y_dark: ClassVar[Var[Theme]] = construct_theme_var("a11yDark")
302
+ atom_dark: ClassVar[Var[Theme]] = construct_theme_var("atomDark")
303
+ cb: ClassVar[Var[Theme]] = construct_theme_var("cb")
304
+ coldark_cold: ClassVar[Var[Theme]] = construct_theme_var("coldarkCold")
305
+ coldark_dark: ClassVar[Var[Theme]] = construct_theme_var("coldarkDark")
306
+ coy: ClassVar[Var[Theme]] = construct_theme_var("coy")
307
+ coy_without_shadows: ClassVar[Var[Theme]] = construct_theme_var("coyWithoutShadows")
308
+ darcula: ClassVar[Var[Theme]] = construct_theme_var("darcula")
309
+ dark: ClassVar[Var[Theme]] = construct_theme_var("oneDark")
310
+ dracula: ClassVar[Var[Theme]] = construct_theme_var("dracula")
311
+ duotone_dark: ClassVar[Var[Theme]] = construct_theme_var("duotoneDark")
312
+ duotone_earth: ClassVar[Var[Theme]] = construct_theme_var("duotoneEarth")
313
+ duotone_forest: ClassVar[Var[Theme]] = construct_theme_var("duotoneForest")
314
+ duotone_light: ClassVar[Var[Theme]] = construct_theme_var("duotoneLight")
315
+ duotone_sea: ClassVar[Var[Theme]] = construct_theme_var("duotoneSea")
316
+ duotone_space: ClassVar[Var[Theme]] = construct_theme_var("duotoneSpace")
317
+ funky: ClassVar[Var[Theme]] = construct_theme_var("funky")
318
+ ghcolors: ClassVar[Var[Theme]] = construct_theme_var("ghcolors")
319
+ gruvbox_dark: ClassVar[Var[Theme]] = construct_theme_var("gruvboxDark")
320
+ gruvbox_light: ClassVar[Var[Theme]] = construct_theme_var("gruvboxLight")
321
+ holi_theme: ClassVar[Var[Theme]] = construct_theme_var("holiTheme")
322
+ hopscotch: ClassVar[Var[Theme]] = construct_theme_var("hopscotch")
323
+ light: ClassVar[Var[Theme]] = construct_theme_var("oneLight")
324
+ lucario: ClassVar[Var[Theme]] = construct_theme_var("lucario")
325
+ material_dark: ClassVar[Var[Theme]] = construct_theme_var("materialDark")
326
+ material_light: ClassVar[Var[Theme]] = construct_theme_var("materialLight")
327
+ material_oceanic: ClassVar[Var[Theme]] = construct_theme_var("materialOceanic")
328
+ night_owl: ClassVar[Var[Theme]] = construct_theme_var("nightOwl")
329
+ nord: ClassVar[Var[Theme]] = construct_theme_var("nord")
330
+ okaidia: ClassVar[Var[Theme]] = construct_theme_var("okaidia")
331
+ one_dark: ClassVar[Var[Theme]] = construct_theme_var("oneDark")
332
+ one_light: ClassVar[Var[Theme]] = construct_theme_var("oneLight")
333
+ pojoaque: ClassVar[Var[Theme]] = construct_theme_var("pojoaque")
334
+ prism: ClassVar[Var[Theme]] = construct_theme_var("prism")
335
+ shades_of_purple: ClassVar[Var[Theme]] = construct_theme_var("shadesOfPurple")
336
+ solarized_dark_atom: ClassVar[Var[Theme]] = construct_theme_var("solarizedDarkAtom")
337
+ solarizedlight: ClassVar[Var[Theme]] = construct_theme_var("solarizedlight")
338
+ synthwave84: ClassVar[Var[Theme]] = construct_theme_var("synthwave84")
339
+ tomorrow: ClassVar[Var[Theme]] = construct_theme_var("tomorrow")
340
+ twilight: ClassVar[Var[Theme]] = construct_theme_var("twilight")
341
+ vs: ClassVar[Var[Theme]] = construct_theme_var("vs")
342
+ vs_dark: ClassVar[Var[Theme]] = construct_theme_var("vsDark")
343
+ vsc_dark_plus: ClassVar[Var[Theme]] = construct_theme_var("vscDarkPlus")
344
+ xonokai: ClassVar[Var[Theme]] = construct_theme_var("xonokai")
345
+ z_touch: ClassVar[Var[Theme]] = construct_theme_var("zTouch")
346
+
347
+ for theme_name in dir(Theme):
348
+ if theme_name.startswith("_"):
349
+ continue
350
+ setattr(Theme, theme_name, getattr(Theme, theme_name)._replace(_var_type=Theme))
345
351
 
346
352
  class CodeBlock(Component):
347
353
  def add_imports(self) -> ImportDict: ...
@@ -352,7 +358,7 @@ class CodeBlock(Component):
352
358
  *children,
353
359
  can_copy: Optional[bool] = False,
354
360
  copy_button: Optional[Union[Component, bool]] = None,
355
- theme: Optional[Union[Any, Var[Any]]] = None,
361
+ theme: Optional[Union[Theme, Var[Union[Theme, str]], str]] = None,
356
362
  language: Optional[
357
363
  Union[
358
364
  Literal[
@@ -998,7 +1004,658 @@ class CodeBlock(Component):
998
1004
  ...
999
1005
 
1000
1006
  def add_style(self): ...
1007
+
1008
+ class CodeblockNamespace(ComponentNamespace):
1009
+ themes = Theme
1010
+
1001
1011
  @staticmethod
1002
- def convert_theme_name(theme) -> str: ...
1012
+ def __call__(
1013
+ *children,
1014
+ can_copy: Optional[bool] = False,
1015
+ copy_button: Optional[Union[Component, bool]] = None,
1016
+ theme: Optional[Union[Theme, Var[Union[Theme, str]], str]] = None,
1017
+ language: Optional[
1018
+ Union[
1019
+ Literal[
1020
+ "abap",
1021
+ "abnf",
1022
+ "actionscript",
1023
+ "ada",
1024
+ "agda",
1025
+ "al",
1026
+ "antlr4",
1027
+ "apacheconf",
1028
+ "apex",
1029
+ "apl",
1030
+ "applescript",
1031
+ "aql",
1032
+ "arduino",
1033
+ "arff",
1034
+ "asciidoc",
1035
+ "asm6502",
1036
+ "asmatmel",
1037
+ "aspnet",
1038
+ "autohotkey",
1039
+ "autoit",
1040
+ "avisynth",
1041
+ "avro-idl",
1042
+ "bash",
1043
+ "basic",
1044
+ "batch",
1045
+ "bbcode",
1046
+ "bicep",
1047
+ "birb",
1048
+ "bison",
1049
+ "bnf",
1050
+ "brainfuck",
1051
+ "brightscript",
1052
+ "bro",
1053
+ "bsl",
1054
+ "c",
1055
+ "cfscript",
1056
+ "chaiscript",
1057
+ "cil",
1058
+ "clike",
1059
+ "clojure",
1060
+ "cmake",
1061
+ "cobol",
1062
+ "coffeescript",
1063
+ "concurnas",
1064
+ "coq",
1065
+ "core",
1066
+ "cpp",
1067
+ "crystal",
1068
+ "csharp",
1069
+ "cshtml",
1070
+ "csp",
1071
+ "css",
1072
+ "css-extras",
1073
+ "csv",
1074
+ "cypher",
1075
+ "d",
1076
+ "dart",
1077
+ "dataweave",
1078
+ "dax",
1079
+ "dhall",
1080
+ "diff",
1081
+ "django",
1082
+ "dns-zone-file",
1083
+ "docker",
1084
+ "dot",
1085
+ "ebnf",
1086
+ "editorconfig",
1087
+ "eiffel",
1088
+ "ejs",
1089
+ "elixir",
1090
+ "elm",
1091
+ "erb",
1092
+ "erlang",
1093
+ "etlua",
1094
+ "excel-formula",
1095
+ "factor",
1096
+ "false",
1097
+ "firestore-security-rules",
1098
+ "flow",
1099
+ "fortran",
1100
+ "fsharp",
1101
+ "ftl",
1102
+ "gap",
1103
+ "gcode",
1104
+ "gdscript",
1105
+ "gedcom",
1106
+ "gherkin",
1107
+ "git",
1108
+ "glsl",
1109
+ "gml",
1110
+ "gn",
1111
+ "go",
1112
+ "go-module",
1113
+ "graphql",
1114
+ "groovy",
1115
+ "haml",
1116
+ "handlebars",
1117
+ "haskell",
1118
+ "haxe",
1119
+ "hcl",
1120
+ "hlsl",
1121
+ "hoon",
1122
+ "hpkp",
1123
+ "hsts",
1124
+ "http",
1125
+ "ichigojam",
1126
+ "icon",
1127
+ "icu-message-format",
1128
+ "idris",
1129
+ "iecst",
1130
+ "ignore",
1131
+ "index",
1132
+ "inform7",
1133
+ "ini",
1134
+ "io",
1135
+ "j",
1136
+ "java",
1137
+ "javadoc",
1138
+ "javadoclike",
1139
+ "javascript",
1140
+ "javastacktrace",
1141
+ "jexl",
1142
+ "jolie",
1143
+ "jq",
1144
+ "js-extras",
1145
+ "js-templates",
1146
+ "jsdoc",
1147
+ "json",
1148
+ "json5",
1149
+ "jsonp",
1150
+ "jsstacktrace",
1151
+ "jsx",
1152
+ "julia",
1153
+ "keepalived",
1154
+ "keyman",
1155
+ "kotlin",
1156
+ "kumir",
1157
+ "kusto",
1158
+ "latex",
1159
+ "latte",
1160
+ "less",
1161
+ "lilypond",
1162
+ "liquid",
1163
+ "lisp",
1164
+ "livescript",
1165
+ "llvm",
1166
+ "log",
1167
+ "lolcode",
1168
+ "lua",
1169
+ "magma",
1170
+ "makefile",
1171
+ "markdown",
1172
+ "markup",
1173
+ "markup-templating",
1174
+ "matlab",
1175
+ "maxscript",
1176
+ "mel",
1177
+ "mermaid",
1178
+ "mizar",
1179
+ "mongodb",
1180
+ "monkey",
1181
+ "moonscript",
1182
+ "n1ql",
1183
+ "n4js",
1184
+ "nand2tetris-hdl",
1185
+ "naniscript",
1186
+ "nasm",
1187
+ "neon",
1188
+ "nevod",
1189
+ "nginx",
1190
+ "nim",
1191
+ "nix",
1192
+ "nsis",
1193
+ "objectivec",
1194
+ "ocaml",
1195
+ "opencl",
1196
+ "openqasm",
1197
+ "oz",
1198
+ "parigp",
1199
+ "parser",
1200
+ "pascal",
1201
+ "pascaligo",
1202
+ "pcaxis",
1203
+ "peoplecode",
1204
+ "perl",
1205
+ "php",
1206
+ "php-extras",
1207
+ "phpdoc",
1208
+ "plsql",
1209
+ "powerquery",
1210
+ "powershell",
1211
+ "processing",
1212
+ "prolog",
1213
+ "promql",
1214
+ "properties",
1215
+ "protobuf",
1216
+ "psl",
1217
+ "pug",
1218
+ "puppet",
1219
+ "pure",
1220
+ "purebasic",
1221
+ "purescript",
1222
+ "python",
1223
+ "q",
1224
+ "qml",
1225
+ "qore",
1226
+ "qsharp",
1227
+ "r",
1228
+ "racket",
1229
+ "reason",
1230
+ "regex",
1231
+ "rego",
1232
+ "renpy",
1233
+ "rest",
1234
+ "rip",
1235
+ "roboconf",
1236
+ "robotframework",
1237
+ "ruby",
1238
+ "rust",
1239
+ "sas",
1240
+ "sass",
1241
+ "scala",
1242
+ "scheme",
1243
+ "scss",
1244
+ "shell-session",
1245
+ "smali",
1246
+ "smalltalk",
1247
+ "smarty",
1248
+ "sml",
1249
+ "solidity",
1250
+ "solution-file",
1251
+ "soy",
1252
+ "sparql",
1253
+ "splunk-spl",
1254
+ "sqf",
1255
+ "sql",
1256
+ "squirrel",
1257
+ "stan",
1258
+ "stylus",
1259
+ "swift",
1260
+ "systemd",
1261
+ "t4-cs",
1262
+ "t4-templating",
1263
+ "t4-vb",
1264
+ "tap",
1265
+ "tcl",
1266
+ "textile",
1267
+ "toml",
1268
+ "tremor",
1269
+ "tsx",
1270
+ "tt2",
1271
+ "turtle",
1272
+ "twig",
1273
+ "typescript",
1274
+ "typoscript",
1275
+ "unrealscript",
1276
+ "uorazor",
1277
+ "uri",
1278
+ "v",
1279
+ "vala",
1280
+ "vbnet",
1281
+ "velocity",
1282
+ "verilog",
1283
+ "vhdl",
1284
+ "vim",
1285
+ "visual-basic",
1286
+ "warpscript",
1287
+ "wasm",
1288
+ "web-idl",
1289
+ "wiki",
1290
+ "wolfram",
1291
+ "wren",
1292
+ "xeora",
1293
+ "xml-doc",
1294
+ "xojo",
1295
+ "xquery",
1296
+ "yaml",
1297
+ "yang",
1298
+ "zig",
1299
+ ],
1300
+ Var[
1301
+ Literal[
1302
+ "abap",
1303
+ "abnf",
1304
+ "actionscript",
1305
+ "ada",
1306
+ "agda",
1307
+ "al",
1308
+ "antlr4",
1309
+ "apacheconf",
1310
+ "apex",
1311
+ "apl",
1312
+ "applescript",
1313
+ "aql",
1314
+ "arduino",
1315
+ "arff",
1316
+ "asciidoc",
1317
+ "asm6502",
1318
+ "asmatmel",
1319
+ "aspnet",
1320
+ "autohotkey",
1321
+ "autoit",
1322
+ "avisynth",
1323
+ "avro-idl",
1324
+ "bash",
1325
+ "basic",
1326
+ "batch",
1327
+ "bbcode",
1328
+ "bicep",
1329
+ "birb",
1330
+ "bison",
1331
+ "bnf",
1332
+ "brainfuck",
1333
+ "brightscript",
1334
+ "bro",
1335
+ "bsl",
1336
+ "c",
1337
+ "cfscript",
1338
+ "chaiscript",
1339
+ "cil",
1340
+ "clike",
1341
+ "clojure",
1342
+ "cmake",
1343
+ "cobol",
1344
+ "coffeescript",
1345
+ "concurnas",
1346
+ "coq",
1347
+ "core",
1348
+ "cpp",
1349
+ "crystal",
1350
+ "csharp",
1351
+ "cshtml",
1352
+ "csp",
1353
+ "css",
1354
+ "css-extras",
1355
+ "csv",
1356
+ "cypher",
1357
+ "d",
1358
+ "dart",
1359
+ "dataweave",
1360
+ "dax",
1361
+ "dhall",
1362
+ "diff",
1363
+ "django",
1364
+ "dns-zone-file",
1365
+ "docker",
1366
+ "dot",
1367
+ "ebnf",
1368
+ "editorconfig",
1369
+ "eiffel",
1370
+ "ejs",
1371
+ "elixir",
1372
+ "elm",
1373
+ "erb",
1374
+ "erlang",
1375
+ "etlua",
1376
+ "excel-formula",
1377
+ "factor",
1378
+ "false",
1379
+ "firestore-security-rules",
1380
+ "flow",
1381
+ "fortran",
1382
+ "fsharp",
1383
+ "ftl",
1384
+ "gap",
1385
+ "gcode",
1386
+ "gdscript",
1387
+ "gedcom",
1388
+ "gherkin",
1389
+ "git",
1390
+ "glsl",
1391
+ "gml",
1392
+ "gn",
1393
+ "go",
1394
+ "go-module",
1395
+ "graphql",
1396
+ "groovy",
1397
+ "haml",
1398
+ "handlebars",
1399
+ "haskell",
1400
+ "haxe",
1401
+ "hcl",
1402
+ "hlsl",
1403
+ "hoon",
1404
+ "hpkp",
1405
+ "hsts",
1406
+ "http",
1407
+ "ichigojam",
1408
+ "icon",
1409
+ "icu-message-format",
1410
+ "idris",
1411
+ "iecst",
1412
+ "ignore",
1413
+ "index",
1414
+ "inform7",
1415
+ "ini",
1416
+ "io",
1417
+ "j",
1418
+ "java",
1419
+ "javadoc",
1420
+ "javadoclike",
1421
+ "javascript",
1422
+ "javastacktrace",
1423
+ "jexl",
1424
+ "jolie",
1425
+ "jq",
1426
+ "js-extras",
1427
+ "js-templates",
1428
+ "jsdoc",
1429
+ "json",
1430
+ "json5",
1431
+ "jsonp",
1432
+ "jsstacktrace",
1433
+ "jsx",
1434
+ "julia",
1435
+ "keepalived",
1436
+ "keyman",
1437
+ "kotlin",
1438
+ "kumir",
1439
+ "kusto",
1440
+ "latex",
1441
+ "latte",
1442
+ "less",
1443
+ "lilypond",
1444
+ "liquid",
1445
+ "lisp",
1446
+ "livescript",
1447
+ "llvm",
1448
+ "log",
1449
+ "lolcode",
1450
+ "lua",
1451
+ "magma",
1452
+ "makefile",
1453
+ "markdown",
1454
+ "markup",
1455
+ "markup-templating",
1456
+ "matlab",
1457
+ "maxscript",
1458
+ "mel",
1459
+ "mermaid",
1460
+ "mizar",
1461
+ "mongodb",
1462
+ "monkey",
1463
+ "moonscript",
1464
+ "n1ql",
1465
+ "n4js",
1466
+ "nand2tetris-hdl",
1467
+ "naniscript",
1468
+ "nasm",
1469
+ "neon",
1470
+ "nevod",
1471
+ "nginx",
1472
+ "nim",
1473
+ "nix",
1474
+ "nsis",
1475
+ "objectivec",
1476
+ "ocaml",
1477
+ "opencl",
1478
+ "openqasm",
1479
+ "oz",
1480
+ "parigp",
1481
+ "parser",
1482
+ "pascal",
1483
+ "pascaligo",
1484
+ "pcaxis",
1485
+ "peoplecode",
1486
+ "perl",
1487
+ "php",
1488
+ "php-extras",
1489
+ "phpdoc",
1490
+ "plsql",
1491
+ "powerquery",
1492
+ "powershell",
1493
+ "processing",
1494
+ "prolog",
1495
+ "promql",
1496
+ "properties",
1497
+ "protobuf",
1498
+ "psl",
1499
+ "pug",
1500
+ "puppet",
1501
+ "pure",
1502
+ "purebasic",
1503
+ "purescript",
1504
+ "python",
1505
+ "q",
1506
+ "qml",
1507
+ "qore",
1508
+ "qsharp",
1509
+ "r",
1510
+ "racket",
1511
+ "reason",
1512
+ "regex",
1513
+ "rego",
1514
+ "renpy",
1515
+ "rest",
1516
+ "rip",
1517
+ "roboconf",
1518
+ "robotframework",
1519
+ "ruby",
1520
+ "rust",
1521
+ "sas",
1522
+ "sass",
1523
+ "scala",
1524
+ "scheme",
1525
+ "scss",
1526
+ "shell-session",
1527
+ "smali",
1528
+ "smalltalk",
1529
+ "smarty",
1530
+ "sml",
1531
+ "solidity",
1532
+ "solution-file",
1533
+ "soy",
1534
+ "sparql",
1535
+ "splunk-spl",
1536
+ "sqf",
1537
+ "sql",
1538
+ "squirrel",
1539
+ "stan",
1540
+ "stylus",
1541
+ "swift",
1542
+ "systemd",
1543
+ "t4-cs",
1544
+ "t4-templating",
1545
+ "t4-vb",
1546
+ "tap",
1547
+ "tcl",
1548
+ "textile",
1549
+ "toml",
1550
+ "tremor",
1551
+ "tsx",
1552
+ "tt2",
1553
+ "turtle",
1554
+ "twig",
1555
+ "typescript",
1556
+ "typoscript",
1557
+ "unrealscript",
1558
+ "uorazor",
1559
+ "uri",
1560
+ "v",
1561
+ "vala",
1562
+ "vbnet",
1563
+ "velocity",
1564
+ "verilog",
1565
+ "vhdl",
1566
+ "vim",
1567
+ "visual-basic",
1568
+ "warpscript",
1569
+ "wasm",
1570
+ "web-idl",
1571
+ "wiki",
1572
+ "wolfram",
1573
+ "wren",
1574
+ "xeora",
1575
+ "xml-doc",
1576
+ "xojo",
1577
+ "xquery",
1578
+ "yaml",
1579
+ "yang",
1580
+ "zig",
1581
+ ]
1582
+ ],
1583
+ ]
1584
+ ] = None,
1585
+ code: Optional[Union[Var[str], str]] = None,
1586
+ show_line_numbers: Optional[Union[Var[bool], bool]] = None,
1587
+ starting_line_number: Optional[Union[Var[int], int]] = None,
1588
+ wrap_long_lines: Optional[Union[Var[bool], bool]] = None,
1589
+ custom_style: Optional[Dict[str, Union[str, Var, Color]]] = None,
1590
+ code_tag_props: Optional[Union[Dict[str, str], Var[Dict[str, str]]]] = None,
1591
+ style: Optional[Style] = None,
1592
+ key: Optional[Any] = None,
1593
+ id: Optional[Any] = None,
1594
+ class_name: Optional[Any] = None,
1595
+ autofocus: Optional[bool] = None,
1596
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
1597
+ on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
1598
+ on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
1599
+ on_context_menu: Optional[
1600
+ Union[EventHandler, EventSpec, list, Callable, Var]
1601
+ ] = None,
1602
+ on_double_click: Optional[
1603
+ Union[EventHandler, EventSpec, list, Callable, Var]
1604
+ ] = None,
1605
+ on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
1606
+ on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
1607
+ on_mouse_down: Optional[
1608
+ Union[EventHandler, EventSpec, list, Callable, Var]
1609
+ ] = None,
1610
+ on_mouse_enter: Optional[
1611
+ Union[EventHandler, EventSpec, list, Callable, Var]
1612
+ ] = None,
1613
+ on_mouse_leave: Optional[
1614
+ Union[EventHandler, EventSpec, list, Callable, Var]
1615
+ ] = None,
1616
+ on_mouse_move: Optional[
1617
+ Union[EventHandler, EventSpec, list, Callable, Var]
1618
+ ] = None,
1619
+ on_mouse_out: Optional[
1620
+ Union[EventHandler, EventSpec, list, Callable, Var]
1621
+ ] = None,
1622
+ on_mouse_over: Optional[
1623
+ Union[EventHandler, EventSpec, list, Callable, Var]
1624
+ ] = None,
1625
+ on_mouse_up: Optional[
1626
+ Union[EventHandler, EventSpec, list, Callable, Var]
1627
+ ] = None,
1628
+ on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
1629
+ on_unmount: Optional[
1630
+ Union[EventHandler, EventSpec, list, Callable, Var]
1631
+ ] = None,
1632
+ **props,
1633
+ ) -> "CodeBlock":
1634
+ """Create a text component.
1635
+
1636
+ Args:
1637
+ *children: The children of the component.
1638
+ can_copy: Whether a copy button should appears.
1639
+ copy_button: A custom copy button to override the default one.
1640
+ theme: The theme to use ("light" or "dark").
1641
+ language: The language to use.
1642
+ code: The code to display.
1643
+ show_line_numbers: If this is enabled line numbers will be shown next to the code block.
1644
+ starting_line_number: The starting line number to use.
1645
+ wrap_long_lines: Whether to wrap long lines.
1646
+ custom_style: A custom style for the code block.
1647
+ code_tag_props: Props passed down to the code tag.
1648
+ style: The style of the component.
1649
+ key: A unique key for the component.
1650
+ id: The id for the component.
1651
+ class_name: The class name for the component.
1652
+ autofocus: Whether the component should take the focus once the page is loaded
1653
+ custom_attrs: custom attribute
1654
+ **props: The props to pass to the component.
1655
+
1656
+ Returns:
1657
+ The text component.
1658
+ """
1659
+ ...
1003
1660
 
1004
- code_block = CodeBlock.create
1661
+ code_block = CodeblockNamespace()