reflex 0.8.0a4__py3-none-any.whl → 0.8.0a6__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/.templates/jinja/web/pages/_app.js.jinja2 +1 -1
- reflex/.templates/jinja/web/styles/styles.css.jinja2 +1 -0
- reflex/.templates/web/app/routes.js +3 -3
- reflex/.templates/web/utils/client_side_routing.js +1 -1
- reflex/.templates/web/utils/state.js +110 -52
- reflex/__init__.pyi +327 -188
- reflex/app.py +50 -48
- reflex/compiler/compiler.py +6 -2
- reflex/compiler/utils.py +32 -14
- reflex/components/__init__.pyi +34 -15
- reflex/components/base/__init__.pyi +30 -19
- reflex/components/base/app_wrap.pyi +2 -3
- reflex/components/base/body.pyi +2 -3
- reflex/components/base/document.pyi +7 -13
- reflex/components/base/error_boundary.pyi +2 -3
- reflex/components/base/fragment.pyi +2 -3
- reflex/components/base/link.pyi +3 -5
- reflex/components/base/meta.py +4 -15
- reflex/components/base/meta.pyi +14 -18
- reflex/components/base/script.pyi +2 -3
- reflex/components/base/strict_mode.pyi +2 -3
- reflex/components/core/__init__.pyi +77 -38
- reflex/components/core/auto_scroll.pyi +2 -3
- reflex/components/core/banner.pyi +8 -14
- reflex/components/core/client_side_routing.pyi +2 -3
- reflex/components/core/clipboard.pyi +2 -3
- reflex/components/core/debounce.pyi +2 -3
- reflex/components/core/foreach.py +2 -2
- reflex/components/core/helmet.pyi +2 -3
- reflex/components/core/html.pyi +2 -3
- reflex/components/core/match.py +3 -3
- reflex/components/core/sticky.pyi +4 -7
- reflex/components/core/upload.py +2 -1
- reflex/components/core/upload.pyi +5 -9
- reflex/components/datadisplay/__init__.pyi +13 -7
- reflex/components/datadisplay/code.py +12 -7
- reflex/components/datadisplay/code.pyi +2 -3
- reflex/components/datadisplay/dataeditor.pyi +33 -11
- reflex/components/datadisplay/shiki_code_block.py +5 -3
- reflex/components/datadisplay/shiki_code_block.pyi +3 -5
- reflex/components/el/__init__.pyi +506 -246
- reflex/components/el/element.pyi +2 -3
- reflex/components/el/elements/__init__.pyi +504 -245
- reflex/components/el/elements/base.pyi +2 -3
- reflex/components/el/elements/forms.pyi +77 -49
- reflex/components/el/elements/inline.pyi +29 -57
- reflex/components/el/elements/media.pyi +26 -51
- reflex/components/el/elements/metadata.pyi +7 -13
- reflex/components/el/elements/other.pyi +8 -15
- reflex/components/el/elements/scripts.pyi +4 -7
- reflex/components/el/elements/sectioning.pyi +16 -31
- reflex/components/el/elements/tables.pyi +11 -21
- reflex/components/el/elements/typography.pyi +16 -31
- reflex/components/gridjs/datatable.pyi +3 -5
- reflex/components/lucide/icon.pyi +4 -7
- reflex/components/markdown/markdown.py +5 -3
- reflex/components/markdown/markdown.pyi +2 -3
- reflex/components/moment/moment.py +1 -1
- reflex/components/moment/moment.pyi +2 -3
- reflex/components/plotly/plotly.py +12 -6
- reflex/components/plotly/plotly.pyi +31 -39
- reflex/components/radix/__init__.pyi +123 -65
- reflex/components/radix/primitives/__init__.pyi +6 -4
- reflex/components/radix/primitives/accordion.pyi +8 -15
- reflex/components/radix/primitives/base.pyi +3 -5
- reflex/components/radix/primitives/drawer.pyi +11 -21
- reflex/components/radix/primitives/form.pyi +22 -22
- reflex/components/radix/primitives/progress.pyi +5 -9
- reflex/components/radix/primitives/slider.pyi +6 -11
- reflex/components/radix/themes/__init__.pyi +5 -6
- reflex/components/radix/themes/base.pyi +9 -17
- reflex/components/radix/themes/color_mode.py +5 -6
- reflex/components/radix/themes/color_mode.pyi +4 -7
- reflex/components/radix/themes/components/__init__.pyi +75 -38
- reflex/components/radix/themes/components/alert_dialog.pyi +8 -15
- reflex/components/radix/themes/components/aspect_ratio.pyi +2 -3
- reflex/components/radix/themes/components/avatar.pyi +2 -3
- reflex/components/radix/themes/components/badge.pyi +2 -3
- reflex/components/radix/themes/components/button.pyi +2 -3
- reflex/components/radix/themes/components/callout.pyi +5 -9
- reflex/components/radix/themes/components/card.pyi +2 -3
- reflex/components/radix/themes/components/checkbox.pyi +3 -5
- reflex/components/radix/themes/components/checkbox_cards.pyi +3 -5
- reflex/components/radix/themes/components/checkbox_group.pyi +3 -5
- reflex/components/radix/themes/components/context_menu.pyi +14 -27
- reflex/components/radix/themes/components/data_list.pyi +5 -9
- reflex/components/radix/themes/components/dialog.pyi +7 -13
- reflex/components/radix/themes/components/dropdown_menu.pyi +9 -17
- reflex/components/radix/themes/components/hover_card.pyi +4 -7
- reflex/components/radix/themes/components/icon_button.pyi +2 -3
- reflex/components/radix/themes/components/inset.pyi +2 -3
- reflex/components/radix/themes/components/popover.pyi +5 -9
- reflex/components/radix/themes/components/progress.pyi +2 -3
- reflex/components/radix/themes/components/radio.pyi +2 -3
- reflex/components/radix/themes/components/radio_cards.pyi +3 -5
- reflex/components/radix/themes/components/radio_group.pyi +4 -7
- reflex/components/radix/themes/components/scroll_area.pyi +2 -3
- reflex/components/radix/themes/components/segmented_control.pyi +3 -5
- reflex/components/radix/themes/components/select.pyi +9 -17
- reflex/components/radix/themes/components/separator.pyi +2 -3
- reflex/components/radix/themes/components/skeleton.pyi +2 -3
- reflex/components/radix/themes/components/slider.pyi +12 -5
- reflex/components/radix/themes/components/spinner.pyi +2 -3
- reflex/components/radix/themes/components/switch.pyi +2 -3
- reflex/components/radix/themes/components/table.pyi +8 -15
- reflex/components/radix/themes/components/tabs.pyi +5 -9
- reflex/components/radix/themes/components/text_area.pyi +10 -5
- reflex/components/radix/themes/components/text_field.pyi +19 -9
- reflex/components/radix/themes/components/tooltip.pyi +2 -3
- reflex/components/radix/themes/layout/__init__.pyi +27 -14
- reflex/components/radix/themes/layout/base.pyi +2 -3
- reflex/components/radix/themes/layout/box.pyi +2 -3
- reflex/components/radix/themes/layout/center.pyi +2 -3
- reflex/components/radix/themes/layout/container.pyi +2 -3
- reflex/components/radix/themes/layout/flex.pyi +2 -3
- reflex/components/radix/themes/layout/grid.pyi +2 -3
- reflex/components/radix/themes/layout/list.pyi +5 -9
- reflex/components/radix/themes/layout/section.pyi +2 -3
- reflex/components/radix/themes/layout/spacer.pyi +2 -3
- reflex/components/radix/themes/layout/stack.pyi +4 -7
- reflex/components/radix/themes/typography/__init__.pyi +7 -5
- reflex/components/radix/themes/typography/blockquote.pyi +2 -3
- reflex/components/radix/themes/typography/code.pyi +2 -3
- reflex/components/radix/themes/typography/heading.pyi +2 -3
- reflex/components/radix/themes/typography/link.pyi +3 -5
- reflex/components/radix/themes/typography/text.pyi +7 -13
- reflex/components/react_player/audio.pyi +5 -4
- reflex/components/react_player/react_player.pyi +2 -3
- reflex/components/react_player/video.pyi +5 -4
- reflex/components/recharts/__init__.pyi +208 -100
- reflex/components/recharts/cartesian.py +8 -7
- reflex/components/recharts/cartesian.pyi +25 -48
- reflex/components/recharts/charts.pyi +13 -25
- reflex/components/recharts/general.pyi +7 -13
- reflex/components/recharts/polar.pyi +7 -13
- reflex/components/recharts/recharts.py +2 -2
- reflex/components/recharts/recharts.pyi +3 -5
- reflex/components/sonner/toast.py +1 -1
- reflex/components/sonner/toast.pyi +2 -3
- reflex/constants/installer.py +7 -8
- reflex/constants/route.py +13 -6
- reflex/istate/__init__.py +69 -0
- reflex/istate/manager.py +1 -0
- reflex/plugins/shared_tailwind.py +58 -1
- reflex/plugins/tailwind_v3.py +4 -4
- reflex/plugins/tailwind_v4.py +6 -5
- reflex/route.py +159 -71
- reflex/state.py +38 -16
- reflex/testing.py +2 -1
- reflex/utils/exec.py +18 -13
- reflex/utils/format.py +1 -5
- reflex/utils/imports.py +5 -12
- reflex/utils/misc.py +40 -0
- reflex/utils/prerequisites.py +7 -12
- reflex/utils/processes.py +8 -41
- reflex/utils/pyi_generator.py +23 -40
- reflex/utils/telemetry.py +0 -15
- reflex/utils/types.py +1 -1
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/METADATA +3 -3
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/RECORD +163 -163
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/WHEEL +0 -0
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/entry_points.txt +0 -0
- {reflex-0.8.0a4.dist-info → reflex-0.8.0a6.dist-info}/licenses/LICENSE +0 -0
reflex/compiler/compiler.py
CHANGED
|
@@ -37,7 +37,9 @@ def _apply_common_imports(
|
|
|
37
37
|
imports: dict[str, list[ImportVar]],
|
|
38
38
|
):
|
|
39
39
|
imports.setdefault("@emotion/react", []).append(ImportVar("jsx"))
|
|
40
|
-
imports.setdefault("react", []).
|
|
40
|
+
imports.setdefault("react", []).extend(
|
|
41
|
+
[ImportVar("Fragment"), ImportVar("useEffect")],
|
|
42
|
+
)
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
def _compile_document_root(root: Component) -> str:
|
|
@@ -86,6 +88,8 @@ def _compile_app(app_root: Component) -> str:
|
|
|
86
88
|
(_normalize_library_name(name), name) for name in bundled_libraries
|
|
87
89
|
]
|
|
88
90
|
|
|
91
|
+
window_libraries_deduped = list(dict.fromkeys(window_libraries))
|
|
92
|
+
|
|
89
93
|
app_root_imports = app_root._get_all_imports()
|
|
90
94
|
_apply_common_imports(app_root_imports)
|
|
91
95
|
|
|
@@ -93,7 +97,7 @@ def _compile_app(app_root: Component) -> str:
|
|
|
93
97
|
imports=utils.compile_imports(app_root_imports),
|
|
94
98
|
custom_codes=app_root._get_all_custom_code(),
|
|
95
99
|
hooks=app_root._get_all_hooks(),
|
|
96
|
-
window_libraries=
|
|
100
|
+
window_libraries=window_libraries_deduped,
|
|
97
101
|
render=app_root.render(),
|
|
98
102
|
dynamic_imports=app_root._get_all_dynamic_imports(),
|
|
99
103
|
)
|
reflex/compiler/utils.py
CHANGED
|
@@ -359,21 +359,37 @@ def create_document_root(
|
|
|
359
359
|
Returns:
|
|
360
360
|
The document root.
|
|
361
361
|
"""
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
)
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
362
|
+
existing_meta_types = set()
|
|
363
|
+
|
|
364
|
+
for component in head_components or []:
|
|
365
|
+
if isinstance(component, Meta):
|
|
366
|
+
if component.char_set is not None: # pyright: ignore[reportAttributeAccessIssue]
|
|
367
|
+
existing_meta_types.add("char_set")
|
|
368
|
+
if (
|
|
369
|
+
(name := component.name) is not None # pyright: ignore[reportAttributeAccessIssue]
|
|
370
|
+
and name.equals(Var.create("viewport"))
|
|
371
|
+
):
|
|
372
|
+
existing_meta_types.add("viewport")
|
|
373
|
+
|
|
374
|
+
# Always include the framework meta and link tags.
|
|
375
|
+
always_head_components = [
|
|
374
376
|
ReactMeta.create(),
|
|
375
377
|
Links.create(),
|
|
376
378
|
]
|
|
379
|
+
maybe_head_components = []
|
|
380
|
+
# Only include these if the user has not specified them.
|
|
381
|
+
if "char_set" not in existing_meta_types:
|
|
382
|
+
maybe_head_components.append(Meta.create(char_set="utf-8"))
|
|
383
|
+
if "viewport" not in existing_meta_types:
|
|
384
|
+
maybe_head_components.append(
|
|
385
|
+
Meta.create(name="viewport", content="width=device-width, initial-scale=1")
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
head_components = [
|
|
389
|
+
*(head_components or []),
|
|
390
|
+
*maybe_head_components,
|
|
391
|
+
*always_head_components,
|
|
392
|
+
]
|
|
377
393
|
return Html.create(
|
|
378
394
|
Head.create(*head_components),
|
|
379
395
|
Body.create(
|
|
@@ -417,9 +433,11 @@ def _format_route_part(part: str) -> str:
|
|
|
417
433
|
if part.startswith("[") and part.endswith("]"):
|
|
418
434
|
if part.startswith(("[...", "[[...")):
|
|
419
435
|
return "$"
|
|
436
|
+
if part.startswith("[["):
|
|
437
|
+
return "($" + part.removeprefix("[[").removesuffix("]]") + ")"
|
|
420
438
|
# We don't add [] here since we are reusing them from the input
|
|
421
|
-
return "$" + part
|
|
422
|
-
return "[" + part + "]
|
|
439
|
+
return "$" + part
|
|
440
|
+
return "[" + part + "]"
|
|
423
441
|
|
|
424
442
|
|
|
425
443
|
def _path_to_file_stem(path: str) -> str:
|
reflex/components/__init__.pyi
CHANGED
|
@@ -3,18 +3,37 @@
|
|
|
3
3
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
5
5
|
|
|
6
|
-
from . import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
from . import (
|
|
7
|
+
base,
|
|
8
|
+
core,
|
|
9
|
+
datadisplay,
|
|
10
|
+
el,
|
|
11
|
+
gridjs,
|
|
12
|
+
lucide,
|
|
13
|
+
markdown,
|
|
14
|
+
moment,
|
|
15
|
+
plotly,
|
|
16
|
+
radix,
|
|
17
|
+
react_player,
|
|
18
|
+
recharts,
|
|
19
|
+
sonner,
|
|
20
|
+
)
|
|
21
|
+
from .component import Component, NoSSRComponent
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"Component",
|
|
25
|
+
"NoSSRComponent",
|
|
26
|
+
"base",
|
|
27
|
+
"core",
|
|
28
|
+
"datadisplay",
|
|
29
|
+
"el",
|
|
30
|
+
"gridjs",
|
|
31
|
+
"lucide",
|
|
32
|
+
"markdown",
|
|
33
|
+
"moment",
|
|
34
|
+
"plotly",
|
|
35
|
+
"radix",
|
|
36
|
+
"react_player",
|
|
37
|
+
"recharts",
|
|
38
|
+
"sonner",
|
|
39
|
+
]
|
|
@@ -3,22 +3,33 @@
|
|
|
3
3
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
5
5
|
|
|
6
|
-
from . import app_wrap
|
|
7
|
-
from . import
|
|
8
|
-
from .
|
|
9
|
-
from .
|
|
10
|
-
from .
|
|
11
|
-
from .
|
|
12
|
-
from .
|
|
13
|
-
from .
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
from . import app_wrap, bare
|
|
7
|
+
from .body import Body
|
|
8
|
+
from .document import Links, Outlet, Scripts, ScrollRestoration
|
|
9
|
+
from .error_boundary import ErrorBoundary, error_boundary
|
|
10
|
+
from .fragment import Fragment, fragment
|
|
11
|
+
from .link import RawLink, ScriptTag
|
|
12
|
+
from .meta import Description, Image, Meta, Title
|
|
13
|
+
from .script import Script, script
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"Body",
|
|
17
|
+
"Description",
|
|
18
|
+
"ErrorBoundary",
|
|
19
|
+
"Fragment",
|
|
20
|
+
"Image",
|
|
21
|
+
"Links",
|
|
22
|
+
"Meta",
|
|
23
|
+
"Outlet",
|
|
24
|
+
"RawLink",
|
|
25
|
+
"Script",
|
|
26
|
+
"ScriptTag",
|
|
27
|
+
"Scripts",
|
|
28
|
+
"ScrollRestoration",
|
|
29
|
+
"Title",
|
|
30
|
+
"app_wrap",
|
|
31
|
+
"bare",
|
|
32
|
+
"error_boundary",
|
|
33
|
+
"fragment",
|
|
34
|
+
"script",
|
|
35
|
+
]
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.base.fragment import Fragment
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class AppWrap(Fragment):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
style: Sequence[Mapping[str, Any]]
|
reflex/components/base/body.pyi
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any, Literal
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
10
10
|
from reflex.components.el import elements
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class Body(elements.Body):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
access_key: Var[str] | str | None = None,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.component import Component
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class ReactRouterLib(Component):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -64,9 +63,8 @@ class ReactRouterLib(Component):
|
|
|
64
63
|
"""
|
|
65
64
|
|
|
66
65
|
class Meta(ReactRouterLib):
|
|
67
|
-
@overload
|
|
68
66
|
@classmethod
|
|
69
|
-
def create(
|
|
67
|
+
def create(
|
|
70
68
|
cls,
|
|
71
69
|
*children,
|
|
72
70
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -116,9 +114,8 @@ class Meta(ReactRouterLib):
|
|
|
116
114
|
"""
|
|
117
115
|
|
|
118
116
|
class Links(ReactRouterLib):
|
|
119
|
-
@overload
|
|
120
117
|
@classmethod
|
|
121
|
-
def create(
|
|
118
|
+
def create(
|
|
122
119
|
cls,
|
|
123
120
|
*children,
|
|
124
121
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -168,9 +165,8 @@ class Links(ReactRouterLib):
|
|
|
168
165
|
"""
|
|
169
166
|
|
|
170
167
|
class ScrollRestoration(ReactRouterLib):
|
|
171
|
-
@overload
|
|
172
168
|
@classmethod
|
|
173
|
-
def create(
|
|
169
|
+
def create(
|
|
174
170
|
cls,
|
|
175
171
|
*children,
|
|
176
172
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -220,9 +216,8 @@ class ScrollRestoration(ReactRouterLib):
|
|
|
220
216
|
"""
|
|
221
217
|
|
|
222
218
|
class Outlet(ReactRouterLib):
|
|
223
|
-
@overload
|
|
224
219
|
@classmethod
|
|
225
|
-
def create(
|
|
220
|
+
def create(
|
|
226
221
|
cls,
|
|
227
222
|
*children,
|
|
228
223
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -272,9 +267,8 @@ class Outlet(ReactRouterLib):
|
|
|
272
267
|
"""
|
|
273
268
|
|
|
274
269
|
class Scripts(ReactRouterLib):
|
|
275
|
-
@overload
|
|
276
270
|
@classmethod
|
|
277
|
-
def create(
|
|
271
|
+
def create(
|
|
278
272
|
cls,
|
|
279
273
|
*children,
|
|
280
274
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.component import Component
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -17,9 +17,8 @@ def on_error_spec(
|
|
|
17
17
|
) -> tuple[Var[str], Var[str]]: ...
|
|
18
18
|
|
|
19
19
|
class ErrorBoundary(Component):
|
|
20
|
-
@overload
|
|
21
20
|
@classmethod
|
|
22
|
-
def create(
|
|
21
|
+
def create(
|
|
23
22
|
cls,
|
|
24
23
|
*children,
|
|
25
24
|
fallback_render: Component | Var[Component] | None = None,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.component import Component
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class Fragment(Component):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
style: Sequence[Mapping[str, Any]]
|
reflex/components/base/link.pyi
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any, Literal
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
10
10
|
from reflex.components.el.elements.base import BaseHTML
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class RawLink(BaseHTML):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
href: Var[str] | str | None = None,
|
|
@@ -262,9 +261,8 @@ class RawLink(BaseHTML):
|
|
|
262
261
|
"""
|
|
263
262
|
|
|
264
263
|
class ScriptTag(BaseHTML):
|
|
265
|
-
@overload
|
|
266
264
|
@classmethod
|
|
267
|
-
def create(
|
|
265
|
+
def create(
|
|
268
266
|
cls,
|
|
269
267
|
*children,
|
|
270
268
|
type_: Var[str] | str | None = None,
|
reflex/components/base/meta.py
CHANGED
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from reflex.components.base.bare import Bare
|
|
6
6
|
from reflex.components.el import elements
|
|
7
|
+
from reflex.vars.base import Var
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class Title(elements.Title):
|
|
@@ -28,31 +29,19 @@ class Title(elements.Title):
|
|
|
28
29
|
class Meta(elements.Meta):
|
|
29
30
|
"""A component that displays metadata for the current page."""
|
|
30
31
|
|
|
31
|
-
# The description of character encoding.
|
|
32
|
-
char_set: str | None = None
|
|
33
|
-
|
|
34
|
-
# The value of meta.
|
|
35
|
-
content: str | None = None
|
|
36
|
-
|
|
37
|
-
# The name of metadata.
|
|
38
|
-
name: str | None = None
|
|
39
|
-
|
|
40
|
-
# The type of metadata value.
|
|
41
|
-
property: str | None = None
|
|
42
|
-
|
|
43
32
|
# The type of metadata value.
|
|
44
|
-
|
|
33
|
+
property: Var[str]
|
|
45
34
|
|
|
46
35
|
|
|
47
36
|
class Description(elements.Meta):
|
|
48
37
|
"""A component that displays the title of the current page."""
|
|
49
38
|
|
|
50
39
|
# The type of the description.
|
|
51
|
-
name: str
|
|
40
|
+
name: Var[str] = Var.create("description")
|
|
52
41
|
|
|
53
42
|
|
|
54
43
|
class Image(elements.Meta):
|
|
55
44
|
"""A component that displays the title of the current page."""
|
|
56
45
|
|
|
57
46
|
# The type of the image.
|
|
58
|
-
property: str
|
|
47
|
+
property: Var[str] = Var.create("og:image")
|
reflex/components/base/meta.pyi
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any, Literal
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
10
10
|
from reflex.components.el import elements
|
|
@@ -13,9 +13,8 @@ from reflex.vars.base import Var
|
|
|
13
13
|
|
|
14
14
|
class Title(elements.Title):
|
|
15
15
|
def render(self) -> dict: ...
|
|
16
|
-
@overload
|
|
17
16
|
@classmethod
|
|
18
|
-
def create(
|
|
17
|
+
def create(
|
|
19
18
|
cls,
|
|
20
19
|
*children,
|
|
21
20
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -65,16 +64,15 @@ class Title(elements.Title):
|
|
|
65
64
|
"""
|
|
66
65
|
|
|
67
66
|
class Meta(elements.Meta):
|
|
68
|
-
@overload
|
|
69
67
|
@classmethod
|
|
70
|
-
def create(
|
|
68
|
+
def create(
|
|
71
69
|
cls,
|
|
72
70
|
*children,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
property: Var[str] | str | None = None,
|
|
72
|
+
char_set: Var[str] | str | None = None,
|
|
73
|
+
content: Var[str] | str | None = None,
|
|
74
|
+
http_equiv: Var[str] | str | None = None,
|
|
75
|
+
name: Var[str] | str | None = None,
|
|
78
76
|
access_key: Var[str] | str | None = None,
|
|
79
77
|
auto_capitalize: Literal[
|
|
80
78
|
"characters", "none", "off", "on", "sentences", "words"
|
|
@@ -286,11 +284,11 @@ class Meta(elements.Meta):
|
|
|
286
284
|
|
|
287
285
|
Args:
|
|
288
286
|
*children: The children of the component.
|
|
287
|
+
property: The type of metadata value.
|
|
289
288
|
char_set: Specifies the character encoding for the HTML document
|
|
290
289
|
content: Defines the content of the metadata
|
|
291
|
-
name: Specifies a name for the metadata
|
|
292
|
-
property: The type of metadata value.
|
|
293
290
|
http_equiv: Provides an HTTP header for the information/value of the content attribute
|
|
291
|
+
name: Specifies a name for the metadata
|
|
294
292
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
295
293
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
296
294
|
content_editable: Indicates whether the element's content is editable.
|
|
@@ -321,12 +319,11 @@ class Meta(elements.Meta):
|
|
|
321
319
|
"""
|
|
322
320
|
|
|
323
321
|
class Description(elements.Meta):
|
|
324
|
-
@overload
|
|
325
322
|
@classmethod
|
|
326
|
-
def create(
|
|
323
|
+
def create(
|
|
327
324
|
cls,
|
|
328
325
|
*children,
|
|
329
|
-
name: str | None = None,
|
|
326
|
+
name: Var[str] | str | None = None,
|
|
330
327
|
char_set: Var[str] | str | None = None,
|
|
331
328
|
content: Var[str] | str | None = None,
|
|
332
329
|
http_equiv: Var[str] | str | None = None,
|
|
@@ -575,12 +572,11 @@ class Description(elements.Meta):
|
|
|
575
572
|
"""
|
|
576
573
|
|
|
577
574
|
class Image(elements.Meta):
|
|
578
|
-
@overload
|
|
579
575
|
@classmethod
|
|
580
|
-
def create(
|
|
576
|
+
def create(
|
|
581
577
|
cls,
|
|
582
578
|
*children,
|
|
583
|
-
property: str | None = None,
|
|
579
|
+
property: Var[str] | str | None = None,
|
|
584
580
|
char_set: Var[str] | str | None = None,
|
|
585
581
|
content: Var[str] | str | None = None,
|
|
586
582
|
http_equiv: Var[str] | str | None = None,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any, Literal
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
from reflex.components import el as elements
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class Script(elements.Script):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
async_: Var[bool] | bool | None = None,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
6
|
from collections.abc import Mapping, Sequence
|
|
7
|
-
from typing import Any
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from reflex.components.component import Component
|
|
10
10
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -12,9 +12,8 @@ from reflex.event import EventType, PointerEventInfo
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class StrictMode(Component):
|
|
15
|
-
@overload
|
|
16
15
|
@classmethod
|
|
17
|
-
def create(
|
|
16
|
+
def create(
|
|
18
17
|
cls,
|
|
19
18
|
*children,
|
|
20
19
|
style: Sequence[Mapping[str, Any]]
|
|
@@ -3,41 +3,80 @@
|
|
|
3
3
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
5
5
|
|
|
6
|
-
from . import layout
|
|
7
|
-
from .auto_scroll import auto_scroll
|
|
8
|
-
from .banner import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
from .
|
|
19
|
-
from .clipboard import
|
|
20
|
-
from .colors import color
|
|
21
|
-
from .cond import Cond
|
|
22
|
-
from .
|
|
23
|
-
from .
|
|
24
|
-
from .
|
|
25
|
-
from .
|
|
26
|
-
from .
|
|
27
|
-
from .
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
from .
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
6
|
+
from . import layout
|
|
7
|
+
from .auto_scroll import auto_scroll
|
|
8
|
+
from .banner import (
|
|
9
|
+
ConnectionBanner,
|
|
10
|
+
ConnectionModal,
|
|
11
|
+
ConnectionPulser,
|
|
12
|
+
ConnectionToaster,
|
|
13
|
+
connection_banner,
|
|
14
|
+
connection_modal,
|
|
15
|
+
connection_pulser,
|
|
16
|
+
connection_toaster,
|
|
17
|
+
)
|
|
18
|
+
from .breakpoints import breakpoints, set_breakpoints
|
|
19
|
+
from .clipboard import Clipboard, clipboard
|
|
20
|
+
from .colors import color
|
|
21
|
+
from .cond import Cond, color_mode_cond, cond
|
|
22
|
+
from .debounce import DebounceInput, debounce_input
|
|
23
|
+
from .foreach import Foreach, foreach
|
|
24
|
+
from .helmet import Helmet
|
|
25
|
+
from .html import Html, html
|
|
26
|
+
from .match import Match, match
|
|
27
|
+
from .responsive import (
|
|
28
|
+
desktop_only,
|
|
29
|
+
mobile_and_tablet,
|
|
30
|
+
mobile_only,
|
|
31
|
+
tablet_and_desktop,
|
|
32
|
+
tablet_only,
|
|
33
|
+
)
|
|
34
|
+
from .upload import (
|
|
35
|
+
cancel_upload,
|
|
36
|
+
clear_selected_files,
|
|
37
|
+
get_upload_dir,
|
|
38
|
+
get_upload_url,
|
|
39
|
+
selected_files,
|
|
40
|
+
upload,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
__all__ = [
|
|
44
|
+
"Clipboard",
|
|
45
|
+
"Cond",
|
|
46
|
+
"ConnectionBanner",
|
|
47
|
+
"ConnectionModal",
|
|
48
|
+
"ConnectionPulser",
|
|
49
|
+
"ConnectionToaster",
|
|
50
|
+
"DebounceInput",
|
|
51
|
+
"Foreach",
|
|
52
|
+
"Helmet",
|
|
53
|
+
"Html",
|
|
54
|
+
"Match",
|
|
55
|
+
"auto_scroll",
|
|
56
|
+
"breakpoints",
|
|
57
|
+
"cancel_upload",
|
|
58
|
+
"clear_selected_files",
|
|
59
|
+
"clipboard",
|
|
60
|
+
"color",
|
|
61
|
+
"color_mode_cond",
|
|
62
|
+
"cond",
|
|
63
|
+
"connection_banner",
|
|
64
|
+
"connection_modal",
|
|
65
|
+
"connection_pulser",
|
|
66
|
+
"connection_toaster",
|
|
67
|
+
"debounce_input",
|
|
68
|
+
"desktop_only",
|
|
69
|
+
"foreach",
|
|
70
|
+
"get_upload_dir",
|
|
71
|
+
"get_upload_url",
|
|
72
|
+
"html",
|
|
73
|
+
"layout",
|
|
74
|
+
"match",
|
|
75
|
+
"mobile_and_tablet",
|
|
76
|
+
"mobile_only",
|
|
77
|
+
"selected_files",
|
|
78
|
+
"set_breakpoints",
|
|
79
|
+
"tablet_and_desktop",
|
|
80
|
+
"tablet_only",
|
|
81
|
+
"upload",
|
|
82
|
+
]
|