reflex 0.7.14a2__py3-none-any.whl → 0.7.14a3__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.
- reflex/components/component.py +8 -0
- reflex/config.py +6 -0
- reflex/utils/console.py +61 -0
- reflex/utils/exec.py +102 -27
- reflex/utils/telemetry.py +15 -0
- {reflex-0.7.14a2.dist-info → reflex-0.7.14a3.dist-info}/METADATA +1 -1
- {reflex-0.7.14a2.dist-info → reflex-0.7.14a3.dist-info}/RECORD +10 -11
- reflex/experimental/layout.pyi +0 -814
- {reflex-0.7.14a2.dist-info → reflex-0.7.14a3.dist-info}/WHEEL +0 -0
- {reflex-0.7.14a2.dist-info → reflex-0.7.14a3.dist-info}/entry_points.txt +0 -0
- {reflex-0.7.14a2.dist-info → reflex-0.7.14a3.dist-info}/licenses/LICENSE +0 -0
reflex/components/component.py
CHANGED
|
@@ -2206,6 +2206,14 @@ class CustomComponent(Component):
|
|
|
2206
2206
|
component._add_style_recursive(style)
|
|
2207
2207
|
return component
|
|
2208
2208
|
|
|
2209
|
+
def _get_all_app_wrap_components(self) -> dict[tuple[int, str], Component]:
|
|
2210
|
+
"""Get the app wrap components for the custom component.
|
|
2211
|
+
|
|
2212
|
+
Returns:
|
|
2213
|
+
The app wrap components.
|
|
2214
|
+
"""
|
|
2215
|
+
return self.get_component()._get_all_app_wrap_components()
|
|
2216
|
+
|
|
2209
2217
|
|
|
2210
2218
|
CUSTOM_COMPONENTS: dict[str, CustomComponent] = {}
|
|
2211
2219
|
|
reflex/config.py
CHANGED
|
@@ -766,6 +766,12 @@ class EnvironmentVariables:
|
|
|
766
766
|
# Whether to run Granian in a spawn process. This enables Reflex to pick up on environment variable changes between hot reloads.
|
|
767
767
|
REFLEX_STRICT_HOT_RELOAD: EnvVar[bool] = env_var(False)
|
|
768
768
|
|
|
769
|
+
# The path to the reflex log file. If not set, the log file will be stored in the reflex user directory.
|
|
770
|
+
REFLEX_LOG_FILE: EnvVar[Path | None] = env_var(None)
|
|
771
|
+
|
|
772
|
+
# Enable full logging of debug messages to reflex user directory.
|
|
773
|
+
REFLEX_ENABLE_FULL_LOGGING: EnvVar[bool] = env_var(False)
|
|
774
|
+
|
|
769
775
|
|
|
770
776
|
environment = EnvironmentVariables()
|
|
771
777
|
|
reflex/utils/console.py
CHANGED
|
@@ -15,6 +15,8 @@ from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn
|
|
|
15
15
|
from rich.prompt import Prompt
|
|
16
16
|
|
|
17
17
|
from reflex.constants import LogLevel
|
|
18
|
+
from reflex.constants.base import Reflex
|
|
19
|
+
from reflex.utils.decorator import once
|
|
18
20
|
|
|
19
21
|
# Console for pretty printing.
|
|
20
22
|
_console = Console()
|
|
@@ -92,6 +94,51 @@ def print(msg: str, dedupe: bool = False, **kwargs):
|
|
|
92
94
|
_console.print(msg, **kwargs)
|
|
93
95
|
|
|
94
96
|
|
|
97
|
+
@once
|
|
98
|
+
def log_file_console():
|
|
99
|
+
"""Create a console that logs to a file.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
A Console object that logs to a file.
|
|
103
|
+
"""
|
|
104
|
+
from reflex.config import environment
|
|
105
|
+
|
|
106
|
+
if not (env_log_file := environment.REFLEX_LOG_FILE.get()):
|
|
107
|
+
subseconds = int((time.time() % 1) * 1000)
|
|
108
|
+
timestamp = time.strftime("%Y-%m-%d_%H-%M-%S") + f"_{subseconds:03d}"
|
|
109
|
+
log_file = Reflex.DIR / "logs" / (timestamp + ".log")
|
|
110
|
+
log_file.parent.mkdir(parents=True, exist_ok=True)
|
|
111
|
+
else:
|
|
112
|
+
log_file = env_log_file
|
|
113
|
+
if log_file.exists():
|
|
114
|
+
log_file.unlink()
|
|
115
|
+
log_file.touch()
|
|
116
|
+
return Console(file=log_file.open("a", encoding="utf-8"))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@once
|
|
120
|
+
def should_use_log_file_console() -> bool:
|
|
121
|
+
"""Check if the log file console should be used.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
True if the log file console should be used, False otherwise.
|
|
125
|
+
"""
|
|
126
|
+
from reflex.config import environment
|
|
127
|
+
|
|
128
|
+
return environment.REFLEX_ENABLE_FULL_LOGGING.get()
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def print_to_log_file(msg: str, dedupe: bool = False, **kwargs):
|
|
132
|
+
"""Print a message to the log file.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
msg: The message to print.
|
|
136
|
+
dedupe: If True, suppress multiple console logs of print message.
|
|
137
|
+
kwargs: Keyword arguments to pass to the print function.
|
|
138
|
+
"""
|
|
139
|
+
log_file_console().print(msg, **kwargs)
|
|
140
|
+
|
|
141
|
+
|
|
95
142
|
def debug(msg: str, dedupe: bool = False, **kwargs):
|
|
96
143
|
"""Print a debug message.
|
|
97
144
|
|
|
@@ -110,6 +157,8 @@ def debug(msg: str, dedupe: bool = False, **kwargs):
|
|
|
110
157
|
progress.console.print(msg_, **kwargs)
|
|
111
158
|
else:
|
|
112
159
|
print(msg_, **kwargs)
|
|
160
|
+
if should_use_log_file_console() and kwargs.pop("progress", None) is None:
|
|
161
|
+
print_to_log_file(f"[purple]Debug: {msg}[/purple]", **kwargs)
|
|
113
162
|
|
|
114
163
|
|
|
115
164
|
def info(msg: str, dedupe: bool = False, **kwargs):
|
|
@@ -126,6 +175,8 @@ def info(msg: str, dedupe: bool = False, **kwargs):
|
|
|
126
175
|
return
|
|
127
176
|
_EMITTED_INFO.add(msg)
|
|
128
177
|
print(f"[cyan]Info: {msg}[/cyan]", **kwargs)
|
|
178
|
+
if should_use_log_file_console():
|
|
179
|
+
print_to_log_file(f"[cyan]Info: {msg}[/cyan]", **kwargs)
|
|
129
180
|
|
|
130
181
|
|
|
131
182
|
def success(msg: str, dedupe: bool = False, **kwargs):
|
|
@@ -142,6 +193,8 @@ def success(msg: str, dedupe: bool = False, **kwargs):
|
|
|
142
193
|
return
|
|
143
194
|
_EMITTED_SUCCESS.add(msg)
|
|
144
195
|
print(f"[green]Success: {msg}[/green]", **kwargs)
|
|
196
|
+
if should_use_log_file_console():
|
|
197
|
+
print_to_log_file(f"[green]Success: {msg}[/green]", **kwargs)
|
|
145
198
|
|
|
146
199
|
|
|
147
200
|
def log(msg: str, dedupe: bool = False, **kwargs):
|
|
@@ -158,6 +211,8 @@ def log(msg: str, dedupe: bool = False, **kwargs):
|
|
|
158
211
|
return
|
|
159
212
|
_EMITTED_LOGS.add(msg)
|
|
160
213
|
_console.log(msg, **kwargs)
|
|
214
|
+
if should_use_log_file_console():
|
|
215
|
+
print_to_log_file(msg, **kwargs)
|
|
161
216
|
|
|
162
217
|
|
|
163
218
|
def rule(title: str, **kwargs):
|
|
@@ -184,6 +239,8 @@ def warn(msg: str, dedupe: bool = False, **kwargs):
|
|
|
184
239
|
return
|
|
185
240
|
_EMIITED_WARNINGS.add(msg)
|
|
186
241
|
print(f"[orange1]Warning: {msg}[/orange1]", **kwargs)
|
|
242
|
+
if should_use_log_file_console():
|
|
243
|
+
print_to_log_file(f"[orange1]Warning: {msg}[/orange1]", **kwargs)
|
|
187
244
|
|
|
188
245
|
|
|
189
246
|
def _get_first_non_framework_frame() -> FrameType | None:
|
|
@@ -248,6 +305,8 @@ def deprecate(
|
|
|
248
305
|
)
|
|
249
306
|
if _LOG_LEVEL <= LogLevel.WARNING:
|
|
250
307
|
print(f"[yellow]DeprecationWarning: {msg}[/yellow]", **kwargs)
|
|
308
|
+
if should_use_log_file_console():
|
|
309
|
+
print_to_log_file(f"[yellow]DeprecationWarning: {msg}[/yellow]", **kwargs)
|
|
251
310
|
if dedupe:
|
|
252
311
|
_EMITTED_DEPRECATION_WARNINGS.add(dedupe_key)
|
|
253
312
|
|
|
@@ -266,6 +325,8 @@ def error(msg: str, dedupe: bool = False, **kwargs):
|
|
|
266
325
|
return
|
|
267
326
|
_EMITTED_ERRORS.add(msg)
|
|
268
327
|
print(f"[red]{msg}[/red]", **kwargs)
|
|
328
|
+
if should_use_log_file_console():
|
|
329
|
+
print_to_log_file(f"[red]{msg}[/red]", **kwargs)
|
|
269
330
|
|
|
270
331
|
|
|
271
332
|
def ask(
|
reflex/utils/exec.py
CHANGED
|
@@ -12,6 +12,7 @@ import subprocess
|
|
|
12
12
|
import sys
|
|
13
13
|
from collections.abc import Sequence
|
|
14
14
|
from pathlib import Path
|
|
15
|
+
from typing import NamedTuple, TypedDict
|
|
15
16
|
from urllib.parse import urljoin
|
|
16
17
|
|
|
17
18
|
import psutil
|
|
@@ -27,26 +28,102 @@ from reflex.utils.prerequisites import get_web_dir
|
|
|
27
28
|
frontend_process = None
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
def
|
|
31
|
-
"""
|
|
31
|
+
def get_package_json_and_hash(package_json_path: Path) -> tuple[PackageJson, str]:
|
|
32
|
+
"""Get the content of package.json and its hash.
|
|
32
33
|
|
|
33
34
|
Args:
|
|
34
|
-
|
|
35
|
+
package_json_path: The path to the package.json file.
|
|
35
36
|
|
|
36
37
|
Returns:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Example:
|
|
40
|
-
>>> detect_package_change("package.json")
|
|
41
|
-
'a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2'
|
|
38
|
+
A tuple containing the content of package.json as a dictionary and its SHA-256 hash.
|
|
42
39
|
"""
|
|
43
|
-
with
|
|
40
|
+
with package_json_path.open("r") as file:
|
|
44
41
|
json_data = json.load(file)
|
|
45
42
|
|
|
46
43
|
# Calculate the hash
|
|
47
44
|
json_string = json.dumps(json_data, sort_keys=True)
|
|
48
45
|
hash_object = hashlib.sha256(json_string.encode())
|
|
49
|
-
return hash_object.hexdigest()
|
|
46
|
+
return (json_data, hash_object.hexdigest())
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class PackageJson(TypedDict):
|
|
50
|
+
"""package.json content."""
|
|
51
|
+
|
|
52
|
+
dependencies: dict[str, str]
|
|
53
|
+
devDependencies: dict[str, str]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class Change(NamedTuple):
|
|
57
|
+
"""A named tuple to represent a change in package dependencies."""
|
|
58
|
+
|
|
59
|
+
added: set[str]
|
|
60
|
+
removed: set[str]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def format_change(name: str, change: Change) -> str:
|
|
64
|
+
"""Format the change for display.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
name: The name of the change (e.g., "dependencies" or "devDependencies").
|
|
68
|
+
change: The Change named tuple containing added and removed packages.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
A formatted string representing the changes.
|
|
72
|
+
"""
|
|
73
|
+
if not change.added and not change.removed:
|
|
74
|
+
return ""
|
|
75
|
+
added_str = ", ".join(sorted(change.added))
|
|
76
|
+
removed_str = ", ".join(sorted(change.removed))
|
|
77
|
+
change_str = f"{name}:\n"
|
|
78
|
+
if change.added:
|
|
79
|
+
change_str += f" Added: {added_str}\n"
|
|
80
|
+
if change.removed:
|
|
81
|
+
change_str += f" Removed: {removed_str}\n"
|
|
82
|
+
return change_str.strip()
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def get_different_packages(
|
|
86
|
+
old_package_json_content: PackageJson,
|
|
87
|
+
new_package_json_content: PackageJson,
|
|
88
|
+
) -> tuple[Change, Change]:
|
|
89
|
+
"""Get the packages that are different between two package JSON contents.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
old_package_json_content: The content of the old package JSON.
|
|
93
|
+
new_package_json_content: The content of the new package JSON.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
A tuple containing two `Change` named tuples:
|
|
97
|
+
- The first `Change` contains the changes in the `dependencies` section.
|
|
98
|
+
- The second `Change` contains the changes in the `devDependencies` section.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
def get_changes(old: dict[str, str], new: dict[str, str]) -> Change:
|
|
102
|
+
"""Get the changes between two dictionaries.
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
old: The old dictionary of packages.
|
|
106
|
+
new: The new dictionary of packages.
|
|
107
|
+
|
|
108
|
+
Returns:
|
|
109
|
+
A `Change` named tuple containing the added and removed packages.
|
|
110
|
+
"""
|
|
111
|
+
old_keys = set(old.keys())
|
|
112
|
+
new_keys = set(new.keys())
|
|
113
|
+
added = new_keys - old_keys
|
|
114
|
+
removed = old_keys - new_keys
|
|
115
|
+
return Change(added=added, removed=removed)
|
|
116
|
+
|
|
117
|
+
dependencies_change = get_changes(
|
|
118
|
+
old_package_json_content.get("dependencies", {}),
|
|
119
|
+
new_package_json_content.get("dependencies", {}),
|
|
120
|
+
)
|
|
121
|
+
dev_dependencies_change = get_changes(
|
|
122
|
+
old_package_json_content.get("devDependencies", {}),
|
|
123
|
+
new_package_json_content.get("devDependencies", {}),
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
return dependencies_change, dev_dependencies_change
|
|
50
127
|
|
|
51
128
|
|
|
52
129
|
def kill(proc_pid: int):
|
|
@@ -86,7 +163,7 @@ def run_process_and_launch_url(
|
|
|
86
163
|
from reflex.utils import processes
|
|
87
164
|
|
|
88
165
|
json_file_path = get_web_dir() / constants.PackageJson.PATH
|
|
89
|
-
last_hash =
|
|
166
|
+
last_content, last_hash = get_package_json_and_hash(json_file_path)
|
|
90
167
|
process = None
|
|
91
168
|
first_run = True
|
|
92
169
|
|
|
@@ -105,6 +182,18 @@ def run_process_and_launch_url(
|
|
|
105
182
|
frontend_process = process
|
|
106
183
|
if process.stdout:
|
|
107
184
|
for line in processes.stream_logs("Starting frontend", process):
|
|
185
|
+
new_content, new_hash = get_package_json_and_hash(json_file_path)
|
|
186
|
+
if new_hash != last_hash:
|
|
187
|
+
dependencies_change, dev_dependencies_change = (
|
|
188
|
+
get_different_packages(last_content, new_content)
|
|
189
|
+
)
|
|
190
|
+
last_content, last_hash = new_content, new_hash
|
|
191
|
+
console.info(
|
|
192
|
+
"Detected changes in package.json.\n"
|
|
193
|
+
+ format_change("Dependencies", dependencies_change)
|
|
194
|
+
+ format_change("Dev Dependencies", dev_dependencies_change)
|
|
195
|
+
)
|
|
196
|
+
|
|
108
197
|
match = re.search(constants.Next.FRONTEND_LISTENING_REGEX, line)
|
|
109
198
|
if match:
|
|
110
199
|
if first_run:
|
|
@@ -119,22 +208,8 @@ def run_process_and_launch_url(
|
|
|
119
208
|
notify_backend()
|
|
120
209
|
first_run = False
|
|
121
210
|
else:
|
|
122
|
-
console.print("
|
|
123
|
-
|
|
124
|
-
if any(
|
|
125
|
-
x in line for x in ("bin executable does not exist on disk",)
|
|
126
|
-
):
|
|
127
|
-
console.error(
|
|
128
|
-
"Try setting `REFLEX_USE_NPM=1` and re-running `reflex init` and `reflex run` to use npm instead of bun:\n"
|
|
129
|
-
"`REFLEX_USE_NPM=1 reflex init`\n"
|
|
130
|
-
"`REFLEX_USE_NPM=1 reflex run`"
|
|
131
|
-
)
|
|
132
|
-
new_hash = detect_package_change(json_file_path)
|
|
133
|
-
if new_hash != last_hash:
|
|
134
|
-
last_hash = new_hash
|
|
135
|
-
kill(process.pid)
|
|
136
|
-
process = None
|
|
137
|
-
break # for line in process.stdout
|
|
211
|
+
console.print("Frontend is restarting...")
|
|
212
|
+
|
|
138
213
|
if process is not None:
|
|
139
214
|
break # while True
|
|
140
215
|
|
reflex/utils/telemetry.py
CHANGED
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import dataclasses
|
|
7
|
+
import importlib.metadata
|
|
7
8
|
import multiprocessing
|
|
8
9
|
import platform
|
|
9
10
|
import warnings
|
|
@@ -76,6 +77,18 @@ def get_cpu_count() -> int:
|
|
|
76
77
|
return multiprocessing.cpu_count()
|
|
77
78
|
|
|
78
79
|
|
|
80
|
+
def get_reflex_enterprise_version() -> str | None:
|
|
81
|
+
"""Get the version of reflex-enterprise if installed.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
The version string if installed, None if not installed.
|
|
85
|
+
"""
|
|
86
|
+
try:
|
|
87
|
+
return importlib.metadata.version("reflex-enterprise")
|
|
88
|
+
except importlib.metadata.PackageNotFoundError:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
|
|
79
92
|
def get_memory() -> int:
|
|
80
93
|
"""Get the total memory in MB.
|
|
81
94
|
|
|
@@ -113,6 +126,7 @@ class _Properties(TypedDict):
|
|
|
113
126
|
python_version: str
|
|
114
127
|
node_version: str | None
|
|
115
128
|
bun_version: str | None
|
|
129
|
+
reflex_enterprise_version: str | None
|
|
116
130
|
cpu_count: int
|
|
117
131
|
memory: int
|
|
118
132
|
cpu_info: dict
|
|
@@ -166,6 +180,7 @@ def _get_event_defaults() -> _DefaultEvent | None:
|
|
|
166
180
|
"bun_version": (
|
|
167
181
|
str(bun_version) if (bun_version := get_bun_version()) else None
|
|
168
182
|
),
|
|
183
|
+
"reflex_enterprise_version": get_reflex_enterprise_version(),
|
|
169
184
|
"cpu_count": get_cpu_count(),
|
|
170
185
|
"memory": get_memory(),
|
|
171
186
|
"cpu_info": dataclasses.asdict(cpuinfo) if cpuinfo else {},
|
|
@@ -5,7 +5,7 @@ reflex/admin.py,sha256=Nbc38y-M8iaRBvh1W6DQu_D3kEhO8JFvxrog4q2cB_E,434
|
|
|
5
5
|
reflex/app.py,sha256=Mx6veYacVvql7qMYfsEbucfs3CuIWDtI5w8HSbTbteU,77041
|
|
6
6
|
reflex/assets.py,sha256=LdojI9E_PrJr2IlqpZMOOCOPg5cmccS0pBwYHZcqaig,3426
|
|
7
7
|
reflex/base.py,sha256=GYu-PvZ28BVRfnivcAh7s0QiqzxhlDkcugTI4dPMShc,3901
|
|
8
|
-
reflex/config.py,sha256=
|
|
8
|
+
reflex/config.py,sha256=Fsg_Vovs1JaKoBr6yuTDzcDAa4gp54NK4D6pTT7iDp0,38624
|
|
9
9
|
reflex/event.py,sha256=D-sdpUoz3cGI5FtzM5RGYZSPHhwkql4S1_F4Or4SYDM,67009
|
|
10
10
|
reflex/model.py,sha256=W46HaCi0xJjdBcwiOAAu5XX9uzwrF82P8LN0hxwffH8,17616
|
|
11
11
|
reflex/page.py,sha256=mqioadLDsABvfNqdLbxvUKqi1gulSKddMihZe3pjtdc,2678
|
|
@@ -61,7 +61,7 @@ reflex/compiler/templates.py,sha256=SKFIJtL_ozEvEHhiMj34tBwBN1CWSYy_-VzlojZMG44,
|
|
|
61
61
|
reflex/compiler/utils.py,sha256=NYvNedrkqoh8i86QL8tOjFZ60JabOM1wBXNkY1ORtiQ,16549
|
|
62
62
|
reflex/components/__init__.py,sha256=zbIXThv1WPI0FdIGf9G9RAmGoCRoGy7nHcSZ8K5D5bA,624
|
|
63
63
|
reflex/components/__init__.pyi,sha256=qoj1zIWaitcZOGcJ6k7wuGJk_GAJCE9Xtx8CeRVrvoE,861
|
|
64
|
-
reflex/components/component.py,sha256=
|
|
64
|
+
reflex/components/component.py,sha256=5bnI90s6EINL8ls_HlcMLaj-t26ABn01P7QEX_sGaIU,99015
|
|
65
65
|
reflex/components/dynamic.py,sha256=rDPSyoeAWAe7pxA9ZpuamKfBispOrxR-Y2DP8KfwRq8,7404
|
|
66
66
|
reflex/components/literals.py,sha256=hogLnwTJxFJODIvqihg-GD9kFZVsEBDoYzaRit56Nuk,501
|
|
67
67
|
reflex/components/props.py,sha256=pte-hBXbwsvB2fS7vYtiyxbHWlWYcDNg8baCfDaOvBE,2699
|
|
@@ -353,7 +353,6 @@ reflex/experimental/__init__.py,sha256=Yi4enE5vry3oHSpCZQX9FKUmchu6t8xL1_ue1ZZz8
|
|
|
353
353
|
reflex/experimental/client_state.py,sha256=1VOe6rYhpOBOZi7-tZwfOnSNPPdX3tsXzlfgNs7aDrg,10020
|
|
354
354
|
reflex/experimental/hooks.py,sha256=CHYGrAE5t8riltrJmDFgJ4D2Vhmhw-y3B3MSGNlOQow,2366
|
|
355
355
|
reflex/experimental/layout.py,sha256=IzyAu_M121IYsrsnctiXFbeXInVvKKb4GuyFJKXcJnQ,7533
|
|
356
|
-
reflex/experimental/layout.pyi,sha256=3v3xo3THcNwKv3IximCSDnItfywzuKNxjrauO2g2Ezw,25049
|
|
357
356
|
reflex/istate/__init__.py,sha256=LDu_3-31ZI1Jn9NWp4mM0--fDiXI0x8x3gR4-kdrziY,57
|
|
358
357
|
reflex/istate/data.py,sha256=igpPEXs_ZJvK7J3JJ1mLiKnLmS5iFJiMLesCaQZpgqs,5798
|
|
359
358
|
reflex/istate/dynamic.py,sha256=xOQ9upZVPf6ngqcLQZ9HdAAYmoWwJ8kRFPH34Q5HTiM,91
|
|
@@ -372,10 +371,10 @@ reflex/utils/__init__.py,sha256=y-AHKiRQAhk2oAkvn7W8cRVTZVK625ff8tTwvZtO7S4,24
|
|
|
372
371
|
reflex/utils/build.py,sha256=HvIRNdIx6TJ1qml0SjOMxv0pNLWhlViQSXsxg7bOsBo,9189
|
|
373
372
|
reflex/utils/codespaces.py,sha256=kEQ-j-jclTukFpXDlYgNp95kYMGDrQmP3VNEoYGZ1u4,3052
|
|
374
373
|
reflex/utils/compat.py,sha256=aSJH_M6iomgHPQ4onQ153xh1MWqPi3HSYDzE68N6gZM,2635
|
|
375
|
-
reflex/utils/console.py,sha256=
|
|
374
|
+
reflex/utils/console.py,sha256=dnNjnVdE2OWpRLH1xppVl3USFQk45zQP7Hb_0jQzKW4,11490
|
|
376
375
|
reflex/utils/decorator.py,sha256=DVrlVGljV5OchMs-5_y1CbbqnCWlH6lv-dFko8yHxVY,1738
|
|
377
376
|
reflex/utils/exceptions.py,sha256=Wwu7Ji2xgq521bJKtU2NgjwhmFfnG8erirEVN2h8S-g,8884
|
|
378
|
-
reflex/utils/exec.py,sha256=
|
|
377
|
+
reflex/utils/exec.py,sha256=4SmsjSJWA_HU80E-5zq2VWY6b3cgmzCmiQUCy-eIjXY,23143
|
|
379
378
|
reflex/utils/export.py,sha256=eRAVmXyOfCjaL0g4YwWy9f48YT21tfKtd8Evt37_sRY,2567
|
|
380
379
|
reflex/utils/format.py,sha256=TGPrbqByYMkUjXgFatk_UvMy4tMP8ByzVYvOB7Z6-Xo,21302
|
|
381
380
|
reflex/utils/imports.py,sha256=VpaIEq-_y8RzX4mzqPy4w5QfW7I3daPFFgI6n3tnAEI,4073
|
|
@@ -389,7 +388,7 @@ reflex/utils/pyi_generator.py,sha256=XA5V-Qdey45mjOt4FgrHrbxkUPTD3OsfBjLJHCmatRU
|
|
|
389
388
|
reflex/utils/redir.py,sha256=3JG0cRdfIZnFIBHHN32ynD5cfbUZa7gLRxzrxRGGl5I,1751
|
|
390
389
|
reflex/utils/registry.py,sha256=ymBScatt5YiQz9tPYHCzSPs-X7z29hGuu2tlZG28YDQ,1877
|
|
391
390
|
reflex/utils/serializers.py,sha256=HPxHb-5ytO25vq4tAa600OiVDhx_c6p_oHku2L3x6jc,13637
|
|
392
|
-
reflex/utils/telemetry.py,sha256=
|
|
391
|
+
reflex/utils/telemetry.py,sha256=TNWtUYkjaquDYLNdqTRpgsRPtXhthWiSlaV9uSSKctI,7755
|
|
393
392
|
reflex/utils/types.py,sha256=TiZokWTgNgmpH2zY0vVj7-hoJzDi0UtBNoL-VBLjNPQ,34604
|
|
394
393
|
reflex/vars/__init__.py,sha256=2Kv6Oh9g3ISZFESjL1al8KiO7QBZUXmLKGMCBsP-DoY,1243
|
|
395
394
|
reflex/vars/base.py,sha256=ZcGGnA7xJtPJhy60R0qZGE1Df_l7vOp51EMbLZdiHXg,104529
|
|
@@ -400,8 +399,8 @@ reflex/vars/number.py,sha256=tO7pnvFaBsedq1HWT4skytnSqHWMluGEhUbjAUMx8XQ,28190
|
|
|
400
399
|
reflex/vars/object.py,sha256=BDmeiwG8v97s_BnR1Egq3NxOKVjv9TfnREB3cz0zZtk,17322
|
|
401
400
|
reflex/vars/sequence.py,sha256=1kBrqihspyjyQ1XDqFPC8OpVGtZs_EVkOdIKBro5ilA,55249
|
|
402
401
|
scripts/hatch_build.py,sha256=-4pxcLSFmirmujGpQX9UUxjhIC03tQ_fIQwVbHu9kc0,1861
|
|
403
|
-
reflex-0.7.
|
|
404
|
-
reflex-0.7.
|
|
405
|
-
reflex-0.7.
|
|
406
|
-
reflex-0.7.
|
|
407
|
-
reflex-0.7.
|
|
402
|
+
reflex-0.7.14a3.dist-info/METADATA,sha256=krRaYBZ28on2xKqIgaJ4EjGImveu97X1DuFIRD1-VXQ,11837
|
|
403
|
+
reflex-0.7.14a3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
404
|
+
reflex-0.7.14a3.dist-info/entry_points.txt,sha256=Rxt4dXc7MLBNt5CSHTehVPuSe9Xqow4HLX55nD9tQQ0,45
|
|
405
|
+
reflex-0.7.14a3.dist-info/licenses/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
406
|
+
reflex-0.7.14a3.dist-info/RECORD,,
|
reflex/experimental/layout.pyi
DELETED
|
@@ -1,814 +0,0 @@
|
|
|
1
|
-
"""Stub file for reflex/experimental/layout.py"""
|
|
2
|
-
|
|
3
|
-
# ------------------- DO NOT EDIT ----------------------
|
|
4
|
-
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
|
-
# ------------------------------------------------------
|
|
6
|
-
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any, Literal, overload
|
|
8
|
-
|
|
9
|
-
from reflex import color
|
|
10
|
-
from reflex.components.base.fragment import Fragment
|
|
11
|
-
from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
|
|
12
|
-
from reflex.components.core.breakpoints import Breakpoints
|
|
13
|
-
from reflex.components.radix.primitives.drawer import DrawerRoot
|
|
14
|
-
from reflex.components.radix.themes.layout.box import Box
|
|
15
|
-
from reflex.event import EventType
|
|
16
|
-
from reflex.state import ComponentState
|
|
17
|
-
from reflex.vars.base import Var
|
|
18
|
-
|
|
19
|
-
class Sidebar(Box, MemoizationLeaf):
|
|
20
|
-
@overload
|
|
21
|
-
@classmethod
|
|
22
|
-
def create( # type: ignore
|
|
23
|
-
cls,
|
|
24
|
-
*children,
|
|
25
|
-
access_key: Var[str] | str | None = None,
|
|
26
|
-
auto_capitalize: Literal[
|
|
27
|
-
"characters", "none", "off", "on", "sentences", "words"
|
|
28
|
-
]
|
|
29
|
-
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
30
|
-
| None = None,
|
|
31
|
-
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
32
|
-
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
33
|
-
| None = None,
|
|
34
|
-
context_menu: Var[str] | str | None = None,
|
|
35
|
-
dir: Var[str] | str | None = None,
|
|
36
|
-
draggable: Var[bool] | bool | None = None,
|
|
37
|
-
enter_key_hint: Literal[
|
|
38
|
-
"done", "enter", "go", "next", "previous", "search", "send"
|
|
39
|
-
]
|
|
40
|
-
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
41
|
-
| None = None,
|
|
42
|
-
hidden: Var[bool] | bool | None = None,
|
|
43
|
-
input_mode: Literal[
|
|
44
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
45
|
-
]
|
|
46
|
-
| Var[
|
|
47
|
-
Literal[
|
|
48
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
49
|
-
]
|
|
50
|
-
]
|
|
51
|
-
| None = None,
|
|
52
|
-
item_prop: Var[str] | str | None = None,
|
|
53
|
-
lang: Var[str] | str | None = None,
|
|
54
|
-
role: Literal[
|
|
55
|
-
"alert",
|
|
56
|
-
"alertdialog",
|
|
57
|
-
"application",
|
|
58
|
-
"article",
|
|
59
|
-
"banner",
|
|
60
|
-
"button",
|
|
61
|
-
"cell",
|
|
62
|
-
"checkbox",
|
|
63
|
-
"columnheader",
|
|
64
|
-
"combobox",
|
|
65
|
-
"complementary",
|
|
66
|
-
"contentinfo",
|
|
67
|
-
"definition",
|
|
68
|
-
"dialog",
|
|
69
|
-
"directory",
|
|
70
|
-
"document",
|
|
71
|
-
"feed",
|
|
72
|
-
"figure",
|
|
73
|
-
"form",
|
|
74
|
-
"grid",
|
|
75
|
-
"gridcell",
|
|
76
|
-
"group",
|
|
77
|
-
"heading",
|
|
78
|
-
"img",
|
|
79
|
-
"link",
|
|
80
|
-
"list",
|
|
81
|
-
"listbox",
|
|
82
|
-
"listitem",
|
|
83
|
-
"log",
|
|
84
|
-
"main",
|
|
85
|
-
"marquee",
|
|
86
|
-
"math",
|
|
87
|
-
"menu",
|
|
88
|
-
"menubar",
|
|
89
|
-
"menuitem",
|
|
90
|
-
"menuitemcheckbox",
|
|
91
|
-
"menuitemradio",
|
|
92
|
-
"navigation",
|
|
93
|
-
"none",
|
|
94
|
-
"note",
|
|
95
|
-
"option",
|
|
96
|
-
"presentation",
|
|
97
|
-
"progressbar",
|
|
98
|
-
"radio",
|
|
99
|
-
"radiogroup",
|
|
100
|
-
"region",
|
|
101
|
-
"row",
|
|
102
|
-
"rowgroup",
|
|
103
|
-
"rowheader",
|
|
104
|
-
"scrollbar",
|
|
105
|
-
"search",
|
|
106
|
-
"searchbox",
|
|
107
|
-
"separator",
|
|
108
|
-
"slider",
|
|
109
|
-
"spinbutton",
|
|
110
|
-
"status",
|
|
111
|
-
"switch",
|
|
112
|
-
"tab",
|
|
113
|
-
"table",
|
|
114
|
-
"tablist",
|
|
115
|
-
"tabpanel",
|
|
116
|
-
"term",
|
|
117
|
-
"textbox",
|
|
118
|
-
"timer",
|
|
119
|
-
"toolbar",
|
|
120
|
-
"tooltip",
|
|
121
|
-
"tree",
|
|
122
|
-
"treegrid",
|
|
123
|
-
"treeitem",
|
|
124
|
-
]
|
|
125
|
-
| Var[
|
|
126
|
-
Literal[
|
|
127
|
-
"alert",
|
|
128
|
-
"alertdialog",
|
|
129
|
-
"application",
|
|
130
|
-
"article",
|
|
131
|
-
"banner",
|
|
132
|
-
"button",
|
|
133
|
-
"cell",
|
|
134
|
-
"checkbox",
|
|
135
|
-
"columnheader",
|
|
136
|
-
"combobox",
|
|
137
|
-
"complementary",
|
|
138
|
-
"contentinfo",
|
|
139
|
-
"definition",
|
|
140
|
-
"dialog",
|
|
141
|
-
"directory",
|
|
142
|
-
"document",
|
|
143
|
-
"feed",
|
|
144
|
-
"figure",
|
|
145
|
-
"form",
|
|
146
|
-
"grid",
|
|
147
|
-
"gridcell",
|
|
148
|
-
"group",
|
|
149
|
-
"heading",
|
|
150
|
-
"img",
|
|
151
|
-
"link",
|
|
152
|
-
"list",
|
|
153
|
-
"listbox",
|
|
154
|
-
"listitem",
|
|
155
|
-
"log",
|
|
156
|
-
"main",
|
|
157
|
-
"marquee",
|
|
158
|
-
"math",
|
|
159
|
-
"menu",
|
|
160
|
-
"menubar",
|
|
161
|
-
"menuitem",
|
|
162
|
-
"menuitemcheckbox",
|
|
163
|
-
"menuitemradio",
|
|
164
|
-
"navigation",
|
|
165
|
-
"none",
|
|
166
|
-
"note",
|
|
167
|
-
"option",
|
|
168
|
-
"presentation",
|
|
169
|
-
"progressbar",
|
|
170
|
-
"radio",
|
|
171
|
-
"radiogroup",
|
|
172
|
-
"region",
|
|
173
|
-
"row",
|
|
174
|
-
"rowgroup",
|
|
175
|
-
"rowheader",
|
|
176
|
-
"scrollbar",
|
|
177
|
-
"search",
|
|
178
|
-
"searchbox",
|
|
179
|
-
"separator",
|
|
180
|
-
"slider",
|
|
181
|
-
"spinbutton",
|
|
182
|
-
"status",
|
|
183
|
-
"switch",
|
|
184
|
-
"tab",
|
|
185
|
-
"table",
|
|
186
|
-
"tablist",
|
|
187
|
-
"tabpanel",
|
|
188
|
-
"term",
|
|
189
|
-
"textbox",
|
|
190
|
-
"timer",
|
|
191
|
-
"toolbar",
|
|
192
|
-
"tooltip",
|
|
193
|
-
"tree",
|
|
194
|
-
"treegrid",
|
|
195
|
-
"treeitem",
|
|
196
|
-
]
|
|
197
|
-
]
|
|
198
|
-
| None = None,
|
|
199
|
-
slot: Var[str] | str | None = None,
|
|
200
|
-
spell_check: Var[bool] | bool | None = None,
|
|
201
|
-
tab_index: Var[int] | int | None = None,
|
|
202
|
-
title: Var[str] | str | None = None,
|
|
203
|
-
style: Sequence[Mapping[str, Any]]
|
|
204
|
-
| Mapping[str, Any]
|
|
205
|
-
| Var[Mapping[str, Any]]
|
|
206
|
-
| Breakpoints
|
|
207
|
-
| None = None,
|
|
208
|
-
key: Any | None = None,
|
|
209
|
-
id: Any | None = None,
|
|
210
|
-
ref: Var | None = None,
|
|
211
|
-
class_name: Any | None = None,
|
|
212
|
-
autofocus: bool | None = None,
|
|
213
|
-
custom_attrs: dict[str, Var | Any] | None = None,
|
|
214
|
-
on_blur: EventType[()] | None = None,
|
|
215
|
-
on_click: EventType[()] | None = None,
|
|
216
|
-
on_context_menu: EventType[()] | None = None,
|
|
217
|
-
on_double_click: EventType[()] | None = None,
|
|
218
|
-
on_focus: EventType[()] | None = None,
|
|
219
|
-
on_mount: EventType[()] | None = None,
|
|
220
|
-
on_mouse_down: EventType[()] | None = None,
|
|
221
|
-
on_mouse_enter: EventType[()] | None = None,
|
|
222
|
-
on_mouse_leave: EventType[()] | None = None,
|
|
223
|
-
on_mouse_move: EventType[()] | None = None,
|
|
224
|
-
on_mouse_out: EventType[()] | None = None,
|
|
225
|
-
on_mouse_over: EventType[()] | None = None,
|
|
226
|
-
on_mouse_up: EventType[()] | None = None,
|
|
227
|
-
on_scroll: EventType[()] | None = None,
|
|
228
|
-
on_unmount: EventType[()] | None = None,
|
|
229
|
-
**props,
|
|
230
|
-
) -> Sidebar:
|
|
231
|
-
"""Create the sidebar component.
|
|
232
|
-
|
|
233
|
-
Args:
|
|
234
|
-
children: The children components.
|
|
235
|
-
props: The properties of the sidebar.
|
|
236
|
-
|
|
237
|
-
Returns:
|
|
238
|
-
The sidebar component.
|
|
239
|
-
"""
|
|
240
|
-
|
|
241
|
-
def add_style(self) -> dict[str, Any] | None: ...
|
|
242
|
-
def add_hooks(self) -> list[Var]: ...
|
|
243
|
-
|
|
244
|
-
class StatefulSidebar(ComponentState):
|
|
245
|
-
open: bool
|
|
246
|
-
|
|
247
|
-
def toggle(self): ...
|
|
248
|
-
@classmethod
|
|
249
|
-
def get_component(cls, *children, **props): ...
|
|
250
|
-
|
|
251
|
-
class DrawerSidebar(DrawerRoot):
|
|
252
|
-
@overload
|
|
253
|
-
@classmethod
|
|
254
|
-
def create( # type: ignore
|
|
255
|
-
cls,
|
|
256
|
-
*children,
|
|
257
|
-
default_open: Var[bool] | bool | None = None,
|
|
258
|
-
open: Var[bool] | bool | None = None,
|
|
259
|
-
modal: Var[bool] | bool | None = None,
|
|
260
|
-
direction: Literal["bottom", "left", "right", "top"]
|
|
261
|
-
| Var[Literal["bottom", "left", "right", "top"]]
|
|
262
|
-
| None = None,
|
|
263
|
-
dismissible: Var[bool] | bool | None = None,
|
|
264
|
-
handle_only: Var[bool] | bool | None = None,
|
|
265
|
-
snap_points: Sequence[float | str] | None = None,
|
|
266
|
-
fade_from_index: Var[int] | int | None = None,
|
|
267
|
-
scroll_lock_timeout: Var[int] | int | None = None,
|
|
268
|
-
prevent_scroll_restoration: Var[bool] | bool | None = None,
|
|
269
|
-
should_scale_background: Var[bool] | bool | None = None,
|
|
270
|
-
close_threshold: Var[float] | float | None = None,
|
|
271
|
-
as_child: Var[bool] | bool | None = None,
|
|
272
|
-
style: Sequence[Mapping[str, Any]]
|
|
273
|
-
| Mapping[str, Any]
|
|
274
|
-
| Var[Mapping[str, Any]]
|
|
275
|
-
| Breakpoints
|
|
276
|
-
| None = None,
|
|
277
|
-
key: Any | None = None,
|
|
278
|
-
id: Any | None = None,
|
|
279
|
-
ref: Var | None = None,
|
|
280
|
-
class_name: Any | None = None,
|
|
281
|
-
autofocus: bool | None = None,
|
|
282
|
-
custom_attrs: dict[str, Var | Any] | None = None,
|
|
283
|
-
on_animation_end: EventType[()] | EventType[bool] | None = None,
|
|
284
|
-
on_blur: EventType[()] | None = None,
|
|
285
|
-
on_click: EventType[()] | None = None,
|
|
286
|
-
on_context_menu: EventType[()] | None = None,
|
|
287
|
-
on_double_click: EventType[()] | None = None,
|
|
288
|
-
on_focus: EventType[()] | None = None,
|
|
289
|
-
on_mount: EventType[()] | None = None,
|
|
290
|
-
on_mouse_down: EventType[()] | None = None,
|
|
291
|
-
on_mouse_enter: EventType[()] | None = None,
|
|
292
|
-
on_mouse_leave: EventType[()] | None = None,
|
|
293
|
-
on_mouse_move: EventType[()] | None = None,
|
|
294
|
-
on_mouse_out: EventType[()] | None = None,
|
|
295
|
-
on_mouse_over: EventType[()] | None = None,
|
|
296
|
-
on_mouse_up: EventType[()] | None = None,
|
|
297
|
-
on_open_change: EventType[()] | EventType[bool] | None = None,
|
|
298
|
-
on_scroll: EventType[()] | None = None,
|
|
299
|
-
on_unmount: EventType[()] | None = None,
|
|
300
|
-
**props,
|
|
301
|
-
) -> DrawerSidebar:
|
|
302
|
-
"""Create the sidebar component.
|
|
303
|
-
|
|
304
|
-
Args:
|
|
305
|
-
children: The children components.
|
|
306
|
-
props: The properties of the sidebar.
|
|
307
|
-
|
|
308
|
-
Returns:
|
|
309
|
-
The drawer sidebar component.
|
|
310
|
-
"""
|
|
311
|
-
|
|
312
|
-
sidebar_trigger_style = {
|
|
313
|
-
"position": "fixed",
|
|
314
|
-
"z_index": "15",
|
|
315
|
-
"color": color("accent", 12),
|
|
316
|
-
"background_color": "transparent",
|
|
317
|
-
"padding": "0",
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
class SidebarTrigger(Fragment):
|
|
321
|
-
@overload
|
|
322
|
-
@classmethod
|
|
323
|
-
def create( # type: ignore
|
|
324
|
-
cls,
|
|
325
|
-
*children,
|
|
326
|
-
style: Sequence[Mapping[str, Any]]
|
|
327
|
-
| Mapping[str, Any]
|
|
328
|
-
| Var[Mapping[str, Any]]
|
|
329
|
-
| Breakpoints
|
|
330
|
-
| None = None,
|
|
331
|
-
key: Any | None = None,
|
|
332
|
-
id: Any | None = None,
|
|
333
|
-
ref: Var | None = None,
|
|
334
|
-
class_name: Any | None = None,
|
|
335
|
-
autofocus: bool | None = None,
|
|
336
|
-
custom_attrs: dict[str, Var | Any] | None = None,
|
|
337
|
-
on_blur: EventType[()] | None = None,
|
|
338
|
-
on_click: EventType[()] | None = None,
|
|
339
|
-
on_context_menu: EventType[()] | None = None,
|
|
340
|
-
on_double_click: EventType[()] | None = None,
|
|
341
|
-
on_focus: EventType[()] | None = None,
|
|
342
|
-
on_mount: EventType[()] | None = None,
|
|
343
|
-
on_mouse_down: EventType[()] | None = None,
|
|
344
|
-
on_mouse_enter: EventType[()] | None = None,
|
|
345
|
-
on_mouse_leave: EventType[()] | None = None,
|
|
346
|
-
on_mouse_move: EventType[()] | None = None,
|
|
347
|
-
on_mouse_out: EventType[()] | None = None,
|
|
348
|
-
on_mouse_over: EventType[()] | None = None,
|
|
349
|
-
on_mouse_up: EventType[()] | None = None,
|
|
350
|
-
on_scroll: EventType[()] | None = None,
|
|
351
|
-
on_unmount: EventType[()] | None = None,
|
|
352
|
-
**props,
|
|
353
|
-
) -> SidebarTrigger:
|
|
354
|
-
"""Create the sidebar trigger component.
|
|
355
|
-
|
|
356
|
-
Args:
|
|
357
|
-
sidebar: The sidebar component.
|
|
358
|
-
props: The properties of the sidebar trigger.
|
|
359
|
-
|
|
360
|
-
Returns:
|
|
361
|
-
The sidebar trigger component.
|
|
362
|
-
"""
|
|
363
|
-
|
|
364
|
-
class Layout(Box):
|
|
365
|
-
@overload
|
|
366
|
-
@classmethod
|
|
367
|
-
def create( # type: ignore
|
|
368
|
-
cls,
|
|
369
|
-
*children,
|
|
370
|
-
sidebar: Component | None = None,
|
|
371
|
-
access_key: Var[str] | str | None = None,
|
|
372
|
-
auto_capitalize: Literal[
|
|
373
|
-
"characters", "none", "off", "on", "sentences", "words"
|
|
374
|
-
]
|
|
375
|
-
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
376
|
-
| None = None,
|
|
377
|
-
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
378
|
-
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
379
|
-
| None = None,
|
|
380
|
-
context_menu: Var[str] | str | None = None,
|
|
381
|
-
dir: Var[str] | str | None = None,
|
|
382
|
-
draggable: Var[bool] | bool | None = None,
|
|
383
|
-
enter_key_hint: Literal[
|
|
384
|
-
"done", "enter", "go", "next", "previous", "search", "send"
|
|
385
|
-
]
|
|
386
|
-
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
387
|
-
| None = None,
|
|
388
|
-
hidden: Var[bool] | bool | None = None,
|
|
389
|
-
input_mode: Literal[
|
|
390
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
391
|
-
]
|
|
392
|
-
| Var[
|
|
393
|
-
Literal[
|
|
394
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
395
|
-
]
|
|
396
|
-
]
|
|
397
|
-
| None = None,
|
|
398
|
-
item_prop: Var[str] | str | None = None,
|
|
399
|
-
lang: Var[str] | str | None = None,
|
|
400
|
-
role: Literal[
|
|
401
|
-
"alert",
|
|
402
|
-
"alertdialog",
|
|
403
|
-
"application",
|
|
404
|
-
"article",
|
|
405
|
-
"banner",
|
|
406
|
-
"button",
|
|
407
|
-
"cell",
|
|
408
|
-
"checkbox",
|
|
409
|
-
"columnheader",
|
|
410
|
-
"combobox",
|
|
411
|
-
"complementary",
|
|
412
|
-
"contentinfo",
|
|
413
|
-
"definition",
|
|
414
|
-
"dialog",
|
|
415
|
-
"directory",
|
|
416
|
-
"document",
|
|
417
|
-
"feed",
|
|
418
|
-
"figure",
|
|
419
|
-
"form",
|
|
420
|
-
"grid",
|
|
421
|
-
"gridcell",
|
|
422
|
-
"group",
|
|
423
|
-
"heading",
|
|
424
|
-
"img",
|
|
425
|
-
"link",
|
|
426
|
-
"list",
|
|
427
|
-
"listbox",
|
|
428
|
-
"listitem",
|
|
429
|
-
"log",
|
|
430
|
-
"main",
|
|
431
|
-
"marquee",
|
|
432
|
-
"math",
|
|
433
|
-
"menu",
|
|
434
|
-
"menubar",
|
|
435
|
-
"menuitem",
|
|
436
|
-
"menuitemcheckbox",
|
|
437
|
-
"menuitemradio",
|
|
438
|
-
"navigation",
|
|
439
|
-
"none",
|
|
440
|
-
"note",
|
|
441
|
-
"option",
|
|
442
|
-
"presentation",
|
|
443
|
-
"progressbar",
|
|
444
|
-
"radio",
|
|
445
|
-
"radiogroup",
|
|
446
|
-
"region",
|
|
447
|
-
"row",
|
|
448
|
-
"rowgroup",
|
|
449
|
-
"rowheader",
|
|
450
|
-
"scrollbar",
|
|
451
|
-
"search",
|
|
452
|
-
"searchbox",
|
|
453
|
-
"separator",
|
|
454
|
-
"slider",
|
|
455
|
-
"spinbutton",
|
|
456
|
-
"status",
|
|
457
|
-
"switch",
|
|
458
|
-
"tab",
|
|
459
|
-
"table",
|
|
460
|
-
"tablist",
|
|
461
|
-
"tabpanel",
|
|
462
|
-
"term",
|
|
463
|
-
"textbox",
|
|
464
|
-
"timer",
|
|
465
|
-
"toolbar",
|
|
466
|
-
"tooltip",
|
|
467
|
-
"tree",
|
|
468
|
-
"treegrid",
|
|
469
|
-
"treeitem",
|
|
470
|
-
]
|
|
471
|
-
| Var[
|
|
472
|
-
Literal[
|
|
473
|
-
"alert",
|
|
474
|
-
"alertdialog",
|
|
475
|
-
"application",
|
|
476
|
-
"article",
|
|
477
|
-
"banner",
|
|
478
|
-
"button",
|
|
479
|
-
"cell",
|
|
480
|
-
"checkbox",
|
|
481
|
-
"columnheader",
|
|
482
|
-
"combobox",
|
|
483
|
-
"complementary",
|
|
484
|
-
"contentinfo",
|
|
485
|
-
"definition",
|
|
486
|
-
"dialog",
|
|
487
|
-
"directory",
|
|
488
|
-
"document",
|
|
489
|
-
"feed",
|
|
490
|
-
"figure",
|
|
491
|
-
"form",
|
|
492
|
-
"grid",
|
|
493
|
-
"gridcell",
|
|
494
|
-
"group",
|
|
495
|
-
"heading",
|
|
496
|
-
"img",
|
|
497
|
-
"link",
|
|
498
|
-
"list",
|
|
499
|
-
"listbox",
|
|
500
|
-
"listitem",
|
|
501
|
-
"log",
|
|
502
|
-
"main",
|
|
503
|
-
"marquee",
|
|
504
|
-
"math",
|
|
505
|
-
"menu",
|
|
506
|
-
"menubar",
|
|
507
|
-
"menuitem",
|
|
508
|
-
"menuitemcheckbox",
|
|
509
|
-
"menuitemradio",
|
|
510
|
-
"navigation",
|
|
511
|
-
"none",
|
|
512
|
-
"note",
|
|
513
|
-
"option",
|
|
514
|
-
"presentation",
|
|
515
|
-
"progressbar",
|
|
516
|
-
"radio",
|
|
517
|
-
"radiogroup",
|
|
518
|
-
"region",
|
|
519
|
-
"row",
|
|
520
|
-
"rowgroup",
|
|
521
|
-
"rowheader",
|
|
522
|
-
"scrollbar",
|
|
523
|
-
"search",
|
|
524
|
-
"searchbox",
|
|
525
|
-
"separator",
|
|
526
|
-
"slider",
|
|
527
|
-
"spinbutton",
|
|
528
|
-
"status",
|
|
529
|
-
"switch",
|
|
530
|
-
"tab",
|
|
531
|
-
"table",
|
|
532
|
-
"tablist",
|
|
533
|
-
"tabpanel",
|
|
534
|
-
"term",
|
|
535
|
-
"textbox",
|
|
536
|
-
"timer",
|
|
537
|
-
"toolbar",
|
|
538
|
-
"tooltip",
|
|
539
|
-
"tree",
|
|
540
|
-
"treegrid",
|
|
541
|
-
"treeitem",
|
|
542
|
-
]
|
|
543
|
-
]
|
|
544
|
-
| None = None,
|
|
545
|
-
slot: Var[str] | str | None = None,
|
|
546
|
-
spell_check: Var[bool] | bool | None = None,
|
|
547
|
-
tab_index: Var[int] | int | None = None,
|
|
548
|
-
title: Var[str] | str | None = None,
|
|
549
|
-
style: Sequence[Mapping[str, Any]]
|
|
550
|
-
| Mapping[str, Any]
|
|
551
|
-
| Var[Mapping[str, Any]]
|
|
552
|
-
| Breakpoints
|
|
553
|
-
| None = None,
|
|
554
|
-
key: Any | None = None,
|
|
555
|
-
id: Any | None = None,
|
|
556
|
-
ref: Var | None = None,
|
|
557
|
-
class_name: Any | None = None,
|
|
558
|
-
autofocus: bool | None = None,
|
|
559
|
-
custom_attrs: dict[str, Var | Any] | None = None,
|
|
560
|
-
on_blur: EventType[()] | None = None,
|
|
561
|
-
on_click: EventType[()] | None = None,
|
|
562
|
-
on_context_menu: EventType[()] | None = None,
|
|
563
|
-
on_double_click: EventType[()] | None = None,
|
|
564
|
-
on_focus: EventType[()] | None = None,
|
|
565
|
-
on_mount: EventType[()] | None = None,
|
|
566
|
-
on_mouse_down: EventType[()] | None = None,
|
|
567
|
-
on_mouse_enter: EventType[()] | None = None,
|
|
568
|
-
on_mouse_leave: EventType[()] | None = None,
|
|
569
|
-
on_mouse_move: EventType[()] | None = None,
|
|
570
|
-
on_mouse_out: EventType[()] | None = None,
|
|
571
|
-
on_mouse_over: EventType[()] | None = None,
|
|
572
|
-
on_mouse_up: EventType[()] | None = None,
|
|
573
|
-
on_scroll: EventType[()] | None = None,
|
|
574
|
-
on_unmount: EventType[()] | None = None,
|
|
575
|
-
**props,
|
|
576
|
-
) -> Layout:
|
|
577
|
-
"""Create the layout component.
|
|
578
|
-
|
|
579
|
-
Args:
|
|
580
|
-
content: The content component.
|
|
581
|
-
sidebar: The sidebar component.
|
|
582
|
-
props: The properties of the layout.
|
|
583
|
-
|
|
584
|
-
Returns:
|
|
585
|
-
The layout component.
|
|
586
|
-
"""
|
|
587
|
-
|
|
588
|
-
class LayoutNamespace(ComponentNamespace):
|
|
589
|
-
drawer_sidebar = staticmethod(DrawerSidebar.create)
|
|
590
|
-
stateful_sidebar = staticmethod(StatefulSidebar.create)
|
|
591
|
-
sidebar = staticmethod(Sidebar.create)
|
|
592
|
-
|
|
593
|
-
@staticmethod
|
|
594
|
-
def __call__(
|
|
595
|
-
*children,
|
|
596
|
-
sidebar: Component | None = None,
|
|
597
|
-
access_key: Var[str] | str | None = None,
|
|
598
|
-
auto_capitalize: Literal[
|
|
599
|
-
"characters", "none", "off", "on", "sentences", "words"
|
|
600
|
-
]
|
|
601
|
-
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
602
|
-
| None = None,
|
|
603
|
-
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
604
|
-
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
605
|
-
| None = None,
|
|
606
|
-
context_menu: Var[str] | str | None = None,
|
|
607
|
-
dir: Var[str] | str | None = None,
|
|
608
|
-
draggable: Var[bool] | bool | None = None,
|
|
609
|
-
enter_key_hint: Literal[
|
|
610
|
-
"done", "enter", "go", "next", "previous", "search", "send"
|
|
611
|
-
]
|
|
612
|
-
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
613
|
-
| None = None,
|
|
614
|
-
hidden: Var[bool] | bool | None = None,
|
|
615
|
-
input_mode: Literal[
|
|
616
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
617
|
-
]
|
|
618
|
-
| Var[
|
|
619
|
-
Literal[
|
|
620
|
-
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
621
|
-
]
|
|
622
|
-
]
|
|
623
|
-
| None = None,
|
|
624
|
-
item_prop: Var[str] | str | None = None,
|
|
625
|
-
lang: Var[str] | str | None = None,
|
|
626
|
-
role: Literal[
|
|
627
|
-
"alert",
|
|
628
|
-
"alertdialog",
|
|
629
|
-
"application",
|
|
630
|
-
"article",
|
|
631
|
-
"banner",
|
|
632
|
-
"button",
|
|
633
|
-
"cell",
|
|
634
|
-
"checkbox",
|
|
635
|
-
"columnheader",
|
|
636
|
-
"combobox",
|
|
637
|
-
"complementary",
|
|
638
|
-
"contentinfo",
|
|
639
|
-
"definition",
|
|
640
|
-
"dialog",
|
|
641
|
-
"directory",
|
|
642
|
-
"document",
|
|
643
|
-
"feed",
|
|
644
|
-
"figure",
|
|
645
|
-
"form",
|
|
646
|
-
"grid",
|
|
647
|
-
"gridcell",
|
|
648
|
-
"group",
|
|
649
|
-
"heading",
|
|
650
|
-
"img",
|
|
651
|
-
"link",
|
|
652
|
-
"list",
|
|
653
|
-
"listbox",
|
|
654
|
-
"listitem",
|
|
655
|
-
"log",
|
|
656
|
-
"main",
|
|
657
|
-
"marquee",
|
|
658
|
-
"math",
|
|
659
|
-
"menu",
|
|
660
|
-
"menubar",
|
|
661
|
-
"menuitem",
|
|
662
|
-
"menuitemcheckbox",
|
|
663
|
-
"menuitemradio",
|
|
664
|
-
"navigation",
|
|
665
|
-
"none",
|
|
666
|
-
"note",
|
|
667
|
-
"option",
|
|
668
|
-
"presentation",
|
|
669
|
-
"progressbar",
|
|
670
|
-
"radio",
|
|
671
|
-
"radiogroup",
|
|
672
|
-
"region",
|
|
673
|
-
"row",
|
|
674
|
-
"rowgroup",
|
|
675
|
-
"rowheader",
|
|
676
|
-
"scrollbar",
|
|
677
|
-
"search",
|
|
678
|
-
"searchbox",
|
|
679
|
-
"separator",
|
|
680
|
-
"slider",
|
|
681
|
-
"spinbutton",
|
|
682
|
-
"status",
|
|
683
|
-
"switch",
|
|
684
|
-
"tab",
|
|
685
|
-
"table",
|
|
686
|
-
"tablist",
|
|
687
|
-
"tabpanel",
|
|
688
|
-
"term",
|
|
689
|
-
"textbox",
|
|
690
|
-
"timer",
|
|
691
|
-
"toolbar",
|
|
692
|
-
"tooltip",
|
|
693
|
-
"tree",
|
|
694
|
-
"treegrid",
|
|
695
|
-
"treeitem",
|
|
696
|
-
]
|
|
697
|
-
| Var[
|
|
698
|
-
Literal[
|
|
699
|
-
"alert",
|
|
700
|
-
"alertdialog",
|
|
701
|
-
"application",
|
|
702
|
-
"article",
|
|
703
|
-
"banner",
|
|
704
|
-
"button",
|
|
705
|
-
"cell",
|
|
706
|
-
"checkbox",
|
|
707
|
-
"columnheader",
|
|
708
|
-
"combobox",
|
|
709
|
-
"complementary",
|
|
710
|
-
"contentinfo",
|
|
711
|
-
"definition",
|
|
712
|
-
"dialog",
|
|
713
|
-
"directory",
|
|
714
|
-
"document",
|
|
715
|
-
"feed",
|
|
716
|
-
"figure",
|
|
717
|
-
"form",
|
|
718
|
-
"grid",
|
|
719
|
-
"gridcell",
|
|
720
|
-
"group",
|
|
721
|
-
"heading",
|
|
722
|
-
"img",
|
|
723
|
-
"link",
|
|
724
|
-
"list",
|
|
725
|
-
"listbox",
|
|
726
|
-
"listitem",
|
|
727
|
-
"log",
|
|
728
|
-
"main",
|
|
729
|
-
"marquee",
|
|
730
|
-
"math",
|
|
731
|
-
"menu",
|
|
732
|
-
"menubar",
|
|
733
|
-
"menuitem",
|
|
734
|
-
"menuitemcheckbox",
|
|
735
|
-
"menuitemradio",
|
|
736
|
-
"navigation",
|
|
737
|
-
"none",
|
|
738
|
-
"note",
|
|
739
|
-
"option",
|
|
740
|
-
"presentation",
|
|
741
|
-
"progressbar",
|
|
742
|
-
"radio",
|
|
743
|
-
"radiogroup",
|
|
744
|
-
"region",
|
|
745
|
-
"row",
|
|
746
|
-
"rowgroup",
|
|
747
|
-
"rowheader",
|
|
748
|
-
"scrollbar",
|
|
749
|
-
"search",
|
|
750
|
-
"searchbox",
|
|
751
|
-
"separator",
|
|
752
|
-
"slider",
|
|
753
|
-
"spinbutton",
|
|
754
|
-
"status",
|
|
755
|
-
"switch",
|
|
756
|
-
"tab",
|
|
757
|
-
"table",
|
|
758
|
-
"tablist",
|
|
759
|
-
"tabpanel",
|
|
760
|
-
"term",
|
|
761
|
-
"textbox",
|
|
762
|
-
"timer",
|
|
763
|
-
"toolbar",
|
|
764
|
-
"tooltip",
|
|
765
|
-
"tree",
|
|
766
|
-
"treegrid",
|
|
767
|
-
"treeitem",
|
|
768
|
-
]
|
|
769
|
-
]
|
|
770
|
-
| None = None,
|
|
771
|
-
slot: Var[str] | str | None = None,
|
|
772
|
-
spell_check: Var[bool] | bool | None = None,
|
|
773
|
-
tab_index: Var[int] | int | None = None,
|
|
774
|
-
title: Var[str] | str | None = None,
|
|
775
|
-
style: Sequence[Mapping[str, Any]]
|
|
776
|
-
| Mapping[str, Any]
|
|
777
|
-
| Var[Mapping[str, Any]]
|
|
778
|
-
| Breakpoints
|
|
779
|
-
| None = None,
|
|
780
|
-
key: Any | None = None,
|
|
781
|
-
id: Any | None = None,
|
|
782
|
-
ref: Var | None = None,
|
|
783
|
-
class_name: Any | None = None,
|
|
784
|
-
autofocus: bool | None = None,
|
|
785
|
-
custom_attrs: dict[str, Var | Any] | None = None,
|
|
786
|
-
on_blur: EventType[()] | None = None,
|
|
787
|
-
on_click: EventType[()] | None = None,
|
|
788
|
-
on_context_menu: EventType[()] | None = None,
|
|
789
|
-
on_double_click: EventType[()] | None = None,
|
|
790
|
-
on_focus: EventType[()] | None = None,
|
|
791
|
-
on_mount: EventType[()] | None = None,
|
|
792
|
-
on_mouse_down: EventType[()] | None = None,
|
|
793
|
-
on_mouse_enter: EventType[()] | None = None,
|
|
794
|
-
on_mouse_leave: EventType[()] | None = None,
|
|
795
|
-
on_mouse_move: EventType[()] | None = None,
|
|
796
|
-
on_mouse_out: EventType[()] | None = None,
|
|
797
|
-
on_mouse_over: EventType[()] | None = None,
|
|
798
|
-
on_mouse_up: EventType[()] | None = None,
|
|
799
|
-
on_scroll: EventType[()] | None = None,
|
|
800
|
-
on_unmount: EventType[()] | None = None,
|
|
801
|
-
**props,
|
|
802
|
-
) -> Layout:
|
|
803
|
-
"""Create the layout component.
|
|
804
|
-
|
|
805
|
-
Args:
|
|
806
|
-
content: The content component.
|
|
807
|
-
sidebar: The sidebar component.
|
|
808
|
-
props: The properties of the layout.
|
|
809
|
-
|
|
810
|
-
Returns:
|
|
811
|
-
The layout component.
|
|
812
|
-
"""
|
|
813
|
-
|
|
814
|
-
layout = LayoutNamespace()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|