reflex 0.5.3a1__py3-none-any.whl → 0.5.4__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 (75) hide show
  1. reflex/.templates/apps/demo/code/webui/state.py +3 -2
  2. reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +19 -20
  3. reflex/.templates/web/utils/state.js +6 -0
  4. reflex/__init__.py +7 -1
  5. reflex/__init__.pyi +2 -0
  6. reflex/app.py +2 -5
  7. reflex/compiler/compiler.py +3 -3
  8. reflex/components/chakra/base.py +3 -1
  9. reflex/components/chakra/forms/checkbox.py +1 -1
  10. reflex/components/chakra/forms/pininput.py +1 -1
  11. reflex/components/chakra/forms/rangeslider.py +1 -1
  12. reflex/components/chakra/navigation/link.py +3 -1
  13. reflex/components/component.py +43 -15
  14. reflex/components/core/banner.py +2 -1
  15. reflex/components/core/client_side_routing.py +3 -3
  16. reflex/components/core/client_side_routing.pyi +1 -0
  17. reflex/components/core/debounce.py +3 -1
  18. reflex/components/core/foreach.py +1 -1
  19. reflex/components/core/html.py +1 -1
  20. reflex/components/core/upload.py +2 -1
  21. reflex/components/datadisplay/code.py +4 -1
  22. reflex/components/datadisplay/dataeditor.py +11 -8
  23. reflex/components/datadisplay/dataeditor.pyi +1 -0
  24. reflex/components/el/__init__.pyi +2 -1
  25. reflex/components/el/elements/__init__.py +1 -1
  26. reflex/components/el/elements/__init__.pyi +3 -2
  27. reflex/components/el/elements/forms.py +25 -14
  28. reflex/components/el/elements/forms.pyi +2 -1
  29. reflex/components/markdown/markdown.py +17 -11
  30. reflex/components/markdown/markdown.pyi +12 -8
  31. reflex/components/plotly/plotly.py +83 -15
  32. reflex/components/plotly/plotly.pyi +15 -82
  33. reflex/components/radix/primitives/accordion.py +1 -1
  34. reflex/components/radix/themes/base.py +10 -2
  35. reflex/components/radix/themes/base.pyi +1 -0
  36. reflex/components/radix/themes/color_mode.py +1 -1
  37. reflex/components/radix/themes/components/checkbox.py +3 -1
  38. reflex/components/radix/themes/components/radio_group.py +6 -4
  39. reflex/components/radix/themes/components/separator.py +1 -1
  40. reflex/components/radix/themes/layout/container.py +1 -1
  41. reflex/components/radix/themes/layout/section.py +1 -1
  42. reflex/components/recharts/cartesian.py +42 -14
  43. reflex/components/recharts/cartesian.pyi +81 -17
  44. reflex/components/recharts/charts.py +12 -21
  45. reflex/components/recharts/charts.pyi +53 -14
  46. reflex/components/sonner/toast.py +37 -17
  47. reflex/components/sonner/toast.pyi +9 -5
  48. reflex/components/tags/tag.py +2 -1
  49. reflex/config.py +22 -14
  50. reflex/constants/__init__.py +2 -0
  51. reflex/constants/base.py +3 -1
  52. reflex/constants/config.py +7 -0
  53. reflex/event.py +24 -15
  54. reflex/experimental/__init__.py +22 -2
  55. reflex/experimental/client_state.py +81 -23
  56. reflex/experimental/hooks.py +35 -35
  57. reflex/experimental/layout.py +17 -5
  58. reflex/experimental/layout.pyi +536 -0
  59. reflex/reflex.py +9 -5
  60. reflex/style.py +3 -2
  61. reflex/testing.py +44 -13
  62. reflex/utils/compat.py +5 -0
  63. reflex/utils/format.py +20 -6
  64. reflex/utils/processes.py +27 -0
  65. reflex/utils/pyi_generator.py +11 -4
  66. reflex/utils/serializers.py +120 -16
  67. reflex/utils/types.py +9 -3
  68. reflex/vars.py +70 -21
  69. reflex/vars.pyi +2 -2
  70. {reflex-0.5.3a1.dist-info → reflex-0.5.4.dist-info}/METADATA +1 -1
  71. {reflex-0.5.3a1.dist-info → reflex-0.5.4.dist-info}/RECORD +74 -74
  72. reflex/constants/base.pyi +0 -99
  73. {reflex-0.5.3a1.dist-info → reflex-0.5.4.dist-info}/LICENSE +0 -0
  74. {reflex-0.5.3a1.dist-info → reflex-0.5.4.dist-info}/WHEEL +0 -0
  75. {reflex-0.5.3a1.dist-info → reflex-0.5.4.dist-info}/entry_points.txt +0 -0
reflex/constants/base.pyi DELETED
@@ -1,99 +0,0 @@
1
- """Stub file for reflex/constants/base.py"""
2
- # ------------------- DO NOT EDIT ----------------------
3
- # This file was generated by `reflex/utils/pyi_generator.py`!
4
- # ------------------------------------------------------
5
-
6
- from typing import Any, Dict, Literal, Optional, Union, overload
7
- from reflex.vars import Var, BaseVar, ComputedVar
8
- from reflex.event import EventChain, EventHandler, EventSpec
9
- from reflex.style import Style
10
- import os
11
- import platform
12
- from enum import Enum
13
- from importlib import metadata
14
- from types import SimpleNamespace
15
- from platformdirs import PlatformDirs
16
-
17
- IS_WINDOWS = platform.system() == "Windows"
18
- IS_WINDOWS_BUN_SUPPORTED_MACHINE = IS_WINDOWS and platform.machine() in [
19
- "AMD64",
20
- "x86_64",
21
- ]
22
-
23
- class Dirs(SimpleNamespace):
24
- WEB = ".web"
25
- APP_ASSETS = "assets"
26
- EXTERNAL_APP_ASSETS = "external"
27
- UTILS = "utils"
28
- STATIC = "_static"
29
- STATE_PATH = "/".join([UTILS, "state"])
30
- COMPONENTS_PATH = "/".join([UTILS, "components"])
31
- CONTEXTS_PATH = "/".join([UTILS, "context"])
32
- WEB_PAGES = os.path.join(WEB, "pages")
33
- WEB_STATIC = os.path.join(WEB, STATIC)
34
- WEB_UTILS = os.path.join(WEB, UTILS)
35
- WEB_ASSETS = os.path.join(WEB, "public")
36
- ENV_JSON = os.path.join(WEB, "env.json")
37
- REFLEX_JSON = os.path.join(WEB, "reflex.json")
38
- POSTCSS_JS = os.path.join(WEB, "postcss.config.js")
39
-
40
- class Reflex(SimpleNamespace):
41
- MODULE_NAME = "reflex"
42
- VERSION = metadata.version(MODULE_NAME)
43
- JSON = os.path.join(Dirs.WEB, "reflex.json")
44
- _dir = os.environ.get("REFLEX_DIR", "")
45
- DIR = _dir or PlatformDirs(MODULE_NAME, False).user_data_dir
46
- ROOT_DIR = os.path.dirname(
47
- os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
48
- )
49
-
50
- class ReflexHostingCLI(SimpleNamespace):
51
- MODULE_NAME = "reflex-hosting-cli"
52
-
53
- class Templates(SimpleNamespace):
54
- APP_TEMPLATES_ROUTE = "/app-templates"
55
- DEFAULT = "blank"
56
-
57
- class Dirs(SimpleNamespace):
58
- BASE = os.path.join(Reflex.ROOT_DIR, Reflex.MODULE_NAME, ".templates")
59
- WEB_TEMPLATE = os.path.join(BASE, "web")
60
- JINJA_TEMPLATE = os.path.join(BASE, "jinja")
61
- CODE = "code"
62
-
63
- class Next(SimpleNamespace):
64
- CONFIG_FILE = "next.config.js"
65
- SITEMAP_CONFIG_FILE = os.path.join(Dirs.WEB, "next-sitemap.config.js")
66
- NODE_MODULES = "node_modules"
67
- PACKAGE_LOCK = "package-lock.json"
68
- FRONTEND_LISTENING_REGEX = "Local:[\\s]+(.*)"
69
-
70
- class ColorMode(SimpleNamespace):
71
- NAME = "colorMode"
72
- USE = "useColorMode"
73
- TOGGLE = "toggleColorMode"
74
-
75
- class Env(str, Enum):
76
- DEV = "dev"
77
- PROD = "prod"
78
-
79
- class LogLevel(str, Enum):
80
- DEBUG = "debug"
81
- INFO = "info"
82
- WARNING = "warning"
83
- ERROR = "error"
84
- CRITICAL = "critical"
85
-
86
- POLLING_MAX_HTTP_BUFFER_SIZE = 1000 * 1000
87
-
88
- class Ping(SimpleNamespace):
89
- INTERVAL = 25
90
- TIMEOUT = 120
91
-
92
- COOKIES = "cookies"
93
- LOCAL_STORAGE = "local_storage"
94
- SKIP_COMPILE_ENV_VAR = "__REFLEX_SKIP_COMPILE"
95
- ENV_MODE_ENV_VAR = "REFLEX_ENV_MODE"
96
- PYTEST_CURRENT_TEST = "PYTEST_CURRENT_TEST"
97
- RELOAD_CONFIG = "__REFLEX_RELOAD_CONFIG"
98
- REFLEX_VAR_OPENING_TAG = "<reflex.Var>"
99
- REFLEX_VAR_CLOSING_TAG = "</reflex.Var>"