Merge remote-tracking branch 'origin/main' into maintenance/version_bump

This commit is contained in:
Masen Furer 2024-11-18 18:26:11 -08:00
commit 68db8ebaa2
No known key found for this signature in database
GPG Key ID: 2AE2BD5531FF94F4
11 changed files with 34 additions and 15 deletions

14
poetry.lock generated
View File

@ -2198,13 +2198,13 @@ reflex = ">=0.6.0a"
[[package]] [[package]]
name = "reflex-hosting-cli" name = "reflex-hosting-cli"
version = "0.1.15" version = "0.1.16"
description = "Reflex Hosting CLI" description = "Reflex Hosting CLI"
optional = false optional = false
python-versions = "<4.0,>=3.8" python-versions = "<4.0,>=3.8"
files = [ files = [
{file = "reflex_hosting_cli-0.1.15-py3-none-any.whl", hash = "sha256:c471f5570b8797e290844edcc079241aa27457112c01188dc0f8a5ccc2364003"}, {file = "reflex_hosting_cli-0.1.16-py3-none-any.whl", hash = "sha256:1b12c2a76a27571102cacf5ec3028fb09816a51568bff793735e66aaad886605"},
{file = "reflex_hosting_cli-0.1.15.tar.gz", hash = "sha256:42a2a030b8bfba728cbd2c5cc37df0fcc8c2966efc649c57806c6616efb994c4"}, {file = "reflex_hosting_cli-0.1.16.tar.gz", hash = "sha256:9c9826318fd3d388b706be70f1f500a35e355f8f86f54138e7789fd6096a4ab9"},
] ]
[package.dependencies] [package.dependencies]
@ -2714,13 +2714,13 @@ urllib3 = ">=1.26.0"
[[package]] [[package]]
name = "typer" name = "typer"
version = "0.13.0" version = "0.13.1"
description = "Typer, build great CLIs. Easy to code. Based on Python type hints." description = "Typer, build great CLIs. Easy to code. Based on Python type hints."
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
{file = "typer-0.13.0-py3-none-any.whl", hash = "sha256:d85fe0b777b2517cc99c8055ed735452f2659cd45e451507c76f48ce5c1d00e2"}, {file = "typer-0.13.1-py3-none-any.whl", hash = "sha256:5b59580fd925e89463a29d363e0a43245ec02765bde9fb77d39e5d0f29dd7157"},
{file = "typer-0.13.0.tar.gz", hash = "sha256:f1c7198347939361eec90139ffa0fd8b3df3a2259d5852a0f7400e476d95985c"}, {file = "typer-0.13.1.tar.gz", hash = "sha256:9d444cb96cc268ce6f8b94e13b4335084cef4c079998a9f4851a90229a3bd25c"},
] ]
[package.dependencies] [package.dependencies]
@ -3033,4 +3033,4 @@ type = ["pytest-mypy"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.9" python-versions = "^3.9"
content-hash = "99d5de7cfecc9293f052d5e84a3c37d7ba93acf5cfb1f83b3ba203826fa0781d" content-hash = "600773827321e7a0fdb2fe7d6af650a039dff759ce6df9c51ca22f0d7df4c290"

View File

@ -49,7 +49,7 @@ wrapt = [
{version = ">=1.11.0,<2.0", python = "<3.11"}, {version = ">=1.11.0,<2.0", python = "<3.11"},
] ]
packaging = ">=23.1,<25.0" packaging = ">=23.1,<25.0"
reflex-hosting-cli = ">=0.1.15,<2.0" reflex-hosting-cli = ">=0.1.16,<2.0"
charset-normalizer = ">=3.3.2,<4.0" charset-normalizer = ">=3.3.2,<4.0"
wheel = ">=0.42.0,<1.0" wheel = ">=0.42.0,<1.0"
build = ">=1.0.3,<2.0" build = ">=1.0.3,<2.0"

View File

@ -854,6 +854,7 @@ class App(MiddlewareMixin, LifespanMixin):
self.theme.appearance = None self.theme.appearance = None
for route in self.unevaluated_pages: for route in self.unevaluated_pages:
console.debug(f"Evaluating page: {route}")
self._compile_page(route) self._compile_page(route)
# Add the optional endpoints (_upload) # Add the optional endpoints (_upload)

View File

@ -5,6 +5,7 @@
from . import elements as elements from . import elements as elements
from .elements.forms import Button as Button from .elements.forms import Button as Button
from .elements.forms import Datalist as Datalist
from .elements.forms import Fieldset as Fieldset from .elements.forms import Fieldset as Fieldset
from .elements.forms import Form as Form from .elements.forms import Form as Form
from .elements.forms import Input as Input from .elements.forms import Input as Input
@ -18,6 +19,7 @@ from .elements.forms import Progress as Progress
from .elements.forms import Select as Select from .elements.forms import Select as Select
from .elements.forms import Textarea as Textarea from .elements.forms import Textarea as Textarea
from .elements.forms import button as button from .elements.forms import button as button
from .elements.forms import datalist as datalist
from .elements.forms import fieldset as fieldset from .elements.forms import fieldset as fieldset
from .elements.forms import form as form from .elements.forms import form as form
from .elements.forms import input as input from .elements.forms import input as input

View File

@ -7,6 +7,7 @@ from reflex.utils import lazy_loader
_MAPPING = { _MAPPING = {
"forms": [ "forms": [
"button", "button",
"datalist",
"fieldset", "fieldset",
"form", "form",
"input", "input",

View File

@ -4,6 +4,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
from .forms import Button as Button from .forms import Button as Button
from .forms import Datalist as Datalist
from .forms import Fieldset as Fieldset from .forms import Fieldset as Fieldset
from .forms import Form as Form from .forms import Form as Form
from .forms import Input as Input from .forms import Input as Input
@ -17,6 +18,7 @@ from .forms import Progress as Progress
from .forms import Select as Select from .forms import Select as Select
from .forms import Textarea as Textarea from .forms import Textarea as Textarea
from .forms import button as button from .forms import button as button
from .forms import datalist as datalist
from .forms import fieldset as fieldset from .forms import fieldset as fieldset
from .forms import form as form from .forms import form as form
from .forms import input as input from .forms import input as input
@ -226,6 +228,7 @@ from .typography import ul as ul
_MAPPING = { _MAPPING = {
"forms": [ "forms": [
"button", "button",
"datalist",
"fieldset", "fieldset",
"form", "form",
"input", "input",

View File

@ -681,6 +681,7 @@ class Textarea(BaseHTML):
button = Button.create button = Button.create
datalist = Datalist.create
fieldset = Fieldset.create fieldset = Fieldset.create
form = Form.create form = Form.create
input = Input.create input = Input.create

View File

@ -1490,6 +1490,7 @@ class Textarea(BaseHTML):
... ...
button = Button.create button = Button.create
datalist = Datalist.create
fieldset = Fieldset.create fieldset = Fieldset.create
form = Form.create form = Form.create
input = Input.create input = Input.create

View File

@ -67,6 +67,9 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
# Value of the input # Value of the input
value: Var[Union[str, int, float]] value: Var[Union[str, int, float]]
# References a datalist for suggested options
list: Var[Union[str, int, bool]]
# Fired when the value of the textarea changes. # Fired when the value of the textarea changes.
on_change: EventHandler[input_event] on_change: EventHandler[input_event]

View File

@ -119,6 +119,7 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
required: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None,
type: Optional[Union[Var[str], str]] = None, type: Optional[Union[Var[str], str]] = None,
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
auto_capitalize: Optional[ auto_capitalize: Optional[
Union[Var[Union[bool, int, str]], bool, int, str] Union[Var[Union[bool, int, str]], bool, int, str]
@ -206,6 +207,7 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
required: Indicates that the input is required required: Indicates that the input is required
type: Specifies the type of input type: Specifies the type of input
value: Value of the input value: Value of the input
list: References a datalist for suggested options
on_change: Fired when the value of the textarea changes. on_change: Fired when the value of the textarea changes.
on_focus: Fired when the textarea is focused. on_focus: Fired when the textarea is focused.
on_blur: Fired when the textarea is blurred. on_blur: Fired when the textarea is blurred.
@ -454,6 +456,7 @@ class TextField(ComponentNamespace):
required: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None,
type: Optional[Union[Var[str], str]] = None, type: Optional[Union[Var[str], str]] = None,
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
auto_capitalize: Optional[ auto_capitalize: Optional[
Union[Var[Union[bool, int, str]], bool, int, str] Union[Var[Union[bool, int, str]], bool, int, str]
@ -541,6 +544,7 @@ class TextField(ComponentNamespace):
required: Indicates that the input is required required: Indicates that the input is required
type: Specifies the type of input type: Specifies the type of input
value: Value of the input value: Value of the input
list: References a datalist for suggested options
on_change: Fired when the value of the textarea changes. on_change: Fired when the value of the textarea changes.
on_focus: Fired when the textarea is focused. on_focus: Fired when the textarea is focused.
on_blur: Fired when the textarea is blurred. on_blur: Fired when the textarea is blurred.

View File

@ -11,7 +11,7 @@ import typer
import typer.core import typer.core
from reflex_cli.deployments import deployments_cli from reflex_cli.deployments import deployments_cli
from reflex_cli.utils import dependency from reflex_cli.utils import dependency
from reflex_cli.v2.deployments import hosting_cli from reflex_cli.v2.deployments import check_version, hosting_cli
from reflex import constants from reflex import constants
from reflex.config import environment, get_config from reflex.config import environment, get_config
@ -120,7 +120,7 @@ def _init(
# Initialize the requirements.txt. # Initialize the requirements.txt.
prerequisites.initialize_requirements_txt() prerequisites.initialize_requirements_txt()
template_msg = "" if template else f" using the {template} template" template_msg = "" if not template else f" using the {template} template"
# Finish initializing the app. # Finish initializing the app.
console.success(f"Initialized {app_name}{template_msg}") console.success(f"Initialized {app_name}{template_msg}")
@ -390,6 +390,8 @@ def loginv2(loglevel: constants.LogLevel = typer.Option(config.loglevel)):
"""Authenicate with experimental Reflex hosting service.""" """Authenicate with experimental Reflex hosting service."""
from reflex_cli.v2 import cli as hosting_cli from reflex_cli.v2 import cli as hosting_cli
check_version()
hosting_cli.login() hosting_cli.login()
@ -418,6 +420,8 @@ def logoutv2(
"""Log out of access to Reflex hosting service.""" """Log out of access to Reflex hosting service."""
from reflex_cli.v2.utils import hosting from reflex_cli.v2.utils import hosting
check_version()
console.set_log_level(loglevel) console.set_log_level(loglevel)
hosting.log_out_on_browser() hosting.log_out_on_browser()
@ -637,7 +641,7 @@ def deployv2(
list(), list(),
"-r", "-r",
"--region", "--region",
help="The regions to deploy to. For multiple envs, repeat this option, e.g. --region sjc --region iad", help="The regions to deploy to. `reflex apps regions` For multiple envs, repeat this option, e.g. --region sjc --region iad",
), ),
envs: List[str] = typer.Option( envs: List[str] = typer.Option(
list(), list(),
@ -647,13 +651,12 @@ def deployv2(
vmtype: Optional[str] = typer.Option( vmtype: Optional[str] = typer.Option(
None, None,
"--vmtype", "--vmtype",
help="Vm type id. Run reflex apps vmtypes list to get options.", help="Vm type id. Run `reflex apps vmtypes` to get options.",
), ),
hostname: Optional[str] = typer.Option( hostname: Optional[str] = typer.Option(
None, None,
"--hostname", "--hostname",
help="The hostname of the frontend.", help="The hostname of the frontend.",
hidden=True,
), ),
interactive: bool = typer.Option( interactive: bool = typer.Option(
True, True,
@ -663,7 +666,6 @@ def deployv2(
None, None,
"--envfile", "--envfile",
help="The path to an env file to use. Will override any envs set manually.", help="The path to an env file to use. Will override any envs set manually.",
hidden=True,
), ),
loglevel: constants.LogLevel = typer.Option( loglevel: constants.LogLevel = typer.Option(
config.loglevel, help="The log level to use." config.loglevel, help="The log level to use."
@ -678,7 +680,6 @@ def deployv2(
None, None,
"--token", "--token",
help="token to use for auth", help="token to use for auth",
hidden=True,
), ),
): ):
"""Deploy the app to the Reflex hosting service.""" """Deploy the app to the Reflex hosting service."""
@ -688,6 +689,8 @@ def deployv2(
from reflex.utils import export as export_utils from reflex.utils import export as export_utils
from reflex.utils import prerequisites from reflex.utils import prerequisites
check_version()
# Set the log level. # Set the log level.
console.set_log_level(loglevel) console.set_log_level(loglevel)