reflex 0.7.10.post1__py3-none-any.whl → 0.7.11a1__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 (53) hide show
  1. reflex/.templates/jinja/web/pages/_app.js.jinja2 +10 -10
  2. reflex/.templates/jinja/web/pages/_document.js.jinja2 +1 -1
  3. reflex/.templates/jinja/web/pages/index.js.jinja2 +1 -1
  4. reflex/.templates/jinja/web/pages/stateful_component.js.jinja2 +1 -1
  5. reflex/.templates/jinja/web/pages/utils.js.jinja2 +35 -72
  6. reflex/.templates/jinja/web/utils/context.js.jinja2 +6 -18
  7. reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +7 -7
  8. reflex/.templates/web/components/shiki/code.js +5 -4
  9. reflex/compiler/compiler.py +20 -3
  10. reflex/components/base/bare.py +8 -5
  11. reflex/components/base/body.py +2 -4
  12. reflex/components/base/body.pyi +197 -3
  13. reflex/components/base/error_boundary.py +1 -1
  14. reflex/components/base/link.py +3 -3
  15. reflex/components/base/link.pyi +392 -4
  16. reflex/components/base/meta.py +5 -9
  17. reflex/components/base/meta.pyi +608 -28
  18. reflex/components/component.py +13 -27
  19. reflex/components/core/colors.py +35 -4
  20. reflex/components/core/cond.py +2 -2
  21. reflex/components/core/upload.py +2 -2
  22. reflex/components/datadisplay/shiki_code_block.py +2 -2
  23. reflex/components/dynamic.py +5 -2
  24. reflex/components/el/element.py +4 -0
  25. reflex/components/el/elements/forms.py +3 -1
  26. reflex/components/el/elements/inline.py +3 -1
  27. reflex/components/el/elements/metadata.py +1 -1
  28. reflex/components/el/elements/metadata.pyi +1 -0
  29. reflex/components/el/elements/typography.py +3 -1
  30. reflex/components/lucide/icon.py +47 -3
  31. reflex/components/lucide/icon.pyi +45 -0
  32. reflex/components/markdown/markdown.py +6 -7
  33. reflex/components/markdown/markdown.pyi +2 -2
  34. reflex/components/moment/moment.py +1 -1
  35. reflex/components/next/video.py +8 -1
  36. reflex/components/plotly/plotly.py +1 -1
  37. reflex/components/radix/primitives/drawer.py +1 -1
  38. reflex/components/radix/themes/layout/list.py +3 -2
  39. reflex/components/radix/themes/layout/list.pyi +391 -2
  40. reflex/components/suneditor/editor.py +1 -1
  41. reflex/config.py +3 -0
  42. reflex/constants/colors.py +23 -6
  43. reflex/constants/installer.py +2 -2
  44. reflex/state.py +3 -1
  45. reflex/utils/build.py +1 -2
  46. reflex/utils/format.py +16 -6
  47. reflex/utils/pyi_generator.py +1 -0
  48. reflex/utils/types.py +24 -8
  49. {reflex-0.7.10.post1.dist-info → reflex-0.7.11a1.dist-info}/METADATA +1 -1
  50. {reflex-0.7.10.post1.dist-info → reflex-0.7.11a1.dist-info}/RECORD +53 -53
  51. {reflex-0.7.10.post1.dist-info → reflex-0.7.11a1.dist-info}/WHEEL +0 -0
  52. {reflex-0.7.10.post1.dist-info → reflex-0.7.11a1.dist-info}/entry_points.txt +0 -0
  53. {reflex-0.7.10.post1.dist-info → reflex-0.7.11a1.dist-info}/licenses/LICENSE +0 -0
@@ -304,6 +304,8 @@ LUCIDE_ICON_LIST = [
304
304
  "banana",
305
305
  "bandage",
306
306
  "banknote",
307
+ "banknote_arrow_down",
308
+ "banknote_x",
307
309
  "bar_chart",
308
310
  "bar_chart_2",
309
311
  "bar_chart_3",
@@ -319,6 +321,7 @@ LUCIDE_ICON_LIST = [
319
321
  "battery_full",
320
322
  "battery_low",
321
323
  "battery_medium",
324
+ "battery_plus",
322
325
  "battery_warning",
323
326
  "beaker",
324
327
  "bean",
@@ -391,6 +394,7 @@ LUCIDE_ICON_LIST = [
391
394
  "bot",
392
395
  "bot_message_square",
393
396
  "bot_off",
397
+ "bow_arrow",
394
398
  "box",
395
399
  "box_select",
396
400
  "boxes",
@@ -400,12 +404,15 @@ LUCIDE_ICON_LIST = [
400
404
  "brain_circuit",
401
405
  "brain_cog",
402
406
  "brick_wall",
407
+ "brick_wall_fire",
403
408
  "briefcase",
404
409
  "briefcase_business",
405
410
  "briefcase_conveyor_belt",
406
411
  "briefcase_medical",
407
412
  "bring_to_front",
408
413
  "brush",
414
+ "brush_cleaning",
415
+ "bubbles",
409
416
  "bug",
410
417
  "bug_off",
411
418
  "bug_play",
@@ -545,6 +552,7 @@ LUCIDE_ICON_LIST = [
545
552
  "circle_power",
546
553
  "circle_slash",
547
554
  "circle_slash_2",
555
+ "circle_small",
548
556
  "circle_stop",
549
557
  "circle_user",
550
558
  "circle_user_round",
@@ -579,6 +587,8 @@ LUCIDE_ICON_LIST = [
579
587
  "clock_alert",
580
588
  "clock_arrow_down",
581
589
  "clock_arrow_up",
590
+ "clock_fading",
591
+ "clock_plus",
582
592
  "cloud",
583
593
  "cloud_alert",
584
594
  "cloud_cog",
@@ -608,6 +618,7 @@ LUCIDE_ICON_LIST = [
608
618
  "coins",
609
619
  "columns_2",
610
620
  "columns_3",
621
+ "columns_3_cog",
611
622
  "columns_4",
612
623
  "combine",
613
624
  "command",
@@ -655,6 +666,8 @@ LUCIDE_ICON_LIST = [
655
666
  "database",
656
667
  "database_backup",
657
668
  "database_zap",
669
+ "decimals_arrow_left",
670
+ "decimals_arrow_right",
658
671
  "delete",
659
672
  "dessert",
660
673
  "diameter",
@@ -682,6 +695,7 @@ LUCIDE_ICON_LIST = [
682
695
  "dollar_sign",
683
696
  "donut",
684
697
  "door_closed",
698
+ "door_closed_locked",
685
699
  "door_open",
686
700
  "dot",
687
701
  "download",
@@ -855,6 +869,9 @@ LUCIDE_ICON_LIST = [
855
869
  "frown",
856
870
  "fuel",
857
871
  "fullscreen",
872
+ "funnel",
873
+ "funnel_plus",
874
+ "funnel_x",
858
875
  "gallery_horizontal",
859
876
  "gallery_horizontal_end",
860
877
  "gallery_thumbnails",
@@ -906,6 +923,7 @@ LUCIDE_ICON_LIST = [
906
923
  "group",
907
924
  "guitar",
908
925
  "ham",
926
+ "hamburger",
909
927
  "hammer",
910
928
  "hand",
911
929
  "hand_coins",
@@ -934,7 +952,9 @@ LUCIDE_ICON_LIST = [
934
952
  "heart",
935
953
  "heart_crack",
936
954
  "heart_handshake",
955
+ "heart_minus",
937
956
  "heart_off",
957
+ "heart_plus",
938
958
  "heart_pulse",
939
959
  "heater",
940
960
  "hexagon",
@@ -1045,6 +1065,7 @@ LUCIDE_ICON_LIST = [
1045
1065
  "locate",
1046
1066
  "locate_fixed",
1047
1067
  "locate_off",
1068
+ "location_edit",
1048
1069
  "lock",
1049
1070
  "lock_keyhole",
1050
1071
  "lock_keyhole_open",
@@ -1079,6 +1100,8 @@ LUCIDE_ICON_LIST = [
1079
1100
  "map_pin_x",
1080
1101
  "map_pin_x_inside",
1081
1102
  "map_pinned",
1103
+ "map_plus",
1104
+ "mars_stroke",
1082
1105
  "martini",
1083
1106
  "maximize",
1084
1107
  "maximize_2",
@@ -1177,6 +1200,7 @@ LUCIDE_ICON_LIST = [
1177
1200
  "network",
1178
1201
  "newspaper",
1179
1202
  "nfc",
1203
+ "non_binary",
1180
1204
  "notebook",
1181
1205
  "notebook_pen",
1182
1206
  "notebook_tabs",
@@ -1208,6 +1232,7 @@ LUCIDE_ICON_LIST = [
1208
1232
  "paintbrush_2",
1209
1233
  "paintbrush_vertical",
1210
1234
  "palette",
1235
+ "panda",
1211
1236
  "panel_bottom",
1212
1237
  "panel_bottom_close",
1213
1238
  "panel_bottom_dashed",
@@ -1319,6 +1344,7 @@ LUCIDE_ICON_LIST = [
1319
1344
  "receipt_swiss_franc",
1320
1345
  "receipt_text",
1321
1346
  "rectangle_ellipsis",
1347
+ "rectangle_goggles",
1322
1348
  "rectangle_horizontal",
1323
1349
  "rectangle_vertical",
1324
1350
  "recycle",
@@ -1346,6 +1372,7 @@ LUCIDE_ICON_LIST = [
1346
1372
  "roller_coaster",
1347
1373
  "rotate_3d",
1348
1374
  "rotate_ccw",
1375
+ "rotate_ccw_key",
1349
1376
  "rotate_ccw_square",
1350
1377
  "rotate_cw",
1351
1378
  "rotate_cw_square",
@@ -1357,12 +1384,14 @@ LUCIDE_ICON_LIST = [
1357
1384
  "rows_4",
1358
1385
  "rss",
1359
1386
  "ruler",
1387
+ "ruler_dimension_line",
1360
1388
  "russian_ruble",
1361
1389
  "sailboat",
1362
1390
  "salad",
1363
1391
  "sandwich",
1364
1392
  "satellite",
1365
1393
  "satellite_dish",
1394
+ "saudi_riyal",
1366
1395
  "save",
1367
1396
  "save_all",
1368
1397
  "save_off",
@@ -1418,6 +1447,7 @@ LUCIDE_ICON_LIST = [
1418
1447
  "shield_off",
1419
1448
  "shield_plus",
1420
1449
  "shield_question",
1450
+ "shield_user",
1421
1451
  "shield_x",
1422
1452
  "ship",
1423
1453
  "ship_wheel",
@@ -1427,6 +1457,8 @@ LUCIDE_ICON_LIST = [
1427
1457
  "shopping_cart",
1428
1458
  "shovel",
1429
1459
  "shower_head",
1460
+ "shredder",
1461
+ "shrimp",
1430
1462
  "shrink",
1431
1463
  "shrub",
1432
1464
  "shuffle",
@@ -1455,6 +1487,7 @@ LUCIDE_ICON_LIST = [
1455
1487
  "smile_plus",
1456
1488
  "snail",
1457
1489
  "snowflake",
1490
+ "soap_dispenser_droplet",
1458
1491
  "sofa",
1459
1492
  "soup",
1460
1493
  "space",
@@ -1466,6 +1499,7 @@ LUCIDE_ICON_LIST = [
1466
1499
  "spell_check",
1467
1500
  "spell_check_2",
1468
1501
  "spline",
1502
+ "spline_pointer",
1469
1503
  "split",
1470
1504
  "spray_can",
1471
1505
  "sprout",
@@ -1519,6 +1553,7 @@ LUCIDE_ICON_LIST = [
1519
1553
  "square_plus",
1520
1554
  "square_power",
1521
1555
  "square_radical",
1556
+ "square_round_corner",
1522
1557
  "square_scissors",
1523
1558
  "square_sigma",
1524
1559
  "square_slash",
@@ -1530,6 +1565,10 @@ LUCIDE_ICON_LIST = [
1530
1565
  "square_user",
1531
1566
  "square_user_round",
1532
1567
  "square_x",
1568
+ "squares_exclude",
1569
+ "squares_intersect",
1570
+ "squares_subtract",
1571
+ "squares_unite",
1533
1572
  "squircle",
1534
1573
  "squirrel",
1535
1574
  "stamp",
@@ -1626,6 +1665,7 @@ LUCIDE_ICON_LIST = [
1626
1665
  "train_front_tunnel",
1627
1666
  "train_track",
1628
1667
  "tram_front",
1668
+ "transgender",
1629
1669
  "trash",
1630
1670
  "trash_2",
1631
1671
  "tree_deciduous",
@@ -1642,6 +1682,7 @@ LUCIDE_ICON_LIST = [
1642
1682
  "triangle_right",
1643
1683
  "trophy",
1644
1684
  "truck",
1685
+ "truck_electric",
1645
1686
  "turtle",
1646
1687
  "tv",
1647
1688
  "tv_2",
@@ -1669,6 +1710,7 @@ LUCIDE_ICON_LIST = [
1669
1710
  "user",
1670
1711
  "user_check",
1671
1712
  "user_cog",
1713
+ "user_lock",
1672
1714
  "user_minus",
1673
1715
  "user_pen",
1674
1716
  "user_plus",
@@ -1691,6 +1733,8 @@ LUCIDE_ICON_LIST = [
1691
1733
  "vault",
1692
1734
  "vegan",
1693
1735
  "venetian_mask",
1736
+ "venus",
1737
+ "venus_and_mars",
1694
1738
  "vibrate",
1695
1739
  "vibrate_off",
1696
1740
  "video",
@@ -1728,6 +1772,7 @@ LUCIDE_ICON_LIST = [
1728
1772
  "wifi_high",
1729
1773
  "wifi_low",
1730
1774
  "wifi_off",
1775
+ "wifi_pen",
1731
1776
  "wifi_zero",
1732
1777
  "wind",
1733
1778
  "wind_arrow_down",
@@ -18,8 +18,8 @@ from reflex.vars.number import ternary_operation
18
18
 
19
19
  # Special vars used in the component map.
20
20
  _CHILDREN = Var(_js_expr="children", _var_type=str)
21
- _PROPS = Var(_js_expr="...props")
22
- _PROPS_IN_TAG = Var(_js_expr="{...props}")
21
+ _PROPS = Var(_js_expr="props")
22
+ _PROPS_SPREAD = Var(_js_expr="...props")
23
23
  _MOCK_ARG = Var(_js_expr="", _var_type=str)
24
24
  _LANGUAGE = Var(_js_expr="_language", _var_type=str)
25
25
 
@@ -128,7 +128,7 @@ class MarkdownComponentMap:
128
128
  Returns:
129
129
  The function arguments as a list of strings.
130
130
  """
131
- return ["node", _CHILDREN._js_expr, _PROPS._js_expr]
131
+ return ["node", _CHILDREN._js_expr, _PROPS_SPREAD._js_expr]
132
132
 
133
133
  @classmethod
134
134
  def get_fn_body(cls) -> Var:
@@ -297,7 +297,7 @@ let {_LANGUAGE!s} = match ? match[1] : '';
297
297
  "inline",
298
298
  "className",
299
299
  _CHILDREN._js_expr,
300
- _PROPS._js_expr,
300
+ _PROPS_SPREAD._js_expr,
301
301
  ),
302
302
  fn_body=Var(_js_expr=formatted_code),
303
303
  explicit_return=True,
@@ -321,7 +321,7 @@ let {_LANGUAGE!s} = match ? match[1] : '';
321
321
  if tag not in self.component_map:
322
322
  raise ValueError(f"No markdown component found for tag: {tag}.")
323
323
 
324
- special_props = [_PROPS_IN_TAG]
324
+ special_props = [_PROPS]
325
325
  children = [
326
326
  _CHILDREN
327
327
  if tag != "codeblock"
@@ -338,9 +338,8 @@ let {_LANGUAGE!s} = match ? match[1] : '';
338
338
  special_props = []
339
339
 
340
340
  # If the children are set as a prop, don't pass them as children.
341
- children_prop = props.pop("children", None)
341
+ children_prop = props.get("children")
342
342
  if children_prop is not None:
343
- special_props.append(Var(_js_expr=f"children={{{children_prop!s}}}"))
344
343
  children = []
345
344
  # Get the component.
346
345
  component = self.component_map[tag](*children, **props).set(
@@ -15,8 +15,8 @@ from reflex.utils.imports import ImportDict
15
15
  from reflex.vars.base import LiteralVar, Var, VarData
16
16
 
17
17
  _CHILDREN = Var(_js_expr="children", _var_type=str)
18
- _PROPS = Var(_js_expr="...props")
19
- _PROPS_IN_TAG = Var(_js_expr="{...props}")
18
+ _PROPS = Var(_js_expr="props")
19
+ _PROPS_SPREAD = Var(_js_expr="...props")
20
20
  _MOCK_ARG = Var(_js_expr="", _var_type=str)
21
21
  _LANGUAGE = Var(_js_expr="_language", _var_type=str)
22
22
  _REMARK_MATH = Var(_js_expr="remarkMath")
@@ -29,7 +29,7 @@ class Moment(NoSSRComponent):
29
29
 
30
30
  tag: str | None = "Moment"
31
31
  is_default = True
32
- library: str | None = "react-moment"
32
+ library: str | None = "react-moment@1.1.3"
33
33
  lib_dependencies: list[str] = ["moment"]
34
34
 
35
35
  # How often the date update (how often time update / 0 to disable).
@@ -1,6 +1,7 @@
1
1
  """Wrapping of the next-video component."""
2
2
 
3
3
  from reflex.components.component import Component
4
+ from reflex.utils import console
4
5
  from reflex.vars.base import Var
5
6
 
6
7
  from .base import NextComponent
@@ -10,7 +11,7 @@ class Video(NextComponent):
10
11
  """A video component from NextJS."""
11
12
 
12
13
  tag = "Video"
13
- library = "next-video"
14
+ library = "next-video@2.2.0"
14
15
  is_default = True
15
16
  # the URL
16
17
  src: Var[str]
@@ -28,4 +29,10 @@ class Video(NextComponent):
28
29
  Returns:
29
30
  The Video component.
30
31
  """
32
+ console.deprecate(
33
+ "next-video",
34
+ "The next-video component is deprecated. Use `rx.video` instead.",
35
+ deprecation_version="0.7.11",
36
+ removal_version="0.8.0",
37
+ )
31
38
  return super().create(*children, **props)
@@ -252,7 +252,7 @@ const extractPoints = (points) => {
252
252
  )
253
253
  else:
254
254
  # Spread the figure dict over props, nothing to merge.
255
- tag.special_props.append(Var(_js_expr=f"{{...{figure!s}}}"))
255
+ tag.special_props.append(Var(_js_expr=f"{figure!s}"))
256
256
  return tag
257
257
 
258
258
 
@@ -19,7 +19,7 @@ from reflex.vars.base import Var
19
19
  class DrawerComponent(RadixPrimitiveComponent):
20
20
  """A Drawer component."""
21
21
 
22
- library = "vaul"
22
+ library = "vaul@1.1.2"
23
23
 
24
24
  lib_dependencies: list[str] = ["@radix-ui/react-dialog@^1.1.6"]
25
25
 
@@ -5,8 +5,9 @@ from __future__ import annotations
5
5
  from collections.abc import Iterable
6
6
  from typing import Any, Literal
7
7
 
8
- from reflex.components.component import Component, ComponentNamespace
8
+ from reflex.components.component import ComponentNamespace
9
9
  from reflex.components.core.foreach import Foreach
10
+ from reflex.components.el.elements.base import BaseHTML
10
11
  from reflex.components.el.elements.typography import Li, Ol, Ul
11
12
  from reflex.components.lucide.icon import Icon
12
13
  from reflex.components.markdown.markdown import MarkdownComponentMap
@@ -38,7 +39,7 @@ LiteralListStyleTypeOrdered = Literal[
38
39
  ]
39
40
 
40
41
 
41
- class BaseList(Component, MarkdownComponentMap):
42
+ class BaseList(BaseHTML, MarkdownComponentMap):
42
43
  """Base class for ordered and unordered lists."""
43
44
 
44
45
  tag = "ul"