From 4c97072a3ca74d8373d90857506b12c5ce1a6975 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 8 Jan 2025 09:37:33 -0800 Subject: [PATCH 001/144] pyproject.toml: bump to 0.7.0dev1 for further development (#4604) --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3e76ec5b3..fb803fbaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "reflex" -version = "0.6.8dev1" +version = "0.7.0dev1" description = "Web apps in pure Python." license = "Apache-2.0" authors = [ @@ -108,4 +108,4 @@ asyncio_mode = "auto" [tool.codespell] skip = "docs/*,*.html,examples/*, *.pyi" -ignore-words-list = "te, TreeE" \ No newline at end of file +ignore-words-list = "te, TreeE" From 79611abdabcd4d19f2404e695d65064266701f03 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 8 Jan 2025 17:16:38 -0800 Subject: [PATCH 002/144] make that one line better (#4610) --- reflex/app.py | 5 ++--- reflex/event.py | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 259fcca29..89ee4c164 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -68,6 +68,7 @@ from reflex.components.core.upload import Upload, get_upload_dir from reflex.components.radix import themes from reflex.config import environment, get_config from reflex.event import ( + _EVENT_FIELDS, BASE_STATE, Event, EventHandler, @@ -1571,9 +1572,7 @@ class EventNamespace(AsyncNamespace): """ fields = data # Get the event. - event = Event( - **{k: v for k, v in fields.items() if k not in ("handler", "event_actions")} - ) + event = Event(**{k: v for k, v in fields.items() if k in _EVENT_FIELDS}) self.token_to_sid[event.token] = sid self.sid_to_token[sid] = event.token diff --git a/reflex/event.py b/reflex/event.py index 8b25c578b..c9058ce19 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -91,6 +91,8 @@ class Event: return f"{self.token}_{substate}" +_EVENT_FIELDS: set[str] = {f.name for f in dataclasses.fields(Event)} + BACKGROUND_TASK_MARKER = "_reflex_background_task" From fe9c02062d0b9667b1d6fd64ae177f5e1e830a1a Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 9 Jan 2025 16:14:38 -0800 Subject: [PATCH 003/144] EventChain.create accepts arbitrary kwargs (#4609) Pass _var_data when creating LiteralVar Partial fixes for #4608 --- reflex/event.py | 9 +++++++-- reflex/vars/base.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/reflex/event.py b/reflex/event.py index c9058ce19..28852fde5 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -439,6 +439,7 @@ class EventChain(EventActionsMixin): value: EventType, args_spec: ArgsSpec | Sequence[ArgsSpec], key: Optional[str] = None, + **event_chain_kwargs, ) -> Union[EventChain, Var]: """Create an event chain from a variety of input types. @@ -446,6 +447,7 @@ class EventChain(EventActionsMixin): value: The value to create the event chain from. args_spec: The args_spec of the event trigger being bound. key: The key of the event trigger being bound. + **event_chain_kwargs: Additional kwargs to pass to the EventChain constructor. Returns: The event chain. @@ -464,6 +466,7 @@ class EventChain(EventActionsMixin): value=value.guess_type(), args_spec=args_spec, key=key, + **event_chain_kwargs, ) else: raise ValueError( @@ -503,7 +506,9 @@ class EventChain(EventActionsMixin): result = call_event_fn(value, args_spec, key=key) if isinstance(result, Var): # Recursively call this function if the lambda returned an EventChain Var. - return cls.create(value=result, args_spec=args_spec, key=key) + return cls.create( + value=result, args_spec=args_spec, key=key, **event_chain_kwargs + ) events = [*result] # Otherwise, raise an error. @@ -520,7 +525,7 @@ class EventChain(EventActionsMixin): return cls( events=events, args_spec=args_spec, - event_actions={}, + **event_chain_kwargs, ) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index a4496d77d..0a93901cd 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -581,7 +581,7 @@ class Var(Generic[VAR_TYPE]): # Try to pull the imports and hooks from contained values. if not isinstance(value, str): - return LiteralVar.create(value) + return LiteralVar.create(value, _var_data=_var_data) if _var_is_string is False or _var_is_local is True: return cls( From 427d7c56abe33a300f211680edd22b90c6981ef7 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 9 Jan 2025 16:30:49 -0800 Subject: [PATCH 004/144] Revert "[ENG-4005] Proxy backend requests on '/' to the frontend (#3300)" (#4614) This reverts commit 438b31f27089c4fb069ec9ab0890bdb2af63bd7e. --- .github/workflows/integration_tests.yml | 2 - .github/workflows/integration_tests_wsl.yml | 1 - poetry.lock | 575 +----------------- pyproject.toml | 5 - reflex/app.py | 6 - reflex/config.py | 5 - reflex/proxy.py | 119 ---- reflex/testing.py | 21 +- reflex/utils/console.py | 7 +- scripts/integration.sh | 2 +- scripts/wait_for_listening_port.py | 52 +- .../init-test/in_docker_test_script.sh | 2 +- 12 files changed, 15 insertions(+), 782 deletions(-) delete mode 100644 reflex/proxy.py diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 7e3fecb89..017336ba5 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -84,8 +84,6 @@ jobs: run: | poetry run reflex export --backend-only - name: Check run --backend-only before init for counter example - env: - WAIT_FOR_LISTENING_PORT_ARGS: --path ping run: | poetry run bash scripts/integration.sh ./reflex-examples/counter dev 8001 --backend-only --backend-port 8001 - name: Init Website for counter example diff --git a/.github/workflows/integration_tests_wsl.yml b/.github/workflows/integration_tests_wsl.yml index f6b3d395b..7a743252b 100644 --- a/.github/workflows/integration_tests_wsl.yml +++ b/.github/workflows/integration_tests_wsl.yml @@ -78,7 +78,6 @@ jobs: shell: wsl-bash {0} run: | export TELEMETRY_ENABLED=false - export WAIT_FOR_LISTENING_PORT_ARGS="--path ping" dos2unix scripts/integration.sh poetry run bash scripts/integration.sh ./reflex-examples/counter dev 8001 --backend-only --backend-port 8001 - name: Init Website for counter example diff --git a/poetry.lock b/poetry.lock index ab65b25b4..cc778d19b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,142 +1,5 @@ # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. -[[package]] -name = "aiohappyeyeballs" -version = "2.4.3" -description = "Happy Eyeballs for asyncio" -optional = false -python-versions = ">=3.8" -files = [ - {file = "aiohappyeyeballs-2.4.3-py3-none-any.whl", hash = "sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572"}, - {file = "aiohappyeyeballs-2.4.3.tar.gz", hash = "sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586"}, -] - -[[package]] -name = "aiohttp" -version = "3.10.10" -description = "Async http client/server framework (asyncio)" -optional = false -python-versions = ">=3.8" -files = [ - {file = "aiohttp-3.10.10-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:be7443669ae9c016b71f402e43208e13ddf00912f47f623ee5994e12fc7d4b3f"}, - {file = "aiohttp-3.10.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7b06b7843929e41a94ea09eb1ce3927865387e3e23ebe108e0d0d09b08d25be9"}, - {file = "aiohttp-3.10.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:333cf6cf8e65f6a1e06e9eb3e643a0c515bb850d470902274239fea02033e9a8"}, - {file = "aiohttp-3.10.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:274cfa632350225ce3fdeb318c23b4a10ec25c0e2c880eff951a3842cf358ac1"}, - {file = "aiohttp-3.10.10-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9e5e4a85bdb56d224f412d9c98ae4cbd032cc4f3161818f692cd81766eee65a"}, - {file = "aiohttp-3.10.10-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b606353da03edcc71130b52388d25f9a30a126e04caef1fd637e31683033abd"}, - {file = "aiohttp-3.10.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab5a5a0c7a7991d90446a198689c0535be89bbd6b410a1f9a66688f0880ec026"}, - {file = "aiohttp-3.10.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:578a4b875af3e0daaf1ac6fa983d93e0bbfec3ead753b6d6f33d467100cdc67b"}, - {file = "aiohttp-3.10.10-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8105fd8a890df77b76dd3054cddf01a879fc13e8af576805d667e0fa0224c35d"}, - {file = "aiohttp-3.10.10-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3bcd391d083f636c06a68715e69467963d1f9600f85ef556ea82e9ef25f043f7"}, - {file = "aiohttp-3.10.10-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fbc6264158392bad9df19537e872d476f7c57adf718944cc1e4495cbabf38e2a"}, - {file = "aiohttp-3.10.10-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e48d5021a84d341bcaf95c8460b152cfbad770d28e5fe14a768988c461b821bc"}, - {file = "aiohttp-3.10.10-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2609e9ab08474702cc67b7702dbb8a80e392c54613ebe80db7e8dbdb79837c68"}, - {file = "aiohttp-3.10.10-cp310-cp310-win32.whl", hash = "sha256:84afcdea18eda514c25bc68b9af2a2b1adea7c08899175a51fe7c4fb6d551257"}, - {file = "aiohttp-3.10.10-cp310-cp310-win_amd64.whl", hash = "sha256:9c72109213eb9d3874f7ac8c0c5fa90e072d678e117d9061c06e30c85b4cf0e6"}, - {file = "aiohttp-3.10.10-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c30a0eafc89d28e7f959281b58198a9fa5e99405f716c0289b7892ca345fe45f"}, - {file = "aiohttp-3.10.10-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:258c5dd01afc10015866114e210fb7365f0d02d9d059c3c3415382ab633fcbcb"}, - {file = "aiohttp-3.10.10-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:15ecd889a709b0080f02721255b3f80bb261c2293d3c748151274dfea93ac871"}, - {file = "aiohttp-3.10.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3935f82f6f4a3820270842e90456ebad3af15810cf65932bd24da4463bc0a4c"}, - {file = "aiohttp-3.10.10-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:413251f6fcf552a33c981c4709a6bba37b12710982fec8e558ae944bfb2abd38"}, - {file = "aiohttp-3.10.10-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d1720b4f14c78a3089562b8875b53e36b51c97c51adc53325a69b79b4b48ebcb"}, - {file = "aiohttp-3.10.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:679abe5d3858b33c2cf74faec299fda60ea9de62916e8b67e625d65bf069a3b7"}, - {file = "aiohttp-3.10.10-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:79019094f87c9fb44f8d769e41dbb664d6e8fcfd62f665ccce36762deaa0e911"}, - {file = "aiohttp-3.10.10-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:fe2fb38c2ed905a2582948e2de560675e9dfbee94c6d5ccdb1301c6d0a5bf092"}, - {file = "aiohttp-3.10.10-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a3f00003de6eba42d6e94fabb4125600d6e484846dbf90ea8e48a800430cc142"}, - {file = "aiohttp-3.10.10-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:1bbb122c557a16fafc10354b9d99ebf2f2808a660d78202f10ba9d50786384b9"}, - {file = "aiohttp-3.10.10-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:30ca7c3b94708a9d7ae76ff281b2f47d8eaf2579cd05971b5dc681db8caac6e1"}, - {file = "aiohttp-3.10.10-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:df9270660711670e68803107d55c2b5949c2e0f2e4896da176e1ecfc068b974a"}, - {file = "aiohttp-3.10.10-cp311-cp311-win32.whl", hash = "sha256:aafc8ee9b742ce75044ae9a4d3e60e3d918d15a4c2e08a6c3c3e38fa59b92d94"}, - {file = "aiohttp-3.10.10-cp311-cp311-win_amd64.whl", hash = "sha256:362f641f9071e5f3ee6f8e7d37d5ed0d95aae656adf4ef578313ee585b585959"}, - {file = "aiohttp-3.10.10-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9294bbb581f92770e6ed5c19559e1e99255e4ca604a22c5c6397b2f9dd3ee42c"}, - {file = "aiohttp-3.10.10-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a8fa23fe62c436ccf23ff930149c047f060c7126eae3ccea005f0483f27b2e28"}, - {file = "aiohttp-3.10.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5c6a5b8c7926ba5d8545c7dd22961a107526562da31a7a32fa2456baf040939f"}, - {file = "aiohttp-3.10.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:007ec22fbc573e5eb2fb7dec4198ef8f6bf2fe4ce20020798b2eb5d0abda6138"}, - {file = "aiohttp-3.10.10-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9627cc1a10c8c409b5822a92d57a77f383b554463d1884008e051c32ab1b3742"}, - {file = "aiohttp-3.10.10-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:50edbcad60d8f0e3eccc68da67f37268b5144ecc34d59f27a02f9611c1d4eec7"}, - {file = "aiohttp-3.10.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a45d85cf20b5e0d0aa5a8dca27cce8eddef3292bc29d72dcad1641f4ed50aa16"}, - {file = "aiohttp-3.10.10-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0b00807e2605f16e1e198f33a53ce3c4523114059b0c09c337209ae55e3823a8"}, - {file = "aiohttp-3.10.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f2d4324a98062be0525d16f768a03e0bbb3b9fe301ceee99611dc9a7953124e6"}, - {file = "aiohttp-3.10.10-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:438cd072f75bb6612f2aca29f8bd7cdf6e35e8f160bc312e49fbecab77c99e3a"}, - {file = "aiohttp-3.10.10-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:baa42524a82f75303f714108fea528ccacf0386af429b69fff141ffef1c534f9"}, - {file = "aiohttp-3.10.10-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a7d8d14fe962153fc681f6366bdec33d4356f98a3e3567782aac1b6e0e40109a"}, - {file = "aiohttp-3.10.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c1277cd707c465cd09572a774559a3cc7c7a28802eb3a2a9472588f062097205"}, - {file = "aiohttp-3.10.10-cp312-cp312-win32.whl", hash = "sha256:59bb3c54aa420521dc4ce3cc2c3fe2ad82adf7b09403fa1f48ae45c0cbde6628"}, - {file = "aiohttp-3.10.10-cp312-cp312-win_amd64.whl", hash = "sha256:0e1b370d8007c4ae31ee6db7f9a2fe801a42b146cec80a86766e7ad5c4a259cf"}, - {file = "aiohttp-3.10.10-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ad7593bb24b2ab09e65e8a1d385606f0f47c65b5a2ae6c551db67d6653e78c28"}, - {file = "aiohttp-3.10.10-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1eb89d3d29adaf533588f209768a9c02e44e4baf832b08118749c5fad191781d"}, - {file = "aiohttp-3.10.10-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3fe407bf93533a6fa82dece0e74dbcaaf5d684e5a51862887f9eaebe6372cd79"}, - {file = "aiohttp-3.10.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50aed5155f819873d23520919e16703fc8925e509abbb1a1491b0087d1cd969e"}, - {file = "aiohttp-3.10.10-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4f05e9727ce409358baa615dbeb9b969db94324a79b5a5cea45d39bdb01d82e6"}, - {file = "aiohttp-3.10.10-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3dffb610a30d643983aeb185ce134f97f290f8935f0abccdd32c77bed9388b42"}, - {file = "aiohttp-3.10.10-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa6658732517ddabe22c9036479eabce6036655ba87a0224c612e1ae6af2087e"}, - {file = "aiohttp-3.10.10-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:741a46d58677d8c733175d7e5aa618d277cd9d880301a380fd296975a9cdd7bc"}, - {file = "aiohttp-3.10.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e00e3505cd80440f6c98c6d69269dcc2a119f86ad0a9fd70bccc59504bebd68a"}, - {file = "aiohttp-3.10.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ffe595f10566f8276b76dc3a11ae4bb7eba1aac8ddd75811736a15b0d5311414"}, - {file = "aiohttp-3.10.10-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:bdfcf6443637c148c4e1a20c48c566aa694fa5e288d34b20fcdc58507882fed3"}, - {file = "aiohttp-3.10.10-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d183cf9c797a5291e8301790ed6d053480ed94070637bfaad914dd38b0981f67"}, - {file = "aiohttp-3.10.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:77abf6665ae54000b98b3c742bc6ea1d1fb31c394bcabf8b5d2c1ac3ebfe7f3b"}, - {file = "aiohttp-3.10.10-cp313-cp313-win32.whl", hash = "sha256:4470c73c12cd9109db8277287d11f9dd98f77fc54155fc71a7738a83ffcc8ea8"}, - {file = "aiohttp-3.10.10-cp313-cp313-win_amd64.whl", hash = "sha256:486f7aabfa292719a2753c016cc3a8f8172965cabb3ea2e7f7436c7f5a22a151"}, - {file = "aiohttp-3.10.10-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:1b66ccafef7336a1e1f0e389901f60c1d920102315a56df85e49552308fc0486"}, - {file = "aiohttp-3.10.10-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:acd48d5b80ee80f9432a165c0ac8cbf9253eaddb6113269a5e18699b33958dbb"}, - {file = "aiohttp-3.10.10-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3455522392fb15ff549d92fbf4b73b559d5e43dc522588f7eb3e54c3f38beee7"}, - {file = "aiohttp-3.10.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45c3b868724137f713a38376fef8120c166d1eadd50da1855c112fe97954aed8"}, - {file = "aiohttp-3.10.10-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:da1dee8948d2137bb51fbb8a53cce6b1bcc86003c6b42565f008438b806cccd8"}, - {file = "aiohttp-3.10.10-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c5ce2ce7c997e1971b7184ee37deb6ea9922ef5163c6ee5aa3c274b05f9e12fa"}, - {file = "aiohttp-3.10.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28529e08fde6f12eba8677f5a8608500ed33c086f974de68cc65ab218713a59d"}, - {file = "aiohttp-3.10.10-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f7db54c7914cc99d901d93a34704833568d86c20925b2762f9fa779f9cd2e70f"}, - {file = "aiohttp-3.10.10-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:03a42ac7895406220124c88911ebee31ba8b2d24c98507f4a8bf826b2937c7f2"}, - {file = "aiohttp-3.10.10-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:7e338c0523d024fad378b376a79faff37fafb3c001872a618cde1d322400a572"}, - {file = "aiohttp-3.10.10-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:038f514fe39e235e9fef6717fbf944057bfa24f9b3db9ee551a7ecf584b5b480"}, - {file = "aiohttp-3.10.10-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:64f6c17757251e2b8d885d728b6433d9d970573586a78b78ba8929b0f41d045a"}, - {file = "aiohttp-3.10.10-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:93429602396f3383a797a2a70e5f1de5df8e35535d7806c9f91df06f297e109b"}, - {file = "aiohttp-3.10.10-cp38-cp38-win32.whl", hash = "sha256:c823bc3971c44ab93e611ab1a46b1eafeae474c0c844aff4b7474287b75fe49c"}, - {file = "aiohttp-3.10.10-cp38-cp38-win_amd64.whl", hash = "sha256:54ca74df1be3c7ca1cf7f4c971c79c2daf48d9aa65dea1a662ae18926f5bc8ce"}, - {file = "aiohttp-3.10.10-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:01948b1d570f83ee7bbf5a60ea2375a89dfb09fd419170e7f5af029510033d24"}, - {file = "aiohttp-3.10.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9fc1500fd2a952c5c8e3b29aaf7e3cc6e27e9cfc0a8819b3bce48cc1b849e4cc"}, - {file = "aiohttp-3.10.10-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f614ab0c76397661b90b6851a030004dac502e48260ea10f2441abd2207fbcc7"}, - {file = "aiohttp-3.10.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00819de9e45d42584bed046314c40ea7e9aea95411b38971082cad449392b08c"}, - {file = "aiohttp-3.10.10-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05646ebe6b94cc93407b3bf34b9eb26c20722384d068eb7339de802154d61bc5"}, - {file = "aiohttp-3.10.10-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:998f3bd3cfc95e9424a6acd7840cbdd39e45bc09ef87533c006f94ac47296090"}, - {file = "aiohttp-3.10.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d9010c31cd6fa59438da4e58a7f19e4753f7f264300cd152e7f90d4602449762"}, - {file = "aiohttp-3.10.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ea7ffc6d6d6f8a11e6f40091a1040995cdff02cfc9ba4c2f30a516cb2633554"}, - {file = "aiohttp-3.10.10-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ef9c33cc5cbca35808f6c74be11eb7f5f6b14d2311be84a15b594bd3e58b5527"}, - {file = "aiohttp-3.10.10-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ce0cdc074d540265bfeb31336e678b4e37316849d13b308607efa527e981f5c2"}, - {file = "aiohttp-3.10.10-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:597a079284b7ee65ee102bc3a6ea226a37d2b96d0418cc9047490f231dc09fe8"}, - {file = "aiohttp-3.10.10-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:7789050d9e5d0c309c706953e5e8876e38662d57d45f936902e176d19f1c58ab"}, - {file = "aiohttp-3.10.10-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e7f8b04d83483577fd9200461b057c9f14ced334dcb053090cea1da9c8321a91"}, - {file = "aiohttp-3.10.10-cp39-cp39-win32.whl", hash = "sha256:c02a30b904282777d872266b87b20ed8cc0d1501855e27f831320f471d54d983"}, - {file = "aiohttp-3.10.10-cp39-cp39-win_amd64.whl", hash = "sha256:edfe3341033a6b53a5c522c802deb2079eee5cbfbb0af032a55064bd65c73a23"}, - {file = "aiohttp-3.10.10.tar.gz", hash = "sha256:0631dd7c9f0822cc61c88586ca76d5b5ada26538097d0f1df510b082bad3411a"}, -] - -[package.dependencies] -aiohappyeyeballs = ">=2.3.0" -aiosignal = ">=1.1.2" -async-timeout = {version = ">=4.0,<5.0", markers = "python_version < \"3.11\""} -attrs = ">=17.3.0" -frozenlist = ">=1.1.1" -multidict = ">=4.5,<7.0" -yarl = ">=1.12.0,<2.0" - -[package.extras] -speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] - -[[package]] -name = "aiosignal" -version = "1.3.1" -description = "aiosignal: a list of registered asynchronous callbacks" -optional = false -python-versions = ">=3.7" -files = [ - {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, - {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, -] - -[package.dependencies] -frozenlist = ">=1.1.0" - [[package]] name = "alembic" version = "1.14.0" @@ -189,31 +52,15 @@ doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] -[[package]] -name = "asgiproxy" -version = "0.1.1" -description = "Tools for building HTTP and Websocket proxies for the asynchronous ASGI protocol" -optional = false -python-versions = ">=3.6" -files = [ - {file = "asgiproxy-0.1.1-py3-none-any.whl", hash = "sha256:f5175d43691367c51cc972dda0631096e5f23b3536ca29d859be52de87844734"}, - {file = "asgiproxy-0.1.1.tar.gz", hash = "sha256:9dec4d1d8680277dd52b41813d1123383b8a475b8dc82314e5f6729c6c5fa177"}, -] - -[package.dependencies] -aiohttp = "*" -starlette = "*" -websockets = "*" - [[package]] name = "async-timeout" -version = "4.0.3" +version = "5.0.1" description = "Timeout context manager for asyncio programs" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, - {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, + {file = "async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c"}, + {file = "async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3"}, ] [[package]] @@ -772,107 +619,6 @@ docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2. testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] typing = ["typing-extensions (>=4.12.2)"] -[[package]] -name = "frozenlist" -version = "1.5.0" -description = "A list-like structure which implements collections.abc.MutableSequence" -optional = false -python-versions = ">=3.8" -files = [ - {file = "frozenlist-1.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5b6a66c18b5b9dd261ca98dffcb826a525334b2f29e7caa54e182255c5f6a65a"}, - {file = "frozenlist-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d1b3eb7b05ea246510b43a7e53ed1653e55c2121019a97e60cad7efb881a97bb"}, - {file = "frozenlist-1.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:15538c0cbf0e4fa11d1e3a71f823524b0c46299aed6e10ebb4c2089abd8c3bec"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e79225373c317ff1e35f210dd5f1344ff31066ba8067c307ab60254cd3a78ad5"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9272fa73ca71266702c4c3e2d4a28553ea03418e591e377a03b8e3659d94fa76"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:498524025a5b8ba81695761d78c8dd7382ac0b052f34e66939c42df860b8ff17"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:92b5278ed9d50fe610185ecd23c55d8b307d75ca18e94c0e7de328089ac5dcba"}, - {file = "frozenlist-1.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f3c8c1dacd037df16e85227bac13cca58c30da836c6f936ba1df0c05d046d8d"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f2ac49a9bedb996086057b75bf93538240538c6d9b38e57c82d51f75a73409d2"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e66cc454f97053b79c2ab09c17fbe3c825ea6b4de20baf1be28919460dd7877f"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:5a3ba5f9a0dfed20337d3e966dc359784c9f96503674c2faf015f7fe8e96798c"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6321899477db90bdeb9299ac3627a6a53c7399c8cd58d25da094007402b039ab"}, - {file = "frozenlist-1.5.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:76e4753701248476e6286f2ef492af900ea67d9706a0155335a40ea21bf3b2f5"}, - {file = "frozenlist-1.5.0-cp310-cp310-win32.whl", hash = "sha256:977701c081c0241d0955c9586ffdd9ce44f7a7795df39b9151cd9a6fd0ce4cfb"}, - {file = "frozenlist-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:189f03b53e64144f90990d29a27ec4f7997d91ed3d01b51fa39d2dbe77540fd4"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fd74520371c3c4175142d02a976aee0b4cb4a7cc912a60586ffd8d5929979b30"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2f3f7a0fbc219fb4455264cae4d9f01ad41ae6ee8524500f381de64ffaa077d5"}, - {file = "frozenlist-1.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f47c9c9028f55a04ac254346e92977bf0f166c483c74b4232bee19a6697e4778"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0996c66760924da6e88922756d99b47512a71cfd45215f3570bf1e0b694c206a"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a2fe128eb4edeabe11896cb6af88fca5346059f6c8d807e3b910069f39157869"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a8ea951bbb6cacd492e3948b8da8c502a3f814f5d20935aae74b5df2b19cf3d"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de537c11e4aa01d37db0d403b57bd6f0546e71a82347a97c6a9f0dcc532b3a45"}, - {file = "frozenlist-1.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c2623347b933fcb9095841f1cc5d4ff0b278addd743e0e966cb3d460278840d"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cee6798eaf8b1416ef6909b06f7dc04b60755206bddc599f52232606e18179d3"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f5f9da7f5dbc00a604fe74aa02ae7c98bcede8a3b8b9666f9f86fc13993bc71a"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:90646abbc7a5d5c7c19461d2e3eeb76eb0b204919e6ece342feb6032c9325ae9"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:bdac3c7d9b705d253b2ce370fde941836a5f8b3c5c2b8fd70940a3ea3af7f4f2"}, - {file = "frozenlist-1.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03d33c2ddbc1816237a67f66336616416e2bbb6beb306e5f890f2eb22b959cdf"}, - {file = "frozenlist-1.5.0-cp311-cp311-win32.whl", hash = "sha256:237f6b23ee0f44066219dae14c70ae38a63f0440ce6750f868ee08775073f942"}, - {file = "frozenlist-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:0cc974cc93d32c42e7b0f6cf242a6bd941c57c61b618e78b6c0a96cb72788c1d"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:31115ba75889723431aa9a4e77d5f398f5cf976eea3bdf61749731f62d4a4a21"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7437601c4d89d070eac8323f121fcf25f88674627505334654fd027b091db09d"}, - {file = "frozenlist-1.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7948140d9f8ece1745be806f2bfdf390127cf1a763b925c4a805c603df5e697e"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:feeb64bc9bcc6b45c6311c9e9b99406660a9c05ca8a5b30d14a78555088b0b3a"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:683173d371daad49cffb8309779e886e59c2f369430ad28fe715f66d08d4ab1a"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7d57d8f702221405a9d9b40f9da8ac2e4a1a8b5285aac6100f3393675f0a85ee"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c72000fbcc35b129cb09956836c7d7abf78ab5416595e4857d1cae8d6251a6"}, - {file = "frozenlist-1.5.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:000a77d6034fbad9b6bb880f7ec073027908f1b40254b5d6f26210d2dab1240e"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5d7f5a50342475962eb18b740f3beecc685a15b52c91f7d975257e13e029eca9"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:87f724d055eb4785d9be84e9ebf0f24e392ddfad00b3fe036e43f489fafc9039"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:6e9080bb2fb195a046e5177f10d9d82b8a204c0736a97a153c2466127de87784"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9b93d7aaa36c966fa42efcaf716e6b3900438632a626fb09c049f6a2f09fc631"}, - {file = "frozenlist-1.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:52ef692a4bc60a6dd57f507429636c2af8b6046db8b31b18dac02cbc8f507f7f"}, - {file = "frozenlist-1.5.0-cp312-cp312-win32.whl", hash = "sha256:29d94c256679247b33a3dc96cce0f93cbc69c23bf75ff715919332fdbb6a32b8"}, - {file = "frozenlist-1.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:8969190d709e7c48ea386db202d708eb94bdb29207a1f269bab1196ce0dcca1f"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7a1a048f9215c90973402e26c01d1cff8a209e1f1b53f72b95c13db61b00f953"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dd47a5181ce5fcb463b5d9e17ecfdb02b678cca31280639255ce9d0e5aa67af0"}, - {file = "frozenlist-1.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1431d60b36d15cda188ea222033eec8e0eab488f39a272461f2e6d9e1a8e63c2"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6482a5851f5d72767fbd0e507e80737f9c8646ae7fd303def99bfe813f76cf7f"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:44c49271a937625619e862baacbd037a7ef86dd1ee215afc298a417ff3270608"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12f78f98c2f1c2429d42e6a485f433722b0061d5c0b0139efa64f396efb5886b"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce3aa154c452d2467487765e3adc730a8c153af77ad84096bc19ce19a2400840"}, - {file = "frozenlist-1.5.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b7dc0c4338e6b8b091e8faf0db3168a37101943e687f373dce00959583f7439"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:45e0896250900b5aa25180f9aec243e84e92ac84bd4a74d9ad4138ef3f5c97de"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:561eb1c9579d495fddb6da8959fd2a1fca2c6d060d4113f5844b433fc02f2641"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:df6e2f325bfee1f49f81aaac97d2aa757c7646534a06f8f577ce184afe2f0a9e"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:140228863501b44b809fb39ec56b5d4071f4d0aa6d216c19cbb08b8c5a7eadb9"}, - {file = "frozenlist-1.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7707a25d6a77f5d27ea7dc7d1fc608aa0a478193823f88511ef5e6b8a48f9d03"}, - {file = "frozenlist-1.5.0-cp313-cp313-win32.whl", hash = "sha256:31a9ac2b38ab9b5a8933b693db4939764ad3f299fcaa931a3e605bc3460e693c"}, - {file = "frozenlist-1.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:11aabdd62b8b9c4b84081a3c246506d1cddd2dd93ff0ad53ede5defec7886b28"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:dd94994fc91a6177bfaafd7d9fd951bc8689b0a98168aa26b5f543868548d3ca"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2d0da8bbec082bf6bf18345b180958775363588678f64998c2b7609e34719b10"}, - {file = "frozenlist-1.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:73f2e31ea8dd7df61a359b731716018c2be196e5bb3b74ddba107f694fbd7604"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:828afae9f17e6de596825cf4228ff28fbdf6065974e5ac1410cecc22f699d2b3"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1577515d35ed5649d52ab4319db757bb881ce3b2b796d7283e6634d99ace307"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2150cc6305a2c2ab33299453e2968611dacb970d2283a14955923062c8d00b10"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a72b7a6e3cd2725eff67cd64c8f13335ee18fc3c7befc05aed043d24c7b9ccb9"}, - {file = "frozenlist-1.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c16d2fa63e0800723139137d667e1056bee1a1cf7965153d2d104b62855e9b99"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:17dcc32fc7bda7ce5875435003220a457bcfa34ab7924a49a1c19f55b6ee185c"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:97160e245ea33d8609cd2b8fd997c850b56db147a304a262abc2b3be021a9171"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:f1e6540b7fa044eee0bb5111ada694cf3dc15f2b0347ca125ee9ca984d5e9e6e"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:91d6c171862df0a6c61479d9724f22efb6109111017c87567cfeb7b5d1449fdf"}, - {file = "frozenlist-1.5.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c1fac3e2ace2eb1052e9f7c7db480818371134410e1f5c55d65e8f3ac6d1407e"}, - {file = "frozenlist-1.5.0-cp38-cp38-win32.whl", hash = "sha256:b97f7b575ab4a8af9b7bc1d2ef7f29d3afee2226bd03ca3875c16451ad5a7723"}, - {file = "frozenlist-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:374ca2dabdccad8e2a76d40b1d037f5bd16824933bf7bcea3e59c891fd4a0923"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9bbcdfaf4af7ce002694a4e10a0159d5a8d20056a12b05b45cea944a4953f972"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1893f948bf6681733aaccf36c5232c231e3b5166d607c5fa77773611df6dc336"}, - {file = "frozenlist-1.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2b5e23253bb709ef57a8e95e6ae48daa9ac5f265637529e4ce6b003a37b2621f"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f253985bb515ecd89629db13cb58d702035ecd8cfbca7d7a7e29a0e6d39af5f"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:04a5c6babd5e8fb7d3c871dc8b321166b80e41b637c31a995ed844a6139942b6"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9fe0f1c29ba24ba6ff6abf688cb0b7cf1efab6b6aa6adc55441773c252f7411"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:226d72559fa19babe2ccd920273e767c96a49b9d3d38badd7c91a0fdeda8ea08"}, - {file = "frozenlist-1.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b731db116ab3aedec558573c1a5eec78822b32292fe4f2f0345b7f697745c2"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:366d8f93e3edfe5a918c874702f78faac300209a4d5bf38352b2c1bdc07a766d"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1b96af8c582b94d381a1c1f51ffaedeb77c821c690ea5f01da3d70a487dd0a9b"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c03eff4a41bd4e38415cbed054bbaff4a075b093e2394b6915dca34a40d1e38b"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:50cf5e7ee9b98f22bdecbabf3800ae78ddcc26e4a435515fc72d97903e8488e0"}, - {file = "frozenlist-1.5.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1e76bfbc72353269c44e0bc2cfe171900fbf7f722ad74c9a7b638052afe6a00c"}, - {file = "frozenlist-1.5.0-cp39-cp39-win32.whl", hash = "sha256:666534d15ba8f0fda3f53969117383d5dc021266b3c1a42c9ec4855e4b58b9d3"}, - {file = "frozenlist-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:5c28f4b5dbef8a0d8aad0d4de24d1e9e981728628afaf4ea0792f5d0939372f0"}, - {file = "frozenlist-1.5.0-py3-none-any.whl", hash = "sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3"}, - {file = "frozenlist-1.5.0.tar.gz", hash = "sha256:81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817"}, -] - [[package]] name = "greenlet" version = "3.1.1" @@ -1371,110 +1117,6 @@ files = [ {file = "more_itertools-10.5.0-py3-none-any.whl", hash = "sha256:037b0d3203ce90cca8ab1defbbdac29d5f993fc20131f3664dc8d6acfa872aef"}, ] -[[package]] -name = "multidict" -version = "6.1.0" -description = "multidict implementation" -optional = false -python-versions = ">=3.8" -files = [ - {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60"}, - {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:99f826cbf970077383d7de805c0681799491cb939c25450b9b5b3ced03ca99f1"}, - {file = "multidict-6.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a114d03b938376557927ab23f1e950827c3b893ccb94b62fd95d430fd0e5cf53"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1c416351ee6271b2f49b56ad7f308072f6f44b37118d69c2cad94f3fa8a40d5"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6b5d83030255983181005e6cfbac1617ce9746b219bc2aad52201ad121226581"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3e97b5e938051226dc025ec80980c285b053ffb1e25a3db2a3aa3bc046bf7f56"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d618649d4e70ac6efcbba75be98b26ef5078faad23592f9b51ca492953012429"}, - {file = "multidict-6.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10524ebd769727ac77ef2278390fb0068d83f3acb7773792a5080f2b0abf7748"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ff3827aef427c89a25cc96ded1759271a93603aba9fb977a6d264648ebf989db"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:06809f4f0f7ab7ea2cabf9caca7d79c22c0758b58a71f9d32943ae13c7ace056"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:f179dee3b863ab1c59580ff60f9d99f632f34ccb38bf67a33ec6b3ecadd0fd76"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:aaed8b0562be4a0876ee3b6946f6869b7bcdb571a5d1496683505944e268b160"}, - {file = "multidict-6.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3c8b88a2ccf5493b6c8da9076fb151ba106960a2df90c2633f342f120751a9e7"}, - {file = "multidict-6.1.0-cp310-cp310-win32.whl", hash = "sha256:4a9cb68166a34117d6646c0023c7b759bf197bee5ad4272f420a0141d7eb03a0"}, - {file = "multidict-6.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:20b9b5fbe0b88d0bdef2012ef7dee867f874b72528cf1d08f1d59b0e3850129d"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3efe2c2cb5763f2f1b275ad2bf7a287d3f7ebbef35648a9726e3b69284a4f3d6"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7053d3b0353a8b9de430a4f4b4268ac9a4fb3481af37dfe49825bf45ca24156"}, - {file = "multidict-6.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:27e5fc84ccef8dfaabb09d82b7d179c7cf1a3fbc8a966f8274fcb4ab2eb4cadb"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e2b90b43e696f25c62656389d32236e049568b39320e2735d51f08fd362761b"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d83a047959d38a7ff552ff94be767b7fd79b831ad1cd9920662db05fec24fe72"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d1a9dd711d0877a1ece3d2e4fea11a8e75741ca21954c919406b44e7cf971304"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec2abea24d98246b94913b76a125e855eb5c434f7c46546046372fe60f666351"}, - {file = "multidict-6.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4867cafcbc6585e4b678876c489b9273b13e9fff9f6d6d66add5e15d11d926cb"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5b48204e8d955c47c55b72779802b219a39acc3ee3d0116d5080c388970b76e3"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:d8fff389528cad1618fb4b26b95550327495462cd745d879a8c7c2115248e399"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a7a9541cd308eed5e30318430a9c74d2132e9a8cb46b901326272d780bf2d423"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:da1758c76f50c39a2efd5e9859ce7d776317eb1dd34317c8152ac9251fc574a3"}, - {file = "multidict-6.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c943a53e9186688b45b323602298ab727d8865d8c9ee0b17f8d62d14b56f0753"}, - {file = "multidict-6.1.0-cp311-cp311-win32.whl", hash = "sha256:90f8717cb649eea3504091e640a1b8568faad18bd4b9fcd692853a04475a4b80"}, - {file = "multidict-6.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:82176036e65644a6cc5bd619f65f6f19781e8ec2e5330f51aa9ada7504cc1926"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b04772ed465fa3cc947db808fa306d79b43e896beb677a56fb2347ca1a49c1fa"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6180c0ae073bddeb5a97a38c03f30c233e0a4d39cd86166251617d1bbd0af436"}, - {file = "multidict-6.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:071120490b47aa997cca00666923a83f02c7fbb44f71cf7f136df753f7fa8761"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50b3a2710631848991d0bf7de077502e8994c804bb805aeb2925a981de58ec2e"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b58c621844d55e71c1b7f7c498ce5aa6985d743a1a59034c57a905b3f153c1ef"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55b6d90641869892caa9ca42ff913f7ff1c5ece06474fbd32fb2cf6834726c95"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b820514bfc0b98a30e3d85462084779900347e4d49267f747ff54060cc33925"}, - {file = "multidict-6.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10a9b09aba0c5b48c53761b7c720aaaf7cf236d5fe394cd399c7ba662d5f9966"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1e16bf3e5fc9f44632affb159d30a437bfe286ce9e02754759be5536b169b305"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:76f364861c3bfc98cbbcbd402d83454ed9e01a5224bb3a28bf70002a230f73e2"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:820c661588bd01a0aa62a1283f20d2be4281b086f80dad9e955e690c75fb54a2"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:0e5f362e895bc5b9e67fe6e4ded2492d8124bdf817827f33c5b46c2fe3ffaca6"}, - {file = "multidict-6.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3ec660d19bbc671e3a6443325f07263be452c453ac9e512f5eb935e7d4ac28b3"}, - {file = "multidict-6.1.0-cp312-cp312-win32.whl", hash = "sha256:58130ecf8f7b8112cdb841486404f1282b9c86ccb30d3519faf301b2e5659133"}, - {file = "multidict-6.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:188215fc0aafb8e03341995e7c4797860181562380f81ed0a87ff455b70bf1f1"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:d569388c381b24671589335a3be6e1d45546c2988c2ebe30fdcada8457a31008"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:052e10d2d37810b99cc170b785945421141bf7bb7d2f8799d431e7db229c385f"}, - {file = "multidict-6.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f90c822a402cb865e396a504f9fc8173ef34212a342d92e362ca498cad308e28"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b225d95519a5bf73860323e633a664b0d85ad3d5bede6d30d95b35d4dfe8805b"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:23bfd518810af7de1116313ebd9092cb9aa629beb12f6ed631ad53356ed6b86c"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c09fcfdccdd0b57867577b719c69e347a436b86cd83747f179dbf0cc0d4c1f3"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf6bea52ec97e95560af5ae576bdac3aa3aae0b6758c6efa115236d9e07dae44"}, - {file = "multidict-6.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57feec87371dbb3520da6192213c7d6fc892d5589a93db548331954de8248fd2"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0c3f390dc53279cbc8ba976e5f8035eab997829066756d811616b652b00a23a3"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:59bfeae4b25ec05b34f1956eaa1cb38032282cd4dfabc5056d0a1ec4d696d3aa"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b2f59caeaf7632cc633b5cf6fc449372b83bbdf0da4ae04d5be36118e46cc0aa"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:37bb93b2178e02b7b618893990941900fd25b6b9ac0fa49931a40aecdf083fe4"}, - {file = "multidict-6.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4e9f48f58c2c523d5a06faea47866cd35b32655c46b443f163d08c6d0ddb17d6"}, - {file = "multidict-6.1.0-cp313-cp313-win32.whl", hash = "sha256:3a37ffb35399029b45c6cc33640a92bef403c9fd388acce75cdc88f58bd19a81"}, - {file = "multidict-6.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:e9aa71e15d9d9beaad2c6b9319edcdc0a49a43ef5c0a4c8265ca9ee7d6c67774"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:db7457bac39421addd0c8449933ac32d8042aae84a14911a757ae6ca3eef1392"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d094ddec350a2fb899fec68d8353c78233debde9b7d8b4beeafa70825f1c281a"}, - {file = "multidict-6.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5845c1fd4866bb5dd3125d89b90e57ed3138241540897de748cdf19de8a2fca2"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9079dfc6a70abe341f521f78405b8949f96db48da98aeb43f9907f342f627cdc"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3914f5aaa0f36d5d60e8ece6a308ee1c9784cd75ec8151062614657a114c4478"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c08be4f460903e5a9d0f76818db3250f12e9c344e79314d1d570fc69d7f4eae4"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d093be959277cb7dee84b801eb1af388b6ad3ca6a6b6bf1ed7585895789d027d"}, - {file = "multidict-6.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3702ea6872c5a2a4eeefa6ffd36b042e9773f05b1f37ae3ef7264b1163c2dcf6"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:2090f6a85cafc5b2db085124d752757c9d251548cedabe9bd31afe6363e0aff2"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:f67f217af4b1ff66c68a87318012de788dd95fcfeb24cc889011f4e1c7454dfd"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:189f652a87e876098bbc67b4da1049afb5f5dfbaa310dd67c594b01c10388db6"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:6bb5992037f7a9eff7991ebe4273ea7f51f1c1c511e6a2ce511d0e7bdb754492"}, - {file = "multidict-6.1.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:ac10f4c2b9e770c4e393876e35a7046879d195cd123b4f116d299d442b335bcd"}, - {file = "multidict-6.1.0-cp38-cp38-win32.whl", hash = "sha256:e27bbb6d14416713a8bd7aaa1313c0fc8d44ee48d74497a0ff4c3a1b6ccb5167"}, - {file = "multidict-6.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:22f3105d4fb15c8f57ff3959a58fcab6ce36814486500cd7485651230ad4d4ef"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:4e18b656c5e844539d506a0a06432274d7bd52a7487e6828c63a63d69185626c"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a185f876e69897a6f3325c3f19f26a297fa058c5e456bfcff8015e9a27e83ae1"}, - {file = "multidict-6.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ab7c4ceb38d91570a650dba194e1ca87c2b543488fe9309b4212694174fd539c"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e617fb6b0b6953fffd762669610c1c4ffd05632c138d61ac7e14ad187870669c"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:16e5f4bf4e603eb1fdd5d8180f1a25f30056f22e55ce51fb3d6ad4ab29f7d96f"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4c035da3f544b1882bac24115f3e2e8760f10a0107614fc9839fd232200b875"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:957cf8e4b6e123a9eea554fa7ebc85674674b713551de587eb318a2df3e00255"}, - {file = "multidict-6.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:483a6aea59cb89904e1ceabd2b47368b5600fb7de78a6e4a2c2987b2d256cf30"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:87701f25a2352e5bf7454caa64757642734da9f6b11384c1f9d1a8e699758057"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:682b987361e5fd7a139ed565e30d81fd81e9629acc7d925a205366877d8c8657"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ce2186a7df133a9c895dea3331ddc5ddad42cdd0d1ea2f0a51e5d161e4762f28"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9f636b730f7e8cb19feb87094949ba54ee5357440b9658b2a32a5ce4bce53972"}, - {file = "multidict-6.1.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:73eae06aa53af2ea5270cc066dcaf02cc60d2994bbb2c4ef5764949257d10f43"}, - {file = "multidict-6.1.0-cp39-cp39-win32.whl", hash = "sha256:1ca0083e80e791cffc6efce7660ad24af66c8d4079d2a750b29001b53ff59ada"}, - {file = "multidict-6.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:aa466da5b15ccea564bdab9c89175c762bc12825f4659c11227f515cee76fa4a"}, - {file = "multidict-6.1.0-py3-none-any.whl", hash = "sha256:48e171e52d1c4d33888e529b999e5900356b9ae588c2f09a52dcefb158b27506"}, - {file = "multidict-6.1.0.tar.gz", hash = "sha256:22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a"}, -] - -[package.dependencies] -typing-extensions = {version = ">=4.1.0", markers = "python_version < \"3.11\""} - [[package]] name = "nh3" version = "0.2.19" @@ -1505,7 +1147,6 @@ files = [ {file = "nh3-0.2.19-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:00810cd5275f5c3f44b9eb0e521d1a841ee2f8023622de39ffc7d88bd533d8e0"}, {file = "nh3-0.2.19-cp38-abi3-win32.whl", hash = "sha256:7e98621856b0a911c21faa5eef8f8ea3e691526c2433f9afc2be713cb6fbdb48"}, {file = "nh3-0.2.19-cp38-abi3-win_amd64.whl", hash = "sha256:75c7cafb840f24430b009f7368945cb5ca88b2b54bb384ebfba495f16bc9c121"}, - {file = "nh3-0.2.19.tar.gz", hash = "sha256:790056b54c068ff8dceb443eaefb696b84beff58cca6c07afd754d17692a4804"}, ] [[package]] @@ -1967,113 +1608,6 @@ nodeenv = ">=0.11.1" pyyaml = ">=5.1" virtualenv = ">=20.10.0" -[[package]] -name = "propcache" -version = "0.2.0" -description = "Accelerated property cache" -optional = false -python-versions = ">=3.8" -files = [ - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336"}, - {file = "propcache-0.2.0-cp310-cp310-win32.whl", hash = "sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad"}, - {file = "propcache-0.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b"}, - {file = "propcache-0.2.0-cp311-cp311-win32.whl", hash = "sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1"}, - {file = "propcache-0.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348"}, - {file = "propcache-0.2.0-cp312-cp312-win32.whl", hash = "sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5"}, - {file = "propcache-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544"}, - {file = "propcache-0.2.0-cp313-cp313-win32.whl", hash = "sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032"}, - {file = "propcache-0.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:53d1bd3f979ed529f0805dd35ddaca330f80a9a6d90bc0121d2ff398f8ed8861"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:83928404adf8fb3d26793665633ea79b7361efa0287dfbd372a7e74311d51ee6"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:77a86c261679ea5f3896ec060be9dc8e365788248cc1e049632a1be682442063"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:218db2a3c297a3768c11a34812e63b3ac1c3234c3a086def9c0fee50d35add1f"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7735e82e3498c27bcb2d17cb65d62c14f1100b71723b68362872bca7d0913d90"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20a617c776f520c3875cf4511e0d1db847a076d720714ae35ffe0df3e440be68"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67b69535c870670c9f9b14a75d28baa32221d06f6b6fa6f77a0a13c5a7b0a5b9"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4569158070180c3855e9c0791c56be3ceeb192defa2cdf6a3f39e54319e56b89"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:db47514ffdbd91ccdc7e6f8407aac4ee94cc871b15b577c1c324236b013ddd04"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:2a60ad3e2553a74168d275a0ef35e8c0a965448ffbc3b300ab3a5bb9956c2162"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:662dd62358bdeaca0aee5761de8727cfd6861432e3bb828dc2a693aa0471a563"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:25a1f88b471b3bc911d18b935ecb7115dff3a192b6fef46f0bfaf71ff4f12418"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:f60f0ac7005b9f5a6091009b09a419ace1610e163fa5deaba5ce3484341840e7"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:74acd6e291f885678631b7ebc85d2d4aec458dd849b8c841b57ef04047833bed"}, - {file = "propcache-0.2.0-cp38-cp38-win32.whl", hash = "sha256:d9b6ddac6408194e934002a69bcaadbc88c10b5f38fb9307779d1c629181815d"}, - {file = "propcache-0.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:676135dcf3262c9c5081cc8f19ad55c8a64e3f7282a21266d05544450bffc3a5"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:25c8d773a62ce0451b020c7b29a35cfbc05de8b291163a7a0f3b7904f27253e6"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:375a12d7556d462dc64d70475a9ee5982465fbb3d2b364f16b86ba9135793638"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1ec43d76b9677637a89d6ab86e1fef70d739217fefa208c65352ecf0282be957"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f45eec587dafd4b2d41ac189c2156461ebd0c1082d2fe7013571598abb8505d1"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc092ba439d91df90aea38168e11f75c655880c12782facf5cf9c00f3d42b562"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fa1076244f54bb76e65e22cb6910365779d5c3d71d1f18b275f1dfc7b0d71b4d"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:682a7c79a2fbf40f5dbb1eb6bfe2cd865376deeac65acf9beb607505dced9e12"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e40876731f99b6f3c897b66b803c9e1c07a989b366c6b5b475fafd1f7ba3fb8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:363ea8cd3c5cb6679f1c2f5f1f9669587361c062e4899fce56758efa928728f8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:140fbf08ab3588b3468932974a9331aff43c0ab8a2ec2c608b6d7d1756dbb6cb"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e70fac33e8b4ac63dfc4c956fd7d85a0b1139adcfc0d964ce288b7c527537fea"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b33d7a286c0dc1a15f5fc864cc48ae92a846df287ceac2dd499926c3801054a6"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:f6d5749fdd33d90e34c2efb174c7e236829147a2713334d708746e94c4bde40d"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22aa8f2272d81d9317ff5756bb108021a056805ce63dd3630e27d042c8092798"}, - {file = "propcache-0.2.0-cp39-cp39-win32.whl", hash = "sha256:73e4b40ea0eda421b115248d7e79b59214411109a5bc47d0d48e4c73e3b8fcf9"}, - {file = "propcache-0.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:9517d5e9e0731957468c29dbfd0f976736a0e55afaea843726e887f36fe017df"}, - {file = "propcache-0.2.0-py3-none-any.whl", hash = "sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036"}, - {file = "propcache-0.2.0.tar.gz", hash = "sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70"}, -] - [[package]] name = "psutil" version = "6.1.0" @@ -3520,102 +3054,6 @@ files = [ [package.dependencies] h11 = ">=0.9.0,<1" -[[package]] -name = "yarl" -version = "1.17.1" -description = "Yet another URL library" -optional = false -python-versions = ">=3.9" -files = [ - {file = "yarl-1.17.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1794853124e2f663f0ea54efb0340b457f08d40a1cef78edfa086576179c91"}, - {file = "yarl-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fbea1751729afe607d84acfd01efd95e3b31db148a181a441984ce9b3d3469da"}, - {file = "yarl-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8ee427208c675f1b6e344a1f89376a9613fc30b52646a04ac0c1f6587c7e46ec"}, - {file = "yarl-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b74ff4767d3ef47ffe0cd1d89379dc4d828d4873e5528976ced3b44fe5b0a21"}, - {file = "yarl-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:62a91aefff3d11bf60e5956d340eb507a983a7ec802b19072bb989ce120cd948"}, - {file = "yarl-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:846dd2e1243407133d3195d2d7e4ceefcaa5f5bf7278f0a9bda00967e6326b04"}, - {file = "yarl-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e844be8d536afa129366d9af76ed7cb8dfefec99f5f1c9e4f8ae542279a6dc3"}, - {file = "yarl-1.17.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cc7c92c1baa629cb03ecb0c3d12564f172218fb1739f54bf5f3881844daadc6d"}, - {file = "yarl-1.17.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ae3476e934b9d714aa8000d2e4c01eb2590eee10b9d8cd03e7983ad65dfbfcba"}, - {file = "yarl-1.17.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c7e177c619342e407415d4f35dec63d2d134d951e24b5166afcdfd1362828e17"}, - {file = "yarl-1.17.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:64cc6e97f14cf8a275d79c5002281f3040c12e2e4220623b5759ea7f9868d6a5"}, - {file = "yarl-1.17.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:84c063af19ef5130084db70ada40ce63a84f6c1ef4d3dbc34e5e8c4febb20822"}, - {file = "yarl-1.17.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:482c122b72e3c5ec98f11457aeb436ae4aecca75de19b3d1de7cf88bc40db82f"}, - {file = "yarl-1.17.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:380e6c38ef692b8fd5a0f6d1fa8774d81ebc08cfbd624b1bca62a4d4af2f9931"}, - {file = "yarl-1.17.1-cp310-cp310-win32.whl", hash = "sha256:16bca6678a83657dd48df84b51bd56a6c6bd401853aef6d09dc2506a78484c7b"}, - {file = "yarl-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:561c87fea99545ef7d692403c110b2f99dced6dff93056d6e04384ad3bc46243"}, - {file = "yarl-1.17.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:cbad927ea8ed814622305d842c93412cb47bd39a496ed0f96bfd42b922b4a217"}, - {file = "yarl-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fca4b4307ebe9c3ec77a084da3a9d1999d164693d16492ca2b64594340999988"}, - {file = "yarl-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff5c6771c7e3511a06555afa317879b7db8d640137ba55d6ab0d0c50425cab75"}, - {file = "yarl-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b29beab10211a746f9846baa39275e80034e065460d99eb51e45c9a9495bcca"}, - {file = "yarl-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a52a1ffdd824fb1835272e125385c32fd8b17fbdefeedcb4d543cc23b332d74"}, - {file = "yarl-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:58c8e9620eb82a189c6c40cb6b59b4e35b2ee68b1f2afa6597732a2b467d7e8f"}, - {file = "yarl-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d216e5d9b8749563c7f2c6f7a0831057ec844c68b4c11cb10fc62d4fd373c26d"}, - {file = "yarl-1.17.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:881764d610e3269964fc4bb3c19bb6fce55422828e152b885609ec176b41cf11"}, - {file = "yarl-1.17.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8c79e9d7e3d8a32d4824250a9c6401194fb4c2ad9a0cec8f6a96e09a582c2cc0"}, - {file = "yarl-1.17.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:299f11b44d8d3a588234adbe01112126010bd96d9139c3ba7b3badd9829261c3"}, - {file = "yarl-1.17.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:cc7d768260f4ba4ea01741c1b5fe3d3a6c70eb91c87f4c8761bbcce5181beafe"}, - {file = "yarl-1.17.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:de599af166970d6a61accde358ec9ded821234cbbc8c6413acfec06056b8e860"}, - {file = "yarl-1.17.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:2b24ec55fad43e476905eceaf14f41f6478780b870eda5d08b4d6de9a60b65b4"}, - {file = "yarl-1.17.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9fb815155aac6bfa8d86184079652c9715c812d506b22cfa369196ef4e99d1b4"}, - {file = "yarl-1.17.1-cp311-cp311-win32.whl", hash = "sha256:7615058aabad54416ddac99ade09a5510cf77039a3b903e94e8922f25ed203d7"}, - {file = "yarl-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:14bc88baa44e1f84164a392827b5defb4fa8e56b93fecac3d15315e7c8e5d8b3"}, - {file = "yarl-1.17.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:327828786da2006085a4d1feb2594de6f6d26f8af48b81eb1ae950c788d97f61"}, - {file = "yarl-1.17.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cc353841428d56b683a123a813e6a686e07026d6b1c5757970a877195f880c2d"}, - {file = "yarl-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c73df5b6e8fabe2ddb74876fb82d9dd44cbace0ca12e8861ce9155ad3c886139"}, - {file = "yarl-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bdff5e0995522706c53078f531fb586f56de9c4c81c243865dd5c66c132c3b5"}, - {file = "yarl-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06157fb3c58f2736a5e47c8fcbe1afc8b5de6fb28b14d25574af9e62150fcaac"}, - {file = "yarl-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1654ec814b18be1af2c857aa9000de7a601400bd4c9ca24629b18486c2e35463"}, - {file = "yarl-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f6595c852ca544aaeeb32d357e62c9c780eac69dcd34e40cae7b55bc4fb1147"}, - {file = "yarl-1.17.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:459e81c2fb920b5f5df744262d1498ec2c8081acdcfe18181da44c50f51312f7"}, - {file = "yarl-1.17.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7e48cdb8226644e2fbd0bdb0a0f87906a3db07087f4de77a1b1b1ccfd9e93685"}, - {file = "yarl-1.17.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d9b6b28a57feb51605d6ae5e61a9044a31742db557a3b851a74c13bc61de5172"}, - {file = "yarl-1.17.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e594b22688d5747b06e957f1ef822060cb5cb35b493066e33ceac0cf882188b7"}, - {file = "yarl-1.17.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5f236cb5999ccd23a0ab1bd219cfe0ee3e1c1b65aaf6dd3320e972f7ec3a39da"}, - {file = "yarl-1.17.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a2a64e62c7a0edd07c1c917b0586655f3362d2c2d37d474db1a509efb96fea1c"}, - {file = "yarl-1.17.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d0eea830b591dbc68e030c86a9569826145df485b2b4554874b07fea1275a199"}, - {file = "yarl-1.17.1-cp312-cp312-win32.whl", hash = "sha256:46ddf6e0b975cd680eb83318aa1d321cb2bf8d288d50f1754526230fcf59ba96"}, - {file = "yarl-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:117ed8b3732528a1e41af3aa6d4e08483c2f0f2e3d3d7dca7cf538b3516d93df"}, - {file = "yarl-1.17.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:5d1d42556b063d579cae59e37a38c61f4402b47d70c29f0ef15cee1acaa64488"}, - {file = "yarl-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c0167540094838ee9093ef6cc2c69d0074bbf84a432b4995835e8e5a0d984374"}, - {file = "yarl-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2f0a6423295a0d282d00e8701fe763eeefba8037e984ad5de44aa349002562ac"}, - {file = "yarl-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5b078134f48552c4d9527db2f7da0b5359abd49393cdf9794017baec7506170"}, - {file = "yarl-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d401f07261dc5aa36c2e4efc308548f6ae943bfff20fcadb0a07517a26b196d8"}, - {file = "yarl-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b5f1ac7359e17efe0b6e5fec21de34145caef22b260e978336f325d5c84e6938"}, - {file = "yarl-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f63d176a81555984e91f2c84c2a574a61cab7111cc907e176f0f01538e9ff6e"}, - {file = "yarl-1.17.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e275792097c9f7e80741c36de3b61917aebecc08a67ae62899b074566ff8556"}, - {file = "yarl-1.17.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:81713b70bea5c1386dc2f32a8f0dab4148a2928c7495c808c541ee0aae614d67"}, - {file = "yarl-1.17.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:aa46dce75078fceaf7cecac5817422febb4355fbdda440db55206e3bd288cfb8"}, - {file = "yarl-1.17.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1ce36ded585f45b1e9bb36d0ae94765c6608b43bd2e7f5f88079f7a85c61a4d3"}, - {file = "yarl-1.17.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:2d374d70fdc36f5863b84e54775452f68639bc862918602d028f89310a034ab0"}, - {file = "yarl-1.17.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2d9f0606baaec5dd54cb99667fcf85183a7477f3766fbddbe3f385e7fc253299"}, - {file = "yarl-1.17.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b0341e6d9a0c0e3cdc65857ef518bb05b410dbd70d749a0d33ac0f39e81a4258"}, - {file = "yarl-1.17.1-cp313-cp313-win32.whl", hash = "sha256:2e7ba4c9377e48fb7b20dedbd473cbcbc13e72e1826917c185157a137dac9df2"}, - {file = "yarl-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:949681f68e0e3c25377462be4b658500e85ca24323d9619fdc41f68d46a1ffda"}, - {file = "yarl-1.17.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8994b29c462de9a8fce2d591028b986dbbe1b32f3ad600b2d3e1c482c93abad6"}, - {file = "yarl-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f9cbfbc5faca235fbdf531b93aa0f9f005ec7d267d9d738761a4d42b744ea159"}, - {file = "yarl-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b40d1bf6e6f74f7c0a567a9e5e778bbd4699d1d3d2c0fe46f4b717eef9e96b95"}, - {file = "yarl-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5efe0661b9fcd6246f27957f6ae1c0eb29bc60552820f01e970b4996e016004"}, - {file = "yarl-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b5c4804e4039f487e942c13381e6c27b4b4e66066d94ef1fae3f6ba8b953f383"}, - {file = "yarl-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b5d6a6c9602fd4598fa07e0389e19fe199ae96449008d8304bf5d47cb745462e"}, - {file = "yarl-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f4c9156c4d1eb490fe374fb294deeb7bc7eaccda50e23775b2354b6a6739934"}, - {file = "yarl-1.17.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6324274b4e0e2fa1b3eccb25997b1c9ed134ff61d296448ab8269f5ac068c4c"}, - {file = "yarl-1.17.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:d8a8b74d843c2638f3864a17d97a4acda58e40d3e44b6303b8cc3d3c44ae2d29"}, - {file = "yarl-1.17.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:7fac95714b09da9278a0b52e492466f773cfe37651cf467a83a1b659be24bf71"}, - {file = "yarl-1.17.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:c180ac742a083e109c1a18151f4dd8675f32679985a1c750d2ff806796165b55"}, - {file = "yarl-1.17.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:578d00c9b7fccfa1745a44f4eddfdc99d723d157dad26764538fbdda37209857"}, - {file = "yarl-1.17.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1a3b91c44efa29e6c8ef8a9a2b583347998e2ba52c5d8280dbd5919c02dfc3b5"}, - {file = "yarl-1.17.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a7ac5b4984c468ce4f4a553df281450df0a34aefae02e58d77a0847be8d1e11f"}, - {file = "yarl-1.17.1-cp39-cp39-win32.whl", hash = "sha256:7294e38f9aa2e9f05f765b28ffdc5d81378508ce6dadbe93f6d464a8c9594473"}, - {file = "yarl-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:eb6dce402734575e1a8cc0bb1509afca508a400a57ce13d306ea2c663bad1138"}, - {file = "yarl-1.17.1-py3-none-any.whl", hash = "sha256:f1790a4b1e8e8e028c391175433b9c8122c39b46e1663228158e61e6f915bf06"}, - {file = "yarl-1.17.1.tar.gz", hash = "sha256:067a63fcfda82da6b198fa73079b1ca40b7c9b7994995b6ee38acda728b64d47"}, -] - -[package.dependencies] -idna = ">=2.0" -multidict = ">=4.0" -propcache = ">=0.2.0" - [[package]] name = "zipp" version = "3.21.0" @@ -3635,10 +3073,7 @@ enabler = ["pytest-enabler (>=2.2)"] test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] -[extras] -proxy = ["asgiproxy"] - [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "a2923e478d2f16aa84c5c36b4b9169e7a2d263e3b1060585bf33b9980a10324a" +content-hash = "d62cd1897d8f73e9aad9e907beb82be509dc5e33d8f37b36ebf26ad1f3075a9f" diff --git a/pyproject.toml b/pyproject.toml index fb803fbaf..eccf21230 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,6 @@ setuptools = ">=75.0" httpx = ">=0.25.1,<1.0" twine = ">=4.0.0,<7.0" tomlkit = ">=0.12.4,<1.0" -asgiproxy = { version = "==0.1.1", optional = true } lazy_loader = ">=0.4" reflex-chakra = ">=0.6.0" typing_extensions = ">=4.6.0" @@ -73,14 +72,10 @@ selenium = ">=4.11.0,<5.0" pytest-benchmark = ">=4.0.0,<6.0" playwright = ">=1.46.0" pytest-playwright = ">=0.5.1" -asgiproxy = "==0.1.1" [tool.poetry.scripts] reflex = "reflex.reflex:cli" -[tool.poetry.extras] -proxy = ["asgiproxy"] - [build-system] requires = ["poetry-core>=1.5.1"] build-backend = "poetry.core.masonry.api" diff --git a/reflex/app.py b/reflex/app.py index 89ee4c164..08cb4314e 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -332,12 +332,6 @@ class App(MiddlewareMixin, LifespanMixin): self.register_lifespan_task(windows_hot_reload_lifespan_hack) - # Enable proxying to frontend server. - if not environment.REFLEX_BACKEND_ONLY.get(): - from reflex.proxy import proxy_middleware - - self.register_lifespan_task(proxy_middleware) - def _enable_state(self) -> None: """Enable state for the app.""" if not self.state: diff --git a/reflex/config.py b/reflex/config.py index 87d9ce665..0579b019f 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -26,7 +26,6 @@ from typing import ( from typing_extensions import Annotated, get_type_hints -from reflex.utils.console import set_log_level from reflex.utils.exceptions import ConfigError, EnvironmentVarValueError from reflex.utils.types import GenericType, is_union, value_inside_optional @@ -600,7 +599,6 @@ class Config(Base): class Config: """Pydantic config for the config.""" - use_enum_values = False validate_assignment = True # The name of the app (should match the name of the app directory). @@ -720,9 +718,6 @@ class Config(Base): self._non_default_attributes.update(kwargs) self._replace_defaults(**kwargs) - # Set the log level for this process - set_log_level(self.loglevel) - if ( self.state_manager_mode == constants.StateManagerMode.REDIS and not self.redis_url diff --git a/reflex/proxy.py b/reflex/proxy.py deleted file mode 100644 index 47f36c8bd..000000000 --- a/reflex/proxy.py +++ /dev/null @@ -1,119 +0,0 @@ -"""Handle proxying frontend requests from the backend server.""" - -from __future__ import annotations - -import asyncio -from contextlib import asynccontextmanager -from typing import Any, AsyncGenerator -from urllib.parse import urlparse - -from fastapi import FastAPI -from starlette.types import ASGIApp, Receive, Scope, Send - -from .config import get_config -from .utils import console - -try: - import aiohttp - from asgiproxy.config import BaseURLProxyConfigMixin, ProxyConfig - from asgiproxy.context import ProxyContext - from asgiproxy.proxies.http import proxy_http - from asgiproxy.simple_proxy import make_simple_proxy_app -except ImportError: - - @asynccontextmanager - async def proxy_middleware(*args, **kwargs) -> AsyncGenerator[None, None]: - """A no-op proxy middleware for when asgiproxy is not installed. - - Args: - *args: The positional arguments. - **kwargs: The keyword arguments. - - Yields: - None - """ - yield -else: - MAX_PROXY_RETRY = 25 - - async def proxy_http_with_retry( - *, - context: ProxyContext, - scope: Scope, - receive: Receive, - send: Send, - ) -> Any: - """Proxy an HTTP request with retries. - - Args: - context: The proxy context. - scope: The request scope. - receive: The receive channel. - send: The send channel. - - Returns: - The response from `proxy_http`. - """ - for _attempt in range(MAX_PROXY_RETRY): - try: - return await proxy_http( - context=context, - scope=scope, - receive=receive, - send=send, - ) - except aiohttp.ClientError as err: # noqa: PERF203 - console.debug( - f"Retrying request {scope['path']} due to client error {err!r}." - ) - await asyncio.sleep(0.3) - except Exception as ex: - console.debug( - f"Retrying request {scope['path']} due to unhandled exception {ex!r}." - ) - await asyncio.sleep(0.3) - - def _get_proxy_app_with_context(frontend_host: str) -> tuple[ProxyContext, ASGIApp]: - """Get the proxy app with the given frontend host. - - Args: - frontend_host: The frontend host to proxy requests to. - - Returns: - The proxy context and app. - """ - - class LocalProxyConfig(BaseURLProxyConfigMixin, ProxyConfig): - upstream_base_url = frontend_host - rewrite_host_header = urlparse(upstream_base_url).netloc - - proxy_context = ProxyContext(LocalProxyConfig()) - proxy_app = make_simple_proxy_app( - proxy_context, proxy_http_handler=proxy_http_with_retry - ) - return proxy_context, proxy_app - - @asynccontextmanager - async def proxy_middleware( # pyright: ignore[reportGeneralTypeIssues] - app: FastAPI, - ) -> AsyncGenerator[None, None]: - """A middleware to proxy requests to the separate frontend server. - - The proxy is installed on the / endpoint of the FastAPI instance. - - Args: - app: The FastAPI instance. - - Yields: - None - """ - config = get_config() - backend_port = config.backend_port - frontend_host = f"http://localhost:{config.frontend_port}" - proxy_context, proxy_app = _get_proxy_app_with_context(frontend_host) - app.mount("/", proxy_app) - console.debug( - f"Proxying '/' requests on port {backend_port} to {frontend_host}" - ) - async with proxy_context: - yield diff --git a/reflex/testing.py b/reflex/testing.py index 582d7f8c9..b3dedf398 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -44,7 +44,6 @@ import reflex.utils.format import reflex.utils.prerequisites import reflex.utils.processes from reflex.config import environment -from reflex.proxy import proxy_middleware from reflex.state import ( BaseState, StateManager, @@ -299,9 +298,6 @@ class AppHarness: self.state_manager = StateManagerRedis.create(self.app_instance.state) else: self.state_manager = self.app_instance._state_manager - # Disable proxy for app harness tests. - if proxy_middleware in self.app_instance.lifespan_tasks: - self.app_instance.lifespan_tasks.remove(proxy_middleware) def _reload_state_module(self): """Reload the rx.State module to avoid conflict when reloading.""" @@ -369,12 +365,9 @@ class AppHarness: def _start_frontend(self): # Set up the frontend. with chdir(self.app_path): - backend_host, backend_port = self._poll_for_servers().getsockname() config = reflex.config.get_config() - config.backend_port = backend_port config.api_url = "http://{0}:{1}".format( - backend_host, - backend_port, + *self._poll_for_servers().getsockname(), ) reflex.utils.build.setup_frontend(self.app_path) @@ -399,7 +392,6 @@ class AppHarness: self.frontend_url = m.group(1) config = reflex.config.get_config() config.deploy_url = self.frontend_url - config.frontend_port = int(self.frontend_url.rpartition(":")[2]) break if self.frontend_url is None: raise RuntimeError("Frontend did not start") @@ -923,20 +915,17 @@ class AppHarnessProd(AppHarness): root=web_root, error_page_map=error_page_map, ) as self.frontend_server: - config = reflex.config.get_config() - config.frontend_port = self.frontend_server.server_address[1] - self.frontend_url = f"http://localhost:{config.frontend_port}" + self.frontend_url = "http://localhost:{1}".format( + *self.frontend_server.socket.getsockname() + ) self.frontend_server.serve_forever() def _start_frontend(self): # Set up the frontend. with chdir(self.app_path): - backend_host, backend_port = self._poll_for_servers().getsockname() config = reflex.config.get_config() - config.backend_port = backend_port config.api_url = "http://{0}:{1}".format( - backend_host, - backend_port, + *self._poll_for_servers().getsockname(), ) reflex.reflex.export( zipping=False, diff --git a/reflex/utils/console.py b/reflex/utils/console.py index 1c08a04b6..be545140a 100644 --- a/reflex/utils/console.py +++ b/reflex/utils/console.py @@ -2,8 +2,6 @@ from __future__ import annotations -import os - from rich.console import Console from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn from rich.prompt import Prompt @@ -14,7 +12,7 @@ from reflex.constants import LogLevel _console = Console() # The current log level. -_LOG_LEVEL = LogLevel.DEFAULT +_LOG_LEVEL = LogLevel.INFO # Deprecated features who's warning has been printed. _EMITTED_DEPRECATION_WARNINGS = set() @@ -63,9 +61,6 @@ def set_log_level(log_level: LogLevel): raise ValueError(f"Invalid log level: {log_level}") from ae global _LOG_LEVEL - if log_level != _LOG_LEVEL: - # Set the loglevel persistently for subprocesses - os.environ["LOGLEVEL"] = log_level.value _LOG_LEVEL = log_level diff --git a/scripts/integration.sh b/scripts/integration.sh index 41d3051d0..dc8b5d553 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -34,4 +34,4 @@ if [ -f /proc/$pid/winpid ]; then echo "Windows detected, passing winpid $pid to port waiter" fi -python scripts/wait_for_listening_port.py $check_ports --timeout=900 --server-pid "$pid" $WAIT_FOR_LISTENING_PORT_ARGS +python scripts/wait_for_listening_port.py $check_ports --timeout=900 --server-pid "$pid" diff --git a/scripts/wait_for_listening_port.py b/scripts/wait_for_listening_port.py index 71b6dd8b2..43581f0bc 100644 --- a/scripts/wait_for_listening_port.py +++ b/scripts/wait_for_listening_port.py @@ -10,8 +10,6 @@ import time from concurrent.futures import ThreadPoolExecutor, as_completed from typing import Tuple -import httpx - # psutil is already a dependency of Reflex itself - so it's OK to use import psutil @@ -25,7 +23,6 @@ def _pid_exists(pid): return pid in psutil.pids() -# Not really used anymore now that we actually check the HTTP response. def _wait_for_port(port, server_pid, timeout) -> Tuple[bool, str]: start = time.time() print(f"Waiting for up to {timeout} seconds for port {port} to start listening.") # noqa: T201 @@ -44,70 +41,25 @@ def _wait_for_port(port, server_pid, timeout) -> Tuple[bool, str]: time.sleep(5) -def _wait_for_http_response(port, server_pid, timeout, path) -> Tuple[bool, str, str]: - start = time.time() - if path[0] != "/": - # This is a hack for passing the path on windows without a leading slash - # which mangles it https://stackoverflow.com/a/49013604 - path = "/" + path - url = f"http://localhost:{port}{path}" - print(f"Waiting for up to {timeout} seconds for {url} to return HTTP response.") # noqa: T201 - while True: - try: - if not _pid_exists(server_pid): - return False, f"Server PID {server_pid} is not running.", "" - response = httpx.get(url, timeout=0.5) - response.raise_for_status() - return ( - True, - f"{url} returned response after {time.time() - start} seconds", - response.text, - ) - except Exception as exc: # noqa: PERF203 - if time.time() - start > timeout: - return ( - False, - f"{url} still returning errors after {timeout} seconds: {exc!r}.", - "", - ) - time.sleep(5) - - def main(): """Wait for ports to start listening.""" parser = argparse.ArgumentParser(description="Wait for ports to start listening.") parser.add_argument("port", type=int, nargs="+") parser.add_argument("--timeout", type=int, required=True) parser.add_argument("--server-pid", type=int) - parser.add_argument("--path", type=str, default="/") args = parser.parse_args() - start = time.time() executor = ThreadPoolExecutor(max_workers=len(args.port)) futures = [ - executor.submit( - _wait_for_http_response, - p, - args.server_pid, - args.timeout, - args.path, - ) + executor.submit(_wait_for_port, p, args.server_pid, args.timeout) for p in args.port ] - base_content = None for f in as_completed(futures): - ok, msg, content = f.result() + ok, msg = f.result() if ok: print(f"OK: {msg}") # noqa: T201 - if base_content is None: - base_content = content - else: - assert ( - content == base_content - ), f"HTTP responses are not equal {content!r} != {base_content!r}." else: print(f"FAIL: {msg}") # noqa: T201 exit(1) - print(f"OK: All HTTP responses are equal after {time.time() - start} sec.") # noqa: T201 if __name__ == "__main__": diff --git a/tests/integration/init-test/in_docker_test_script.sh b/tests/integration/init-test/in_docker_test_script.sh index 54f821ccf..31d245588 100755 --- a/tests/integration/init-test/in_docker_test_script.sh +++ b/tests/integration/init-test/in_docker_test_script.sh @@ -29,7 +29,7 @@ source ~/venv/bin/activate pip install -U pip echo "Installing reflex from local repo code" -pip install '/reflex-repo[proxy]' +pip install /reflex-repo redis-server & From 1e7a37bcf941dec4295a82a9f8187639e95a38cf Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 10 Jan 2025 15:23:16 -0800 Subject: [PATCH 005/144] [ENG-4351] Add mapping for lucide icons (#4622) * [ENG-4351] Add mapping for lucide icons For icon names that don't auto-translate to the correct lucide tag name, provide manual override. Fix #4621 * account for new mapping in unit tests --- reflex/components/lucide/icon.py | 14 +++++++++++++- reflex/components/lucide/icon.pyi | 4 ++++ tests/units/components/lucide/test_icon.py | 10 ++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/reflex/components/lucide/icon.py b/reflex/components/lucide/icon.py index 6b7692643..04410ac56 100644 --- a/reflex/components/lucide/icon.py +++ b/reflex/components/lucide/icon.py @@ -56,7 +56,12 @@ class Icon(LucideIconComponent): "\nSee full list at https://lucide.dev/icons." ) - props["tag"] = format.to_title_case(format.to_snake_case(props["tag"])) + "Icon" + if props["tag"] in LUCIDE_ICON_MAPPING_OVERRIDE: + props["tag"] = LUCIDE_ICON_MAPPING_OVERRIDE[props["tag"]] + else: + props["tag"] = ( + format.to_title_case(format.to_snake_case(props["tag"])) + "Icon" + ) props["alias"] = f"Lucide{props['tag']}" props.setdefault("color", "var(--current-color)") return super().create(*children, **props) @@ -1634,3 +1639,10 @@ LUCIDE_ICON_LIST = [ "zoom_in", "zoom_out", ] + +# The default transformation of some icon names doesn't match how the +# icons are exported from Lucide. Manual overrides can go here. +LUCIDE_ICON_MAPPING_OVERRIDE = { + "grid_2x_2_check": "Grid2x2Check", + "grid_2x_2_x": "Grid2x2X", +} diff --git a/reflex/components/lucide/icon.pyi b/reflex/components/lucide/icon.pyi index 61697aa2a..39a1da0e6 100644 --- a/reflex/components/lucide/icon.pyi +++ b/reflex/components/lucide/icon.pyi @@ -1682,3 +1682,7 @@ LUCIDE_ICON_LIST = [ "zoom_in", "zoom_out", ] +LUCIDE_ICON_MAPPING_OVERRIDE = { + "grid_2x_2_check": "Grid2x2Check", + "grid_2x_2_x": "Grid2x2X", +} diff --git a/tests/units/components/lucide/test_icon.py b/tests/units/components/lucide/test_icon.py index b0a3475dd..19bea7a7f 100644 --- a/tests/units/components/lucide/test_icon.py +++ b/tests/units/components/lucide/test_icon.py @@ -1,13 +1,19 @@ import pytest -from reflex.components.lucide.icon import LUCIDE_ICON_LIST, Icon +from reflex.components.lucide.icon import ( + LUCIDE_ICON_LIST, + LUCIDE_ICON_MAPPING_OVERRIDE, + Icon, +) from reflex.utils import format @pytest.mark.parametrize("tag", LUCIDE_ICON_LIST) def test_icon(tag): icon = Icon.create(tag) - assert icon.alias == f"Lucide{format.to_title_case(tag)}Icon" + assert icon.alias == "Lucide" + LUCIDE_ICON_MAPPING_OVERRIDE.get( + tag, f"{format.to_title_case(tag)}Icon" + ) def test_icon_missing_tag(): From f69be58f59b98097fecf967931b59757308e07fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 14 Jan 2025 06:02:54 -0800 Subject: [PATCH 006/144] small fix for color_mode_button (#4634) --- reflex/components/radix/themes/color_mode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reflex/components/radix/themes/color_mode.py b/reflex/components/radix/themes/color_mode.py index 2dd0f5e83..e93a26ef6 100644 --- a/reflex/components/radix/themes/color_mode.py +++ b/reflex/components/radix/themes/color_mode.py @@ -151,8 +151,8 @@ class ColorModeIconButton(IconButton): dropdown_menu.trigger( super().create( ColorModeIcon.create(), - **props, - ) + ), + **props, ), dropdown_menu.content( color_mode_item("light"), From e8a71122496856fbf20033aab3e3a858fe98d5c1 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 15 Jan 2025 13:04:15 -0800 Subject: [PATCH 007/144] [ENG-4383] Handle special float values on frontend (#4638) Add a test case to `test_computed_vars.py` which renders a list of special floats. Fix #4637 --- reflex/.templates/web/utils/state.js | 9 ++++++++- tests/integration/test_computed_vars.py | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index 41dbee446..ec603fd13 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -410,7 +410,14 @@ export const connect = async ( autoUnref: false, }); // Ensure undefined fields in events are sent as null instead of removed - socket.current.io.encoder.replacer = (k, v) => (v === undefined ? null : v) + socket.current.io.encoder.replacer = (k, v) => (v === undefined ? null : v); + socket.current.io.decoder.tryParse = (str) => { + try { + return JSON5.parse(str); + } catch (e) { + return false; + } + }; function checkVisibility() { if (document.visibilityState === "visible") { diff --git a/tests/integration/test_computed_vars.py b/tests/integration/test_computed_vars.py index 03aaf18b4..efa129430 100644 --- a/tests/integration/test_computed_vars.py +++ b/tests/integration/test_computed_vars.py @@ -58,6 +58,11 @@ def ComputedVars(): def depends_on_count3(self) -> int: return self.count + # special floats should be properly decoded on the frontend + @rx.var(cache=True, initial_value=[]) + def special_floats(self) -> list[float]: + return [42.9, float("nan"), float("inf"), float("-inf")] + @rx.event def increment(self): self.count += 1 @@ -103,6 +108,11 @@ def ComputedVars(): State.depends_on_count3, id="depends_on_count3", ), + rx.text("special_floats:"), + rx.text( + State.special_floats.join(", "), + id="special_floats", + ), ), ) @@ -224,6 +234,10 @@ async def test_computed_vars( assert depends_on_count3 assert depends_on_count3.text == "0" + special_floats = driver.find_element(By.ID, "special_floats") + assert special_floats + assert special_floats.text == "42.9, NaN, Infinity, -Infinity" + increment = driver.find_element(By.ID, "increment") assert increment.is_enabled() From caf29c368068616f4e899c7d5dca8e80cb20d774 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 15 Jan 2025 14:17:58 -0800 Subject: [PATCH 008/144] put import at the top of dynamic component evaluation (#4632) --- reflex/components/dynamic.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/reflex/components/dynamic.py b/reflex/components/dynamic.py index fbfc55f97..806d610df 100644 --- a/reflex/components/dynamic.py +++ b/reflex/components/dynamic.py @@ -136,6 +136,23 @@ def load_dynamic_serializer(): module_code_lines.insert(0, "const React = window.__reflex.react;") + function_line = next( + index + for index, line in enumerate(module_code_lines) + if line.startswith("export default function") + ) + + module_code_lines = [ + line + for _, line in sorted( + enumerate(module_code_lines), + key=lambda x: ( + not (x[1].startswith("import ") and x[0] < function_line), + x[0], + ), + ) + ] + return "\n".join( [ "//__reflex_evaluate", From fbf9524a6cdca99efaa04892f01b9269a6756034 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 15 Jan 2025 14:19:11 -0800 Subject: [PATCH 009/144] Show file and line number in deprecation warnings (#4631) * Show file and line number in deprecation warnings * Exclude modules/packages by import Less bespoke method of considering some packages to be part of the framework and passed over when finding user code. --- reflex/utils/console.py | 50 ++++++++++++++++++++++++++++++++++++++--- reflex/vars/base.py | 4 ++-- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/reflex/utils/console.py b/reflex/utils/console.py index be545140a..8929b63b6 100644 --- a/reflex/utils/console.py +++ b/reflex/utils/console.py @@ -2,6 +2,11 @@ from __future__ import annotations +import inspect +import shutil +from pathlib import Path +from types import FrameType + from rich.console import Console from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn from rich.prompt import Prompt @@ -188,6 +193,33 @@ def warn(msg: str, dedupe: bool = False, **kwargs): print(f"[orange1]Warning: {msg}[/orange1]", **kwargs) +def _get_first_non_framework_frame() -> FrameType | None: + import click + import typer + import typing_extensions + + import reflex as rx + + # Exclude utility modules that should never be the source of deprecated reflex usage. + exclude_modules = [click, rx, typer, typing_extensions] + exclude_roots = [ + p.parent.resolve() + if (p := Path(m.__file__)).name == "__init__.py" + else p.resolve() + for m in exclude_modules + ] + # Specifically exclude the reflex cli module. + if reflex_bin := shutil.which(b"reflex"): + exclude_roots.append(Path(reflex_bin.decode())) + + frame = inspect.currentframe() + while frame := frame and frame.f_back: + frame_path = Path(inspect.getfile(frame)).resolve() + if not any(frame_path.is_relative_to(root) for root in exclude_roots): + break + return frame + + def deprecate( feature_name: str, reason: str, @@ -206,15 +238,27 @@ def deprecate( dedupe: If True, suppress multiple console logs of deprecation message. kwargs: Keyword arguments to pass to the print function. """ - if feature_name not in _EMITTED_DEPRECATION_WARNINGS: + dedupe_key = feature_name + loc = "" + + # See if we can find where the deprecation exists in "user code" + origin_frame = _get_first_non_framework_frame() + if origin_frame is not None: + filename = Path(origin_frame.f_code.co_filename) + if filename.is_relative_to(Path.cwd()): + filename = filename.relative_to(Path.cwd()) + loc = f"{filename}:{origin_frame.f_lineno}" + dedupe_key = f"{dedupe_key} {loc}" + + if dedupe_key not in _EMITTED_DEPRECATION_WARNINGS: msg = ( f"{feature_name} has been deprecated in version {deprecation_version} {reason.rstrip('.')}. It will be completely " - f"removed in {removal_version}" + f"removed in {removal_version}. ({loc})" ) if _LOG_LEVEL <= LogLevel.WARNING: print(f"[yellow]DeprecationWarning: {msg}[/yellow]", **kwargs) if dedupe: - _EMITTED_DEPRECATION_WARNINGS.add(feature_name) + _EMITTED_DEPRECATION_WARNINGS.add(dedupe_key) def error(msg: str, dedupe: bool = False, **kwargs): diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 0a93901cd..4a75164f4 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -561,7 +561,7 @@ class Var(Generic[VAR_TYPE]): if _var_is_local is not None: console.deprecate( feature_name="_var_is_local", - reason="The _var_is_local argument is not supported for Var." + reason="The _var_is_local argument is not supported for Var. " "If you want to create a Var from a raw Javascript expression, use the constructor directly", deprecation_version="0.6.0", removal_version="0.7.0", @@ -569,7 +569,7 @@ class Var(Generic[VAR_TYPE]): if _var_is_string is not None: console.deprecate( feature_name="_var_is_string", - reason="The _var_is_string argument is not supported for Var." + reason="The _var_is_string argument is not supported for Var. " "If you want to create a Var from a raw Javascript expression, use the constructor directly", deprecation_version="0.6.0", removal_version="0.7.0", From 9fe8e6f1ce519547a6d23d3f8b5d8ce16515b734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 15 Jan 2025 14:20:04 -0800 Subject: [PATCH 010/144] bump nextJS to v15 (#4630) * bump nextJS to v15 * make turbopack depends on env var --- reflex/config.py | 3 +++ reflex/constants/installer.py | 2 +- reflex/utils/prerequisites.py | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/reflex/config.py b/reflex/config.py index 0579b019f..7614417d5 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -567,6 +567,9 @@ class EnvironmentVariables: # The maximum size of the reflex state in kilobytes. REFLEX_STATE_SIZE_LIMIT: EnvVar[int] = env_var(1000) + # Whether to use the turbopack bundler. + REFLEX_USE_TURBOPACK: EnvVar[bool] = env_var(True) + environment = EnvironmentVariables() diff --git a/reflex/constants/installer.py b/reflex/constants/installer.py index 0b45586dd..f9dd26b5a 100644 --- a/reflex/constants/installer.py +++ b/reflex/constants/installer.py @@ -182,7 +182,7 @@ class PackageJson(SimpleNamespace): "@emotion/react": "11.13.3", "axios": "1.7.7", "json5": "2.2.3", - "next": "14.2.16", + "next": "15.1.4", "next-sitemap": "4.2.3", "next-themes": "0.4.3", "react": "18.3.1", diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index d838c0eea..e450393c3 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -610,10 +610,14 @@ def initialize_web_directory(): init_reflex_json(project_hash=project_hash) +def _turbopack_flag() -> str: + return " --turbopack" if environment.REFLEX_USE_TURBOPACK.get() else "" + + def _compile_package_json(): return templates.PACKAGE_JSON.render( scripts={ - "dev": constants.PackageJson.Commands.DEV, + "dev": constants.PackageJson.Commands.DEV + _turbopack_flag(), "export": constants.PackageJson.Commands.EXPORT, "export_sitemap": constants.PackageJson.Commands.EXPORT_SITEMAP, "prod": constants.PackageJson.Commands.PROD, From b50b7692b22261654cc5a023d326c169bb968571 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 15 Jan 2025 14:21:33 -0800 Subject: [PATCH 011/144] improve type support for .get_state (#4623) * improve type support for .get_state * dang it darglint --- reflex/state.py | 31 ++++++++++++++++++++++++++----- reflex/utils/exceptions.py | 4 ++++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/reflex/state.py b/reflex/state.py index a31aae032..16875bec3 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -104,6 +104,7 @@ from reflex.utils.exceptions import ( LockExpiredError, ReflexRuntimeError, SetUndefinedStateVarError, + StateMismatchError, StateSchemaMismatchError, StateSerializationError, StateTooLargeError, @@ -1543,7 +1544,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): # Return the direct parent of target_state_cls for subsequent linking. return parent_state - def _get_state_from_cache(self, state_cls: Type[BaseState]) -> BaseState: + def _get_state_from_cache(self, state_cls: Type[T_STATE]) -> T_STATE: """Get a state instance from the cache. Args: @@ -1551,11 +1552,19 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): Returns: The instance of state_cls associated with this state's client_token. + + Raises: + StateMismatchError: If the state instance is not of the expected type. """ root_state = self._get_root_state() - return root_state.get_substate(state_cls.get_full_name().split(".")) + substate = root_state.get_substate(state_cls.get_full_name().split(".")) + if not isinstance(substate, state_cls): + raise StateMismatchError( + f"Searched for state {state_cls.get_full_name()} but found {substate}." + ) + return substate - async def _get_state_from_redis(self, state_cls: Type[BaseState]) -> BaseState: + async def _get_state_from_redis(self, state_cls: Type[T_STATE]) -> T_STATE: """Get a state instance from redis. Args: @@ -1566,6 +1575,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): Raises: RuntimeError: If redis is not used in this backend process. + StateMismatchError: If the state instance is not of the expected type. """ # Fetch all missing parent states from redis. parent_state_of_state_cls = await self._populate_parent_states(state_cls) @@ -1577,14 +1587,22 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): f"Requested state {state_cls.get_full_name()} is not cached and cannot be accessed without redis. " "(All states should already be available -- this is likely a bug).", ) - return await state_manager.get_state( + + state_in_redis = await state_manager.get_state( token=_substate_key(self.router.session.client_token, state_cls), top_level=False, get_substates=True, parent_state=parent_state_of_state_cls, ) - async def get_state(self, state_cls: Type[BaseState]) -> BaseState: + if not isinstance(state_in_redis, state_cls): + raise StateMismatchError( + f"Searched for state {state_cls.get_full_name()} but found {state_in_redis}." + ) + + return state_in_redis + + async def get_state(self, state_cls: Type[T_STATE]) -> T_STATE: """Get an instance of the state associated with this token. Allows for arbitrary access to sibling states from within an event handler. @@ -2316,6 +2334,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): return state +T_STATE = TypeVar("T_STATE", bound=BaseState) + + class State(BaseState): """The app Base State.""" diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py index bceadc977..339abcda1 100644 --- a/reflex/utils/exceptions.py +++ b/reflex/utils/exceptions.py @@ -163,6 +163,10 @@ class StateSerializationError(ReflexError): """Raised when the state cannot be serialized.""" +class StateMismatchError(ReflexError, ValueError): + """Raised when the state retrieved does not match the expected state.""" + + class SystemPackageMissingError(ReflexError): """Raised when a system package is missing.""" From cb24492371d8e3bb90ab6c924f5455b925279fd7 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 15 Jan 2025 14:23:45 -0800 Subject: [PATCH 012/144] fix boolean to boolen comparisons (#4620) * fix boolean to boolen comparisons * fixes #4618 * fix tests --- reflex/vars/number.py | 23 ++++++----------------- tests/units/test_var.py | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/reflex/vars/number.py b/reflex/vars/number.py index d04aded35..a2a0293d5 100644 --- a/reflex/vars/number.py +++ b/reflex/vars/number.py @@ -20,7 +20,6 @@ from typing import ( from reflex.constants.base import Dirs from reflex.utils.exceptions import PrimitiveUnserializableToJSON, VarTypeError from reflex.utils.imports import ImportDict, ImportVar -from reflex.utils.types import is_optional from .base import ( CustomVarOperationReturn, @@ -431,7 +430,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): """ if not isinstance(other, NUMBER_TYPES): raise_unsupported_operand_types("<", (type(self), type(other))) - return less_than_operation(self, +other) + return less_than_operation(+self, +other) @overload def __le__(self, other: number_types) -> BooleanVar: ... @@ -450,7 +449,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): """ if not isinstance(other, NUMBER_TYPES): raise_unsupported_operand_types("<=", (type(self), type(other))) - return less_than_or_equal_operation(self, +other) + return less_than_or_equal_operation(+self, +other) def __eq__(self, other: Any): """Equal comparison. @@ -462,7 +461,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): The result of the comparison. """ if isinstance(other, NUMBER_TYPES): - return equal_operation(self, +other) + return equal_operation(+self, +other) return equal_operation(self, other) def __ne__(self, other: Any): @@ -475,7 +474,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): The result of the comparison. """ if isinstance(other, NUMBER_TYPES): - return not_equal_operation(self, +other) + return not_equal_operation(+self, +other) return not_equal_operation(self, other) @overload @@ -495,7 +494,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): """ if not isinstance(other, NUMBER_TYPES): raise_unsupported_operand_types(">", (type(self), type(other))) - return greater_than_operation(self, +other) + return greater_than_operation(+self, +other) @overload def __ge__(self, other: number_types) -> BooleanVar: ... @@ -514,17 +513,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): """ if not isinstance(other, NUMBER_TYPES): raise_unsupported_operand_types(">=", (type(self), type(other))) - return greater_than_or_equal_operation(self, +other) - - def bool(self): - """Boolean conversion. - - Returns: - The boolean value of the number. - """ - if is_optional(self._var_type): - return boolify((self != None) & (self != 0)) # noqa: E711 - return self != 0 + return greater_than_or_equal_operation(+self, +other) def _is_strict_float(self) -> bool: """Check if the number is a float. diff --git a/tests/units/test_var.py b/tests/units/test_var.py index bfa8aa35a..e5f5bbb2a 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -1004,7 +1004,7 @@ def test_all_number_operations(): assert ( str(even_more_complicated_number) - == "!(((Math.abs(Math.floor(((Math.floor(((-((-5.4 + 1)) * 2) / 3) / 2) % 3) ** 2))) || (2 && Math.round(((Math.floor(((-((-5.4 + 1)) * 2) / 3) / 2) % 3) ** 2)))) !== 0))" + == "!(isTrue((Math.abs(Math.floor(((Math.floor(((-((-5.4 + 1)) * 2) / 3) / 2) % 3) ** 2))) || (2 && Math.round(((Math.floor(((-((-5.4 + 1)) * 2) / 3) / 2) % 3) ** 2))))))" ) assert str(LiteralNumberVar.create(5) > False) == "(5 > 0)" From e8dd0ae47db200f49cfec7b05099f04e8250923b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 15 Jan 2025 15:57:50 -0800 Subject: [PATCH 013/144] don't need node when --backend_only is used (#4641) --- reflex/reflex.py | 6 ++++-- reflex/utils/processes.py | 29 ++++++++++++++++++----------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/reflex/reflex.py b/reflex/reflex.py index 22fcb9fb8..b0f4ccd91 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -519,7 +519,9 @@ def deploy( if prerequisites.needs_reinit(frontend=True): _init(name=config.app_name, loglevel=loglevel) prerequisites.check_latest_package_version(constants.ReflexHostingCLI.MODULE_NAME) - + extra: dict[str, str] = ( + {"config_path": config_path} if config_path is not None else {} + ) hosting_cli.deploy( app_name=app_name, export_fn=lambda zip_dest_dir, @@ -545,7 +547,7 @@ def deploy( loglevel=type(loglevel).INFO, # type: ignore token=token, project=project, - config_path=config_path, + **extra, ) diff --git a/reflex/utils/processes.py b/reflex/utils/processes.py index 871b5f323..3673b36b2 100644 --- a/reflex/utils/processes.py +++ b/reflex/utils/processes.py @@ -17,6 +17,7 @@ import typer from redis.exceptions import RedisError from reflex import constants +from reflex.config import environment from reflex.utils import console, path_ops, prerequisites @@ -156,24 +157,30 @@ def new_process(args, run: bool = False, show_logs: bool = False, **kwargs): Raises: Exit: When attempting to run a command with a None value. """ - node_bin_path = str(path_ops.get_node_bin_path()) - if not node_bin_path and not prerequisites.CURRENTLY_INSTALLING_NODE: - console.warn( - "The path to the Node binary could not be found. Please ensure that Node is properly " - "installed and added to your system's PATH environment variable or try running " - "`reflex init` again." - ) + # Check for invalid command first. if None in args: console.error(f"Invalid command: {args}") raise typer.Exit(1) - # Add the node bin path to the PATH environment variable. + + path_env: str = os.environ.get("PATH", "") + + # Add node_bin_path to the PATH environment variable. + if not environment.REFLEX_BACKEND_ONLY.get(): + node_bin_path = str(path_ops.get_node_bin_path()) + if not node_bin_path and not prerequisites.CURRENTLY_INSTALLING_NODE: + console.warn( + "The path to the Node binary could not be found. Please ensure that Node is properly " + "installed and added to your system's PATH environment variable or try running " + "`reflex init` again." + ) + path_env = os.pathsep.join([node_bin_path, path_env]) + env: dict[str, str] = { **os.environ, - "PATH": os.pathsep.join( - [node_bin_path if node_bin_path else "", os.environ["PATH"]] - ), # type: ignore + "PATH": path_env, **kwargs.pop("env", {}), } + kwargs = { "env": env, "stderr": None if show_logs else subprocess.STDOUT, From c8de356d98eff2db13e8295aaff2b791e1a7267e Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 16 Jan 2025 11:22:56 -0800 Subject: [PATCH 014/144] cast return_expr to Var all the time (#4649) --- reflex/vars/function.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reflex/vars/function.py b/reflex/vars/function.py index 2a7d50e1b..131f15b9f 100644 --- a/reflex/vars/function.py +++ b/reflex/vars/function.py @@ -390,6 +390,7 @@ class ArgsFunctionOperation(CachedVarOperation, FunctionVar): Returns: The function var. """ + return_expr = Var.create(return_expr) return cls( _js_expr="", _var_type=_var_type, @@ -445,6 +446,7 @@ class ArgsFunctionOperationBuilder(CachedVarOperation, BuilderFunctionVar): Returns: The function var. """ + return_expr = Var.create(return_expr) return cls( _js_expr="", _var_type=_var_type, From 6e546526b4c860d0e5955cb543bfdba4973aa9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Thu, 16 Jan 2025 12:49:54 -0800 Subject: [PATCH 015/144] computed var default to cache=True (#4194) * computed var default to cache=True * fix lifespan integration tests * fix redis test --- reflex/state.py | 1 - reflex/vars/base.py | 17 ++---- tests/integration/test_computed_vars.py | 17 +++--- tests/integration/test_dynamic_routes.py | 6 +- tests/integration/test_lifespan.py | 6 +- tests/integration/test_media.py | 14 ++--- tests/units/test_app.py | 8 +-- tests/units/test_state.py | 74 ++++++++++-------------- tests/units/test_state_tree.py | 8 +-- tests/units/test_var.py | 10 +--- 10 files changed, 68 insertions(+), 93 deletions(-) diff --git a/reflex/state.py b/reflex/state.py index 16875bec3..e15c73978 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -1200,7 +1200,6 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): fget=func, auto_deps=False, deps=["router"], - cache=True, _js_expr=param, _var_data=VarData.from_state(cls), ) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 4a75164f4..2892d004d 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -1838,7 +1838,7 @@ class ComputedVar(Var[RETURN_TYPE]): self, fget: Callable[[BASE_STATE], RETURN_TYPE], initial_value: RETURN_TYPE | types.Unset = types.Unset(), - cache: bool = False, + cache: bool = True, deps: Optional[List[Union[str, Var]]] = None, auto_deps: bool = True, interval: Optional[Union[int, datetime.timedelta]] = None, @@ -2253,7 +2253,7 @@ if TYPE_CHECKING: def computed_var( fget: None = None, initial_value: Any | types.Unset = types.Unset(), - cache: bool = False, + cache: bool = True, deps: Optional[List[Union[str, Var]]] = None, auto_deps: bool = True, interval: Optional[Union[datetime.timedelta, int]] = None, @@ -2266,7 +2266,7 @@ def computed_var( def computed_var( fget: Callable[[BASE_STATE], RETURN_TYPE], initial_value: RETURN_TYPE | types.Unset = types.Unset(), - cache: bool = False, + cache: bool = True, deps: Optional[List[Union[str, Var]]] = None, auto_deps: bool = True, interval: Optional[Union[datetime.timedelta, int]] = None, @@ -2278,7 +2278,7 @@ def computed_var( def computed_var( fget: Callable[[BASE_STATE], Any] | None = None, initial_value: Any | types.Unset = types.Unset(), - cache: Optional[bool] = None, + cache: bool = True, deps: Optional[List[Union[str, Var]]] = None, auto_deps: bool = True, interval: Optional[Union[datetime.timedelta, int]] = None, @@ -2304,15 +2304,6 @@ def computed_var( ValueError: If caching is disabled and an update interval is set. VarDependencyError: If user supplies dependencies without caching. """ - if cache is None: - cache = False - console.deprecate( - "Default non-cached rx.var", - "the default value will be `@rx.var(cache=True)` in a future release. " - "To retain uncached var, explicitly pass `@rx.var(cache=False)`", - deprecation_version="0.6.8", - removal_version="0.7.0", - ) if cache is False and interval is not None: raise ValueError("Cannot set update interval without caching.") diff --git a/tests/integration/test_computed_vars.py b/tests/integration/test_computed_vars.py index efa129430..f56001ea8 100644 --- a/tests/integration/test_computed_vars.py +++ b/tests/integration/test_computed_vars.py @@ -22,22 +22,22 @@ def ComputedVars(): count: int = 0 # cached var with dep on count - @rx.var(cache=True, interval=15) + @rx.var(interval=15) def count1(self) -> int: return self.count # cached backend var with dep on count - @rx.var(cache=True, interval=15, backend=True) + @rx.var(interval=15, backend=True) def count1_backend(self) -> int: return self.count # same as above but implicit backend with `_` prefix - @rx.var(cache=True, interval=15) + @rx.var(interval=15) def _count1_backend(self) -> int: return self.count # explicit disabled auto_deps - @rx.var(interval=15, cache=True, auto_deps=False) + @rx.var(interval=15, auto_deps=False) def count3(self) -> int: # this will not add deps, because auto_deps is False print(self.count1) @@ -45,16 +45,19 @@ def ComputedVars(): return self.count # explicit dependency on count var - @rx.var(cache=True, deps=["count"], auto_deps=False) + @rx.var(deps=["count"], auto_deps=False) def depends_on_count(self) -> int: return self.count # explicit dependency on count1 var - @rx.var(cache=True, deps=[count1], auto_deps=False) + @rx.var(deps=[count1], auto_deps=False) def depends_on_count1(self) -> int: return self.count - @rx.var(deps=[count3], auto_deps=False, cache=True) + @rx.var( + deps=[count3], + auto_deps=False, + ) def depends_on_count3(self) -> int: return self.count diff --git a/tests/integration/test_dynamic_routes.py b/tests/integration/test_dynamic_routes.py index 8a3cde3a2..c210bde69 100644 --- a/tests/integration/test_dynamic_routes.py +++ b/tests/integration/test_dynamic_routes.py @@ -74,16 +74,16 @@ def DynamicRoute(): class ArgState(rx.State): """The app state.""" - @rx.var + @rx.var(cache=False) def arg(self) -> int: return int(self.arg_str or 0) class ArgSubState(ArgState): - @rx.var(cache=True) + @rx.var def cached_arg(self) -> int: return self.arg - @rx.var(cache=True) + @rx.var def cached_arg_str(self) -> str: return self.arg_str diff --git a/tests/integration/test_lifespan.py b/tests/integration/test_lifespan.py index 0fa4a7e92..d79273fbc 100644 --- a/tests/integration/test_lifespan.py +++ b/tests/integration/test_lifespan.py @@ -36,7 +36,7 @@ def LifespanApp(): print("Lifespan global started.") try: while True: - lifespan_task_global += inc # pyright: ignore[reportUnboundVariable] + lifespan_task_global += inc # pyright: ignore[reportUnboundVariable, reportPossiblyUnboundVariable] await asyncio.sleep(0.1) except asyncio.CancelledError as ce: print(f"Lifespan global cancelled: {ce}.") @@ -45,11 +45,11 @@ def LifespanApp(): class LifespanState(rx.State): interval: int = 100 - @rx.var + @rx.var(cache=False) def task_global(self) -> int: return lifespan_task_global - @rx.var + @rx.var(cache=False) def context_global(self) -> int: return lifespan_context_global diff --git a/tests/integration/test_media.py b/tests/integration/test_media.py index 10af26591..649038a7e 100644 --- a/tests/integration/test_media.py +++ b/tests/integration/test_media.py @@ -22,31 +22,31 @@ def MediaApp(): img.format = format # type: ignore return img - @rx.var(cache=True) + @rx.var def img_default(self) -> Image.Image: return self._blue() - @rx.var(cache=True) + @rx.var def img_bmp(self) -> Image.Image: return self._blue(format="BMP") - @rx.var(cache=True) + @rx.var def img_jpg(self) -> Image.Image: return self._blue(format="JPEG") - @rx.var(cache=True) + @rx.var def img_png(self) -> Image.Image: return self._blue(format="PNG") - @rx.var(cache=True) + @rx.var def img_gif(self) -> Image.Image: return self._blue(format="GIF") - @rx.var(cache=True) + @rx.var def img_webp(self) -> Image.Image: return self._blue(format="WEBP") - @rx.var(cache=True) + @rx.var def img_from_url(self) -> Image.Image: img_url = "https://picsum.photos/id/1/200/300" img_resp = httpx.get(img_url, follow_redirects=True) diff --git a/tests/units/test_app.py b/tests/units/test_app.py index 48a4bdda1..f805f83ec 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -908,7 +908,7 @@ class DynamicState(BaseState): """Increment the counter var.""" self.counter = self.counter + 1 - @computed_var(cache=True) + @computed_var def comp_dynamic(self) -> str: """A computed var that depends on the dynamic var. @@ -1549,11 +1549,11 @@ def test_app_with_valid_var_dependencies(compilable_app: tuple[App, Path]): base: int = 0 _backend: int = 0 - @computed_var(cache=True) + @computed_var() def foo(self) -> str: return "foo" - @computed_var(deps=["_backend", "base", foo], cache=True) + @computed_var(deps=["_backend", "base", foo]) def bar(self) -> str: return "bar" @@ -1565,7 +1565,7 @@ def test_app_with_invalid_var_dependencies(compilable_app: tuple[App, Path]): app, _ = compilable_app class InvalidDepState(BaseState): - @computed_var(deps=["foolksjdf"], cache=True) + @computed_var(deps=["foolksjdf"]) def bar(self) -> str: return "bar" diff --git a/tests/units/test_state.py b/tests/units/test_state.py index 41fac443e..19f3e4239 100644 --- a/tests/units/test_state.py +++ b/tests/units/test_state.py @@ -202,7 +202,7 @@ class GrandchildState(ChildState): class GrandchildState2(ChildState2): """A grandchild state fixture.""" - @rx.var(cache=True) + @rx.var def cached(self) -> str: """A cached var. @@ -215,7 +215,7 @@ class GrandchildState2(ChildState2): class GrandchildState3(ChildState3): """A great grandchild state fixture.""" - @rx.var + @rx.var(cache=False) def computed(self) -> str: """A computed var. @@ -796,7 +796,7 @@ async def test_process_event_simple(test_state): # The delta should contain the changes, including computed vars. assert update.delta == { - TestState.get_full_name(): {"num1": 69, "sum": 72.14, "upper": ""}, + TestState.get_full_name(): {"num1": 69, "sum": 72.14}, GrandchildState3.get_full_name(): {"computed": ""}, } assert update.events == [] @@ -823,7 +823,7 @@ async def test_process_event_substate(test_state, child_state, grandchild_state) assert child_state.value == "HI" assert child_state.count == 24 assert update.delta == { - TestState.get_full_name(): {"sum": 3.14, "upper": ""}, + # TestState.get_full_name(): {"sum": 3.14, "upper": ""}, ChildState.get_full_name(): {"value": "HI", "count": 24}, GrandchildState3.get_full_name(): {"computed": ""}, } @@ -839,7 +839,7 @@ async def test_process_event_substate(test_state, child_state, grandchild_state) update = await test_state._process(event).__anext__() assert grandchild_state.value2 == "new" assert update.delta == { - TestState.get_full_name(): {"sum": 3.14, "upper": ""}, + # TestState.get_full_name(): {"sum": 3.14, "upper": ""}, GrandchildState.get_full_name(): {"value2": "new"}, GrandchildState3.get_full_name(): {"computed": ""}, } @@ -989,7 +989,7 @@ class InterdependentState(BaseState): v1: int = 0 _v2: int = 1 - @rx.var(cache=True) + @rx.var def v1x2(self) -> int: """Depends on var v1. @@ -998,7 +998,7 @@ class InterdependentState(BaseState): """ return self.v1 * 2 - @rx.var(cache=True) + @rx.var def v2x2(self) -> int: """Depends on backend var _v2. @@ -1007,7 +1007,7 @@ class InterdependentState(BaseState): """ return self._v2 * 2 - @rx.var(cache=True, backend=True) + @rx.var(backend=True) def v2x2_backend(self) -> int: """Depends on backend var _v2. @@ -1016,7 +1016,7 @@ class InterdependentState(BaseState): """ return self._v2 * 2 - @rx.var(cache=True) + @rx.var def v1x2x2(self) -> int: """Depends on ComputedVar v1x2. @@ -1025,7 +1025,7 @@ class InterdependentState(BaseState): """ return self.v1x2 * 2 # type: ignore - @rx.var(cache=True) + @rx.var def _v3(self) -> int: """Depends on backend var _v2. @@ -1034,7 +1034,7 @@ class InterdependentState(BaseState): """ return self._v2 - @rx.var(cache=True) + @rx.var def v3x2(self) -> int: """Depends on ComputedVar _v3. @@ -1239,7 +1239,7 @@ def test_computed_var_cached(): class ComputedState(BaseState): v: int = 0 - @rx.var(cache=True) + @rx.var def comp_v(self) -> int: nonlocal comp_v_calls comp_v_calls += 1 @@ -1264,15 +1264,15 @@ def test_computed_var_cached_depends_on_non_cached(): class ComputedState(BaseState): v: int = 0 - @rx.var + @rx.var(cache=False) def no_cache_v(self) -> int: return self.v - @rx.var(cache=True) + @rx.var def dep_v(self) -> int: return self.no_cache_v # type: ignore - @rx.var(cache=True) + @rx.var def comp_v(self) -> int: return self.v @@ -1304,14 +1304,14 @@ def test_computed_var_depends_on_parent_non_cached(): counter = 0 class ParentState(BaseState): - @rx.var + @rx.var(cache=False) def no_cache_v(self) -> int: nonlocal counter counter += 1 return counter class ChildState(ParentState): - @rx.var(cache=True) + @rx.var def dep_v(self) -> int: return self.no_cache_v # type: ignore @@ -1357,7 +1357,7 @@ def test_cached_var_depends_on_event_handler(use_partial: bool): def handler(self): self.x = self.x + 1 - @rx.var(cache=True) + @rx.var def cached_x_side_effect(self) -> int: self.handler() nonlocal counter @@ -1393,7 +1393,7 @@ def test_computed_var_dependencies(): def testprop(self) -> int: return self.v - @rx.var(cache=True) + @rx.var def comp_v(self) -> int: """Direct access. @@ -1402,7 +1402,7 @@ def test_computed_var_dependencies(): """ return self.v - @rx.var(cache=True, backend=True) + @rx.var(backend=True) def comp_v_backend(self) -> int: """Direct access backend var. @@ -1411,7 +1411,7 @@ def test_computed_var_dependencies(): """ return self.v - @rx.var(cache=True) + @rx.var def comp_v_via_property(self) -> int: """Access v via property. @@ -1420,7 +1420,7 @@ def test_computed_var_dependencies(): """ return self.testprop - @rx.var(cache=True) + @rx.var def comp_w(self): """Nested lambda. @@ -1429,7 +1429,7 @@ def test_computed_var_dependencies(): """ return lambda: self.w - @rx.var(cache=True) + @rx.var def comp_x(self): """Nested function. @@ -1442,7 +1442,7 @@ def test_computed_var_dependencies(): return _ - @rx.var(cache=True) + @rx.var def comp_y(self) -> List[int]: """Comprehension iterating over attribute. @@ -1451,7 +1451,7 @@ def test_computed_var_dependencies(): """ return [round(y) for y in self.y] - @rx.var(cache=True) + @rx.var def comp_z(self) -> List[bool]: """Comprehension accesses attribute. @@ -2027,10 +2027,6 @@ async def test_state_proxy(grandchild_state: GrandchildState, mock_app: rx.App): assert mcall.args[0] == str(SocketEvent.EVENT) assert mcall.args[1] == StateUpdate( delta={ - parent_state.get_full_name(): { - "upper": "", - "sum": 3.14, - }, grandchild_state.get_full_name(): { "value2": "42", }, @@ -2053,7 +2049,7 @@ class BackgroundTaskState(BaseState): super().__init__(**kwargs) self.router_data = {"simulate": "hydrate"} - @rx.var + @rx.var(cache=False) def computed_order(self) -> List[str]: """Get the order as a computed var. @@ -3040,10 +3036,6 @@ async def test_get_state(mock_app: rx.App, token: str): grandchild_state.value2 = "set_value" assert test_state.get_delta() == { - TestState.get_full_name(): { - "sum": 3.14, - "upper": "", - }, GrandchildState.get_full_name(): { "value2": "set_value", }, @@ -3081,10 +3073,6 @@ async def test_get_state(mock_app: rx.App, token: str): child_state2.value = "set_c2_value" assert new_test_state.get_delta() == { - TestState.get_full_name(): { - "sum": 3.14, - "upper": "", - }, ChildState2.get_full_name(): { "value": "set_c2_value", }, @@ -3139,7 +3127,7 @@ async def test_get_state_from_sibling_not_cached(mock_app: rx.App, token: str): child3_var: int = 0 - @rx.var + @rx.var(cache=False) def v(self): pass @@ -3210,8 +3198,8 @@ def test_potentially_dirty_substates(): def bar(self) -> str: return "" - assert RxState._potentially_dirty_substates() == {State} - assert State._potentially_dirty_substates() == {C1} + assert RxState._potentially_dirty_substates() == set() + assert State._potentially_dirty_substates() == set() assert C1._potentially_dirty_substates() == set() @@ -3226,7 +3214,7 @@ def test_router_var_dep() -> None: class RouterVarDepState(RouterVarParentState): """A state with a router var dependency.""" - @rx.var(cache=True) + @rx.var def foo(self) -> str: return self.router.page.params.get("foo", "") @@ -3421,7 +3409,7 @@ class MixinState(State, mixin=True): _backend: int = 0 _backend_no_default: dict - @rx.var(cache=True) + @rx.var def computed(self) -> str: """A computed var on mixin state. diff --git a/tests/units/test_state_tree.py b/tests/units/test_state_tree.py index ebdd877de..6fe828819 100644 --- a/tests/units/test_state_tree.py +++ b/tests/units/test_state_tree.py @@ -42,7 +42,7 @@ class SubA_A_A_A(SubA_A_A): class SubA_A_A_B(SubA_A_A): """SubA_A_A_B is a child of SubA_A_A.""" - @rx.var(cache=True) + @rx.var def sub_a_a_a_cached(self) -> int: """A cached var. @@ -117,7 +117,7 @@ class TreeD(Root): d: int - @rx.var + @rx.var(cache=False) def d_var(self) -> int: """A computed var. @@ -156,7 +156,7 @@ class SubE_A_A_A_A(SubE_A_A_A): sub_e_a_a_a_a: int - @rx.var + @rx.var(cache=False) def sub_e_a_a_a_a_var(self) -> int: """A computed var. @@ -183,7 +183,7 @@ class SubE_A_A_A_D(SubE_A_A_A): sub_e_a_a_a_d: int - @rx.var(cache=True) + @rx.var def sub_e_a_a_a_d_var(self) -> int: """A computed var. diff --git a/tests/units/test_var.py b/tests/units/test_var.py index e5f5bbb2a..6ad82a761 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -1814,10 +1814,7 @@ def cv_fget(state: BaseState) -> int: ], ) def test_computed_var_deps(deps: List[Union[str, Var]], expected: Set[str]): - @computed_var( - deps=deps, - cache=True, - ) + @computed_var(deps=deps) def test_var(state) -> int: return 1 @@ -1835,10 +1832,7 @@ def test_computed_var_deps(deps: List[Union[str, Var]], expected: Set[str]): def test_invalid_computed_var_deps(deps: List): with pytest.raises(TypeError): - @computed_var( - deps=deps, - cache=True, - ) + @computed_var(deps=deps) def test_var(state) -> int: return 1 From 4da32a122baeb47093cc1ea07e4c02ea42351084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Fri, 17 Jan 2025 16:43:11 -0800 Subject: [PATCH 016/144] allow dynamic icons name (#4636) * allow dynamic icons name * handle literal vars * clean up code --- reflex/components/lucide/icon.py | 50 +++++++++++++++++++++++-------- reflex/components/lucide/icon.pyi | 50 +++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 12 deletions(-) diff --git a/reflex/components/lucide/icon.py b/reflex/components/lucide/icon.py index 04410ac56..6c7cbede7 100644 --- a/reflex/components/lucide/icon.py +++ b/reflex/components/lucide/icon.py @@ -2,13 +2,15 @@ from reflex.components.component import Component from reflex.utils import format -from reflex.vars.base import Var +from reflex.utils.imports import ImportVar +from reflex.vars.base import LiteralVar, Var +from reflex.vars.sequence import LiteralStringVar class LucideIconComponent(Component): """Lucide Icon Component.""" - library = "lucide-react@0.469.0" + library = "lucide-react@0.471.1" class Icon(LucideIconComponent): @@ -32,6 +34,7 @@ class Icon(LucideIconComponent): Raises: AttributeError: The errors tied to bad usage of the Icon component. ValueError: If the icon tag is invalid. + TypeError: If the icon name is not a string. Returns: The created component. @@ -39,7 +42,6 @@ class Icon(LucideIconComponent): if children: if len(children) == 1 and isinstance(children[0], str): props["tag"] = children[0] - children = [] else: raise AttributeError( f"Passing multiple children to Icon component is not allowed: remove positional arguments {children[1:]} to fix" @@ -47,24 +49,46 @@ class Icon(LucideIconComponent): if "tag" not in props: raise AttributeError("Missing 'tag' keyword-argument for Icon") + tag: str | Var | LiteralVar = props.pop("tag") + if isinstance(tag, LiteralVar): + if isinstance(tag, LiteralStringVar): + tag = tag._var_value + else: + raise TypeError(f"Icon name must be a string, got {type(tag)}") + elif isinstance(tag, Var): + return DynamicIcon.create(name=tag, **props) + if ( - not isinstance(props["tag"], str) - or format.to_snake_case(props["tag"]) not in LUCIDE_ICON_LIST + not isinstance(tag, str) + or format.to_snake_case(tag) not in LUCIDE_ICON_LIST ): raise ValueError( - f"Invalid icon tag: {props['tag']}. Please use one of the following: {', '.join(LUCIDE_ICON_LIST[0:25])}, ..." + f"Invalid icon tag: {tag}. Please use one of the following: {', '.join(LUCIDE_ICON_LIST[0:25])}, ..." "\nSee full list at https://lucide.dev/icons." ) - if props["tag"] in LUCIDE_ICON_MAPPING_OVERRIDE: - props["tag"] = LUCIDE_ICON_MAPPING_OVERRIDE[props["tag"]] + if tag in LUCIDE_ICON_MAPPING_OVERRIDE: + props["tag"] = LUCIDE_ICON_MAPPING_OVERRIDE[tag] else: - props["tag"] = ( - format.to_title_case(format.to_snake_case(props["tag"])) + "Icon" - ) + props["tag"] = format.to_title_case(format.to_snake_case(tag)) + "Icon" props["alias"] = f"Lucide{props['tag']}" props.setdefault("color", "var(--current-color)") - return super().create(*children, **props) + return super().create(**props) + + +class DynamicIcon(LucideIconComponent): + """A DynamicIcon component.""" + + tag = "DynamicIcon" + + name: Var[str] + + def _get_imports(self): + _imports = super()._get_imports() + if self.library: + _imports.pop(self.library) + _imports["lucide-react/dynamic"] = [ImportVar("DynamicIcon", install=False)] + return _imports LUCIDE_ICON_LIST = [ @@ -846,6 +870,7 @@ LUCIDE_ICON_LIST = [ "house", "house_plug", "house_plus", + "house_wifi", "ice_cream_bowl", "ice_cream_cone", "id_card", @@ -1534,6 +1559,7 @@ LUCIDE_ICON_LIST = [ "trending_up_down", "triangle", "triangle_alert", + "triangle_dashed", "triangle_right", "trophy", "truck", diff --git a/reflex/components/lucide/icon.pyi b/reflex/components/lucide/icon.pyi index 39a1da0e6..6094cfd87 100644 --- a/reflex/components/lucide/icon.pyi +++ b/reflex/components/lucide/icon.pyi @@ -104,12 +104,60 @@ class Icon(LucideIconComponent): Raises: AttributeError: The errors tied to bad usage of the Icon component. ValueError: If the icon tag is invalid. + TypeError: If the icon name is not a string. Returns: The created component. """ ... +class DynamicIcon(LucideIconComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + name: Optional[Union[Var[str], str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[[], BASE_STATE]] = None, + **props, + ) -> "DynamicIcon": + """Create the component. + + Args: + *children: The children of the component. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The props of the component. + + Returns: + The component. + """ + ... + LUCIDE_ICON_LIST = [ "a_arrow_down", "a_arrow_up", @@ -889,6 +937,7 @@ LUCIDE_ICON_LIST = [ "house", "house_plug", "house_plus", + "house_wifi", "ice_cream_bowl", "ice_cream_cone", "id_card", @@ -1577,6 +1626,7 @@ LUCIDE_ICON_LIST = [ "trending_up_down", "triangle", "triangle_alert", + "triangle_dashed", "triangle_right", "trophy", "truck", From 268effe62e203dc0eb495f50b14d0660891d942d Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Mon, 20 Jan 2025 18:12:54 +0000 Subject: [PATCH 017/144] [ENG-4134]Allow specifying custom app module in rxconfig (#4556) * Allow custom app module in rxconfig * what was that pyscopg mess? * fix another mess * get this working with relative imports and hot reload * typing to named tuple * minor refactor * revert redis knobs positions * fix pyright except 1 * fix pyright hopefully * use the resolved module path * testing workflow * move nba-proxy job to counter job * just cast the type * fix tests for python 3.9 * darglint * CR Suggestions for #4556 (#4644) * reload_dirs: search up from app_module for last directory containing __init__ * Change custom app_module to use an import string * preserve sys.path entries added while loading rxconfig.py --------- Co-authored-by: Masen Furer --- .github/workflows/integration_tests.yml | 22 +++++++++++- reflex/app_module_for_backend.py | 7 ++-- reflex/config.py | 30 ++++++++++++++-- reflex/event.py | 2 +- reflex/state.py | 29 ++++++++-------- reflex/utils/exec.py | 26 ++++++++++++-- reflex/utils/prerequisites.py | 46 ++++++++++++++++++++++--- 7 files changed, 132 insertions(+), 30 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 017336ba5..2ca9aed23 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -33,7 +33,7 @@ env: PR_TITLE: ${{ github.event.pull_request.title }} jobs: - example-counter: + example-counter-and-nba-proxy: env: OUTPUT_FILE: import_benchmark.json timeout-minutes: 30 @@ -119,6 +119,26 @@ jobs: --benchmark-json "./reflex-examples/counter/${{ env.OUTPUT_FILE }}" --branch-name "${{ github.head_ref || github.ref_name }}" --pr-id "${{ github.event.pull_request.id }}" --app-name "counter" + - name: Install requirements for nba proxy example + working-directory: ./reflex-examples/nba-proxy + run: | + poetry run uv pip install -r requirements.txt + - name: Install additional dependencies for DB access + run: poetry run uv pip install psycopg + - name: Check export --backend-only before init for nba-proxy example + working-directory: ./reflex-examples/nba-proxy + run: | + poetry run reflex export --backend-only + - name: Init Website for nba-proxy example + working-directory: ./reflex-examples/nba-proxy + run: | + poetry run reflex init --loglevel debug + - name: Run Website and Check for errors + run: | + # Check that npm is home + npm -v + poetry run bash scripts/integration.sh ./reflex-examples/nba-proxy dev + reflex-web: strategy: diff --git a/reflex/app_module_for_backend.py b/reflex/app_module_for_backend.py index 8109fc3d6..b0ae0a29f 100644 --- a/reflex/app_module_for_backend.py +++ b/reflex/app_module_for_backend.py @@ -7,14 +7,13 @@ from concurrent.futures import ThreadPoolExecutor from reflex import constants from reflex.utils import telemetry from reflex.utils.exec import is_prod_mode -from reflex.utils.prerequisites import get_app +from reflex.utils.prerequisites import get_and_validate_app if constants.CompileVars.APP != "app": raise AssertionError("unexpected variable name for 'app'") telemetry.send("compile") -app_module = get_app(reload=False) -app = getattr(app_module, constants.CompileVars.APP) +app, app_module = get_and_validate_app(reload=False) # For py3.9 compatibility when redis is used, we MUST add any decorator pages # before compiling the app in a thread to avoid event loop error (REF-2172). app._apply_decorated_pages() @@ -30,7 +29,7 @@ if is_prod_mode(): # ensure only "app" is exposed. del app_module del compile_future -del get_app +del get_and_validate_app del is_prod_mode del telemetry del constants diff --git a/reflex/config.py b/reflex/config.py index 7614417d5..8511694fb 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -12,6 +12,7 @@ import threading import urllib.parse from importlib.util import find_spec from pathlib import Path +from types import ModuleType from typing import ( TYPE_CHECKING, Any, @@ -607,6 +608,9 @@ class Config(Base): # The name of the app (should match the name of the app directory). app_name: str + # The path to the app module. + app_module_import: Optional[str] = None + # The log level to use. loglevel: constants.LogLevel = constants.LogLevel.DEFAULT @@ -729,6 +733,19 @@ class Config(Base): "REDIS_URL is required when using the redis state manager." ) + @property + def app_module(self) -> ModuleType | None: + """Return the app module if `app_module_import` is set. + + Returns: + The app module. + """ + return ( + importlib.import_module(self.app_module_import) + if self.app_module_import + else None + ) + @property def module(self) -> str: """Get the module name of the app. @@ -736,6 +753,8 @@ class Config(Base): Returns: The module name. """ + if self.app_module is not None: + return self.app_module.__name__ return ".".join([self.app_name, self.app_name]) def update_from_env(self) -> dict[str, Any]: @@ -874,7 +893,7 @@ def get_config(reload: bool = False) -> Config: return cached_rxconfig.config with _config_lock: - sys_path = sys.path.copy() + orig_sys_path = sys.path.copy() sys.path.clear() sys.path.append(str(Path.cwd())) try: @@ -882,9 +901,14 @@ def get_config(reload: bool = False) -> Config: return _get_config() except Exception: # If the module import fails, try to import with the original sys.path. - sys.path.extend(sys_path) + sys.path.extend(orig_sys_path) return _get_config() finally: + # Find any entries added to sys.path by rxconfig.py itself. + extra_paths = [ + p for p in sys.path if p not in orig_sys_path and p != str(Path.cwd()) + ] # Restore the original sys.path. sys.path.clear() - sys.path.extend(sys_path) + sys.path.extend(extra_paths) + sys.path.extend(orig_sys_path) diff --git a/reflex/event.py b/reflex/event.py index 28852fde5..886a306c1 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -1591,7 +1591,7 @@ def get_handler_args( def fix_events( - events: list[EventHandler | EventSpec] | None, + events: list[EventSpec | EventHandler] | None, token: str, router_data: dict[str, Any] | None = None, ) -> list[Event]: diff --git a/reflex/state.py b/reflex/state.py index e15c73978..66098d232 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -1776,9 +1776,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): except Exception as ex: state._clean() - app_instance = getattr(prerequisites.get_app(), constants.CompileVars.APP) - - event_specs = app_instance.backend_exception_handler(ex) + event_specs = ( + prerequisites.get_and_validate_app().app.backend_exception_handler(ex) + ) if event_specs is None: return StateUpdate() @@ -1888,9 +1888,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): except Exception as ex: telemetry.send_error(ex, context="backend") - app_instance = getattr(prerequisites.get_app(), constants.CompileVars.APP) - - event_specs = app_instance.backend_exception_handler(ex) + event_specs = ( + prerequisites.get_and_validate_app().app.backend_exception_handler(ex) + ) yield state._as_state_update( handler, @@ -2403,8 +2403,9 @@ class FrontendEventExceptionState(State): component_stack: The stack trace of the component where the exception occurred. """ - app_instance = getattr(prerequisites.get_app(), constants.CompileVars.APP) - app_instance.frontend_exception_handler(Exception(stack)) + prerequisites.get_and_validate_app().app.frontend_exception_handler( + Exception(stack) + ) class UpdateVarsInternalState(State): @@ -2442,15 +2443,16 @@ class OnLoadInternalState(State): The list of events to queue for on load handling. """ # Do not app._compile()! It should be already compiled by now. - app = getattr(prerequisites.get_app(), constants.CompileVars.APP) - load_events = app.get_load_events(self.router.page.path) + load_events = prerequisites.get_and_validate_app().app.get_load_events( + self.router.page.path + ) if not load_events: self.is_hydrated = True return # Fast path for navigation with no on_load events defined. self.is_hydrated = False return [ *fix_events( - load_events, + cast(list[Union[EventSpec, EventHandler]], load_events), self.router.session.client_token, router_data=self.router_data, ), @@ -2609,7 +2611,7 @@ class StateProxy(wrapt.ObjectProxy): """ super().__init__(state_instance) # compile is not relevant to backend logic - self._self_app = getattr(prerequisites.get_app(), constants.CompileVars.APP) + self._self_app = prerequisites.get_and_validate_app().app self._self_substate_path = tuple(state_instance.get_full_name().split(".")) self._self_actx = None self._self_mutable = False @@ -3702,8 +3704,7 @@ def get_state_manager() -> StateManager: Returns: The state manager. """ - app = getattr(prerequisites.get_app(), constants.CompileVars.APP) - return app.state_manager + return prerequisites.get_and_validate_app().app.state_manager class MutableProxy(wrapt.ObjectProxy): diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 621c4a608..6087818d9 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -240,6 +240,28 @@ def run_backend( run_uvicorn_backend(host, port, loglevel) +def get_reload_dirs() -> list[str]: + """Get the reload directories for the backend. + + Returns: + The reload directories for the backend. + """ + config = get_config() + reload_dirs = [config.app_name] + if config.app_module is not None and config.app_module.__file__: + module_path = Path(config.app_module.__file__).resolve().parent + while module_path.parent.name: + for parent_file in module_path.parent.iterdir(): + if parent_file == "__init__.py": + # go up a level to find dir without `__init__.py` + module_path = module_path.parent + break + else: + break + reload_dirs.append(str(module_path)) + return reload_dirs + + def run_uvicorn_backend(host, port, loglevel: LogLevel): """Run the backend in development mode using Uvicorn. @@ -256,7 +278,7 @@ def run_uvicorn_backend(host, port, loglevel: LogLevel): port=port, log_level=loglevel.value, reload=True, - reload_dirs=[get_config().app_name], + reload_dirs=get_reload_dirs(), ) @@ -281,7 +303,7 @@ def run_granian_backend(host, port, loglevel: LogLevel): interface=Interfaces.ASGI, log_level=LogLevels(loglevel.value), reload=True, - reload_paths=[Path(get_config().app_name)], + reload_paths=get_reload_dirs(), reload_ignore_dirs=[".web"], ).serve() except ImportError: diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index e450393c3..ac1eb58da 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -17,11 +17,12 @@ import stat import sys import tempfile import time +import typing import zipfile from datetime import datetime from pathlib import Path from types import ModuleType -from typing import Callable, List, Optional +from typing import Callable, List, NamedTuple, Optional import httpx import typer @@ -42,9 +43,19 @@ from reflex.utils.exceptions import ( from reflex.utils.format import format_library_name from reflex.utils.registry import _get_npm_registry +if typing.TYPE_CHECKING: + from reflex.app import App + CURRENTLY_INSTALLING_NODE = False +class AppInfo(NamedTuple): + """A tuple containing the app instance and module.""" + + app: App + module: ModuleType + + @dataclasses.dataclass(frozen=True) class Template: """A template for a Reflex app.""" @@ -291,8 +302,11 @@ def get_app(reload: bool = False) -> ModuleType: ) module = config.module sys.path.insert(0, str(Path.cwd())) - app = __import__(module, fromlist=(constants.CompileVars.APP,)) - + app = ( + __import__(module, fromlist=(constants.CompileVars.APP,)) + if not config.app_module + else config.app_module + ) if reload: from reflex.state import reload_state_module @@ -308,6 +322,29 @@ def get_app(reload: bool = False) -> ModuleType: raise +def get_and_validate_app(reload: bool = False) -> AppInfo: + """Get the app instance based on the default config and validate it. + + Args: + reload: Re-import the app module from disk + + Returns: + The app instance and the app module. + + Raises: + RuntimeError: If the app instance is not an instance of rx.App. + """ + from reflex.app import App + + app_module = get_app(reload=reload) + app = getattr(app_module, constants.CompileVars.APP) + if not isinstance(app, App): + raise RuntimeError( + "The app instance in the specified app_module_import in rxconfig must be an instance of rx.App." + ) + return AppInfo(app=app, module=app_module) + + def get_compiled_app(reload: bool = False, export: bool = False) -> ModuleType: """Get the app module based on the default config after first compiling it. @@ -318,8 +355,7 @@ def get_compiled_app(reload: bool = False, export: bool = False) -> ModuleType: Returns: The compiled app based on the default config. """ - app_module = get_app(reload=reload) - app = getattr(app_module, constants.CompileVars.APP) + app, app_module = get_and_validate_app(reload=reload) # For py3.9 compatibility when redis is used, we MUST add any decorator pages # before compiling the app in a thread to avoid event loop error (REF-2172). app._apply_decorated_pages() From 9c019a65d588bbd9592e99bb6a0abce8145f741f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Mon, 20 Jan 2025 13:55:53 -0800 Subject: [PATCH 018/144] check for dict passed as children for component (#4656) --- reflex/components/component.py | 15 +++++++-------- reflex/utils/exceptions.py | 18 +++++++++++++++++- tests/units/components/test_component.py | 17 ++++++++++------- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 8649b593d..cfe9a8dc2 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -740,22 +740,21 @@ class Component(BaseComponent, ABC): # Import here to avoid circular imports. from reflex.components.base.bare import Bare from reflex.components.base.fragment import Fragment - from reflex.utils.exceptions import ComponentTypeError + from reflex.utils.exceptions import ChildrenTypeError # Filter out None props props = {key: value for key, value in props.items() if value is not None} def validate_children(children): for child in children: - if isinstance(child, tuple): + if isinstance(child, (tuple, list)): validate_children(child) + # Make sure the child is a valid type. - if not types._isinstance(child, ComponentChild): - raise ComponentTypeError( - "Children of Reflex components must be other components, " - "state vars, or primitive Python types. " - f"Got child {child} of type {type(child)}.", - ) + if isinstance(child, dict) or not types._isinstance( + child, ComponentChild + ): + raise ChildrenTypeError(component=cls.__name__, child=child) # Validate all the children. validate_children(children) diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py index 339abcda1..838d0a89d 100644 --- a/reflex/utils/exceptions.py +++ b/reflex/utils/exceptions.py @@ -1,6 +1,6 @@ """Custom Exceptions.""" -from typing import NoReturn +from typing import Any, NoReturn class ReflexError(Exception): @@ -31,6 +31,22 @@ class ComponentTypeError(ReflexError, TypeError): """Custom TypeError for component related errors.""" +class ChildrenTypeError(ComponentTypeError): + """Raised when the children prop of a component is not a valid type.""" + + def __init__(self, component: str, child: Any): + """Initialize the exception. + + Args: + component: The name of the component. + child: The child that caused the error. + """ + super().__init__( + f"Component {component} received child {child} of type {type(child)}. " + "Accepted types are other components, state vars, or primitive Python types (dict excluded)." + ) + + class EventHandlerTypeError(ReflexError, TypeError): """Custom TypeError for event handler related errors.""" diff --git a/tests/units/components/test_component.py b/tests/units/components/test_component.py index 674873b69..6396e4322 100644 --- a/tests/units/components/test_component.py +++ b/tests/units/components/test_component.py @@ -27,7 +27,7 @@ from reflex.event import ( from reflex.state import BaseState from reflex.style import Style from reflex.utils import imports -from reflex.utils.exceptions import EventFnArgMismatch +from reflex.utils.exceptions import ChildrenTypeError, EventFnArgMismatch from reflex.utils.imports import ImportDict, ImportVar, ParsedImportDict, parse_imports from reflex.vars import VarData from reflex.vars.base import LiteralVar, Var @@ -645,14 +645,17 @@ def test_create_filters_none_props(test_component): assert str(component.style["text-align"]) == '"center"' -@pytest.mark.parametrize("children", [((None,),), ("foo", ("bar", (None,)))]) +@pytest.mark.parametrize( + "children", + [ + ((None,),), + ("foo", ("bar", (None,))), + ({"foo": "bar"},), + ], +) def test_component_create_unallowed_types(children, test_component): - with pytest.raises(TypeError) as err: + with pytest.raises(ChildrenTypeError): test_component.create(*children) - assert ( - err.value.args[0] - == "Children of Reflex components must be other components, state vars, or primitive Python types. Got child None of type ." - ) @pytest.mark.parametrize( From 2855ed488719ff51492b8968c473f57345c5abee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Mon, 20 Jan 2025 13:58:17 -0800 Subject: [PATCH 019/144] add some of the TRY rules (#4651) --- pyproject.toml | 4 +- reflex/app.py | 8 +--- reflex/components/component.py | 20 ++++---- reflex/custom_components/custom_components.py | 8 ++-- reflex/utils/prerequisites.py | 48 +++++++++++++------ reflex/utils/telemetry.py | 3 +- tests/integration/test_connection_banner.py | 3 +- 7 files changed, 56 insertions(+), 38 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eccf21230..d1ae1dcf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,8 +86,8 @@ build-backend = "poetry.core.masonry.api" target-version = "py39" output-format = "concise" lint.isort.split-on-trailing-comma = false -lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "PERF", "PTH", "RUF", "SIM", "T", "W"] -lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF012"] +lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "PERF", "PTH", "RUF", "SIM", "T", "TRY", "W"] +lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF012", "TRY0"] lint.pydocstyle.convention = "google" [tool.ruff.lint.per-file-ignores] diff --git a/reflex/app.py b/reflex/app.py index 08cb4314e..60be0d7dd 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -463,14 +463,8 @@ class App(MiddlewareMixin, LifespanMixin): Returns: The generated component. - - Raises: - exceptions.MatchTypeError: If the return types of match cases in rx.match are different. """ - try: - return component if isinstance(component, Component) else component() - except exceptions.MatchTypeError: - raise + return component if isinstance(component, Component) else component() def add_page( self, diff --git a/reflex/components/component.py b/reflex/components/component.py index cfe9a8dc2..ed90a0f24 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -429,20 +429,22 @@ class Component(BaseComponent, ABC): else: continue + def determine_key(value): + # Try to create a var from the value + key = value if isinstance(value, Var) else LiteralVar.create(value) + + # Check that the var type is not None. + if key is None: + raise TypeError + + return key + # Check whether the key is a component prop. if types._issubclass(field_type, Var): # Used to store the passed types if var type is a union. passed_types = None try: - # Try to create a var from the value. - if isinstance(value, Var): - kwargs[key] = value - else: - kwargs[key] = LiteralVar.create(value) - - # Check that the var type is not None. - if kwargs[key] is None: - raise TypeError + kwargs[key] = determine_key(value) expected_type = fields[key].outer_type_.__args__[0] # validate literal fields. diff --git a/reflex/custom_components/custom_components.py b/reflex/custom_components/custom_components.py index 4a169802f..8000e7f4c 100644 --- a/reflex/custom_components/custom_components.py +++ b/reflex/custom_components/custom_components.py @@ -421,12 +421,13 @@ def _run_commands_in_subprocess(cmds: list[str]) -> bool: console.debug(f"Running command: {' '.join(cmds)}") try: result = subprocess.run(cmds, capture_output=True, text=True, check=True) - console.debug(result.stdout) - return True except subprocess.CalledProcessError as cpe: console.error(cpe.stdout) console.error(cpe.stderr) return False + else: + console.debug(result.stdout) + return True def _make_pyi_files(): @@ -931,10 +932,11 @@ def _get_file_from_prompt_in_loop() -> Tuple[bytes, str] | None: file_extension = image_filepath.suffix try: image_file = image_filepath.read_bytes() - return image_file, file_extension except OSError as ose: console.error(f"Unable to read the {file_extension} file due to {ose}") raise typer.Exit(code=1) from ose + else: + return image_file, file_extension console.debug(f"File extension detected: {file_extension}") return None diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index ac1eb58da..4f9cc0c14 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -278,6 +278,22 @@ def windows_npm_escape_hatch() -> bool: return environment.REFLEX_USE_NPM.get() +def _check_app_name(config: Config): + """Check if the app name is set in the config. + + Args: + config: The config object. + + Raises: + RuntimeError: If the app name is not set in the config. + """ + if not config.app_name: + raise RuntimeError( + "Cannot get the app module because `app_name` is not set in rxconfig! " + "If this error occurs in a reflex test case, ensure that `get_app` is mocked." + ) + + def get_app(reload: bool = False) -> ModuleType: """Get the app module based on the default config. @@ -288,18 +304,16 @@ def get_app(reload: bool = False) -> ModuleType: The app based on the default config. Raises: - RuntimeError: If the app name is not set in the config. + Exception: If an error occurs while getting the app module. """ from reflex.utils import telemetry try: environment.RELOAD_CONFIG.set(reload) config = get_config() - if not config.app_name: - raise RuntimeError( - "Cannot get the app module because `app_name` is not set in rxconfig! " - "If this error occurs in a reflex test case, ensure that `get_app` is mocked." - ) + + _check_app_name(config) + module = config.module sys.path.insert(0, str(Path.cwd())) app = ( @@ -315,11 +329,11 @@ def get_app(reload: bool = False) -> ModuleType: # Reload the app module. importlib.reload(app) - - return app except Exception as ex: telemetry.send_error(ex, context="frontend") raise + else: + return app def get_and_validate_app(reload: bool = False) -> AppInfo: @@ -1189,11 +1203,12 @@ def ensure_reflex_installation_id() -> Optional[int]: if installation_id is None: installation_id = random.getrandbits(128) installation_id_file.write_text(str(installation_id)) - # If we get here, installation_id is definitely set - return installation_id except Exception as e: console.debug(f"Failed to ensure reflex installation id: {e}") return None + else: + # If we get here, installation_id is definitely set + return installation_id def initialize_reflex_user_directory(): @@ -1407,19 +1422,22 @@ def create_config_init_app_from_remote_template(app_name: str, template_url: str except OSError as ose: console.error(f"Failed to create temp directory for extracting zip: {ose}") raise typer.Exit(1) from ose + try: zipfile.ZipFile(zip_file_path).extractall(path=unzip_dir) # The zip file downloaded from github looks like: # repo-name-branch/**/*, so we need to remove the top level directory. - if len(subdirs := os.listdir(unzip_dir)) != 1: - console.error(f"Expected one directory in the zip, found {subdirs}") - raise typer.Exit(1) - template_dir = unzip_dir / subdirs[0] - console.debug(f"Template folder is located at {template_dir}") except Exception as uze: console.error(f"Failed to unzip the template: {uze}") raise typer.Exit(1) from uze + if len(subdirs := os.listdir(unzip_dir)) != 1: + console.error(f"Expected one directory in the zip, found {subdirs}") + raise typer.Exit(1) + + template_dir = unzip_dir / subdirs[0] + console.debug(f"Template folder is located at {template_dir}") + # Move the rxconfig file here first. path_ops.mv(str(template_dir / constants.Config.FILE), constants.Config.FILE) new_config = get_config(reload=True) diff --git a/reflex/utils/telemetry.py b/reflex/utils/telemetry.py index fc90932a6..8e9130b09 100644 --- a/reflex/utils/telemetry.py +++ b/reflex/utils/telemetry.py @@ -156,9 +156,10 @@ def _prepare_event(event: str, **kwargs) -> dict: def _send_event(event_data: dict) -> bool: try: httpx.post(POSTHOG_API_URL, json=event_data) - return True except Exception: return False + else: + return True def _send(event, telemetry_enabled, **kwargs): diff --git a/tests/integration/test_connection_banner.py b/tests/integration/test_connection_banner.py index 44187c8ba..18259fe3f 100644 --- a/tests/integration/test_connection_banner.py +++ b/tests/integration/test_connection_banner.py @@ -71,9 +71,10 @@ def has_error_modal(driver: WebDriver) -> bool: """ try: driver.find_element(By.XPATH, CONNECTION_ERROR_XPATH) - return True except NoSuchElementException: return False + else: + return True @pytest.mark.asyncio From 4dc106545b1f42535bf278ca4092a878515b614d Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 20 Jan 2025 14:00:08 -0800 Subject: [PATCH 020/144] add defensive checks against data being funny (#4633) --- reflex/app.py | 30 ++++++++++++++++++++++++++++-- reflex/utils/exceptions.py | 4 ++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 60be0d7dd..0d672e4c0 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -1557,10 +1557,36 @@ class EventNamespace(AsyncNamespace): Args: sid: The Socket.IO session id. data: The event data. + + Raises: + EventDeserializationError: If the event data is not a dictionary. """ fields = data - # Get the event. - event = Event(**{k: v for k, v in fields.items() if k in _EVENT_FIELDS}) + + if isinstance(fields, str): + console.warn( + "Received event data as a string. This generally should not happen and may indicate a bug." + f" Event data: {fields}" + ) + try: + fields = json.loads(fields) + except json.JSONDecodeError as ex: + raise exceptions.EventDeserializationError( + f"Failed to deserialize event data: {fields}." + ) from ex + + if not isinstance(fields, dict): + raise exceptions.EventDeserializationError( + f"Event data must be a dictionary, but received {fields} of type {type(fields)}." + ) + + try: + # Get the event. + event = Event(**{k: v for k, v in fields.items() if k in _EVENT_FIELDS}) + except (TypeError, ValueError) as ex: + raise exceptions.EventDeserializationError( + f"Failed to deserialize event data: {fields}." + ) from ex self.token_to_sid[event.token] = sid self.sid_to_token[sid] = event.token diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py index 838d0a89d..37a68e420 100644 --- a/reflex/utils/exceptions.py +++ b/reflex/utils/exceptions.py @@ -187,6 +187,10 @@ class SystemPackageMissingError(ReflexError): """Raised when a system package is missing.""" +class EventDeserializationError(ReflexError, ValueError): + """Raised when an event cannot be deserialized.""" + + def raise_system_package_missing_error(package: str) -> NoReturn: """Raise a SystemPackageMissingError. From 212b2d4af9a9d3ae308819e656506b5c7b5aa694 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 21 Jan 2025 13:05:04 -0800 Subject: [PATCH 021/144] Skip saving page components when skipping compile output (#4653) Obviously we still have to evaluate the pages to make sure we know about all states, but not saving them to `App.pages` dict reduces high-line memory usage for backend-only process from ~900Mb to ~530Mb on reflex-web. --- reflex/app.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 0d672e4c0..48856fabe 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -558,11 +558,12 @@ class App(MiddlewareMixin, LifespanMixin): meta=meta, ) - def _compile_page(self, route: str): + def _compile_page(self, route: str, save_page: bool = True): """Compile a page. Args: route: The route of the page to compile. + save_page: If True, the compiled page is saved to self.pages. """ component, enable_state = compiler.compile_unevaluated_page( route, self.unevaluated_pages[route], self.state, self.style, self.theme @@ -573,7 +574,8 @@ class App(MiddlewareMixin, LifespanMixin): # Add the page. self._check_routes_conflict(route) - self.pages[route] = component + if save_page: + self.pages[route] = component def get_load_events(self, route: str) -> list[IndividualEventType[[], Any]]: """Get the load events for a route. @@ -873,14 +875,16 @@ class App(MiddlewareMixin, LifespanMixin): # If a theme component was provided, wrap the app with it app_wrappers[(20, "Theme")] = self.theme + should_compile = self._should_compile() + for route in self.unevaluated_pages: console.debug(f"Evaluating page: {route}") - self._compile_page(route) + self._compile_page(route, save_page=should_compile) # Add the optional endpoints (_upload) self._add_optional_endpoints() - if not self._should_compile(): + if not should_compile: return self._validate_var_dependencies() From 0c70146013fa25f077bd38785c0215cd7b44a53b Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 21 Jan 2025 13:05:35 -0800 Subject: [PATCH 022/144] check frontend version on connect (#4611) * check frontend version on connect * do something a bit silly * thanks masen * just delete the tests you don't pass --- reflex/.templates/web/utils/state.js | 2 ++ reflex/app.py | 6 +++++- reflex/constants/__init__.py | 1 + reflex/constants/base.py | 1 + reflex/testing.py | 1 + reflex/utils/build.py | 6 +++++- reflex/utils/exec.py | 9 +++++++++ 7 files changed, 24 insertions(+), 2 deletions(-) diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index ec603fd13..5b8046347 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -3,6 +3,7 @@ import axios from "axios"; import io from "socket.io-client"; import JSON5 from "json5"; import env from "$/env.json"; +import reflexEnvironment from "$/reflex.json"; import Cookies from "universal-cookie"; import { useEffect, useRef, useState } from "react"; import Router, { useRouter } from "next/router"; @@ -407,6 +408,7 @@ export const connect = async ( socket.current = io(endpoint.href, { path: endpoint["pathname"], transports: transports, + protocols: env.TEST_MODE ? undefined : [reflexEnvironment.version], autoUnref: false, }); // Ensure undefined fields in events are sent as null instead of removed diff --git a/reflex/app.py b/reflex/app.py index 48856fabe..7e868e730 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -1528,7 +1528,11 @@ class EventNamespace(AsyncNamespace): sid: The Socket.IO session id. environ: The request information, including HTTP headers. """ - pass + subprotocol = environ.get("HTTP_SEC_WEBSOCKET_PROTOCOL", None) + if subprotocol and subprotocol != constants.Reflex.VERSION: + console.warn( + f"Frontend version {subprotocol} for session {sid} does not match the backend version {constants.Reflex.VERSION}." + ) def on_disconnect(self, sid): """Event for when the websocket disconnects. diff --git a/reflex/constants/__init__.py b/reflex/constants/__init__.py index e816da0f7..f5946bf5e 100644 --- a/reflex/constants/__init__.py +++ b/reflex/constants/__init__.py @@ -1,6 +1,7 @@ """The constants package.""" from .base import ( + APP_HARNESS_FLAG, COOKIES, IS_LINUX, IS_MACOS, diff --git a/reflex/constants/base.py b/reflex/constants/base.py index af96583ad..f737858c0 100644 --- a/reflex/constants/base.py +++ b/reflex/constants/base.py @@ -257,6 +257,7 @@ SESSION_STORAGE = "session_storage" # Testing variables. # Testing os env set by pytest when running a test case. PYTEST_CURRENT_TEST = "PYTEST_CURRENT_TEST" +APP_HARNESS_FLAG = "APP_HARNESS_FLAG" REFLEX_VAR_OPENING_TAG = "" REFLEX_VAR_CLOSING_TAG = "" diff --git a/reflex/testing.py b/reflex/testing.py index b3dedf398..a1083d250 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -282,6 +282,7 @@ class AppHarness: before_decorated_pages = reflex.app.DECORATED_PAGES[self.app_name].copy() # Ensure the AppHarness test does not skip State assignment due to running via pytest os.environ.pop(reflex.constants.PYTEST_CURRENT_TEST, None) + os.environ[reflex.constants.APP_HARNESS_FLAG] = "true" self.app_module = reflex.utils.prerequisites.get_compiled_app( # Do not reload the module for pre-existing apps (only apps generated from source) reload=self.app_source is not None diff --git a/reflex/utils/build.py b/reflex/utils/build.py index e263374e1..9ea941792 100644 --- a/reflex/utils/build.py +++ b/reflex/utils/build.py @@ -13,13 +13,17 @@ from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn from reflex import constants from reflex.config import get_config from reflex.utils import console, path_ops, prerequisites, processes +from reflex.utils.exec import is_in_app_harness def set_env_json(): """Write the upload url to a REFLEX_JSON.""" path_ops.update_json_file( str(prerequisites.get_web_dir() / constants.Dirs.ENV_JSON), - {endpoint.name: endpoint.get_url() for endpoint in constants.Endpoint}, + { + **{endpoint.name: endpoint.get_url() for endpoint in constants.Endpoint}, + "TEST_MODE": is_in_app_harness(), + }, ) diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 6087818d9..c10b6b856 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -509,6 +509,15 @@ def is_testing_env() -> bool: return constants.PYTEST_CURRENT_TEST in os.environ +def is_in_app_harness() -> bool: + """Whether the app is running in the app harness. + + Returns: + True if the app is running in the app harness. + """ + return constants.APP_HARNESS_FLAG in os.environ + + def is_prod_mode() -> bool: """Check if the app is running in production mode. From abaaa22adb39d8402f4fd72599d55f6d3bba3f85 Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Tue, 21 Jan 2025 21:06:12 +0000 Subject: [PATCH 023/144] Allow deploy with project name and app id (#4550) * `reflex deploy --project-name` * add app id as well * config file update * Update reflex/reflex.py Co-authored-by: Masen Furer * Update reflex/reflex.py Co-authored-by: Masen Furer --------- Co-authored-by: simon Co-authored-by: Masen Furer --- reflex/reflex.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/reflex/reflex.py b/reflex/reflex.py index b0f4ccd91..196a2430c 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -440,7 +440,11 @@ def deploy( config.app_name, "--app-name", help="The name of the App to deploy under.", - hidden=True, + ), + app_id: str = typer.Option( + None, + "--app-id", + help="The ID of the App to deploy over.", ), regions: List[str] = typer.Option( [], @@ -480,6 +484,11 @@ def deploy( "--project", help="project id to deploy to", ), + project_name: Optional[str] = typer.Option( + None, + "--project-name", + help="The name of the project to deploy to.", + ), token: Optional[str] = typer.Option( None, "--token", @@ -524,6 +533,7 @@ def deploy( ) hosting_cli.deploy( app_name=app_name, + app_id=app_id, export_fn=lambda zip_dest_dir, api_url, deploy_url, @@ -547,6 +557,8 @@ def deploy( loglevel=type(loglevel).INFO, # type: ignore token=token, project=project, + config_path=config_path, + project_name=project_name, **extra, ) From bea266b8ede0c56361d93552b0af775d4335d9e4 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 21 Jan 2025 13:14:02 -0800 Subject: [PATCH 024/144] make object var handle all mapping instead of just dict (#4602) * make object var handle all mapping instead of just dict * unbreak ci * get it right pyright * create generic variable for field * add support for typeddict (to some degree) * import from extensions --- reflex/utils/types.py | 16 +++++ reflex/vars/base.py | 49 +++++++++------ reflex/vars/object.py | 75 +++++++++++++---------- reflex/vars/sequence.py | 2 +- tests/units/components/core/test_match.py | 4 +- tests/units/test_style.py | 4 +- tests/units/test_var.py | 4 +- tests/units/vars/test_base.py | 10 +-- 8 files changed, 100 insertions(+), 64 deletions(-) diff --git a/reflex/utils/types.py b/reflex/utils/types.py index b8bcbf2d6..ac30342e2 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -829,6 +829,22 @@ StateBases = get_base_class(StateVar) StateIterBases = get_base_class(StateIterVar) +def safe_issubclass(cls: Type, cls_check: Type | Tuple[Type, ...]): + """Check if a class is a subclass of another class. Returns False if internal error occurs. + + Args: + cls: The class to check. + cls_check: The class to check against. + + Returns: + Whether the class is a subclass of the other class. + """ + try: + return issubclass(cls, cls_check) + except TypeError: + return False + + def typehint_issubclass(possible_subclass: Any, possible_superclass: Any) -> bool: """Check if a type hint is a subclass of another type hint. diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 2892d004d..122545187 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -26,6 +26,7 @@ from typing import ( Iterable, List, Literal, + Mapping, NoReturn, Optional, Set, @@ -64,6 +65,7 @@ from reflex.utils.types import ( _isinstance, get_origin, has_args, + safe_issubclass, unionize, ) @@ -127,7 +129,7 @@ class VarData: state: str = "", field_name: str = "", imports: ImportDict | ParsedImportDict | None = None, - hooks: dict[str, VarData | None] | None = None, + hooks: Mapping[str, VarData | None] | None = None, deps: list[Var] | None = None, position: Hooks.HookPosition | None = None, ): @@ -643,8 +645,8 @@ class Var(Generic[VAR_TYPE]): @overload def to( self, - output: type[dict], - ) -> ObjectVar[dict]: ... + output: type[Mapping], + ) -> ObjectVar[Mapping]: ... @overload def to( @@ -686,7 +688,9 @@ class Var(Generic[VAR_TYPE]): # If the first argument is a python type, we map it to the corresponding Var type. for var_subclass in _var_subclasses[::-1]: - if fixed_output_type in var_subclass.python_types: + if fixed_output_type in var_subclass.python_types or safe_issubclass( + fixed_output_type, var_subclass.python_types + ): return self.to(var_subclass.var_subclass, output) if fixed_output_type is None: @@ -820,7 +824,7 @@ class Var(Generic[VAR_TYPE]): return False if issubclass(type_, list): return [] - if issubclass(type_, dict): + if issubclass(type_, Mapping): return {} if issubclass(type_, tuple): return () @@ -1026,7 +1030,7 @@ class Var(Generic[VAR_TYPE]): f"$/{constants.Dirs.STATE_PATH}": [imports.ImportVar(tag="refs")] } ), - ).to(ObjectVar, Dict[str, str]) + ).to(ObjectVar, Mapping[str, str]) return refs[LiteralVar.create(str(self))] @deprecated("Use `.js_type()` instead.") @@ -1373,7 +1377,7 @@ class LiteralVar(Var): serialized_value = serializers.serialize(value) if serialized_value is not None: - if isinstance(serialized_value, dict): + if isinstance(serialized_value, Mapping): return LiteralObjectVar.create( serialized_value, _var_type=type(value), @@ -1498,7 +1502,7 @@ def var_operation( ) -> Callable[P, ArrayVar[LIST_T]]: ... -OBJECT_TYPE = TypeVar("OBJECT_TYPE", bound=Dict) +OBJECT_TYPE = TypeVar("OBJECT_TYPE", bound=Mapping) @overload @@ -1573,8 +1577,8 @@ def figure_out_type(value: Any) -> types.GenericType: return Set[unionize(*(figure_out_type(v) for v in value))] if isinstance(value, tuple): return Tuple[unionize(*(figure_out_type(v) for v in value)), ...] - if isinstance(value, dict): - return Dict[ + if isinstance(value, Mapping): + return Mapping[ unionize(*(figure_out_type(k) for k in value)), unionize(*(figure_out_type(v) for v in value.values())), ] @@ -2002,10 +2006,10 @@ class ComputedVar(Var[RETURN_TYPE]): @overload def __get__( - self: ComputedVar[dict[DICT_KEY, DICT_VAL]], + self: ComputedVar[Mapping[DICT_KEY, DICT_VAL]], instance: None, owner: Type, - ) -> ObjectVar[dict[DICT_KEY, DICT_VAL]]: ... + ) -> ObjectVar[Mapping[DICT_KEY, DICT_VAL]]: ... @overload def __get__( @@ -2915,11 +2919,14 @@ V = TypeVar("V") BASE_TYPE = TypeVar("BASE_TYPE", bound=Base) +FIELD_TYPE = TypeVar("FIELD_TYPE") +MAPPING_TYPE = TypeVar("MAPPING_TYPE", bound=Mapping) -class Field(Generic[T]): + +class Field(Generic[FIELD_TYPE]): """Shadow class for Var to allow for type hinting in the IDE.""" - def __set__(self, instance, value: T): + def __set__(self, instance, value: FIELD_TYPE): """Set the Var. Args: @@ -2931,7 +2938,9 @@ class Field(Generic[T]): def __get__(self: Field[bool], instance: None, owner) -> BooleanVar: ... @overload - def __get__(self: Field[int], instance: None, owner) -> NumberVar: ... + def __get__( + self: Field[int] | Field[float] | Field[int | float], instance: None, owner + ) -> NumberVar: ... @overload def __get__(self: Field[str], instance: None, owner) -> StringVar: ... @@ -2948,8 +2957,8 @@ class Field(Generic[T]): @overload def __get__( - self: Field[Dict[str, V]], instance: None, owner - ) -> ObjectVar[Dict[str, V]]: ... + self: Field[MAPPING_TYPE], instance: None, owner + ) -> ObjectVar[MAPPING_TYPE]: ... @overload def __get__( @@ -2957,10 +2966,10 @@ class Field(Generic[T]): ) -> ObjectVar[BASE_TYPE]: ... @overload - def __get__(self, instance: None, owner) -> Var[T]: ... + def __get__(self, instance: None, owner) -> Var[FIELD_TYPE]: ... @overload - def __get__(self, instance, owner) -> T: ... + def __get__(self, instance, owner) -> FIELD_TYPE: ... def __get__(self, instance, owner): # type: ignore """Get the Var. @@ -2971,7 +2980,7 @@ class Field(Generic[T]): """ -def field(value: T) -> Field[T]: +def field(value: FIELD_TYPE) -> Field[FIELD_TYPE]: """Create a Field with a value. Args: diff --git a/reflex/vars/object.py b/reflex/vars/object.py index 5de431f5a..7b951c559 100644 --- a/reflex/vars/object.py +++ b/reflex/vars/object.py @@ -8,8 +8,8 @@ import typing from inspect import isclass from typing import ( Any, - Dict, List, + Mapping, NoReturn, Tuple, Type, @@ -19,6 +19,8 @@ from typing import ( overload, ) +from typing_extensions import is_typeddict + from reflex.utils import types from reflex.utils.exceptions import VarAttributeError from reflex.utils.types import GenericType, get_attribute_access_type, get_origin @@ -36,7 +38,7 @@ from .base import ( from .number import BooleanVar, NumberVar, raise_unsupported_operand_types from .sequence import ArrayVar, StringVar -OBJECT_TYPE = TypeVar("OBJECT_TYPE") +OBJECT_TYPE = TypeVar("OBJECT_TYPE", covariant=True) KEY_TYPE = TypeVar("KEY_TYPE") VALUE_TYPE = TypeVar("VALUE_TYPE") @@ -46,7 +48,7 @@ ARRAY_INNER_TYPE = TypeVar("ARRAY_INNER_TYPE") OTHER_KEY_TYPE = TypeVar("OTHER_KEY_TYPE") -class ObjectVar(Var[OBJECT_TYPE], python_types=dict): +class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): """Base class for immutable object vars.""" def _key_type(self) -> Type: @@ -59,7 +61,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=dict): @overload def _value_type( - self: ObjectVar[Dict[Any, VALUE_TYPE]], + self: ObjectVar[Mapping[Any, VALUE_TYPE]], ) -> Type[VALUE_TYPE]: ... @overload @@ -74,7 +76,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=dict): fixed_type = get_origin(self._var_type) or self._var_type if not isclass(fixed_type): return Any - args = get_args(self._var_type) if issubclass(fixed_type, dict) else () + args = get_args(self._var_type) if issubclass(fixed_type, Mapping) else () return args[1] if args else Any def keys(self) -> ArrayVar[List[str]]: @@ -87,7 +89,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=dict): @overload def values( - self: ObjectVar[Dict[Any, VALUE_TYPE]], + self: ObjectVar[Mapping[Any, VALUE_TYPE]], ) -> ArrayVar[List[VALUE_TYPE]]: ... @overload @@ -103,7 +105,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=dict): @overload def entries( - self: ObjectVar[Dict[Any, VALUE_TYPE]], + self: ObjectVar[Mapping[Any, VALUE_TYPE]], ) -> ArrayVar[List[Tuple[str, VALUE_TYPE]]]: ... @overload @@ -133,49 +135,55 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=dict): # NoReturn is used here to catch when key value is Any @overload def __getitem__( - self: ObjectVar[Dict[Any, NoReturn]], + self: ObjectVar[Mapping[Any, NoReturn]], key: Var | Any, ) -> Var: ... + @overload + def __getitem__( + self: (ObjectVar[Mapping[Any, bool]]), + key: Var | Any, + ) -> BooleanVar: ... + @overload def __getitem__( self: ( - ObjectVar[Dict[Any, int]] - | ObjectVar[Dict[Any, float]] - | ObjectVar[Dict[Any, int | float]] + ObjectVar[Mapping[Any, int]] + | ObjectVar[Mapping[Any, float]] + | ObjectVar[Mapping[Any, int | float]] ), key: Var | Any, ) -> NumberVar: ... @overload def __getitem__( - self: ObjectVar[Dict[Any, str]], + self: ObjectVar[Mapping[Any, str]], key: Var | Any, ) -> StringVar: ... @overload def __getitem__( - self: ObjectVar[Dict[Any, list[ARRAY_INNER_TYPE]]], + self: ObjectVar[Mapping[Any, list[ARRAY_INNER_TYPE]]], key: Var | Any, ) -> ArrayVar[list[ARRAY_INNER_TYPE]]: ... @overload def __getitem__( - self: ObjectVar[Dict[Any, set[ARRAY_INNER_TYPE]]], + self: ObjectVar[Mapping[Any, set[ARRAY_INNER_TYPE]]], key: Var | Any, ) -> ArrayVar[set[ARRAY_INNER_TYPE]]: ... @overload def __getitem__( - self: ObjectVar[Dict[Any, tuple[ARRAY_INNER_TYPE, ...]]], + self: ObjectVar[Mapping[Any, tuple[ARRAY_INNER_TYPE, ...]]], key: Var | Any, ) -> ArrayVar[tuple[ARRAY_INNER_TYPE, ...]]: ... @overload def __getitem__( - self: ObjectVar[Dict[Any, dict[OTHER_KEY_TYPE, VALUE_TYPE]]], + self: ObjectVar[Mapping[Any, Mapping[OTHER_KEY_TYPE, VALUE_TYPE]]], key: Var | Any, - ) -> ObjectVar[dict[OTHER_KEY_TYPE, VALUE_TYPE]]: ... + ) -> ObjectVar[Mapping[OTHER_KEY_TYPE, VALUE_TYPE]]: ... def __getitem__(self, key: Var | Any) -> Var: """Get an item from the object. @@ -195,49 +203,49 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=dict): # NoReturn is used here to catch when key value is Any @overload def __getattr__( - self: ObjectVar[Dict[Any, NoReturn]], + self: ObjectVar[Mapping[Any, NoReturn]], name: str, ) -> Var: ... @overload def __getattr__( self: ( - ObjectVar[Dict[Any, int]] - | ObjectVar[Dict[Any, float]] - | ObjectVar[Dict[Any, int | float]] + ObjectVar[Mapping[Any, int]] + | ObjectVar[Mapping[Any, float]] + | ObjectVar[Mapping[Any, int | float]] ), name: str, ) -> NumberVar: ... @overload def __getattr__( - self: ObjectVar[Dict[Any, str]], + self: ObjectVar[Mapping[Any, str]], name: str, ) -> StringVar: ... @overload def __getattr__( - self: ObjectVar[Dict[Any, list[ARRAY_INNER_TYPE]]], + self: ObjectVar[Mapping[Any, list[ARRAY_INNER_TYPE]]], name: str, ) -> ArrayVar[list[ARRAY_INNER_TYPE]]: ... @overload def __getattr__( - self: ObjectVar[Dict[Any, set[ARRAY_INNER_TYPE]]], + self: ObjectVar[Mapping[Any, set[ARRAY_INNER_TYPE]]], name: str, ) -> ArrayVar[set[ARRAY_INNER_TYPE]]: ... @overload def __getattr__( - self: ObjectVar[Dict[Any, tuple[ARRAY_INNER_TYPE, ...]]], + self: ObjectVar[Mapping[Any, tuple[ARRAY_INNER_TYPE, ...]]], name: str, ) -> ArrayVar[tuple[ARRAY_INNER_TYPE, ...]]: ... @overload def __getattr__( - self: ObjectVar[Dict[Any, dict[OTHER_KEY_TYPE, VALUE_TYPE]]], + self: ObjectVar[Mapping[Any, Mapping[OTHER_KEY_TYPE, VALUE_TYPE]]], name: str, - ) -> ObjectVar[dict[OTHER_KEY_TYPE, VALUE_TYPE]]: ... + ) -> ObjectVar[Mapping[OTHER_KEY_TYPE, VALUE_TYPE]]: ... @overload def __getattr__( @@ -266,8 +274,11 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=dict): var_type = get_args(var_type)[0] fixed_type = var_type if isclass(var_type) else get_origin(var_type) - if (isclass(fixed_type) and not issubclass(fixed_type, dict)) or ( - fixed_type in types.UnionTypes + + if ( + (isclass(fixed_type) and not issubclass(fixed_type, Mapping)) + or (fixed_type in types.UnionTypes) + or is_typeddict(fixed_type) ): attribute_type = get_attribute_access_type(var_type, name) if attribute_type is None: @@ -299,7 +310,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=dict): class LiteralObjectVar(CachedVarOperation, ObjectVar[OBJECT_TYPE], LiteralVar): """Base class for immutable literal object vars.""" - _var_value: Dict[Union[Var, Any], Union[Var, Any]] = dataclasses.field( + _var_value: Mapping[Union[Var, Any], Union[Var, Any]] = dataclasses.field( default_factory=dict ) @@ -383,7 +394,7 @@ class LiteralObjectVar(CachedVarOperation, ObjectVar[OBJECT_TYPE], LiteralVar): @classmethod def create( cls, - _var_value: dict, + _var_value: Mapping, _var_type: Type[OBJECT_TYPE] | None = None, _var_data: VarData | None = None, ) -> LiteralObjectVar[OBJECT_TYPE]: @@ -466,7 +477,7 @@ def object_merge_operation(lhs: ObjectVar, rhs: ObjectVar): """ return var_operation_return( js_expression=f"({{...{lhs}, ...{rhs}}})", - var_type=Dict[ + var_type=Mapping[ Union[lhs._key_type(), rhs._key_type()], Union[lhs._value_type(), rhs._value_type()], ], diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index 5864e70b9..1b11f50e6 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -987,7 +987,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): raise_unsupported_operand_types("[]", (type(self), type(i))) return array_item_operation(self, i) - def length(self) -> NumberVar: + def length(self) -> NumberVar[int]: """Get the length of the array. Returns: diff --git a/tests/units/components/core/test_match.py b/tests/units/components/core/test_match.py index f09e800e5..eaf98414d 100644 --- a/tests/units/components/core/test_match.py +++ b/tests/units/components/core/test_match.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Tuple +from typing import List, Mapping, Tuple import pytest @@ -67,7 +67,7 @@ def test_match_components(): assert fourth_return_value_render["children"][0]["contents"] == '{"fourth value"}' assert match_cases[4][0]._js_expr == '({ ["foo"] : "bar" })' - assert match_cases[4][0]._var_type == Dict[str, str] + assert match_cases[4][0]._var_type == Mapping[str, str] fifth_return_value_render = match_cases[4][1].render() assert fifth_return_value_render["name"] == "RadixThemesText" assert fifth_return_value_render["children"][0]["contents"] == '{"fifth value"}' diff --git a/tests/units/test_style.py b/tests/units/test_style.py index e1d652798..bb585fd22 100644 --- a/tests/units/test_style.py +++ b/tests/units/test_style.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Dict +from typing import Any, Mapping import pytest @@ -379,7 +379,7 @@ class StyleState(rx.State): { "css": Var( _js_expr=f'({{ ["color"] : ("dark"+{StyleState.color}) }})' - ).to(Dict[str, str]) + ).to(Mapping[str, str]) }, ), ( diff --git a/tests/units/test_var.py b/tests/units/test_var.py index 6ad82a761..a8e9cd88c 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -2,7 +2,7 @@ import json import math import sys import typing -from typing import Dict, List, Optional, Set, Tuple, Union, cast +from typing import Dict, List, Mapping, Optional, Set, Tuple, Union, cast import pytest from pandas import DataFrame @@ -270,7 +270,7 @@ def test_get_setter(prop: Var, expected): ([1, 2, 3], Var(_js_expr="[1, 2, 3]", _var_type=List[int])), ( {"a": 1, "b": 2}, - Var(_js_expr='({ ["a"] : 1, ["b"] : 2 })', _var_type=Dict[str, int]), + Var(_js_expr='({ ["a"] : 1, ["b"] : 2 })', _var_type=Mapping[str, int]), ), ], ) diff --git a/tests/units/vars/test_base.py b/tests/units/vars/test_base.py index 68bc0c38e..e4ae7327a 100644 --- a/tests/units/vars/test_base.py +++ b/tests/units/vars/test_base.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Union +from typing import List, Mapping, Union import pytest @@ -37,12 +37,12 @@ class ChildGenericDict(GenericDict): ("a", str), ([1, 2, 3], List[int]), ([1, 2.0, "a"], List[Union[int, float, str]]), - ({"a": 1, "b": 2}, Dict[str, int]), - ({"a": 1, 2: "b"}, Dict[Union[int, str], Union[str, int]]), + ({"a": 1, "b": 2}, Mapping[str, int]), + ({"a": 1, 2: "b"}, Mapping[Union[int, str], Union[str, int]]), (CustomDict(), CustomDict), (ChildCustomDict(), ChildCustomDict), - (GenericDict({1: 1}), Dict[int, int]), - (ChildGenericDict({1: 1}), Dict[int, int]), + (GenericDict({1: 1}), Mapping[int, int]), + (ChildGenericDict({1: 1}), Mapping[int, int]), ], ) def test_figure_out_type(value, expected): From 048416163d50188c1a3fcbd6e9983669da0040a4 Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Tue, 21 Jan 2025 21:28:05 +0000 Subject: [PATCH 025/144] Remove token check in reflex deploy (#4640) This logic has been moved upstream to reflex-hosting-cli --- reflex/reflex.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/reflex/reflex.py b/reflex/reflex.py index 196a2430c..2d6ebc30c 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -512,13 +512,6 @@ def deploy( # Set the log level. console.set_log_level(loglevel) - if not token: - # make sure user is logged in. - if interactive: - hosting_cli.login() - else: - raise SystemExit("Token is required for non-interactive mode.") - # Only check requirements if interactive. # There is user interaction for requirements update. if interactive: From 80966dbff0d41b277ce705de4adbe0e97d429cc2 Mon Sep 17 00:00:00 2001 From: Ahmad Hakim <84860195+LineIndent@users.noreply.github.com> Date: Wed, 22 Jan 2025 09:00:43 +0200 Subject: [PATCH 026/144] [ENG-4406] cell component wrapper (#4670) * cell component wrapper * add pyi files changes --------- Co-authored-by: pourhakimi <84860195+pourhakimi@users.noreply.github.com> Co-authored-by: Lendemor --- reflex/components/recharts/__init__.py | 2 + reflex/components/recharts/__init__.pyi | 2 + reflex/components/recharts/general.py | 15 ++++++++ reflex/components/recharts/general.pyi | 51 +++++++++++++++++++++++++ 4 files changed, 70 insertions(+) diff --git a/reflex/components/recharts/__init__.py b/reflex/components/recharts/__init__.py index 5e9e6fc14..6495c6583 100644 --- a/reflex/components/recharts/__init__.py +++ b/reflex/components/recharts/__init__.py @@ -70,6 +70,8 @@ _SUBMOD_ATTRS: dict = { "Label", "label_list", "LabelList", + "cell", + "Cell", ], "polar": [ "pie", diff --git a/reflex/components/recharts/__init__.pyi b/reflex/components/recharts/__init__.pyi index 8f6c4673f..61fc9b1e7 100644 --- a/reflex/components/recharts/__init__.pyi +++ b/reflex/components/recharts/__init__.pyi @@ -53,11 +53,13 @@ from .charts import radar_chart as radar_chart from .charts import radial_bar_chart as radial_bar_chart from .charts import scatter_chart as scatter_chart from .charts import treemap as treemap +from .general import Cell as Cell from .general import GraphingTooltip as GraphingTooltip from .general import Label as Label from .general import LabelList as LabelList from .general import Legend as Legend from .general import ResponsiveContainer as ResponsiveContainer +from .general import cell as cell from .general import graphing_tooltip as graphing_tooltip from .general import label as label from .general import label_list as label_list diff --git a/reflex/components/recharts/general.py b/reflex/components/recharts/general.py index 1769ea125..123c7708a 100644 --- a/reflex/components/recharts/general.py +++ b/reflex/components/recharts/general.py @@ -242,8 +242,23 @@ class LabelList(Recharts): stroke: Var[Union[str, Color]] = LiteralVar.create("none") +class Cell(Recharts): + """A Cell component in Recharts.""" + + tag = "Cell" + + alias = "RechartsCell" + + # The presentation attribute of a rectangle in bar or a sector in pie. + fill: Var[str] + + # The presentation attribute of a rectangle in bar or a sector in pie. + stroke: Var[str] + + responsive_container = ResponsiveContainer.create legend = Legend.create graphing_tooltip = GraphingTooltip.create label = Label.create label_list = LabelList.create +cell = Cell.create diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi index 823a50fce..74a65c277 100644 --- a/reflex/components/recharts/general.pyi +++ b/reflex/components/recharts/general.pyi @@ -482,8 +482,59 @@ class LabelList(Recharts): """ ... +class Cell(Recharts): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + fill: Optional[Union[Var[str], str]] = None, + stroke: Optional[Union[Var[str], str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[[], BASE_STATE]] = None, + **props, + ) -> "Cell": + """Create the component. + + Args: + *children: The children of the component. + fill: The presentation attribute of a rectangle in bar or a sector in pie. + stroke: The presentation attribute of a rectangle in bar or a sector in pie. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The props of the component. + + Returns: + The component. + """ + ... + responsive_container = ResponsiveContainer.create legend = Legend.create graphing_tooltip = GraphingTooltip.create label = Label.create label_list = LabelList.create +cell = Cell.create From a923f657ac03ec6a926b4e0e947dd1dff82e70bd Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 22 Jan 2025 07:27:17 -0800 Subject: [PATCH 027/144] retry failed tests (#4675) * retry failed tests * retry even more --- .github/workflows/integration_app_harness.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_app_harness.yml b/.github/workflows/integration_app_harness.yml index 6148ecd1a..5e88fc412 100644 --- a/.github/workflows/integration_app_harness.yml +++ b/.github/workflows/integration_app_harness.yml @@ -47,14 +47,14 @@ jobs: python-version: ${{ matrix.python-version }} run-poetry-install: true create-venv-at-path: .venv - - run: poetry run uv pip install pyvirtualdisplay pillow pytest-split + - run: poetry run uv pip install pyvirtualdisplay pillow pytest-split pytest-retry - name: Run app harness tests env: SCREENSHOT_DIR: /tmp/screenshots/${{ matrix.state_manager }}/${{ matrix.python-version }}/${{ matrix.split_index }} REDIS_URL: ${{ matrix.state_manager == 'redis' && 'redis://localhost:6379' || '' }} run: | poetry run playwright install chromium - poetry run pytest tests/integration --splits 2 --group ${{matrix.split_index}} + poetry run pytest tests/integration --retries 3 --maxfail=5 --splits 2 --group ${{matrix.split_index}} - uses: actions/upload-artifact@v4 name: Upload failed test screenshots if: always() From 728607643fa1656caa9dda3b61e96e793da5f86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 22 Jan 2025 07:58:33 -0800 Subject: [PATCH 028/144] attempt to fix usage when volta is installing node (#4664) * attempt to fix usage when volta is installing node * use absolute() instead of resolve() * fix stuff --- reflex/utils/path_ops.py | 6 +++--- reflex/utils/prerequisites.py | 2 +- reflex/utils/processes.py | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/reflex/utils/path_ops.py b/reflex/utils/path_ops.py index 38560977e..b447718d2 100644 --- a/reflex/utils/path_ops.py +++ b/reflex/utils/path_ops.py @@ -174,7 +174,7 @@ def get_node_path() -> str | None: return str(node_path) -def get_npm_path() -> str | None: +def get_npm_path() -> Path | None: """Get npm binary path. Returns: @@ -183,8 +183,8 @@ def get_npm_path() -> str | None: npm_path = Path(constants.Node.NPM_PATH) if use_system_node() or not npm_path.exists(): system_npm_path = which("npm") - return str(system_npm_path) if system_npm_path else None - return str(npm_path) + npm_path = Path(system_npm_path) if system_npm_path else None + return npm_path.absolute() if npm_path else None def update_json_file(file_path: str | Path, update_dict: dict[str, int | str]): diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 4f9cc0c14..415519c8f 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -254,7 +254,7 @@ def get_package_manager(on_failure_return_none: bool = False) -> str | None: """ npm_path = path_ops.get_npm_path() if npm_path is not None: - return str(Path(npm_path).resolve()) + return str(npm_path) if on_failure_return_none: return None raise FileNotFoundError("NPM not found. You may need to run `reflex init`.") diff --git a/reflex/utils/processes.py b/reflex/utils/processes.py index 3673b36b2..575688eda 100644 --- a/reflex/utils/processes.py +++ b/reflex/utils/processes.py @@ -9,7 +9,6 @@ import os import signal import subprocess from concurrent import futures -from pathlib import Path from typing import Callable, Generator, List, Optional, Tuple, Union import psutil @@ -368,7 +367,7 @@ def get_command_with_loglevel(command: list[str]) -> list[str]: The updated command list """ npm_path = path_ops.get_npm_path() - npm_path = str(Path(npm_path).resolve()) if npm_path else npm_path + npm_path = str(npm_path) if npm_path else None if command[0] == npm_path: return [*command, "--loglevel", "silly"] From 8de14d4384dcd74b68b2686cacc838f976542899 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 22 Jan 2025 11:11:25 -0800 Subject: [PATCH 029/144] Fix recharts min width/height (#4672) --- reflex/components/recharts/charts.py | 12 +++++++----- reflex/components/recharts/general.py | 8 ++++---- reflex/components/recharts/general.pyi | 8 ++++---- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/reflex/components/recharts/charts.py b/reflex/components/recharts/charts.py index bbe733244..c25107dc0 100644 --- a/reflex/components/recharts/charts.py +++ b/reflex/components/recharts/charts.py @@ -88,11 +88,13 @@ class ChartBase(RechartsCharts): "width": width if width is not None else "100%", "height": height if height is not None else "100%", } - # Provide min dimensions so the graph always appears, even if the outer container is zero-size. - if width is None: - dim_props["min_width"] = 200 - if height is None: - dim_props["min_height"] = 100 + + # Ensure that the min_height and min_width are set to prevent the chart from collapsing. + # We are using small values so that height and width can still be used over min_height and min_width. + # Without this, sometimes the chart will not be visible. Causing confusion to the user. + # With this, the user will see a small chart and can adjust the height and width and can figure out that the issue is with the size. + dim_props["min_height"] = props.pop("min_height", 10) + dim_props["min_width"] = props.pop("min_width", 10) return ResponsiveContainer.create( super().create(*children, **props), diff --git a/reflex/components/recharts/general.py b/reflex/components/recharts/general.py index 123c7708a..9a5c276b6 100644 --- a/reflex/components/recharts/general.py +++ b/reflex/components/recharts/general.py @@ -36,11 +36,11 @@ class ResponsiveContainer(Recharts, MemoizationLeaf): # The height of chart container. Can be a number or string. Default: "100%" height: Var[Union[int, str]] - # The minimum width of chart container. Number - min_width: Var[int] + # The minimum width of chart container. Number or string. + min_width: Var[Union[int, str]] - # The minimum height of chart container. Number - min_height: Var[int] + # The minimum height of chart container. Number or string. + min_height: Var[Union[int, str]] # If specified a positive number, debounced function will be used to handle the resize event. Default: 0 debounce: Var[int] diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi index 74a65c277..eae08a5cc 100644 --- a/reflex/components/recharts/general.pyi +++ b/reflex/components/recharts/general.pyi @@ -22,8 +22,8 @@ class ResponsiveContainer(Recharts, MemoizationLeaf): aspect: Optional[Union[Var[int], int]] = None, width: Optional[Union[Var[Union[int, str]], int, str]] = None, height: Optional[Union[Var[Union[int, str]], int, str]] = None, - min_width: Optional[Union[Var[int], int]] = None, - min_height: Optional[Union[Var[int], int]] = None, + min_width: Optional[Union[Var[Union[int, str]], int, str]] = None, + min_height: Optional[Union[Var[Union[int, str]], int, str]] = None, debounce: Optional[Union[Var[int], int]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -56,8 +56,8 @@ class ResponsiveContainer(Recharts, MemoizationLeaf): aspect: The aspect ratio of the container. The final aspect ratio of the SVG element will be (width / height) * aspect. Number width: The width of chart container. Can be a number or string. Default: "100%" height: The height of chart container. Can be a number or string. Default: "100%" - min_width: The minimum width of chart container. Number - min_height: The minimum height of chart container. Number + min_width: The minimum width of chart container. Number or string. + min_height: The minimum height of chart container. Number or string. debounce: If specified a positive number, debounced function will be used to handle the resize event. Default: 0 on_resize: If specified provides a callback providing the updated chart width and height values. style: The style of the component. From db13fe65b8d94b0940c93009ccc33cfa2fb39515 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 22 Jan 2025 11:11:47 -0800 Subject: [PATCH 030/144] reflex export environment should default to prod (#4673) * reflex export environment should default to prod * what * wat * what is this silly goose --- reflex/reflex.py | 4 ++++ reflex/testing.py | 1 + reflex/utils/export.py | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/reflex/reflex.py b/reflex/reflex.py index 2d6ebc30c..576e92c59 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -306,6 +306,9 @@ def export( help="Whether to exclude sqlite db files when exporting backend.", hidden=True, ), + env: constants.Env = typer.Option( + constants.Env.PROD, help="The environment to export the app in." + ), loglevel: constants.LogLevel = typer.Option( config.loglevel, help="The log level to use." ), @@ -323,6 +326,7 @@ def export( backend=backend, zip_dest_dir=zip_dest_dir, upload_db_file=upload_db_file, + env=env, loglevel=loglevel.subprocess_level(), ) diff --git a/reflex/testing.py b/reflex/testing.py index a1083d250..00b29a1df 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -933,6 +933,7 @@ class AppHarnessProd(AppHarness): frontend=True, backend=False, loglevel=reflex.constants.LogLevel.INFO, + env=reflex.constants.Env.PROD, ) self.frontend_thread = threading.Thread(target=self._run_frontend) diff --git a/reflex/utils/export.py b/reflex/utils/export.py index 2fbf633f6..edb4a6e1a 100644 --- a/reflex/utils/export.py +++ b/reflex/utils/export.py @@ -4,7 +4,7 @@ from pathlib import Path from typing import Optional from reflex import constants -from reflex.config import get_config +from reflex.config import environment, get_config from reflex.utils import build, console, exec, prerequisites, telemetry config = get_config() @@ -18,6 +18,7 @@ def export( upload_db_file: bool = False, api_url: Optional[str] = None, deploy_url: Optional[str] = None, + env: constants.Env = constants.Env.PROD, loglevel: constants.LogLevel = console._LOG_LEVEL, ): """Export the app to a zip file. @@ -30,11 +31,15 @@ def export( upload_db_file: Whether to upload the database file. Defaults to False. api_url: The API URL to use. Defaults to None. deploy_url: The deploy URL to use. Defaults to None. + env: The environment to use. Defaults to constants.Env.PROD. loglevel: The log level to use. Defaults to console._LOG_LEVEL. """ # Set the log level. console.set_log_level(loglevel) + # Set env mode in the environment + environment.REFLEX_ENV_MODE.set(env) + # Override the config url values if provided. if api_url is not None: config.api_url = str(api_url) From 4c2b2ed1c66d4b24c327c6fdfeeef7b59c60da52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 22 Jan 2025 11:54:37 -0800 Subject: [PATCH 031/144] removing deprecated features for 0.7.0 and removing py3.9 support (#4586) * remove deprecated features and support for py3.9 * remove other deprecated stuff * update lock file * fix units tests * relock poetry * fix _replace for computed_var * fix some merge typo * fix typing of deploy args * fix benchmarks.yml versions * console.error instead of raising Exception * fix tests * ignore lambdas when resolving annotations * simplify redirect logic in event.py * more fixes * fix unit tests again * give back default annotations for lambdas * fix signature check for on_submit * remove useless stuff * update pyi * readd the getattr * raise if log_level is wrong type * silly goose, loglevel is a subclass of str * i don't believe this code * add guard --------- Co-authored-by: Khaleel Al-Adhami --- .github/workflows/benchmarks.yml | 14 +- .../workflows/check_outdated_dependencies.yml | 2 +- .github/workflows/integration_tests.yml | 11 +- .github/workflows/unit_tests.yml | 10 +- .pre-commit-config.yaml | 2 +- CONTRIBUTING.md | 4 +- README.md | 2 +- docs/de/README.md | 2 +- docs/es/README.md | 2 +- docs/in/README.md | 2 +- docs/it/README.md | 2 +- docs/ja/README.md | 2 +- docs/kr/README.md | 2 +- docs/pe/README.md | 2 +- docs/pt/pt_br/README.md | 2 +- docs/tr/README.md | 2 +- docs/vi/README.md | 2 +- docs/zh/zh_cn/README.md | 2 +- docs/zh/zh_tw/README.md | 2 +- poetry.lock | 1437 ++++++++--------- pyproject.toml | 5 +- .../custom_components/pyproject.toml.jinja2 | 2 +- reflex/__init__.py | 16 - reflex/__init__.pyi | 1 - reflex/components/component.py | 40 +- reflex/components/datadisplay/code.py | 15 +- reflex/components/el/elements/forms.py | 4 +- reflex/components/el/elements/forms.pyi | 8 +- reflex/components/radix/primitives/form.pyi | 12 +- reflex/event.py | 176 +- reflex/experimental/__init__.py | 2 - reflex/experimental/assets.py | 37 - reflex/reflex.py | 25 +- reflex/state.py | 11 +- reflex/style.py | 4 +- reflex/utils/console.py | 14 +- reflex/utils/exceptions.py | 64 +- reflex/utils/exec.py | 66 +- reflex/utils/format.py | 32 - reflex/utils/prerequisites.py | 24 +- reflex/utils/telemetry.py | 2 +- reflex/vars/base.py | 51 +- tests/integration/init-test/Dockerfile | 2 +- tests/integration/test_call_script.py | 48 +- tests/integration/test_client_storage.py | 12 +- tests/units/assets/test_assets.py | 13 - .../units/components/datadisplay/conftest.py | 14 +- .../components/datadisplay/test_datatable.py | 9 +- tests/units/components/test_component.py | 77 +- tests/units/test_event.py | 7 +- tests/units/test_state.py | 10 +- tests/units/test_var.py | 7 +- 52 files changed, 987 insertions(+), 1329 deletions(-) delete mode 100644 reflex/experimental/assets.py diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index cbc34fff9..13c93bef1 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -81,24 +81,18 @@ jobs: matrix: # Show OS combos first in GUI os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.9.21", "3.10.16", "3.11.11", "3.12.8"] + python-version: ['3.10.16', '3.11.11', '3.12.8'] exclude: - os: windows-latest - python-version: "3.10.16" - - os: windows-latest - python-version: "3.9.21" + python-version: '3.10.16' # keep only one python version for MacOS - os: macos-latest - python-version: "3.9.21" - - os: macos-latest - python-version: "3.10.16" + python-version: '3.10.16' - os: macos-latest python-version: "3.11.11" include: - os: windows-latest - python-version: "3.10.11" - - os: windows-latest - python-version: "3.9.13" + python-version: '3.10.11' runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/check_outdated_dependencies.yml b/.github/workflows/check_outdated_dependencies.yml index 30e048912..29a19d615 100644 --- a/.github/workflows/check_outdated_dependencies.yml +++ b/.github/workflows/check_outdated_dependencies.yml @@ -16,7 +16,7 @@ jobs: - uses: ./.github/actions/setup_build_env with: - python-version: "3.9.21" + python-version: '3.10' run-poetry-install: true create-venv-at-path: .venv diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 2ca9aed23..b02604fd6 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -43,22 +43,17 @@ jobs: matrix: # Show OS combos first in GUI os: [ubuntu-latest, windows-latest] - python-version: ["3.9.21", "3.10.16", "3.11.11", "3.12.8", "3.13.1"] - # Windows is a bit behind on Python version availability in Github + python-version: ['3.10.16', '3.11.11', '3.12.8', '3.13.1'] exclude: - os: windows-latest python-version: "3.11.11" - os: windows-latest - python-version: "3.10.16" - - os: windows-latest - python-version: "3.9.21" + python-version: '3.10.16' include: - os: windows-latest python-version: "3.11.9" - os: windows-latest - python-version: "3.10.11" - - os: windows-latest - python-version: "3.9.13" + python-version: '3.10.11' runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index e0a3723ac..1ef063ca7 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -28,22 +28,18 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python-version: ["3.9.21", "3.10.16", "3.11.11", "3.12.8", "3.13.1"] + python-version: ["3.10.16", "3.11.11", "3.12.8", "3.13.1"] # Windows is a bit behind on Python version availability in Github exclude: - os: windows-latest python-version: "3.11.11" - os: windows-latest python-version: "3.10.16" - - os: windows-latest - python-version: "3.9.21" include: - os: windows-latest python-version: "3.11.9" - os: windows-latest python-version: "3.10.11" - - os: windows-latest - python-version: "3.9.13" runs-on: ${{ matrix.os }} # Service containers to run with `runner-job` @@ -92,8 +88,8 @@ jobs: strategy: fail-fast: false matrix: - # Note: py39, py310, py311 versions chosen due to available arm64 darwin builds. - python-version: ["3.9.13", "3.10.11", "3.11.9", "3.12.8", "3.13.1"] + # Note: py310, py311 versions chosen due to available arm64 darwin builds. + python-version: ["3.10.11", "3.11.9", "3.12.8", "3.13.1"] runs-on: macos-latest steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac25a335e..54d8f3d72 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: entry: python3 scripts/make_pyi.py - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.313 + rev: v1.1.334 hooks: - id: pyright args: [reflex, tests] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc8398013..aed576c42 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Here is a quick guide on how to run Reflex repo locally so you can start contrib **Prerequisites:** -- Python >= 3.9 +- Python >= 3.10 - Poetry version >= 1.4.0 and add it to your path (see [Poetry Docs](https://python-poetry.org/docs/#installation) for more info). **1. Fork this repository:** @@ -87,7 +87,7 @@ poetry run ruff format . ``` Consider installing git pre-commit hooks so Ruff, Pyright, Darglint and `make_pyi` will run automatically before each commit. -Note that pre-commit will only be installed when you use a Python version >= 3.9. +Note that pre-commit will only be installed when you use a Python version >= 3.10. ``` bash pre-commit install diff --git a/README.md b/README.md index 5e098b2d3..5174d563e 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ See our [architecture page](https://reflex.dev/blog/2024-03-21-reflex-architectu ## ⚙️ Installation -Open a terminal and run (Requires Python 3.9+): +Open a terminal and run (Requires Python 3.10+): ```bash pip install reflex diff --git a/docs/de/README.md b/docs/de/README.md index 9931c24cc..6d2d69e94 100644 --- a/docs/de/README.md +++ b/docs/de/README.md @@ -34,7 +34,7 @@ Auf unserer [Architektur-Seite](https://reflex.dev/blog/2024-03-21-reflex-archit ## ⚙️ Installation -Öffne ein Terminal und führe den folgenden Befehl aus (benötigt Python 3.9+): +Öffne ein Terminal und führe den folgenden Befehl aus (benötigt Python 3.10+): ```bash pip install reflex diff --git a/docs/es/README.md b/docs/es/README.md index 15ce63335..538192e4b 100644 --- a/docs/es/README.md +++ b/docs/es/README.md @@ -35,7 +35,7 @@ Consulta nuestra [página de arquitectura](https://reflex.dev/blog/2024-03-21-re ## ⚙️ Instalación -Abra un terminal y ejecute (Requiere Python 3.9+): +Abra un terminal y ejecute (Requiere Python 3.10+): ```bash pip install reflex diff --git a/docs/in/README.md b/docs/in/README.md index ebc4155f4..81b1106ff 100644 --- a/docs/in/README.md +++ b/docs/in/README.md @@ -35,7 +35,7 @@ Reflex के अंदर के कामकाज को जानने क ## ⚙️ इंस्टॉलेशन (Installation) -एक टर्मिनल खोलें और चलाएं (Python 3.9+ की आवश्यकता है): +एक टर्मिनल खोलें और चलाएं (Python 3.10+ की आवश्यकता है): ```bash pip install reflex diff --git a/docs/it/README.md b/docs/it/README.md index 92438f696..cd6f24dd8 100644 --- a/docs/it/README.md +++ b/docs/it/README.md @@ -22,7 +22,7 @@ ## ⚙️ Installazione -Apri un terminale ed esegui (Richiede Python 3.9+): +Apri un terminale ed esegui (Richiede Python 3.10+): ```bash pip install reflex diff --git a/docs/ja/README.md b/docs/ja/README.md index 0a7ab0d53..941bef601 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -37,7 +37,7 @@ Reflex がどのように動作しているかを知るには、[アーキテク ## ⚙️ インストール -ターミナルを開いて以下のコマンドを実行してください。(Python 3.9 以上が必要です。): +ターミナルを開いて以下のコマンドを実行してください。(Python 3.10 以上が必要です。): ```bash pip install reflex diff --git a/docs/kr/README.md b/docs/kr/README.md index a92fcd0c5..57bb43794 100644 --- a/docs/kr/README.md +++ b/docs/kr/README.md @@ -20,7 +20,7 @@ --- ## ⚙️ 설치 -터미널을 열고 실행하세요. (Python 3.9+ 필요): +터미널을 열고 실행하세요. (Python 3.10+ 필요): ```bash pip install reflex diff --git a/docs/pe/README.md b/docs/pe/README.md index 3a0ba044b..867b543bc 100644 --- a/docs/pe/README.md +++ b/docs/pe/README.md @@ -34,7 +34,7 @@ ## ⚙️ Installation - نصب و راه اندازی -یک ترمینال را باز کنید و اجرا کنید (نیازمند Python 3.9+): +یک ترمینال را باز کنید و اجرا کنید (نیازمند Python 3.10+): ```bash pip install reflex diff --git a/docs/pt/pt_br/README.md b/docs/pt/pt_br/README.md index 184b668bc..8abfaebde 100644 --- a/docs/pt/pt_br/README.md +++ b/docs/pt/pt_br/README.md @@ -21,7 +21,7 @@ --- ## ⚙️ Instalação -Abra um terminal e execute (Requer Python 3.9+): +Abra um terminal e execute (Requer Python 3.10+): ```bash pip install reflex diff --git a/docs/tr/README.md b/docs/tr/README.md index 376547e01..afb8ae5b9 100644 --- a/docs/tr/README.md +++ b/docs/tr/README.md @@ -24,7 +24,7 @@ ## ⚙️ Kurulum -Bir terminal açın ve çalıştırın (Python 3.9+ gerekir): +Bir terminal açın ve çalıştırın (Python 3.10+ gerekir): ```bash pip install reflex diff --git a/docs/vi/README.md b/docs/vi/README.md index df7a31530..53fcad936 100644 --- a/docs/vi/README.md +++ b/docs/vi/README.md @@ -34,7 +34,7 @@ Các tính năng chính: ## ⚙️ Cài đặt -Mở cửa sổ lệnh và chạy (Yêu cầu Python phiên bản 3.9+): +Mở cửa sổ lệnh và chạy (Yêu cầu Python phiên bản 3.10+): ```bash pip install reflex diff --git a/docs/zh/zh_cn/README.md b/docs/zh/zh_cn/README.md index e114bc1e2..efaec0ca5 100644 --- a/docs/zh/zh_cn/README.md +++ b/docs/zh/zh_cn/README.md @@ -34,7 +34,7 @@ Reflex 是一个使用纯Python构建全栈web应用的库。 ## ⚙️ 安装 -打开一个终端并且运行(要求Python3.9+): +打开一个终端并且运行(要求Python3.10+): ```bash pip install reflex diff --git a/docs/zh/zh_tw/README.md b/docs/zh/zh_tw/README.md index 83f6b2ae2..6161e17d0 100644 --- a/docs/zh/zh_tw/README.md +++ b/docs/zh/zh_tw/README.md @@ -36,7 +36,7 @@ Reflex 是一個可以用純 Python 構建全端網頁應用程式的函式庫 ## ⚙️ 安裝 -開啟一個終端機並且執行 (需要 Python 3.9+): +開啟一個終端機並且執行 (需要 Python 3.10+): ```bash pip install reflex diff --git a/poetry.lock b/poetry.lock index cc778d19b..4cf859611 100644 --- a/poetry.lock +++ b/poetry.lock @@ -32,13 +32,13 @@ files = [ [[package]] name = "anyio" -version = "4.7.0" +version = "4.8.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352"}, - {file = "anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48"}, + {file = "anyio-4.8.0-py3-none-any.whl", hash = "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a"}, + {file = "anyio-4.8.0.tar.gz", hash = "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a"}, ] [package.dependencies] @@ -49,7 +49,7 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -76,19 +76,19 @@ files = [ [[package]] name = "attrs" -version = "24.2.0" +version = "24.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, - {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, + {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, + {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [package.extras] benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] @@ -146,13 +146,13 @@ virtualenv = ["virtualenv (>=20.0.35)"] [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -247,127 +247,114 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.4.0" +version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false -python-versions = ">=3.7.0" +python-versions = ">=3.7" files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, + {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, + {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, ] [[package]] name = "click" -version = "8.1.7" +version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] [package.dependencies] @@ -386,73 +373,73 @@ files = [ [[package]] name = "coverage" -version = "7.6.9" +version = "7.6.10" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" files = [ - {file = "coverage-7.6.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85d9636f72e8991a1706b2b55b06c27545448baf9f6dbf51c4004609aacd7dcb"}, - {file = "coverage-7.6.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:608a7fd78c67bee8936378299a6cb9f5149bb80238c7a566fc3e6717a4e68710"}, - {file = "coverage-7.6.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96d636c77af18b5cb664ddf12dab9b15a0cfe9c0bde715da38698c8cea748bfa"}, - {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75cded8a3cff93da9edc31446872d2997e327921d8eed86641efafd350e1df1"}, - {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7b15f589593110ae767ce997775d645b47e5cbbf54fd322f8ebea6277466cec"}, - {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:44349150f6811b44b25574839b39ae35291f6496eb795b7366fef3bd3cf112d3"}, - {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:d891c136b5b310d0e702e186d70cd16d1119ea8927347045124cb286b29297e5"}, - {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:db1dab894cc139f67822a92910466531de5ea6034ddfd2b11c0d4c6257168073"}, - {file = "coverage-7.6.9-cp310-cp310-win32.whl", hash = "sha256:41ff7b0da5af71a51b53f501a3bac65fb0ec311ebed1632e58fc6107f03b9198"}, - {file = "coverage-7.6.9-cp310-cp310-win_amd64.whl", hash = "sha256:35371f8438028fdccfaf3570b31d98e8d9eda8bb1d6ab9473f5a390969e98717"}, - {file = "coverage-7.6.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:932fc826442132dde42ee52cf66d941f581c685a6313feebed358411238f60f9"}, - {file = "coverage-7.6.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:085161be5f3b30fd9b3e7b9a8c301f935c8313dcf928a07b116324abea2c1c2c"}, - {file = "coverage-7.6.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ccc660a77e1c2bf24ddbce969af9447a9474790160cfb23de6be4fa88e3951c7"}, - {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c69e42c892c018cd3c8d90da61d845f50a8243062b19d228189b0224150018a9"}, - {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0824a28ec542a0be22f60c6ac36d679e0e262e5353203bea81d44ee81fe9c6d4"}, - {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4401ae5fc52ad8d26d2a5d8a7428b0f0c72431683f8e63e42e70606374c311a1"}, - {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:98caba4476a6c8d59ec1eb00c7dd862ba9beca34085642d46ed503cc2d440d4b"}, - {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ee5defd1733fd6ec08b168bd4f5387d5b322f45ca9e0e6c817ea6c4cd36313e3"}, - {file = "coverage-7.6.9-cp311-cp311-win32.whl", hash = "sha256:f2d1ec60d6d256bdf298cb86b78dd715980828f50c46701abc3b0a2b3f8a0dc0"}, - {file = "coverage-7.6.9-cp311-cp311-win_amd64.whl", hash = "sha256:0d59fd927b1f04de57a2ba0137166d31c1a6dd9e764ad4af552912d70428c92b"}, - {file = "coverage-7.6.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:99e266ae0b5d15f1ca8d278a668df6f51cc4b854513daab5cae695ed7b721cf8"}, - {file = "coverage-7.6.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9901d36492009a0a9b94b20e52ebfc8453bf49bb2b27bca2c9706f8b4f5a554a"}, - {file = "coverage-7.6.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abd3e72dd5b97e3af4246cdada7738ef0e608168de952b837b8dd7e90341f015"}, - {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ff74026a461eb0660366fb01c650c1d00f833a086b336bdad7ab00cc952072b3"}, - {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65dad5a248823a4996724a88eb51d4b31587aa7aa428562dbe459c684e5787ae"}, - {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:22be16571504c9ccea919fcedb459d5ab20d41172056206eb2994e2ff06118a4"}, - {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f957943bc718b87144ecaee70762bc2bc3f1a7a53c7b861103546d3a403f0a6"}, - {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0ae1387db4aecb1f485fb70a6c0148c6cdaebb6038f1d40089b1fc84a5db556f"}, - {file = "coverage-7.6.9-cp312-cp312-win32.whl", hash = "sha256:1a330812d9cc7ac2182586f6d41b4d0fadf9be9049f350e0efb275c8ee8eb692"}, - {file = "coverage-7.6.9-cp312-cp312-win_amd64.whl", hash = "sha256:b12c6b18269ca471eedd41c1b6a1065b2f7827508edb9a7ed5555e9a56dcfc97"}, - {file = "coverage-7.6.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:899b8cd4781c400454f2f64f7776a5d87bbd7b3e7f7bda0cb18f857bb1334664"}, - {file = "coverage-7.6.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:61f70dc68bd36810972e55bbbe83674ea073dd1dcc121040a08cdf3416c5349c"}, - {file = "coverage-7.6.9-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a289d23d4c46f1a82d5db4abeb40b9b5be91731ee19a379d15790e53031c014"}, - {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e216d8044a356fc0337c7a2a0536d6de07888d7bcda76febcb8adc50bdbbd00"}, - {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c026eb44f744acaa2bda7493dad903aa5bf5fc4f2554293a798d5606710055d"}, - {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e77363e8425325384f9d49272c54045bbed2f478e9dd698dbc65dbc37860eb0a"}, - {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:777abfab476cf83b5177b84d7486497e034eb9eaea0d746ce0c1268c71652077"}, - {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:447af20e25fdbe16f26e84eb714ba21d98868705cb138252d28bc400381f6ffb"}, - {file = "coverage-7.6.9-cp313-cp313-win32.whl", hash = "sha256:d872ec5aeb086cbea771c573600d47944eea2dcba8be5f3ee649bfe3cb8dc9ba"}, - {file = "coverage-7.6.9-cp313-cp313-win_amd64.whl", hash = "sha256:fd1213c86e48dfdc5a0cc676551db467495a95a662d2396ecd58e719191446e1"}, - {file = "coverage-7.6.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ba9e7484d286cd5a43744e5f47b0b3fb457865baf07bafc6bee91896364e1419"}, - {file = "coverage-7.6.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e5ea1cf0872ee455c03e5674b5bca5e3e68e159379c1af0903e89f5eba9ccc3a"}, - {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d10e07aa2b91835d6abec555ec8b2733347956991901eea6ffac295f83a30e4"}, - {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:13a9e2d3ee855db3dd6ea1ba5203316a1b1fd8eaeffc37c5b54987e61e4194ae"}, - {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c38bf15a40ccf5619fa2fe8f26106c7e8e080d7760aeccb3722664c8656b030"}, - {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d5275455b3e4627c8e7154feaf7ee0743c2e7af82f6e3b561967b1cca755a0be"}, - {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8f8770dfc6e2c6a2d4569f411015c8d751c980d17a14b0530da2d7f27ffdd88e"}, - {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8d2dfa71665a29b153a9681edb1c8d9c1ea50dfc2375fb4dac99ea7e21a0bcd9"}, - {file = "coverage-7.6.9-cp313-cp313t-win32.whl", hash = "sha256:5e6b86b5847a016d0fbd31ffe1001b63355ed309651851295315031ea7eb5a9b"}, - {file = "coverage-7.6.9-cp313-cp313t-win_amd64.whl", hash = "sha256:97ddc94d46088304772d21b060041c97fc16bdda13c6c7f9d8fcd8d5ae0d8611"}, - {file = "coverage-7.6.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:adb697c0bd35100dc690de83154627fbab1f4f3c0386df266dded865fc50a902"}, - {file = "coverage-7.6.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:be57b6d56e49c2739cdf776839a92330e933dd5e5d929966fbbd380c77f060be"}, - {file = "coverage-7.6.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1592791f8204ae9166de22ba7e6705fa4ebd02936c09436a1bb85aabca3e599"}, - {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e12ae8cc979cf83d258acb5e1f1cf2f3f83524d1564a49d20b8bec14b637f08"}, - {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb5555cff66c4d3d6213a296b360f9e1a8e323e74e0426b6c10ed7f4d021e464"}, - {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b9389a429e0e5142e69d5bf4a435dd688c14478a19bb901735cdf75e57b13845"}, - {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:592ac539812e9b46046620341498caf09ca21023c41c893e1eb9dbda00a70cbf"}, - {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a27801adef24cc30871da98a105f77995e13a25a505a0161911f6aafbd66e678"}, - {file = "coverage-7.6.9-cp39-cp39-win32.whl", hash = "sha256:8e3c3e38930cfb729cb8137d7f055e5a473ddaf1217966aa6238c88bd9fd50e6"}, - {file = "coverage-7.6.9-cp39-cp39-win_amd64.whl", hash = "sha256:e28bf44afa2b187cc9f41749138a64435bf340adfcacb5b2290c070ce99839d4"}, - {file = "coverage-7.6.9-pp39.pp310-none-any.whl", hash = "sha256:f3ca78518bc6bc92828cd11867b121891d75cae4ea9e908d72030609b996db1b"}, - {file = "coverage-7.6.9.tar.gz", hash = "sha256:4a8d8977b0c6ef5aeadcb644da9e69ae0dcfe66ec7f368c89c72e058bd71164d"}, + {file = "coverage-7.6.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5c912978f7fbf47ef99cec50c4401340436d200d41d714c7a4766f377c5b7b78"}, + {file = "coverage-7.6.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a01ec4af7dfeb96ff0078ad9a48810bb0cc8abcb0115180c6013a6b26237626c"}, + {file = "coverage-7.6.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3b204c11e2b2d883946fe1d97f89403aa1811df28ce0447439178cc7463448a"}, + {file = "coverage-7.6.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:32ee6d8491fcfc82652a37109f69dee9a830e9379166cb73c16d8dc5c2915165"}, + {file = "coverage-7.6.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675cefc4c06e3b4c876b85bfb7c59c5e2218167bbd4da5075cbe3b5790a28988"}, + {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f4f620668dbc6f5e909a0946a877310fb3d57aea8198bde792aae369ee1c23b5"}, + {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:4eea95ef275de7abaef630c9b2c002ffbc01918b726a39f5a4353916ec72d2f3"}, + {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e2f0280519e42b0a17550072861e0bc8a80a0870de260f9796157d3fca2733c5"}, + {file = "coverage-7.6.10-cp310-cp310-win32.whl", hash = "sha256:bc67deb76bc3717f22e765ab3e07ee9c7a5e26b9019ca19a3b063d9f4b874244"}, + {file = "coverage-7.6.10-cp310-cp310-win_amd64.whl", hash = "sha256:0f460286cb94036455e703c66988851d970fdfd8acc2a1122ab7f4f904e4029e"}, + {file = "coverage-7.6.10-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ea3c8f04b3e4af80e17bab607c386a830ffc2fb88a5484e1df756478cf70d1d3"}, + {file = "coverage-7.6.10-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:507a20fc863cae1d5720797761b42d2d87a04b3e5aeb682ef3b7332e90598f43"}, + {file = "coverage-7.6.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d37a84878285b903c0fe21ac8794c6dab58150e9359f1aaebbeddd6412d53132"}, + {file = "coverage-7.6.10-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a534738b47b0de1995f85f582d983d94031dffb48ab86c95bdf88dc62212142f"}, + {file = "coverage-7.6.10-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d7a2bf79378d8fb8afaa994f91bfd8215134f8631d27eba3e0e2c13546ce994"}, + {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6713ba4b4ebc330f3def51df1d5d38fad60b66720948112f114968feb52d3f99"}, + {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ab32947f481f7e8c763fa2c92fd9f44eeb143e7610c4ca9ecd6a36adab4081bd"}, + {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7bbd8c8f1b115b892e34ba66a097b915d3871db7ce0e6b9901f462ff3a975377"}, + {file = "coverage-7.6.10-cp311-cp311-win32.whl", hash = "sha256:299e91b274c5c9cdb64cbdf1b3e4a8fe538a7a86acdd08fae52301b28ba297f8"}, + {file = "coverage-7.6.10-cp311-cp311-win_amd64.whl", hash = "sha256:489a01f94aa581dbd961f306e37d75d4ba16104bbfa2b0edb21d29b73be83609"}, + {file = "coverage-7.6.10-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:27c6e64726b307782fa5cbe531e7647aee385a29b2107cd87ba7c0105a5d3853"}, + {file = "coverage-7.6.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c56e097019e72c373bae32d946ecf9858fda841e48d82df7e81c63ac25554078"}, + {file = "coverage-7.6.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7827a5bc7bdb197b9e066cdf650b2887597ad124dd99777332776f7b7c7d0d0"}, + {file = "coverage-7.6.10-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:204a8238afe787323a8b47d8be4df89772d5c1e4651b9ffa808552bdf20e1d50"}, + {file = "coverage-7.6.10-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67926f51821b8e9deb6426ff3164870976fe414d033ad90ea75e7ed0c2e5022"}, + {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e78b270eadb5702938c3dbe9367f878249b5ef9a2fcc5360ac7bff694310d17b"}, + {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:714f942b9c15c3a7a5fe6876ce30af831c2ad4ce902410b7466b662358c852c0"}, + {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:abb02e2f5a3187b2ac4cd46b8ced85a0858230b577ccb2c62c81482ca7d18852"}, + {file = "coverage-7.6.10-cp312-cp312-win32.whl", hash = "sha256:55b201b97286cf61f5e76063f9e2a1d8d2972fc2fcfd2c1272530172fd28c359"}, + {file = "coverage-7.6.10-cp312-cp312-win_amd64.whl", hash = "sha256:e4ae5ac5e0d1e4edfc9b4b57b4cbecd5bc266a6915c500f358817a8496739247"}, + {file = "coverage-7.6.10-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:05fca8ba6a87aabdd2d30d0b6c838b50510b56cdcfc604d40760dae7153b73d9"}, + {file = "coverage-7.6.10-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9e80eba8801c386f72e0712a0453431259c45c3249f0009aff537a517b52942b"}, + {file = "coverage-7.6.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a372c89c939d57abe09e08c0578c1d212e7a678135d53aa16eec4430adc5e690"}, + {file = "coverage-7.6.10-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec22b5e7fe7a0fa8509181c4aac1db48f3dd4d3a566131b313d1efc102892c18"}, + {file = "coverage-7.6.10-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26bcf5c4df41cad1b19c84af71c22cbc9ea9a547fc973f1f2cc9a290002c8b3c"}, + {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e4630c26b6084c9b3cb53b15bd488f30ceb50b73c35c5ad7871b869cb7365fd"}, + {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2396e8116db77789f819d2bc8a7e200232b7a282c66e0ae2d2cd84581a89757e"}, + {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:79109c70cc0882e4d2d002fe69a24aa504dec0cc17169b3c7f41a1d341a73694"}, + {file = "coverage-7.6.10-cp313-cp313-win32.whl", hash = "sha256:9e1747bab246d6ff2c4f28b4d186b205adced9f7bd9dc362051cc37c4a0c7bd6"}, + {file = "coverage-7.6.10-cp313-cp313-win_amd64.whl", hash = "sha256:254f1a3b1eef5f7ed23ef265eaa89c65c8c5b6b257327c149db1ca9d4a35f25e"}, + {file = "coverage-7.6.10-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2ccf240eb719789cedbb9fd1338055de2761088202a9a0b73032857e53f612fe"}, + {file = "coverage-7.6.10-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0c807ca74d5a5e64427c8805de15b9ca140bba13572d6d74e262f46f50b13273"}, + {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bcfa46d7709b5a7ffe089075799b902020b62e7ee56ebaed2f4bdac04c508d8"}, + {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e0de1e902669dccbf80b0415fb6b43d27edca2fbd48c74da378923b05316098"}, + {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f7b444c42bbc533aaae6b5a2166fd1a797cdb5eb58ee51a92bee1eb94a1e1cb"}, + {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b330368cb99ef72fcd2dc3ed260adf67b31499584dc8a20225e85bfe6f6cfed0"}, + {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:9a7cfb50515f87f7ed30bc882f68812fd98bc2852957df69f3003d22a2aa0abf"}, + {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f93531882a5f68c28090f901b1d135de61b56331bba82028489bc51bdd818d2"}, + {file = "coverage-7.6.10-cp313-cp313t-win32.whl", hash = "sha256:89d76815a26197c858f53c7f6a656686ec392b25991f9e409bcef020cd532312"}, + {file = "coverage-7.6.10-cp313-cp313t-win_amd64.whl", hash = "sha256:54a5f0f43950a36312155dae55c505a76cd7f2b12d26abeebbe7a0b36dbc868d"}, + {file = "coverage-7.6.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:656c82b8a0ead8bba147de9a89bda95064874c91a3ed43a00e687f23cc19d53a"}, + {file = "coverage-7.6.10-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ccc2b70a7ed475c68ceb548bf69cec1e27305c1c2606a5eb7c3afff56a1b3b27"}, + {file = "coverage-7.6.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5e37dc41d57ceba70956fa2fc5b63c26dba863c946ace9705f8eca99daecdc4"}, + {file = "coverage-7.6.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0aa9692b4fdd83a4647eeb7db46410ea1322b5ed94cd1715ef09d1d5922ba87f"}, + {file = "coverage-7.6.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa744da1820678b475e4ba3dfd994c321c5b13381d1041fe9c608620e6676e25"}, + {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c0b1818063dc9e9d838c09e3a473c1422f517889436dd980f5d721899e66f315"}, + {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:59af35558ba08b758aec4d56182b222976330ef8d2feacbb93964f576a7e7a90"}, + {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7ed2f37cfce1ce101e6dffdfd1c99e729dd2ffc291d02d3e2d0af8b53d13840d"}, + {file = "coverage-7.6.10-cp39-cp39-win32.whl", hash = "sha256:4bcc276261505d82f0ad426870c3b12cb177752834a633e737ec5ee79bbdff18"}, + {file = "coverage-7.6.10-cp39-cp39-win_amd64.whl", hash = "sha256:457574f4599d2b00f7f637a0700a6422243b3565509457b2dbd3f50703e11f59"}, + {file = "coverage-7.6.10-pp39.pp310-none-any.whl", hash = "sha256:fd34e7b3405f0cc7ab03d54a334c17a9e802897580d964bd8c2001f4b9fd488f"}, + {file = "coverage-7.6.10.tar.gz", hash = "sha256:7fb105327c8f8f0682e29843e2ff96af9dcbe5bab8eeb4b398c6a33a16d80a23"}, ] [package.dependencies] @@ -463,51 +450,53 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "43.0.3" +version = "44.0.0" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false -python-versions = ">=3.7" +python-versions = "!=3.9.0,!=3.9.1,>=3.7" files = [ - {file = "cryptography-43.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e"}, - {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e"}, - {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e1ce50266f4f70bf41a2c6dc4358afadae90e2a1e5342d3c08883df1675374f"}, - {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:443c4a81bb10daed9a8f334365fe52542771f25aedaf889fd323a853ce7377d6"}, - {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:74f57f24754fe349223792466a709f8e0c093205ff0dca557af51072ff47ab18"}, - {file = "cryptography-43.0.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9762ea51a8fc2a88b70cf2995e5675b38d93bf36bd67d91721c309df184f49bd"}, - {file = "cryptography-43.0.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:81ef806b1fef6b06dcebad789f988d3b37ccaee225695cf3e07648eee0fc6b73"}, - {file = "cryptography-43.0.3-cp37-abi3-win32.whl", hash = "sha256:cbeb489927bd7af4aa98d4b261af9a5bc025bd87f0e3547e11584be9e9427be2"}, - {file = "cryptography-43.0.3-cp37-abi3-win_amd64.whl", hash = "sha256:f46304d6f0c6ab8e52770addfa2fc41e6629495548862279641972b6215451cd"}, - {file = "cryptography-43.0.3-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:8ac43ae87929a5982f5948ceda07001ee5e83227fd69cf55b109144938d96984"}, - {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:846da004a5804145a5f441b8530b4bf35afbf7da70f82409f151695b127213d5"}, - {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f996e7268af62598f2fc1204afa98a3b5712313a55c4c9d434aef49cadc91d4"}, - {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f7b178f11ed3664fd0e995a47ed2b5ff0a12d893e41dd0494f406d1cf555cab7"}, - {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:c2e6fc39c4ab499049df3bdf567f768a723a5e8464816e8f009f121a5a9f4405"}, - {file = "cryptography-43.0.3-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:e1be4655c7ef6e1bbe6b5d0403526601323420bcf414598955968c9ef3eb7d16"}, - {file = "cryptography-43.0.3-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:df6b6c6d742395dd77a23ea3728ab62f98379eff8fb61be2744d4679ab678f73"}, - {file = "cryptography-43.0.3-cp39-abi3-win32.whl", hash = "sha256:d56e96520b1020449bbace2b78b603442e7e378a9b3bd68de65c782db1507995"}, - {file = "cryptography-43.0.3-cp39-abi3-win_amd64.whl", hash = "sha256:0c580952eef9bf68c4747774cde7ec1d85a6e61de97281f2dba83c7d2c806362"}, - {file = "cryptography-43.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d03b5621a135bffecad2c73e9f4deb1a0f977b9a8ffe6f8e002bf6c9d07b918c"}, - {file = "cryptography-43.0.3-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:a2a431ee15799d6db9fe80c82b055bae5a752bef645bba795e8e52687c69efe3"}, - {file = "cryptography-43.0.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:281c945d0e28c92ca5e5930664c1cefd85efe80e5c0d2bc58dd63383fda29f83"}, - {file = "cryptography-43.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:f18c716be16bc1fea8e95def49edf46b82fccaa88587a45f8dc0ff6ab5d8e0a7"}, - {file = "cryptography-43.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4a02ded6cd4f0a5562a8887df8b3bd14e822a90f97ac5e544c162899bc467664"}, - {file = "cryptography-43.0.3-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:53a583b6637ab4c4e3591a15bc9db855b8d9dee9a669b550f311480acab6eb08"}, - {file = "cryptography-43.0.3-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1ec0bcf7e17c0c5669d881b1cd38c4972fade441b27bda1051665faaa89bdcaa"}, - {file = "cryptography-43.0.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2ce6fae5bdad59577b44e4dfed356944fbf1d925269114c28be377692643b4ff"}, - {file = "cryptography-43.0.3.tar.gz", hash = "sha256:315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805"}, + {file = "cryptography-44.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:84111ad4ff3f6253820e6d3e58be2cc2a00adb29335d4cacb5ab4d4d34f2a123"}, + {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b15492a11f9e1b62ba9d73c210e2416724633167de94607ec6069ef724fad092"}, + {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831c3c4d0774e488fdc83a1923b49b9957d33287de923d58ebd3cec47a0ae43f"}, + {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb"}, + {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b"}, + {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543"}, + {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:60eb32934076fa07e4316b7b2742fa52cbb190b42c2df2863dbc4230a0a9b385"}, + {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e"}, + {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e"}, + {file = "cryptography-44.0.0-cp37-abi3-win32.whl", hash = "sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053"}, + {file = "cryptography-44.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:abc998e0c0eee3c8a1904221d3f67dcfa76422b23620173e28c11d3e626c21bd"}, + {file = "cryptography-44.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:660cb7312a08bc38be15b696462fa7cc7cd85c3ed9c576e81f4dc4d8b2b31591"}, + {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1923cb251c04be85eec9fda837661c67c1049063305d6be5721643c22dd4e2b7"}, + {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:404fdc66ee5f83a1388be54300ae978b2efd538018de18556dde92575e05defc"}, + {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289"}, + {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7"}, + {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c"}, + {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9abcc2e083cbe8dde89124a47e5e53ec38751f0d7dfd36801008f316a127d7ba"}, + {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64"}, + {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285"}, + {file = "cryptography-44.0.0-cp39-abi3-win32.whl", hash = "sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417"}, + {file = "cryptography-44.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:708ee5f1bafe76d041b53a4f95eb28cdeb8d18da17e597d46d7833ee59b97ede"}, + {file = "cryptography-44.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:37d76e6863da3774cd9db5b409a9ecfd2c71c981c38788d3fcfaf177f447b731"}, + {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:f677e1268c4e23420c3acade68fac427fffcb8d19d7df95ed7ad17cdef8404f4"}, + {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f5e7cb1e5e56ca0933b4873c0220a78b773b24d40d186b6738080b73d3d0a756"}, + {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:8b3e6eae66cf54701ee7d9c83c30ac0a1e3fa17be486033000f2a73a12ab507c"}, + {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:be4ce505894d15d5c5037167ffb7f0ae90b7be6f2a98f9a5c3442395501c32fa"}, + {file = "cryptography-44.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:62901fb618f74d7d81bf408c8719e9ec14d863086efe4185afd07c352aee1d2c"}, + {file = "cryptography-44.0.0.tar.gz", hash = "sha256:cd4e834f340b4293430701e772ec543b0fbe6c2dea510a5286fe0acabe153a02"}, ] [package.dependencies] cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} [package.extras] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] -docstest = ["pyenchant (>=1.6.11)", "readme-renderer", "sphinxcontrib-spelling (>=4.0.1)"] -nox = ["nox"] -pep8test = ["check-sdist", "click", "mypy", "ruff"] -sdist = ["build"] +docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=3.0.0)"] +docstest = ["pyenchant (>=3)", "readme-renderer (>=30.0)", "sphinxcontrib-spelling (>=7.3.1)"] +nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2)"] +pep8test = ["check-sdist", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] +sdist = ["build (>=1.0.0)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi", "cryptography-vectors (==43.0.3)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test = ["certifi (>=2024)", "cryptography-vectors (==44.0.0)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] test-randomorder = ["pytest-randomly"] [[package]] @@ -784,13 +773,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "identify" -version = "2.6.3" +version = "2.6.5" description = "File identification library for Python" optional = false python-versions = ">=3.9" files = [ - {file = "identify-2.6.3-py2.py3-none-any.whl", hash = "sha256:9edba65473324c2ea9684b1f944fe3191db3345e50b6d04571d10ed164f8d7bd"}, - {file = "identify-2.6.3.tar.gz", hash = "sha256:62f5dae9b5fef52c84cc188514e9ea4f3f636b1d8799ab5ebc475471f9e47a02"}, + {file = "identify-2.6.5-py2.py3-none-any.whl", hash = "sha256:14181a47091eb75b337af4c23078c9d09225cd4c48929f521f3bf16b09d02566"}, + {file = "identify-2.6.5.tar.gz", hash = "sha256:c10b33f250e5bba374fae86fb57f3adcebf1161bce7cdf92031915fd480c13bc"}, ] [package.extras] @@ -919,13 +908,13 @@ trio = ["async_generator", "trio"] [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, + {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, + {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, ] [package.dependencies] @@ -936,17 +925,17 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "25.5.0" +version = "25.6.0" description = "Store and access your passwords safely." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "keyring-25.5.0-py3-none-any.whl", hash = "sha256:e67f8ac32b04be4714b42fe84ce7dad9c40985b9ca827c592cc303e7c26d9741"}, - {file = "keyring-25.5.0.tar.gz", hash = "sha256:4c753b3ec91717fe713c4edd522d625889d8973a349b0e582622f49766de58e6"}, + {file = "keyring-25.6.0-py3-none-any.whl", hash = "sha256:552a3f7af126ece7ed5c89753650eec89c7eaae8617d0aa4d9ad2b75111266bd"}, + {file = "keyring-25.6.0.tar.gz", hash = "sha256:0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66"}, ] [package.dependencies] -importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} +importlib_metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} "jaraco.classes" = "*" "jaraco.context" = "*" "jaraco.functools" = "*" @@ -1119,34 +1108,35 @@ files = [ [[package]] name = "nh3" -version = "0.2.19" -description = "Python bindings to the ammonia HTML sanitization library." +version = "0.2.20" +description = "Python binding to Ammonia HTML sanitizer Rust crate" optional = false -python-versions = "*" +python-versions = ">=3.8" files = [ - {file = "nh3-0.2.19-cp313-cp313t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:ec9c8bf86e397cb88c560361f60fdce478b5edb8b93f04ead419b72fbe937ea6"}, - {file = "nh3-0.2.19-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0adf00e2b2026fa10a42537b60d161e516f206781c7515e4e97e09f72a8c5d0"}, - {file = "nh3-0.2.19-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3805161c4e12088bd74752ba69630e915bc30fe666034f47217a2f16b16efc37"}, - {file = "nh3-0.2.19-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e3dedd7858a21312f7675841529941035a2ac91057db13402c8fe907aa19205a"}, - {file = "nh3-0.2.19-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:0b6820fc64f2ff7ef3e7253a093c946a87865c877b3889149a6d21d322ed8dbd"}, - {file = "nh3-0.2.19-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:833b3b5f1783ce95834a13030300cea00cbdfd64ea29260d01af9c4821da0aa9"}, - {file = "nh3-0.2.19-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5d4f5e2189861b352b73acb803b5f4bb409c2f36275d22717e27d4e0c217ae55"}, - {file = "nh3-0.2.19-cp313-cp313t-win32.whl", hash = "sha256:2b926f179eb4bce72b651bfdf76f8aa05d167b2b72bc2f3657fd319f40232adc"}, - {file = "nh3-0.2.19-cp313-cp313t-win_amd64.whl", hash = "sha256:ac536a4b5c073fdadd8f5f4889adabe1cbdae55305366fb870723c96ca7f49c3"}, - {file = "nh3-0.2.19-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:c2e3f0d18cc101132fe10ab7ef5c4f41411297e639e23b64b5e888ccaad63f41"}, - {file = "nh3-0.2.19-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:11270b16c1b012677e3e2dd166c1aa273388776bf99a3e3677179db5097ee16a"}, - {file = "nh3-0.2.19-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fc483dd8d20f8f8c010783a25a84db3bebeadced92d24d34b40d687f8043ac69"}, - {file = "nh3-0.2.19-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d53a4577b6123ca1d7e8483fad3e13cb7eda28913d516bd0a648c1a473aa21a9"}, - {file = "nh3-0.2.19-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fdb20740d24ab9f2a1341458a00a11205294e97e905de060eeab1ceca020c09c"}, - {file = "nh3-0.2.19-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d8325d51e47cb5b11f649d55e626d56c76041ba508cd59e0cb1cf687cc7612f1"}, - {file = "nh3-0.2.19-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8eb7affc590e542fa7981ef508cd1644f62176bcd10d4429890fc629b47f0bc"}, - {file = "nh3-0.2.19-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2eb021804e9df1761abeb844bb86648d77aa118a663c82f50ea04110d87ed707"}, - {file = "nh3-0.2.19-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:a7b928862daddb29805a1010a0282f77f4b8b238a37b5f76bc6c0d16d930fd22"}, - {file = "nh3-0.2.19-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:ed06ed78f6b69d57463b46a04f68f270605301e69d80756a8adf7519002de57d"}, - {file = "nh3-0.2.19-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:df8eac98fec80bd6f5fd0ae27a65de14f1e1a65a76d8e2237eb695f9cd1121d9"}, - {file = "nh3-0.2.19-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:00810cd5275f5c3f44b9eb0e521d1a841ee2f8023622de39ffc7d88bd533d8e0"}, - {file = "nh3-0.2.19-cp38-abi3-win32.whl", hash = "sha256:7e98621856b0a911c21faa5eef8f8ea3e691526c2433f9afc2be713cb6fbdb48"}, - {file = "nh3-0.2.19-cp38-abi3-win_amd64.whl", hash = "sha256:75c7cafb840f24430b009f7368945cb5ca88b2b54bb384ebfba495f16bc9c121"}, + {file = "nh3-0.2.20-cp313-cp313t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:e1061a4ab6681f6bdf72b110eea0c4e1379d57c9de937db3be4202f7ad6043db"}, + {file = "nh3-0.2.20-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb4254b1dac4a1ee49919a5b3f1caf9803ea8dada1816d9e8289e63d3cd0dd9a"}, + {file = "nh3-0.2.20-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0ae9cbd713524cdb81e64663d0d6aae26f678db9f2cd9db0bf162606f1f9f20c"}, + {file = "nh3-0.2.20-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e1f7370b4e14cc03f5ae141ef30a1caf81fa5787711f80be9081418dd9eb79d2"}, + {file = "nh3-0.2.20-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:ac4d27dc836a476efffc6eb661994426b8b805c951b29c9cf2ff36bc9ad58bc5"}, + {file = "nh3-0.2.20-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:4fd2e9248725ebcedac3997a8d3da0d90a12a28c9179c6ba51f1658938ac30d0"}, + {file = "nh3-0.2.20-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f7d564871833ddbe54df3aa59053b1110729d3a800cb7628ae8f42adb3d75208"}, + {file = "nh3-0.2.20-cp313-cp313t-win32.whl", hash = "sha256:d2a176fd4306b6f0f178a3f67fac91bd97a3a8d8fafb771c9b9ef675ba5c8886"}, + {file = "nh3-0.2.20-cp313-cp313t-win_amd64.whl", hash = "sha256:6ed834c68452a600f517dd3e1534dbfaff1f67f98899fecf139a055a25d99150"}, + {file = "nh3-0.2.20-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:76e2f603b30c02ff6456b233a83fc377dedab6a50947b04e960a6b905637b776"}, + {file = "nh3-0.2.20-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:181063c581defe683bd4bb78188ac9936d208aebbc74c7f7c16b6a32ae2ebb38"}, + {file = "nh3-0.2.20-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:231addb7643c952cd6d71f1c8702d703f8fe34afcb20becb3efb319a501a12d7"}, + {file = "nh3-0.2.20-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:1b9a8340a0aab991c68a5ca938d35ef4a8a3f4bf1b455da8855a40bee1fa0ace"}, + {file = "nh3-0.2.20-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10317cd96fe4bbd4eb6b95f3920b71c902157ad44fed103fdcde43e3b8ee8be6"}, + {file = "nh3-0.2.20-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8698db4c04b140800d1a1cd3067fda399e36e1e2b8fc1fe04292a907350a3e9b"}, + {file = "nh3-0.2.20-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3eb04b9c3deb13c3a375ea39fd4a3c00d1f92e8fb2349f25f1e3e4506751774b"}, + {file = "nh3-0.2.20-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:92f3f1c4f47a2c6f3ca7317b1d5ced05bd29556a75d3a4e2715652ae9d15c05d"}, + {file = "nh3-0.2.20-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ddefa9fd6794a87e37d05827d299d4b53a3ec6f23258101907b96029bfef138a"}, + {file = "nh3-0.2.20-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:ce3731c8f217685d33d9268362e5b4f770914e922bba94d368ab244a59a6c397"}, + {file = "nh3-0.2.20-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:09f037c02fc2c43b211ff1523de32801dcfb0918648d8e651c36ef890f1731ec"}, + {file = "nh3-0.2.20-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:813f1c8012dd64c990514b795508abb90789334f76a561fa0fd4ca32d2275330"}, + {file = "nh3-0.2.20-cp38-abi3-win32.whl", hash = "sha256:47b2946c0e13057855209daeffb45dc910bd0c55daf10190bb0b4b60e2999784"}, + {file = "nh3-0.2.20-cp38-abi3-win_amd64.whl", hash = "sha256:da87573f03084edae8eb87cfe811ec338606288f81d333c07d2a9a0b9b976c0b"}, + {file = "nh3-0.2.20.tar.gz", hash = "sha256:9705c42d7ff88a0bea546c82d7fe5e59135e3d3f057e485394f491248a1f8ed5"}, ] [[package]] @@ -1162,120 +1152,66 @@ files = [ [[package]] name = "numpy" -version = "2.0.2" -description = "Fundamental package for array computing in Python" -optional = false -python-versions = ">=3.9" -files = [ - {file = "numpy-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:51129a29dbe56f9ca83438b706e2e69a39892b5eda6cedcb6b0c9fdc9b0d3ece"}, - {file = "numpy-2.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f15975dfec0cf2239224d80e32c3170b1d168335eaedee69da84fbe9f1f9cd04"}, - {file = "numpy-2.0.2-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:8c5713284ce4e282544c68d1c3b2c7161d38c256d2eefc93c1d683cf47683e66"}, - {file = "numpy-2.0.2-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:becfae3ddd30736fe1889a37f1f580e245ba79a5855bff5f2a29cb3ccc22dd7b"}, - {file = "numpy-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2da5960c3cf0df7eafefd806d4e612c5e19358de82cb3c343631188991566ccd"}, - {file = "numpy-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:496f71341824ed9f3d2fd36cf3ac57ae2e0165c143b55c3a035ee219413f3318"}, - {file = "numpy-2.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a61ec659f68ae254e4d237816e33171497e978140353c0c2038d46e63282d0c8"}, - {file = "numpy-2.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d731a1c6116ba289c1e9ee714b08a8ff882944d4ad631fd411106a30f083c326"}, - {file = "numpy-2.0.2-cp310-cp310-win32.whl", hash = "sha256:984d96121c9f9616cd33fbd0618b7f08e0cfc9600a7ee1d6fd9b239186d19d97"}, - {file = "numpy-2.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:c7b0be4ef08607dd04da4092faee0b86607f111d5ae68036f16cc787e250a131"}, - {file = "numpy-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:49ca4decb342d66018b01932139c0961a8f9ddc7589611158cb3c27cbcf76448"}, - {file = "numpy-2.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:11a76c372d1d37437857280aa142086476136a8c0f373b2e648ab2c8f18fb195"}, - {file = "numpy-2.0.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:807ec44583fd708a21d4a11d94aedf2f4f3c3719035c76a2bbe1fe8e217bdc57"}, - {file = "numpy-2.0.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:8cafab480740e22f8d833acefed5cc87ce276f4ece12fdaa2e8903db2f82897a"}, - {file = "numpy-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a15f476a45e6e5a3a79d8a14e62161d27ad897381fecfa4a09ed5322f2085669"}, - {file = "numpy-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13e689d772146140a252c3a28501da66dfecd77490b498b168b501835041f951"}, - {file = "numpy-2.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9ea91dfb7c3d1c56a0e55657c0afb38cf1eeae4544c208dc465c3c9f3a7c09f9"}, - {file = "numpy-2.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c1c9307701fec8f3f7a1e6711f9089c06e6284b3afbbcd259f7791282d660a15"}, - {file = "numpy-2.0.2-cp311-cp311-win32.whl", hash = "sha256:a392a68bd329eafac5817e5aefeb39038c48b671afd242710b451e76090e81f4"}, - {file = "numpy-2.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:286cd40ce2b7d652a6f22efdfc6d1edf879440e53e76a75955bc0c826c7e64dc"}, - {file = "numpy-2.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:df55d490dea7934f330006d0f81e8551ba6010a5bf035a249ef61a94f21c500b"}, - {file = "numpy-2.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8df823f570d9adf0978347d1f926b2a867d5608f434a7cff7f7908c6570dcf5e"}, - {file = "numpy-2.0.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:9a92ae5c14811e390f3767053ff54eaee3bf84576d99a2456391401323f4ec2c"}, - {file = "numpy-2.0.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:a842d573724391493a97a62ebbb8e731f8a5dcc5d285dfc99141ca15a3302d0c"}, - {file = "numpy-2.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c05e238064fc0610c840d1cf6a13bf63d7e391717d247f1bf0318172e759e692"}, - {file = "numpy-2.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0123ffdaa88fa4ab64835dcbde75dcdf89c453c922f18dced6e27c90d1d0ec5a"}, - {file = "numpy-2.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:96a55f64139912d61de9137f11bf39a55ec8faec288c75a54f93dfd39f7eb40c"}, - {file = "numpy-2.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ec9852fb39354b5a45a80bdab5ac02dd02b15f44b3804e9f00c556bf24b4bded"}, - {file = "numpy-2.0.2-cp312-cp312-win32.whl", hash = "sha256:671bec6496f83202ed2d3c8fdc486a8fc86942f2e69ff0e986140339a63bcbe5"}, - {file = "numpy-2.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:cfd41e13fdc257aa5778496b8caa5e856dc4896d4ccf01841daee1d96465467a"}, - {file = "numpy-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9059e10581ce4093f735ed23f3b9d283b9d517ff46009ddd485f1747eb22653c"}, - {file = "numpy-2.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:423e89b23490805d2a5a96fe40ec507407b8ee786d66f7328be214f9679df6dd"}, - {file = "numpy-2.0.2-cp39-cp39-macosx_14_0_arm64.whl", hash = "sha256:2b2955fa6f11907cf7a70dab0d0755159bca87755e831e47932367fc8f2f2d0b"}, - {file = "numpy-2.0.2-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:97032a27bd9d8988b9a97a8c4d2c9f2c15a81f61e2f21404d7e8ef00cb5be729"}, - {file = "numpy-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e795a8be3ddbac43274f18588329c72939870a16cae810c2b73461c40718ab1"}, - {file = "numpy-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f26b258c385842546006213344c50655ff1555a9338e2e5e02a0756dc3e803dd"}, - {file = "numpy-2.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5fec9451a7789926bcf7c2b8d187292c9f93ea30284802a0ab3f5be8ab36865d"}, - {file = "numpy-2.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9189427407d88ff25ecf8f12469d4d39d35bee1db5d39fc5c168c6f088a6956d"}, - {file = "numpy-2.0.2-cp39-cp39-win32.whl", hash = "sha256:905d16e0c60200656500c95b6b8dca5d109e23cb24abc701d41c02d74c6b3afa"}, - {file = "numpy-2.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:a3f4ab0caa7f053f6797fcd4e1e25caee367db3112ef2b6ef82d749530768c73"}, - {file = "numpy-2.0.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7f0a0c6f12e07fa94133c8a67404322845220c06a9e80e85999afe727f7438b8"}, - {file = "numpy-2.0.2-pp39-pypy39_pp73-macosx_14_0_x86_64.whl", hash = "sha256:312950fdd060354350ed123c0e25a71327d3711584beaef30cdaa93320c392d4"}, - {file = "numpy-2.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26df23238872200f63518dd2aa984cfca675d82469535dc7162dc2ee52d9dd5c"}, - {file = "numpy-2.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a46288ec55ebbd58947d31d72be2c63cbf839f0a63b49cb755022310792a3385"}, - {file = "numpy-2.0.2.tar.gz", hash = "sha256:883c987dee1880e2a864ab0dc9892292582510604156762362d9326444636e78"}, -] - -[[package]] -name = "numpy" -version = "2.2.0" +version = "2.2.1" description = "Fundamental package for array computing in Python" optional = false python-versions = ">=3.10" files = [ - {file = "numpy-2.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1e25507d85da11ff5066269d0bd25d06e0a0f2e908415534f3e603d2a78e4ffa"}, - {file = "numpy-2.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a62eb442011776e4036af5c8b1a00b706c5bc02dc15eb5344b0c750428c94219"}, - {file = "numpy-2.2.0-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:b606b1aaf802e6468c2608c65ff7ece53eae1a6874b3765f69b8ceb20c5fa78e"}, - {file = "numpy-2.2.0-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:36b2b43146f646642b425dd2027730f99bac962618ec2052932157e213a040e9"}, - {file = "numpy-2.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7fe8f3583e0607ad4e43a954e35c1748b553bfe9fdac8635c02058023277d1b3"}, - {file = "numpy-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:122fd2fcfafdefc889c64ad99c228d5a1f9692c3a83f56c292618a59aa60ae83"}, - {file = "numpy-2.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3f2f5cddeaa4424a0a118924b988746db6ffa8565e5829b1841a8a3bd73eb59a"}, - {file = "numpy-2.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7fe4bb0695fe986a9e4deec3b6857003b4cfe5c5e4aac0b95f6a658c14635e31"}, - {file = "numpy-2.2.0-cp310-cp310-win32.whl", hash = "sha256:b30042fe92dbd79f1ba7f6898fada10bdaad1847c44f2dff9a16147e00a93661"}, - {file = "numpy-2.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:54dc1d6d66f8d37843ed281773c7174f03bf7ad826523f73435deb88ba60d2d4"}, - {file = "numpy-2.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9874bc2ff574c40ab7a5cbb7464bf9b045d617e36754a7bc93f933d52bd9ffc6"}, - {file = "numpy-2.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0da8495970f6b101ddd0c38ace92edea30e7e12b9a926b57f5fabb1ecc25bb90"}, - {file = "numpy-2.2.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:0557eebc699c1c34cccdd8c3778c9294e8196df27d713706895edc6f57d29608"}, - {file = "numpy-2.2.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:3579eaeb5e07f3ded59298ce22b65f877a86ba8e9fe701f5576c99bb17c283da"}, - {file = "numpy-2.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40deb10198bbaa531509aad0cd2f9fadb26c8b94070831e2208e7df543562b74"}, - {file = "numpy-2.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2aed8fcf8abc3020d6a9ccb31dbc9e7d7819c56a348cc88fd44be269b37427e"}, - {file = "numpy-2.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a222d764352c773aa5ebde02dd84dba3279c81c6db2e482d62a3fa54e5ece69b"}, - {file = "numpy-2.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4e58666988605e251d42c2818c7d3d8991555381be26399303053b58a5bbf30d"}, - {file = "numpy-2.2.0-cp311-cp311-win32.whl", hash = "sha256:4723a50e1523e1de4fccd1b9a6dcea750c2102461e9a02b2ac55ffeae09a4410"}, - {file = "numpy-2.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:16757cf28621e43e252c560d25b15f18a2f11da94fea344bf26c599b9cf54b73"}, - {file = "numpy-2.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cff210198bb4cae3f3c100444c5eaa573a823f05c253e7188e1362a5555235b3"}, - {file = "numpy-2.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:58b92a5828bd4d9aa0952492b7de803135038de47343b2aa3cc23f3b71a3dc4e"}, - {file = "numpy-2.2.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:ebe5e59545401fbb1b24da76f006ab19734ae71e703cdb4a8b347e84a0cece67"}, - {file = "numpy-2.2.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:e2b8cd48a9942ed3f85b95ca4105c45758438c7ed28fff1e4ce3e57c3b589d8e"}, - {file = "numpy-2.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57fcc997ffc0bef234b8875a54d4058afa92b0b0c4223fc1f62f24b3b5e86038"}, - {file = "numpy-2.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85ad7d11b309bd132d74397fcf2920933c9d1dc865487128f5c03d580f2c3d03"}, - {file = "numpy-2.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cb24cca1968b21355cc6f3da1a20cd1cebd8a023e3c5b09b432444617949085a"}, - {file = "numpy-2.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0798b138c291d792f8ea40fe3768610f3c7dd2574389e37c3f26573757c8f7ef"}, - {file = "numpy-2.2.0-cp312-cp312-win32.whl", hash = "sha256:afe8fb968743d40435c3827632fd36c5fbde633b0423da7692e426529b1759b1"}, - {file = "numpy-2.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:3a4199f519e57d517ebd48cb76b36c82da0360781c6a0353e64c0cac30ecaad3"}, - {file = "numpy-2.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f8c8b141ef9699ae777c6278b52c706b653bf15d135d302754f6b2e90eb30367"}, - {file = "numpy-2.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0f0986e917aca18f7a567b812ef7ca9391288e2acb7a4308aa9d265bd724bdae"}, - {file = "numpy-2.2.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:1c92113619f7b272838b8d6702a7f8ebe5edea0df48166c47929611d0b4dea69"}, - {file = "numpy-2.2.0-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:5a145e956b374e72ad1dff82779177d4a3c62bc8248f41b80cb5122e68f22d13"}, - {file = "numpy-2.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18142b497d70a34b01642b9feabb70156311b326fdddd875a9981f34a369b671"}, - {file = "numpy-2.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7d41d1612c1a82b64697e894b75db6758d4f21c3ec069d841e60ebe54b5b571"}, - {file = "numpy-2.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a98f6f20465e7618c83252c02041517bd2f7ea29be5378f09667a8f654a5918d"}, - {file = "numpy-2.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e09d40edfdb4e260cb1567d8ae770ccf3b8b7e9f0d9b5c2a9992696b30ce2742"}, - {file = "numpy-2.2.0-cp313-cp313-win32.whl", hash = "sha256:3905a5fffcc23e597ee4d9fb3fcd209bd658c352657548db7316e810ca80458e"}, - {file = "numpy-2.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:a184288538e6ad699cbe6b24859206e38ce5fba28f3bcfa51c90d0502c1582b2"}, - {file = "numpy-2.2.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:7832f9e8eb00be32f15fdfb9a981d6955ea9adc8574c521d48710171b6c55e95"}, - {file = "numpy-2.2.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f0dd071b95bbca244f4cb7f70b77d2ff3aaaba7fa16dc41f58d14854a6204e6c"}, - {file = "numpy-2.2.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:b0b227dcff8cdc3efbce66d4e50891f04d0a387cce282fe1e66199146a6a8fca"}, - {file = "numpy-2.2.0-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:6ab153263a7c5ccaf6dfe7e53447b74f77789f28ecb278c3b5d49db7ece10d6d"}, - {file = "numpy-2.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e500aba968a48e9019e42c0c199b7ec0696a97fa69037bea163b55398e390529"}, - {file = "numpy-2.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:440cfb3db4c5029775803794f8638fbdbf71ec702caf32735f53b008e1eaece3"}, - {file = "numpy-2.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a55dc7a7f0b6198b07ec0cd445fbb98b05234e8b00c5ac4874a63372ba98d4ab"}, - {file = "numpy-2.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4bddbaa30d78c86329b26bd6aaaea06b1e47444da99eddac7bf1e2fab717bd72"}, - {file = "numpy-2.2.0-cp313-cp313t-win32.whl", hash = "sha256:30bf971c12e4365153afb31fc73f441d4da157153f3400b82db32d04de1e4066"}, - {file = "numpy-2.2.0-cp313-cp313t-win_amd64.whl", hash = "sha256:d35717333b39d1b6bb8433fa758a55f1081543de527171543a2b710551d40881"}, - {file = "numpy-2.2.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:e12c6c1ce84628c52d6367863773f7c8c8241be554e8b79686e91a43f1733773"}, - {file = "numpy-2.2.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:b6207dc8fb3c8cb5668e885cef9ec7f70189bec4e276f0ff70d5aa078d32c88e"}, - {file = "numpy-2.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a50aeff71d0f97b6450d33940c7181b08be1441c6c193e678211bff11aa725e7"}, - {file = "numpy-2.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:df12a1f99b99f569a7c2ae59aa2d31724e8d835fc7f33e14f4792e3071d11221"}, - {file = "numpy-2.2.0.tar.gz", hash = "sha256:140dd80ff8981a583a60980be1a655068f8adebf7a45a06a6858c873fcdcd4a0"}, + {file = "numpy-2.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5edb4e4caf751c1518e6a26a83501fda79bff41cc59dac48d70e6d65d4ec4440"}, + {file = "numpy-2.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aa3017c40d513ccac9621a2364f939d39e550c542eb2a894b4c8da92b38896ab"}, + {file = "numpy-2.2.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:61048b4a49b1c93fe13426e04e04fdf5a03f456616f6e98c7576144677598675"}, + {file = "numpy-2.2.1-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:7671dc19c7019103ca44e8d94917eba8534c76133523ca8406822efdd19c9308"}, + {file = "numpy-2.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4250888bcb96617e00bfa28ac24850a83c9f3a16db471eca2ee1f1714df0f957"}, + {file = "numpy-2.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7746f235c47abc72b102d3bce9977714c2444bdfaea7888d241b4c4bb6a78bf"}, + {file = "numpy-2.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:059e6a747ae84fce488c3ee397cee7e5f905fd1bda5fb18c66bc41807ff119b2"}, + {file = "numpy-2.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f62aa6ee4eb43b024b0e5a01cf65a0bb078ef8c395e8713c6e8a12a697144528"}, + {file = "numpy-2.2.1-cp310-cp310-win32.whl", hash = "sha256:48fd472630715e1c1c89bf1feab55c29098cb403cc184b4859f9c86d4fcb6a95"}, + {file = "numpy-2.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:b541032178a718c165a49638d28272b771053f628382d5e9d1c93df23ff58dbf"}, + {file = "numpy-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:40f9e544c1c56ba8f1cf7686a8c9b5bb249e665d40d626a23899ba6d5d9e1484"}, + {file = "numpy-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f9b57eaa3b0cd8db52049ed0330747b0364e899e8a606a624813452b8203d5f7"}, + {file = "numpy-2.2.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:bc8a37ad5b22c08e2dbd27df2b3ef7e5c0864235805b1e718a235bcb200cf1cb"}, + {file = "numpy-2.2.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:9036d6365d13b6cbe8f27a0eaf73ddcc070cae584e5ff94bb45e3e9d729feab5"}, + {file = "numpy-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51faf345324db860b515d3f364eaa93d0e0551a88d6218a7d61286554d190d73"}, + {file = "numpy-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38efc1e56b73cc9b182fe55e56e63b044dd26a72128fd2fbd502f75555d92591"}, + {file = "numpy-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:31b89fa67a8042e96715c68e071a1200c4e172f93b0fbe01a14c0ff3ff820fc8"}, + {file = "numpy-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4c86e2a209199ead7ee0af65e1d9992d1dce7e1f63c4b9a616500f93820658d0"}, + {file = "numpy-2.2.1-cp311-cp311-win32.whl", hash = "sha256:b34d87e8a3090ea626003f87f9392b3929a7bbf4104a05b6667348b6bd4bf1cd"}, + {file = "numpy-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:360137f8fb1b753c5cde3ac388597ad680eccbbbb3865ab65efea062c4a1fd16"}, + {file = "numpy-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:694f9e921a0c8f252980e85bce61ebbd07ed2b7d4fa72d0e4246f2f8aa6642ab"}, + {file = "numpy-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3683a8d166f2692664262fd4900f207791d005fb088d7fdb973cc8d663626faa"}, + {file = "numpy-2.2.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:780077d95eafc2ccc3ced969db22377b3864e5b9a0ea5eb347cc93b3ea900315"}, + {file = "numpy-2.2.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:55ba24ebe208344aa7a00e4482f65742969a039c2acfcb910bc6fcd776eb4355"}, + {file = "numpy-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b1d07b53b78bf84a96898c1bc139ad7f10fda7423f5fd158fd0f47ec5e01ac7"}, + {file = "numpy-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5062dc1a4e32a10dc2b8b13cedd58988261416e811c1dc4dbdea4f57eea61b0d"}, + {file = "numpy-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:fce4f615f8ca31b2e61aa0eb5865a21e14f5629515c9151850aa936c02a1ee51"}, + {file = "numpy-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:67d4cda6fa6ffa073b08c8372aa5fa767ceb10c9a0587c707505a6d426f4e046"}, + {file = "numpy-2.2.1-cp312-cp312-win32.whl", hash = "sha256:32cb94448be47c500d2c7a95f93e2f21a01f1fd05dd2beea1ccd049bb6001cd2"}, + {file = "numpy-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:ba5511d8f31c033a5fcbda22dd5c813630af98c70b2661f2d2c654ae3cdfcfc8"}, + {file = "numpy-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f1d09e520217618e76396377c81fba6f290d5f926f50c35f3a5f72b01a0da780"}, + {file = "numpy-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3ecc47cd7f6ea0336042be87d9e7da378e5c7e9b3c8ad0f7c966f714fc10d821"}, + {file = "numpy-2.2.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f419290bc8968a46c4933158c91a0012b7a99bb2e465d5ef5293879742f8797e"}, + {file = "numpy-2.2.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:5b6c390bfaef8c45a260554888966618328d30e72173697e5cabe6b285fb2348"}, + {file = "numpy-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:526fc406ab991a340744aad7e25251dd47a6720a685fa3331e5c59fef5282a59"}, + {file = "numpy-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f74e6fdeb9a265624ec3a3918430205dff1df7e95a230779746a6af78bc615af"}, + {file = "numpy-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:53c09385ff0b72ba79d8715683c1168c12e0b6e84fb0372e97553d1ea91efe51"}, + {file = "numpy-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f3eac17d9ec51be534685ba877b6ab5edc3ab7ec95c8f163e5d7b39859524716"}, + {file = "numpy-2.2.1-cp313-cp313-win32.whl", hash = "sha256:9ad014faa93dbb52c80d8f4d3dcf855865c876c9660cb9bd7553843dd03a4b1e"}, + {file = "numpy-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:164a829b6aacf79ca47ba4814b130c4020b202522a93d7bff2202bfb33b61c60"}, + {file = "numpy-2.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4dfda918a13cc4f81e9118dea249e192ab167a0bb1966272d5503e39234d694e"}, + {file = "numpy-2.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:733585f9f4b62e9b3528dd1070ec4f52b8acf64215b60a845fa13ebd73cd0712"}, + {file = "numpy-2.2.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:89b16a18e7bba224ce5114db863e7029803c179979e1af6ad6a6b11f70545008"}, + {file = "numpy-2.2.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:676f4eebf6b2d430300f1f4f4c2461685f8269f94c89698d832cdf9277f30b84"}, + {file = "numpy-2.2.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:27f5cdf9f493b35f7e41e8368e7d7b4bbafaf9660cba53fb21d2cd174ec09631"}, + {file = "numpy-2.2.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1ad395cf254c4fbb5b2132fee391f361a6e8c1adbd28f2cd8e79308a615fe9d"}, + {file = "numpy-2.2.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:08ef779aed40dbc52729d6ffe7dd51df85796a702afbf68a4f4e41fafdc8bda5"}, + {file = "numpy-2.2.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:26c9c4382b19fcfbbed3238a14abf7ff223890ea1936b8890f058e7ba35e8d71"}, + {file = "numpy-2.2.1-cp313-cp313t-win32.whl", hash = "sha256:93cf4e045bae74c90ca833cba583c14b62cb4ba2cba0abd2b141ab52548247e2"}, + {file = "numpy-2.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:bff7d8ec20f5f42607599f9994770fa65d76edca264a87b5e4ea5629bce12268"}, + {file = "numpy-2.2.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7ba9cc93a91d86365a5d270dee221fdc04fb68d7478e6bf6af650de78a8339e3"}, + {file = "numpy-2.2.1-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:3d03883435a19794e41f147612a77a8f56d4e52822337844fff3d4040a142964"}, + {file = "numpy-2.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4511d9e6071452b944207c8ce46ad2f897307910b402ea5fa975da32e0102800"}, + {file = "numpy-2.2.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5c5cc0cbabe9452038ed984d05ac87910f89370b9242371bd9079cb4af61811e"}, + {file = "numpy-2.2.1.tar.gz", hash = "sha256:45681fd7128c8ad1c379f0ca0776a8b0c6583d2f69889ddac01559dfe4390918"}, ] [[package]] @@ -1391,93 +1327,89 @@ xml = ["lxml (>=4.9.2)"] [[package]] name = "pillow" -version = "11.0.0" +version = "11.1.0" description = "Python Imaging Library (Fork)" optional = false python-versions = ">=3.9" files = [ - {file = "pillow-11.0.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:6619654954dc4936fcff82db8eb6401d3159ec6be81e33c6000dfd76ae189947"}, - {file = "pillow-11.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b3c5ac4bed7519088103d9450a1107f76308ecf91d6dabc8a33a2fcfb18d0fba"}, - {file = "pillow-11.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a65149d8ada1055029fcb665452b2814fe7d7082fcb0c5bed6db851cb69b2086"}, - {file = "pillow-11.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88a58d8ac0cc0e7f3a014509f0455248a76629ca9b604eca7dc5927cc593c5e9"}, - {file = "pillow-11.0.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:c26845094b1af3c91852745ae78e3ea47abf3dbcd1cf962f16b9a5fbe3ee8488"}, - {file = "pillow-11.0.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:1a61b54f87ab5786b8479f81c4b11f4d61702830354520837f8cc791ebba0f5f"}, - {file = "pillow-11.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:674629ff60030d144b7bca2b8330225a9b11c482ed408813924619c6f302fdbb"}, - {file = "pillow-11.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:598b4e238f13276e0008299bd2482003f48158e2b11826862b1eb2ad7c768b97"}, - {file = "pillow-11.0.0-cp310-cp310-win32.whl", hash = "sha256:9a0f748eaa434a41fccf8e1ee7a3eed68af1b690e75328fd7a60af123c193b50"}, - {file = "pillow-11.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:a5629742881bcbc1f42e840af185fd4d83a5edeb96475a575f4da50d6ede337c"}, - {file = "pillow-11.0.0-cp310-cp310-win_arm64.whl", hash = "sha256:ee217c198f2e41f184f3869f3e485557296d505b5195c513b2bfe0062dc537f1"}, - {file = "pillow-11.0.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:1c1d72714f429a521d8d2d018badc42414c3077eb187a59579f28e4270b4b0fc"}, - {file = "pillow-11.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:499c3a1b0d6fc8213519e193796eb1a86a1be4b1877d678b30f83fd979811d1a"}, - {file = "pillow-11.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c8b2351c85d855293a299038e1f89db92a2f35e8d2f783489c6f0b2b5f3fe8a3"}, - {file = "pillow-11.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f4dba50cfa56f910241eb7f883c20f1e7b1d8f7d91c750cd0b318bad443f4d5"}, - {file = "pillow-11.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:5ddbfd761ee00c12ee1be86c9c0683ecf5bb14c9772ddbd782085779a63dd55b"}, - {file = "pillow-11.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:45c566eb10b8967d71bf1ab8e4a525e5a93519e29ea071459ce517f6b903d7fa"}, - {file = "pillow-11.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b4fd7bd29610a83a8c9b564d457cf5bd92b4e11e79a4ee4716a63c959699b306"}, - {file = "pillow-11.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cb929ca942d0ec4fac404cbf520ee6cac37bf35be479b970c4ffadf2b6a1cad9"}, - {file = "pillow-11.0.0-cp311-cp311-win32.whl", hash = "sha256:006bcdd307cc47ba43e924099a038cbf9591062e6c50e570819743f5607404f5"}, - {file = "pillow-11.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:52a2d8323a465f84faaba5236567d212c3668f2ab53e1c74c15583cf507a0291"}, - {file = "pillow-11.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:16095692a253047fe3ec028e951fa4221a1f3ed3d80c397e83541a3037ff67c9"}, - {file = "pillow-11.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2c0a187a92a1cb5ef2c8ed5412dd8d4334272617f532d4ad4de31e0495bd923"}, - {file = "pillow-11.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:084a07ef0821cfe4858fe86652fffac8e187b6ae677e9906e192aafcc1b69903"}, - {file = "pillow-11.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8069c5179902dcdce0be9bfc8235347fdbac249d23bd90514b7a47a72d9fecf4"}, - {file = "pillow-11.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f02541ef64077f22bf4924f225c0fd1248c168f86e4b7abdedd87d6ebaceab0f"}, - {file = "pillow-11.0.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:fcb4621042ac4b7865c179bb972ed0da0218a076dc1820ffc48b1d74c1e37fe9"}, - {file = "pillow-11.0.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:00177a63030d612148e659b55ba99527803288cea7c75fb05766ab7981a8c1b7"}, - {file = "pillow-11.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8853a3bf12afddfdf15f57c4b02d7ded92c7a75a5d7331d19f4f9572a89c17e6"}, - {file = "pillow-11.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3107c66e43bda25359d5ef446f59c497de2b5ed4c7fdba0894f8d6cf3822dafc"}, - {file = "pillow-11.0.0-cp312-cp312-win32.whl", hash = "sha256:86510e3f5eca0ab87429dd77fafc04693195eec7fd6a137c389c3eeb4cfb77c6"}, - {file = "pillow-11.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:8ec4a89295cd6cd4d1058a5e6aec6bf51e0eaaf9714774e1bfac7cfc9051db47"}, - {file = "pillow-11.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:27a7860107500d813fcd203b4ea19b04babe79448268403172782754870dac25"}, - {file = "pillow-11.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:bcd1fb5bb7b07f64c15618c89efcc2cfa3e95f0e3bcdbaf4642509de1942a699"}, - {file = "pillow-11.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0e038b0745997c7dcaae350d35859c9715c71e92ffb7e0f4a8e8a16732150f38"}, - {file = "pillow-11.0.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ae08bd8ffc41aebf578c2af2f9d8749d91f448b3bfd41d7d9ff573d74f2a6b2"}, - {file = "pillow-11.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d69bfd8ec3219ae71bcde1f942b728903cad25fafe3100ba2258b973bd2bc1b2"}, - {file = "pillow-11.0.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:61b887f9ddba63ddf62fd02a3ba7add935d053b6dd7d58998c630e6dbade8527"}, - {file = "pillow-11.0.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:c6a660307ca9d4867caa8d9ca2c2658ab685de83792d1876274991adec7b93fa"}, - {file = "pillow-11.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:73e3a0200cdda995c7e43dd47436c1548f87a30bb27fb871f352a22ab8dcf45f"}, - {file = "pillow-11.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fba162b8872d30fea8c52b258a542c5dfd7b235fb5cb352240c8d63b414013eb"}, - {file = "pillow-11.0.0-cp313-cp313-win32.whl", hash = "sha256:f1b82c27e89fffc6da125d5eb0ca6e68017faf5efc078128cfaa42cf5cb38798"}, - {file = "pillow-11.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:8ba470552b48e5835f1d23ecb936bb7f71d206f9dfeee64245f30c3270b994de"}, - {file = "pillow-11.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:846e193e103b41e984ac921b335df59195356ce3f71dcfd155aa79c603873b84"}, - {file = "pillow-11.0.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4ad70c4214f67d7466bea6a08061eba35c01b1b89eaa098040a35272a8efb22b"}, - {file = "pillow-11.0.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:6ec0d5af64f2e3d64a165f490d96368bb5dea8b8f9ad04487f9ab60dc4bb6003"}, - {file = "pillow-11.0.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c809a70e43c7977c4a42aefd62f0131823ebf7dd73556fa5d5950f5b354087e2"}, - {file = "pillow-11.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:4b60c9520f7207aaf2e1d94de026682fc227806c6e1f55bba7606d1c94dd623a"}, - {file = "pillow-11.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:1e2688958a840c822279fda0086fec1fdab2f95bf2b717b66871c4ad9859d7e8"}, - {file = "pillow-11.0.0-cp313-cp313t-win32.whl", hash = "sha256:607bbe123c74e272e381a8d1957083a9463401f7bd01287f50521ecb05a313f8"}, - {file = "pillow-11.0.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5c39ed17edea3bc69c743a8dd3e9853b7509625c2462532e62baa0732163a904"}, - {file = "pillow-11.0.0-cp313-cp313t-win_arm64.whl", hash = "sha256:75acbbeb05b86bc53cbe7b7e6fe00fbcf82ad7c684b3ad82e3d711da9ba287d3"}, - {file = "pillow-11.0.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2e46773dc9f35a1dd28bd6981332fd7f27bec001a918a72a79b4133cf5291dba"}, - {file = "pillow-11.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2679d2258b7f1192b378e2893a8a0a0ca472234d4c2c0e6bdd3380e8dfa21b6a"}, - {file = "pillow-11.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eda2616eb2313cbb3eebbe51f19362eb434b18e3bb599466a1ffa76a033fb916"}, - {file = "pillow-11.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20ec184af98a121fb2da42642dea8a29ec80fc3efbaefb86d8fdd2606619045d"}, - {file = "pillow-11.0.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:8594f42df584e5b4bb9281799698403f7af489fba84c34d53d1c4bfb71b7c4e7"}, - {file = "pillow-11.0.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:c12b5ae868897c7338519c03049a806af85b9b8c237b7d675b8c5e089e4a618e"}, - {file = "pillow-11.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:70fbbdacd1d271b77b7721fe3cdd2d537bbbd75d29e6300c672ec6bb38d9672f"}, - {file = "pillow-11.0.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5178952973e588b3f1360868847334e9e3bf49d19e169bbbdfaf8398002419ae"}, - {file = "pillow-11.0.0-cp39-cp39-win32.whl", hash = "sha256:8c676b587da5673d3c75bd67dd2a8cdfeb282ca38a30f37950511766b26858c4"}, - {file = "pillow-11.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:94f3e1780abb45062287b4614a5bc0874519c86a777d4a7ad34978e86428b8dd"}, - {file = "pillow-11.0.0-cp39-cp39-win_arm64.whl", hash = "sha256:290f2cc809f9da7d6d622550bbf4c1e57518212da51b6a30fe8e0a270a5b78bd"}, - {file = "pillow-11.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1187739620f2b365de756ce086fdb3604573337cc28a0d3ac4a01ab6b2d2a6d2"}, - {file = "pillow-11.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fbbcb7b57dc9c794843e3d1258c0fbf0f48656d46ffe9e09b63bbd6e8cd5d0a2"}, - {file = "pillow-11.0.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d203af30149ae339ad1b4f710d9844ed8796e97fda23ffbc4cc472968a47d0b"}, - {file = "pillow-11.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21a0d3b115009ebb8ac3d2ebec5c2982cc693da935f4ab7bb5c8ebe2f47d36f2"}, - {file = "pillow-11.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:73853108f56df97baf2bb8b522f3578221e56f646ba345a372c78326710d3830"}, - {file = "pillow-11.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e58876c91f97b0952eb766123bfef372792ab3f4e3e1f1a2267834c2ab131734"}, - {file = "pillow-11.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:224aaa38177597bb179f3ec87eeefcce8e4f85e608025e9cfac60de237ba6316"}, - {file = "pillow-11.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5bd2d3bdb846d757055910f0a59792d33b555800813c3b39ada1829c372ccb06"}, - {file = "pillow-11.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:375b8dd15a1f5d2feafff536d47e22f69625c1aa92f12b339ec0b2ca40263273"}, - {file = "pillow-11.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:daffdf51ee5db69a82dd127eabecce20729e21f7a3680cf7cbb23f0829189790"}, - {file = "pillow-11.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7326a1787e3c7b0429659e0a944725e1b03eeaa10edd945a86dead1913383944"}, - {file = "pillow-11.0.0.tar.gz", hash = "sha256:72bacbaf24ac003fea9bff9837d1eedb6088758d41e100c1552930151f677739"}, + {file = "pillow-11.1.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:e1abe69aca89514737465752b4bcaf8016de61b3be1397a8fc260ba33321b3a8"}, + {file = "pillow-11.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c640e5a06869c75994624551f45e5506e4256562ead981cce820d5ab39ae2192"}, + {file = "pillow-11.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a07dba04c5e22824816b2615ad7a7484432d7f540e6fa86af60d2de57b0fcee2"}, + {file = "pillow-11.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e267b0ed063341f3e60acd25c05200df4193e15a4a5807075cd71225a2386e26"}, + {file = "pillow-11.1.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:bd165131fd51697e22421d0e467997ad31621b74bfc0b75956608cb2906dda07"}, + {file = "pillow-11.1.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:abc56501c3fd148d60659aae0af6ddc149660469082859fa7b066a298bde9482"}, + {file = "pillow-11.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:54ce1c9a16a9561b6d6d8cb30089ab1e5eb66918cb47d457bd996ef34182922e"}, + {file = "pillow-11.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:73ddde795ee9b06257dac5ad42fcb07f3b9b813f8c1f7f870f402f4dc54b5269"}, + {file = "pillow-11.1.0-cp310-cp310-win32.whl", hash = "sha256:3a5fe20a7b66e8135d7fd617b13272626a28278d0e578c98720d9ba4b2439d49"}, + {file = "pillow-11.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:b6123aa4a59d75f06e9dd3dac5bf8bc9aa383121bb3dd9a7a612e05eabc9961a"}, + {file = "pillow-11.1.0-cp310-cp310-win_arm64.whl", hash = "sha256:a76da0a31da6fcae4210aa94fd779c65c75786bc9af06289cd1c184451ef7a65"}, + {file = "pillow-11.1.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:e06695e0326d05b06833b40b7ef477e475d0b1ba3a6d27da1bb48c23209bf457"}, + {file = "pillow-11.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:96f82000e12f23e4f29346e42702b6ed9a2f2fea34a740dd5ffffcc8c539eb35"}, + {file = "pillow-11.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3cd561ded2cf2bbae44d4605837221b987c216cff94f49dfeed63488bb228d2"}, + {file = "pillow-11.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f189805c8be5ca5add39e6f899e6ce2ed824e65fb45f3c28cb2841911da19070"}, + {file = "pillow-11.1.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:dd0052e9db3474df30433f83a71b9b23bd9e4ef1de13d92df21a52c0303b8ab6"}, + {file = "pillow-11.1.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:837060a8599b8f5d402e97197d4924f05a2e0d68756998345c829c33186217b1"}, + {file = "pillow-11.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:aa8dd43daa836b9a8128dbe7d923423e5ad86f50a7a14dc688194b7be5c0dea2"}, + {file = "pillow-11.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0a2f91f8a8b367e7a57c6e91cd25af510168091fb89ec5146003e424e1558a96"}, + {file = "pillow-11.1.0-cp311-cp311-win32.whl", hash = "sha256:c12fc111ef090845de2bb15009372175d76ac99969bdf31e2ce9b42e4b8cd88f"}, + {file = "pillow-11.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:fbd43429d0d7ed6533b25fc993861b8fd512c42d04514a0dd6337fb3ccf22761"}, + {file = "pillow-11.1.0-cp311-cp311-win_arm64.whl", hash = "sha256:f7955ecf5609dee9442cbface754f2c6e541d9e6eda87fad7f7a989b0bdb9d71"}, + {file = "pillow-11.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2062ffb1d36544d42fcaa277b069c88b01bb7298f4efa06731a7fd6cc290b81a"}, + {file = "pillow-11.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a85b653980faad27e88b141348707ceeef8a1186f75ecc600c395dcac19f385b"}, + {file = "pillow-11.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9409c080586d1f683df3f184f20e36fb647f2e0bc3988094d4fd8c9f4eb1b3b3"}, + {file = "pillow-11.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7fdadc077553621911f27ce206ffcbec7d3f8d7b50e0da39f10997e8e2bb7f6a"}, + {file = "pillow-11.1.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:93a18841d09bcdd774dcdc308e4537e1f867b3dec059c131fde0327899734aa1"}, + {file = "pillow-11.1.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:9aa9aeddeed452b2f616ff5507459e7bab436916ccb10961c4a382cd3e03f47f"}, + {file = "pillow-11.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3cdcdb0b896e981678eee140d882b70092dac83ac1cdf6b3a60e2216a73f2b91"}, + {file = "pillow-11.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:36ba10b9cb413e7c7dfa3e189aba252deee0602c86c309799da5a74009ac7a1c"}, + {file = "pillow-11.1.0-cp312-cp312-win32.whl", hash = "sha256:cfd5cd998c2e36a862d0e27b2df63237e67273f2fc78f47445b14e73a810e7e6"}, + {file = "pillow-11.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:a697cd8ba0383bba3d2d3ada02b34ed268cb548b369943cd349007730c92bddf"}, + {file = "pillow-11.1.0-cp312-cp312-win_arm64.whl", hash = "sha256:4dd43a78897793f60766563969442020e90eb7847463eca901e41ba186a7d4a5"}, + {file = "pillow-11.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ae98e14432d458fc3de11a77ccb3ae65ddce70f730e7c76140653048c71bfcbc"}, + {file = "pillow-11.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cc1331b6d5a6e144aeb5e626f4375f5b7ae9934ba620c0ac6b3e43d5e683a0f0"}, + {file = "pillow-11.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:758e9d4ef15d3560214cddbc97b8ef3ef86ce04d62ddac17ad39ba87e89bd3b1"}, + {file = "pillow-11.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b523466b1a31d0dcef7c5be1f20b942919b62fd6e9a9be199d035509cbefc0ec"}, + {file = "pillow-11.1.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:9044b5e4f7083f209c4e35aa5dd54b1dd5b112b108648f5c902ad586d4f945c5"}, + {file = "pillow-11.1.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:3764d53e09cdedd91bee65c2527815d315c6b90d7b8b79759cc48d7bf5d4f114"}, + {file = "pillow-11.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:31eba6bbdd27dde97b0174ddf0297d7a9c3a507a8a1480e1e60ef914fe23d352"}, + {file = "pillow-11.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b5d658fbd9f0d6eea113aea286b21d3cd4d3fd978157cbf2447a6035916506d3"}, + {file = "pillow-11.1.0-cp313-cp313-win32.whl", hash = "sha256:f86d3a7a9af5d826744fabf4afd15b9dfef44fe69a98541f666f66fbb8d3fef9"}, + {file = "pillow-11.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:593c5fd6be85da83656b93ffcccc2312d2d149d251e98588b14fbc288fd8909c"}, + {file = "pillow-11.1.0-cp313-cp313-win_arm64.whl", hash = "sha256:11633d58b6ee5733bde153a8dafd25e505ea3d32e261accd388827ee987baf65"}, + {file = "pillow-11.1.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:70ca5ef3b3b1c4a0812b5c63c57c23b63e53bc38e758b37a951e5bc466449861"}, + {file = "pillow-11.1.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:8000376f139d4d38d6851eb149b321a52bb8893a88dae8ee7d95840431977081"}, + {file = "pillow-11.1.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ee85f0696a17dd28fbcfceb59f9510aa71934b483d1f5601d1030c3c8304f3c"}, + {file = "pillow-11.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:dd0e081319328928531df7a0e63621caf67652c8464303fd102141b785ef9547"}, + {file = "pillow-11.1.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e63e4e5081de46517099dc30abe418122f54531a6ae2ebc8680bcd7096860eab"}, + {file = "pillow-11.1.0-cp313-cp313t-win32.whl", hash = "sha256:dda60aa465b861324e65a78c9f5cf0f4bc713e4309f83bc387be158b077963d9"}, + {file = "pillow-11.1.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ad5db5781c774ab9a9b2c4302bbf0c1014960a0a7be63278d13ae6fdf88126fe"}, + {file = "pillow-11.1.0-cp313-cp313t-win_arm64.whl", hash = "sha256:67cd427c68926108778a9005f2a04adbd5e67c442ed21d95389fe1d595458756"}, + {file = "pillow-11.1.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:bf902d7413c82a1bfa08b06a070876132a5ae6b2388e2712aab3a7cbc02205c6"}, + {file = "pillow-11.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c1eec9d950b6fe688edee07138993e54ee4ae634c51443cfb7c1e7613322718e"}, + {file = "pillow-11.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e275ee4cb11c262bd108ab2081f750db2a1c0b8c12c1897f27b160c8bd57bbc"}, + {file = "pillow-11.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4db853948ce4e718f2fc775b75c37ba2efb6aaea41a1a5fc57f0af59eee774b2"}, + {file = "pillow-11.1.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:ab8a209b8485d3db694fa97a896d96dd6533d63c22829043fd9de627060beade"}, + {file = "pillow-11.1.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:54251ef02a2309b5eec99d151ebf5c9904b77976c8abdcbce7891ed22df53884"}, + {file = "pillow-11.1.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5bb94705aea800051a743aa4874bb1397d4695fb0583ba5e425ee0328757f196"}, + {file = "pillow-11.1.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:89dbdb3e6e9594d512780a5a1c42801879628b38e3efc7038094430844e271d8"}, + {file = "pillow-11.1.0-cp39-cp39-win32.whl", hash = "sha256:e5449ca63da169a2e6068dd0e2fcc8d91f9558aba89ff6d02121ca8ab11e79e5"}, + {file = "pillow-11.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:3362c6ca227e65c54bf71a5f88b3d4565ff1bcbc63ae72c34b07bbb1cc59a43f"}, + {file = "pillow-11.1.0-cp39-cp39-win_arm64.whl", hash = "sha256:b20be51b37a75cc54c2c55def3fa2c65bb94ba859dde241cd0a4fd302de5ae0a"}, + {file = "pillow-11.1.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:8c730dc3a83e5ac137fbc92dfcfe1511ce3b2b5d7578315b63dbbb76f7f51d90"}, + {file = "pillow-11.1.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:7d33d2fae0e8b170b6a6c57400e077412240f6f5bb2a342cf1ee512a787942bb"}, + {file = "pillow-11.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a8d65b38173085f24bc07f8b6c505cbb7418009fa1a1fcb111b1f4961814a442"}, + {file = "pillow-11.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:015c6e863faa4779251436db398ae75051469f7c903b043a48f078e437656f83"}, + {file = "pillow-11.1.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d44ff19eea13ae4acdaaab0179fa68c0c6f2f45d66a4d8ec1eda7d6cecbcc15f"}, + {file = "pillow-11.1.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d3d8da4a631471dfaf94c10c85f5277b1f8e42ac42bade1ac67da4b4a7359b73"}, + {file = "pillow-11.1.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:4637b88343166249fe8aa94e7c4a62a180c4b3898283bb5d3d2fd5fe10d8e4e0"}, + {file = "pillow-11.1.0.tar.gz", hash = "sha256:368da70808b36d73b4b390a8ffac11069f8a5c85f29eff1f1b01bcf3ef5b2a20"}, ] [package.extras] docs = ["furo", "olefile", "sphinx (>=8.1)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinxext-opengraph"] fpx = ["olefile"] mic = ["olefile"] -tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] +tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout", "trove-classifiers (>=2024.10.12)"] typing = ["typing-extensions"] xmp = ["defusedxml"] @@ -1610,32 +1542,32 @@ virtualenv = ">=20.10.0" [[package]] name = "psutil" -version = "6.1.0" +version = "6.1.1" description = "Cross-platform lib for process and system monitoring in Python." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ - {file = "psutil-6.1.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ff34df86226c0227c52f38b919213157588a678d049688eded74c76c8ba4a5d0"}, - {file = "psutil-6.1.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:c0e0c00aa18ca2d3b2b991643b799a15fc8f0563d2ebb6040f64ce8dc027b942"}, - {file = "psutil-6.1.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:000d1d1ebd634b4efb383f4034437384e44a6d455260aaee2eca1e9c1b55f047"}, - {file = "psutil-6.1.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:5cd2bcdc75b452ba2e10f0e8ecc0b57b827dd5d7aaffbc6821b2a9a242823a76"}, - {file = "psutil-6.1.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:045f00a43c737f960d273a83973b2511430d61f283a44c96bf13a6e829ba8fdc"}, - {file = "psutil-6.1.0-cp27-none-win32.whl", hash = "sha256:9118f27452b70bb1d9ab3198c1f626c2499384935aaf55388211ad982611407e"}, - {file = "psutil-6.1.0-cp27-none-win_amd64.whl", hash = "sha256:a8506f6119cff7015678e2bce904a4da21025cc70ad283a53b099e7620061d85"}, - {file = "psutil-6.1.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:6e2dcd475ce8b80522e51d923d10c7871e45f20918e027ab682f94f1c6351688"}, - {file = "psutil-6.1.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0895b8414afafc526712c498bd9de2b063deaac4021a3b3c34566283464aff8e"}, - {file = "psutil-6.1.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9dcbfce5d89f1d1f2546a2090f4fcf87c7f669d1d90aacb7d7582addece9fb38"}, - {file = "psutil-6.1.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:498c6979f9c6637ebc3a73b3f87f9eb1ec24e1ce53a7c5173b8508981614a90b"}, - {file = "psutil-6.1.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d905186d647b16755a800e7263d43df08b790d709d575105d419f8b6ef65423a"}, - {file = "psutil-6.1.0-cp36-cp36m-win32.whl", hash = "sha256:6d3fbbc8d23fcdcb500d2c9f94e07b1342df8ed71b948a2649b5cb060a7c94ca"}, - {file = "psutil-6.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:1209036fbd0421afde505a4879dee3b2fd7b1e14fee81c0069807adcbbcca747"}, - {file = "psutil-6.1.0-cp37-abi3-win32.whl", hash = "sha256:1ad45a1f5d0b608253b11508f80940985d1d0c8f6111b5cb637533a0e6ddc13e"}, - {file = "psutil-6.1.0-cp37-abi3-win_amd64.whl", hash = "sha256:a8fb3752b491d246034fa4d279ff076501588ce8cbcdbb62c32fd7a377d996be"}, - {file = "psutil-6.1.0.tar.gz", hash = "sha256:353815f59a7f64cdaca1c0307ee13558a0512f6db064e92fe833784f08539c7a"}, + {file = "psutil-6.1.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:9ccc4316f24409159897799b83004cb1e24f9819b0dcf9c0b68bdcb6cefee6a8"}, + {file = "psutil-6.1.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ca9609c77ea3b8481ab005da74ed894035936223422dc591d6772b147421f777"}, + {file = "psutil-6.1.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:8df0178ba8a9e5bc84fed9cfa61d54601b371fbec5c8eebad27575f1e105c0d4"}, + {file = "psutil-6.1.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:1924e659d6c19c647e763e78670a05dbb7feaf44a0e9c94bf9e14dfc6ba50468"}, + {file = "psutil-6.1.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:018aeae2af92d943fdf1da6b58665124897cfc94faa2ca92098838f83e1b1bca"}, + {file = "psutil-6.1.1-cp27-none-win32.whl", hash = "sha256:6d4281f5bbca041e2292be3380ec56a9413b790579b8e593b1784499d0005dac"}, + {file = "psutil-6.1.1-cp27-none-win_amd64.whl", hash = "sha256:c777eb75bb33c47377c9af68f30e9f11bc78e0f07fbf907be4a5d70b2fe5f030"}, + {file = "psutil-6.1.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:fc0ed7fe2231a444fc219b9c42d0376e0a9a1a72f16c5cfa0f68d19f1a0663e8"}, + {file = "psutil-6.1.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0bdd4eab935276290ad3cb718e9809412895ca6b5b334f5a9111ee6d9aff9377"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b6e06c20c05fe95a3d7302d74e7097756d4ba1247975ad6905441ae1b5b66003"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97f7cb9921fbec4904f522d972f0c0e1f4fabbdd4e0287813b21215074a0f160"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33431e84fee02bc84ea36d9e2c4a6d395d479c9dd9bba2376c1f6ee8f3a4e0b3"}, + {file = "psutil-6.1.1-cp36-cp36m-win32.whl", hash = "sha256:384636b1a64b47814437d1173be1427a7c83681b17a450bfc309a1953e329603"}, + {file = "psutil-6.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:8be07491f6ebe1a693f17d4f11e69d0dc1811fa082736500f649f79df7735303"}, + {file = "psutil-6.1.1-cp37-abi3-win32.whl", hash = "sha256:eaa912e0b11848c4d9279a93d7e2783df352b082f40111e078388701fd479e53"}, + {file = "psutil-6.1.1-cp37-abi3-win_amd64.whl", hash = "sha256:f35cfccb065fff93529d2afb4a2e89e363fe63ca1e4a5da22b603a85833c2649"}, + {file = "psutil-6.1.1.tar.gz", hash = "sha256:cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5"}, ] [package.extras] -dev = ["black", "check-manifest", "coverage", "packaging", "pylint", "pyperf", "pypinfo", "pytest-cov", "requests", "rstcheck", "ruff", "sphinx", "sphinx_rtd_theme", "toml-sort", "twine", "virtualenv", "wheel"] +dev = ["abi3audit", "black", "check-manifest", "coverage", "packaging", "pylint", "pyperf", "pypinfo", "pytest-cov", "requests", "rstcheck", "ruff", "sphinx", "sphinx_rtd_theme", "toml-sort", "twine", "virtualenv", "vulture", "wheel"] test = ["pytest", "pytest-xdist", "setuptools"] [[package]] @@ -1662,18 +1594,18 @@ files = [ [[package]] name = "pydantic" -version = "2.10.3" +version = "2.10.5" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.10.3-py3-none-any.whl", hash = "sha256:be04d85bbc7b65651c5f8e6b9976ed9c6f41782a55524cef079a34a0bb82144d"}, - {file = "pydantic-2.10.3.tar.gz", hash = "sha256:cb5ac360ce894ceacd69c403187900a02c4b20b693a9dd1d643e1effab9eadf9"}, + {file = "pydantic-2.10.5-py3-none-any.whl", hash = "sha256:4dd4e322dbe55472cb7ca7e73f4b63574eecccf2835ffa2af9021ce113c83c53"}, + {file = "pydantic-2.10.5.tar.gz", hash = "sha256:278b38dbbaec562011d659ee05f63346951b3a248a6f3642e1bc68894ea2b4ff"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.1" +pydantic-core = "2.27.2" typing-extensions = ">=4.12.2" [package.extras] @@ -1682,111 +1614,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.27.1" +version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, - {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, - {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, - {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, - {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, - {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, - {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, - {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, - {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, - {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, - {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, - {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, - {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, - {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, - {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, - {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, - {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, + {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, ] [package.dependencies] @@ -1811,13 +1743,13 @@ dev = ["black", "build", "flake8", "flake8-black", "isort", "jupyter-console", " [[package]] name = "pygments" -version = "2.18.0" +version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" files = [ - {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, - {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, + {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, + {file = "pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f"}, ] [package.extras] @@ -1888,20 +1820,20 @@ dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments [[package]] name = "pytest-asyncio" -version = "0.24.0" +version = "0.25.2" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "pytest_asyncio-0.24.0-py3-none-any.whl", hash = "sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b"}, - {file = "pytest_asyncio-0.24.0.tar.gz", hash = "sha256:d081d828e576d85f875399194281e92bf8a68d60d72d1a2faf2feddb6c46b276"}, + {file = "pytest_asyncio-0.25.2-py3-none-any.whl", hash = "sha256:0d0bb693f7b99da304a0634afc0a4b19e49d5e0de2d670f38dc4bfa5727c5075"}, + {file = "pytest_asyncio-0.25.2.tar.gz", hash = "sha256:3f8ef9a98f45948ea91a0ed3dc4268b5326c0e7bce73892acc654df4262ad45f"}, ] [package.dependencies] pytest = ">=8.2,<9" [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -2010,13 +1942,13 @@ six = ">=1.5" [[package]] name = "python-engineio" -version = "4.10.1" +version = "4.11.2" description = "Engine.IO server and client for Python" optional = false python-versions = ">=3.6" files = [ - {file = "python_engineio-4.10.1-py3-none-any.whl", hash = "sha256:445a94004ec8034960ab99e7ce4209ec619c6e6b6a12aedcb05abeab924025c0"}, - {file = "python_engineio-4.10.1.tar.gz", hash = "sha256:166cea8dd7429638c5c4e3a4895beae95196e860bc6f29ed0b9fe753d1ef2072"}, + {file = "python_engineio-4.11.2-py3-none-any.whl", hash = "sha256:f0971ac4c65accc489154fe12efd88f53ca8caf04754c46a66e85f5102ef22ad"}, + {file = "python_engineio-4.11.2.tar.gz", hash = "sha256:145bb0daceb904b4bb2d3eb2d93f7dbb7bb87a6a0c4f20a94cc8654dec977129"}, ] [package.dependencies] @@ -2029,13 +1961,13 @@ docs = ["sphinx"] [[package]] name = "python-multipart" -version = "0.0.19" +version = "0.0.20" description = "A streaming multipart parser for Python" optional = false python-versions = ">=3.8" files = [ - {file = "python_multipart-0.0.19-py3-none-any.whl", hash = "sha256:f8d5b0b9c618575bf9df01c684ded1d94a338839bdd8223838afacfb4bb2082d"}, - {file = "python_multipart-0.0.19.tar.gz", hash = "sha256:905502ef39050557b7a6af411f454bc19526529ca46ae6831508438890ce12cc"}, + {file = "python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104"}, + {file = "python_multipart-0.0.20.tar.gz", hash = "sha256:8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13"}, ] [[package]] @@ -2057,18 +1989,18 @@ unidecode = ["Unidecode (>=1.1.1)"] [[package]] name = "python-socketio" -version = "5.11.4" +version = "5.12.1" description = "Socket.IO server and client for Python" optional = false python-versions = ">=3.8" files = [ - {file = "python_socketio-5.11.4-py3-none-any.whl", hash = "sha256:42efaa3e3e0b166fc72a527488a13caaac2cefc76174252486503bd496284945"}, - {file = "python_socketio-5.11.4.tar.gz", hash = "sha256:8b0b8ff2964b2957c865835e936310190639c00310a47d77321a594d1665355e"}, + {file = "python_socketio-5.12.1-py3-none-any.whl", hash = "sha256:24a0ea7cfff0e021eb28c68edbf7914ee4111bdf030b95e4d250c4dc9af7a386"}, + {file = "python_socketio-5.12.1.tar.gz", hash = "sha256:0299ff1f470b676c09c1bfab1dead25405077d227b2c13cf217a34dadc68ba9c"}, ] [package.dependencies] bidict = ">=0.21.0" -python-engineio = ">=4.8.0" +python-engineio = ">=4.11.0" [package.extras] asyncio-client = ["aiohttp (>=3.4)"] @@ -2196,29 +2128,15 @@ async-timeout = {version = ">=4.0.3", markers = "python_full_version < \"3.11.3\ hiredis = ["hiredis (>=3.0.0)"] ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==23.2.1)", "requests (>=2.31.0)"] -[[package]] -name = "reflex-chakra" -version = "0.6.2" -description = "reflex using chakra components" -optional = false -python-versions = "<4.0,>=3.9" -files = [ - {file = "reflex_chakra-0.6.2-py3-none-any.whl", hash = "sha256:b8aa19f39a02601c560b97f4b17f171c0b5980e13a58069e3a5dd0999e362e4f"}, - {file = "reflex_chakra-0.6.2.tar.gz", hash = "sha256:81ddb7f182cc454922cc817312755b799d4e1a49a46ef2e81305052dc76ef86d"}, -] - -[package.dependencies] -reflex = ">=0.6.0a" - [[package]] name = "reflex-hosting-cli" -version = "0.1.30" +version = "0.1.32" description = "Reflex Hosting CLI" optional = false python-versions = "<4.0,>=3.8" files = [ - {file = "reflex_hosting_cli-0.1.30-py3-none-any.whl", hash = "sha256:778c98d635003d8668158c22eaa0f7124d2bac92c8a1aabaed710960ca97796e"}, - {file = "reflex_hosting_cli-0.1.30.tar.gz", hash = "sha256:a0fdc73e595e6b9fd661e1307ae37267fb3815cc457b7f15938ba921c12fc0b6"}, + {file = "reflex_hosting_cli-0.1.32-py3-none-any.whl", hash = "sha256:86b4222f3e99d949a209be7de8c457ededebc1f12a721ee6669c6c35fdecc508"}, + {file = "reflex_hosting_cli-0.1.32.tar.gz", hash = "sha256:0b8e4b4b30d9261bf6d720265f1c428b2840bb630896e60a1a2faa095901ed59"}, ] [package.dependencies] @@ -2228,6 +2146,7 @@ pipdeptree = ">=2.13.1,<2.17.0" platformdirs = ">=3.10.0,<5.0" pydantic = ">=1.10.2,<3.0" python-dateutil = ">=2.8.1" +pyyaml = ">=6.0.2,<7.0.0" rich = ">=13.0.0,<14.0" tabulate = ">=0.9.0,<0.10.0" typer = ">=0.15.0,<1" @@ -2364,23 +2283,23 @@ websocket-client = ">=1.8,<2.0" [[package]] name = "setuptools" -version = "75.6.0" +version = "75.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.9" files = [ - {file = "setuptools-75.6.0-py3-none-any.whl", hash = "sha256:ce74b49e8f7110f9bf04883b730f4765b774ef3ef28f722cce7c273d253aaf7d"}, - {file = "setuptools-75.6.0.tar.gz", hash = "sha256:8199222558df7c86216af4f84c30e9b34a61d8ba19366cc914424cdbd28252f6"}, + {file = "setuptools-75.8.0-py3-none-any.whl", hash = "sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3"}, + {file = "setuptools-75.8.0.tar.gz", hash = "sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.7.0)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.8.0)"] core = ["importlib_metadata (>=6)", "jaraco.collections", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (>=1.12,<1.14)", "pytest-mypy"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] +type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.14.*)", "pytest-mypy"] [[package]] name = "shellingham" @@ -2446,72 +2365,72 @@ files = [ [[package]] name = "sqlalchemy" -version = "2.0.36" +version = "2.0.37" description = "Database Abstraction Library" optional = false python-versions = ">=3.7" files = [ - {file = "SQLAlchemy-2.0.36-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:59b8f3adb3971929a3e660337f5dacc5942c2cdb760afcabb2614ffbda9f9f72"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37350015056a553e442ff672c2d20e6f4b6d0b2495691fa239d8aa18bb3bc908"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8318f4776c85abc3f40ab185e388bee7a6ea99e7fa3a30686580b209eaa35c08"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c245b1fbade9c35e5bd3b64270ab49ce990369018289ecfde3f9c318411aaa07"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:69f93723edbca7342624d09f6704e7126b152eaed3cdbb634cb657a54332a3c5"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f9511d8dd4a6e9271d07d150fb2f81874a3c8c95e11ff9af3a2dfc35fe42ee44"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-win32.whl", hash = "sha256:c3f3631693003d8e585d4200730616b78fafd5a01ef8b698f6967da5c605b3fa"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-win_amd64.whl", hash = "sha256:a86bfab2ef46d63300c0f06936bd6e6c0105faa11d509083ba8f2f9d237fb5b5"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fd3a55deef00f689ce931d4d1b23fa9f04c880a48ee97af488fd215cf24e2a6c"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4f5e9cd989b45b73bd359f693b935364f7e1f79486e29015813c338450aa5a71"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0ddd9db6e59c44875211bc4c7953a9f6638b937b0a88ae6d09eb46cced54eff"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2519f3a5d0517fc159afab1015e54bb81b4406c278749779be57a569d8d1bb0d"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:59b1ee96617135f6e1d6f275bbe988f419c5178016f3d41d3c0abb0c819f75bb"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:39769a115f730d683b0eb7b694db9789267bcd027326cccc3125e862eb03bfd8"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-win32.whl", hash = "sha256:66bffbad8d6271bb1cc2f9a4ea4f86f80fe5e2e3e501a5ae2a3dc6a76e604e6f"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-win_amd64.whl", hash = "sha256:23623166bfefe1487d81b698c423f8678e80df8b54614c2bf4b4cfcd7c711959"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f7b64e6ec3f02c35647be6b4851008b26cff592a95ecb13b6788a54ef80bbdd4"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:46331b00096a6db1fdc052d55b101dbbfc99155a548e20a0e4a8e5e4d1362855"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdf3386a801ea5aba17c6410dd1dc8d39cf454ca2565541b5ac42a84e1e28f53"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac9dfa18ff2a67b09b372d5db8743c27966abf0e5344c555d86cc7199f7ad83a"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:90812a8933df713fdf748b355527e3af257a11e415b613dd794512461eb8a686"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1bc330d9d29c7f06f003ab10e1eaced295e87940405afe1b110f2eb93a233588"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-win32.whl", hash = "sha256:79d2e78abc26d871875b419e1fd3c0bca31a1cb0043277d0d850014599626c2e"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-win_amd64.whl", hash = "sha256:b544ad1935a8541d177cb402948b94e871067656b3a0b9e91dbec136b06a2ff5"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b5cc79df7f4bc3d11e4b542596c03826063092611e481fcf1c9dfee3c94355ef"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3c01117dd36800f2ecaa238c65365b7b16497adc1522bf84906e5710ee9ba0e8"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9bc633f4ee4b4c46e7adcb3a9b5ec083bf1d9a97c1d3854b92749d935de40b9b"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e46ed38affdfc95d2c958de328d037d87801cfcbea6d421000859e9789e61c2"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b2985c0b06e989c043f1dc09d4fe89e1616aadd35392aea2844f0458a989eacf"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a121d62ebe7d26fec9155f83f8be5189ef1405f5973ea4874a26fab9f1e262c"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-win32.whl", hash = "sha256:0572f4bd6f94752167adfd7c1bed84f4b240ee6203a95e05d1e208d488d0d436"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-win_amd64.whl", hash = "sha256:8c78ac40bde930c60e0f78b3cd184c580f89456dd87fc08f9e3ee3ce8765ce88"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:be9812b766cad94a25bc63bec11f88c4ad3629a0cec1cd5d4ba48dc23860486b"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50aae840ebbd6cdd41af1c14590e5741665e5272d2fee999306673a1bb1fdb4d"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4557e1f11c5f653ebfdd924f3f9d5ebfc718283b0b9beebaa5dd6b77ec290971"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:07b441f7d03b9a66299ce7ccf3ef2900abc81c0db434f42a5694a37bd73870f2"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:28120ef39c92c2dd60f2721af9328479516844c6b550b077ca450c7d7dc68575"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-win32.whl", hash = "sha256:b81ee3d84803fd42d0b154cb6892ae57ea6b7c55d8359a02379965706c7efe6c"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-win_amd64.whl", hash = "sha256:f942a799516184c855e1a32fbc7b29d7e571b52612647866d4ec1c3242578fcb"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3d6718667da04294d7df1670d70eeddd414f313738d20a6f1d1f379e3139a545"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:72c28b84b174ce8af8504ca28ae9347d317f9dba3999e5981a3cd441f3712e24"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b11d0cfdd2b095e7b0686cf5fabeb9c67fae5b06d265d8180715b8cfa86522e3"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e32092c47011d113dc01ab3e1d3ce9f006a47223b18422c5c0d150af13a00687"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:6a440293d802d3011028e14e4226da1434b373cbaf4a4bbb63f845761a708346"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c54a1e53a0c308a8e8a7dffb59097bff7facda27c70c286f005327f21b2bd6b1"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-win32.whl", hash = "sha256:1e0d612a17581b6616ff03c8e3d5eff7452f34655c901f75d62bd86449d9750e"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-win_amd64.whl", hash = "sha256:8958b10490125124463095bbdadda5aa22ec799f91958e410438ad6c97a7b793"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dc022184d3e5cacc9579e41805a681187650e170eb2fd70e28b86192a479dcaa"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b817d41d692bf286abc181f8af476c4fbef3fd05e798777492618378448ee689"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4e46a888b54be23d03a89be510f24a7652fe6ff660787b96cd0e57a4ebcb46d"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4ae3005ed83f5967f961fd091f2f8c5329161f69ce8480aa8168b2d7fe37f06"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:03e08af7a5f9386a43919eda9de33ffda16b44eb11f3b313e6822243770e9763"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:3dbb986bad3ed5ceaf090200eba750b5245150bd97d3e67343a3cfed06feecf7"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-win32.whl", hash = "sha256:9fe53b404f24789b5ea9003fc25b9a3988feddebd7e7b369c8fac27ad6f52f28"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-win_amd64.whl", hash = "sha256:af148a33ff0349f53512a049c6406923e4e02bf2f26c5fb285f143faf4f0e46a"}, - {file = "SQLAlchemy-2.0.36-py3-none-any.whl", hash = "sha256:fddbe92b4760c6f5d48162aef14824add991aeda8ddadb3c31d56eb15ca69f8e"}, - {file = "sqlalchemy-2.0.36.tar.gz", hash = "sha256:7f2767680b6d2398aea7082e45a774b2b0767b5c8d8ffb9c8b683088ea9b29c5"}, + {file = "SQLAlchemy-2.0.37-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:da36c3b0e891808a7542c5c89f224520b9a16c7f5e4d6a1156955605e54aef0e"}, + {file = "SQLAlchemy-2.0.37-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e7402ff96e2b073a98ef6d6142796426d705addd27b9d26c3b32dbaa06d7d069"}, + {file = "SQLAlchemy-2.0.37-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6f5d254a22394847245f411a2956976401e84da4288aa70cbcd5190744062c1"}, + {file = "SQLAlchemy-2.0.37-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41296bbcaa55ef5fdd32389a35c710133b097f7b2609d8218c0eabded43a1d84"}, + {file = "SQLAlchemy-2.0.37-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:bedee60385c1c0411378cbd4dc486362f5ee88deceea50002772912d798bb00f"}, + {file = "SQLAlchemy-2.0.37-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6c67415258f9f3c69867ec02fea1bf6508153709ecbd731a982442a590f2b7e4"}, + {file = "SQLAlchemy-2.0.37-cp310-cp310-win32.whl", hash = "sha256:650dcb70739957a492ad8acff65d099a9586b9b8920e3507ca61ec3ce650bb72"}, + {file = "SQLAlchemy-2.0.37-cp310-cp310-win_amd64.whl", hash = "sha256:93d1543cd8359040c02b6614421c8e10cd7a788c40047dbc507ed46c29ae5636"}, + {file = "SQLAlchemy-2.0.37-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:78361be6dc9073ed17ab380985d1e45e48a642313ab68ab6afa2457354ff692c"}, + {file = "SQLAlchemy-2.0.37-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b661b49d0cb0ab311a189b31e25576b7ac3e20783beb1e1817d72d9d02508bf5"}, + {file = "SQLAlchemy-2.0.37-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d57bafbab289e147d064ffbd5cca2d7b1394b63417c0636cea1f2e93d16eb9e8"}, + {file = "SQLAlchemy-2.0.37-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fa2c0913f02341d25fb858e4fb2031e6b0813494cca1ba07d417674128ce11b"}, + {file = "SQLAlchemy-2.0.37-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9df21b8d9e5c136ea6cde1c50d2b1c29a2b5ff2b1d610165c23ff250e0704087"}, + {file = "SQLAlchemy-2.0.37-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db18ff6b8c0f1917f8b20f8eca35c28bbccb9f83afa94743e03d40203ed83de9"}, + {file = "SQLAlchemy-2.0.37-cp311-cp311-win32.whl", hash = "sha256:46954173612617a99a64aee103bcd3f078901b9a8dcfc6ae80cbf34ba23df989"}, + {file = "SQLAlchemy-2.0.37-cp311-cp311-win_amd64.whl", hash = "sha256:7b7e772dc4bc507fdec4ee20182f15bd60d2a84f1e087a8accf5b5b7a0dcf2ba"}, + {file = "SQLAlchemy-2.0.37-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2952748ecd67ed3b56773c185e85fc084f6bdcdec10e5032a7c25a6bc7d682ef"}, + {file = "SQLAlchemy-2.0.37-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3151822aa1db0eb5afd65ccfafebe0ef5cda3a7701a279c8d0bf17781a793bb4"}, + {file = "SQLAlchemy-2.0.37-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eaa8039b6d20137a4e02603aba37d12cd2dde7887500b8855356682fc33933f4"}, + {file = "SQLAlchemy-2.0.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1cdba1f73b64530c47b27118b7053b8447e6d6f3c8104e3ac59f3d40c33aa9fd"}, + {file = "SQLAlchemy-2.0.37-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1b2690456528a87234a75d1a1644cdb330a6926f455403c8e4f6cad6921f9098"}, + {file = "SQLAlchemy-2.0.37-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cf5ae8a9dcf657fd72144a7fd01f243236ea39e7344e579a121c4205aedf07bb"}, + {file = "SQLAlchemy-2.0.37-cp312-cp312-win32.whl", hash = "sha256:ea308cec940905ba008291d93619d92edaf83232ec85fbd514dcb329f3192761"}, + {file = "SQLAlchemy-2.0.37-cp312-cp312-win_amd64.whl", hash = "sha256:635d8a21577341dfe4f7fa59ec394b346da12420b86624a69e466d446de16aff"}, + {file = "SQLAlchemy-2.0.37-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8c4096727193762e72ce9437e2a86a110cf081241919ce3fab8e89c02f6b6658"}, + {file = "SQLAlchemy-2.0.37-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e4fb5ac86d8fe8151966814f6720996430462e633d225497566b3996966b9bdb"}, + {file = "SQLAlchemy-2.0.37-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e56a139bfe136a22c438478a86f8204c1eb5eed36f4e15c4224e4b9db01cb3e4"}, + {file = "SQLAlchemy-2.0.37-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f95fc8e3f34b5f6b3effb49d10ac97c569ec8e32f985612d9b25dd12d0d2e94"}, + {file = "SQLAlchemy-2.0.37-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c505edd429abdfe3643fa3b2e83efb3445a34a9dc49d5f692dd087be966020e0"}, + {file = "SQLAlchemy-2.0.37-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:12b0f1ec623cccf058cf21cb544f0e74656618165b083d78145cafde156ea7b6"}, + {file = "SQLAlchemy-2.0.37-cp313-cp313-win32.whl", hash = "sha256:293f9ade06b2e68dd03cfb14d49202fac47b7bb94bffcff174568c951fbc7af2"}, + {file = "SQLAlchemy-2.0.37-cp313-cp313-win_amd64.whl", hash = "sha256:d70f53a0646cc418ca4853da57cf3ddddbccb8c98406791f24426f2dd77fd0e2"}, + {file = "SQLAlchemy-2.0.37-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:44f569d0b1eb82301b92b72085583277316e7367e038d97c3a1a899d9a05e342"}, + {file = "SQLAlchemy-2.0.37-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2eae3423e538c10d93ae3e87788c6a84658c3ed6db62e6a61bb9495b0ad16bb"}, + {file = "SQLAlchemy-2.0.37-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfff7be361048244c3aa0f60b5e63221c5e0f0e509f4e47b8910e22b57d10ae7"}, + {file = "SQLAlchemy-2.0.37-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:5bc3339db84c5fb9130ac0e2f20347ee77b5dd2596ba327ce0d399752f4fce39"}, + {file = "SQLAlchemy-2.0.37-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:84b9f23b0fa98a6a4b99d73989350a94e4a4ec476b9a7dfe9b79ba5939f5e80b"}, + {file = "SQLAlchemy-2.0.37-cp37-cp37m-win32.whl", hash = "sha256:51bc9cfef83e0ac84f86bf2b10eaccb27c5a3e66a1212bef676f5bee6ef33ebb"}, + {file = "SQLAlchemy-2.0.37-cp37-cp37m-win_amd64.whl", hash = "sha256:8e47f1af09444f87c67b4f1bb6231e12ba6d4d9f03050d7fc88df6d075231a49"}, + {file = "SQLAlchemy-2.0.37-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6b788f14c5bb91db7f468dcf76f8b64423660a05e57fe277d3f4fad7b9dcb7ce"}, + {file = "SQLAlchemy-2.0.37-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521ef85c04c33009166777c77e76c8a676e2d8528dc83a57836b63ca9c69dcd1"}, + {file = "SQLAlchemy-2.0.37-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:75311559f5c9881a9808eadbeb20ed8d8ba3f7225bef3afed2000c2a9f4d49b9"}, + {file = "SQLAlchemy-2.0.37-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cce918ada64c956b62ca2c2af59b125767097ec1dca89650a6221e887521bfd7"}, + {file = "SQLAlchemy-2.0.37-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:9d087663b7e1feabea8c578d6887d59bb00388158e8bff3a76be11aa3f748ca2"}, + {file = "SQLAlchemy-2.0.37-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:cf95a60b36997dad99692314c4713f141b61c5b0b4cc5c3426faad570b31ca01"}, + {file = "SQLAlchemy-2.0.37-cp38-cp38-win32.whl", hash = "sha256:d75ead7dd4d255068ea0f21492ee67937bd7c90964c8f3c2bea83c7b7f81b95f"}, + {file = "SQLAlchemy-2.0.37-cp38-cp38-win_amd64.whl", hash = "sha256:74bbd1d0a9bacf34266a7907d43260c8d65d31d691bb2356f41b17c2dca5b1d0"}, + {file = "SQLAlchemy-2.0.37-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:648ec5acf95ad59255452ef759054f2176849662af4521db6cb245263ae4aa33"}, + {file = "SQLAlchemy-2.0.37-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:35bd2df269de082065d4b23ae08502a47255832cc3f17619a5cea92ce478b02b"}, + {file = "SQLAlchemy-2.0.37-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f581d365af9373a738c49e0c51e8b18e08d8a6b1b15cc556773bcd8a192fa8b"}, + {file = "SQLAlchemy-2.0.37-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82df02816c14f8dc9f4d74aea4cb84a92f4b0620235daa76dde002409a3fbb5a"}, + {file = "SQLAlchemy-2.0.37-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:94b564e38b344d3e67d2e224f0aec6ba09a77e4582ced41e7bfd0f757d926ec9"}, + {file = "SQLAlchemy-2.0.37-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:955a2a765aa1bd81aafa69ffda179d4fe3e2a3ad462a736ae5b6f387f78bfeb8"}, + {file = "SQLAlchemy-2.0.37-cp39-cp39-win32.whl", hash = "sha256:03f0528c53ca0b67094c4764523c1451ea15959bbf0a8a8a3096900014db0278"}, + {file = "SQLAlchemy-2.0.37-cp39-cp39-win_amd64.whl", hash = "sha256:4b12885dc85a2ab2b7d00995bac6d967bffa8594123b02ed21e8eb2205a7584b"}, + {file = "SQLAlchemy-2.0.37-py3-none-any.whl", hash = "sha256:a8998bf9f8658bd3839cbc44ddbe982955641863da0c1efe5b00c1ab4f5c16b1"}, + {file = "sqlalchemy-2.0.37.tar.gz", hash = "sha256:12b28d99a9c14eaf4055810df1001557176716de0167b91026e648e65229bffb"}, ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} +greenlet = {version = "!=0.4.17", markers = "python_version < \"3.14\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} typing-extensions = ">=4.6.0" [package.extras] @@ -2567,7 +2486,6 @@ files = [ [package.dependencies] anyio = ">=3.4.0,<5" -typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7)", "pyyaml"] @@ -2700,13 +2618,13 @@ files = [ [[package]] name = "trio" -version = "0.27.0" +version = "0.28.0" description = "A friendly Python library for async concurrency and I/O" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "trio-0.27.0-py3-none-any.whl", hash = "sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884"}, - {file = "trio-0.27.0.tar.gz", hash = "sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831"}, + {file = "trio-0.28.0-py3-none-any.whl", hash = "sha256:56d58977acc1635735a96581ec70513cc781b8b6decd299c487d3be2a721cd94"}, + {file = "trio-0.28.0.tar.gz", hash = "sha256:4e547896fe9e8a5658e54e4c7c5fa1db748cbbbaa7c965e7d40505b928c73c05"}, ] [package.dependencies] @@ -2746,7 +2664,6 @@ files = [ ] [package.dependencies] -importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} keyring = {version = ">=15.1", markers = "platform_machine != \"ppc64le\" and platform_machine != \"s390x\""} packaging = "*" pkginfo = ">=1.8.1" @@ -2801,13 +2718,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.3" +version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, - {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, + {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, + {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, ] [package.dependencies] @@ -2821,13 +2738,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.32.1" +version = "0.34.0" description = "The lightning-fast ASGI server." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "uvicorn-0.32.1-py3-none-any.whl", hash = "sha256:82ad92fd58da0d12af7482ecdb5f2470a04c9c9a53ced65b9bbb4a205377602e"}, - {file = "uvicorn-0.32.1.tar.gz", hash = "sha256:ee9519c246a72b1c084cea8d3b44ed6026e78a4a309cbedae9c37e4cb9fbb175"}, + {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, + {file = "uvicorn-0.34.0.tar.gz", hash = "sha256:404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9"}, ] [package.dependencies] @@ -2840,13 +2757,13 @@ standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", [[package]] name = "virtualenv" -version = "20.28.0" +version = "20.28.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" files = [ - {file = "virtualenv-20.28.0-py3-none-any.whl", hash = "sha256:23eae1b4516ecd610481eda647f3a7c09aea295055337331bb4e6892ecce47b0"}, - {file = "virtualenv-20.28.0.tar.gz", hash = "sha256:2c9c3262bb8e7b87ea801d715fae4495e6032450c71d2309be9550e7364049aa"}, + {file = "virtualenv-20.28.1-py3-none-any.whl", hash = "sha256:412773c85d4dab0409b83ec36f7a6499e72eaf08c80e81e9576bca61831c71cb"}, + {file = "virtualenv-20.28.1.tar.gz", hash = "sha256:5d34ab240fdb5d21549b76f9e8ff3af28252f5499fb6d6f031adac4e5a8c5329"}, ] [package.dependencies] @@ -2968,76 +2885,90 @@ test = ["pytest (>=6.0.0)", "setuptools (>=65)"] [[package]] name = "wrapt" -version = "1.17.0" +version = "1.17.2" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" files = [ - {file = "wrapt-1.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a0c23b8319848426f305f9cb0c98a6e32ee68a36264f45948ccf8e7d2b941f8"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1ca5f060e205f72bec57faae5bd817a1560fcfc4af03f414b08fa29106b7e2d"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e185ec6060e301a7e5f8461c86fb3640a7beb1a0f0208ffde7a65ec4074931df"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb90765dd91aed05b53cd7a87bd7f5c188fcd95960914bae0d32c5e7f899719d"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:879591c2b5ab0a7184258274c42a126b74a2c3d5a329df16d69f9cee07bba6ea"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fce6fee67c318fdfb7f285c29a82d84782ae2579c0e1b385b7f36c6e8074fffb"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0698d3a86f68abc894d537887b9bbf84d29bcfbc759e23f4644be27acf6da301"}, - {file = "wrapt-1.17.0-cp310-cp310-win32.whl", hash = "sha256:69d093792dc34a9c4c8a70e4973a3361c7a7578e9cd86961b2bbf38ca71e4e22"}, - {file = "wrapt-1.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:f28b29dc158ca5d6ac396c8e0a2ef45c4e97bb7e65522bfc04c989e6fe814575"}, - {file = "wrapt-1.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:74bf625b1b4caaa7bad51d9003f8b07a468a704e0644a700e936c357c17dd45a"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f2a28eb35cf99d5f5bd12f5dd44a0f41d206db226535b37b0c60e9da162c3ed"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81b1289e99cf4bad07c23393ab447e5e96db0ab50974a280f7954b071d41b489"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f2939cd4a2a52ca32bc0b359015718472d7f6de870760342e7ba295be9ebaf9"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6a9653131bda68a1f029c52157fd81e11f07d485df55410401f745007bd6d339"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4e4b4385363de9052dac1a67bfb535c376f3d19c238b5f36bddc95efae15e12d"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bdf62d25234290db1837875d4dceb2151e4ea7f9fff2ed41c0fde23ed542eb5b"}, - {file = "wrapt-1.17.0-cp311-cp311-win32.whl", hash = "sha256:5d8fd17635b262448ab8f99230fe4dac991af1dabdbb92f7a70a6afac8a7e346"}, - {file = "wrapt-1.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:92a3d214d5e53cb1db8b015f30d544bc9d3f7179a05feb8f16df713cecc2620a"}, - {file = "wrapt-1.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:89fc28495896097622c3fc238915c79365dd0ede02f9a82ce436b13bd0ab7569"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:875d240fdbdbe9e11f9831901fb8719da0bd4e6131f83aa9f69b96d18fae7504"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5ed16d95fd142e9c72b6c10b06514ad30e846a0d0917ab406186541fe68b451"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18b956061b8db634120b58f668592a772e87e2e78bc1f6a906cfcaa0cc7991c1"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:daba396199399ccabafbfc509037ac635a6bc18510ad1add8fd16d4739cdd106"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4d63f4d446e10ad19ed01188d6c1e1bb134cde8c18b0aa2acfd973d41fcc5ada"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8a5e7cc39a45fc430af1aefc4d77ee6bad72c5bcdb1322cfde852c15192b8bd4"}, - {file = "wrapt-1.17.0-cp312-cp312-win32.whl", hash = "sha256:0a0a1a1ec28b641f2a3a2c35cbe86c00051c04fffcfcc577ffcdd707df3f8635"}, - {file = "wrapt-1.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:3c34f6896a01b84bab196f7119770fd8466c8ae3dfa73c59c0bb281e7b588ce7"}, - {file = "wrapt-1.17.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:714c12485aa52efbc0fc0ade1e9ab3a70343db82627f90f2ecbc898fdf0bb181"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da427d311782324a376cacb47c1a4adc43f99fd9d996ffc1b3e8529c4074d393"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba1739fb38441a27a676f4de4123d3e858e494fac05868b7a281c0a383c098f4"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e711fc1acc7468463bc084d1b68561e40d1eaa135d8c509a65dd534403d83d7b"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:140ea00c87fafc42739bd74a94a5a9003f8e72c27c47cd4f61d8e05e6dec8721"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:73a96fd11d2b2e77d623a7f26e004cc31f131a365add1ce1ce9a19e55a1eef90"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0b48554952f0f387984da81ccfa73b62e52817a4386d070c75e4db7d43a28c4a"}, - {file = "wrapt-1.17.0-cp313-cp313-win32.whl", hash = "sha256:498fec8da10e3e62edd1e7368f4b24aa362ac0ad931e678332d1b209aec93045"}, - {file = "wrapt-1.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:fd136bb85f4568fffca995bd3c8d52080b1e5b225dbf1c2b17b66b4c5fa02838"}, - {file = "wrapt-1.17.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:17fcf043d0b4724858f25b8826c36e08f9fb2e475410bece0ec44a22d533da9b"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4a557d97f12813dc5e18dad9fa765ae44ddd56a672bb5de4825527c847d6379"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0229b247b0fc7dee0d36176cbb79dbaf2a9eb7ecc50ec3121f40ef443155fb1d"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8425cfce27b8b20c9b89d77fb50e368d8306a90bf2b6eef2cdf5cd5083adf83f"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9c900108df470060174108012de06d45f514aa4ec21a191e7ab42988ff42a86c"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:4e547b447073fc0dbfcbff15154c1be8823d10dab4ad401bdb1575e3fdedff1b"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:914f66f3b6fc7b915d46c1cc424bc2441841083de01b90f9e81109c9759e43ab"}, - {file = "wrapt-1.17.0-cp313-cp313t-win32.whl", hash = "sha256:a4192b45dff127c7d69b3bdfb4d3e47b64179a0b9900b6351859f3001397dabf"}, - {file = "wrapt-1.17.0-cp313-cp313t-win_amd64.whl", hash = "sha256:4f643df3d4419ea3f856c5c3f40fec1d65ea2e89ec812c83f7767c8730f9827a"}, - {file = "wrapt-1.17.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:69c40d4655e078ede067a7095544bcec5a963566e17503e75a3a3e0fe2803b13"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f495b6754358979379f84534f8dd7a43ff8cff2558dcdea4a148a6e713a758f"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:baa7ef4e0886a6f482e00d1d5bcd37c201b383f1d314643dfb0367169f94f04c"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fc931382e56627ec4acb01e09ce66e5c03c384ca52606111cee50d931a342d"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:8f8909cdb9f1b237786c09a810e24ee5e15ef17019f7cecb207ce205b9b5fcce"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ad47b095f0bdc5585bced35bd088cbfe4177236c7df9984b3cc46b391cc60627"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:948a9bd0fb2c5120457b07e59c8d7210cbc8703243225dbd78f4dfc13c8d2d1f"}, - {file = "wrapt-1.17.0-cp38-cp38-win32.whl", hash = "sha256:5ae271862b2142f4bc687bdbfcc942e2473a89999a54231aa1c2c676e28f29ea"}, - {file = "wrapt-1.17.0-cp38-cp38-win_amd64.whl", hash = "sha256:f335579a1b485c834849e9075191c9898e0731af45705c2ebf70e0cd5d58beed"}, - {file = "wrapt-1.17.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d751300b94e35b6016d4b1e7d0e7bbc3b5e1751e2405ef908316c2a9024008a1"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7264cbb4a18dc4acfd73b63e4bcfec9c9802614572025bdd44d0721983fc1d9c"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33539c6f5b96cf0b1105a0ff4cf5db9332e773bb521cc804a90e58dc49b10578"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c30970bdee1cad6a8da2044febd824ef6dc4cc0b19e39af3085c763fdec7de33"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:bc7f729a72b16ee21795a943f85c6244971724819819a41ddbaeb691b2dd85ad"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6ff02a91c4fc9b6a94e1c9c20f62ea06a7e375f42fe57587f004d1078ac86ca9"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2dfb7cff84e72e7bf975b06b4989477873dcf160b2fd89959c629535df53d4e0"}, - {file = "wrapt-1.17.0-cp39-cp39-win32.whl", hash = "sha256:2399408ac33ffd5b200480ee858baa58d77dd30e0dd0cab6a8a9547135f30a88"}, - {file = "wrapt-1.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:4f763a29ee6a20c529496a20a7bcb16a73de27f5da6a843249c7047daf135977"}, - {file = "wrapt-1.17.0-py3-none-any.whl", hash = "sha256:d2c63b93548eda58abf5188e505ffed0229bf675f7c3090f8e36ad55b8cbc371"}, - {file = "wrapt-1.17.0.tar.gz", hash = "sha256:16187aa2317c731170a88ef35e8937ae0f533c402872c1ee5e6d079fcf320801"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3d57c572081fed831ad2d26fd430d565b76aa277ed1d30ff4d40670b1c0dd984"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5e251054542ae57ac7f3fba5d10bfff615b6c2fb09abeb37d2f1463f841ae22"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:80dd7db6a7cb57ffbc279c4394246414ec99537ae81ffd702443335a61dbf3a7"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a6e821770cf99cc586d33833b2ff32faebdbe886bd6322395606cf55153246c"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b60fb58b90c6d63779cb0c0c54eeb38941bae3ecf7a73c764c52c88c2dcb9d72"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b870b5df5b71d8c3359d21be8f0d6c485fa0ebdb6477dda51a1ea54a9b558061"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4011d137b9955791f9084749cba9a367c68d50ab8d11d64c50ba1688c9b457f2"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:1473400e5b2733e58b396a04eb7f35f541e1fb976d0c0724d0223dd607e0f74c"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3cedbfa9c940fdad3e6e941db7138e26ce8aad38ab5fe9dcfadfed9db7a54e62"}, + {file = "wrapt-1.17.2-cp310-cp310-win32.whl", hash = "sha256:582530701bff1dec6779efa00c516496968edd851fba224fbd86e46cc6b73563"}, + {file = "wrapt-1.17.2-cp310-cp310-win_amd64.whl", hash = "sha256:58705da316756681ad3c9c73fd15499aa4d8c69f9fd38dc8a35e06c12468582f"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ff04ef6eec3eee8a5efef2401495967a916feaa353643defcc03fc74fe213b58"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4db983e7bca53819efdbd64590ee96c9213894272c776966ca6306b73e4affda"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9abc77a4ce4c6f2a3168ff34b1da9b0f311a8f1cfd694ec96b0603dff1c79438"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b929ac182f5ace000d459c59c2c9c33047e20e935f8e39371fa6e3b85d56f4a"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f09b286faeff3c750a879d336fb6d8713206fc97af3adc14def0cdd349df6000"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a7ed2d9d039bd41e889f6fb9364554052ca21ce823580f6a07c4ec245c1f5d6"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:129a150f5c445165ff941fc02ee27df65940fcb8a22a61828b1853c98763a64b"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1fb5699e4464afe5c7e65fa51d4f99e0b2eadcc176e4aa33600a3df7801d6662"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9a2bce789a5ea90e51a02dfcc39e31b7f1e662bc3317979aa7e5538e3a034f72"}, + {file = "wrapt-1.17.2-cp311-cp311-win32.whl", hash = "sha256:4afd5814270fdf6380616b321fd31435a462019d834f83c8611a0ce7484c7317"}, + {file = "wrapt-1.17.2-cp311-cp311-win_amd64.whl", hash = "sha256:acc130bc0375999da18e3d19e5a86403667ac0c4042a094fefb7eec8ebac7cf3"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d5e2439eecc762cd85e7bd37161d4714aa03a33c5ba884e26c81559817ca0925"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fc7cb4c1c744f8c05cd5f9438a3caa6ab94ce8344e952d7c45a8ed59dd88392"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8fdbdb757d5390f7c675e558fd3186d590973244fab0c5fe63d373ade3e99d40"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bb1d0dbf99411f3d871deb6faa9aabb9d4e744d67dcaaa05399af89d847a91d"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d18a4865f46b8579d44e4fe1e2bcbc6472ad83d98e22a26c963d46e4c125ef0b"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc570b5f14a79734437cb7b0500376b6b791153314986074486e0b0fa8d71d98"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6d9187b01bebc3875bac9b087948a2bccefe464a7d8f627cf6e48b1bbae30f82"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:9e8659775f1adf02eb1e6f109751268e493c73716ca5761f8acb695e52a756ae"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e8b2816ebef96d83657b56306152a93909a83f23994f4b30ad4573b00bd11bb9"}, + {file = "wrapt-1.17.2-cp312-cp312-win32.whl", hash = "sha256:468090021f391fe0056ad3e807e3d9034e0fd01adcd3bdfba977b6fdf4213ea9"}, + {file = "wrapt-1.17.2-cp312-cp312-win_amd64.whl", hash = "sha256:ec89ed91f2fa8e3f52ae53cd3cf640d6feff92ba90d62236a81e4e563ac0e991"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6ed6ffac43aecfe6d86ec5b74b06a5be33d5bb9243d055141e8cabb12aa08125"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:35621ae4c00e056adb0009f8e86e28eb4a41a4bfa8f9bfa9fca7d343fe94f998"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a604bf7a053f8362d27eb9fefd2097f82600b856d5abe996d623babd067b1ab5"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cbabee4f083b6b4cd282f5b817a867cf0b1028c54d445b7ec7cfe6505057cf8"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49703ce2ddc220df165bd2962f8e03b84c89fee2d65e1c24a7defff6f988f4d6"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8112e52c5822fc4253f3901b676c55ddf288614dc7011634e2719718eaa187dc"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9fee687dce376205d9a494e9c121e27183b2a3df18037f89d69bd7b35bcf59e2"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:18983c537e04d11cf027fbb60a1e8dfd5190e2b60cc27bc0808e653e7b218d1b"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:703919b1633412ab54bcf920ab388735832fdcb9f9a00ae49387f0fe67dad504"}, + {file = "wrapt-1.17.2-cp313-cp313-win32.whl", hash = "sha256:abbb9e76177c35d4e8568e58650aa6926040d6a9f6f03435b7a522bf1c487f9a"}, + {file = "wrapt-1.17.2-cp313-cp313-win_amd64.whl", hash = "sha256:69606d7bb691b50a4240ce6b22ebb319c1cfb164e5f6569835058196e0f3a845"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:4a721d3c943dae44f8e243b380cb645a709ba5bd35d3ad27bc2ed947e9c68192"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:766d8bbefcb9e00c3ac3b000d9acc51f1b399513f44d77dfe0eb026ad7c9a19b"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e496a8ce2c256da1eb98bd15803a79bee00fc351f5dfb9ea82594a3f058309e0"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d615e4fe22f4ad3528448c193b218e077656ca9ccb22ce2cb20db730f8d306"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a5aaeff38654462bc4b09023918b7f21790efb807f54c000a39d41d69cf552cb"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a7d15bbd2bc99e92e39f49a04653062ee6085c0e18b3b7512a4f2fe91f2d681"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e3890b508a23299083e065f435a492b5435eba6e304a7114d2f919d400888cc6"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8c8b293cd65ad716d13d8dd3624e42e5a19cc2a2f1acc74b30c2c13f15cb61a6"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c82b8785d98cdd9fed4cac84d765d234ed3251bd6afe34cb7ac523cb93e8b4f"}, + {file = "wrapt-1.17.2-cp313-cp313t-win32.whl", hash = "sha256:13e6afb7fe71fe7485a4550a8844cc9ffbe263c0f1a1eea569bc7091d4898555"}, + {file = "wrapt-1.17.2-cp313-cp313t-win_amd64.whl", hash = "sha256:eaf675418ed6b3b31c7a989fd007fa7c3be66ce14e5c3b27336383604c9da85c"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5c803c401ea1c1c18de70a06a6f79fcc9c5acfc79133e9869e730ad7f8ad8ef9"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f917c1180fdb8623c2b75a99192f4025e412597c50b2ac870f156de8fb101119"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ecc840861360ba9d176d413a5489b9a0aff6d6303d7e733e2c4623cfa26904a6"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb87745b2e6dc56361bfde481d5a378dc314b252a98d7dd19a651a3fa58f24a9"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:58455b79ec2661c3600e65c0a716955adc2410f7383755d537584b0de41b1d8a"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4e42a40a5e164cbfdb7b386c966a588b1047558a990981ace551ed7e12ca9c2"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:91bd7d1773e64019f9288b7a5101f3ae50d3d8e6b1de7edee9c2ccc1d32f0c0a"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:bb90fb8bda722a1b9d48ac1e6c38f923ea757b3baf8ebd0c82e09c5c1a0e7a04"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:08e7ce672e35efa54c5024936e559469436f8b8096253404faeb54d2a878416f"}, + {file = "wrapt-1.17.2-cp38-cp38-win32.whl", hash = "sha256:410a92fefd2e0e10d26210e1dfb4a876ddaf8439ef60d6434f21ef8d87efc5b7"}, + {file = "wrapt-1.17.2-cp38-cp38-win_amd64.whl", hash = "sha256:95c658736ec15602da0ed73f312d410117723914a5c91a14ee4cdd72f1d790b3"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99039fa9e6306880572915728d7f6c24a86ec57b0a83f6b2491e1d8ab0235b9a"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2696993ee1eebd20b8e4ee4356483c4cb696066ddc24bd70bcbb80fa56ff9061"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:612dff5db80beef9e649c6d803a8d50c409082f1fedc9dbcdfde2983b2025b82"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62c2caa1585c82b3f7a7ab56afef7b3602021d6da34fbc1cf234ff139fed3cd9"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c958bcfd59bacc2d0249dcfe575e71da54f9dcf4a8bdf89c4cb9a68a1170d73f"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc78a84e2dfbc27afe4b2bd7c80c8db9bca75cc5b85df52bfe634596a1da846b"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ba0f0eb61ef00ea10e00eb53a9129501f52385c44853dbd6c4ad3f403603083f"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1e1fe0e6ab7775fd842bc39e86f6dcfc4507ab0ffe206093e76d61cde37225c8"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c86563182421896d73858e08e1db93afdd2b947a70064b813d515d66549e15f9"}, + {file = "wrapt-1.17.2-cp39-cp39-win32.whl", hash = "sha256:f393cda562f79828f38a819f4788641ac7c4085f30f1ce1a68672baa686482bb"}, + {file = "wrapt-1.17.2-cp39-cp39-win_amd64.whl", hash = "sha256:36ccae62f64235cf8ddb682073a60519426fdd4725524ae38874adf72b5f2aeb"}, + {file = "wrapt-1.17.2-py3-none-any.whl", hash = "sha256:b18f2d1533a71f069c7f82d524a52599053d4c7166e9dd374ae2136b7f40f7c8"}, + {file = "wrapt-1.17.2.tar.gz", hash = "sha256:41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3"}, ] [[package]] @@ -3075,5 +3006,5 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" -python-versions = "^3.9" -content-hash = "d62cd1897d8f73e9aad9e907beb82be509dc5e33d8f37b36ebf26ad1f3075a9f" +python-versions = "^3.10" +content-hash = "fe74f0936bfcc691653b16771a276b2f7d7469c578d81a52277a36f9ad398edb" diff --git a/pyproject.toml b/pyproject.toml index d1ae1dcf0..160cfc535 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ keywords = ["web", "framework"] classifiers = ["Development Status :: 4 - Beta"] [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" fastapi = ">=0.96.0,!=0.111.0,!=0.111.1" gunicorn = ">=20.1.0,<24.0" jinja2 = ">=3.1.2,<4.0" @@ -50,7 +50,6 @@ httpx = ">=0.25.1,<1.0" twine = ">=4.0.0,<7.0" tomlkit = ">=0.12.4,<1.0" lazy_loader = ">=0.4" -reflex-chakra = ">=0.6.0" typing_extensions = ">=4.6.0" [tool.poetry.group.dev.dependencies] @@ -102,5 +101,5 @@ asyncio_default_fixture_loop_scope = "function" asyncio_mode = "auto" [tool.codespell] -skip = "docs/*,*.html,examples/*, *.pyi" +skip = "docs/*,*.html,examples/*, *.pyi, poetry.lock" ignore-words-list = "te, TreeE" diff --git a/reflex/.templates/jinja/custom_components/pyproject.toml.jinja2 b/reflex/.templates/jinja/custom_components/pyproject.toml.jinja2 index a5239f33b..abfd998fd 100644 --- a/reflex/.templates/jinja/custom_components/pyproject.toml.jinja2 +++ b/reflex/.templates/jinja/custom_components/pyproject.toml.jinja2 @@ -8,7 +8,7 @@ version = "0.0.1" description = "Reflex custom component {{ module_name }}" readme = "README.md" license = { text = "Apache-2.0" } -requires-python = ">=3.9" +requires-python = ">=3.10" authors = [{ name = "", email = "YOUREMAIL@domain.com" }] keywords = ["reflex","reflex-custom-components"] diff --git a/reflex/__init__.py b/reflex/__init__.py index 0be568b1a..72089aca0 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -303,7 +303,6 @@ _MAPPING: dict = { "event": [ "EventChain", "EventHandler", - "background", "call_script", "call_function", "run_script", @@ -367,19 +366,4 @@ getattr, __dir__, __all__ = lazy_loader.attach( def __getattr__(name): - if name == "chakra": - from reflex.utils import console - - console.deprecate( - "rx.chakra", - reason="and moved to a separate package. " - "To continue using Chakra UI components, install the `reflex-chakra` package via `pip install " - "reflex-chakra`.", - deprecation_version="0.6.0", - removal_version="0.7.0", - dedupe=True, - ) - import reflex_chakra as rc - - return rc return getattr(name) diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 6bdfa11a0..1f9b4ecd8 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -156,7 +156,6 @@ from .constants import Env as Env from .constants.colors import Color as Color from .event import EventChain as EventChain from .event import EventHandler as EventHandler -from .event import background as background from .event import call_function as call_function from .event import call_script as call_script from .event import clear_local_storage as clear_local_storage diff --git a/reflex/components/component.py b/reflex/components/component.py index ed90a0f24..58bdfe7c2 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -23,8 +23,6 @@ from typing import ( Union, ) -from typing_extensions import deprecated - import reflex.state from reflex.base import Base from reflex.compiler.templates import STATEFUL_COMPONENT @@ -47,11 +45,10 @@ from reflex.event import ( EventChain, EventHandler, EventSpec, - EventVar, no_args_event_spec, ) from reflex.style import Style, format_as_emotion -from reflex.utils import console, format, imports, types +from reflex.utils import format, imports, types from reflex.utils.imports import ( ImmutableParsedImportDict, ImportDict, @@ -547,41 +544,6 @@ class Component(BaseComponent, ABC): # Construct the component. super().__init__(*args, **kwargs) - @deprecated("Use rx.EventChain.create instead.") - def _create_event_chain( - self, - args_spec: types.ArgsSpec | Sequence[types.ArgsSpec], - value: Union[ - Var, - EventHandler, - EventSpec, - List[Union[EventHandler, EventSpec, EventVar]], - Callable, - ], - key: Optional[str] = None, - ) -> Union[EventChain, Var]: - """Create an event chain from a variety of input types. - - Args: - args_spec: The args_spec of the event trigger being bound. - value: The value to create the event chain from. - key: The key of the event trigger being bound. - - Returns: - The event chain. - """ - console.deprecate( - "Component._create_event_chain", - "Use rx.EventChain.create instead.", - deprecation_version="0.6.8", - removal_version="0.7.0", - ) - return EventChain.create( - value=value, # type: ignore - args_spec=args_spec, - key=key, - ) - def get_event_triggers( self, ) -> Dict[str, types.ArgsSpec | Sequence[types.ArgsSpec]]: diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py index 8a433c18c..dca2393cd 100644 --- a/reflex/components/datadisplay/code.py +++ b/reflex/components/datadisplay/code.py @@ -14,7 +14,7 @@ from reflex.components.radix.themes.layout.box import Box from reflex.constants.colors import Color from reflex.event import set_clipboard from reflex.style import Style -from reflex.utils import console, format +from reflex.utils import format from reflex.utils.imports import ImportVar from reflex.vars.base import LiteralVar, Var, VarData @@ -438,6 +438,8 @@ class CodeBlock(Component, MarkdownComponentMap): can_copy = props.pop("can_copy", False) copy_button = props.pop("copy_button", None) + # react-syntax-highlighter doesn't have an explicit "light" or "dark" theme so we use one-light and one-dark + # themes respectively to ensure code compatibility. if "theme" not in props: # Default color scheme responds to global color mode. props["theme"] = color_mode_cond( @@ -445,17 +447,6 @@ class CodeBlock(Component, MarkdownComponentMap): dark=Theme.one_dark, ) - # react-syntax-highlighter doesn't have an explicit "light" or "dark" theme so we use one-light and one-dark - # themes respectively to ensure code compatibility. - if "theme" in props and not isinstance(props["theme"], Var): - props["theme"] = getattr(Theme, format.to_snake_case(props["theme"])) # type: ignore - console.deprecate( - feature_name="theme prop as string", - reason="Use code_block.themes instead.", - deprecation_version="0.6.0", - removal_version="0.7.0", - ) - if can_copy: code = children[0] copy_button = ( # type: ignore diff --git a/reflex/components/el/elements/forms.py b/reflex/components/el/elements/forms.py index 6b2d83c46..3e2235721 100644 --- a/reflex/components/el/elements/forms.py +++ b/reflex/components/el/elements/forms.py @@ -102,7 +102,7 @@ class Fieldset(Element): name: Var[Union[str, int, bool]] -def on_submit_event_spec() -> Tuple[Var[Dict[str, Any]]]: +def on_submit_event_spec() -> Tuple[Var[dict[str, Any]]]: """Event handler spec for the on_submit event. Returns: @@ -111,7 +111,7 @@ def on_submit_event_spec() -> Tuple[Var[Dict[str, Any]]]: return (FORM_DATA,) -def on_submit_string_event_spec() -> Tuple[Var[Dict[str, str]]]: +def on_submit_string_event_spec() -> Tuple[Var[dict[str, str]]]: """Event handler spec for the on_submit event. Returns: diff --git a/reflex/components/el/elements/forms.pyi b/reflex/components/el/elements/forms.pyi index dfab40b21..6dbff65b2 100644 --- a/reflex/components/el/elements/forms.pyi +++ b/reflex/components/el/elements/forms.pyi @@ -270,8 +270,8 @@ class Fieldset(Element): """ ... -def on_submit_event_spec() -> Tuple[Var[Dict[str, Any]]]: ... -def on_submit_string_event_spec() -> Tuple[Var[Dict[str, str]]]: ... +def on_submit_event_spec() -> Tuple[Var[dict[str, Any]]]: ... +def on_submit_string_event_spec() -> Tuple[Var[dict[str, str]]]: ... class Form(BaseHTML): @overload @@ -341,10 +341,10 @@ class Form(BaseHTML): on_submit: Optional[ Union[ Union[ - EventType[[], BASE_STATE], EventType[[Dict[str, Any]], BASE_STATE] + EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE] ], Union[ - EventType[[], BASE_STATE], EventType[[Dict[str, str]], BASE_STATE] + EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE] ], ] ] = None, diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index 83e65a54d..d06b57090 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -132,10 +132,10 @@ class FormRoot(FormComponent, HTMLForm): on_submit: Optional[ Union[ Union[ - EventType[[], BASE_STATE], EventType[[Dict[str, Any]], BASE_STATE] + EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE] ], Union[ - EventType[[], BASE_STATE], EventType[[Dict[str, str]], BASE_STATE] + EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE] ], ] ] = None, @@ -608,10 +608,10 @@ class Form(FormRoot): on_submit: Optional[ Union[ Union[ - EventType[[], BASE_STATE], EventType[[Dict[str, Any]], BASE_STATE] + EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE] ], Union[ - EventType[[], BASE_STATE], EventType[[Dict[str, str]], BASE_STATE] + EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE] ], ] ] = None, @@ -741,10 +741,10 @@ class FormNamespace(ComponentNamespace): on_submit: Optional[ Union[ Union[ - EventType[[], BASE_STATE], EventType[[Dict[str, Any]], BASE_STATE] + EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE] ], Union[ - EventType[[], BASE_STATE], EventType[[Dict[str, str]], BASE_STATE] + EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE] ], ] ] = None, diff --git a/reflex/event.py b/reflex/event.py index 886a306c1..f44fa2b1c 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -25,7 +25,6 @@ from typing import ( overload, ) -import typing_extensions from typing_extensions import ( Concatenate, ParamSpec, @@ -40,7 +39,11 @@ from typing_extensions import ( from reflex import constants from reflex.constants.state import FRONTEND_EVENT_STATE from reflex.utils import console, format -from reflex.utils.exceptions import EventFnArgMismatch, EventHandlerArgTypeMismatch +from reflex.utils.exceptions import ( + EventFnArgMismatchError, + EventHandlerArgTypeMismatchError, + MissingAnnotationError, +) from reflex.utils.types import ArgsSpec, GenericType, typehint_issubclass from reflex.vars import VarData from reflex.vars.base import LiteralVar, Var @@ -96,32 +99,6 @@ _EVENT_FIELDS: set[str] = {f.name for f in dataclasses.fields(Event)} BACKGROUND_TASK_MARKER = "_reflex_background_task" -def background(fn, *, __internal_reflex_call: bool = False): - """Decorator to mark event handler as running in the background. - - Args: - fn: The function to decorate. - - Returns: - The same function, but with a marker set. - - - Raises: - TypeError: If the function is not a coroutine function or async generator. - """ - if not __internal_reflex_call: - console.deprecate( - "background-decorator", - "Use `rx.event(background=True)` instead.", - "0.6.5", - "0.7.0", - ) - if not inspect.iscoroutinefunction(fn) and not inspect.isasyncgenfunction(fn): - raise TypeError("Background task must be async function or generator.") - setattr(fn, BACKGROUND_TASK_MARKER, True) - return fn - - @dataclasses.dataclass( init=True, frozen=True, @@ -813,29 +790,10 @@ def server_side(name: str, sig: inspect.Signature, **kwargs) -> EventSpec: ) -@overload def redirect( path: str | Var[str], - is_external: Optional[bool] = None, + is_external: bool = False, replace: bool = False, -) -> EventSpec: ... - - -@overload -@typing_extensions.deprecated("`external` is deprecated use `is_external` instead") -def redirect( - path: str | Var[str], - is_external: Optional[bool] = None, - replace: bool = False, - external: Optional[bool] = None, -) -> EventSpec: ... - - -def redirect( - path: str | Var[str], - is_external: Optional[bool] = None, - replace: bool = False, - external: Optional[bool] = None, ) -> EventSpec: """Redirect to a new path. @@ -843,26 +801,10 @@ def redirect( path: The path to redirect to. is_external: Whether to open in new tab or not. replace: If True, the current page will not create a new history entry. - external(Deprecated): Whether to open in new tab or not. Returns: An event to redirect to the path. """ - if external is not None: - console.deprecate( - "The `external` prop in `rx.redirect`", - "use `is_external` instead.", - "0.6.6", - "0.7.0", - ) - - # is_external should take precedence over external. - is_external = ( - (False if external is None else external) - if is_external is None - else is_external - ) - return server_side( "_redirect", get_fn_signature(redirect), @@ -1279,11 +1221,14 @@ def call_event_handler( event_spec: The lambda that define the argument(s) to pass to the event handler. key: The key to pass to the event handler. + Raises: + EventHandlerArgTypeMismatchError: If the event handler arguments do not match the event spec. #noqa: DAR402 + TypeError: If the event handler arguments are invalid. + Returns: The event spec from calling the event handler. - # noqa: DAR401 failure - + #noqa: DAR401 """ event_spec_args = parse_args_spec(event_spec) # type: ignore @@ -1320,10 +1265,15 @@ def call_event_handler( ), ) ) + type_match_found: dict[str, bool] = {} + delayed_exceptions: list[EventHandlerArgTypeMismatchError] = [] + + try: + type_hints_of_provided_callback = get_type_hints(event_callback.fn) + except NameError: + type_hints_of_provided_callback = {} if event_spec_return_types: - failures = [] - event_callback_spec = inspect.getfullargspec(event_callback.fn) for event_spec_index, event_spec_return_type in enumerate( @@ -1335,43 +1285,35 @@ def call_event_handler( arg if get_origin(arg) is not Var else get_args(arg)[0] for arg in args ] - try: - type_hints_of_provided_callback = get_type_hints(event_callback.fn) - except NameError: - type_hints_of_provided_callback = {} - - failed_type_check = False - # check that args of event handler are matching the spec if type hints are provided for i, arg in enumerate(event_callback_spec.args[1:]): if arg not in type_hints_of_provided_callback: continue + type_match_found.setdefault(arg, False) + try: compare_result = typehint_issubclass( args_types_without_vars[i], type_hints_of_provided_callback[arg] ) - except TypeError: - # TODO: In 0.7.0, remove this block and raise the exception - # raise TypeError( - # f"Could not compare types {args_types_without_vars[i]} and {type_hints_of_provided_callback[arg]} for argument {arg} of {event_handler.fn.__qualname__} provided for {key}." # noqa: ERA001 - # ) from e - console.warn( + except TypeError as te: + raise TypeError( f"Could not compare types {args_types_without_vars[i]} and {type_hints_of_provided_callback[arg]} for argument {arg} of {event_callback.fn.__qualname__} provided for {key}." - ) - compare_result = False + ) from te if compare_result: + type_match_found[arg] = True continue else: - failure = EventHandlerArgTypeMismatch( - f"Event handler {key} expects {args_types_without_vars[i]} for argument {arg} but got {type_hints_of_provided_callback[arg]} as annotated in {event_callback.fn.__qualname__} instead." + type_match_found[arg] = False + delayed_exceptions.append( + EventHandlerArgTypeMismatchError( + f"Event handler {key} expects {args_types_without_vars[i]} for argument {arg} but got {type_hints_of_provided_callback[arg]} as annotated in {event_callback.fn.__qualname__} instead." + ) ) - failures.append(failure) - failed_type_check = True - break - if not failed_type_check: + if all(type_match_found.values()): + delayed_exceptions.clear() if event_spec_index: args = get_args(event_spec_return_types[0]) @@ -1393,15 +1335,10 @@ def call_event_handler( f"Event handler {key} expects ({expect_string}) -> () but got ({given_string}) -> () as annotated in {event_callback.fn.__qualname__} instead. " f"This may lead to unexpected behavior but is intentionally ignored for {key}." ) - return event_callback(*event_spec_args) + break - if failures: - console.deprecate( - "Mismatched event handler argument types", - "\n".join([str(f) for f in failures]), - "0.6.5", - "0.7.0", - ) + if delayed_exceptions: + raise delayed_exceptions[0] return event_callback(*event_spec_args) # type: ignore @@ -1420,26 +1357,26 @@ def unwrap_var_annotation(annotation: GenericType): return annotation -def resolve_annotation(annotations: dict[str, Any], arg_name: str): +def resolve_annotation(annotations: dict[str, Any], arg_name: str, spec: ArgsSpec): """Resolve the annotation for the given argument name. Args: annotations: The annotations. arg_name: The argument name. + spec: The specs which the annotations come from. + + Raises: + MissingAnnotationError: If the annotation is missing for non-lambda methods. Returns: The resolved annotation. """ annotation = annotations.get(arg_name) if annotation is None: - console.deprecate( - feature_name="Unannotated event handler arguments", - reason="Provide type annotations for event handler arguments.", - deprecation_version="0.6.3", - removal_version="0.7.0", - ) - # Allow arbitrary attribute access two levels deep until removed. - return Dict[str, dict] + if not isinstance(spec, types.LambdaType): + raise MissingAnnotationError(var_name=arg_name) + else: + return dict[str, dict] return annotation @@ -1461,7 +1398,13 @@ def parse_args_spec(arg_spec: ArgsSpec | Sequence[ArgsSpec]): arg_spec( *[ Var(f"_{l_arg}").to( - unwrap_var_annotation(resolve_annotation(annotations, l_arg)) + unwrap_var_annotation( + resolve_annotation( + annotations, + l_arg, + spec=arg_spec, + ) + ) ) for l_arg in spec.args ] @@ -1477,7 +1420,7 @@ def check_fn_match_arg_spec( func_name: str | None = None, ): """Ensures that the function signature matches the passed argument specification - or raises an EventFnArgMismatch if they do not. + or raises an EventFnArgMismatchError if they do not. Args: user_func: The function to be validated. @@ -1487,7 +1430,7 @@ def check_fn_match_arg_spec( func_name: The name of the function to be validated. Raises: - EventFnArgMismatch: Raised if the number of mandatory arguments do not match + EventFnArgMismatchError: Raised if the number of mandatory arguments do not match """ user_args = inspect.getfullargspec(user_func).args # Drop the first argument if it's a bound method @@ -1503,7 +1446,7 @@ def check_fn_match_arg_spec( number_of_event_args = len(parsed_event_args) if number_of_user_args - number_of_user_default_args > number_of_event_args: - raise EventFnArgMismatch( + raise EventFnArgMismatchError( f"Event {key} only provides {number_of_event_args} arguments, but " f"{func_name or user_func} requires at least {number_of_user_args - number_of_user_default_args} " "arguments to be passed to the event handler.\n" @@ -1812,8 +1755,6 @@ V3 = TypeVar("V3") V4 = TypeVar("V4") V5 = TypeVar("V5") -background_event_decorator = background - class EventCallback(Generic[P, T]): """A descriptor that wraps a function to be used as an event.""" @@ -1986,6 +1927,9 @@ class EventNamespace(types.SimpleNamespace): func: The function to wrap. background: Whether the event should be run in the background. Defaults to False. + Raises: + TypeError: If background is True and the function is not a coroutine or async generator. # noqa: DAR402 + Returns: The wrapped function. """ @@ -1994,7 +1938,13 @@ class EventNamespace(types.SimpleNamespace): func: Callable[Concatenate[BASE_STATE, P], T], ) -> EventCallback[P, T]: if background is True: - return background_event_decorator(func, __internal_reflex_call=True) # type: ignore + if not inspect.iscoroutinefunction( + func + ) and not inspect.isasyncgenfunction(func): + raise TypeError( + "Background task must be async function or generator." + ) + setattr(func, BACKGROUND_TASK_MARKER, True) return func # type: ignore if func is not None: diff --git a/reflex/experimental/__init__.py b/reflex/experimental/__init__.py index 164790fe5..1a198f35a 100644 --- a/reflex/experimental/__init__.py +++ b/reflex/experimental/__init__.py @@ -9,7 +9,6 @@ from reflex.components.sonner.toast import toast as toast from ..utils.console import warn from . import hooks as hooks -from .assets import asset as asset from .client_state import ClientStateVar as ClientStateVar from .layout import layout as layout from .misc import run_in_thread as run_in_thread @@ -62,7 +61,6 @@ class ExperimentalNamespace(SimpleNamespace): _x = ExperimentalNamespace( - asset=asset, client_state=ClientStateVar.create, hooks=hooks, layout=layout, diff --git a/reflex/experimental/assets.py b/reflex/experimental/assets.py deleted file mode 100644 index e9be19aaf..000000000 --- a/reflex/experimental/assets.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Helper functions for adding assets to the app.""" - -from typing import Optional - -from reflex import assets -from reflex.utils import console - - -def asset(relative_filename: str, subfolder: Optional[str] = None) -> str: - """DEPRECATED: use `rx.asset` with `shared=True` instead. - - Add an asset to the app. - Place the file next to your including python file. - Copies the file to the app's external assets directory. - - Example: - ```python - rx.script(src=rx._x.asset("my_custom_javascript.js")) - rx.image(src=rx._x.asset("test_image.png","subfolder")) - ``` - - Args: - relative_filename: The relative filename of the asset. - subfolder: The directory to place the asset in. - - Returns: - The relative URL to the copied asset. - """ - console.deprecate( - feature_name="rx._x.asset", - reason="Use `rx.asset` with `shared=True` instead of `rx._x.asset`.", - deprecation_version="0.6.6", - removal_version="0.7.0", - ) - return assets.asset( - relative_filename, shared=True, subfolder=subfolder, _stack_level=2 - ) diff --git a/reflex/reflex.py b/reflex/reflex.py index 576e92c59..29aef024f 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -505,6 +505,7 @@ def deploy( ), ): """Deploy the app to the Reflex hosting service.""" + from reflex_cli.constants.base import LogLevel as HostingLogLevel from reflex_cli.utils import dependency from reflex_cli.v2 import cli as hosting_cli @@ -516,6 +517,21 @@ def deploy( # Set the log level. console.set_log_level(loglevel) + def convert_reflex_loglevel_to_reflex_cli_loglevel( + loglevel: constants.LogLevel, + ) -> HostingLogLevel: + if loglevel == constants.LogLevel.DEBUG: + return HostingLogLevel.DEBUG + if loglevel == constants.LogLevel.INFO: + return HostingLogLevel.INFO + if loglevel == constants.LogLevel.WARNING: + return HostingLogLevel.WARNING + if loglevel == constants.LogLevel.ERROR: + return HostingLogLevel.ERROR + if loglevel == constants.LogLevel.CRITICAL: + return HostingLogLevel.CRITICAL + return HostingLogLevel.INFO + # Only check requirements if interactive. # There is user interaction for requirements update. if interactive: @@ -525,9 +541,7 @@ def deploy( if prerequisites.needs_reinit(frontend=True): _init(name=config.app_name, loglevel=loglevel) prerequisites.check_latest_package_version(constants.ReflexHostingCLI.MODULE_NAME) - extra: dict[str, str] = ( - {"config_path": config_path} if config_path is not None else {} - ) + hosting_cli.deploy( app_name=app_name, app_id=app_id, @@ -551,12 +565,11 @@ def deploy( envfile=envfile, hostname=hostname, interactive=interactive, - loglevel=type(loglevel).INFO, # type: ignore + loglevel=convert_reflex_loglevel_to_reflex_cli_loglevel(loglevel), token=token, project=project, - config_path=config_path, project_name=project_name, - **extra, + **({"config_path": config_path} if config_path is not None else {}), ) diff --git a/reflex/state.py b/reflex/state.py index 66098d232..cb5b2b706 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -1341,12 +1341,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): if field.allow_none and not is_optional(field_type): field_type = Union[field_type, None] if not _isinstance(value, field_type): - console.deprecate( - "mismatched-type-assignment", - f"Tried to assign value {value} of type {type(value)} to field {type(self).__name__}.{name} of type {field_type}." - " This might lead to unexpected behavior.", - "0.6.5", - "0.7.0", + console.error( + f"Expected field '{type(self).__name__}.{name}' to receive type '{field_type}'," + f" but got '{value}' of type '{type(value)}'." ) # Set the attribute. @@ -1831,7 +1828,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): if ( isinstance(value, dict) and inspect.isclass(hinted_args) - and not types.is_generic_alias(hinted_args) # py3.9-py3.10 + and not types.is_generic_alias(hinted_args) # py3.10 ): if issubclass(hinted_args, Model): # Remove non-fields from the payload diff --git a/reflex/style.py b/reflex/style.py index a205cdc4a..3916bbc7c 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -287,7 +287,9 @@ class Style(dict): _var = LiteralVar.create(value) if _var is not None: # Carry the imports/hooks when setting a Var as a value. - self._var_data = VarData.merge(self._var_data, _var._get_all_var_data()) + self._var_data = VarData.merge( + getattr(self, "_var_data", None), _var._get_all_var_data() + ) super().__setitem__(key, value) diff --git a/reflex/utils/console.py b/reflex/utils/console.py index 8929b63b6..900e5ed07 100644 --- a/reflex/utils/console.py +++ b/reflex/utils/console.py @@ -51,20 +51,12 @@ def set_log_level(log_level: LogLevel): log_level: The log level to set. Raises: - ValueError: If the log level is invalid. + TypeError: If the log level is a string. """ if not isinstance(log_level, LogLevel): - deprecate( - feature_name="Passing a string to set_log_level", - reason="use reflex.constants.LogLevel enum instead", - deprecation_version="0.6.6", - removal_version="0.7.0", + raise TypeError( + f"log_level must be a LogLevel enum value, got {log_level} of type {type(log_level)} instead." ) - try: - log_level = getattr(LogLevel, log_level.upper()) - except AttributeError as ae: - raise ValueError(f"Invalid log level: {log_level}") from ae - global _LOG_LEVEL _LOG_LEVEL = log_level diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py index 37a68e420..d35643753 100644 --- a/reflex/utils/exceptions.py +++ b/reflex/utils/exceptions.py @@ -1,6 +1,6 @@ """Custom Exceptions.""" -from typing import Any, NoReturn +from typing import Any class ReflexError(Exception): @@ -75,6 +75,30 @@ class VarAttributeError(ReflexError, AttributeError): """Custom AttributeError for var related errors.""" +class UntypedComputedVarError(ReflexError, TypeError): + """Custom TypeError for untyped computed var errors.""" + + def __init__(self, var_name): + """Initialize the UntypedComputedVarError. + + Args: + var_name: The name of the computed var. + """ + super().__init__(f"Computed var '{var_name}' must have a type annotation.") + + +class MissingAnnotationError(ReflexError, TypeError): + """Custom TypeError for missing annotations.""" + + def __init__(self, var_name): + """Initialize the MissingAnnotationError. + + Args: + var_name: The name of the var. + """ + super().__init__(f"Var '{var_name}' must have a type annotation.") + + class UploadValueError(ReflexError, ValueError): """Custom ValueError for upload related errors.""" @@ -111,11 +135,11 @@ class MatchTypeError(ReflexError, TypeError): """Raised when the return types of match cases are different.""" -class EventHandlerArgTypeMismatch(ReflexError, TypeError): +class EventHandlerArgTypeMismatchError(ReflexError, TypeError): """Raised when the annotations of args accepted by an EventHandler differs from the spec of the event trigger.""" -class EventFnArgMismatch(ReflexError, TypeError): +class EventFnArgMismatchError(ReflexError, TypeError): """Raised when the number of args required by an event handler is more than provided by the event trigger.""" @@ -186,29 +210,27 @@ class StateMismatchError(ReflexError, ValueError): class SystemPackageMissingError(ReflexError): """Raised when a system package is missing.""" + def __init__(self, package: str): + """Initialize the SystemPackageMissingError. + + Args: + package: The missing package. + """ + from reflex.constants import IS_MACOS + + extra = ( + f" You can do so by running 'brew install {package}'." if IS_MACOS else "" + ) + super().__init__( + f"System package '{package}' is missing." + f" Please install it through your system package manager.{extra}" + ) + class EventDeserializationError(ReflexError, ValueError): """Raised when an event cannot be deserialized.""" -def raise_system_package_missing_error(package: str) -> NoReturn: - """Raise a SystemPackageMissingError. - - Args: - package: The name of the missing system package. - - Raises: - SystemPackageMissingError: The raised exception. - """ - from reflex.constants import IS_MACOS - - raise SystemPackageMissingError( - f"System package '{package}' is missing." - " Please install it through your system package manager." - + (f" You can do so by running 'brew install {package}'." if IS_MACOS else "") - ) - - class InvalidLockWarningThresholdError(ReflexError): """Raised when an invalid lock warning threshold is provided.""" diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index c10b6b856..9ee0f1018 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -240,25 +240,28 @@ def run_backend( run_uvicorn_backend(host, port, loglevel) -def get_reload_dirs() -> list[str]: +def get_reload_dirs() -> list[Path]: """Get the reload directories for the backend. Returns: The reload directories for the backend. """ config = get_config() - reload_dirs = [config.app_name] + reload_dirs = [Path(config.app_name)] if config.app_module is not None and config.app_module.__file__: module_path = Path(config.app_module.__file__).resolve().parent + while module_path.parent.name: - for parent_file in module_path.parent.iterdir(): - if parent_file == "__init__.py": - # go up a level to find dir without `__init__.py` - module_path = module_path.parent - break + if any( + sibling_file.name == "__init__.py" + for sibling_file in module_path.parent.iterdir() + ): + # go up a level to find dir without `__init__.py` + module_path = module_path.parent else: break - reload_dirs.append(str(module_path)) + + reload_dirs = [module_path] return reload_dirs @@ -278,7 +281,7 @@ def run_uvicorn_backend(host, port, loglevel: LogLevel): port=port, log_level=loglevel.value, reload=True, - reload_dirs=get_reload_dirs(), + reload_dirs=list(map(str, get_reload_dirs())), ) @@ -526,48 +529,3 @@ def is_prod_mode() -> bool: """ current_mode = environment.REFLEX_ENV_MODE.get() return current_mode == constants.Env.PROD - - -def is_frontend_only() -> bool: - """Check if the app is running in frontend-only mode. - - Returns: - True if the app is running in frontend-only mode. - """ - console.deprecate( - "is_frontend_only() is deprecated and will be removed in a future release.", - reason="Use `environment.REFLEX_FRONTEND_ONLY.get()` instead.", - deprecation_version="0.6.5", - removal_version="0.7.0", - ) - return environment.REFLEX_FRONTEND_ONLY.get() - - -def is_backend_only() -> bool: - """Check if the app is running in backend-only mode. - - Returns: - True if the app is running in backend-only mode. - """ - console.deprecate( - "is_backend_only() is deprecated and will be removed in a future release.", - reason="Use `environment.REFLEX_BACKEND_ONLY.get()` instead.", - deprecation_version="0.6.5", - removal_version="0.7.0", - ) - return environment.REFLEX_BACKEND_ONLY.get() - - -def should_skip_compile() -> bool: - """Whether the app should skip compile. - - Returns: - True if the app should skip compile. - """ - console.deprecate( - "should_skip_compile() is deprecated and will be removed in a future release.", - reason="Use `environment.REFLEX_SKIP_COMPILE.get()` instead.", - deprecation_version="0.6.5", - removal_version="0.7.0", - ) - return environment.REFLEX_SKIP_COMPILE.get() diff --git a/reflex/utils/format.py b/reflex/utils/format.py index 1d6671a0b..87d160553 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -11,7 +11,6 @@ from typing import TYPE_CHECKING, Any, List, Optional, Union from reflex import constants from reflex.constants.state import FRONTEND_EVENT_STATE from reflex.utils import exceptions -from reflex.utils.console import deprecate if TYPE_CHECKING: from reflex.components.component import ComponentStyle @@ -502,37 +501,6 @@ if TYPE_CHECKING: from reflex.vars import Var -def format_event_chain( - event_chain: EventChain | Var[EventChain], - event_arg: Var | None = None, -) -> str: - """DEPRECATED: format an event chain as a javascript invocation. - - Use str(rx.Var.create(event_chain)) instead. - - Args: - event_chain: The event chain to format. - event_arg: this argument is ignored. - - Returns: - Compiled javascript code to queue the given event chain on the frontend. - """ - deprecate( - feature_name="format_event_chain", - reason="Use str(rx.Var.create(event_chain)) instead", - deprecation_version="0.6.0", - removal_version="0.7.0", - ) - - from reflex.vars import Var - from reflex.vars.function import ArgsFunctionOperation - - result = Var.create(event_chain) - if isinstance(result, ArgsFunctionOperation): - result = result._return_expr - return str(result) - - def format_queue_events( events: EventType | None = None, args_spec: Optional[ArgsSpec] = None, diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 415519c8f..1411e4970 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -38,7 +38,7 @@ from reflex.config import Config, environment, get_config from reflex.utils import console, net, path_ops, processes, redir from reflex.utils.exceptions import ( GeneratedCodeHasNoFunctionDefs, - raise_system_package_missing_error, + SystemPackageMissingError, ) from reflex.utils.format import format_library_name from reflex.utils.registry import _get_npm_registry @@ -86,18 +86,6 @@ def get_web_dir() -> Path: return environment.REFLEX_WEB_WORKDIR.get() -def _python_version_check(): - """Emit deprecation warning for deprecated python versions.""" - # Check for end-of-life python versions. - if sys.version_info < (3, 10): - console.deprecate( - feature_name="Support for Python 3.9 and older", - reason="please upgrade to Python 3.10 or newer", - deprecation_version="0.6.0", - removal_version="0.7.0", - ) - - def check_latest_package_version(package_name: str): """Check if the latest version of the package is installed. @@ -120,8 +108,6 @@ def check_latest_package_version(package_name: str): console.warn( f"Your version ({current_version}) of {package_name} is out of date. Upgrade to {latest_version} with 'pip install {package_name} --upgrade'" ) - # Check for deprecated python versions - _python_version_check() except Exception: pass @@ -885,7 +871,11 @@ def install_node(): def install_bun(): - """Install bun onto the user's system.""" + """Install bun onto the user's system. + + Raises: + SystemPackageMissingError: If "unzip" is missing. + """ win_supported = is_windows_bun_supported() one_drive_in_path = windows_check_onedrive_in_path() if constants.IS_WINDOWS and (not win_supported or one_drive_in_path): @@ -924,7 +914,7 @@ def install_bun(): else: unzip_path = path_ops.which("unzip") if unzip_path is None: - raise_system_package_missing_error("unzip") + raise SystemPackageMissingError("unzip") # Run the bun install script. download_and_run( diff --git a/reflex/utils/telemetry.py b/reflex/utils/telemetry.py index 8e9130b09..67ec45b82 100644 --- a/reflex/utils/telemetry.py +++ b/reflex/utils/telemetry.py @@ -122,7 +122,7 @@ def _prepare_event(event: str, **kwargs) -> dict: return {} if UTC is None: - # for python 3.9 & 3.10 + # for python 3.10 stamp = datetime.utcnow().isoformat() else: # for python 3.11 & 3.12 diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 122545187..1bb346c65 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -46,6 +46,7 @@ from reflex.base import Base from reflex.constants.compiler import Hooks from reflex.utils import console, exceptions, imports, serializers, types from reflex.utils.exceptions import ( + UntypedComputedVarError, VarAttributeError, VarDependencyError, VarTypeError, @@ -545,52 +546,21 @@ class Var(Generic[VAR_TYPE]): def create( cls, value: Any, - _var_is_local: bool | None = None, - _var_is_string: bool | None = None, _var_data: VarData | None = None, ) -> Var: """Create a var from a value. Args: value: The value to create the var from. - _var_is_local: Whether the var is local. Deprecated. - _var_is_string: Whether the var is a string literal. Deprecated. _var_data: Additional hooks and imports associated with the Var. Returns: The var. """ - if _var_is_local is not None: - console.deprecate( - feature_name="_var_is_local", - reason="The _var_is_local argument is not supported for Var. " - "If you want to create a Var from a raw Javascript expression, use the constructor directly", - deprecation_version="0.6.0", - removal_version="0.7.0", - ) - if _var_is_string is not None: - console.deprecate( - feature_name="_var_is_string", - reason="The _var_is_string argument is not supported for Var. " - "If you want to create a Var from a raw Javascript expression, use the constructor directly", - deprecation_version="0.6.0", - removal_version="0.7.0", - ) - # If the value is already a var, do nothing. if isinstance(value, Var): return value - # Try to pull the imports and hooks from contained values. - if not isinstance(value, str): - return LiteralVar.create(value, _var_data=_var_data) - - if _var_is_string is False or _var_is_local is True: - return cls( - _js_expr=value, - _var_data=_var_data, - ) - return LiteralVar.create(value, _var_data=_var_data) @classmethod @@ -1863,19 +1833,14 @@ class ComputedVar(Var[RETURN_TYPE]): Raises: TypeError: If the computed var dependencies are not Var instances or var names. + UntypedComputedVarError: If the computed var is untyped. """ hint = kwargs.pop("return_type", None) or get_type_hints(fget).get( "return", Any ) if hint is Any: - console.deprecate( - "untyped-computed-var", - "ComputedVar should have a return type annotation.", - "0.6.5", - "0.7.0", - ) - + raise UntypedComputedVarError(var_name=fget.__name__) kwargs.setdefault("_js_expr", fget.__name__) kwargs.setdefault("_var_type", hint) @@ -1948,6 +1913,7 @@ class ComputedVar(Var[RETURN_TYPE]): "_var_data": kwargs.pop( "_var_data", VarData.merge(self._var_data, merge_var_data) ), + "return_type": kwargs.pop("return_type", self._var_type), } if kwargs: @@ -2082,12 +2048,9 @@ class ComputedVar(Var[RETURN_TYPE]): value = getattr(instance, self._cache_attr) if not _isinstance(value, self._var_type): - console.deprecate( - "mismatched-computed-var-return", - f"Computed var {type(instance).__name__}.{self._js_expr} returned value of type {type(value)}, " - f"expected {self._var_type}. This might cause unexpected behavior.", - "0.6.5", - "0.7.0", + console.error( + f"Computed var '{type(instance).__name__}.{self._js_expr}' must return" + f" type '{self._var_type}', got '{type(value)}'." ) return value diff --git a/tests/integration/init-test/Dockerfile b/tests/integration/init-test/Dockerfile index f30466e7f..e5d2a0820 100644 --- a/tests/integration/init-test/Dockerfile +++ b/tests/integration/init-test/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9 +FROM python:3.10 ARG USERNAME=kerrigan RUN useradd -m $USERNAME diff --git a/tests/integration/test_call_script.py b/tests/integration/test_call_script.py index 203c20e9b..be0bafdbb 100644 --- a/tests/integration/test_call_script.py +++ b/tests/integration/test_call_script.py @@ -16,7 +16,7 @@ from .utils import SessionStorage def CallScript(): """A test app for browser javascript integration.""" from pathlib import Path - from typing import Dict, List, Optional, Union + from typing import Optional, Union import reflex as rx @@ -43,15 +43,17 @@ def CallScript(): external_scripts = inline_scripts.replace("inline", "external") class CallScriptState(rx.State): - results: List[Optional[Union[str, Dict, List]]] = [] - inline_counter: int = 0 - external_counter: int = 0 + results: rx.Field[list[Optional[Union[str, dict, list]]]] = rx.field([]) + inline_counter: rx.Field[int] = rx.field(0) + external_counter: rx.Field[int] = rx.field(0) value: str = "Initial" - last_result: str = "" + last_result: int = 0 + @rx.event def call_script_callback(self, result): self.results.append(result) + @rx.event def call_script_callback_other_arg(self, result, other_arg): self.results.append([other_arg, result]) @@ -91,7 +93,7 @@ def CallScript(): def call_script_inline_return_lambda(self): return rx.call_script( "inline2()", - callback=lambda result: CallScriptState.call_script_callback_other_arg( # type: ignore + callback=lambda result: CallScriptState.call_script_callback_other_arg( result, "lambda" ), ) @@ -100,7 +102,7 @@ def CallScript(): def get_inline_counter(self): return rx.call_script( "inline_counter", - callback=CallScriptState.set_inline_counter, # type: ignore + callback=CallScriptState.setvar("inline_counter"), ) @rx.event @@ -139,7 +141,7 @@ def CallScript(): def call_script_external_return_lambda(self): return rx.call_script( "external2()", - callback=lambda result: CallScriptState.call_script_callback_other_arg( # type: ignore + callback=lambda result: CallScriptState.call_script_callback_other_arg( result, "lambda" ), ) @@ -148,28 +150,28 @@ def CallScript(): def get_external_counter(self): return rx.call_script( "external_counter", - callback=CallScriptState.set_external_counter, # type: ignore + callback=CallScriptState.setvar("external_counter"), ) @rx.event def call_with_var_f_string(self): return rx.call_script( f"{rx.Var('inline_counter')} + {rx.Var('external_counter')}", - callback=CallScriptState.set_last_result, # type: ignore + callback=CallScriptState.setvar("last_result"), ) @rx.event def call_with_var_str_cast(self): return rx.call_script( f"{rx.Var('inline_counter')!s} + {rx.Var('external_counter')!s}", - callback=CallScriptState.set_last_result, # type: ignore + callback=CallScriptState.setvar("last_result"), ) @rx.event def call_with_var_f_string_wrapped(self): return rx.call_script( rx.Var(f"{rx.Var('inline_counter')} + {rx.Var('external_counter')}"), - callback=CallScriptState.set_last_result, # type: ignore + callback=CallScriptState.setvar("last_result"), ) @rx.event @@ -178,7 +180,7 @@ def CallScript(): rx.Var( f"{rx.Var('inline_counter')!s} + {rx.Var('external_counter')!s}" ), - callback=CallScriptState.set_last_result, # type: ignore + callback=CallScriptState.setvar("last_result"), ) @rx.event @@ -193,17 +195,17 @@ def CallScript(): def index(): return rx.vstack( rx.input( - value=CallScriptState.inline_counter.to(str), # type: ignore + value=CallScriptState.inline_counter.to(str), id="inline_counter", read_only=True, ), rx.input( - value=CallScriptState.external_counter.to(str), # type: ignore + value=CallScriptState.external_counter.to(str), id="external_counter", read_only=True, ), rx.text_area( - value=CallScriptState.results.to_string(), # type: ignore + value=CallScriptState.results.to_string(), id="results", read_only=True, ), @@ -273,7 +275,7 @@ def CallScript(): CallScriptState.value, on_click=rx.call_script( "'updated'", - callback=CallScriptState.set_value, # type: ignore + callback=CallScriptState.setvar("value"), ), id="update_value", ), @@ -282,7 +284,7 @@ def CallScript(): value=CallScriptState.last_result, id="last_result", read_only=True, - on_click=CallScriptState.set_last_result(""), # type: ignore + on_click=CallScriptState.setvar("last_result", 0), ), rx.button( "call_with_var_f_string", @@ -308,7 +310,7 @@ def CallScript(): "call_with_var_f_string_inline", on_click=rx.call_script( f"{rx.Var('inline_counter')} + {CallScriptState.last_result}", - callback=CallScriptState.set_last_result, # type: ignore + callback=CallScriptState.setvar("last_result"), ), id="call_with_var_f_string_inline", ), @@ -316,7 +318,7 @@ def CallScript(): "call_with_var_str_cast_inline", on_click=rx.call_script( f"{rx.Var('inline_counter')!s} + {rx.Var('external_counter')!s}", - callback=CallScriptState.set_last_result, # type: ignore + callback=CallScriptState.setvar("last_result"), ), id="call_with_var_str_cast_inline", ), @@ -326,7 +328,7 @@ def CallScript(): rx.Var( f"{rx.Var('inline_counter')} + {CallScriptState.last_result}" ), - callback=CallScriptState.set_last_result, # type: ignore + callback=CallScriptState.setvar("last_result"), ), id="call_with_var_f_string_wrapped_inline", ), @@ -336,7 +338,7 @@ def CallScript(): rx.Var( f"{rx.Var('inline_counter')!s} + {rx.Var('external_counter')!s}" ), - callback=CallScriptState.set_last_result, # type: ignore + callback=CallScriptState.setvar("last_result"), ), id="call_with_var_str_cast_wrapped_inline", ), @@ -483,7 +485,7 @@ def test_call_script_w_var( """ assert_token(driver) last_result = driver.find_element(By.ID, "last_result") - assert last_result.get_attribute("value") == "" + assert last_result.get_attribute("value") == "0" inline_return_button = driver.find_element(By.ID, "inline_return") diff --git a/tests/integration/test_client_storage.py b/tests/integration/test_client_storage.py index 2652d6ccb..9273de70f 100644 --- a/tests/integration/test_client_storage.py +++ b/tests/integration/test_client_storage.py @@ -33,18 +33,18 @@ def ClientSide(): class ClientSideSubState(ClientSideState): # cookies with default settings c1: str = rx.Cookie() - c2: rx.Cookie = "c2 default" # type: ignore + c2: str = rx.Cookie("c2 default") # cookies with custom settings c3: str = rx.Cookie(max_age=2) # expires after 2 second - c4: rx.Cookie = rx.Cookie(same_site="strict") + c4: str = rx.Cookie(same_site="strict") c5: str = rx.Cookie(path="/foo/") # only accessible on `/foo/` c6: str = rx.Cookie(name="c6") c7: str = rx.Cookie("c7 default") # local storage with default settings l1: str = rx.LocalStorage() - l2: rx.LocalStorage = "l2 default" # type: ignore + l2: str = rx.LocalStorage("l2 default") # local storage with custom settings l3: str = rx.LocalStorage(name="l3") @@ -56,7 +56,7 @@ def ClientSide(): # Session storage s1: str = rx.SessionStorage() - s2: rx.SessionStorage = "s2 default" # type: ignore + s2: str = rx.SessionStorage("s2 default") s3: str = rx.SessionStorage(name="s3") def set_l6(self, my_param: str): @@ -87,13 +87,13 @@ def ClientSide(): rx.input( placeholder="state var", value=ClientSideState.state_var, - on_change=ClientSideState.set_state_var, # type: ignore + on_change=ClientSideState.setvar("state_var"), id="state_var", ), rx.input( placeholder="input value", value=ClientSideState.input_value, - on_change=ClientSideState.set_input_value, # type: ignore + on_change=ClientSideState.setvar("input_value"), id="input_value", ), rx.button( diff --git a/tests/units/assets/test_assets.py b/tests/units/assets/test_assets.py index b957f1902..dc444cfad 100644 --- a/tests/units/assets/test_assets.py +++ b/tests/units/assets/test_assets.py @@ -37,19 +37,6 @@ def test_shared_asset() -> None: assert not Path(Path.cwd() / "assets/external").exists() -def test_deprecated_x_asset(capsys) -> None: - """Test that the deprecated asset function raises a warning. - - Args: - capsys: Pytest fixture that captures stdout and stderr. - """ - assert rx.asset("custom_script.js", shared=True) == rx._x.asset("custom_script.js") - assert ( - "DeprecationWarning: rx._x.asset has been deprecated in version 0.6.6" - in capsys.readouterr().out - ) - - @pytest.mark.parametrize( "path,shared", [ diff --git a/tests/units/components/datadisplay/conftest.py b/tests/units/components/datadisplay/conftest.py index 13c571c8c..188e887c4 100644 --- a/tests/units/components/datadisplay/conftest.py +++ b/tests/units/components/datadisplay/conftest.py @@ -1,7 +1,5 @@ """Data display component tests fixtures.""" -from typing import List - import pandas as pd import pytest @@ -54,11 +52,11 @@ def data_table_state3(): """ class DataTableState(BaseState): - _data: List = [] - _columns: List = ["col1", "col2"] + _data: list = [] + _columns: list = ["col1", "col2"] @rx.var - def data(self) -> List: + def data(self) -> list: return self._data @rx.var @@ -77,15 +75,15 @@ def data_table_state4(): """ class DataTableState(BaseState): - _data: List = [] - _columns: List = ["col1", "col2"] + _data: list = [] + _columns: list[str] = ["col1", "col2"] @rx.var def data(self): return self._data @rx.var - def columns(self) -> List: + def columns(self) -> list: return self._columns return DataTableState diff --git a/tests/units/components/datadisplay/test_datatable.py b/tests/units/components/datadisplay/test_datatable.py index b3d31ea32..a8f966d7e 100644 --- a/tests/units/components/datadisplay/test_datatable.py +++ b/tests/units/components/datadisplay/test_datatable.py @@ -4,6 +4,7 @@ import pytest import reflex as rx from reflex.components.gridjs.datatable import DataTable from reflex.utils import types +from reflex.utils.exceptions import UntypedComputedVarError from reflex.utils.serializers import serialize, serialize_dataframe @@ -75,17 +76,17 @@ def test_invalid_props(props): [ ( "data_table_state2", - "Annotation of the computed var assigned to the data field should be provided.", + "Computed var 'data' must have a type annotation.", True, ), ( "data_table_state3", - "Annotation of the computed var assigned to the column field should be provided.", + "Computed var 'columns' must have a type annotation.", False, ), ( "data_table_state4", - "Annotation of the computed var assigned to the data field should be provided.", + "Computed var 'data' must have a type annotation.", False, ), ], @@ -99,7 +100,7 @@ def test_computed_var_without_annotation(fixture, request, err_msg, is_data_fram err_msg: expected error message. is_data_frame: whether data field is a pandas dataframe. """ - with pytest.raises(ValueError) as err: + with pytest.raises(UntypedComputedVarError) as err: if is_data_frame: DataTable.create(data=request.getfixturevalue(fixture).data) else: diff --git a/tests/units/components/test_component.py b/tests/units/components/test_component.py index 6396e4322..5bad24499 100644 --- a/tests/units/components/test_component.py +++ b/tests/units/components/test_component.py @@ -19,6 +19,7 @@ from reflex.constants import EventTriggers from reflex.event import ( EventChain, EventHandler, + JavascriptInputEvent, input_event, no_args_event_spec, parse_args_spec, @@ -27,7 +28,11 @@ from reflex.event import ( from reflex.state import BaseState from reflex.style import Style from reflex.utils import imports -from reflex.utils.exceptions import ChildrenTypeError, EventFnArgMismatch +from reflex.utils.exceptions import ( + ChildrenTypeError, + EventFnArgMismatchError, + EventHandlerArgTypeMismatchError, +) from reflex.utils.imports import ImportDict, ImportVar, ParsedImportDict, parse_imports from reflex.vars import VarData from reflex.vars.base import LiteralVar, Var @@ -94,11 +99,14 @@ def component2() -> Type[Component]: A test component. """ + def on_prop_event_spec(e0: Any): + return [e0] + class TestComponent2(Component): # A test list prop. arr: Var[List[str]] - on_prop_event: EventHandler[lambda e0: [e0]] + on_prop_event: EventHandler[on_prop_event_spec] def get_event_triggers(self) -> Dict[str, Any]: """Test controlled triggers. @@ -818,10 +826,14 @@ def test_component_create_unpack_tuple_child(test_component, element, expected): assert fragment_wrapper.render() == expected +class _Obj(Base): + custom: int = 0 + + class C1State(BaseState): """State for testing C1 component.""" - def mock_handler(self, _e, _bravo, _charlie): + def mock_handler(self, _e: JavascriptInputEvent, _bravo: dict, _charlie: _Obj): """Mock handler.""" pass @@ -829,10 +841,12 @@ class C1State(BaseState): def test_component_event_trigger_arbitrary_args(): """Test that we can define arbitrary types for the args of an event trigger.""" - class Obj(Base): - custom: int = 0 - - def on_foo_spec(_e, alpha: str, bravo: Dict[str, Any], charlie: Obj): + def on_foo_spec( + _e: Var[JavascriptInputEvent], + alpha: Var[str], + bravo: dict[str, Any], + charlie: Var[_Obj], + ): return [_e.target.value, bravo["nested"], charlie.custom + 42] class C1(Component): @@ -845,13 +859,7 @@ def test_component_event_trigger_arbitrary_args(): "on_foo": on_foo_spec, } - comp = C1.create(on_foo=C1State.mock_handler) - - assert comp.render()["props"][0] == ( - "onFoo={((__e, _alpha, _bravo, _charlie) => (addEvents(" - f'[(Event("{C1State.get_full_name()}.mock_handler", ({{ ["_e"] : __e["target"]["value"], ["_bravo"] : _bravo["nested"], ["_charlie"] : (_charlie["custom"] + 42) }}), ({{ }})))], ' - "[__e, _alpha, _bravo, _charlie], ({ }))))}" - ) + C1.create(on_foo=C1State.mock_handler) def test_create_custom_component(my_component): @@ -908,30 +916,29 @@ def test_invalid_event_handler_args(component2, test_state): test_state: A test state. """ # EventHandler args must match - with pytest.raises(EventFnArgMismatch): + with pytest.raises(EventFnArgMismatchError): component2.create(on_click=test_state.do_something_arg) # Multiple EventHandler args: all must match - with pytest.raises(EventFnArgMismatch): + with pytest.raises(EventFnArgMismatchError): component2.create( on_click=[test_state.do_something_arg, test_state.do_something] ) - # Enable when 0.7.0 happens # # Event Handler types must match - # with pytest.raises(EventHandlerArgTypeMismatch): - # component2.create( - # on_user_visited_count_changed=test_state.do_something_with_bool # noqa: ERA001 RUF100 - # ) # noqa: ERA001 RUF100 - # with pytest.raises(EventHandlerArgTypeMismatch): - # component2.create(on_user_list_changed=test_state.do_something_with_int) #noqa: ERA001 - # with pytest.raises(EventHandlerArgTypeMismatch): - # component2.create(on_user_list_changed=test_state.do_something_with_list_int) #noqa: ERA001 + with pytest.raises(EventHandlerArgTypeMismatchError): + component2.create( + on_user_visited_count_changed=test_state.do_something_with_bool + ) + with pytest.raises(EventHandlerArgTypeMismatchError): + component2.create(on_user_list_changed=test_state.do_something_with_int) + with pytest.raises(EventHandlerArgTypeMismatchError): + component2.create(on_user_list_changed=test_state.do_something_with_list_int) - # component2.create(on_open=test_state.do_something_with_int) #noqa: ERA001 - # component2.create(on_open=test_state.do_something_with_bool) #noqa: ERA001 - # component2.create(on_user_visited_count_changed=test_state.do_something_with_int) #noqa: ERA001 - # component2.create(on_user_list_changed=test_state.do_something_with_list_str) #noqa: ERA001 + component2.create(on_open=test_state.do_something_with_int) + component2.create(on_open=test_state.do_something_with_bool) + component2.create(on_user_visited_count_changed=test_state.do_something_with_int) + component2.create(on_user_list_changed=test_state.do_something_with_list_str) # lambda cannot return weird values. with pytest.raises(ValueError): @@ -944,15 +951,15 @@ def test_invalid_event_handler_args(component2, test_state): ) # lambda signature must match event trigger. - with pytest.raises(EventFnArgMismatch): + with pytest.raises(EventFnArgMismatchError): component2.create(on_click=lambda _: test_state.do_something_arg(1)) # lambda returning EventHandler must match spec - with pytest.raises(EventFnArgMismatch): + with pytest.raises(EventFnArgMismatchError): component2.create(on_click=lambda: test_state.do_something_arg) # Mixed EventSpec and EventHandler must match spec. - with pytest.raises(EventFnArgMismatch): + with pytest.raises(EventFnArgMismatchError): component2.create( on_click=lambda: [ test_state.do_something_arg(1), @@ -1801,21 +1808,15 @@ def test_custom_component_declare_event_handlers_in_fields(): """ return { **super().get_event_triggers(), - "on_a": lambda e0: [e0], "on_b": input_event, - "on_c": lambda e0: [], "on_d": lambda: [], "on_e": lambda: [], - "on_f": lambda a, b, c: [c, b, a], } class TestComponent(Component): - on_a: EventHandler[lambda e0: [e0]] on_b: EventHandler[input_event] - on_c: EventHandler[no_args_event_spec] on_d: EventHandler[no_args_event_spec] on_e: EventHandler - on_f: EventHandler[lambda a, b, c: [c, b, a]] custom_component = ReferenceComponent.create() test_component = TestComponent.create() diff --git a/tests/units/test_event.py b/tests/units/test_event.py index d7e993efa..520e876df 100644 --- a/tests/units/test_event.py +++ b/tests/units/test_event.py @@ -199,16 +199,15 @@ def test_event_redirect(input, output): input: The input for running the test. output: The expected output to validate the test. """ - path, external, replace = input + path, is_external, replace = input kwargs = {} - if external is not None: - kwargs["external"] = external + if is_external is not None: + kwargs["is_external"] = is_external if replace is not None: kwargs["replace"] = replace spec = event.redirect(path, **kwargs) assert isinstance(spec, EventSpec) assert spec.handler.fn.__qualname__ == "_redirect" - assert format.format_event(spec) == output diff --git a/tests/units/test_state.py b/tests/units/test_state.py index 19f3e4239..b1e73a1f0 100644 --- a/tests/units/test_state.py +++ b/tests/units/test_state.py @@ -1144,7 +1144,7 @@ def test_child_state(): class ChildState(MainState): @computed_var - def rendered_var(self): + def rendered_var(self) -> int: return self.v ms = MainState() @@ -1421,7 +1421,7 @@ def test_computed_var_dependencies(): return self.testprop @rx.var - def comp_w(self): + def comp_w(self) -> Callable[[], int]: """Nested lambda. Returns: @@ -1430,7 +1430,7 @@ def test_computed_var_dependencies(): return lambda: self.w @rx.var - def comp_x(self): + def comp_x(self) -> Callable[[], int]: """Nested function. Returns: @@ -1443,7 +1443,7 @@ def test_computed_var_dependencies(): return _ @rx.var - def comp_y(self) -> List[int]: + def comp_y(self) -> list[int]: """Comprehension iterating over attribute. Returns: @@ -3128,7 +3128,7 @@ async def test_get_state_from_sibling_not_cached(mock_app: rx.App, token: str): child3_var: int = 0 @rx.var(cache=False) - def v(self): + def v(self) -> None: pass class Grandchild3(Child3): diff --git a/tests/units/test_var.py b/tests/units/test_var.py index a8e9cd88c..d071d1dba 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -11,7 +11,10 @@ import reflex as rx from reflex.base import Base from reflex.constants.base import REFLEX_VAR_CLOSING_TAG, REFLEX_VAR_OPENING_TAG from reflex.state import BaseState -from reflex.utils.exceptions import PrimitiveUnserializableToJSON +from reflex.utils.exceptions import ( + PrimitiveUnserializableToJSON, + UntypedComputedVarError, +) from reflex.utils.imports import ImportVar from reflex.vars import VarData from reflex.vars.base import ( @@ -804,7 +807,7 @@ def test_shadow_computed_var_error(request: pytest.FixtureRequest, fixture: str) request: Fixture Request. fixture: The state fixture. """ - with pytest.raises(NameError): + with pytest.raises(UntypedComputedVarError): state = request.getfixturevalue(fixture) state.var_without_annotation.foo From 109b272bc290afdebdd2fa1b01cf2efca8185787 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 22 Jan 2025 15:18:05 -0800 Subject: [PATCH 032/144] Bump frontend and backend deps (#4667) * relock backend deps * bump frontend library versions * go back to react 18.3 * revert to react 18.3.1 (as it was before) * reflex-web keep reflex from current revision, rather than main * relock backend deps (again) * don't check ag-grid version on main repo * config_path is passed via `extra` to avoid pyright error when None * bump next again --------- Co-authored-by: Lendemor --- .../workflows/check_outdated_dependencies.yml | 4 +- poetry.lock | 367 +++++++++--------- reflex/components/core/upload.py | 2 +- reflex/components/datadisplay/code.py | 2 +- reflex/components/plotly/plotly.py | 2 +- reflex/components/recharts/recharts.py | 4 +- reflex/components/sonner/toast.py | 2 +- reflex/constants/installer.py | 14 +- reflex/constants/style.py | 2 +- 9 files changed, 201 insertions(+), 198 deletions(-) diff --git a/.github/workflows/check_outdated_dependencies.yml b/.github/workflows/check_outdated_dependencies.yml index 29a19d615..34bfa23bf 100644 --- a/.github/workflows/check_outdated_dependencies.yml +++ b/.github/workflows/check_outdated_dependencies.yml @@ -55,7 +55,7 @@ jobs: path: reflex-web - name: Install Requirements for reflex-web working-directory: ./reflex-web - run: poetry run uv pip install -r requirements.txt + run: poetry run uv pip install $(grep -ivE "reflex " requirements.txt) - name: Install additional dependencies for DB access run: poetry run uv pip install psycopg - name: Init Website for reflex-web @@ -73,7 +73,7 @@ jobs: echo "$outdated" # Ignore 3rd party dependencies that are not updated. - filtered_outdated=$(echo "$outdated" | grep -vE 'Package|@chakra-ui|lucide-react|@splinetool/runtime|ag-grid-react|framer-motion|react-markdown|remark-math|remark-gfm|rehype-katex|rehype-raw|remark-unwrap-images' || true) + filtered_outdated=$(echo "$outdated" | grep -vE 'Package|@chakra-ui|lucide-react|@splinetool/runtime|ag-grid-react|framer-motion|react-markdown|remark-math|remark-gfm|rehype-katex|rehype-raw|remark-unwrap-images|ag-grid' || true) no_extra=$(echo "$filtered_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-' || true) diff --git a/poetry.lock b/poetry.lock index 4cf859611..5cc673489 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "alembic" -version = "1.14.0" +version = "1.14.1" description = "A database migration tool for SQLAlchemy." optional = false python-versions = ">=3.8" files = [ - {file = "alembic-1.14.0-py3-none-any.whl", hash = "sha256:99bd884ca390466db5e27ffccff1d179ec5c05c965cfefc0607e69f9e411cb25"}, - {file = "alembic-1.14.0.tar.gz", hash = "sha256:b00892b53b3642d0b8dbedba234dbf1924b69be83a9a769d5a624b01094e304b"}, + {file = "alembic-1.14.1-py3-none-any.whl", hash = "sha256:1acdd7a3a478e208b0503cd73614d5e4c6efafa4e73518bb60e4f2846a37b1c5"}, + {file = "alembic-1.14.1.tar.gz", hash = "sha256:496e888245a53adf1498fcab31713a469c65836f8de76e01399aa1c3e90dd213"}, ] [package.dependencies] @@ -17,7 +17,7 @@ SQLAlchemy = ">=1.3.0" typing-extensions = ">=4" [package.extras] -tz = ["backports.zoneinfo"] +tz = ["backports.zoneinfo", "tzdata"] [[package]] name = "annotated-types" @@ -461,7 +461,6 @@ files = [ {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:60eb32934076fa07e4316b7b2742fa52cbb190b42c2df2863dbc4230a0a9b385"}, {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e"}, {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e"}, {file = "cryptography-44.0.0-cp37-abi3-win32.whl", hash = "sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053"}, @@ -472,7 +471,6 @@ files = [ {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289"}, {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7"}, {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9abcc2e083cbe8dde89124a47e5e53ec38751f0d7dfd36801008f316a127d7ba"}, {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64"}, {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285"}, {file = "cryptography-44.0.0-cp39-abi3-win32.whl", hash = "sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417"}, @@ -594,18 +592,18 @@ standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "htt [[package]] name = "filelock" -version = "3.16.1" +version = "3.17.0" description = "A platform independent file lock." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, - {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, + {file = "filelock-3.17.0-py3-none-any.whl", hash = "sha256:533dc2f7ba78dc2f0f531fc6c4940addf7b70a481e269a5a3b93be94ffbe8338"}, + {file = "filelock-3.17.0.tar.gz", hash = "sha256:ee4e77401ef576ebb38cd7f13b9b28893194acc20a8e68e18730ba9c0e54660e"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] typing = ["typing-extensions (>=4.12.2)"] [[package]] @@ -771,15 +769,34 @@ http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] zstd = ["zstandard (>=0.18.0)"] +[[package]] +name = "id" +version = "1.5.0" +description = "A tool for generating OIDC identities" +optional = false +python-versions = ">=3.8" +files = [ + {file = "id-1.5.0-py3-none-any.whl", hash = "sha256:f1434e1cef91f2cbb8a4ec64663d5a23b9ed43ef44c4c957d02583d61714c658"}, + {file = "id-1.5.0.tar.gz", hash = "sha256:292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d"}, +] + +[package.dependencies] +requests = "*" + +[package.extras] +dev = ["build", "bump (>=1.3.2)", "id[lint,test]"] +lint = ["bandit", "interrogate", "mypy", "ruff (<0.8.2)", "types-requests"] +test = ["coverage[toml]", "pretend", "pytest", "pytest-cov"] + [[package]] name = "identify" -version = "2.6.5" +version = "2.6.6" description = "File identification library for Python" optional = false python-versions = ">=3.9" files = [ - {file = "identify-2.6.5-py2.py3-none-any.whl", hash = "sha256:14181a47091eb75b337af4c23078c9d09225cd4c48929f521f3bf16b09d02566"}, - {file = "identify-2.6.5.tar.gz", hash = "sha256:c10b33f250e5bba374fae86fb57f3adcebf1161bce7cdf92031915fd480c13bc"}, + {file = "identify-2.6.6-py2.py3-none-any.whl", hash = "sha256:cbd1810bce79f8b671ecb20f53ee0ae8e86ae84b557de31d89709dc2a48ba881"}, + {file = "identify-2.6.6.tar.gz", hash = "sha256:7bec12768ed44ea4761efb47806f0a41f86e7c0a5fdf5950d4648c90eca7e251"}, ] [package.extras] @@ -801,13 +818,13 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 [[package]] name = "importlib-metadata" -version = "8.5.0" +version = "8.6.1" description = "Read metadata from Python packages" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, - {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, + {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, + {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, ] [package.dependencies] @@ -819,7 +836,7 @@ cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib_resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] @@ -1097,13 +1114,13 @@ files = [ [[package]] name = "more-itertools" -version = "10.5.0" +version = "10.6.0" description = "More routines for operating on iterables, beyond itertools" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "more-itertools-10.5.0.tar.gz", hash = "sha256:5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6"}, - {file = "more_itertools-10.5.0-py3-none-any.whl", hash = "sha256:037b0d3203ce90cca8ab1defbbdac29d5f993fc20131f3664dc8d6acfa872aef"}, + {file = "more-itertools-10.6.0.tar.gz", hash = "sha256:2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b"}, + {file = "more_itertools-10.6.0-py3-none-any.whl", hash = "sha256:6eb054cb4b6db1473f6e15fcc676a08e4732548acd47c708f0e179c2c7c01e89"}, ] [[package]] @@ -1152,66 +1169,66 @@ files = [ [[package]] name = "numpy" -version = "2.2.1" +version = "2.2.2" description = "Fundamental package for array computing in Python" optional = false python-versions = ">=3.10" files = [ - {file = "numpy-2.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5edb4e4caf751c1518e6a26a83501fda79bff41cc59dac48d70e6d65d4ec4440"}, - {file = "numpy-2.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aa3017c40d513ccac9621a2364f939d39e550c542eb2a894b4c8da92b38896ab"}, - {file = "numpy-2.2.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:61048b4a49b1c93fe13426e04e04fdf5a03f456616f6e98c7576144677598675"}, - {file = "numpy-2.2.1-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:7671dc19c7019103ca44e8d94917eba8534c76133523ca8406822efdd19c9308"}, - {file = "numpy-2.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4250888bcb96617e00bfa28ac24850a83c9f3a16db471eca2ee1f1714df0f957"}, - {file = "numpy-2.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7746f235c47abc72b102d3bce9977714c2444bdfaea7888d241b4c4bb6a78bf"}, - {file = "numpy-2.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:059e6a747ae84fce488c3ee397cee7e5f905fd1bda5fb18c66bc41807ff119b2"}, - {file = "numpy-2.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f62aa6ee4eb43b024b0e5a01cf65a0bb078ef8c395e8713c6e8a12a697144528"}, - {file = "numpy-2.2.1-cp310-cp310-win32.whl", hash = "sha256:48fd472630715e1c1c89bf1feab55c29098cb403cc184b4859f9c86d4fcb6a95"}, - {file = "numpy-2.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:b541032178a718c165a49638d28272b771053f628382d5e9d1c93df23ff58dbf"}, - {file = "numpy-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:40f9e544c1c56ba8f1cf7686a8c9b5bb249e665d40d626a23899ba6d5d9e1484"}, - {file = "numpy-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f9b57eaa3b0cd8db52049ed0330747b0364e899e8a606a624813452b8203d5f7"}, - {file = "numpy-2.2.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:bc8a37ad5b22c08e2dbd27df2b3ef7e5c0864235805b1e718a235bcb200cf1cb"}, - {file = "numpy-2.2.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:9036d6365d13b6cbe8f27a0eaf73ddcc070cae584e5ff94bb45e3e9d729feab5"}, - {file = "numpy-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51faf345324db860b515d3f364eaa93d0e0551a88d6218a7d61286554d190d73"}, - {file = "numpy-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38efc1e56b73cc9b182fe55e56e63b044dd26a72128fd2fbd502f75555d92591"}, - {file = "numpy-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:31b89fa67a8042e96715c68e071a1200c4e172f93b0fbe01a14c0ff3ff820fc8"}, - {file = "numpy-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4c86e2a209199ead7ee0af65e1d9992d1dce7e1f63c4b9a616500f93820658d0"}, - {file = "numpy-2.2.1-cp311-cp311-win32.whl", hash = "sha256:b34d87e8a3090ea626003f87f9392b3929a7bbf4104a05b6667348b6bd4bf1cd"}, - {file = "numpy-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:360137f8fb1b753c5cde3ac388597ad680eccbbbb3865ab65efea062c4a1fd16"}, - {file = "numpy-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:694f9e921a0c8f252980e85bce61ebbd07ed2b7d4fa72d0e4246f2f8aa6642ab"}, - {file = "numpy-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3683a8d166f2692664262fd4900f207791d005fb088d7fdb973cc8d663626faa"}, - {file = "numpy-2.2.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:780077d95eafc2ccc3ced969db22377b3864e5b9a0ea5eb347cc93b3ea900315"}, - {file = "numpy-2.2.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:55ba24ebe208344aa7a00e4482f65742969a039c2acfcb910bc6fcd776eb4355"}, - {file = "numpy-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b1d07b53b78bf84a96898c1bc139ad7f10fda7423f5fd158fd0f47ec5e01ac7"}, - {file = "numpy-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5062dc1a4e32a10dc2b8b13cedd58988261416e811c1dc4dbdea4f57eea61b0d"}, - {file = "numpy-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:fce4f615f8ca31b2e61aa0eb5865a21e14f5629515c9151850aa936c02a1ee51"}, - {file = "numpy-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:67d4cda6fa6ffa073b08c8372aa5fa767ceb10c9a0587c707505a6d426f4e046"}, - {file = "numpy-2.2.1-cp312-cp312-win32.whl", hash = "sha256:32cb94448be47c500d2c7a95f93e2f21a01f1fd05dd2beea1ccd049bb6001cd2"}, - {file = "numpy-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:ba5511d8f31c033a5fcbda22dd5c813630af98c70b2661f2d2c654ae3cdfcfc8"}, - {file = "numpy-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f1d09e520217618e76396377c81fba6f290d5f926f50c35f3a5f72b01a0da780"}, - {file = "numpy-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3ecc47cd7f6ea0336042be87d9e7da378e5c7e9b3c8ad0f7c966f714fc10d821"}, - {file = "numpy-2.2.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f419290bc8968a46c4933158c91a0012b7a99bb2e465d5ef5293879742f8797e"}, - {file = "numpy-2.2.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:5b6c390bfaef8c45a260554888966618328d30e72173697e5cabe6b285fb2348"}, - {file = "numpy-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:526fc406ab991a340744aad7e25251dd47a6720a685fa3331e5c59fef5282a59"}, - {file = "numpy-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f74e6fdeb9a265624ec3a3918430205dff1df7e95a230779746a6af78bc615af"}, - {file = "numpy-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:53c09385ff0b72ba79d8715683c1168c12e0b6e84fb0372e97553d1ea91efe51"}, - {file = "numpy-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f3eac17d9ec51be534685ba877b6ab5edc3ab7ec95c8f163e5d7b39859524716"}, - {file = "numpy-2.2.1-cp313-cp313-win32.whl", hash = "sha256:9ad014faa93dbb52c80d8f4d3dcf855865c876c9660cb9bd7553843dd03a4b1e"}, - {file = "numpy-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:164a829b6aacf79ca47ba4814b130c4020b202522a93d7bff2202bfb33b61c60"}, - {file = "numpy-2.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4dfda918a13cc4f81e9118dea249e192ab167a0bb1966272d5503e39234d694e"}, - {file = "numpy-2.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:733585f9f4b62e9b3528dd1070ec4f52b8acf64215b60a845fa13ebd73cd0712"}, - {file = "numpy-2.2.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:89b16a18e7bba224ce5114db863e7029803c179979e1af6ad6a6b11f70545008"}, - {file = "numpy-2.2.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:676f4eebf6b2d430300f1f4f4c2461685f8269f94c89698d832cdf9277f30b84"}, - {file = "numpy-2.2.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:27f5cdf9f493b35f7e41e8368e7d7b4bbafaf9660cba53fb21d2cd174ec09631"}, - {file = "numpy-2.2.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1ad395cf254c4fbb5b2132fee391f361a6e8c1adbd28f2cd8e79308a615fe9d"}, - {file = "numpy-2.2.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:08ef779aed40dbc52729d6ffe7dd51df85796a702afbf68a4f4e41fafdc8bda5"}, - {file = "numpy-2.2.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:26c9c4382b19fcfbbed3238a14abf7ff223890ea1936b8890f058e7ba35e8d71"}, - {file = "numpy-2.2.1-cp313-cp313t-win32.whl", hash = "sha256:93cf4e045bae74c90ca833cba583c14b62cb4ba2cba0abd2b141ab52548247e2"}, - {file = "numpy-2.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:bff7d8ec20f5f42607599f9994770fa65d76edca264a87b5e4ea5629bce12268"}, - {file = "numpy-2.2.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7ba9cc93a91d86365a5d270dee221fdc04fb68d7478e6bf6af650de78a8339e3"}, - {file = "numpy-2.2.1-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:3d03883435a19794e41f147612a77a8f56d4e52822337844fff3d4040a142964"}, - {file = "numpy-2.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4511d9e6071452b944207c8ce46ad2f897307910b402ea5fa975da32e0102800"}, - {file = "numpy-2.2.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5c5cc0cbabe9452038ed984d05ac87910f89370b9242371bd9079cb4af61811e"}, - {file = "numpy-2.2.1.tar.gz", hash = "sha256:45681fd7128c8ad1c379f0ca0776a8b0c6583d2f69889ddac01559dfe4390918"}, + {file = "numpy-2.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7079129b64cb78bdc8d611d1fd7e8002c0a2565da6a47c4df8062349fee90e3e"}, + {file = "numpy-2.2.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2ec6c689c61df613b783aeb21f945c4cbe6c51c28cb70aae8430577ab39f163e"}, + {file = "numpy-2.2.2-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:40c7ff5da22cd391944a28c6a9c638a5eef77fcf71d6e3a79e1d9d9e82752715"}, + {file = "numpy-2.2.2-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:995f9e8181723852ca458e22de5d9b7d3ba4da3f11cc1cb113f093b271d7965a"}, + {file = "numpy-2.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b78ea78450fd96a498f50ee096f69c75379af5138f7881a51355ab0e11286c97"}, + {file = "numpy-2.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3fbe72d347fbc59f94124125e73fc4976a06927ebc503ec5afbfb35f193cd957"}, + {file = "numpy-2.2.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8e6da5cffbbe571f93588f562ed130ea63ee206d12851b60819512dd3e1ba50d"}, + {file = "numpy-2.2.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:09d6a2032faf25e8d0cadde7fd6145118ac55d2740132c1d845f98721b5ebcfd"}, + {file = "numpy-2.2.2-cp310-cp310-win32.whl", hash = "sha256:159ff6ee4c4a36a23fe01b7c3d07bd8c14cc433d9720f977fcd52c13c0098160"}, + {file = "numpy-2.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:64bd6e1762cd7f0986a740fee4dff927b9ec2c5e4d9a28d056eb17d332158014"}, + {file = "numpy-2.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:642199e98af1bd2b6aeb8ecf726972d238c9877b0f6e8221ee5ab945ec8a2189"}, + {file = "numpy-2.2.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6d9fc9d812c81e6168b6d405bf00b8d6739a7f72ef22a9214c4241e0dc70b323"}, + {file = "numpy-2.2.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:c7d1fd447e33ee20c1f33f2c8e6634211124a9aabde3c617687d8b739aa69eac"}, + {file = "numpy-2.2.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:451e854cfae0febe723077bd0cf0a4302a5d84ff25f0bfece8f29206c7bed02e"}, + {file = "numpy-2.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd249bc894af67cbd8bad2c22e7cbcd46cf87ddfca1f1289d1e7e54868cc785c"}, + {file = "numpy-2.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02935e2c3c0c6cbe9c7955a8efa8908dd4221d7755644c59d1bba28b94fd334f"}, + {file = "numpy-2.2.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a972cec723e0563aa0823ee2ab1df0cb196ed0778f173b381c871a03719d4826"}, + {file = "numpy-2.2.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d6d6a0910c3b4368d89dde073e630882cdb266755565155bc33520283b2d9df8"}, + {file = "numpy-2.2.2-cp311-cp311-win32.whl", hash = "sha256:860fd59990c37c3ef913c3ae390b3929d005243acca1a86facb0773e2d8d9e50"}, + {file = "numpy-2.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:da1eeb460ecce8d5b8608826595c777728cdf28ce7b5a5a8c8ac8d949beadcf2"}, + {file = "numpy-2.2.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ac9bea18d6d58a995fac1b2cb4488e17eceeac413af014b1dd26170b766d8467"}, + {file = "numpy-2.2.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:23ae9f0c2d889b7b2d88a3791f6c09e2ef827c2446f1c4a3e3e76328ee4afd9a"}, + {file = "numpy-2.2.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:3074634ea4d6df66be04f6728ee1d173cfded75d002c75fac79503a880bf3825"}, + {file = "numpy-2.2.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:8ec0636d3f7d68520afc6ac2dc4b8341ddb725039de042faf0e311599f54eb37"}, + {file = "numpy-2.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ffbb1acd69fdf8e89dd60ef6182ca90a743620957afb7066385a7bbe88dc748"}, + {file = "numpy-2.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0349b025e15ea9d05c3d63f9657707a4e1d471128a3b1d876c095f328f8ff7f0"}, + {file = "numpy-2.2.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:463247edcee4a5537841d5350bc87fe8e92d7dd0e8c71c995d2c6eecb8208278"}, + {file = "numpy-2.2.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9dd47ff0cb2a656ad69c38da850df3454da88ee9a6fde0ba79acceee0e79daba"}, + {file = "numpy-2.2.2-cp312-cp312-win32.whl", hash = "sha256:4525b88c11906d5ab1b0ec1f290996c0020dd318af8b49acaa46f198b1ffc283"}, + {file = "numpy-2.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:5acea83b801e98541619af398cc0109ff48016955cc0818f478ee9ef1c5c3dcb"}, + {file = "numpy-2.2.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b208cfd4f5fe34e1535c08983a1a6803fdbc7a1e86cf13dd0c61de0b51a0aadc"}, + {file = "numpy-2.2.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d0bbe7dd86dca64854f4b6ce2ea5c60b51e36dfd597300057cf473d3615f2369"}, + {file = "numpy-2.2.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:22ea3bb552ade325530e72a0c557cdf2dea8914d3a5e1fecf58fa5dbcc6f43cd"}, + {file = "numpy-2.2.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:128c41c085cab8a85dc29e66ed88c05613dccf6bc28b3866cd16050a2f5448be"}, + {file = "numpy-2.2.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:250c16b277e3b809ac20d1f590716597481061b514223c7badb7a0f9993c7f84"}, + {file = "numpy-2.2.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0c8854b09bc4de7b041148d8550d3bd712b5c21ff6a8ed308085f190235d7ff"}, + {file = "numpy-2.2.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b6fb9c32a91ec32a689ec6410def76443e3c750e7cfc3fb2206b985ffb2b85f0"}, + {file = "numpy-2.2.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:57b4012e04cc12b78590a334907e01b3a85efb2107df2b8733ff1ed05fce71de"}, + {file = "numpy-2.2.2-cp313-cp313-win32.whl", hash = "sha256:4dbd80e453bd34bd003b16bd802fac70ad76bd463f81f0c518d1245b1c55e3d9"}, + {file = "numpy-2.2.2-cp313-cp313-win_amd64.whl", hash = "sha256:5a8c863ceacae696aff37d1fd636121f1a512117652e5dfb86031c8d84836369"}, + {file = "numpy-2.2.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:b3482cb7b3325faa5f6bc179649406058253d91ceda359c104dac0ad320e1391"}, + {file = "numpy-2.2.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:9491100aba630910489c1d0158034e1c9a6546f0b1340f716d522dc103788e39"}, + {file = "numpy-2.2.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:41184c416143defa34cc8eb9d070b0a5ba4f13a0fa96a709e20584638254b317"}, + {file = "numpy-2.2.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:7dca87ca328f5ea7dafc907c5ec100d187911f94825f8700caac0b3f4c384b49"}, + {file = "numpy-2.2.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bc61b307655d1a7f9f4b043628b9f2b721e80839914ede634e3d485913e1fb2"}, + {file = "numpy-2.2.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fad446ad0bc886855ddf5909cbf8cb5d0faa637aaa6277fb4b19ade134ab3c7"}, + {file = "numpy-2.2.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:149d1113ac15005652e8d0d3f6fd599360e1a708a4f98e43c9c77834a28238cb"}, + {file = "numpy-2.2.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:106397dbbb1896f99e044efc90360d098b3335060375c26aa89c0d8a97c5f648"}, + {file = "numpy-2.2.2-cp313-cp313t-win32.whl", hash = "sha256:0eec19f8af947a61e968d5429f0bd92fec46d92b0008d0a6685b40d6adf8a4f4"}, + {file = "numpy-2.2.2-cp313-cp313t-win_amd64.whl", hash = "sha256:97b974d3ba0fb4612b77ed35d7627490e8e3dff56ab41454d9e8b23448940576"}, + {file = "numpy-2.2.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:b0531f0b0e07643eb089df4c509d30d72c9ef40defa53e41363eca8a8cc61495"}, + {file = "numpy-2.2.2-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:e9e82dcb3f2ebbc8cb5ce1102d5f1c5ed236bf8a11730fb45ba82e2841ec21df"}, + {file = "numpy-2.2.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0d4142eb40ca6f94539e4db929410f2a46052a0fe7a2c1c59f6179c39938d2a"}, + {file = "numpy-2.2.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:356ca982c188acbfa6af0d694284d8cf20e95b1c3d0aefa8929376fea9146f60"}, + {file = "numpy-2.2.2.tar.gz", hash = "sha256:ed6906f61834d687738d25988ae117683705636936cc605be0bb208b23df4d8f"}, ] [[package]] @@ -1442,20 +1459,6 @@ pip = ">=23.1.2" graphviz = ["graphviz (>=0.20.1)"] test = ["covdefaults (>=2.3)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "virtualenv (>=20.25,<21)"] -[[package]] -name = "pkginfo" -version = "1.12.0" -description = "Query metadata from sdists / bdists / installed packages." -optional = false -python-versions = ">=3.8" -files = [ - {file = "pkginfo-1.12.0-py3-none-any.whl", hash = "sha256:dcd589c9be4da8973eceffa247733c144812759aa67eaf4bbf97016a02f39088"}, - {file = "pkginfo-1.12.0.tar.gz", hash = "sha256:8ad91a0445a036782b9366ef8b8c2c50291f83a553478ba8580c73d3215700cf"}, -] - -[package.extras] -testing = ["pytest", "pytest-cov", "wheel"] - [[package]] name = "platformdirs" version = "4.3.6" @@ -1524,13 +1527,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "4.0.1" +version = "4.1.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" files = [ - {file = "pre_commit-4.0.1-py2.py3-none-any.whl", hash = "sha256:efde913840816312445dc98787724647c65473daefe420785f885e8ed9a06878"}, - {file = "pre_commit-4.0.1.tar.gz", hash = "sha256:80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2"}, + {file = "pre_commit-4.1.0-py2.py3-none-any.whl", hash = "sha256:d29e7cb346295bcc1cc75fc3e92e343495e3ea0196c9ec6ba53f49f10ab6ae7b"}, + {file = "pre_commit-4.1.0.tar.gz", hash = "sha256:ae3f018575a588e30dfddfab9a05448bfbd6b73d78709617b5a2b853549716d4"}, ] [package.dependencies] @@ -2264,13 +2267,13 @@ jeepney = ">=0.6" [[package]] name = "selenium" -version = "4.27.1" +version = "4.28.0" description = "Official Python bindings for Selenium WebDriver" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "selenium-4.27.1-py3-none-any.whl", hash = "sha256:b89b1f62b5cfe8025868556fe82360d6b649d464f75d2655cb966c8f8447ea18"}, - {file = "selenium-4.27.1.tar.gz", hash = "sha256:5296c425a75ff1b44d0d5199042b36a6d1ef76c04fb775b97b40be739a9caae2"}, + {file = "selenium-4.28.0-py3-none-any.whl", hash = "sha256:3d6a2e8e1b850a1078884ea19f4e011ecdc12263434d87a0b78769836fb82dd8"}, + {file = "selenium-4.28.0.tar.gz", hash = "sha256:a9fae6eef48d470a1b0c6e45185d96f0dafb025e8da4b346cc41e4da3ac54fa0"}, ] [package.dependencies] @@ -2654,19 +2657,19 @@ wsproto = ">=0.14" [[package]] name = "twine" -version = "6.0.1" +version = "6.1.0" description = "Collection of utilities for publishing packages on PyPI" optional = false python-versions = ">=3.8" files = [ - {file = "twine-6.0.1-py3-none-any.whl", hash = "sha256:9c6025b203b51521d53e200f4a08b116dee7500a38591668c6a6033117bdc218"}, - {file = "twine-6.0.1.tar.gz", hash = "sha256:36158b09df5406e1c9c1fb8edb24fc2be387709443e7376689b938531582ee27"}, + {file = "twine-6.1.0-py3-none-any.whl", hash = "sha256:a47f973caf122930bf0fbbf17f80b83bc1602c9ce393c7845f289a3001dc5384"}, + {file = "twine-6.1.0.tar.gz", hash = "sha256:be324f6272eff91d07ee93f251edf232fc647935dd585ac003539b42404a8dbd"}, ] [package.dependencies] +id = "*" keyring = {version = ">=15.1", markers = "platform_machine != \"ppc64le\" and platform_machine != \"s390x\""} -packaging = "*" -pkginfo = ">=1.8.1" +packaging = ">=24.0" readme-renderer = ">=35.0" requests = ">=2.20" requests-toolbelt = ">=0.8.0,<0.9.0 || >0.9.0" @@ -2707,13 +2710,13 @@ files = [ [[package]] name = "tzdata" -version = "2024.2" +version = "2025.1" description = "Provider of IANA time zone data" optional = false python-versions = ">=2" files = [ - {file = "tzdata-2024.2-py2.py3-none-any.whl", hash = "sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd"}, - {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"}, + {file = "tzdata-2025.1-py2.py3-none-any.whl", hash = "sha256:7e127113816800496f027041c570f50bcd464a020098a3b6b199517772303639"}, + {file = "tzdata-2025.1.tar.gz", hash = "sha256:24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694"}, ] [[package]] @@ -2757,13 +2760,13 @@ standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", [[package]] name = "virtualenv" -version = "20.28.1" +version = "20.29.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" files = [ - {file = "virtualenv-20.28.1-py3-none-any.whl", hash = "sha256:412773c85d4dab0409b83ec36f7a6499e72eaf08c80e81e9576bca61831c71cb"}, - {file = "virtualenv-20.28.1.tar.gz", hash = "sha256:5d34ab240fdb5d21549b76f9e8ff3af28252f5499fb6d6f031adac4e5a8c5329"}, + {file = "virtualenv-20.29.1-py3-none-any.whl", hash = "sha256:4e4cb403c0b0da39e13b46b1b2476e505cb0046b25f242bee80f62bf990b2779"}, + {file = "virtualenv-20.29.1.tar.gz", hash = "sha256:b8b8970138d32fb606192cb97f6cd4bb644fa486be9308fb9b63f81091b5dc35"}, ] [package.dependencies] @@ -2793,80 +2796,80 @@ test = ["websockets"] [[package]] name = "websockets" -version = "14.1" +version = "14.2" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" optional = false python-versions = ">=3.9" files = [ - {file = "websockets-14.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a0adf84bc2e7c86e8a202537b4fd50e6f7f0e4a6b6bf64d7ccb96c4cd3330b29"}, - {file = "websockets-14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:90b5d9dfbb6d07a84ed3e696012610b6da074d97453bd01e0e30744b472c8179"}, - {file = "websockets-14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2177ee3901075167f01c5e335a6685e71b162a54a89a56001f1c3e9e3d2ad250"}, - {file = "websockets-14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f14a96a0034a27f9d47fd9788913924c89612225878f8078bb9d55f859272b0"}, - {file = "websockets-14.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f874ba705deea77bcf64a9da42c1f5fc2466d8f14daf410bc7d4ceae0a9fcb0"}, - {file = "websockets-14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9607b9a442392e690a57909c362811184ea429585a71061cd5d3c2b98065c199"}, - {file = "websockets-14.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:bea45f19b7ca000380fbd4e02552be86343080120d074b87f25593ce1700ad58"}, - {file = "websockets-14.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:219c8187b3ceeadbf2afcf0f25a4918d02da7b944d703b97d12fb01510869078"}, - {file = "websockets-14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ad2ab2547761d79926effe63de21479dfaf29834c50f98c4bf5b5480b5838434"}, - {file = "websockets-14.1-cp310-cp310-win32.whl", hash = "sha256:1288369a6a84e81b90da5dbed48610cd7e5d60af62df9851ed1d1d23a9069f10"}, - {file = "websockets-14.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0744623852f1497d825a49a99bfbec9bea4f3f946df6eb9d8a2f0c37a2fec2e"}, - {file = "websockets-14.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:449d77d636f8d9c17952628cc7e3b8faf6e92a17ec581ec0c0256300717e1512"}, - {file = "websockets-14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a35f704be14768cea9790d921c2c1cc4fc52700410b1c10948511039be824aac"}, - {file = "websockets-14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b1f3628a0510bd58968c0f60447e7a692933589b791a6b572fcef374053ca280"}, - {file = "websockets-14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c3deac3748ec73ef24fc7be0b68220d14d47d6647d2f85b2771cb35ea847aa1"}, - {file = "websockets-14.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7048eb4415d46368ef29d32133134c513f507fff7d953c18c91104738a68c3b3"}, - {file = "websockets-14.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6cf0ad281c979306a6a34242b371e90e891bce504509fb6bb5246bbbf31e7b6"}, - {file = "websockets-14.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cc1fc87428c1d18b643479caa7b15db7d544652e5bf610513d4a3478dbe823d0"}, - {file = "websockets-14.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f95ba34d71e2fa0c5d225bde3b3bdb152e957150100e75c86bc7f3964c450d89"}, - {file = "websockets-14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9481a6de29105d73cf4515f2bef8eb71e17ac184c19d0b9918a3701c6c9c4f23"}, - {file = "websockets-14.1-cp311-cp311-win32.whl", hash = "sha256:368a05465f49c5949e27afd6fbe0a77ce53082185bbb2ac096a3a8afaf4de52e"}, - {file = "websockets-14.1-cp311-cp311-win_amd64.whl", hash = "sha256:6d24fc337fc055c9e83414c94e1ee0dee902a486d19d2a7f0929e49d7d604b09"}, - {file = "websockets-14.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed907449fe5e021933e46a3e65d651f641975a768d0649fee59f10c2985529ed"}, - {file = "websockets-14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:87e31011b5c14a33b29f17eb48932e63e1dcd3fa31d72209848652310d3d1f0d"}, - {file = "websockets-14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bc6ccf7d54c02ae47a48ddf9414c54d48af9c01076a2e1023e3b486b6e72c707"}, - {file = "websockets-14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9777564c0a72a1d457f0848977a1cbe15cfa75fa2f67ce267441e465717dcf1a"}, - {file = "websockets-14.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a655bde548ca98f55b43711b0ceefd2a88a71af6350b0c168aa77562104f3f45"}, - {file = "websockets-14.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3dfff83ca578cada2d19e665e9c8368e1598d4e787422a460ec70e531dbdd58"}, - {file = "websockets-14.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6a6c9bcf7cdc0fd41cc7b7944447982e8acfd9f0d560ea6d6845428ed0562058"}, - {file = "websockets-14.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4b6caec8576e760f2c7dd878ba817653144d5f369200b6ddf9771d64385b84d4"}, - {file = "websockets-14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:eb6d38971c800ff02e4a6afd791bbe3b923a9a57ca9aeab7314c21c84bf9ff05"}, - {file = "websockets-14.1-cp312-cp312-win32.whl", hash = "sha256:1d045cbe1358d76b24d5e20e7b1878efe578d9897a25c24e6006eef788c0fdf0"}, - {file = "websockets-14.1-cp312-cp312-win_amd64.whl", hash = "sha256:90f4c7a069c733d95c308380aae314f2cb45bd8a904fb03eb36d1a4983a4993f"}, - {file = "websockets-14.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:3630b670d5057cd9e08b9c4dab6493670e8e762a24c2c94ef312783870736ab9"}, - {file = "websockets-14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:36ebd71db3b89e1f7b1a5deaa341a654852c3518ea7a8ddfdf69cc66acc2db1b"}, - {file = "websockets-14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5b918d288958dc3fa1c5a0b9aa3256cb2b2b84c54407f4813c45d52267600cd3"}, - {file = "websockets-14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00fe5da3f037041da1ee0cf8e308374e236883f9842c7c465aa65098b1c9af59"}, - {file = "websockets-14.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8149a0f5a72ca36720981418eeffeb5c2729ea55fa179091c81a0910a114a5d2"}, - {file = "websockets-14.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77569d19a13015e840b81550922056acabc25e3f52782625bc6843cfa034e1da"}, - {file = "websockets-14.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cf5201a04550136ef870aa60ad3d29d2a59e452a7f96b94193bee6d73b8ad9a9"}, - {file = "websockets-14.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:88cf9163ef674b5be5736a584c999e98daf3aabac6e536e43286eb74c126b9c7"}, - {file = "websockets-14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:836bef7ae338a072e9d1863502026f01b14027250a4545672673057997d5c05a"}, - {file = "websockets-14.1-cp313-cp313-win32.whl", hash = "sha256:0d4290d559d68288da9f444089fd82490c8d2744309113fc26e2da6e48b65da6"}, - {file = "websockets-14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8621a07991add373c3c5c2cf89e1d277e49dc82ed72c75e3afc74bd0acc446f0"}, - {file = "websockets-14.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:01bb2d4f0a6d04538d3c5dfd27c0643269656c28045a53439cbf1c004f90897a"}, - {file = "websockets-14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:414ffe86f4d6f434a8c3b7913655a1a5383b617f9bf38720e7c0799fac3ab1c6"}, - {file = "websockets-14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8fda642151d5affdee8a430bd85496f2e2517be3a2b9d2484d633d5712b15c56"}, - {file = "websockets-14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd7c11968bc3860d5c78577f0dbc535257ccec41750675d58d8dc66aa47fe52c"}, - {file = "websockets-14.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a032855dc7db987dff813583d04f4950d14326665d7e714d584560b140ae6b8b"}, - {file = "websockets-14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7e7ea2f782408c32d86b87a0d2c1fd8871b0399dd762364c731d86c86069a78"}, - {file = "websockets-14.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:39450e6215f7d9f6f7bc2a6da21d79374729f5d052333da4d5825af8a97e6735"}, - {file = "websockets-14.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ceada5be22fa5a5a4cdeec74e761c2ee7db287208f54c718f2df4b7e200b8d4a"}, - {file = "websockets-14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:3fc753451d471cff90b8f467a1fc0ae64031cf2d81b7b34e1811b7e2691bc4bc"}, - {file = "websockets-14.1-cp39-cp39-win32.whl", hash = "sha256:14839f54786987ccd9d03ed7f334baec0f02272e7ec4f6e9d427ff584aeea8b4"}, - {file = "websockets-14.1-cp39-cp39-win_amd64.whl", hash = "sha256:d9fd19ecc3a4d5ae82ddbfb30962cf6d874ff943e56e0c81f5169be2fda62979"}, - {file = "websockets-14.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:e5dc25a9dbd1a7f61eca4b7cb04e74ae4b963d658f9e4f9aad9cd00b688692c8"}, - {file = "websockets-14.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:04a97aca96ca2acedf0d1f332c861c5a4486fdcba7bcef35873820f940c4231e"}, - {file = "websockets-14.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df174ece723b228d3e8734a6f2a6febbd413ddec39b3dc592f5a4aa0aff28098"}, - {file = "websockets-14.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:034feb9f4286476f273b9a245fb15f02c34d9586a5bc936aff108c3ba1b21beb"}, - {file = "websockets-14.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:660c308dabd2b380807ab64b62985eaccf923a78ebc572bd485375b9ca2b7dc7"}, - {file = "websockets-14.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5a42d3ecbb2db5080fc578314439b1d79eef71d323dc661aa616fb492436af5d"}, - {file = "websockets-14.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ddaa4a390af911da6f680be8be4ff5aaf31c4c834c1a9147bc21cbcbca2d4370"}, - {file = "websockets-14.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a4c805c6034206143fbabd2d259ec5e757f8b29d0a2f0bf3d2fe5d1f60147a4a"}, - {file = "websockets-14.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:205f672a6c2c671a86d33f6d47c9b35781a998728d2c7c2a3e1cf3333fcb62b7"}, - {file = "websockets-14.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef440054124728cc49b01c33469de06755e5a7a4e83ef61934ad95fc327fbb0"}, - {file = "websockets-14.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e7591d6f440af7f73c4bd9404f3772bfee064e639d2b6cc8c94076e71b2471c1"}, - {file = "websockets-14.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:25225cc79cfebc95ba1d24cd3ab86aaa35bcd315d12fa4358939bd55e9bd74a5"}, - {file = "websockets-14.1-py3-none-any.whl", hash = "sha256:4d4fc827a20abe6d544a119896f6b78ee13fe81cbfef416f3f2ddf09a03f0e2e"}, - {file = "websockets-14.1.tar.gz", hash = "sha256:398b10c77d471c0aab20a845e7a60076b6390bfdaac7a6d2edb0d2c59d75e8d8"}, + {file = "websockets-14.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e8179f95323b9ab1c11723e5d91a89403903f7b001828161b480a7810b334885"}, + {file = "websockets-14.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0d8c3e2cdb38f31d8bd7d9d28908005f6fa9def3324edb9bf336d7e4266fd397"}, + {file = "websockets-14.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:714a9b682deb4339d39ffa674f7b674230227d981a37d5d174a4a83e3978a610"}, + {file = "websockets-14.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2e53c72052f2596fb792a7acd9704cbc549bf70fcde8a99e899311455974ca3"}, + {file = "websockets-14.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e3fbd68850c837e57373d95c8fe352203a512b6e49eaae4c2f4088ef8cf21980"}, + {file = "websockets-14.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b27ece32f63150c268593d5fdb82819584831a83a3f5809b7521df0685cd5d8"}, + {file = "websockets-14.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4daa0faea5424d8713142b33825fff03c736f781690d90652d2c8b053345b0e7"}, + {file = "websockets-14.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:bc63cee8596a6ec84d9753fd0fcfa0452ee12f317afe4beae6b157f0070c6c7f"}, + {file = "websockets-14.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7a570862c325af2111343cc9b0257b7119b904823c675b22d4ac547163088d0d"}, + {file = "websockets-14.2-cp310-cp310-win32.whl", hash = "sha256:75862126b3d2d505e895893e3deac0a9339ce750bd27b4ba515f008b5acf832d"}, + {file = "websockets-14.2-cp310-cp310-win_amd64.whl", hash = "sha256:cc45afb9c9b2dc0852d5c8b5321759cf825f82a31bfaf506b65bf4668c96f8b2"}, + {file = "websockets-14.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3bdc8c692c866ce5fefcaf07d2b55c91d6922ac397e031ef9b774e5b9ea42166"}, + {file = "websockets-14.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c93215fac5dadc63e51bcc6dceca72e72267c11def401d6668622b47675b097f"}, + {file = "websockets-14.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c9b6535c0e2cf8a6bf938064fb754aaceb1e6a4a51a80d884cd5db569886910"}, + {file = "websockets-14.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a52a6d7cf6938e04e9dceb949d35fbdf58ac14deea26e685ab6368e73744e4c"}, + {file = "websockets-14.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9f05702e93203a6ff5226e21d9b40c037761b2cfb637187c9802c10f58e40473"}, + {file = "websockets-14.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22441c81a6748a53bfcb98951d58d1af0661ab47a536af08920d129b4d1c3473"}, + {file = "websockets-14.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd9b868d78b194790e6236d9cbc46d68aba4b75b22497eb4ab64fa640c3af56"}, + {file = "websockets-14.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1a5a20d5843886d34ff8c57424cc65a1deda4375729cbca4cb6b3353f3ce4142"}, + {file = "websockets-14.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:34277a29f5303d54ec6468fb525d99c99938607bc96b8d72d675dee2b9f5bf1d"}, + {file = "websockets-14.2-cp311-cp311-win32.whl", hash = "sha256:02687db35dbc7d25fd541a602b5f8e451a238ffa033030b172ff86a93cb5dc2a"}, + {file = "websockets-14.2-cp311-cp311-win_amd64.whl", hash = "sha256:862e9967b46c07d4dcd2532e9e8e3c2825e004ffbf91a5ef9dde519ee2effb0b"}, + {file = "websockets-14.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1f20522e624d7ffbdbe259c6b6a65d73c895045f76a93719aa10cd93b3de100c"}, + {file = "websockets-14.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:647b573f7d3ada919fd60e64d533409a79dcf1ea21daeb4542d1d996519ca967"}, + {file = "websockets-14.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6af99a38e49f66be5a64b1e890208ad026cda49355661549c507152113049990"}, + {file = "websockets-14.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:091ab63dfc8cea748cc22c1db2814eadb77ccbf82829bac6b2fbe3401d548eda"}, + {file = "websockets-14.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b374e8953ad477d17e4851cdc66d83fdc2db88d9e73abf755c94510ebddceb95"}, + {file = "websockets-14.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a39d7eceeea35db85b85e1169011bb4321c32e673920ae9c1b6e0978590012a3"}, + {file = "websockets-14.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0a6f3efd47ffd0d12080594f434faf1cd2549b31e54870b8470b28cc1d3817d9"}, + {file = "websockets-14.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:065ce275e7c4ffb42cb738dd6b20726ac26ac9ad0a2a48e33ca632351a737267"}, + {file = "websockets-14.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e9d0e53530ba7b8b5e389c02282f9d2aa47581514bd6049d3a7cffe1385cf5fe"}, + {file = "websockets-14.2-cp312-cp312-win32.whl", hash = "sha256:20e6dd0984d7ca3037afcb4494e48c74ffb51e8013cac71cf607fffe11df7205"}, + {file = "websockets-14.2-cp312-cp312-win_amd64.whl", hash = "sha256:44bba1a956c2c9d268bdcdf234d5e5ff4c9b6dc3e300545cbe99af59dda9dcce"}, + {file = "websockets-14.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6f1372e511c7409a542291bce92d6c83320e02c9cf392223272287ce55bc224e"}, + {file = "websockets-14.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4da98b72009836179bb596a92297b1a61bb5a830c0e483a7d0766d45070a08ad"}, + {file = "websockets-14.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8a86a269759026d2bde227652b87be79f8a734e582debf64c9d302faa1e9f03"}, + {file = "websockets-14.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:86cf1aaeca909bf6815ea714d5c5736c8d6dd3a13770e885aafe062ecbd04f1f"}, + {file = "websockets-14.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9b0f6c3ba3b1240f602ebb3971d45b02cc12bd1845466dd783496b3b05783a5"}, + {file = "websockets-14.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:669c3e101c246aa85bc8534e495952e2ca208bd87994650b90a23d745902db9a"}, + {file = "websockets-14.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:eabdb28b972f3729348e632ab08f2a7b616c7e53d5414c12108c29972e655b20"}, + {file = "websockets-14.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2066dc4cbcc19f32c12a5a0e8cc1b7ac734e5b64ac0a325ff8353451c4b15ef2"}, + {file = "websockets-14.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ab95d357cd471df61873dadf66dd05dd4709cae001dd6342edafc8dc6382f307"}, + {file = "websockets-14.2-cp313-cp313-win32.whl", hash = "sha256:a9e72fb63e5f3feacdcf5b4ff53199ec8c18d66e325c34ee4c551ca748623bbc"}, + {file = "websockets-14.2-cp313-cp313-win_amd64.whl", hash = "sha256:b439ea828c4ba99bb3176dc8d9b933392a2413c0f6b149fdcba48393f573377f"}, + {file = "websockets-14.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7cd5706caec1686c5d233bc76243ff64b1c0dc445339bd538f30547e787c11fe"}, + {file = "websockets-14.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ec607328ce95a2f12b595f7ae4c5d71bf502212bddcea528290b35c286932b12"}, + {file = "websockets-14.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:da85651270c6bfb630136423037dd4975199e5d4114cae6d3066641adcc9d1c7"}, + {file = "websockets-14.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3ecadc7ce90accf39903815697917643f5b7cfb73c96702318a096c00aa71f5"}, + {file = "websockets-14.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1979bee04af6a78608024bad6dfcc0cc930ce819f9e10342a29a05b5320355d0"}, + {file = "websockets-14.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2dddacad58e2614a24938a50b85969d56f88e620e3f897b7d80ac0d8a5800258"}, + {file = "websockets-14.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:89a71173caaf75fa71a09a5f614f450ba3ec84ad9fca47cb2422a860676716f0"}, + {file = "websockets-14.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6af6a4b26eea4fc06c6818a6b962a952441e0e39548b44773502761ded8cc1d4"}, + {file = "websockets-14.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:80c8efa38957f20bba0117b48737993643204645e9ec45512579132508477cfc"}, + {file = "websockets-14.2-cp39-cp39-win32.whl", hash = "sha256:2e20c5f517e2163d76e2729104abc42639c41cf91f7b1839295be43302713661"}, + {file = "websockets-14.2-cp39-cp39-win_amd64.whl", hash = "sha256:b4c8cef610e8d7c70dea92e62b6814a8cd24fbd01d7103cc89308d2bfe1659ef"}, + {file = "websockets-14.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:d7d9cafbccba46e768be8a8ad4635fa3eae1ffac4c6e7cb4eb276ba41297ed29"}, + {file = "websockets-14.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c76193c1c044bd1e9b3316dcc34b174bbf9664598791e6fb606d8d29000e070c"}, + {file = "websockets-14.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fd475a974d5352390baf865309fe37dec6831aafc3014ffac1eea99e84e83fc2"}, + {file = "websockets-14.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c6c0097a41968b2e2b54ed3424739aab0b762ca92af2379f152c1aef0187e1c"}, + {file = "websockets-14.2-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d7ff794c8b36bc402f2e07c0b2ceb4a2424147ed4785ff03e2a7af03711d60a"}, + {file = "websockets-14.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dec254fcabc7bd488dab64846f588fc5b6fe0d78f641180030f8ea27b76d72c3"}, + {file = "websockets-14.2-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:bbe03eb853e17fd5b15448328b4ec7fb2407d45fb0245036d06a3af251f8e48f"}, + {file = "websockets-14.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a3c4aa3428b904d5404a0ed85f3644d37e2cb25996b7f096d77caeb0e96a3b42"}, + {file = "websockets-14.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:577a4cebf1ceaf0b65ffc42c54856214165fb8ceeba3935852fc33f6b0c55e7f"}, + {file = "websockets-14.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ad1c1d02357b7665e700eca43a31d52814ad9ad9b89b58118bdabc365454b574"}, + {file = "websockets-14.2-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f390024a47d904613577df83ba700bd189eedc09c57af0a904e5c39624621270"}, + {file = "websockets-14.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:3c1426c021c38cf92b453cdf371228d3430acd775edee6bac5a4d577efc72365"}, + {file = "websockets-14.2-py3-none-any.whl", hash = "sha256:7a6ceec4ea84469f15cf15807a747e9efe57e369c384fa86e022b3bea679b79b"}, + {file = "websockets-14.2.tar.gz", hash = "sha256:5059ed9c54945efb321f097084b4c7e52c246f2c869815876a69d1efc4ad6eb5"}, ] [[package]] diff --git a/reflex/components/core/upload.py b/reflex/components/core/upload.py index 14205cc6b..4666a8f1b 100644 --- a/reflex/components/core/upload.py +++ b/reflex/components/core/upload.py @@ -192,7 +192,7 @@ class GhostUpload(Fragment): class Upload(MemoizationLeaf): """A file upload component.""" - library = "react-dropzone@14.2.10" + library = "react-dropzone@14.3.5" tag = "" diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py index dca2393cd..242e812b2 100644 --- a/reflex/components/datadisplay/code.py +++ b/reflex/components/datadisplay/code.py @@ -382,7 +382,7 @@ for theme_name in dir(Theme): class CodeBlock(Component, MarkdownComponentMap): """A code block.""" - library = "react-syntax-highlighter@15.6.0" + library = "react-syntax-highlighter@15.6.1" tag = "PrismAsyncLight" diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py index 3bdef7875..68efd4545 100644 --- a/reflex/components/plotly/plotly.py +++ b/reflex/components/plotly/plotly.py @@ -95,7 +95,7 @@ class Plotly(NoSSRComponent): library = "react-plotly.js@2.6.0" - lib_dependencies: List[str] = ["plotly.js@2.35.2"] + lib_dependencies: List[str] = ["plotly.js@2.35.3"] tag = "Plot" diff --git a/reflex/components/recharts/recharts.py b/reflex/components/recharts/recharts.py index b5a4ed113..d3fc20dc1 100644 --- a/reflex/components/recharts/recharts.py +++ b/reflex/components/recharts/recharts.py @@ -8,7 +8,7 @@ from reflex.components.component import Component, MemoizationLeaf, NoSSRCompone class Recharts(Component): """A component that wraps a recharts lib.""" - library = "recharts@2.13.0" + library = "recharts@2.15.0" def _get_style(self) -> Dict: return {"wrapperStyle": self.style} @@ -17,7 +17,7 @@ class Recharts(Component): class RechartsCharts(NoSSRComponent, MemoizationLeaf): """A component that wraps a recharts lib.""" - library = "recharts@2.13.0" + library = "recharts@2.15.0" LiteralAnimationEasing = Literal["ease", "ease-in", "ease-out", "ease-in-out", "linear"] diff --git a/reflex/components/sonner/toast.py b/reflex/components/sonner/toast.py index b978409ab..7177c6473 100644 --- a/reflex/components/sonner/toast.py +++ b/reflex/components/sonner/toast.py @@ -167,7 +167,7 @@ class ToastProps(PropsBase, NoExtrasAllowedProps): class Toaster(Component): """A Toaster Component for displaying toast notifications.""" - library: str = "sonner@1.7.1" + library: str = "sonner@1.7.2" tag = "Toaster" diff --git a/reflex/constants/installer.py b/reflex/constants/installer.py index f9dd26b5a..2176bdf3a 100644 --- a/reflex/constants/installer.py +++ b/reflex/constants/installer.py @@ -178,21 +178,21 @@ class PackageJson(SimpleNamespace): PATH = "package.json" DEPENDENCIES = { - "@babel/standalone": "7.26.0", - "@emotion/react": "11.13.3", - "axios": "1.7.7", + "@babel/standalone": "7.26.6", + "@emotion/react": "11.14.0", + "axios": "1.7.9", "json5": "2.2.3", - "next": "15.1.4", + "next": "15.1.6", "next-sitemap": "4.2.3", - "next-themes": "0.4.3", + "next-themes": "0.4.4", "react": "18.3.1", "react-dom": "18.3.1", - "react-focus-lock": "2.13.2", + "react-focus-lock": "2.13.5", "socket.io-client": "4.8.1", "universal-cookie": "7.2.2", } DEV_DEPENDENCIES = { "autoprefixer": "10.4.20", - "postcss": "8.4.49", + "postcss": "8.5.1", "postcss-import": "16.1.0", } diff --git a/reflex/constants/style.py b/reflex/constants/style.py index a1d30bcca..5b31ce9b3 100644 --- a/reflex/constants/style.py +++ b/reflex/constants/style.py @@ -7,7 +7,7 @@ class Tailwind(SimpleNamespace): """Tailwind constants.""" # The Tailwindcss version - VERSION = "tailwindcss@3.4.15" + VERSION = "tailwindcss@3.4.17" # The Tailwind config. CONFIG = "tailwind.config.js" # Default Tailwind content paths From 1106aae76ecd3906d0ccbf482b5f945615927019 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 22 Jan 2025 15:18:35 -0800 Subject: [PATCH 033/144] remove integration screenshots (#4677) --- .github/workflows/integration_app_harness.yml | 7 ----- reflex/config.py | 3 -- tests/integration/conftest.py | 30 ------------------- 3 files changed, 40 deletions(-) diff --git a/.github/workflows/integration_app_harness.yml b/.github/workflows/integration_app_harness.yml index 5e88fc412..0bafd3601 100644 --- a/.github/workflows/integration_app_harness.yml +++ b/.github/workflows/integration_app_harness.yml @@ -50,14 +50,7 @@ jobs: - run: poetry run uv pip install pyvirtualdisplay pillow pytest-split pytest-retry - name: Run app harness tests env: - SCREENSHOT_DIR: /tmp/screenshots/${{ matrix.state_manager }}/${{ matrix.python-version }}/${{ matrix.split_index }} REDIS_URL: ${{ matrix.state_manager == 'redis' && 'redis://localhost:6379' || '' }} run: | poetry run playwright install chromium poetry run pytest tests/integration --retries 3 --maxfail=5 --splits 2 --group ${{matrix.split_index}} - - uses: actions/upload-artifact@v4 - name: Upload failed test screenshots - if: always() - with: - name: failed_test_screenshots - path: /tmp/screenshots diff --git a/reflex/config.py b/reflex/config.py index 8511694fb..d5eee8dfd 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -556,9 +556,6 @@ class EnvironmentVariables: # Arguments to pass to the app harness driver. APP_HARNESS_DRIVER_ARGS: EnvVar[str] = env_var("") - # Where to save screenshots when tests fail. - SCREENSHOT_DIR: EnvVar[Optional[Path]] = env_var(None) - # Whether to check for outdated package versions. REFLEX_CHECK_LATEST_VERSION: EnvVar[bool] = env_var(True) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index d11344903..67bd26c49 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -1,8 +1,6 @@ """Shared conftest for all integration tests.""" import os -import re -from pathlib import Path import pytest @@ -36,34 +34,6 @@ def xvfb(): yield None -def pytest_exception_interact(node, call, report): - """Take and upload screenshot when tests fail. - - Args: - node: The pytest item that failed. - call: The pytest call describing when/where the test was invoked. - report: The pytest log report object. - """ - screenshot_dir = environment.SCREENSHOT_DIR.get() - if DISPLAY is None or screenshot_dir is None: - return - - screenshot_dir = Path(screenshot_dir) - screenshot_dir.mkdir(parents=True, exist_ok=True) - safe_filename = re.sub( - r"(?u)[^-\w.]", - "_", - str(node.nodeid).strip().replace(" ", "_").replace(":", "_").replace(".py", ""), - ) - - try: - DISPLAY.waitgrab().save( - (Path(screenshot_dir) / safe_filename).with_suffix(".png"), - ) - except Exception as e: - print(f"Failed to take screenshot for {node}: {e}") - - @pytest.fixture( scope="session", params=[AppHarness, AppHarnessProd], ids=["dev", "prod"] ) From 8dea68278126645ae31b6eb20af188d6b5b84c38 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 22 Jan 2025 15:19:25 -0800 Subject: [PATCH 034/144] update bun to 1.2.0 (#4678) --- reflex/constants/installer.py | 4 ++-- reflex/utils/prerequisites.py | 1 + scripts/bun_install.sh | 29 ++++++++++++++++++++--------- scripts/install.ps1 | 4 ++++ 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/reflex/constants/installer.py b/reflex/constants/installer.py index 2176bdf3a..0a89240b3 100644 --- a/reflex/constants/installer.py +++ b/reflex/constants/installer.py @@ -37,10 +37,10 @@ class Bun(SimpleNamespace): """Bun constants.""" # The Bun version. - VERSION = "1.1.29" + VERSION = "1.2.0" # Min Bun Version - MIN_VERSION = "0.7.0" + MIN_VERSION = "1.1.0" # URL to bun install script. INSTALL_URL = "https://raw.githubusercontent.com/reflex-dev/reflex/main/scripts/bun_install.sh" diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 1411e4970..1f898d1a1 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -921,6 +921,7 @@ def install_bun(): constants.Bun.INSTALL_URL, f"bun-v{constants.Bun.VERSION}", BUN_INSTALL=str(constants.Bun.ROOT_PATH), + BUN_VERSION=str(constants.Bun.VERSION), ) diff --git a/scripts/bun_install.sh b/scripts/bun_install.sh index 08a0817f6..6961544ad 100644 --- a/scripts/bun_install.sh +++ b/scripts/bun_install.sh @@ -78,6 +78,14 @@ case $platform in ;; esac +case "$target" in +'linux'*) + if [ -f /etc/alpine-release ]; then + target="$target-musl" + fi + ;; +esac + if [[ $target = darwin-x64 ]]; then # Is this process running in Rosetta? # redirect stderr to devnull to avoid error message when not running in Rosetta @@ -91,19 +99,20 @@ GITHUB=${GITHUB-"https://github.com"} github_repo="$GITHUB/oven-sh/bun" -if [[ $target = darwin-x64 ]]; then - # If AVX2 isn't supported, use the -baseline build +# If AVX2 isn't supported, use the -baseline build +case "$target" in +'darwin-x64'*) if [[ $(sysctl -a | grep machdep.cpu | grep AVX2) == '' ]]; then - target=darwin-x64-baseline + target="$target-baseline" fi -fi - -if [[ $target = linux-x64 ]]; then + ;; +'linux-x64'*) # If AVX2 isn't supported, use the -baseline build if [[ $(cat /proc/cpuinfo | grep avx2) = '' ]]; then - target=linux-x64-baseline + target="$target-baseline" fi -fi + ;; +esac exe_name=bun @@ -113,8 +122,10 @@ if [[ $# = 2 && $2 = debug-info ]]; then info "You requested a debug build of bun. More information will be shown if a crash occurs." fi +bun_version=BUN_VERSION + if [[ $# = 0 ]]; then - bun_uri=$github_repo/releases/latest/download/bun-$target.zip + bun_uri=$github_repo/releases/download/bun-v$bun_version/bun-$target.zip else bun_uri=$github_repo/releases/download/$1/bun-$target.zip fi diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 3c432ac3b..52f1bcc14 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -214,8 +214,12 @@ function Install-Bun { # http://community.sqlbackupandftp.com/t/error-1073741515-solved/1305 if (($LASTEXITCODE -eq 3221225781) -or ($LASTEXITCODE -eq -1073741515)) # STATUS_DLL_NOT_FOUND { + # TODO: as of July 2024, Bun has no external dependencies. + # I want to keep this error message in for a few months to ensure that + # if someone somehow runs into this, it can be reported. Write-Output "Install Failed - You are missing a DLL required to run bun.exe" Write-Output "This can be solved by installing the Visual C++ Redistributable from Microsoft:`nSee https://learn.microsoft.com/cpp/windows/latest-supported-vc-redist`nDirect Download -> https://aka.ms/vs/17/release/vc_redist.x64.exe`n`n" + Write-Output "The error above should be unreachable as Bun does not depend on this library. Please comment in https://github.com/oven-sh/bun/issues/8598 or open a new issue.`n`n" Write-Output "The command '${BunBin}\bun.exe --revision' exited with code ${LASTEXITCODE}`n" return 1 } From 0139cab13f6813bc4a52bfc3b5a5430b065c581e Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 22 Jan 2025 15:23:06 -0800 Subject: [PATCH 035/144] refactor client state to restore prior API (#4674) * refactor client state to restore prior API * maybe add that --- reflex/experimental/client_state.py | 74 ++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/reflex/experimental/client_state.py b/reflex/experimental/client_state.py index 45dfef237..ca91905ae 100644 --- a/reflex/experimental/client_state.py +++ b/reflex/experimental/client_state.py @@ -34,6 +34,18 @@ def _client_state_ref(var_name: str) -> str: return f"refs['_client_state_{var_name}']" +def _client_state_ref_dict(var_name: str) -> str: + """Get the ref path for a ClientStateVar. + + Args: + var_name: The name of the variable. + + Returns: + An accessor for ClientStateVar ref as a string. + """ + return f"refs['_client_state_dict_{var_name}']" + + @dataclasses.dataclass( eq=False, frozen=True, @@ -115,10 +127,41 @@ class ClientStateVar(Var): "react": [ImportVar(tag="useState"), ImportVar(tag="useId")], } if global_ref: - hooks[f"{_client_state_ref(var_name)} ??= {{}}"] = None - hooks[f"{_client_state_ref(setter_name)} ??= {{}}"] = None - hooks[f"{_client_state_ref(var_name)}[{id_name}] = {var_name}"] = None - hooks[f"{_client_state_ref(setter_name)}[{id_name}] = {setter_name}"] = None + arg_name = get_unique_variable_name() + func = ArgsFunctionOperationBuilder.create( + args_names=(arg_name,), + return_expr=Var("Array.prototype.forEach.call") + .to(FunctionVar) + .call( + ( + Var("Object.values") + .to(FunctionVar) + .call(Var(_client_state_ref_dict(setter_name))) + .to(list) + .to(list) + ) + + Var.create( + [ + Var( + f"(value) => {{ {_client_state_ref(var_name)} = value; }}" + ) + ] + ).to(list), + ArgsFunctionOperationBuilder.create( + args_names=("setter",), + return_expr=Var("setter").to(FunctionVar).call(Var(arg_name)), + ), + ), + ) + + hooks[f"{_client_state_ref(setter_name)} = {func!s}"] = None + hooks[f"{_client_state_ref(var_name)} ??= {var_name!s}"] = None + hooks[f"{_client_state_ref_dict(var_name)} ??= {{}}"] = None + hooks[f"{_client_state_ref_dict(setter_name)} ??= {{}}"] = None + hooks[f"{_client_state_ref_dict(var_name)}[{id_name}] = {var_name}"] = None + hooks[ + f"{_client_state_ref_dict(setter_name)}[{id_name}] = {setter_name}" + ] = None imports.update(_refs_import) return cls( _js_expr="", @@ -150,7 +193,7 @@ class ClientStateVar(Var): return ( Var( _js_expr=( - _client_state_ref(self._getter_name) + f"[{self._id_name}]" + _client_state_ref_dict(self._getter_name) + f"[{self._id_name}]" if self._global_ref else self._getter_name ), @@ -179,26 +222,11 @@ class ClientStateVar(Var): """ _var_data = VarData(imports=_refs_import if self._global_ref else {}) - arg_name = get_unique_variable_name() setter = ( - ArgsFunctionOperationBuilder.create( - args_names=(arg_name,), - return_expr=Var("Array.prototype.forEach.call") - .to(FunctionVar) - .call( - Var("Object.values") - .to(FunctionVar) - .call(Var(_client_state_ref(self._setter_name))), - ArgsFunctionOperationBuilder.create( - args_names=("setter",), - return_expr=Var("setter").to(FunctionVar).call(Var(arg_name)), - ), - ), - _var_data=_var_data, - ) + Var(_client_state_ref(self._setter_name)) if self._global_ref - else Var(self._setter_name, _var_data=_var_data).to(FunctionVar) - ) + else Var(self._setter_name, _var_data=_var_data) + ).to(FunctionVar) if value is not NoValue: # This is a hack to make it work like an EventSpec taking an arg From 818788da633c6cf28eac3045d8d00267f564ffd8 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 22 Jan 2025 15:23:34 -0800 Subject: [PATCH 036/144] Do not track compile in posthog metrics (#4669) --- reflex/app_module_for_backend.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/reflex/app_module_for_backend.py b/reflex/app_module_for_backend.py index b0ae0a29f..28be30410 100644 --- a/reflex/app_module_for_backend.py +++ b/reflex/app_module_for_backend.py @@ -5,14 +5,12 @@ Only the app attribute is explicitly exposed. from concurrent.futures import ThreadPoolExecutor from reflex import constants -from reflex.utils import telemetry from reflex.utils.exec import is_prod_mode from reflex.utils.prerequisites import get_and_validate_app if constants.CompileVars.APP != "app": raise AssertionError("unexpected variable name for 'app'") -telemetry.send("compile") app, app_module = get_and_validate_app(reload=False) # For py3.9 compatibility when redis is used, we MUST add any decorator pages # before compiling the app in a thread to avoid event loop error (REF-2172). @@ -31,6 +29,5 @@ del app_module del compile_future del get_and_validate_app del is_prod_mode -del telemetry del constants del ThreadPoolExecutor From 1ca36fa6c157c27caef4e733dfc1db2e23f8d52e Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Wed, 22 Jan 2025 23:26:12 +0000 Subject: [PATCH 037/144] [ENG-1796]`reflex rename`- B (#4668) * `reflex rename`- B * add unit tests * precommit * dont need this comment * move loglevel * calm down, darglint * add current dir to sys path --- reflex/constants/compiler.py | 2 + reflex/reflex.py | 14 +++ reflex/utils/prerequisites.py | 162 ++++++++++++++++++++++++++++++ tests/units/test_prerequisites.py | 161 +++++++++++++++++++++++++++++ 4 files changed, 339 insertions(+) diff --git a/reflex/constants/compiler.py b/reflex/constants/compiler.py index d98c04d76..dc5d80fe0 100644 --- a/reflex/constants/compiler.py +++ b/reflex/constants/compiler.py @@ -28,6 +28,8 @@ class Ext(SimpleNamespace): ZIP = ".zip" # The extension for executable files on Windows. EXE = ".exe" + # The extension for markdown files. + MD = ".md" class CompileVars(SimpleNamespace): diff --git a/reflex/reflex.py b/reflex/reflex.py index 29aef024f..34a4a58a5 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -573,6 +573,20 @@ def deploy( ) +@cli.command() +def rename( + new_name: str = typer.Argument(..., help="The new name for the app."), + loglevel: constants.LogLevel = typer.Option( + config.loglevel, help="The log level to use." + ), +): + """Rename the app in the current directory.""" + from reflex.utils import prerequisites + + prerequisites.validate_app_name(new_name) + prerequisites.rename_app(new_name, loglevel) + + cli.add_typer(db_cli, name="db", help="Subcommands for managing the database schema.") cli.add_typer(script_cli, name="script", help="Subcommands running helper scripts.") cli.add_typer( diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 1f898d1a1..1e33c4b8a 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -7,6 +7,7 @@ import dataclasses import functools import importlib import importlib.metadata +import importlib.util import json import os import platform @@ -463,6 +464,167 @@ def validate_app_name(app_name: str | None = None) -> str: return app_name +def rename_path_up_tree(full_path: str | Path, old_name: str, new_name: str) -> Path: + """Rename all instances of `old_name` in the path (file and directories) to `new_name`. + The renaming stops when we reach the directory containing `rxconfig.py`. + + Args: + full_path: The full path to start renaming from. + old_name: The name to be replaced. + new_name: The replacement name. + + Returns: + The updated path after renaming. + """ + current_path = Path(full_path) + new_path = None + + while True: + directory, base = current_path.parent, current_path.name + # Stop renaming when we reach the root dir (which contains rxconfig.py) + if current_path.is_dir() and (current_path / "rxconfig.py").exists(): + new_path = current_path + break + + if old_name == base.removesuffix(constants.Ext.PY): + new_base = base.replace(old_name, new_name) + new_path = directory / new_base + current_path.rename(new_path) + console.debug(f"Renamed {current_path} -> {new_path}") + current_path = new_path + else: + new_path = current_path + + # Move up the directory tree + current_path = directory + + return new_path + + +def rename_app(new_app_name: str, loglevel: constants.LogLevel): + """Rename the app directory. + + Args: + new_app_name: The new name for the app. + loglevel: The log level to use. + + Raises: + Exit: If the command is not ran in the root dir or the app module cannot be imported. + """ + # Set the log level. + console.set_log_level(loglevel) + + if not constants.Config.FILE.exists(): + console.error( + "No rxconfig.py found. Make sure you are in the root directory of your app." + ) + raise typer.Exit(1) + + sys.path.insert(0, str(Path.cwd())) + + config = get_config() + module_path = importlib.util.find_spec(config.module) + if module_path is None: + console.error(f"Could not find module {config.module}.") + raise typer.Exit(1) + + if not module_path.origin: + console.error(f"Could not find origin for module {config.module}.") + raise typer.Exit(1) + console.info(f"Renaming app directory to {new_app_name}.") + process_directory( + Path.cwd(), + config.app_name, + new_app_name, + exclude_dirs=[constants.Dirs.WEB, constants.Dirs.APP_ASSETS], + ) + + rename_path_up_tree(Path(module_path.origin), config.app_name, new_app_name) + + console.success(f"App directory renamed to [bold]{new_app_name}[/bold].") + + +def rename_imports_and_app_name(file_path: str | Path, old_name: str, new_name: str): + """Rename imports the file using string replacement as well as app_name in rxconfig.py. + + Args: + file_path: The file to process. + old_name: The old name to replace. + new_name: The new name to use. + """ + file_path = Path(file_path) + content = file_path.read_text() + + # Replace `from old_name.` or `from old_name` with `from new_name` + content = re.sub( + rf"\bfrom {re.escape(old_name)}(\b|\.|\s)", + lambda match: f"from {new_name}{match.group(1)}", + content, + ) + + # Replace `import old_name` with `import new_name` + content = re.sub( + rf"\bimport {re.escape(old_name)}\b", + f"import {new_name}", + content, + ) + + # Replace `app_name="old_name"` in rx.Config + content = re.sub( + rf'\bapp_name\s*=\s*["\']{re.escape(old_name)}["\']', + f'app_name="{new_name}"', + content, + ) + + # Replace positional argument `"old_name"` in rx.Config + content = re.sub( + rf'\brx\.Config\(\s*["\']{re.escape(old_name)}["\']', + f'rx.Config("{new_name}"', + content, + ) + + file_path.write_text(content) + + +def process_directory( + directory: str | Path, + old_name: str, + new_name: str, + exclude_dirs: list | None = None, + extensions: list | None = None, +): + """Process files with specified extensions in a directory, excluding specified directories. + + Args: + directory: The root directory to process. + old_name: The old name to replace. + new_name: The new name to use. + exclude_dirs: List of directory names to exclude. Defaults to None. + extensions: List of file extensions to process. + """ + exclude_dirs = exclude_dirs or [] + extensions = extensions or [ + constants.Ext.PY, + constants.Ext.MD, + ] # include .md files, typically used in reflex-web. + extensions_set = {ext.lstrip(".") for ext in extensions} + directory = Path(directory) + + root_exclude_dirs = {directory / exclude_dir for exclude_dir in exclude_dirs} + + files = ( + p.resolve() + for p in directory.glob("**/*") + if p.is_file() and p.suffix.lstrip(".") in extensions_set + ) + + for file_path in files: + if not any( + file_path.is_relative_to(exclude_dir) for exclude_dir in root_exclude_dirs + ): + rename_imports_and_app_name(file_path, old_name, new_name) + + def create_config(app_name: str): """Create a new rxconfig file. diff --git a/tests/units/test_prerequisites.py b/tests/units/test_prerequisites.py index 90afe0963..cf655d6cd 100644 --- a/tests/units/test_prerequisites.py +++ b/tests/units/test_prerequisites.py @@ -1,20 +1,28 @@ import json import re +import shutil import tempfile +from pathlib import Path from unittest.mock import Mock, mock_open import pytest +from typer.testing import CliRunner from reflex import constants from reflex.config import Config +from reflex.reflex import cli +from reflex.testing import chdir from reflex.utils.prerequisites import ( CpuInfo, _update_next_config, cached_procedure, get_cpu_info, initialize_requirements_txt, + rename_imports_and_app_name, ) +runner = CliRunner() + @pytest.mark.parametrize( "config, export, expected_output", @@ -224,3 +232,156 @@ def test_get_cpu_info(): for attr in ("manufacturer_id", "model_name", "address_width"): value = getattr(cpu_info, attr) assert value.strip() if attr != "address_width" else value + + +@pytest.fixture +def temp_directory(): + temp_dir = tempfile.mkdtemp() + yield Path(temp_dir) + shutil.rmtree(temp_dir) + + +@pytest.mark.parametrize( + "config_code,expected", + [ + ("rx.Config(app_name='old_name')", 'rx.Config(app_name="new_name")'), + ('rx.Config(app_name="old_name")', 'rx.Config(app_name="new_name")'), + ("rx.Config('old_name')", 'rx.Config("new_name")'), + ('rx.Config("old_name")', 'rx.Config("new_name")'), + ], +) +def test_rename_imports_and_app_name(temp_directory, config_code, expected): + file_path = temp_directory / "rxconfig.py" + content = f""" +config = {config_code} +""" + file_path.write_text(content) + + rename_imports_and_app_name(file_path, "old_name", "new_name") + + updated_content = file_path.read_text() + expected_content = f""" +config = {expected} +""" + assert updated_content == expected_content + + +def test_regex_edge_cases(temp_directory): + file_path = temp_directory / "example.py" + content = """ +from old_name.module import something +import old_name +from old_name import something_else as alias +from old_name +""" + file_path.write_text(content) + + rename_imports_and_app_name(file_path, "old_name", "new_name") + + updated_content = file_path.read_text() + expected_content = """ +from new_name.module import something +import new_name +from new_name import something_else as alias +from new_name +""" + assert updated_content == expected_content + + +def test_cli_rename_command(temp_directory): + foo_dir = temp_directory / "foo" + foo_dir.mkdir() + (foo_dir / "__init__").touch() + (foo_dir / ".web").mkdir() + (foo_dir / "assets").mkdir() + (foo_dir / "foo").mkdir() + (foo_dir / "foo" / "__init__.py").touch() + (foo_dir / "rxconfig.py").touch() + (foo_dir / "rxconfig.py").write_text( + """ +import reflex as rx + +config = rx.Config( + app_name="foo", +) +""" + ) + (foo_dir / "foo" / "components").mkdir() + (foo_dir / "foo" / "components" / "__init__.py").touch() + (foo_dir / "foo" / "components" / "base.py").touch() + (foo_dir / "foo" / "components" / "views.py").touch() + (foo_dir / "foo" / "components" / "base.py").write_text( + """ +import reflex as rx +from foo.components import views +from foo.components.views import * +from .base import * + +def random_component(): + return rx.fragment() +""" + ) + (foo_dir / "foo" / "foo.py").touch() + (foo_dir / "foo" / "foo.py").write_text( + """ +import reflex as rx +import foo.components.base +from foo.components.base import random_component + +class State(rx.State): + pass + + +def index(): + return rx.text("Hello, World!") + +app = rx.App() +app.add_page(index) +""" + ) + + with chdir(temp_directory / "foo"): + result = runner.invoke(cli, ["rename", "bar"]) + + assert result.exit_code == 0 + assert (foo_dir / "rxconfig.py").read_text() == ( + """ +import reflex as rx + +config = rx.Config( + app_name="bar", +) +""" + ) + assert (foo_dir / "bar").exists() + assert not (foo_dir / "foo").exists() + assert (foo_dir / "bar" / "components" / "base.py").read_text() == ( + """ +import reflex as rx +from bar.components import views +from bar.components.views import * +from .base import * + +def random_component(): + return rx.fragment() +""" + ) + assert (foo_dir / "bar" / "bar.py").exists() + assert not (foo_dir / "bar" / "foo.py").exists() + assert (foo_dir / "bar" / "bar.py").read_text() == ( + """ +import reflex as rx +import bar.components.base +from bar.components.base import random_component + +class State(rx.State): + pass + + +def index(): + return rx.text("Hello, World!") + +app = rx.App() +app.add_page(index) +""" + ) From 6d314d10c58c21673a613c80d25d0f3b25e4b281 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 22 Jan 2025 15:30:11 -0800 Subject: [PATCH 038/144] Fix setting default color mode in dev mode (#4616) * Fix setting default color mode in dev mode Without this, the last_compiled_timestamp local storage never gets set because it's always `null` until it gets set. * test_client_storage: also pop `theme` key from next-themes --- .../components/reflex/radix_themes_color_mode_provider.js | 5 +---- tests/integration/test_client_storage.py | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js b/reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js index dd7886c89..823eeea99 100644 --- a/reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +++ b/reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js @@ -16,10 +16,7 @@ export default function RadixThemesColorModeProvider({ children }) { if (isDevMode) { const lastCompiledTimeInLocalStorage = localStorage.getItem("last_compiled_time"); - if ( - lastCompiledTimeInLocalStorage && - lastCompiledTimeInLocalStorage !== lastCompiledTimeStamp - ) { + if (lastCompiledTimeInLocalStorage !== lastCompiledTimeStamp) { // on app startup, make sure the application color mode is persisted correctly. setTheme(defaultColorMode); localStorage.setItem("last_compiled_time", lastCompiledTimeStamp); diff --git a/tests/integration/test_client_storage.py b/tests/integration/test_client_storage.py index 9273de70f..367409b1b 100644 --- a/tests/integration/test_client_storage.py +++ b/tests/integration/test_client_storage.py @@ -321,6 +321,7 @@ async def test_client_side_state( assert not driver.get_cookies() local_storage_items = local_storage.items() local_storage_items.pop("last_compiled_time", None) + local_storage_items.pop("theme", None) assert not local_storage_items # set some cookies and local storage values @@ -436,6 +437,7 @@ async def test_client_side_state( local_storage_items = local_storage.items() local_storage_items.pop("last_compiled_time", None) + local_storage_items.pop("theme", None) assert local_storage_items.pop(f"{sub_state_name}.l1") == "l1 value" assert local_storage_items.pop(f"{sub_state_name}.l2") == "l2 value" assert local_storage_items.pop("l3") == "l3 value" From 3aaa26c82f48d76a56751f31023684caf2204f9d Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 22 Jan 2025 17:56:41 -0800 Subject: [PATCH 039/144] attempt to upgrade windows latest python version (#4679) * attempt to upgrade windows latest python version * remove that silly one --- .github/workflows/benchmarks.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 13c93bef1..ec8c1409f 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -81,18 +81,18 @@ jobs: matrix: # Show OS combos first in GUI os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.10.16', '3.11.11', '3.12.8'] + python-version: ["3.10.16", "3.11.11", "3.12.8"] exclude: - os: windows-latest - python-version: '3.10.16' + python-version: "3.10.16" # keep only one python version for MacOS - os: macos-latest - python-version: '3.10.16' + python-version: "3.10.16" - os: macos-latest python-version: "3.11.11" include: - os: windows-latest - python-version: '3.10.11' + python-version: "3.10.11" runs-on: ${{ matrix.os }} steps: @@ -155,7 +155,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - + - name: Set up python + id: setup-python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Install Poetry uses: snok/install-poetry@v1 with: From c58db4d0050481005bc6818e9205c129c9e8e3dd Mon Sep 17 00:00:00 2001 From: Ahmad Hakim <84860195+LineIndent@users.noreply.github.com> Date: Thu, 23 Jan 2025 15:52:25 +0200 Subject: [PATCH 040/144] pie chart type annotation fix (#4681) Co-authored-by: pourhakimi <84860195+pourhakimi@users.noreply.github.com> --- reflex/components/recharts/general.py | 4 ++-- reflex/components/recharts/general.pyi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reflex/components/recharts/general.py b/reflex/components/recharts/general.py index 9a5c276b6..4b8c527d3 100644 --- a/reflex/components/recharts/general.py +++ b/reflex/components/recharts/general.py @@ -250,10 +250,10 @@ class Cell(Recharts): alias = "RechartsCell" # The presentation attribute of a rectangle in bar or a sector in pie. - fill: Var[str] + fill: Var[str | Color] # The presentation attribute of a rectangle in bar or a sector in pie. - stroke: Var[str] + stroke: Var[str | Color] responsive_container = ResponsiveContainer.create diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi index eae08a5cc..9c63d6de9 100644 --- a/reflex/components/recharts/general.pyi +++ b/reflex/components/recharts/general.pyi @@ -488,8 +488,8 @@ class Cell(Recharts): def create( # type: ignore cls, *children, - fill: Optional[Union[Var[str], str]] = None, - stroke: Optional[Union[Var[str], str]] = None, + fill: Optional[Union[Color, Var[Union[Color, str]], str]] = None, + stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, From 858a85a4dc904d9fbc52c88374f7122b30a3ce0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Thu, 23 Jan 2025 06:28:56 -0800 Subject: [PATCH 041/144] rename private fields with leading underscore in App (#4642) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rename private fields with leading underscore in App * fix constants API * fix public API for some attributes of App() * fix conflicts properly 🙈 * remove extra private --------- Co-authored-by: Masen Furer Co-authored-by: Khaleel Al-Adhami --- .../test_benchmark_compile_components.py | 6 +- benchmarks/test_benchmark_compile_pages.py | 10 +- reflex/app.py | 145 +++++++++++------- reflex/testing.py | 8 +- tests/integration/test_background_task.py | 4 +- tests/integration/test_call_script.py | 2 +- tests/integration/test_client_storage.py | 2 +- tests/integration/test_component_state.py | 2 +- tests/integration/test_connection_banner.py | 2 +- tests/integration/test_deploy_url.py | 2 +- tests/integration/test_dynamic_routes.py | 2 +- tests/integration/test_event_actions.py | 2 +- tests/integration/test_event_chain.py | 2 +- tests/integration/test_exception_handlers.py | 2 +- tests/integration/test_form_submit.py | 4 +- tests/integration/test_input.py | 2 +- tests/integration/test_login_flow.py | 2 +- tests/integration/test_server_side_event.py | 2 +- tests/integration/test_upload.py | 2 +- tests/integration/test_var_operations.py | 2 +- .../test_datetime_operations.py | 2 +- .../tests_playwright/test_table.py | 2 +- .../middleware/test_hydrate_middleware.py | 2 +- tests/units/test_app.py | 100 ++++++------ tests/units/test_route.py | 4 +- tests/units/test_state.py | 28 ++-- tests/units/test_state_tree.py | 2 +- tests/units/test_testing.py | 2 +- 28 files changed, 191 insertions(+), 156 deletions(-) diff --git a/benchmarks/test_benchmark_compile_components.py b/benchmarks/test_benchmark_compile_components.py index 81d0c2e89..ba7e9c571 100644 --- a/benchmarks/test_benchmark_compile_components.py +++ b/benchmarks/test_benchmark_compile_components.py @@ -122,7 +122,7 @@ def AppWithTenComponentsOnePage(): def index() -> rx.Component: return rx.center(rx.vstack(*render_component(1))) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) @@ -133,7 +133,7 @@ def AppWithHundredComponentOnePage(): def index() -> rx.Component: return rx.center(rx.vstack(*render_component(100))) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) @@ -144,7 +144,7 @@ def AppWithThousandComponentsOnePage(): def index() -> rx.Component: return rx.center(rx.vstack(*render_component(1000))) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) diff --git a/benchmarks/test_benchmark_compile_pages.py b/benchmarks/test_benchmark_compile_pages.py index 292882b74..a5c85810e 100644 --- a/benchmarks/test_benchmark_compile_pages.py +++ b/benchmarks/test_benchmark_compile_pages.py @@ -162,7 +162,7 @@ def AppWithOnePage(): height="100vh", ) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) @@ -170,7 +170,7 @@ def AppWithTenPages(): """A reflex app with 10 pages.""" import reflex as rx - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) render_multiple_pages(app, 10) @@ -178,7 +178,7 @@ def AppWithHundredPages(): """A reflex app with 100 pages.""" import reflex as rx - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) render_multiple_pages(app, 100) @@ -186,7 +186,7 @@ def AppWithThousandPages(): """A reflex app with Thousand pages.""" import reflex as rx - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) render_multiple_pages(app, 1000) @@ -194,7 +194,7 @@ def AppWithTenThousandPages(): """A reflex app with ten thousand pages.""" import reflex as rx - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) render_multiple_pages(app, 10000) diff --git a/reflex/app.py b/reflex/app.py index 7e868e730..f0f4baaa4 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -251,36 +251,36 @@ class App(MiddlewareMixin, LifespanMixin): # Attributes to add to the html root tag of every page. html_custom_attrs: Optional[Dict[str, str]] = None - # A map from a route to an unevaluated page. PRIVATE. - unevaluated_pages: Dict[str, UnevaluatedPage] = dataclasses.field( + # A map from a route to an unevaluated page. + _unevaluated_pages: Dict[str, UnevaluatedPage] = dataclasses.field( default_factory=dict ) - # A map from a page route to the component to render. Users should use `add_page`. PRIVATE. - pages: Dict[str, Component] = dataclasses.field(default_factory=dict) + # A map from a page route to the component to render. Users should use `add_page`. + _pages: Dict[str, Component] = dataclasses.field(default_factory=dict) - # The backend API object. PRIVATE. - api: FastAPI = None # type: ignore + # The backend API object. + _api: FastAPI | None = None - # The state class to use for the app. PRIVATE. - state: Optional[Type[BaseState]] = None + # The state class to use for the app. + _state: Optional[Type[BaseState]] = None # Class to manage many client states. _state_manager: Optional[StateManager] = None - # Mapping from a route to event handlers to trigger when the page loads. PRIVATE. - load_events: Dict[str, List[IndividualEventType[[], Any]]] = dataclasses.field( + # Mapping from a route to event handlers to trigger when the page loads. + _load_events: Dict[str, List[IndividualEventType[[], Any]]] = dataclasses.field( default_factory=dict ) - # Admin dashboard to view and manage the database. PRIVATE. + # Admin dashboard to view and manage the database. admin_dash: Optional[AdminDash] = None - # The async server name space. PRIVATE. - event_namespace: Optional[EventNamespace] = None + # The async server name space. + _event_namespace: Optional[EventNamespace] = None - # Background tasks that are currently running. PRIVATE. - background_tasks: Set[asyncio.Task] = dataclasses.field(default_factory=set) + # Background tasks that are currently running. + _background_tasks: Set[asyncio.Task] = dataclasses.field(default_factory=set) # Frontend Error Handler Function frontend_exception_handler: Callable[[Exception], None] = ( @@ -292,6 +292,24 @@ class App(MiddlewareMixin, LifespanMixin): [Exception], Union[EventSpec, List[EventSpec], None] ] = default_backend_exception_handler + @property + def api(self) -> FastAPI | None: + """Get the backend api. + + Returns: + The backend api. + """ + return self._api + + @property + def event_namespace(self) -> EventNamespace | None: + """Get the event namespace. + + Returns: + The event namespace. + """ + return self._event_namespace + def __post_init__(self): """Initialize the app. @@ -311,7 +329,7 @@ class App(MiddlewareMixin, LifespanMixin): set_breakpoints(self.style.pop("breakpoints")) # Set up the API. - self.api = FastAPI(lifespan=self._run_lifespan_tasks) + self._api = FastAPI(lifespan=self._run_lifespan_tasks) self._add_cors() self._add_default_endpoints() @@ -334,8 +352,8 @@ class App(MiddlewareMixin, LifespanMixin): def _enable_state(self) -> None: """Enable state for the app.""" - if not self.state: - self.state = State + if not self._state: + self._state = State self._setup_state() def _setup_state(self) -> None: @@ -344,13 +362,13 @@ class App(MiddlewareMixin, LifespanMixin): Raises: RuntimeError: If the socket server is invalid. """ - if not self.state: + if not self._state: return config = get_config() # Set up the state manager. - self._state_manager = StateManager.create(state=self.state) + self._state_manager = StateManager.create(state=self._state) # Set up the Socket.IO AsyncServer. if not self.sio: @@ -381,12 +399,13 @@ class App(MiddlewareMixin, LifespanMixin): namespace = config.get_event_namespace() # Create the event namespace and attach the main app. Not related to any paths. - self.event_namespace = EventNamespace(namespace, self) + self._event_namespace = EventNamespace(namespace, self) # Register the event namespace with the socket. self.sio.register_namespace(self.event_namespace) # Mount the socket app with the API. - self.api.mount(str(constants.Endpoint.EVENT), socket_app) + if self.api: + self.api.mount(str(constants.Endpoint.EVENT), socket_app) # Check the exception handlers self._validate_exception_handlers() @@ -397,24 +416,35 @@ class App(MiddlewareMixin, LifespanMixin): Returns: The string representation of the app. """ - return f"" + return f"" def __call__(self) -> FastAPI: """Run the backend api instance. + Raises: + ValueError: If the app has not been initialized. + Returns: The backend api. """ + if not self.api: + raise ValueError("The app has not been initialized.") return self.api def _add_default_endpoints(self): """Add default api endpoints (ping).""" # To test the server. + if not self.api: + return + self.api.get(str(constants.Endpoint.PING))(ping) self.api.get(str(constants.Endpoint.HEALTH))(health) def _add_optional_endpoints(self): """Add optional api endpoints (_upload).""" + if not self.api: + return + if Upload.is_used: # To upload files. self.api.post(str(constants.Endpoint.UPLOAD))(upload(self)) @@ -432,6 +462,8 @@ class App(MiddlewareMixin, LifespanMixin): def _add_cors(self): """Add CORS middleware to the app.""" + if not self.api: + return self.api.add_middleware( cors.CORSMiddleware, allow_credentials=True, @@ -521,13 +553,13 @@ class App(MiddlewareMixin, LifespanMixin): # Check if the route given is valid verify_route_validity(route) - if route in self.unevaluated_pages and environment.RELOAD_CONFIG.is_set(): + if route in self._unevaluated_pages and environment.RELOAD_CONFIG.is_set(): # when the app is reloaded(typically for app harness tests), we should maintain # the latest render function of a route.This applies typically to decorated pages # since they are only added when app._compile is called. - self.unevaluated_pages.pop(route) + self._unevaluated_pages.pop(route) - if route in self.unevaluated_pages: + if route in self._unevaluated_pages: route_name = ( f"`{route}` or `/`" if route == constants.PageNames.INDEX_ROUTE @@ -540,15 +572,15 @@ class App(MiddlewareMixin, LifespanMixin): # Setup dynamic args for the route. # this state assignment is only required for tests using the deprecated state kwarg for App - state = self.state if self.state else State + state = self._state if self._state else State state.setup_dynamic_args(get_route_args(route)) if on_load: - self.load_events[route] = ( + self._load_events[route] = ( on_load if isinstance(on_load, list) else [on_load] ) - self.unevaluated_pages[route] = UnevaluatedPage( + self._unevaluated_pages[route] = UnevaluatedPage( component=component, route=route, title=title, @@ -563,10 +595,10 @@ class App(MiddlewareMixin, LifespanMixin): Args: route: The route of the page to compile. - save_page: If True, the compiled page is saved to self.pages. + save_page: If True, the compiled page is saved to self._pages. """ component, enable_state = compiler.compile_unevaluated_page( - route, self.unevaluated_pages[route], self.state, self.style, self.theme + route, self._unevaluated_pages[route], self._state, self.style, self.theme ) if enable_state: @@ -575,7 +607,7 @@ class App(MiddlewareMixin, LifespanMixin): # Add the page. self._check_routes_conflict(route) if save_page: - self.pages[route] = component + self._pages[route] = component def get_load_events(self, route: str) -> list[IndividualEventType[[], Any]]: """Get the load events for a route. @@ -589,7 +621,7 @@ class App(MiddlewareMixin, LifespanMixin): route = route.lstrip("/") if route == "": route = constants.PageNames.INDEX_ROUTE - return self.load_events.get(route, []) + return self._load_events.get(route, []) def _check_routes_conflict(self, new_route: str): """Verify if there is any conflict between the new route and any existing route. @@ -613,7 +645,7 @@ class App(MiddlewareMixin, LifespanMixin): constants.RouteRegex.SINGLE_CATCHALL_SEGMENT, constants.RouteRegex.DOUBLE_CATCHALL_SEGMENT, ) - for route in self.pages: + for route in self._pages: replaced_route = replace_brackets_with_keywords(route) for rw, r, nr in zip( replaced_route.split("/"), route.split("/"), new_route.split("/") @@ -671,6 +703,9 @@ class App(MiddlewareMixin, LifespanMixin): def _setup_admin_dash(self): """Setup the admin dash.""" # Get the admin dash. + if not self.api: + return + admin_dash = self.admin_dash if admin_dash and admin_dash.models: @@ -775,10 +810,10 @@ class App(MiddlewareMixin, LifespanMixin): def _setup_overlay_component(self): """If a State is not used and no overlay_component is specified, do not render the connection modal.""" - if self.state is None and self.overlay_component is default_overlay_component: + if self._state is None and self.overlay_component is default_overlay_component: self.overlay_component = None - for k, component in self.pages.items(): - self.pages[k] = self._add_overlay_to_component(component) + for k, component in self._pages.items(): + self._pages[k] = self._add_overlay_to_component(component) def _add_error_boundary_to_component(self, component: Component) -> Component: if self.error_boundary is None: @@ -790,14 +825,14 @@ class App(MiddlewareMixin, LifespanMixin): def _setup_error_boundary(self): """If a State is not used and no error_boundary is specified, do not render the error boundary.""" - if self.state is None and self.error_boundary is default_error_boundary: + if self._state is None and self.error_boundary is default_error_boundary: self.error_boundary = None - for k, component in self.pages.items(): + for k, component in self._pages.items(): # Skip the 404 page if k == constants.Page404.SLUG: continue - self.pages[k] = self._add_error_boundary_to_component(component) + self._pages[k] = self._add_error_boundary_to_component(component) def _apply_decorated_pages(self): """Add @rx.page decorated pages to the app. @@ -823,11 +858,11 @@ class App(MiddlewareMixin, LifespanMixin): Raises: VarDependencyError: When a computed var has an invalid dependency. """ - if not self.state: + if not self._state: return if not state: - state = self.state + state = self._state for var in state.computed_vars.values(): if not var._cache: @@ -853,13 +888,13 @@ class App(MiddlewareMixin, LifespanMixin): """ from reflex.utils.exceptions import ReflexRuntimeError - self.pages = {} + self._pages = {} def get_compilation_time() -> str: return str(datetime.now().time()).split(".")[0] # Render a default 404 page if the user didn't supply one - if constants.Page404.SLUG not in self.unevaluated_pages: + if constants.Page404.SLUG not in self._unevaluated_pages: self.add_page(route=constants.Page404.SLUG) # Fix up the style. @@ -877,7 +912,7 @@ class App(MiddlewareMixin, LifespanMixin): should_compile = self._should_compile() - for route in self.unevaluated_pages: + for route in self._unevaluated_pages: console.debug(f"Evaluating page: {route}") self._compile_page(route, save_page=should_compile) @@ -904,7 +939,7 @@ class App(MiddlewareMixin, LifespanMixin): progress.start() task = progress.add_task( f"[{get_compilation_time()}] Compiling:", - total=len(self.pages) + total=len(self._pages) + fixed_pages_within_executor + adhoc_steps_without_executor, ) @@ -923,7 +958,7 @@ class App(MiddlewareMixin, LifespanMixin): # This has to happen before compiling stateful components as that # prevents recursive functions from reaching all components. - for component in self.pages.values(): + for component in self._pages.values(): # Add component._get_all_imports() to all_imports. all_imports.update(component._get_all_imports()) @@ -938,12 +973,12 @@ class App(MiddlewareMixin, LifespanMixin): stateful_components_path, stateful_components_code, page_components, - ) = compiler.compile_stateful_components(self.pages.values()) + ) = compiler.compile_stateful_components(self._pages.values()) progress.advance(task) # Catch "static" apps (that do not define a rx.State subclass) which are trying to access rx.State. - if code_uses_state_contexts(stateful_components_code) and self.state is None: + if code_uses_state_contexts(stateful_components_code) and self._state is None: raise ReflexRuntimeError( "To access rx.State in frontend components, at least one " "subclass of rx.State must be defined in the app." @@ -980,10 +1015,10 @@ class App(MiddlewareMixin, LifespanMixin): max_workers=environment.REFLEX_COMPILE_THREADS.get() or None ) - for route, component in zip(self.pages, page_components): + for route, component in zip(self._pages, page_components): ExecutorSafeFunctions.COMPONENTS[route] = component - ExecutorSafeFunctions.STATE = self.state + ExecutorSafeFunctions.STATE = self._state with executor: result_futures = [] @@ -993,7 +1028,7 @@ class App(MiddlewareMixin, LifespanMixin): result_futures.append(f) # Compile the pre-compiled pages. - for route in self.pages: + for route in self._pages: _submit_work( ExecutorSafeFunctions.compile_page, route, @@ -1028,7 +1063,7 @@ class App(MiddlewareMixin, LifespanMixin): # Compile the contexts. compile_results.append( - compiler.compile_contexts(self.state, self.theme), + compiler.compile_contexts(self._state, self.theme), ) if self.theme is not None: # Fix #2992 by removing the top-level appearance prop @@ -1150,9 +1185,9 @@ class App(MiddlewareMixin, LifespanMixin): ) task = asyncio.create_task(_coro()) - self.background_tasks.add(task) + self._background_tasks.add(task) # Clean up task from background_tasks set when complete. - task.add_done_callback(self.background_tasks.discard) + task.add_done_callback(self._background_tasks.discard) return task def _validate_exception_handlers(self): diff --git a/reflex/testing.py b/reflex/testing.py index 00b29a1df..ec8b80f66 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -296,7 +296,7 @@ class AppHarness: self.app_instance = self.app_module.app if isinstance(self.app_instance._state_manager, StateManagerRedis): # Create our own redis connection for testing. - self.state_manager = StateManagerRedis.create(self.app_instance.state) + self.state_manager = StateManagerRedis.create(self.app_instance._state) else: self.state_manager = self.app_instance._state_manager @@ -324,7 +324,7 @@ class AppHarness: return _shutdown_redis def _start_backend(self, port=0): - if self.app_instance is None: + if self.app_instance is None or self.app_instance.api is None: raise RuntimeError("App was not initialized.") self.backend = uvicorn.Server( uvicorn.Config( @@ -353,12 +353,12 @@ class AppHarness: self.app_instance.state_manager, StateManagerRedis, ) - and self.app_instance.state is not None + and self.app_instance._state is not None ): with contextlib.suppress(RuntimeError): await self.app_instance.state_manager.close() self.app_instance._state_manager = StateManagerRedis.create( - state=self.app_instance.state, + state=self.app_instance._state, ) if not isinstance(self.app_instance.state_manager, StateManagerRedis): raise RuntimeError("Failed to reset state manager.") diff --git a/tests/integration/test_background_task.py b/tests/integration/test_background_task.py index d7fe20824..cb8fda019 100644 --- a/tests/integration/test_background_task.py +++ b/tests/integration/test_background_task.py @@ -172,7 +172,7 @@ def BackgroundTask(): rx.button("Reset", on_click=State.reset_counter, id="reset"), ) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) @@ -288,7 +288,7 @@ def test_background_task( assert background_task._poll_for(lambda: counter.text == "620", timeout=40) # all tasks should have exited and cleaned up assert background_task._poll_for( - lambda: not background_task.app_instance.background_tasks # type: ignore + lambda: not background_task.app_instance._background_tasks # type: ignore ) diff --git a/tests/integration/test_call_script.py b/tests/integration/test_call_script.py index be0bafdbb..f57dd2850 100644 --- a/tests/integration/test_call_script.py +++ b/tests/integration/test_call_script.py @@ -188,7 +188,7 @@ def CallScript(): yield rx.call_script("inline_counter = 0; external_counter = 0") self.reset() - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) Path("assets/external.js").write_text(external_scripts) @app.add_page diff --git a/tests/integration/test_client_storage.py b/tests/integration/test_client_storage.py index 367409b1b..3618c779d 100644 --- a/tests/integration/test_client_storage.py +++ b/tests/integration/test_client_storage.py @@ -127,7 +127,7 @@ def ClientSide(): rx.box(ClientSideSubSubState.s1s, id="s1s"), ) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) app.add_page(index, route="/foo") diff --git a/tests/integration/test_component_state.py b/tests/integration/test_component_state.py index 97624e7c5..381c1d23a 100644 --- a/tests/integration/test_component_state.py +++ b/tests/integration/test_component_state.py @@ -72,7 +72,7 @@ def ComponentStateApp(): State=_Counter, ) - app = rx.App(state=rx.State) # noqa + app = rx.App(_state=rx.State) # noqa @rx.page() def index(): diff --git a/tests/integration/test_connection_banner.py b/tests/integration/test_connection_banner.py index 18259fe3f..c2a912af6 100644 --- a/tests/integration/test_connection_banner.py +++ b/tests/integration/test_connection_banner.py @@ -36,7 +36,7 @@ def ConnectionBanner(): rx.button("Delay", id="delay", on_click=State.delay), ) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) diff --git a/tests/integration/test_deploy_url.py b/tests/integration/test_deploy_url.py index 5c840d24d..8b5776260 100644 --- a/tests/integration/test_deploy_url.py +++ b/tests/integration/test_deploy_url.py @@ -26,7 +26,7 @@ def DeployUrlSample() -> None: rx.button("GOTO SELF", on_click=State.goto_self, id="goto_self") ) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) diff --git a/tests/integration/test_dynamic_routes.py b/tests/integration/test_dynamic_routes.py index c210bde69..9032fd84c 100644 --- a/tests/integration/test_dynamic_routes.py +++ b/tests/integration/test_dynamic_routes.py @@ -138,7 +138,7 @@ def DynamicRoute(): def redirect_page(): return rx.fragment(rx.text("redirecting...")) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index, route="/page/[page_id]", on_load=DynamicState.on_load) # type: ignore app.add_page(index, route="/static/x", on_load=DynamicState.on_load) # type: ignore app.add_page(index) diff --git a/tests/integration/test_event_actions.py b/tests/integration/test_event_actions.py index 15f3c9877..cc8e97b09 100644 --- a/tests/integration/test_event_actions.py +++ b/tests/integration/test_event_actions.py @@ -156,7 +156,7 @@ def TestEventAction(): on_click=EventActionState.on_click("outer"), # type: ignore ) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) diff --git a/tests/integration/test_event_chain.py b/tests/integration/test_event_chain.py index c4121ee94..5a933253a 100644 --- a/tests/integration/test_event_chain.py +++ b/tests/integration/test_event_chain.py @@ -144,7 +144,7 @@ def EventChain(): time.sleep(0.5) self.interim_value = "final" - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) token_input = rx.input( value=State.router.session.client_token, is_read_only=True, id="token" diff --git a/tests/integration/test_exception_handlers.py b/tests/integration/test_exception_handlers.py index a645d1de6..4d15bbf01 100644 --- a/tests/integration/test_exception_handlers.py +++ b/tests/integration/test_exception_handlers.py @@ -39,7 +39,7 @@ def TestApp(): """ print(1 / number) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) @app.add_page def index(): diff --git a/tests/integration/test_form_submit.py b/tests/integration/test_form_submit.py index ea8750595..bdf54173c 100644 --- a/tests/integration/test_form_submit.py +++ b/tests/integration/test_form_submit.py @@ -30,7 +30,7 @@ def FormSubmit(form_component): def form_submit(self, form_data: Dict): self.form_data = form_data - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) @app.add_page def index(): @@ -90,7 +90,7 @@ def FormSubmitName(form_component): def form_submit(self, form_data: Dict): self.form_data = form_data - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) @app.add_page def index(): diff --git a/tests/integration/test_input.py b/tests/integration/test_input.py index e9fec7dc1..bddeca45f 100644 --- a/tests/integration/test_input.py +++ b/tests/integration/test_input.py @@ -16,7 +16,7 @@ def FullyControlledInput(): class State(rx.State): text: str = "initial" - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) @app.add_page def index(): diff --git a/tests/integration/test_login_flow.py b/tests/integration/test_login_flow.py index 1938672a3..7eb46ab39 100644 --- a/tests/integration/test_login_flow.py +++ b/tests/integration/test_login_flow.py @@ -45,7 +45,7 @@ def LoginSample(): rx.button("Do it", on_click=State.login, id="doit"), ) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) app.add_page(login) diff --git a/tests/integration/test_server_side_event.py b/tests/integration/test_server_side_event.py index f04cc3beb..3050a4e36 100644 --- a/tests/integration/test_server_side_event.py +++ b/tests/integration/test_server_side_event.py @@ -38,7 +38,7 @@ def ServerSideEvent(): def set_value_return_c(self): return rx.set_value("c", "") - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) @app.add_page def index(): diff --git a/tests/integration/test_upload.py b/tests/integration/test_upload.py index 0331c15d6..07c3997b4 100644 --- a/tests/integration/test_upload.py +++ b/tests/integration/test_upload.py @@ -166,7 +166,7 @@ def UploadFile(): rx.text(UploadState.event_order.to_string(), id="event-order"), ) - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) app.add_page(index) diff --git a/tests/integration/test_var_operations.py b/tests/integration/test_var_operations.py index 7a7c8328d..86d68340a 100644 --- a/tests/integration/test_var_operations.py +++ b/tests/integration/test_var_operations.py @@ -39,7 +39,7 @@ def VarOperations(): dict2: Dict[int, int] = {3: 4} html_str: str = "
hello
" - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) @rx.memo def memo_comp(list1: List[int], int_var1: int, id: str): diff --git a/tests/integration/tests_playwright/test_datetime_operations.py b/tests/integration/tests_playwright/test_datetime_operations.py index fafd15c42..5e4506776 100644 --- a/tests/integration/tests_playwright/test_datetime_operations.py +++ b/tests/integration/tests_playwright/test_datetime_operations.py @@ -16,7 +16,7 @@ def DatetimeOperationsApp(): date2: datetime = datetime(2031, 1, 1) date3: datetime = datetime(2021, 1, 1) - app = rx.App(state=DtOperationsState) + app = rx.App(_state=DtOperationsState) @app.add_page def index(): diff --git a/tests/integration/tests_playwright/test_table.py b/tests/integration/tests_playwright/test_table.py index db716aa5b..bd399a840 100644 --- a/tests/integration/tests_playwright/test_table.py +++ b/tests/integration/tests_playwright/test_table.py @@ -20,7 +20,7 @@ def Table(): """App using table component.""" import reflex as rx - app = rx.App(state=rx.State) + app = rx.App(_state=rx.State) @app.add_page def index(): diff --git a/tests/units/middleware/test_hydrate_middleware.py b/tests/units/middleware/test_hydrate_middleware.py index 9ee8d8d25..7b02f8515 100644 --- a/tests/units/middleware/test_hydrate_middleware.py +++ b/tests/units/middleware/test_hydrate_middleware.py @@ -41,7 +41,7 @@ async def test_preprocess_no_events(hydrate_middleware, event1, mocker): mocker.patch("reflex.state.State.class_subclasses", {TestState}) state = State() update = await hydrate_middleware.preprocess( - app=App(state=State), + app=App(_state=State), event=event1, state=state, ) diff --git a/tests/units/test_app.py b/tests/units/test_app.py index f805f83ec..80e0be5fd 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -236,14 +236,14 @@ def test_add_page_default_route(app: App, index_page, about_page): index_page: The index page. about_page: The about page. """ - assert app.pages == {} - assert app.unevaluated_pages == {} + assert app._pages == {} + assert app._unevaluated_pages == {} app.add_page(index_page) app._compile_page("index") - assert app.pages.keys() == {"index"} + assert app._pages.keys() == {"index"} app.add_page(about_page) app._compile_page("about") - assert app.pages.keys() == {"index", "about"} + assert app._pages.keys() == {"index", "about"} def test_add_page_set_route(app: App, index_page, windows_platform: bool): @@ -255,10 +255,10 @@ def test_add_page_set_route(app: App, index_page, windows_platform: bool): windows_platform: Whether the system is windows. """ route = "test" if windows_platform else "/test" - assert app.unevaluated_pages == {} + assert app._unevaluated_pages == {} app.add_page(index_page, route=route) app._compile_page("test") - assert app.pages.keys() == {"test"} + assert app._pages.keys() == {"test"} def test_add_page_set_route_dynamic(index_page, windows_platform: bool): @@ -268,18 +268,18 @@ def test_add_page_set_route_dynamic(index_page, windows_platform: bool): index_page: The index page. windows_platform: Whether the system is windows. """ - app = App(state=EmptyState) - assert app.state is not None + app = App(_state=EmptyState) + assert app._state is not None route = "/test/[dynamic]" - assert app.unevaluated_pages == {} + assert app._unevaluated_pages == {} app.add_page(index_page, route=route) app._compile_page("test/[dynamic]") - assert app.pages.keys() == {"test/[dynamic]"} - assert "dynamic" in app.state.computed_vars - assert app.state.computed_vars["dynamic"]._deps(objclass=EmptyState) == { + assert app._pages.keys() == {"test/[dynamic]"} + assert "dynamic" in app._state.computed_vars + assert app._state.computed_vars["dynamic"]._deps(objclass=EmptyState) == { constants.ROUTER } - assert constants.ROUTER in app.state()._computed_var_dependencies + assert constants.ROUTER in app._state()._computed_var_dependencies def test_add_page_set_route_nested(app: App, index_page, windows_platform: bool): @@ -291,9 +291,9 @@ def test_add_page_set_route_nested(app: App, index_page, windows_platform: bool) windows_platform: Whether the system is windows. """ route = "test\\nested" if windows_platform else "/test/nested" - assert app.unevaluated_pages == {} + assert app._unevaluated_pages == {} app.add_page(index_page, route=route) - assert app.unevaluated_pages.keys() == {route.strip(os.path.sep)} + assert app._unevaluated_pages.keys() == {route.strip(os.path.sep)} def test_add_page_invalid_api_route(app: App, index_page): @@ -413,8 +413,8 @@ async def test_initialize_with_state(test_state: Type[ATestState], token: str): test_state: The default state. token: a Token. """ - app = App(state=test_state) - assert app.state == test_state + app = App(_state=test_state) + assert app._state == test_state # Get a state for a given token. state = await app.state_manager.get_state(_substate_key(token, test_state)) @@ -432,7 +432,7 @@ async def test_set_and_get_state(test_state): Args: test_state: The default state. """ - app = App(state=test_state) + app = App(_state=test_state) # Create two tokens. token1 = str(uuid.uuid4()) + f"_{test_state.get_full_name()}" @@ -827,7 +827,7 @@ async def test_upload_file_without_annotation(state, tmp_path, token): token: a Token. """ state._tmp_path = tmp_path - app = App(state=State) + app = App(_state=State) request_mock = unittest.mock.Mock() request_mock.headers = { @@ -861,7 +861,7 @@ async def test_upload_file_background(state, tmp_path, token): token: a Token. """ state._tmp_path = tmp_path - app = App(state=State) + app = App(_state=State) request_mock = unittest.mock.Mock() request_mock.headers = { @@ -938,8 +938,8 @@ def test_dynamic_arg_shadow( """ arg_name = "counter" route = f"/test/[{arg_name}]" - app = app_module_mock.app = App(state=DynamicState) - assert app.state is not None + app = app_module_mock.app = App(_state=DynamicState) + assert app._state is not None with pytest.raises(NameError): app.add_page(index_page, route=route, on_load=DynamicState.on_load) # type: ignore @@ -963,7 +963,7 @@ def test_multiple_dynamic_args( arg_name = "my_arg" route = f"/test/[{arg_name}]" route2 = f"/test2/[{arg_name}]" - app = app_module_mock.app = App(state=EmptyState) + app = app_module_mock.app = App(_state=EmptyState) app.add_page(index_page, route=route) app.add_page(index_page, route=route2) @@ -990,16 +990,16 @@ async def test_dynamic_route_var_route_change_completed_on_load( """ arg_name = "dynamic" route = f"/test/[{arg_name}]" - app = app_module_mock.app = App(state=DynamicState) - assert app.state is not None - assert arg_name not in app.state.vars + app = app_module_mock.app = App(_state=DynamicState) + assert app._state is not None + assert arg_name not in app._state.vars app.add_page(index_page, route=route, on_load=DynamicState.on_load) # type: ignore - assert arg_name in app.state.vars - assert arg_name in app.state.computed_vars - assert app.state.computed_vars[arg_name]._deps(objclass=DynamicState) == { + assert arg_name in app._state.vars + assert arg_name in app._state.computed_vars + assert app._state.computed_vars[arg_name]._deps(objclass=DynamicState) == { constants.ROUTER } - assert constants.ROUTER in app.state()._computed_var_dependencies + assert constants.ROUTER in app._state()._computed_var_dependencies substate_token = _substate_key(token, DynamicState) sid = "mock_sid" @@ -1174,7 +1174,7 @@ async def test_process_events(mocker, token: str): "headers": {}, "ip": "127.0.0.1", } - app = App(state=GenState) + app = App(_state=GenState) mocker.patch.object(app, "_postprocess", AsyncMock()) event = Event( @@ -1220,7 +1220,7 @@ def test_overlay_component( overlay_component: The overlay_component to pass to App. exp_page_child: The type of the expected child in the page fragment. """ - app = App(state=state, overlay_component=overlay_component) + app = App(_state=state, overlay_component=overlay_component) app._setup_overlay_component() if exp_page_child is None: assert app.overlay_component is None @@ -1243,7 +1243,7 @@ def test_overlay_component( # overlay components are wrapped during compile only app._compile_page("test") app._setup_overlay_component() - page = app.pages["test"] + page = app._pages["test"] if exp_page_child is not None: assert len(page.children) == 3 @@ -1361,52 +1361,52 @@ def test_app_wrap_priority(compilable_app: tuple[App, Path]): def test_app_state_determination(): """Test that the stateless status of an app is determined correctly.""" a1 = App() - assert a1.state is None + assert a1._state is None # No state, no router, no event handlers. a1.add_page(rx.box("Index"), route="/") - assert a1.state is None + assert a1._state is None # Add a page with `on_load` enables state. a1.add_page(rx.box("About"), route="/about", on_load=rx.console_log("")) a1._compile_page("about") - assert a1.state is not None + assert a1._state is not None a2 = App() - assert a2.state is None + assert a2._state is None # Referencing a state Var enables state. a2.add_page(rx.box(rx.text(GenState.value)), route="/") a2._compile_page("index") - assert a2.state is not None + assert a2._state is not None a3 = App() - assert a3.state is None + assert a3._state is None # Referencing router enables state. a3.add_page(rx.box(rx.text(State.router.page.full_path)), route="/") a3._compile_page("index") - assert a3.state is not None + assert a3._state is not None a4 = App() - assert a4.state is None + assert a4._state is None a4.add_page(rx.box(rx.button("Click", on_click=rx.console_log(""))), route="/") - assert a4.state is None + assert a4._state is None a4.add_page( rx.box(rx.button("Click", on_click=DynamicState.on_counter)), route="/page2" ) a4._compile_page("page2") - assert a4.state is not None + assert a4._state is not None def test_raise_on_state(): """Test that the state is set.""" # state kwargs is deprecated, we just make sure the app is created anyway. - _app = App(state=State) - assert _app.state is not None - assert issubclass(_app.state, State) + _app = App(_state=State) + assert _app._state is not None + assert issubclass(_app._state, State) def test_call_app(): @@ -1473,7 +1473,7 @@ def test_add_page_component_returning_tuple(): app._compile_page("index") app._compile_page("page2") - fragment_wrapper = app.pages["index"].children[0] + fragment_wrapper = app._pages["index"].children[0] assert isinstance(fragment_wrapper, Fragment) first_text = fragment_wrapper.children[0] assert isinstance(first_text, Text) @@ -1483,7 +1483,7 @@ def test_add_page_component_returning_tuple(): assert str(second_text.children[0].contents) == '"second"' # type: ignore # Test page with trailing comma. - page2_fragment_wrapper = app.pages["page2"].children[0] + page2_fragment_wrapper = app._pages["page2"].children[0] assert isinstance(page2_fragment_wrapper, Fragment) third_text = page2_fragment_wrapper.children[0] assert isinstance(third_text, Text) @@ -1557,7 +1557,7 @@ def test_app_with_valid_var_dependencies(compilable_app: tuple[App, Path]): def bar(self) -> str: return "bar" - app.state = ValidDepState + app._state = ValidDepState app._compile() @@ -1569,7 +1569,7 @@ def test_app_with_invalid_var_dependencies(compilable_app: tuple[App, Path]): def bar(self) -> str: return "bar" - app.state = InvalidDepState + app._state = InvalidDepState with pytest.raises(exceptions.VarDependencyError): app._compile() diff --git a/tests/units/test_route.py b/tests/units/test_route.py index 851c9cf35..62f1788d3 100644 --- a/tests/units/test_route.py +++ b/tests/units/test_route.py @@ -89,7 +89,7 @@ def app(): ], ) def test_check_routes_conflict_invalid(mocker, app, route1, route2): - mocker.patch.object(app, "pages", {route1: []}) + mocker.patch.object(app, "_pages", {route1: []}) with pytest.raises(ValueError): app._check_routes_conflict(route2) @@ -117,6 +117,6 @@ def test_check_routes_conflict_invalid(mocker, app, route1, route2): ], ) def test_check_routes_conflict_valid(mocker, app, route1, route2): - mocker.patch.object(app, "pages", {route1: []}) + mocker.patch.object(app, "_pages", {route1: []}) # test that running this does not throw an error. app._check_routes_conflict(route2) diff --git a/tests/units/test_state.py b/tests/units/test_state.py index b1e73a1f0..dfb068626 100644 --- a/tests/units/test_state.py +++ b/tests/units/test_state.py @@ -1907,12 +1907,12 @@ def mock_app_simple(monkeypatch) -> rx.App: Returns: The app, after mocking out prerequisites.get_app() """ - app = App(state=TestState) + app = App(_state=TestState) app_module = Mock() setattr(app_module, CompileVars.APP, app) - app.state = TestState + app._state = TestState app.event_namespace.emit = CopyingAsyncMock() # type: ignore def _mock_get_app(*args, **kwargs): @@ -2153,7 +2153,7 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): token: A token. """ router_data = {"query": {}} - mock_app.state_manager.state = mock_app.state = BackgroundTaskState + mock_app.state_manager.state = mock_app._state = BackgroundTaskState async for update in rx.app.process( # type: ignore mock_app, Event( @@ -2171,7 +2171,7 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): # wait for the coroutine to start await asyncio.sleep(0.5 if CI else 0.1) - assert len(mock_app.background_tasks) == 1 + assert len(mock_app._background_tasks) == 1 # Process another normal event async for update in rx.app.process( # type: ignore @@ -2203,9 +2203,9 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): ) # Explicit wait for background tasks - for task in tuple(mock_app.background_tasks): + for task in tuple(mock_app._background_tasks): await task - assert not mock_app.background_tasks + assert not mock_app._background_tasks exp_order = [ "background_task:start", @@ -2280,7 +2280,7 @@ async def test_background_task_reset(mock_app: rx.App, token: str): token: A token. """ router_data = {"query": {}} - mock_app.state_manager.state = mock_app.state = BackgroundTaskState + mock_app.state_manager.state = mock_app._state = BackgroundTaskState async for update in rx.app.process( # type: ignore mock_app, Event( @@ -2297,9 +2297,9 @@ async def test_background_task_reset(mock_app: rx.App, token: str): assert update == StateUpdate() # Explicit wait for background tasks - for task in tuple(mock_app.background_tasks): + for task in tuple(mock_app._background_tasks): await task - assert not mock_app.background_tasks + assert not mock_app._background_tasks assert ( await mock_app.state_manager.get_state( @@ -2884,7 +2884,7 @@ async def test_preprocess(app_module_mock, token, test_state, expected, mocker): "reflex.state.State.class_subclasses", {test_state, OnLoadInternalState} ) app = app_module_mock.app = App( - state=State, load_events={"index": [test_state.test_handler]} + _state=State, _load_events={"index": [test_state.test_handler]} ) async with app.state_manager.modify_state(_substate_key(token, State)) as state: state.router_data = {"simulate": "hydrate"} @@ -2931,8 +2931,8 @@ async def test_preprocess_multiple_load_events(app_module_mock, token, mocker): "reflex.state.State.class_subclasses", {OnLoadState, OnLoadInternalState} ) app = app_module_mock.app = App( - state=State, - load_events={"index": [OnLoadState.test_handler, OnLoadState.test_handler]}, + _state=State, + _load_events={"index": [OnLoadState.test_handler, OnLoadState.test_handler]}, ) async with app.state_manager.modify_state(_substate_key(token, State)) as state: state.router_data = {"simulate": "hydrate"} @@ -2977,7 +2977,7 @@ async def test_get_state(mock_app: rx.App, token: str): mock_app: An app that will be returned by `get_app()` token: A token. """ - mock_app.state_manager.state = mock_app.state = TestState + mock_app.state_manager.state = mock_app._state = TestState # Get instance of ChildState2. test_state = await mock_app.state_manager.get_state( @@ -3147,7 +3147,7 @@ async def test_get_state_from_sibling_not_cached(mock_app: rx.App, token: str): pass - mock_app.state_manager.state = mock_app.state = Parent + mock_app.state_manager.state = mock_app._state = Parent # Get the top level state via unconnected sibling. root = await mock_app.state_manager.get_state(_substate_key(token, Child)) diff --git a/tests/units/test_state_tree.py b/tests/units/test_state_tree.py index 6fe828819..70ef71cb8 100644 --- a/tests/units/test_state_tree.py +++ b/tests/units/test_state_tree.py @@ -222,7 +222,7 @@ async def state_manager_redis( Yields: A state manager instance """ - app_module_mock.app = rx.App(state=Root) + app_module_mock.app = rx.App(_state=Root) state_manager = app_module_mock.app.state_manager if not isinstance(state_manager, StateManagerRedis): diff --git a/tests/units/test_testing.py b/tests/units/test_testing.py index 83a03ad83..8c8f1461b 100644 --- a/tests/units/test_testing.py +++ b/tests/units/test_testing.py @@ -23,7 +23,7 @@ def test_app_harness(tmp_path): class State(rx.State): pass - app = rx.App(state=State) + app = rx.App(_state=State) app.add_page(lambda: rx.text("Basic App"), route="/", title="index") app._compile() From 7f1aee6dc8a9359eb86d55634cd35082bc9655f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Thu, 23 Jan 2025 06:29:17 -0800 Subject: [PATCH 042/144] enable N rules for naming conventions (#4666) * enable N rules for naming conventions * fix pyi * address comments * remove unneeded code --- benchmarks/benchmark_package_size.py | 2 +- pyproject.toml | 9 ++-- reflex/app.py | 8 ++-- reflex/app_mixins/lifespan.py | 6 +-- reflex/components/core/html.py | 2 +- reflex/components/dynamic.py | 8 ++-- reflex/components/next/image.py | 16 +++++-- reflex/components/next/image.pyi | 6 ++- .../components/radix/primitives/accordion.py | 8 ++-- reflex/components/radix/primitives/drawer.py | 2 +- reflex/components/radix/primitives/drawer.pyi | 8 ++-- .../radix/themes/components/icon_button.py | 4 +- .../radix/themes/components/icon_button.pyi | 1 + .../radix/themes/components/tooltip.py | 4 +- .../radix/themes/components/tooltip.pyi | 1 + reflex/components/recharts/polar.py | 2 +- reflex/components/recharts/recharts.py | 4 +- reflex/config.py | 8 ++-- reflex/event.py | 8 ++-- reflex/experimental/hooks.py | 8 ++-- reflex/experimental/layout.pyi | 2 +- reflex/state.py | 47 +++++++++---------- reflex/testing.py | 2 +- reflex/utils/codespaces.py | 5 +- reflex/utils/exceptions.py | 20 ++++---- reflex/utils/exec.py | 8 ++-- reflex/utils/prerequisites.py | 6 +-- reflex/vars/base.py | 2 +- reflex/vars/number.py | 6 +-- tests/units/conftest.py | 31 +----------- tests/units/test_var.py | 4 +- 31 files changed, 118 insertions(+), 130 deletions(-) diff --git a/benchmarks/benchmark_package_size.py b/benchmarks/benchmark_package_size.py index 6a0c37821..778b52769 100644 --- a/benchmarks/benchmark_package_size.py +++ b/benchmarks/benchmark_package_size.py @@ -21,7 +21,7 @@ def get_package_size(venv_path: Path, os_name): ValueError: when venv does not exist or python version is None. """ python_version = get_python_version(venv_path, os_name) - print("Python version:", python_version) # noqa: T201 + print("Python version:", python_version) if python_version is None: raise ValueError("Error: Failed to determine Python version.") diff --git a/pyproject.toml b/pyproject.toml index 160cfc535..03580cd0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,15 +85,18 @@ build-backend = "poetry.core.masonry.api" target-version = "py39" output-format = "concise" lint.isort.split-on-trailing-comma = false -lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "PERF", "PTH", "RUF", "SIM", "T", "TRY", "W"] +lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PTH", "RUF", "SIM", "T", "TRY", "W"] lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF012", "TRY0"] lint.pydocstyle.convention = "google" [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] -"tests/*.py" = ["D100", "D103", "D104", "B018", "PERF", "T"] +"tests/*.py" = ["D100", "D103", "D104", "B018", "PERF", "T", "N"] +"benchmarks/*.py" = ["D100", "D103", "D104", "B018", "PERF", "T", "N"] "reflex/.templates/*.py" = ["D100", "D103", "D104"] -"*.pyi" = ["D301", "D415", "D417", "D418", "E742"] +"*.pyi" = ["D301", "D415", "D417", "D418", "E742", "N"] +"pyi_generator.py" = ["N802"] +"reflex/constants/*.py" = ["N"] "*/blank.py" = ["I001"] [tool.pytest.ini_options] diff --git a/reflex/app.py b/reflex/app.py index f0f4baaa4..5ee424719 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -1197,11 +1197,11 @@ class App(MiddlewareMixin, LifespanMixin): ValueError: If the custom exception handlers are invalid. """ - FRONTEND_ARG_SPEC = { + frontend_arg_spec = { "exception": Exception, } - BACKEND_ARG_SPEC = { + backend_arg_spec = { "exception": Exception, } @@ -1209,8 +1209,8 @@ class App(MiddlewareMixin, LifespanMixin): ["frontend", "backend"], [self.frontend_exception_handler, self.backend_exception_handler], [ - FRONTEND_ARG_SPEC, - BACKEND_ARG_SPEC, + frontend_arg_spec, + backend_arg_spec, ], ): if hasattr(handler_fn, "__name__"): diff --git a/reflex/app_mixins/lifespan.py b/reflex/app_mixins/lifespan.py index 52bf0be1d..9403e0f35 100644 --- a/reflex/app_mixins/lifespan.py +++ b/reflex/app_mixins/lifespan.py @@ -12,7 +12,7 @@ from typing import Callable, Coroutine, Set, Union from fastapi import FastAPI from reflex.utils import console -from reflex.utils.exceptions import InvalidLifespanTaskType +from reflex.utils.exceptions import InvalidLifespanTaskTypeError from .mixin import AppMixin @@ -64,10 +64,10 @@ class LifespanMixin(AppMixin): task_kwargs: The kwargs of the task. Raises: - InvalidLifespanTaskType: If the task is a generator function. + InvalidLifespanTaskTypeError: If the task is a generator function. """ if inspect.isgeneratorfunction(task) or inspect.isasyncgenfunction(task): - raise InvalidLifespanTaskType( + raise InvalidLifespanTaskTypeError( f"Task {task.__name__} of type generator must be decorated with contextlib.asynccontextmanager." ) diff --git a/reflex/components/core/html.py b/reflex/components/core/html.py index cfe46e591..2cad4f331 100644 --- a/reflex/components/core/html.py +++ b/reflex/components/core/html.py @@ -14,7 +14,7 @@ class Html(Div): """ # The HTML to render. - dangerouslySetInnerHTML: Var[Dict[str, str]] + dangerouslySetInnerHTML: Var[Dict[str, str]] # noqa: N815 @classmethod def create(cls, *children, **props): diff --git a/reflex/components/dynamic.py b/reflex/components/dynamic.py index 806d610df..d4efcd293 100644 --- a/reflex/components/dynamic.py +++ b/reflex/components/dynamic.py @@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Union from reflex import constants from reflex.utils import imports -from reflex.utils.exceptions import DynamicComponentMissingLibrary +from reflex.utils.exceptions import DynamicComponentMissingLibraryError from reflex.utils.format import format_library_name from reflex.utils.serializers import serializer from reflex.vars import Var, get_unique_variable_name @@ -36,13 +36,15 @@ def bundle_library(component: Union["Component", str]): component: The component to bundle the library with. Raises: - DynamicComponentMissingLibrary: Raised when a dynamic component is missing a library. + DynamicComponentMissingLibraryError: Raised when a dynamic component is missing a library. """ if isinstance(component, str): bundled_libraries.add(component) return if component.library is None: - raise DynamicComponentMissingLibrary("Component must have a library to bundle.") + raise DynamicComponentMissingLibraryError( + "Component must have a library to bundle." + ) bundled_libraries.add(format_library_name(component.library)) diff --git a/reflex/components/next/image.py b/reflex/components/next/image.py index 2011505d8..00821ddaf 100644 --- a/reflex/components/next/image.py +++ b/reflex/components/next/image.py @@ -3,11 +3,13 @@ from typing import Any, Literal, Optional, Union from reflex.event import EventHandler, no_args_event_spec -from reflex.utils import types +from reflex.utils import console, types from reflex.vars.base import Var from .base import NextComponent +DEFAULT_W_H = "100%" + class Image(NextComponent): """Display an image.""" @@ -53,7 +55,7 @@ class Image(NextComponent): loading: Var[Literal["lazy", "eager"]] # A Data URL to be used as a placeholder image before the src image successfully loads. Only takes effect when combined with placeholder="blur". - blurDataURL: Var[str] + blur_data_url: Var[str] # Fires when the image has loaded. on_load: EventHandler[no_args_event_spec] @@ -80,8 +82,16 @@ class Image(NextComponent): Returns: _type_: _description_ """ + if "blurDataURL" in props: + console.deprecate( + feature_name="blurDataURL", + reason="Use blur_data_url instead", + deprecation_version="0.7.0", + removal_version="0.8.0", + ) + props["blur_data_url"] = props.pop("blurDataURL") + style = props.get("style", {}) - DEFAULT_W_H = "100%" def check_prop_type(prop_name, prop_value): if types.check_prop_in_allowed_types(prop_value, allowed_types=[int]): diff --git a/reflex/components/next/image.pyi b/reflex/components/next/image.pyi index dd9dd38c3..b8da4973d 100644 --- a/reflex/components/next/image.pyi +++ b/reflex/components/next/image.pyi @@ -11,6 +11,8 @@ from reflex.vars.base import Var from .base import NextComponent +DEFAULT_W_H = "100%" + class Image(NextComponent): @overload @classmethod @@ -30,7 +32,7 @@ class Image(NextComponent): loading: Optional[ Union[Literal["eager", "lazy"], Var[Literal["eager", "lazy"]]] ] = None, - blurDataURL: Optional[Union[Var[str], str]] = None, + blur_data_url: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -71,7 +73,7 @@ class Image(NextComponent): priority: When true, the image will be considered high priority and preload. Lazy loading is automatically disabled for images using priority. placeholder: A placeholder to use while the image is loading. Possible values are blur, empty, or data:image/.... Defaults to empty. loading: The loading behavior of the image. Defaults to lazy. Can hurt performance, recommended to use `priority` instead. - blurDataURL: A Data URL to be used as a placeholder image before the src image successfully loads. Only takes effect when combined with placeholder="blur". + blur_data_url: A Data URL to be used as a placeholder image before the src image successfully loads. Only takes effect when combined with placeholder="blur". on_load: Fires when the image has loaded. on_error: Fires when the image has an error. style: The style of the component. diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 0ba618e21..170b3ed9c 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -485,11 +485,11 @@ to { Returns: The style of the component. """ - slideDown = LiteralVar.create( + slide_down = LiteralVar.create( "${slideDown} var(--animation-duration) var(--animation-easing)", ) - slideUp = LiteralVar.create( + slide_up = LiteralVar.create( "${slideUp} var(--animation-duration) var(--animation-easing)", ) @@ -503,8 +503,8 @@ to { "display": "block", "height": "var(--space-3)", }, - "&[data-state='open']": {"animation": slideDown}, - "&[data-state='closed']": {"animation": slideUp}, + "&[data-state='open']": {"animation": slide_down}, + "&[data-state='closed']": {"animation": slide_up}, _inherited_variant_selector("classic"): { "color": "var(--accent-contrast)", }, diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index ed57dcbd8..534b97ac1 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -66,7 +66,7 @@ class DrawerRoot(DrawerComponent): scroll_lock_timeout: Var[int] # When `True`, it prevents scroll restoration. Defaults to `True`. - preventScrollRestoration: Var[bool] + prevent_scroll_restoration: Var[bool] # Enable background scaling, it requires container element with `vaul-drawer-wrapper` attribute to scale its background. should_scale_background: Var[bool] diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi index 1ca1e4325..bb2890fea 100644 --- a/reflex/components/radix/primitives/drawer.pyi +++ b/reflex/components/radix/primitives/drawer.pyi @@ -81,7 +81,7 @@ class DrawerRoot(DrawerComponent): snap_points: Optional[List[Union[float, str]]] = None, fade_from_index: Optional[Union[Var[int], int]] = None, scroll_lock_timeout: Optional[Union[Var[int], int]] = None, - preventScrollRestoration: Optional[Union[Var[bool], bool]] = None, + prevent_scroll_restoration: Optional[Union[Var[bool], bool]] = None, should_scale_background: Optional[Union[Var[bool], bool]] = None, close_threshold: Optional[Union[Var[float], float]] = None, as_child: Optional[Union[Var[bool], bool]] = None, @@ -129,7 +129,7 @@ class DrawerRoot(DrawerComponent): snap_points: Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account. fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms - preventScrollRestoration: When `True`, it prevents scroll restoration. Defaults to `True`. + prevent_scroll_restoration: When `True`, it prevents scroll restoration. Defaults to `True`. should_scale_background: Enable background scaling, it requires container element with `vaul-drawer-wrapper` attribute to scale its background. close_threshold: Number between 0 and 1 that determines when the drawer should be closed. as_child: Change the default rendered element for the one passed as a child. @@ -567,7 +567,7 @@ class Drawer(ComponentNamespace): snap_points: Optional[List[Union[float, str]]] = None, fade_from_index: Optional[Union[Var[int], int]] = None, scroll_lock_timeout: Optional[Union[Var[int], int]] = None, - preventScrollRestoration: Optional[Union[Var[bool], bool]] = None, + prevent_scroll_restoration: Optional[Union[Var[bool], bool]] = None, should_scale_background: Optional[Union[Var[bool], bool]] = None, close_threshold: Optional[Union[Var[float], float]] = None, as_child: Optional[Union[Var[bool], bool]] = None, @@ -615,7 +615,7 @@ class Drawer(ComponentNamespace): snap_points: Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account. fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms - preventScrollRestoration: When `True`, it prevents scroll restoration. Defaults to `True`. + prevent_scroll_restoration: When `True`, it prevents scroll restoration. Defaults to `True`. should_scale_background: Enable background scaling, it requires container element with `vaul-drawer-wrapper` attribute to scale its background. close_threshold: Number between 0 and 1 that determines when the drawer should be closed. as_child: Change the default rendered element for the one passed as a child. diff --git a/reflex/components/radix/themes/components/icon_button.py b/reflex/components/radix/themes/components/icon_button.py index 68c67485a..aafb9e1eb 100644 --- a/reflex/components/radix/themes/components/icon_button.py +++ b/reflex/components/radix/themes/components/icon_button.py @@ -22,6 +22,8 @@ from ..base import ( LiteralButtonSize = Literal["1", "2", "3", "4"] +RADIX_TO_LUCIDE_SIZE = {"1": 12, "2": 24, "3": 36, "4": 48} + class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent): """A button designed specifically for usage with a single icon.""" @@ -72,8 +74,6 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent): "IconButton requires a child icon. Pass a string as the first child or a rx.icon." ) if "size" in props: - RADIX_TO_LUCIDE_SIZE = {"1": 12, "2": 24, "3": 36, "4": 48} - if isinstance(props["size"], str): children[0].size = RADIX_TO_LUCIDE_SIZE[props["size"]] else: diff --git a/reflex/components/radix/themes/components/icon_button.pyi b/reflex/components/radix/themes/components/icon_button.pyi index abf77e07b..bdb0fe845 100644 --- a/reflex/components/radix/themes/components/icon_button.pyi +++ b/reflex/components/radix/themes/components/icon_button.pyi @@ -14,6 +14,7 @@ from reflex.vars.base import Var from ..base import RadixLoadingProp, RadixThemesComponent LiteralButtonSize = Literal["1", "2", "3", "4"] +RADIX_TO_LUCIDE_SIZE = {"1": 12, "2": 24, "3": 36, "4": 48} class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent): @overload diff --git a/reflex/components/radix/themes/components/tooltip.py b/reflex/components/radix/themes/components/tooltip.py index 07bab1a4a..53ec35264 100644 --- a/reflex/components/radix/themes/components/tooltip.py +++ b/reflex/components/radix/themes/components/tooltip.py @@ -28,6 +28,9 @@ LiteralStickyType = Literal[ ] +ARIA_LABEL_KEY = "aria_label" + + # The Tooltip inherits props from the Tooltip.Root, Tooltip.Portal, Tooltip.Content class Tooltip(RadixThemesComponent): """Floating element that provides a control with contextual information via pointer or focus.""" @@ -104,7 +107,6 @@ class Tooltip(RadixThemesComponent): Returns: The created component. """ - ARIA_LABEL_KEY = "aria_label" if props.get(ARIA_LABEL_KEY) is not None: props[format.to_kebab_case(ARIA_LABEL_KEY)] = props.pop(ARIA_LABEL_KEY) diff --git a/reflex/components/radix/themes/components/tooltip.pyi b/reflex/components/radix/themes/components/tooltip.pyi index fab1d0c12..0786bfada 100644 --- a/reflex/components/radix/themes/components/tooltip.pyi +++ b/reflex/components/radix/themes/components/tooltip.pyi @@ -14,6 +14,7 @@ from ..base import RadixThemesComponent LiteralSideType = Literal["top", "right", "bottom", "left"] LiteralAlignType = Literal["start", "center", "end"] LiteralStickyType = Literal["partial", "always"] +ARIA_LABEL_KEY = "aria_label" class Tooltip(RadixThemesComponent): @overload diff --git a/reflex/components/recharts/polar.py b/reflex/components/recharts/polar.py index 1f4974d4c..7bb623d34 100644 --- a/reflex/components/recharts/polar.py +++ b/reflex/components/recharts/polar.py @@ -73,7 +73,7 @@ class Pie(Recharts): data: Var[List[Dict[str, Any]]] # Valid children components - _valid_children: List[str] = ["Cell", "LabelList"] + _valid_children: List[str] = ["Cell", "LabelList", "Bare"] # Stoke color. Default: rx.color("accent", 9) stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9)) diff --git a/reflex/components/recharts/recharts.py b/reflex/components/recharts/recharts.py index d3fc20dc1..0d1b692f1 100644 --- a/reflex/components/recharts/recharts.py +++ b/reflex/components/recharts/recharts.py @@ -1,6 +1,6 @@ """A component that wraps a recharts lib.""" -from typing import Dict, Literal +from typing import Literal from reflex.components.component import Component, MemoizationLeaf, NoSSRComponent @@ -10,7 +10,7 @@ class Recharts(Component): library = "recharts@2.15.0" - def _get_style(self) -> Dict: + def _get_style(self) -> dict: return {"wrapperStyle": self.style} diff --git a/reflex/config.py b/reflex/config.py index d5eee8dfd..2daf8ef1d 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -390,7 +390,7 @@ class EnvVar(Generic[T]): os.environ[self.name] = str(value) -class env_var: # type: ignore +class env_var: # type: ignore # noqa: N801 """Descriptor for environment variables.""" name: str @@ -823,16 +823,16 @@ class Config(Base): if "api_url" not in self._non_default_attributes: # If running in Github Codespaces, override API_URL codespace_name = os.getenv("CODESPACE_NAME") - GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN = os.getenv( + github_codespaces_port_forwarding_domain = os.getenv( "GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN" ) # If running on Replit.com interactively, override API_URL to ensure we maintain the backend_port replit_dev_domain = os.getenv("REPLIT_DEV_DOMAIN") backend_port = kwargs.get("backend_port", self.backend_port) - if codespace_name and GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN: + if codespace_name and github_codespaces_port_forwarding_domain: self.api_url = ( f"https://{codespace_name}-{kwargs.get('backend_port', self.backend_port)}" - f".{GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}" + f".{github_codespaces_port_forwarding_domain}" ) elif replit_dev_domain and backend_port: self.api_url = f"https://{replit_dev_domain}:{backend_port}" diff --git a/reflex/event.py b/reflex/event.py index f44fa2b1c..6da65c366 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -534,10 +534,10 @@ class JavasciptKeyboardEvent: """Interface for a Javascript KeyboardEvent https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.""" key: str = "" - altKey: bool = False - ctrlKey: bool = False - metaKey: bool = False - shiftKey: bool = False + altKey: bool = False # noqa: N815 + ctrlKey: bool = False # noqa: N815 + metaKey: bool = False # noqa: N815 + shiftKey: bool = False # noqa: N815 def input_event(e: Var[JavascriptInputEvent]) -> Tuple[Var[str]]: diff --git a/reflex/experimental/hooks.py b/reflex/experimental/hooks.py index 7d648225a..e0d3b4a56 100644 --- a/reflex/experimental/hooks.py +++ b/reflex/experimental/hooks.py @@ -26,7 +26,7 @@ def const(name, value) -> Var: return Var(_js_expr=f"const {name} = {value}") -def useCallback(func, deps) -> Var: +def useCallback(func, deps) -> Var: # noqa: N802 """Create a useCallback hook with a function and dependencies. Args: @@ -42,7 +42,7 @@ def useCallback(func, deps) -> Var: ) -def useContext(context) -> Var: +def useContext(context) -> Var: # noqa: N802 """Create a useContext hook with a context. Args: @@ -57,7 +57,7 @@ def useContext(context) -> Var: ) -def useRef(default) -> Var: +def useRef(default) -> Var: # noqa: N802 """Create a useRef hook with a default value. Args: @@ -72,7 +72,7 @@ def useRef(default) -> Var: ) -def useState(var_name, default=None) -> Var: +def useState(var_name, default=None) -> Var: # noqa: N802 """Create a useState hook with a variable name and setter name. Args: diff --git a/reflex/experimental/layout.pyi b/reflex/experimental/layout.pyi index 4c7fc8d47..93c8c0137 100644 --- a/reflex/experimental/layout.pyi +++ b/reflex/experimental/layout.pyi @@ -109,7 +109,7 @@ class DrawerSidebar(DrawerRoot): snap_points: Optional[List[Union[float, str]]] = None, fade_from_index: Optional[Union[Var[int], int]] = None, scroll_lock_timeout: Optional[Union[Var[int], int]] = None, - preventScrollRestoration: Optional[Union[Var[bool], bool]] = None, + prevent_scroll_restoration: Optional[Union[Var[bool], bool]] = None, should_scale_background: Optional[Union[Var[bool], bool]] = None, close_threshold: Optional[Union[Var[float], float]] = None, as_child: Optional[Union[Var[bool], bool]] = None, diff --git a/reflex/state.py b/reflex/state.py index cb5b2b706..8085a92ec 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -93,14 +93,14 @@ from reflex.event import ( ) from reflex.utils import console, format, path_ops, prerequisites, types from reflex.utils.exceptions import ( - ComputedVarShadowsBaseVars, - ComputedVarShadowsStateVar, - DynamicComponentInvalidSignature, - DynamicRouteArgShadowsStateVar, - EventHandlerShadowsBuiltInStateMethod, + ComputedVarShadowsBaseVarsError, + ComputedVarShadowsStateVarError, + DynamicComponentInvalidSignatureError, + DynamicRouteArgShadowsStateVarError, + EventHandlerShadowsBuiltInStateMethodError, ImmutableStateError, InvalidLockWarningThresholdError, - InvalidStateManagerMode, + InvalidStateManagerModeError, LockExpiredError, ReflexRuntimeError, SetUndefinedStateVarError, @@ -815,7 +815,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): """Check for shadow methods and raise error if any. Raises: - EventHandlerShadowsBuiltInStateMethod: When an event handler shadows an inbuilt state method. + EventHandlerShadowsBuiltInStateMethodError: When an event handler shadows an inbuilt state method. """ overridden_methods = set() state_base_functions = cls._get_base_functions() @@ -829,7 +829,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): overridden_methods.add(method.__name__) for method_name in overridden_methods: - raise EventHandlerShadowsBuiltInStateMethod( + raise EventHandlerShadowsBuiltInStateMethodError( f"The event handler name `{method_name}` shadows a builtin State method; use a different name instead" ) @@ -838,11 +838,11 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): """Check for shadow base vars and raise error if any. Raises: - ComputedVarShadowsBaseVars: When a computed var shadows a base var. + ComputedVarShadowsBaseVarsError: When a computed var shadows a base var. """ for computed_var_ in cls._get_computed_vars(): if computed_var_._js_expr in cls.__annotations__: - raise ComputedVarShadowsBaseVars( + raise ComputedVarShadowsBaseVarsError( f"The computed var name `{computed_var_._js_expr}` shadows a base var in {cls.__module__}.{cls.__name__}; use a different name instead" ) @@ -851,14 +851,14 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): """Check for shadow computed vars and raise error if any. Raises: - ComputedVarShadowsStateVar: When a computed var shadows another. + ComputedVarShadowsStateVarError: When a computed var shadows another. """ for name, cv in cls.__dict__.items(): if not is_computed_var(cv): continue name = cv._js_expr if name in cls.inherited_vars or name in cls.inherited_backend_vars: - raise ComputedVarShadowsStateVar( + raise ComputedVarShadowsStateVarError( f"The computed var name `{cv._js_expr}` shadows a var in {cls.__module__}.{cls.__name__}; use a different name instead" ) @@ -1218,14 +1218,14 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): args: a dict of args Raises: - DynamicRouteArgShadowsStateVar: If a dynamic arg is shadowing an existing var. + DynamicRouteArgShadowsStateVarError: If a dynamic arg is shadowing an existing var. """ for arg in args: if ( arg in cls.computed_vars and not isinstance(cls.computed_vars[arg], DynamicRouteVar) ) or arg in cls.base_vars: - raise DynamicRouteArgShadowsStateVar( + raise DynamicRouteArgShadowsStateVarError( f"Dynamic route arg '{arg}' is shadowing an existing var in {cls.__module__}.{cls.__name__}" ) for substate in cls.get_substates(): @@ -2353,8 +2353,7 @@ def dynamic(func: Callable[[T], Component]): The dynamically generated component. Raises: - DynamicComponentInvalidSignature: If the function does not have exactly one parameter. - DynamicComponentInvalidSignature: If the function does not have a type hint for the state class. + DynamicComponentInvalidSignatureError: If the function does not have exactly one parameter or a type hint for the state class. """ number_of_parameters = len(inspect.signature(func).parameters) @@ -2366,12 +2365,12 @@ def dynamic(func: Callable[[T], Component]): values = list(func_signature.values()) if number_of_parameters != 1: - raise DynamicComponentInvalidSignature( + raise DynamicComponentInvalidSignatureError( "The function must have exactly one parameter, which is the state class." ) if len(values) != 1: - raise DynamicComponentInvalidSignature( + raise DynamicComponentInvalidSignatureError( "You must provide a type hint for the state class in the function." ) @@ -2875,7 +2874,7 @@ class StateManager(Base, ABC): state: The state class to use. Raises: - InvalidStateManagerMode: If the state manager mode is invalid. + InvalidStateManagerModeError: If the state manager mode is invalid. Returns: The state manager (either disk, memory or redis). @@ -2898,7 +2897,7 @@ class StateManager(Base, ABC): lock_expiration=config.redis_lock_expiration, lock_warning_threshold=config.redis_lock_warning_threshold, ) - raise InvalidStateManagerMode( + raise InvalidStateManagerModeError( f"Expected one of: DISK, MEMORY, REDIS, got {config.state_manager_mode}" ) @@ -4056,10 +4055,10 @@ def serialize_mutable_proxy(mp: MutableProxy): return mp.__wrapped__ -_orig_json_JSONEncoder_default = json.JSONEncoder.default +_orig_json_encoder_default = json.JSONEncoder.default -def _json_JSONEncoder_default_wrapper(self: json.JSONEncoder, o: Any) -> Any: +def _json_encoder_default_wrapper(self: json.JSONEncoder, o: Any) -> Any: """Wrap JSONEncoder.default to handle MutableProxy objects. Args: @@ -4073,10 +4072,10 @@ def _json_JSONEncoder_default_wrapper(self: json.JSONEncoder, o: Any) -> Any: return o.__wrapped__ except AttributeError: pass - return _orig_json_JSONEncoder_default(self, o) + return _orig_json_encoder_default(self, o) -json.JSONEncoder.default = _json_JSONEncoder_default_wrapper +json.JSONEncoder.default = _json_encoder_default_wrapper class ImmutableMutableProxy(MutableProxy): diff --git a/reflex/testing.py b/reflex/testing.py index ec8b80f66..7c6aab93b 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -87,7 +87,7 @@ else: # borrowed from py3.11 -class chdir(contextlib.AbstractContextManager): +class chdir(contextlib.AbstractContextManager): # noqa: N801 """Non thread-safe context manager to change the current working directory.""" def __init__(self, path): diff --git a/reflex/utils/codespaces.py b/reflex/utils/codespaces.py index 7ff686129..bb5286e31 100644 --- a/reflex/utils/codespaces.py +++ b/reflex/utils/codespaces.py @@ -42,10 +42,7 @@ def codespaces_port_forwarding_domain() -> str | None: Returns: The domain for port forwarding in Github Codespaces, or None if not running in Codespaces. """ - GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN = os.getenv( - "GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN" - ) - return GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN + return os.getenv("GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN") def is_running_in_codespaces() -> bool: diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py index d35643753..692c7d64b 100644 --- a/reflex/utils/exceptions.py +++ b/reflex/utils/exceptions.py @@ -11,7 +11,7 @@ class ConfigError(ReflexError): """Custom exception for config related errors.""" -class InvalidStateManagerMode(ReflexError, ValueError): +class InvalidStateManagerModeError(ReflexError, ValueError): """Raised when an invalid state manager mode is provided.""" @@ -143,35 +143,35 @@ class EventFnArgMismatchError(ReflexError, TypeError): """Raised when the number of args required by an event handler is more than provided by the event trigger.""" -class DynamicRouteArgShadowsStateVar(ReflexError, NameError): +class DynamicRouteArgShadowsStateVarError(ReflexError, NameError): """Raised when a dynamic route arg shadows a state var.""" -class ComputedVarShadowsStateVar(ReflexError, NameError): +class ComputedVarShadowsStateVarError(ReflexError, NameError): """Raised when a computed var shadows a state var.""" -class ComputedVarShadowsBaseVars(ReflexError, NameError): +class ComputedVarShadowsBaseVarsError(ReflexError, NameError): """Raised when a computed var shadows a base var.""" -class EventHandlerShadowsBuiltInStateMethod(ReflexError, NameError): +class EventHandlerShadowsBuiltInStateMethodError(ReflexError, NameError): """Raised when an event handler shadows a built-in state method.""" -class GeneratedCodeHasNoFunctionDefs(ReflexError): +class GeneratedCodeHasNoFunctionDefsError(ReflexError): """Raised when refactored code generated with flexgen has no functions defined.""" -class PrimitiveUnserializableToJSON(ReflexError, ValueError): +class PrimitiveUnserializableToJSONError(ReflexError, ValueError): """Raised when a primitive type is unserializable to JSON. Usually with NaN and Infinity.""" -class InvalidLifespanTaskType(ReflexError, TypeError): +class InvalidLifespanTaskTypeError(ReflexError, TypeError): """Raised when an invalid task type is registered as a lifespan task.""" -class DynamicComponentMissingLibrary(ReflexError, ValueError): +class DynamicComponentMissingLibraryError(ReflexError, ValueError): """Raised when a dynamic component is missing a library.""" @@ -187,7 +187,7 @@ class EnvironmentVarValueError(ReflexError, ValueError): """Raised when an environment variable is set to an invalid value.""" -class DynamicComponentInvalidSignature(ReflexError, TypeError): +class DynamicComponentInvalidSignatureError(ReflexError, TypeError): """Raised when a dynamic component has an invalid signature.""" diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 9ee0f1018..9a5b70112 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -364,11 +364,11 @@ def run_uvicorn_backend_prod(host, port, loglevel): app_module = get_app_module() - RUN_BACKEND_PROD = f"gunicorn --worker-class {config.gunicorn_worker_class} --max-requests {config.gunicorn_max_requests} --max-requests-jitter {config.gunicorn_max_requests_jitter} --preload --timeout {config.timeout} --log-level critical".split() - RUN_BACKEND_PROD_WINDOWS = f"uvicorn --limit-max-requests {config.gunicorn_max_requests} --timeout-keep-alive {config.timeout}".split() + run_backend_prod = f"gunicorn --worker-class {config.gunicorn_worker_class} --max-requests {config.gunicorn_max_requests} --max-requests-jitter {config.gunicorn_max_requests_jitter} --preload --timeout {config.timeout} --log-level critical".split() + run_backend_prod_windows = f"uvicorn --limit-max-requests {config.gunicorn_max_requests} --timeout-keep-alive {config.timeout}".split() command = ( [ - *RUN_BACKEND_PROD_WINDOWS, + *run_backend_prod_windows, "--host", host, "--port", @@ -377,7 +377,7 @@ def run_uvicorn_backend_prod(host, port, loglevel): ] if constants.IS_WINDOWS else [ - *RUN_BACKEND_PROD, + *run_backend_prod, "--bind", f"{host}:{port}", "--threads", diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 1e33c4b8a..94d8f8fbd 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -38,7 +38,7 @@ from reflex.compiler import templates from reflex.config import Config, environment, get_config from reflex.utils import console, net, path_ops, processes, redir from reflex.utils.exceptions import ( - GeneratedCodeHasNoFunctionDefs, + GeneratedCodeHasNoFunctionDefsError, SystemPackageMissingError, ) from reflex.utils.format import format_library_name @@ -1816,7 +1816,7 @@ def initialize_main_module_index_from_generation(app_name: str, generation_hash: generation_hash: The generation hash from reflex.build. Raises: - GeneratedCodeHasNoFunctionDefs: If the fetched code has no function definitions + GeneratedCodeHasNoFunctionDefsError: If the fetched code has no function definitions (the refactored reflex code is expected to have at least one root function defined). """ # Download the reflex code for the generation. @@ -1833,7 +1833,7 @@ def initialize_main_module_index_from_generation(app_name: str, generation_hash: # Determine the name of the last function, which renders the generated code. defined_funcs = re.findall(r"def ([a-zA-Z_]+)\(", resp.text) if not defined_funcs: - raise GeneratedCodeHasNoFunctionDefs( + raise GeneratedCodeHasNoFunctionDefsError( f"No function definitions found in generated code from {url!r}." ) render_func_name = defined_funcs[-1] diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 1bb346c65..8fb543c99 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -1555,7 +1555,7 @@ def figure_out_type(value: Any) -> types.GenericType: return type(value) -class cached_property_no_lock(functools.cached_property): +class cached_property_no_lock(functools.cached_property): # noqa: N801 """A special version of functools.cached_property that does not use a lock.""" def __init__(self, func): diff --git a/reflex/vars/number.py b/reflex/vars/number.py index a2a0293d5..082334450 100644 --- a/reflex/vars/number.py +++ b/reflex/vars/number.py @@ -18,7 +18,7 @@ from typing import ( ) from reflex.constants.base import Dirs -from reflex.utils.exceptions import PrimitiveUnserializableToJSON, VarTypeError +from reflex.utils.exceptions import PrimitiveUnserializableToJSONError, VarTypeError from reflex.utils.imports import ImportDict, ImportVar from .base import ( @@ -987,10 +987,10 @@ class LiteralNumberVar(LiteralVar, NumberVar): The JSON representation of the var. Raises: - PrimitiveUnserializableToJSON: If the var is unserializable to JSON. + PrimitiveUnserializableToJSONError: If the var is unserializable to JSON. """ if math.isinf(self._var_value) or math.isnan(self._var_value): - raise PrimitiveUnserializableToJSON( + raise PrimitiveUnserializableToJSONError( f"No valid JSON representation for {self}" ) return json.dumps(self._var_value) diff --git a/tests/units/conftest.py b/tests/units/conftest.py index fb6229aca..8c1ffe532 100644 --- a/tests/units/conftest.py +++ b/tests/units/conftest.py @@ -1,11 +1,8 @@ """Test fixtures.""" import asyncio -import contextlib -import os import platform import uuid -from pathlib import Path from typing import Dict, Generator, Type from unittest import mock @@ -14,6 +11,7 @@ import pytest from reflex.app import App from reflex.event import EventSpec from reflex.model import ModelRegistry +from reflex.testing import chdir from reflex.utils import prerequisites from .states import ( @@ -191,33 +189,6 @@ def router_data(router_data_headers) -> Dict[str, str]: } -# borrowed from py3.11 -class chdir(contextlib.AbstractContextManager): - """Non thread-safe context manager to change the current working directory.""" - - def __init__(self, path): - """Prepare contextmanager. - - Args: - path: the path to change to - """ - self.path = path - self._old_cwd = [] - - def __enter__(self): - """Save current directory and perform chdir.""" - self._old_cwd.append(Path.cwd()) - os.chdir(self.path) - - def __exit__(self, *excinfo): - """Change back to previous directory on stack. - - Args: - excinfo: sys.exc_info captured in the context block - """ - os.chdir(self._old_cwd.pop()) - - @pytest.fixture def tmp_working_dir(tmp_path): """Create a temporary directory and chdir to it. diff --git a/tests/units/test_var.py b/tests/units/test_var.py index d071d1dba..88f05a53e 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -12,7 +12,7 @@ from reflex.base import Base from reflex.constants.base import REFLEX_VAR_CLOSING_TAG, REFLEX_VAR_OPENING_TAG from reflex.state import BaseState from reflex.utils.exceptions import ( - PrimitiveUnserializableToJSON, + PrimitiveUnserializableToJSONError, UntypedComputedVarError, ) from reflex.utils.imports import ImportVar @@ -1061,7 +1061,7 @@ def test_inf_and_nan(var, expected_js): assert str(var) == expected_js assert isinstance(var, NumberVar) assert isinstance(var, LiteralVar) - with pytest.raises(PrimitiveUnserializableToJSON): + with pytest.raises(PrimitiveUnserializableToJSONError): var.json() From 9dba8cd49430537ce44ecb255e3d618db7b14bfd Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 23 Jan 2025 06:29:31 -0800 Subject: [PATCH 043/144] use older version of python for windows simple benchmarks (#4680) --- .github/workflows/benchmarks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index ec8c1409f..6da40ef6f 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -85,6 +85,8 @@ jobs: exclude: - os: windows-latest python-version: "3.10.16" + - os: windows-latest + python-version: "3.11.11" # keep only one python version for MacOS - os: macos-latest python-version: "3.10.16" @@ -93,6 +95,8 @@ jobs: include: - os: windows-latest python-version: "3.10.11" + - os: windows-latest + python-version: "3.11.9" runs-on: ${{ matrix.os }} steps: From abc9038580a8b6318cd693b5d6b1af2b4138c404 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 23 Jan 2025 15:10:07 -0800 Subject: [PATCH 044/144] return websocket protocol when asked (#4683) --- reflex/.templates/web/utils/state.js | 2 +- reflex/app.py | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index 5b8046347..93c664ef1 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -408,7 +408,7 @@ export const connect = async ( socket.current = io(endpoint.href, { path: endpoint["pathname"], transports: transports, - protocols: env.TEST_MODE ? undefined : [reflexEnvironment.version], + protocols: [reflexEnvironment.version], autoUnref: false, }); // Ensure undefined fields in events are sent as null instead of removed diff --git a/reflex/app.py b/reflex/app.py index 5ee424719..d432925ab 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -405,7 +405,31 @@ class App(MiddlewareMixin, LifespanMixin): self.sio.register_namespace(self.event_namespace) # Mount the socket app with the API. if self.api: - self.api.mount(str(constants.Endpoint.EVENT), socket_app) + + class HeaderMiddleware: + def __init__(self, app): + self.app = app + + async def __call__(self, scope, receive, send): + original_send = send + + async def modified_send(message): + headers = dict(scope["headers"]) + protocol_key = b"sec-websocket-protocol" + if ( + message["type"] == "websocket.accept" + and protocol_key in headers + ): + message["headers"] = [ + *message.get("headers", []), + (b"sec-websocket-protocol", headers[protocol_key]), + ] + return await original_send(message) + + return await self.app(scope, receive, modified_send) + + socket_app_with_headers = HeaderMiddleware(socket_app) + self.api.mount(str(constants.Endpoint.EVENT), socket_app_with_headers) # Check the exception handlers self._validate_exception_handlers() From 709c6dedf2d7a78cd3159d3a58bc715211d7f7b6 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 24 Jan 2025 12:38:14 -0800 Subject: [PATCH 045/144] [ENG-4444] move states out of .web (#4689) * move states out of .web * create file parents if they don't exist --- .gitignore | 1 + reflex/config.py | 3 +++ reflex/constants/base.py | 2 +- reflex/constants/config.py | 9 ++++++++- reflex/state.py | 4 ++-- reflex/utils/exec.py | 2 +- reflex/utils/path_ops.py | 3 +++ reflex/utils/prerequisites.py | 11 +++++++++++ 8 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0f7d9e5ff..8bd92964c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ assets/external/* dist/* examples/ .web +.states .idea .vscode .coverage diff --git a/reflex/config.py b/reflex/config.py index 2daf8ef1d..c3c5e4cf5 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -490,6 +490,9 @@ class EnvironmentVariables: # The working directory for the next.js commands. REFLEX_WEB_WORKDIR: EnvVar[Path] = env_var(Path(constants.Dirs.WEB)) + # The working directory for the states directory. + REFLEX_STATES_WORKDIR: EnvVar[Path] = env_var(Path(constants.Dirs.STATES)) + # Path to the alembic config file ALEMBIC_CONFIG: EnvVar[ExistingPath] = env_var(Path(constants.ALEMBIC_CONFIG)) diff --git a/reflex/constants/base.py b/reflex/constants/base.py index f737858c0..11f3e3c05 100644 --- a/reflex/constants/base.py +++ b/reflex/constants/base.py @@ -52,7 +52,7 @@ class Dirs(SimpleNamespace): # The name of the postcss config file. POSTCSS_JS = "postcss.config.js" # The name of the states directory. - STATES = "states" + STATES = ".states" class Reflex(SimpleNamespace): diff --git a/reflex/constants/config.py b/reflex/constants/config.py index 7425fd864..a49216c00 100644 --- a/reflex/constants/config.py +++ b/reflex/constants/config.py @@ -39,7 +39,14 @@ class GitIgnore(SimpleNamespace): # The gitignore file. FILE = Path(".gitignore") # Files to gitignore. - DEFAULTS = {Dirs.WEB, "*.db", "__pycache__/", "*.py[cod]", "assets/external/"} + DEFAULTS = { + Dirs.WEB, + Dirs.STATES, + "*.db", + "__pycache__/", + "*.py[cod]", + "assets/external/", + } class RequirementsTxt(SimpleNamespace): diff --git a/reflex/state.py b/reflex/state.py index 8085a92ec..40afcbc79 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -3046,7 +3046,7 @@ def is_serializable(value: Any) -> bool: def reset_disk_state_manager(): """Reset the disk state manager.""" - states_directory = prerequisites.get_web_dir() / constants.Dirs.STATES + states_directory = prerequisites.get_states_dir() if states_directory.exists(): for path in states_directory.iterdir(): path.unlink() @@ -3094,7 +3094,7 @@ class StateManagerDisk(StateManager): Returns: The states directory. """ - return prerequisites.get_web_dir() / constants.Dirs.STATES + return prerequisites.get_states_dir() def _purge_expired_states(self): """Purge expired states from the disk.""" diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 9a5b70112..88603da64 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -307,7 +307,7 @@ def run_granian_backend(host, port, loglevel: LogLevel): log_level=LogLevels(loglevel.value), reload=True, reload_paths=get_reload_dirs(), - reload_ignore_dirs=[".web"], + reload_ignore_dirs=[".web", ".states"], ).serve() except ImportError: console.error( diff --git a/reflex/utils/path_ops.py b/reflex/utils/path_ops.py index b447718d2..e3256bb45 100644 --- a/reflex/utils/path_ops.py +++ b/reflex/utils/path_ops.py @@ -196,6 +196,9 @@ def update_json_file(file_path: str | Path, update_dict: dict[str, int | str]): """ fp = Path(file_path) + # Create the parent directory if it doesn't exist. + fp.parent.mkdir(parents=True, exist_ok=True) + # Create the file if it doesn't exist. fp.touch(exist_ok=True) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 94d8f8fbd..2a890f821 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -87,6 +87,17 @@ def get_web_dir() -> Path: return environment.REFLEX_WEB_WORKDIR.get() +def get_states_dir() -> Path: + """Get the working directory for the states. + + Can be overridden with REFLEX_STATES_WORKDIR. + + Returns: + The working directory. + """ + return environment.REFLEX_STATES_WORKDIR.get() + + def check_latest_package_version(package_name: str): """Check if the latest version of the package is installed. From 61a6ab9bbd89e84a243c8fc68145ddf8813f5903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Mon, 27 Jan 2025 12:37:00 -0800 Subject: [PATCH 046/144] fix stuff with bun_path (#4688) * fix stuff with bun_path * which always return Path object * try using samefile() for file path comparison * check for None * fix tests, maybe * fix more tests --- reflex/utils/exec.py | 10 +++++----- reflex/utils/path_ops.py | 35 ++++++++++++++++++++++----------- reflex/utils/prerequisites.py | 23 ++++++++++------------ tests/units/utils/test_utils.py | 11 +++++------ 4 files changed, 43 insertions(+), 36 deletions(-) diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 88603da64..1e5cda10b 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -467,19 +467,19 @@ def output_system_info(): system = platform.system() + fnm_info = f"[FNM {prerequisites.get_fnm_version()} (Expected: {constants.Fnm.VERSION}) (PATH: {constants.Fnm.EXE})]" + if system != "Windows" or ( system == "Windows" and prerequisites.is_windows_bun_supported() ): dependencies.extend( [ - f"[FNM {prerequisites.get_fnm_version()} (Expected: {constants.Fnm.VERSION}) (PATH: {constants.Fnm.EXE})]", - f"[Bun {prerequisites.get_bun_version()} (Expected: {constants.Bun.VERSION}) (PATH: {config.bun_path})]", + fnm_info, + f"[Bun {prerequisites.get_bun_version()} (Expected: {constants.Bun.VERSION}) (PATH: {path_ops.get_bun_path()})]", ], ) else: - dependencies.append( - f"[FNM {prerequisites.get_fnm_version()} (Expected: {constants.Fnm.VERSION}) (PATH: {constants.Fnm.EXE})]", - ) + dependencies.append(fnm_info) if system == "Linux": import distro # type: ignore diff --git a/reflex/utils/path_ops.py b/reflex/utils/path_ops.py index e3256bb45..edab085ff 100644 --- a/reflex/utils/path_ops.py +++ b/reflex/utils/path_ops.py @@ -9,7 +9,7 @@ import shutil from pathlib import Path from reflex import constants -from reflex.config import environment +from reflex.config import environment, get_config # Shorthand for join. join = os.linesep.join @@ -118,7 +118,7 @@ def ln(src: str | Path, dest: str | Path, overwrite: bool = False) -> bool: return True -def which(program: str | Path) -> str | Path | None: +def which(program: str | Path) -> Path | None: """Find the path to an executable. Args: @@ -127,7 +127,8 @@ def which(program: str | Path) -> str | Path | None: Returns: The path to the executable. """ - return shutil.which(str(program)) + which_result = shutil.which(program) + return Path(which_result) if which_result else None def use_system_node() -> bool: @@ -156,12 +157,12 @@ def get_node_bin_path() -> Path | None: """ bin_path = Path(constants.Node.BIN_PATH) if not bin_path.exists(): - str_path = which("node") - return Path(str_path).parent.resolve() if str_path else None - return bin_path.resolve() + path = which("node") + return path.parent.absolute() if path else None + return bin_path.absolute() -def get_node_path() -> str | None: +def get_node_path() -> Path | None: """Get the node binary path. Returns: @@ -169,9 +170,8 @@ def get_node_path() -> str | None: """ node_path = Path(constants.Node.PATH) if use_system_node() or not node_path.exists(): - system_node_path = which("node") - return str(system_node_path) if system_node_path else None - return str(node_path) + node_path = which("node") + return node_path def get_npm_path() -> Path | None: @@ -182,11 +182,22 @@ def get_npm_path() -> Path | None: """ npm_path = Path(constants.Node.NPM_PATH) if use_system_node() or not npm_path.exists(): - system_npm_path = which("npm") - npm_path = Path(system_npm_path) if system_npm_path else None + npm_path = which("npm") return npm_path.absolute() if npm_path else None +def get_bun_path() -> Path | None: + """Get bun binary path. + + Returns: + The path to the bun binary file. + """ + bun_path = get_config().bun_path + if use_system_bun() or not bun_path.exists(): + bun_path = which("bun") + return bun_path.absolute() if bun_path else None + + def update_json_file(file_path: str | Path, update_dict: dict[str, int | str]): """Update the contents of a json file. diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 2a890f821..66c9156a9 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -205,10 +205,13 @@ def get_bun_version() -> version.Version | None: Returns: The version of bun. """ + bun_path = path_ops.get_bun_path() + if bun_path is None: + return None try: # Run the bun -v command and capture the output - result = processes.new_process([str(get_config().bun_path), "-v"], run=True) - return version.parse(result.stdout) # type: ignore + result = processes.new_process([str(bun_path), "-v"], run=True) + return version.parse(str(result.stdout)) except FileNotFoundError: return None except version.InvalidVersion as e: @@ -1062,9 +1065,7 @@ def install_bun(): ) # Skip if bun is already installed. - if Path(get_config().bun_path).exists() and get_bun_version() == version.parse( - constants.Bun.VERSION - ): + if get_bun_version() == version.parse(constants.Bun.VERSION): console.debug("Skipping bun installation as it is already installed.") return @@ -1085,8 +1086,7 @@ def install_bun(): show_logs=console.is_debug(), ) else: - unzip_path = path_ops.which("unzip") - if unzip_path is None: + if path_ops.which("unzip") is None: raise SystemPackageMissingError("unzip") # Run the bun install script. @@ -1290,12 +1290,9 @@ def validate_bun(): Raises: Exit: If custom specified bun does not exist or does not meet requirements. """ - # if a custom bun path is provided, make sure its valid - # This is specific to non-FHS OS - bun_path = get_config().bun_path - if path_ops.use_system_bun(): - bun_path = path_ops.which("bun") - if bun_path != constants.Bun.DEFAULT_PATH: + bun_path = path_ops.get_bun_path() + + if bun_path and bun_path.samefile(constants.Bun.DEFAULT_PATH): console.info(f"Using custom Bun path: {bun_path}") bun_version = get_bun_version() if not bun_version: diff --git a/tests/units/utils/test_utils.py b/tests/units/utils/test_utils.py index f8573111c..65e77f4a7 100644 --- a/tests/units/utils/test_utils.py +++ b/tests/units/utils/test_utils.py @@ -122,13 +122,13 @@ def test_validate_invalid_bun_path(mocker): Args: mocker: Pytest mocker object. """ - mock = mocker.Mock() - mocker.patch.object(mock, "bun_path", return_value="/mock/path") - mocker.patch("reflex.utils.prerequisites.get_config", mock) + mock_path = mocker.Mock() + mocker.patch("reflex.utils.path_ops.get_bun_path", return_value=mock_path) mocker.patch("reflex.utils.prerequisites.get_bun_version", return_value=None) with pytest.raises(typer.Exit): prerequisites.validate_bun() + mock_path.samefile.assert_called_once() def test_validate_bun_path_incompatible_version(mocker): @@ -137,9 +137,8 @@ def test_validate_bun_path_incompatible_version(mocker): Args: mocker: Pytest mocker object. """ - mock = mocker.Mock() - mocker.patch.object(mock, "bun_path", return_value="/mock/path") - mocker.patch("reflex.utils.prerequisites.get_config", mock) + mock_path = mocker.Mock() + mocker.patch("reflex.utils.path_ops.get_bun_path", return_value=mock_path) mocker.patch( "reflex.utils.prerequisites.get_bun_version", return_value=version.parse("0.6.5"), From 4d08484a121b936a30ca9c396b2de4375f03ba33 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 27 Jan 2025 21:31:14 -0800 Subject: [PATCH 047/144] import vars are not sortable (#4700) --- reflex/utils/imports.py | 2 +- reflex/vars/base.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/reflex/utils/imports.py b/reflex/utils/imports.py index bd422ecc0..ab217087c 100644 --- a/reflex/utils/imports.py +++ b/reflex/utils/imports.py @@ -90,7 +90,7 @@ def collapse_imports( } -@dataclasses.dataclass(order=True, frozen=True) +@dataclasses.dataclass(frozen=True) class ImportVar: """An import var.""" diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 8fb543c99..f6359166f 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -145,9 +145,7 @@ class VarData: position: Position of the hook in the component. """ immutable_imports: ImmutableParsedImportDict = tuple( - sorted( - ((k, tuple(sorted(v))) for k, v in parse_imports(imports or {}).items()) - ) + (k, tuple(v)) for k, v in parse_imports(imports or {}).items() ) object.__setattr__(self, "state", state) object.__setattr__(self, "field_name", field_name) From 9e36efbd21eb92ae216eee49417aa5533932967e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 28 Jan 2025 14:20:26 +0100 Subject: [PATCH 048/144] fix version in pyproject and ruff version check (#4690) * fix version in pyproject and ruff version check * relock deps * relax some strict values --- poetry.lock | 264 ++++++++++++++++++++++- pyproject.toml | 4 +- reflex/app.py | 8 +- reflex/components/core/breakpoints.py | 4 +- reflex/event.py | 4 +- reflex/state.py | 1 + reflex/utils/types.py | 10 +- reflex/vars/base.py | 2 +- tests/units/compiler/test_compiler.py | 2 +- tests/units/components/test_component.py | 2 + tests/units/test_var.py | 3 + 11 files changed, 288 insertions(+), 16 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5cc673489..68e8e37db 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand. [[package]] name = "alembic" @@ -6,6 +6,8 @@ version = "1.14.1" description = "A database migration tool for SQLAlchemy." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "alembic-1.14.1-py3-none-any.whl", hash = "sha256:1acdd7a3a478e208b0503cd73614d5e4c6efafa4e73518bb60e4f2846a37b1c5"}, {file = "alembic-1.14.1.tar.gz", hash = "sha256:496e888245a53adf1498fcab31713a469c65836f8de76e01399aa1c3e90dd213"}, @@ -25,6 +27,8 @@ version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, @@ -36,6 +40,8 @@ version = "4.8.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "anyio-4.8.0-py3-none-any.whl", hash = "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a"}, {file = "anyio-4.8.0.tar.gz", hash = "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a"}, @@ -58,6 +64,8 @@ version = "5.0.1" description = "Timeout context manager for asyncio programs" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_full_version < \"3.11.3\"" files = [ {file = "async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c"}, {file = "async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3"}, @@ -69,6 +77,8 @@ version = "0.13.0" description = "Enhance the standard unittest package with features for testing asyncio libraries" optional = false python-versions = ">=3.5" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "asynctest-0.13.0-py3-none-any.whl", hash = "sha256:5da6118a7e6d6b54d83a8f7197769d046922a44d2a99c21382f0a6e4fadae676"}, {file = "asynctest-0.13.0.tar.gz", hash = "sha256:c27862842d15d83e6a34eb0b2866c323880eb3a75e4485b079ea11748fd77fac"}, @@ -80,6 +90,8 @@ version = "24.3.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, @@ -99,6 +111,8 @@ version = "1.2.0" description = "Backport of CPython tarfile module" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and python_version <= \"3.11\"" files = [ {file = "backports.tarfile-1.2.0-py3-none-any.whl", hash = "sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34"}, {file = "backports_tarfile-1.2.0.tar.gz", hash = "sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991"}, @@ -114,6 +128,8 @@ version = "0.23.1" description = "The bidirectional mapping library for Python." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "bidict-0.23.1-py3-none-any.whl", hash = "sha256:5dae8d4d79b552a71cbabc7deb25dfe8ce710b17ff41711e13010ead2abfc3e5"}, {file = "bidict-0.23.1.tar.gz", hash = "sha256:03069d763bc387bbd20e7d49914e75fc4132a41937fa3405417e1a5a2d006d71"}, @@ -125,6 +141,8 @@ version = "1.2.2.post1" description = "A simple, correct Python build frontend" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "build-1.2.2.post1-py3-none-any.whl", hash = "sha256:1d61c0887fa860c01971625baae8bdd338e517b836a2f70dd1f7aa3a6b2fc5b5"}, {file = "build-1.2.2.post1.tar.gz", hash = "sha256:b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7"}, @@ -150,6 +168,8 @@ version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, @@ -161,6 +181,7 @@ version = "1.17.1" description = "Foreign Function Interface for Python calling C code." optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, @@ -230,6 +251,7 @@ files = [ {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, ] +markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "os_name == \"nt\" and implementation_name != \"pypy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")"} [package.dependencies] pycparser = "*" @@ -240,6 +262,8 @@ version = "3.4.0" description = "Validate configuration and produce human readable error messages." optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9"}, {file = "cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560"}, @@ -251,6 +275,8 @@ version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, @@ -352,6 +378,8 @@ version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, @@ -366,10 +394,12 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main", "dev"] files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +markers = {main = "(platform_system == \"Windows\" or os_name == \"nt\") and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "(python_version <= \"3.11\" or python_version >= \"3.12\") and sys_platform == \"win32\""} [[package]] name = "coverage" @@ -377,6 +407,8 @@ version = "7.6.10" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "coverage-7.6.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5c912978f7fbf47ef99cec50c4401340436d200d41d714c7a4766f377c5b7b78"}, {file = "coverage-7.6.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a01ec4af7dfeb96ff0078ad9a48810bb0cc8abcb0115180c6013a6b26237626c"}, @@ -454,6 +486,8 @@ version = "44.0.0" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = "!=3.9.0,!=3.9.1,>=3.7" +groups = ["main"] +markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" files = [ {file = "cryptography-44.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:84111ad4ff3f6253820e6d3e58be2cc2a00adb29335d4cacb5ab4d4d34f2a123"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b15492a11f9e1b62ba9d73c210e2416724633167de94607ec6069ef724fad092"}, @@ -461,6 +495,7 @@ files = [ {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543"}, + {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:60eb32934076fa07e4316b7b2742fa52cbb190b42c2df2863dbc4230a0a9b385"}, {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e"}, {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e"}, {file = "cryptography-44.0.0-cp37-abi3-win32.whl", hash = "sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053"}, @@ -471,6 +506,7 @@ files = [ {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289"}, {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7"}, {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c"}, + {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9abcc2e083cbe8dde89124a47e5e53ec38751f0d7dfd36801008f316a127d7ba"}, {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64"}, {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285"}, {file = "cryptography-44.0.0-cp39-abi3-win32.whl", hash = "sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417"}, @@ -503,6 +539,8 @@ version = "1.8.1" description = "A utility for ensuring Google-style docstrings stay up to date with the source code." optional = false python-versions = ">=3.6,<4.0" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "darglint-1.8.1-py3-none-any.whl", hash = "sha256:5ae11c259c17b0701618a20c3da343a3eb98b3bc4b5a83d31cdd94f5ebdced8d"}, {file = "darglint-1.8.1.tar.gz", hash = "sha256:080d5106df149b199822e7ee7deb9c012b49891538f14a11be681044f0bb20da"}, @@ -514,6 +552,8 @@ version = "0.3.9" description = "serialize all of Python" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"}, {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, @@ -529,6 +569,8 @@ version = "0.3.9" description = "Distribution utilities" optional = false python-versions = "*" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87"}, {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"}, @@ -540,6 +582,8 @@ version = "1.9.0" description = "Distro - an OS platform information API" optional = false python-versions = ">=3.6" +groups = ["main"] +markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and sys_platform == \"linux\"" files = [ {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, @@ -551,6 +595,8 @@ version = "0.21.2" description = "Docutils -- Python Documentation Utilities" optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2"}, {file = "docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f"}, @@ -562,6 +608,8 @@ version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -576,6 +624,8 @@ version = "0.115.6" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "fastapi-0.115.6-py3-none-any.whl", hash = "sha256:e9240b29e36fa8f4bb7290316988e90c381e5092e0cbe84e7818cc3713bcf305"}, {file = "fastapi-0.115.6.tar.gz", hash = "sha256:9ec46f7addc14ea472958a96aae5b5de65f39721a46aaf5705c480d9a8b76654"}, @@ -596,6 +646,8 @@ version = "3.17.0" description = "A platform independent file lock." optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "filelock-3.17.0-py3-none-any.whl", hash = "sha256:533dc2f7ba78dc2f0f531fc6c4940addf7b70a481e269a5a3b93be94ffbe8338"}, {file = "filelock-3.17.0.tar.gz", hash = "sha256:ee4e77401ef576ebb38cd7f13b9b28893194acc20a8e68e18730ba9c0e54660e"}, @@ -612,6 +664,7 @@ version = "3.1.1" description = "Lightweight in-process concurrent programming" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] files = [ {file = "greenlet-3.1.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:0bbae94a29c9e5c7e4a2b7f0aae5c17e8e90acbfd3bf6270eeba60c39fce3563"}, {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fde093fb93f35ca72a556cf72c92ea3ebfda3d79fc35bb19fbe685853869a83"}, @@ -687,6 +740,7 @@ files = [ {file = "greenlet-3.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:3319aa75e0e0639bc15ff54ca327e8dc7a6fe404003496e3c6925cd3142e0e22"}, {file = "greenlet-3.1.1.tar.gz", hash = "sha256:4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467"}, ] +markers = {main = "python_version < \"3.14\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\") and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} [package.extras] docs = ["Sphinx", "furo"] @@ -698,6 +752,8 @@ version = "23.0.0" description = "WSGI HTTP Server for UNIX" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "gunicorn-23.0.0-py3-none-any.whl", hash = "sha256:ec400d38950de4dfd418cff8328b2c8faed0edb0d517d3394e457c317908ca4d"}, {file = "gunicorn-23.0.0.tar.gz", hash = "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec"}, @@ -719,6 +775,8 @@ version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, @@ -730,6 +788,8 @@ version = "1.0.7" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, @@ -751,6 +811,8 @@ version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, @@ -775,6 +837,8 @@ version = "1.5.0" description = "A tool for generating OIDC identities" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "id-1.5.0-py3-none-any.whl", hash = "sha256:f1434e1cef91f2cbb8a4ec64663d5a23b9ed43ef44c4c957d02583d61714c658"}, {file = "id-1.5.0.tar.gz", hash = "sha256:292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d"}, @@ -794,6 +858,8 @@ version = "2.6.6" description = "File identification library for Python" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "identify-2.6.6-py2.py3-none-any.whl", hash = "sha256:cbd1810bce79f8b671ecb20f53ee0ae8e86ae84b557de31d89709dc2a48ba881"}, {file = "identify-2.6.6.tar.gz", hash = "sha256:7bec12768ed44ea4761efb47806f0a41f86e7c0a5fdf5950d4648c90eca7e251"}, @@ -808,6 +874,8 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -822,6 +890,8 @@ version = "8.6.1" description = "Read metadata from Python packages" optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and python_version <= \"3.11\" or python_full_version < \"3.10.2\"" files = [ {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, @@ -845,6 +915,8 @@ version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -856,6 +928,8 @@ version = "3.4.0" description = "Utility functions for Python class constructs" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "jaraco.classes-3.4.0-py3-none-any.whl", hash = "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790"}, {file = "jaraco.classes-3.4.0.tar.gz", hash = "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd"}, @@ -874,6 +948,8 @@ version = "6.0.1" description = "Useful decorators and context managers" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "jaraco.context-6.0.1-py3-none-any.whl", hash = "sha256:f797fc481b490edb305122c9181830a3a5b76d84ef6d1aef2fb9b47ab956f9e4"}, {file = "jaraco_context-6.0.1.tar.gz", hash = "sha256:9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3"}, @@ -892,6 +968,8 @@ version = "4.1.0" description = "Functools like those found in stdlib" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "jaraco.functools-4.1.0-py3-none-any.whl", hash = "sha256:ad159f13428bc4acbf5541ad6dec511f91573b90fba04df61dafa2a1231cf649"}, {file = "jaraco_functools-4.1.0.tar.gz", hash = "sha256:70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d"}, @@ -914,6 +992,8 @@ version = "0.8.0" description = "Low-level, pure Python DBus protocol wrapper." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" files = [ {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, @@ -929,6 +1009,8 @@ version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, @@ -946,6 +1028,8 @@ version = "25.6.0" description = "Store and access your passwords safely." optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "keyring-25.6.0-py3-none-any.whl", hash = "sha256:552a3f7af126ece7ed5c89753650eec89c7eaae8617d0aa4d9ad2b75111266bd"}, {file = "keyring-25.6.0.tar.gz", hash = "sha256:0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66"}, @@ -975,6 +1059,8 @@ version = "0.4" description = "Makes it easy to load subpackages and functions on demand." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "lazy_loader-0.4-py3-none-any.whl", hash = "sha256:342aa8e14d543a154047afb4ba8ef17f5563baad3fc610d7b15b213b0f119efc"}, {file = "lazy_loader-0.4.tar.gz", hash = "sha256:47c75182589b91a4e1a85a136c074285a5ad4d9f39c63e0d7fb76391c4574cd1"}, @@ -994,6 +1080,8 @@ version = "1.3.8" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "Mako-1.3.8-py3-none-any.whl", hash = "sha256:42f48953c7eb91332040ff567eb7eea69b22e7a4affbc5ba8e845e8f730f6627"}, {file = "mako-1.3.8.tar.gz", hash = "sha256:577b97e414580d3e088d47c2dbbe9594aa7a5146ed2875d4dfa9075af2dd3cc8"}, @@ -1013,6 +1101,8 @@ version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, @@ -1037,6 +1127,8 @@ version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, @@ -1107,6 +1199,8 @@ version = "0.1.2" description = "Markdown URL utilities" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -1118,6 +1212,8 @@ version = "10.6.0" description = "More routines for operating on iterables, beyond itertools" optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "more-itertools-10.6.0.tar.gz", hash = "sha256:2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b"}, {file = "more_itertools-10.6.0-py3-none-any.whl", hash = "sha256:6eb054cb4b6db1473f6e15fcc676a08e4732548acd47c708f0e179c2c7c01e89"}, @@ -1129,6 +1225,8 @@ version = "0.2.20" description = "Python binding to Ammonia HTML sanitizer Rust crate" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "nh3-0.2.20-cp313-cp313t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:e1061a4ab6681f6bdf72b110eea0c4e1379d57c9de937db3be4202f7ad6043db"}, {file = "nh3-0.2.20-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb4254b1dac4a1ee49919a5b3f1caf9803ea8dada1816d9e8289e63d3cd0dd9a"}, @@ -1162,6 +1260,8 @@ version = "1.9.1" description = "Node.js virtual environment builder" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, @@ -1173,6 +1273,8 @@ version = "2.2.2" description = "Fundamental package for array computing in Python" optional = false python-versions = ">=3.10" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "numpy-2.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7079129b64cb78bdc8d611d1fd7e8002c0a2565da6a47c4df8062349fee90e3e"}, {file = "numpy-2.2.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2ec6c689c61df613b783aeb21f945c4cbe6c51c28cb70aae8430577ab39f163e"}, @@ -1237,6 +1339,8 @@ version = "1.3.0.post0" description = "Capture the outcome of Python function calls." optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "outcome-1.3.0.post0-py2.py3-none-any.whl", hash = "sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b"}, {file = "outcome-1.3.0.post0.tar.gz", hash = "sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8"}, @@ -1251,6 +1355,8 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -1262,6 +1368,8 @@ version = "2.2.3" description = "Powerful data structures for data analysis, time series, and statistics" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pandas-2.2.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1948ddde24197a0f7add2bdc4ca83bf2b1ef84a1bc8ccffd95eda17fd836ecb5"}, {file = "pandas-2.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:381175499d3802cde0eabbaf6324cce0c4f5d52ca6f8c377c29ad442f50f6348"}, @@ -1348,6 +1456,8 @@ version = "11.1.0" description = "Python Imaging Library (Fork)" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pillow-11.1.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:e1abe69aca89514737465752b4bcaf8016de61b3be1397a8fc260ba33321b3a8"}, {file = "pillow-11.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c640e5a06869c75994624551f45e5506e4256562ead981cce820d5ab39ae2192"}, @@ -1436,6 +1546,8 @@ version = "24.3.1" description = "The PyPA recommended tool for installing Python packages." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pip-24.3.1-py3-none-any.whl", hash = "sha256:3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed"}, {file = "pip-24.3.1.tar.gz", hash = "sha256:ebcb60557f2aefabc2e0f918751cd24ea0d56d8ec5445fe1807f1d2109660b99"}, @@ -1447,6 +1559,8 @@ version = "2.16.2" description = "Command line utility to show dependency tree of packages." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pipdeptree-2.16.2-py3-none-any.whl", hash = "sha256:4b60a20f632aa3449880141d1cd0bc99cb5f93ed46d54d689fd1c9b95f0e53d0"}, {file = "pipdeptree-2.16.2.tar.gz", hash = "sha256:96ecde8e6f40c95998491a385e4af56d387f94ff7d3b8f209aa34982a721bc43"}, @@ -1465,6 +1579,8 @@ version = "4.3.6" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -1481,6 +1597,8 @@ version = "1.49.1" description = "A high-level API to automate web browsers" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "playwright-1.49.1-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:1041ffb45a0d0bc44d698d3a5aa3ac4b67c9bd03540da43a0b70616ad52592b8"}, {file = "playwright-1.49.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:9f38ed3d0c1f4e0a6d1c92e73dd9a61f8855133249d6f0cec28648d38a7137be"}, @@ -1501,6 +1619,8 @@ version = "5.24.1" description = "An open-source, interactive data visualization library for Python" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "plotly-5.24.1-py3-none-any.whl", hash = "sha256:f67073a1e637eb0dc3e46324d9d51e2fe76e9727c892dde64ddf1e1b51f29089"}, {file = "plotly-5.24.1.tar.gz", hash = "sha256:dbc8ac8339d248a4bcc36e08a5659bacfe1b079390b8953533f4eb22169b4bae"}, @@ -1516,6 +1636,8 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -1531,6 +1653,8 @@ version = "4.1.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pre_commit-4.1.0-py2.py3-none-any.whl", hash = "sha256:d29e7cb346295bcc1cc75fc3e92e343495e3ea0196c9ec6ba53f49f10ab6ae7b"}, {file = "pre_commit-4.1.0.tar.gz", hash = "sha256:ae3f018575a588e30dfddfab9a05448bfbd6b73d78709617b5a2b853549716d4"}, @@ -1549,6 +1673,8 @@ version = "6.1.1" description = "Cross-platform lib for process and system monitoring in Python." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "psutil-6.1.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:9ccc4316f24409159897799b83004cb1e24f9819b0dcf9c0b68bdcb6cefee6a8"}, {file = "psutil-6.1.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ca9609c77ea3b8481ab005da74ed894035936223422dc591d6772b147421f777"}, @@ -1579,6 +1705,8 @@ version = "9.0.0" description = "Get CPU info with pure Python" optional = false python-versions = "*" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "py-cpuinfo-9.0.0.tar.gz", hash = "sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690"}, {file = "py_cpuinfo-9.0.0-py3-none-any.whl", hash = "sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5"}, @@ -1590,10 +1718,12 @@ version = "2.22" description = "C parser in Python" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] +markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "os_name == \"nt\" and implementation_name != \"pypy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")"} [[package]] name = "pydantic" @@ -1601,6 +1731,8 @@ version = "2.10.5" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pydantic-2.10.5-py3-none-any.whl", hash = "sha256:4dd4e322dbe55472cb7ca7e73f4b63574eecccf2835ffa2af9021ce113c83c53"}, {file = "pydantic-2.10.5.tar.gz", hash = "sha256:278b38dbbaec562011d659ee05f63346951b3a248a6f3642e1bc68894ea2b4ff"}, @@ -1621,6 +1753,8 @@ version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, @@ -1733,6 +1867,8 @@ version = "12.0.0" description = "A rough port of Node.js's EventEmitter to Python with a few tricks of its own" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pyee-12.0.0-py3-none-any.whl", hash = "sha256:7b14b74320600049ccc7d0e0b1becd3b4bd0a03c745758225e31a59f4095c990"}, {file = "pyee-12.0.0.tar.gz", hash = "sha256:c480603f4aa2927d4766eb41fa82793fe60a82cbfdb8d688e0d08c55a534e145"}, @@ -1750,6 +1886,8 @@ version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, {file = "pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f"}, @@ -1764,6 +1902,8 @@ version = "1.2.0" description = "Wrappers to call pyproject.toml-based build backend hooks." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pyproject_hooks-1.2.0-py3-none-any.whl", hash = "sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913"}, {file = "pyproject_hooks-1.2.0.tar.gz", hash = "sha256:1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8"}, @@ -1775,6 +1915,8 @@ version = "1.1.334" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pyright-1.1.334-py3-none-any.whl", hash = "sha256:dcb13e8358e021189672c4d6ebcad192ab061e4c7225036973ec493183c6da68"}, {file = "pyright-1.1.334.tar.gz", hash = "sha256:3adaf10f1f4209575dc022f9c897f7ef024639b7ea5b3cbe49302147e6949cd4"}, @@ -1793,6 +1935,8 @@ version = "1.7.1" description = "A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information." optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "PySocks-1.7.1-py27-none-any.whl", hash = "sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299"}, {file = "PySocks-1.7.1-py3-none-any.whl", hash = "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5"}, @@ -1805,6 +1949,8 @@ version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, @@ -1827,6 +1973,8 @@ version = "0.25.2" description = "Pytest support for asyncio" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytest_asyncio-0.25.2-py3-none-any.whl", hash = "sha256:0d0bb693f7b99da304a0634afc0a4b19e49d5e0de2d670f38dc4bfa5727c5075"}, {file = "pytest_asyncio-0.25.2.tar.gz", hash = "sha256:3f8ef9a98f45948ea91a0ed3dc4268b5326c0e7bce73892acc654df4262ad45f"}, @@ -1845,6 +1993,8 @@ version = "2.1.0" description = "pytest plugin for URL based testing" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytest_base_url-2.1.0-py3-none-any.whl", hash = "sha256:3ad15611778764d451927b2a53240c1a7a591b521ea44cebfe45849d2d2812e6"}, {file = "pytest_base_url-2.1.0.tar.gz", hash = "sha256:02748589a54f9e63fcbe62301d6b0496da0d10231b753e950c63e03aee745d45"}, @@ -1863,6 +2013,8 @@ version = "5.1.0" description = "A ``pytest`` fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer." optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytest-benchmark-5.1.0.tar.gz", hash = "sha256:9ea661cdc292e8231f7cd4c10b0319e56a2118e2c09d9f50e1b3d150d2aca105"}, {file = "pytest_benchmark-5.1.0-py3-none-any.whl", hash = "sha256:922de2dfa3033c227c96da942d1878191afa135a29485fb942e85dff1c592c89"}, @@ -1883,6 +2035,8 @@ version = "6.0.0" description = "Pytest plugin for measuring coverage." optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0"}, {file = "pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35"}, @@ -1901,6 +2055,8 @@ version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, @@ -1918,6 +2074,8 @@ version = "0.6.2" description = "A pytest wrapper with fixtures for Playwright to automate web browsers" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytest_playwright-0.6.2-py3-none-any.whl", hash = "sha256:0eff73bebe497b0158befed91e2f5fe94cfa17181f8b3acf575beed84e7e9043"}, {file = "pytest_playwright-0.6.2.tar.gz", hash = "sha256:ff4054b19aa05df096ac6f74f0572591566aaf0f6d97f6cb9674db8a4d4ed06c"}, @@ -1935,6 +2093,8 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -1949,6 +2109,8 @@ version = "4.11.2" description = "Engine.IO server and client for Python" optional = false python-versions = ">=3.6" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "python_engineio-4.11.2-py3-none-any.whl", hash = "sha256:f0971ac4c65accc489154fe12efd88f53ca8caf04754c46a66e85f5102ef22ad"}, {file = "python_engineio-4.11.2.tar.gz", hash = "sha256:145bb0daceb904b4bb2d3eb2d93f7dbb7bb87a6a0c4f20a94cc8654dec977129"}, @@ -1968,6 +2130,8 @@ version = "0.0.20" description = "A streaming multipart parser for Python" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104"}, {file = "python_multipart-0.0.20.tar.gz", hash = "sha256:8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13"}, @@ -1979,6 +2143,8 @@ version = "8.0.4" description = "A Python slugify application that also handles Unicode" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "python-slugify-8.0.4.tar.gz", hash = "sha256:59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856"}, {file = "python_slugify-8.0.4-py2.py3-none-any.whl", hash = "sha256:276540b79961052b66b7d116620b36518847f52d5fd9e3a70164fc8c50faa6b8"}, @@ -1996,6 +2162,8 @@ version = "5.12.1" description = "Socket.IO server and client for Python" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "python_socketio-5.12.1-py3-none-any.whl", hash = "sha256:24a0ea7cfff0e021eb28c68edbf7914ee4111bdf030b95e4d250c4dc9af7a386"}, {file = "python_socketio-5.12.1.tar.gz", hash = "sha256:0299ff1f470b676c09c1bfab1dead25405077d227b2c13cf217a34dadc68ba9c"}, @@ -2016,6 +2184,8 @@ version = "2024.2" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, @@ -2027,6 +2197,8 @@ version = "0.2.3" description = "A (partial) reimplementation of pywin32 using ctypes/cffi" optional = false python-versions = ">=3.6" +groups = ["main"] +markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"win32\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" files = [ {file = "pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755"}, {file = "pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"}, @@ -2038,6 +2210,8 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -2100,6 +2274,8 @@ version = "44.0" description = "readme_renderer is a library for rendering readme descriptions for Warehouse" optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "readme_renderer-44.0-py3-none-any.whl", hash = "sha256:2fbca89b81a08526aadf1357a8c2ae889ec05fb03f5da67f9769c9a592166151"}, {file = "readme_renderer-44.0.tar.gz", hash = "sha256:8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1"}, @@ -2119,6 +2295,8 @@ version = "5.2.1" description = "Python client for Redis database and key-value store" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "redis-5.2.1-py3-none-any.whl", hash = "sha256:ee7e1056b9aea0f04c6c2ed59452947f34c4940ee025f5dd83e6a6418b6989e4"}, {file = "redis-5.2.1.tar.gz", hash = "sha256:16f2e22dff21d5125e8481515e386711a34cbec50f0e44413dd7d9c060a54e0f"}, @@ -2137,6 +2315,8 @@ version = "0.1.32" description = "Reflex Hosting CLI" optional = false python-versions = "<4.0,>=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "reflex_hosting_cli-0.1.32-py3-none-any.whl", hash = "sha256:86b4222f3e99d949a209be7de8c457ededebc1f12a721ee6669c6c35fdecc508"}, {file = "reflex_hosting_cli-0.1.32.tar.gz", hash = "sha256:0b8e4b4b30d9261bf6d720265f1c428b2840bb630896e60a1a2faa095901ed59"}, @@ -2161,6 +2341,8 @@ version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, @@ -2182,6 +2364,8 @@ version = "1.0.0" description = "A utility belt for advanced users of python-requests" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, @@ -2196,6 +2380,8 @@ version = "2.0.0" description = "Validating URI References per RFC 3986" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "rfc3986-2.0.0-py2.py3-none-any.whl", hash = "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd"}, {file = "rfc3986-2.0.0.tar.gz", hash = "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c"}, @@ -2210,6 +2396,8 @@ version = "13.9.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.8.0" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, @@ -2229,6 +2417,8 @@ version = "0.8.2" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "ruff-0.8.2-py3-none-linux_armv6l.whl", hash = "sha256:c49ab4da37e7c457105aadfd2725e24305ff9bc908487a9bf8d548c6dad8bb3d"}, {file = "ruff-0.8.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ec016beb69ac16be416c435828be702ee694c0d722505f9c1f35e1b9c0cc1bf5"}, @@ -2256,6 +2446,8 @@ version = "3.3.3" description = "Python bindings to FreeDesktop.org Secret Service API" optional = false python-versions = ">=3.6" +groups = ["main"] +markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" files = [ {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, @@ -2271,6 +2463,8 @@ version = "4.28.0" description = "Official Python bindings for Selenium WebDriver" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "selenium-4.28.0-py3-none-any.whl", hash = "sha256:3d6a2e8e1b850a1078884ea19f4e011ecdc12263434d87a0b78769836fb82dd8"}, {file = "selenium-4.28.0.tar.gz", hash = "sha256:a9fae6eef48d470a1b0c6e45185d96f0dafb025e8da4b346cc41e4da3ac54fa0"}, @@ -2290,6 +2484,8 @@ version = "75.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "setuptools-75.8.0-py3-none-any.whl", hash = "sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3"}, {file = "setuptools-75.8.0.tar.gz", hash = "sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6"}, @@ -2310,6 +2506,8 @@ version = "1.5.4" description = "Tool to Detect Surrounding Shell" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, @@ -2321,6 +2519,8 @@ version = "1.1.0" description = "Simple WebSocket server and client for Python" optional = false python-versions = ">=3.6" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "simple_websocket-1.1.0-py3-none-any.whl", hash = "sha256:4af6069630a38ed6c561010f0e11a5bc0d4ca569b36306eb257cd9a192497c8c"}, {file = "simple_websocket-1.1.0.tar.gz", hash = "sha256:7939234e7aa067c534abdab3a9ed933ec9ce4691b0713c78acb195560aa52ae4"}, @@ -2339,6 +2539,8 @@ version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, @@ -2350,6 +2552,8 @@ version = "1.3.1" description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, @@ -2361,6 +2565,8 @@ version = "2.4.0" description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set" optional = false python-versions = "*" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0"}, {file = "sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"}, @@ -2372,6 +2578,8 @@ version = "2.0.37" description = "Database Abstraction Library" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "SQLAlchemy-2.0.37-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:da36c3b0e891808a7542c5c89f224520b9a16c7f5e4d6a1156955605e54aef0e"}, {file = "SQLAlchemy-2.0.37-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e7402ff96e2b073a98ef6d6142796426d705addd27b9d26c3b32dbaa06d7d069"}, @@ -2467,6 +2675,8 @@ version = "0.0.22" description = "SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "sqlmodel-0.0.22-py3-none-any.whl", hash = "sha256:a1ed13e28a1f4057cbf4ff6cdb4fc09e85702621d3259ba17b3c230bfb2f941b"}, {file = "sqlmodel-0.0.22.tar.gz", hash = "sha256:7d37c882a30c43464d143e35e9ecaf945d88035e20117bf5ec2834a23cbe505e"}, @@ -2482,6 +2692,8 @@ version = "0.41.3" description = "The little ASGI library that shines." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "starlette-0.41.3-py3-none-any.whl", hash = "sha256:44cedb2b7c77a9de33a8b74b2b90e9f50d11fcf25d8270ea525ad71a25374ff7"}, {file = "starlette-0.41.3.tar.gz", hash = "sha256:0e4ab3d16522a255be6b28260b938eae2482f98ce5cc934cb08dce8dc3ba5835"}, @@ -2499,6 +2711,8 @@ version = "0.14.1" description = "Fast, beautiful and extensible administrative interface framework for Starlette/FastApi applications" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "starlette_admin-0.14.1-py3-none-any.whl", hash = "sha256:5b6260d7ed3db455585852d669feb7ed9a8c5f9a1e3d48d21a52912ec37e18f9"}, {file = "starlette_admin-0.14.1.tar.gz", hash = "sha256:45e2baa3b9a8deec7a6e8ca9295123f648bb0d2070abe68f27193c6d5e32cc38"}, @@ -2522,6 +2736,8 @@ version = "0.9.0" description = "Pretty-print tabular data" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f"}, {file = "tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"}, @@ -2536,6 +2752,8 @@ version = "9.0.0" description = "Retry code until it succeeds" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "tenacity-9.0.0-py3-none-any.whl", hash = "sha256:93de0c98785b27fcf659856aa9f54bfbd399e29969b0621bc7f762bd441b4539"}, {file = "tenacity-9.0.0.tar.gz", hash = "sha256:807f37ca97d62aa361264d497b0e31e92b8027044942bfa756160d908320d73b"}, @@ -2551,6 +2769,8 @@ version = "1.3" description = "The most basic Text::Unidecode port" optional = false python-versions = "*" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "text-unidecode-1.3.tar.gz", hash = "sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93"}, {file = "text_unidecode-1.3-py2.py3-none-any.whl", hash = "sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8"}, @@ -2562,6 +2782,8 @@ version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, @@ -2573,6 +2795,8 @@ version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] +markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -2614,6 +2838,8 @@ version = "0.13.2" description = "Style preserving TOML library" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, @@ -2625,6 +2851,8 @@ version = "0.28.0" description = "A friendly Python library for async concurrency and I/O" optional = false python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "trio-0.28.0-py3-none-any.whl", hash = "sha256:56d58977acc1635735a96581ec70513cc781b8b6decd299c487d3be2a721cd94"}, {file = "trio-0.28.0.tar.gz", hash = "sha256:4e547896fe9e8a5658e54e4c7c5fa1db748cbbbaa7c965e7d40505b928c73c05"}, @@ -2645,6 +2873,8 @@ version = "0.11.1" description = "WebSocket library for Trio" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "trio-websocket-0.11.1.tar.gz", hash = "sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f"}, {file = "trio_websocket-0.11.1-py3-none-any.whl", hash = "sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638"}, @@ -2661,6 +2891,8 @@ version = "6.1.0" description = "Collection of utilities for publishing packages on PyPI" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "twine-6.1.0-py3-none-any.whl", hash = "sha256:a47f973caf122930bf0fbbf17f80b83bc1602c9ce393c7845f289a3001dc5384"}, {file = "twine-6.1.0.tar.gz", hash = "sha256:be324f6272eff91d07ee93f251edf232fc647935dd585ac003539b42404a8dbd"}, @@ -2686,6 +2918,8 @@ version = "0.15.1" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "typer-0.15.1-py3-none-any.whl", hash = "sha256:7994fb7b8155b64d3402518560648446072864beefd44aa2dc36972a5972e847"}, {file = "typer-0.15.1.tar.gz", hash = "sha256:a0588c0a7fa68a1978a069818657778f86abe6ff5ea6abf472f940a08bfe4f0a"}, @@ -2703,6 +2937,8 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -2714,6 +2950,8 @@ version = "2025.1" description = "Provider of IANA time zone data" optional = false python-versions = ">=2" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "tzdata-2025.1-py2.py3-none-any.whl", hash = "sha256:7e127113816800496f027041c570f50bcd464a020098a3b6b199517772303639"}, {file = "tzdata-2025.1.tar.gz", hash = "sha256:24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694"}, @@ -2725,6 +2963,8 @@ version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.9" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, @@ -2745,6 +2985,8 @@ version = "0.34.0" description = "The lightning-fast ASGI server." optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, {file = "uvicorn-0.34.0.tar.gz", hash = "sha256:404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9"}, @@ -2764,6 +3006,8 @@ version = "20.29.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "virtualenv-20.29.1-py3-none-any.whl", hash = "sha256:4e4cb403c0b0da39e13b46b1b2476e505cb0046b25f242bee80f62bf990b2779"}, {file = "virtualenv-20.29.1.tar.gz", hash = "sha256:b8b8970138d32fb606192cb97f6cd4bb644fa486be9308fb9b63f81091b5dc35"}, @@ -2784,6 +3028,8 @@ version = "1.8.0" description = "WebSocket client for Python with low level API options" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "websocket_client-1.8.0-py3-none-any.whl", hash = "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526"}, {file = "websocket_client-1.8.0.tar.gz", hash = "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da"}, @@ -2800,6 +3046,8 @@ version = "14.2" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "websockets-14.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e8179f95323b9ab1c11723e5d91a89403903f7b001828161b480a7810b334885"}, {file = "websockets-14.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0d8c3e2cdb38f31d8bd7d9d28908005f6fa9def3324edb9bf336d7e4266fd397"}, @@ -2878,6 +3126,8 @@ version = "0.45.1" description = "A built-package format for Python" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "wheel-0.45.1-py3-none-any.whl", hash = "sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248"}, {file = "wheel-0.45.1.tar.gz", hash = "sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729"}, @@ -2892,6 +3142,8 @@ version = "1.17.2" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3d57c572081fed831ad2d26fd430d565b76aa277ed1d30ff4d40670b1c0dd984"}, {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5e251054542ae57ac7f3fba5d10bfff615b6c2fb09abeb37d2f1463f841ae22"}, @@ -2980,6 +3232,8 @@ version = "1.2.0" description = "WebSockets state-machine based protocol implementation" optional = false python-versions = ">=3.7.0" +groups = ["main", "dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "wsproto-1.2.0-py3-none-any.whl", hash = "sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736"}, {file = "wsproto-1.2.0.tar.gz", hash = "sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065"}, @@ -2994,6 +3248,8 @@ version = "3.21.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.9" +groups = ["main"] +markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and python_version <= \"3.11\" or python_full_version < \"3.10.2\"" files = [ {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, @@ -3008,6 +3264,6 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", type = ["pytest-mypy"] [metadata] -lock-version = "2.0" -python-versions = "^3.10" -content-hash = "fe74f0936bfcc691653b16771a276b2f7d7469c578d81a52277a36f9ad398edb" +lock-version = "2.1" +python-versions = ">=3.10, <4.0" +content-hash = "376707066a00c43aef555c6db2ccb0ddfde0ee9011e8f20110d728fb723f1662" diff --git a/pyproject.toml b/pyproject.toml index 03580cd0f..d19d1a0ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ keywords = ["web", "framework"] classifiers = ["Development Status :: 4 - Beta"] [tool.poetry.dependencies] -python = "^3.10" +python = ">=3.10, <4.0" fastapi = ">=0.96.0,!=0.111.0,!=0.111.1" gunicorn = ">=20.1.0,<24.0" jinja2 = ">=3.1.2,<4.0" @@ -82,7 +82,7 @@ build-backend = "poetry.core.masonry.api" [tool.pyright] [tool.ruff] -target-version = "py39" +target-version = "py310" output-format = "concise" lint.isort.split-on-trailing-comma = false lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PTH", "RUF", "SIM", "T", "TRY", "W"] diff --git a/reflex/app.py b/reflex/app.py index d432925ab..2e9765d21 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -672,7 +672,10 @@ class App(MiddlewareMixin, LifespanMixin): for route in self._pages: replaced_route = replace_brackets_with_keywords(route) for rw, r, nr in zip( - replaced_route.split("/"), route.split("/"), new_route.split("/") + replaced_route.split("/"), + route.split("/"), + new_route.split("/"), + strict=False, ): if rw in segments and r != nr: # If the slugs in the segments of both routes are not the same, then the route is invalid @@ -1039,7 +1042,7 @@ class App(MiddlewareMixin, LifespanMixin): max_workers=environment.REFLEX_COMPILE_THREADS.get() or None ) - for route, component in zip(self._pages, page_components): + for route, component in zip(self._pages, page_components, strict=True): ExecutorSafeFunctions.COMPONENTS[route] = component ExecutorSafeFunctions.STATE = self._state @@ -1236,6 +1239,7 @@ class App(MiddlewareMixin, LifespanMixin): frontend_arg_spec, backend_arg_spec, ], + strict=True, ): if hasattr(handler_fn, "__name__"): _fn_name = handler_fn.__name__ diff --git a/reflex/components/core/breakpoints.py b/reflex/components/core/breakpoints.py index 25396ecd9..9a8ef1556 100644 --- a/reflex/components/core/breakpoints.py +++ b/reflex/components/core/breakpoints.py @@ -82,7 +82,9 @@ class Breakpoints(Dict[K, V]): return Breakpoints( { k: v - for k, v in zip(["initial", *breakpoint_names], thresholds) + for k, v in zip( + ["initial", *breakpoint_names], thresholds, strict=True + ) if v is not None } ) diff --git a/reflex/event.py b/reflex/event.py index 6da65c366..96c2c30b9 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -243,7 +243,7 @@ class EventHandler(EventActionsMixin): raise EventHandlerTypeError( f"Arguments to event handlers must be Vars or JSON-serializable. Got {arg} of type {type(arg)}." ) from e - payload = tuple(zip(fn_args, values)) + payload = tuple(zip(fn_args, values, strict=False)) # Return the event spec. return EventSpec( @@ -337,7 +337,7 @@ class EventSpec(EventActionsMixin): raise EventHandlerTypeError( f"Arguments to event handlers must be Vars or JSON-serializable. Got {arg} of type {type(arg)}." ) from e - new_payload = tuple(zip(fn_args, values)) + new_payload = tuple(zip(fn_args, values, strict=False)) return self.with_args(self.args + new_payload) diff --git a/reflex/state.py b/reflex/state.py index 40afcbc79..be3deda78 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -1434,6 +1434,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): for part1, part2 in zip( cls.get_full_name().split("."), other.get_full_name().split("."), + strict=True, ): if part1 != part2: break diff --git a/reflex/utils/types.py b/reflex/utils/types.py index ac30342e2..0b3ec7e9f 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -605,7 +605,9 @@ def _isinstance(obj: Any, cls: GenericType, nested: bool = False) -> bool: return ( isinstance(obj, tuple) and len(obj) == len(args) - and all(_isinstance(item, arg) for item, arg in zip(obj, args)) + and all( + _isinstance(item, arg) for item, arg in zip(obj, args, strict=True) + ) ) if origin in (dict, Breakpoints): return isinstance(obj, dict) and all( @@ -808,7 +810,7 @@ def validate_parameter_literals(func): annotations = {param[0]: param[1].annotation for param in func_params} # validate args - for param, arg in zip(annotations, args): + for param, arg in zip(annotations, args, strict=False): if annotations[param] is inspect.Parameter.empty: continue validate_literal(param, arg, annotations[param], func.__name__) @@ -906,6 +908,8 @@ def typehint_issubclass(possible_subclass: Any, possible_superclass: Any) -> boo # It also ignores when the length of the arguments is different return all( typehint_issubclass(provided_arg, accepted_arg) - for provided_arg, accepted_arg in zip(provided_args, accepted_args) + for provided_arg, accepted_arg in zip( + provided_args, accepted_args, strict=False + ) if accepted_arg is not Any ) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index f6359166f..a3b3059e9 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -2721,7 +2721,7 @@ def generic_type_to_actual_type_map( # call recursively for nested generic types and merge the results return { k: v - for generic_arg, actual_arg in zip(generic_args, actual_args) + for generic_arg, actual_arg in zip(generic_args, actual_args, strict=True) for k, v in generic_type_to_actual_type_map(generic_arg, actual_arg).items() } diff --git a/tests/units/compiler/test_compiler.py b/tests/units/compiler/test_compiler.py index 22f5c8483..25c351c01 100644 --- a/tests/units/compiler/test_compiler.py +++ b/tests/units/compiler/test_compiler.py @@ -100,7 +100,7 @@ def test_compile_imports(import_dict: ParsedImportDict, test_dicts: List[dict]): test_dicts: The expected output. """ imports = utils.compile_imports(import_dict) - for import_dict, test_dict in zip(imports, test_dicts): + for import_dict, test_dict in zip(imports, test_dicts, strict=True): assert import_dict["lib"] == test_dict["lib"] assert import_dict["default"] == test_dict["default"] assert sorted(import_dict["rest"]) == test_dict["rest"] # type: ignore diff --git a/tests/units/components/test_component.py b/tests/units/components/test_component.py index 5bad24499..6ea459142 100644 --- a/tests/units/components/test_component.py +++ b/tests/units/components/test_component.py @@ -1446,6 +1446,7 @@ def test_get_vars(component, exp_vars): for comp_var, exp_var in zip( comp_vars, sorted(exp_vars, key=lambda v: v._js_expr), + strict=True, ): assert comp_var.equals(exp_var) @@ -1827,6 +1828,7 @@ def test_custom_component_declare_event_handlers_in_fields(): for v1, v2 in zip( parse_args_spec(test_triggers[trigger_name]), parse_args_spec(custom_triggers[trigger_name]), + strict=True, ): assert v1.equals(v2) diff --git a/tests/units/test_var.py b/tests/units/test_var.py index 88f05a53e..51b0d9a2b 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -188,6 +188,7 @@ def ChildWithRuntimeOnlyVar(StateWithRuntimeOnlyVar): "state.local", "local2", ], + strict=True, ), ) def test_full_name(prop, expected): @@ -205,6 +206,7 @@ def test_full_name(prop, expected): zip( test_vars, ["prop1", "key", "state.value", "state.local", "local2"], + strict=True, ), ) def test_str(prop, expected): @@ -251,6 +253,7 @@ def test_default_value(prop: Var, expected): "state.set_local", "set_local2", ], + strict=True, ), ) def test_get_setter(prop: Var, expected): From 64fb78ac5e3310fa4783739f9054468b5913cf06 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 28 Jan 2025 11:46:00 -0800 Subject: [PATCH 049/144] fix subprotocol for granian (#4698) * fix subprotocol for granian * use scope subprotocols * use subprotocols or headers * separate the logic --- reflex/app.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 2e9765d21..20c01cba6 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -27,6 +27,7 @@ from typing import ( Dict, Generic, List, + MutableMapping, Optional, Set, Type, @@ -410,20 +411,25 @@ class App(MiddlewareMixin, LifespanMixin): def __init__(self, app): self.app = app - async def __call__(self, scope, receive, send): + async def __call__( + self, scope: MutableMapping[str, Any], receive, send + ): original_send = send async def modified_send(message): - headers = dict(scope["headers"]) - protocol_key = b"sec-websocket-protocol" - if ( - message["type"] == "websocket.accept" - and protocol_key in headers - ): - message["headers"] = [ - *message.get("headers", []), - (b"sec-websocket-protocol", headers[protocol_key]), - ] + if message["type"] == "websocket.accept": + if scope.get("subprotocols"): + # The following *does* say "subprotocol" instead of "subprotocols", intentionally. + message["subprotocol"] = scope["subprotocols"][0] + + headers = dict(message.get("headers", [])) + header_key = b"sec-websocket-protocol" + if subprotocol := headers.get(header_key): + message["headers"] = [ + *message.get("headers", []), + (header_key, subprotocol), + ] + return await original_send(message) return await self.app(scope, receive, modified_send) From 42e6dfa40d428c81cd1dd724a7e6cb463f3f63b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 28 Jan 2025 22:11:05 +0100 Subject: [PATCH 050/144] enable PGH, bump pyright and fix all #type: ignore (#4699) * enable PGH, bump pyright and fix all #type: ignore * relock poetry file * ignore incompatible override * fix varop tests * ignore missing imports * fix * fix stuff * fix tests * rechange tests * relock with poetry 2.0 --- .pre-commit-config.yaml | 2 +- .../test_benchmark_compile_components.py | 20 +- benchmarks/test_benchmark_compile_pages.py | 26 +-- poetry.lock | 192 ++++-------------- pyproject.toml | 7 +- reflex/__init__.pyi | 2 +- reflex/app.py | 6 +- reflex/app_mixins/lifespan.py | 10 +- reflex/app_mixins/middleware.py | 12 +- reflex/base.py | 12 +- reflex/compiler/utils.py | 6 +- reflex/components/base/bare.py | 2 +- reflex/components/base/meta.py | 4 +- reflex/components/component.py | 18 +- reflex/components/core/banner.py | 8 +- reflex/components/core/cond.py | 17 +- reflex/components/core/debounce.py | 2 +- reflex/components/core/match.py | 8 +- reflex/components/core/upload.py | 2 +- reflex/components/datadisplay/code.py | 2 +- reflex/components/datadisplay/dataeditor.py | 6 +- .../datadisplay/shiki_code_block.py | 11 +- reflex/components/el/constants/reflex.py | 2 +- reflex/components/el/elements/forms.py | 4 +- reflex/components/markdown/markdown.py | 10 +- reflex/components/moment/moment.py | 4 +- reflex/components/next/link.py | 2 +- reflex/components/plotly/plotly.py | 8 +- reflex/components/props.py | 4 +- reflex/components/radix/__init__.pyi | 2 +- reflex/components/radix/primitives/drawer.py | 2 +- .../components/radix/primitives/progress.py | 2 +- reflex/components/radix/primitives/slider.py | 2 +- reflex/components/radix/themes/color_mode.py | 4 +- .../radix/themes/components/radio_group.py | 2 +- .../radix/themes/components/text_field.py | 2 +- .../radix/themes/layout/__init__.pyi | 2 +- reflex/components/radix/themes/layout/list.py | 2 +- .../components/radix/themes/layout/stack.py | 4 +- .../radix/themes/typography/link.py | 2 +- .../radix/themes/typography/text.py | 4 +- .../components/react_player/react_player.py | 2 +- reflex/components/recharts/charts.py | 22 +- reflex/components/recharts/polar.py | 2 +- reflex/components/sonner/toast.py | 8 +- reflex/components/tags/iter_tag.py | 6 +- reflex/config.py | 6 +- reflex/custom_components/custom_components.py | 2 +- reflex/event.py | 50 ++--- reflex/experimental/client_state.py | 4 +- reflex/experimental/layout.py | 10 +- reflex/model.py | 4 +- reflex/reflex.py | 4 +- reflex/state.py | 28 +-- reflex/style.py | 2 +- reflex/testing.py | 36 ++-- reflex/utils/compat.py | 8 +- reflex/utils/console.py | 6 +- reflex/utils/exec.py | 26 ++- reflex/utils/format.py | 10 +- reflex/utils/imports.py | 2 +- reflex/utils/prerequisites.py | 10 +- reflex/utils/processes.py | 8 +- reflex/utils/pyi_generator.py | 36 ++-- reflex/utils/serializers.py | 2 +- reflex/utils/types.py | 26 ++- reflex/vars/base.py | 56 ++--- reflex/vars/datetime.py | 8 +- reflex/vars/function.py | 4 +- reflex/vars/number.py | 34 ++-- reflex/vars/object.py | 12 +- reflex/vars/sequence.py | 34 ++-- tests/integration/test_background_task.py | 10 +- tests/integration/test_component_state.py | 6 +- tests/integration/test_connection_banner.py | 2 +- tests/integration/test_deploy_url.py | 2 +- tests/integration/test_dynamic_routes.py | 22 +- tests/integration/test_event_actions.py | 30 +-- tests/integration/test_event_chain.py | 46 ++--- tests/integration/test_exception_handlers.py | 4 +- tests/integration/test_input.py | 4 +- tests/integration/test_lifespan.py | 6 +- tests/integration/test_login_flow.py | 4 +- tests/integration/test_media.py | 4 +- tests/integration/test_state_inheritance.py | 12 +- tests/integration/test_upload.py | 8 +- tests/integration/test_var_operations.py | 60 +++--- .../tests_playwright/test_appearance.py | 8 +- .../test_datetime_operations.py | 2 +- .../tests_playwright/test_link_hover.py | 2 +- tests/units/compiler/test_compiler.py | 10 +- tests/units/components/core/test_colors.py | 24 +-- tests/units/components/core/test_cond.py | 8 +- tests/units/components/core/test_html.py | 6 +- tests/units/components/core/test_match.py | 4 +- tests/units/components/core/test_upload.py | 10 +- .../units/components/datadisplay/test_code.py | 2 +- .../components/datadisplay/test_datatable.py | 6 +- .../components/datadisplay/test_shiki_code.py | 10 +- tests/units/components/forms/test_form.py | 2 +- tests/units/components/media/test_image.py | 12 +- tests/units/components/test_component.py | 52 ++--- .../components/typography/test_markdown.py | 10 +- tests/units/conftest.py | 10 +- tests/units/states/mutation.py | 2 +- tests/units/test_app.py | 66 +++--- tests/units/test_config.py | 4 +- tests/units/test_event.py | 8 +- tests/units/test_health_endpoint.py | 4 +- tests/units/test_model.py | 14 +- tests/units/test_prerequisites.py | 2 +- tests/units/test_sqlalchemy.py | 8 +- tests/units/test_state.py | 114 +++++------ tests/units/test_style.py | 8 +- tests/units/test_var.py | 12 +- tests/units/utils/test_format.py | 6 +- tests/units/utils/test_utils.py | 6 +- 117 files changed, 731 insertions(+), 828 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54d8f3d72..dbe069ae8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: entry: python3 scripts/make_pyi.py - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.334 + rev: v1.1.392 hooks: - id: pyright args: [reflex, tests] diff --git a/benchmarks/test_benchmark_compile_components.py b/benchmarks/test_benchmark_compile_components.py index ba7e9c571..9bcfbf85b 100644 --- a/benchmarks/test_benchmark_compile_components.py +++ b/benchmarks/test_benchmark_compile_components.py @@ -34,13 +34,13 @@ def render_component(num: int): rx.box( rx.accordion.root( rx.accordion.item( - header="Full Ingredients", # type: ignore - content="Yes. It's built with accessibility in mind.", # type: ignore + header="Full Ingredients", + content="Yes. It's built with accessibility in mind.", font_size="3em", ), rx.accordion.item( - header="Applications", # type: ignore - content="Yes. It's unstyled by default, giving you freedom over the look and feel.", # type: ignore + header="Applications", + content="Yes. It's unstyled by default, giving you freedom over the look and feel.", ), collapsible=True, variant="ghost", @@ -166,9 +166,9 @@ def app_with_10_components( root=root, app_source=functools.partial( AppWithTenComponentsOnePage, - render_component=render_component, # type: ignore + render_component=render_component, # pyright: ignore [reportCallIssue] ), - ) # type: ignore + ) @pytest.fixture(scope="session") @@ -189,9 +189,9 @@ def app_with_100_components( root=root, app_source=functools.partial( AppWithHundredComponentOnePage, - render_component=render_component, # type: ignore + render_component=render_component, # pyright: ignore [reportCallIssue] ), - ) # type: ignore + ) @pytest.fixture(scope="session") @@ -212,9 +212,9 @@ def app_with_1000_components( root=root, app_source=functools.partial( AppWithThousandComponentsOnePage, - render_component=render_component, # type: ignore + render_component=render_component, # pyright: ignore [reportCallIssue] ), - ) # type: ignore + ) @pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) diff --git a/benchmarks/test_benchmark_compile_pages.py b/benchmarks/test_benchmark_compile_pages.py index a5c85810e..149fc6130 100644 --- a/benchmarks/test_benchmark_compile_pages.py +++ b/benchmarks/test_benchmark_compile_pages.py @@ -28,7 +28,7 @@ def render_multiple_pages(app, num: int): """ from typing import Tuple - from rxconfig import config # type: ignore + from rxconfig import config # pyright: ignore [reportMissingImports] import reflex as rx @@ -74,13 +74,13 @@ def render_multiple_pages(app, num: int): rx.select( ["C", "PF", "SF", "PG", "SG"], placeholder="Select a position. (All)", - on_change=State.set_position, # type: ignore + on_change=State.set_position, # pyright: ignore [reportAttributeAccessIssue] size="3", ), rx.select( college, placeholder="Select a college. (All)", - on_change=State.set_college, # type: ignore + on_change=State.set_college, # pyright: ignore [reportAttributeAccessIssue] size="3", ), ), @@ -95,7 +95,7 @@ def render_multiple_pages(app, num: int): default_value=[18, 50], min=18, max=50, - on_value_commit=State.set_age, # type: ignore + on_value_commit=State.set_age, # pyright: ignore [reportAttributeAccessIssue] ), align_items="left", width="100%", @@ -110,7 +110,7 @@ def render_multiple_pages(app, num: int): default_value=[0, 25000000], min=0, max=25000000, - on_value_commit=State.set_salary, # type: ignore + on_value_commit=State.set_salary, # pyright: ignore [reportAttributeAccessIssue] ), align_items="left", width="100%", @@ -130,7 +130,7 @@ def render_multiple_pages(app, num: int): def AppWithOnePage(): """A reflex app with one page.""" - from rxconfig import config # type: ignore + from rxconfig import config # pyright: ignore [reportMissingImports] import reflex as rx @@ -232,7 +232,7 @@ def app_with_ten_pages( root=root, app_source=functools.partial( AppWithTenPages, - render_comp=render_multiple_pages, # type: ignore + render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue] ), ) @@ -255,9 +255,9 @@ def app_with_hundred_pages( root=root, app_source=functools.partial( AppWithHundredPages, - render_comp=render_multiple_pages, # type: ignore + render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue] ), - ) # type: ignore + ) @pytest.fixture(scope="session") @@ -278,9 +278,9 @@ def app_with_thousand_pages( root=root, app_source=functools.partial( AppWithThousandPages, - render_comp=render_multiple_pages, # type: ignore + render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue] ), - ) # type: ignore + ) @pytest.fixture(scope="session") @@ -301,9 +301,9 @@ def app_with_ten_thousand_pages( root=root, app_source=functools.partial( AppWithTenThousandPages, - render_comp=render_multiple_pages, # type: ignore + render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue] ), - ) # type: ignore + ) @pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) diff --git a/poetry.lock b/poetry.lock index 68e8e37db..f8d4cf949 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. [[package]] name = "alembic" @@ -86,15 +86,15 @@ files = [ [[package]] name = "attrs" -version = "24.3.0" +version = "25.1.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, - {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, + {file = "attrs-25.1.0-py3-none-any.whl", hash = "sha256:c75a69e28a550a7e93789579c22aa26b0f5b83b75dc4e08fe092980051e1090a"}, + {file = "attrs-25.1.0.tar.gz", hash = "sha256:1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e"}, ] [package.extras] @@ -620,25 +620,25 @@ test = ["pytest (>=6)"] [[package]] name = "fastapi" -version = "0.115.6" +version = "0.115.7" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "fastapi-0.115.6-py3-none-any.whl", hash = "sha256:e9240b29e36fa8f4bb7290316988e90c381e5092e0cbe84e7818cc3713bcf305"}, - {file = "fastapi-0.115.6.tar.gz", hash = "sha256:9ec46f7addc14ea472958a96aae5b5de65f39721a46aaf5705c480d9a8b76654"}, + {file = "fastapi-0.115.7-py3-none-any.whl", hash = "sha256:eb6a8c8bf7f26009e8147111ff15b5177a0e19bb4a45bc3486ab14804539d21e"}, + {file = "fastapi-0.115.7.tar.gz", hash = "sha256:0f106da6c01d88a6786b3248fb4d7a940d071f6f488488898ad5d354b25ed015"}, ] [package.dependencies] pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" -starlette = ">=0.40.0,<0.42.0" +starlette = ">=0.40.0,<0.46.0" typing-extensions = ">=4.8.0" [package.extras] -all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.7)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] -standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=2.11.2)", "python-multipart (>=0.0.7)", "uvicorn[standard] (>=0.12.0)"] +all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] +standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] [[package]] name = "filelock" @@ -740,7 +740,7 @@ files = [ {file = "greenlet-3.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:3319aa75e0e0639bc15ff54ca327e8dc7a6fe404003496e3c6925cd3142e0e22"}, {file = "greenlet-3.1.1.tar.gz", hash = "sha256:4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467"}, ] -markers = {main = "python_version < \"3.14\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\") and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} +markers = {main = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\") and python_version < \"3.14\"", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} [package.extras] docs = ["Sphinx", "furo"] @@ -1540,39 +1540,6 @@ tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "ole typing = ["typing-extensions"] xmp = ["defusedxml"] -[[package]] -name = "pip" -version = "24.3.1" -description = "The PyPA recommended tool for installing Python packages." -optional = false -python-versions = ">=3.8" -groups = ["main"] -markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "pip-24.3.1-py3-none-any.whl", hash = "sha256:3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed"}, - {file = "pip-24.3.1.tar.gz", hash = "sha256:ebcb60557f2aefabc2e0f918751cd24ea0d56d8ec5445fe1807f1d2109660b99"}, -] - -[[package]] -name = "pipdeptree" -version = "2.16.2" -description = "Command line utility to show dependency tree of packages." -optional = false -python-versions = ">=3.8" -groups = ["main"] -markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "pipdeptree-2.16.2-py3-none-any.whl", hash = "sha256:4b60a20f632aa3449880141d1cd0bc99cb5f93ed46d54d689fd1c9b95f0e53d0"}, - {file = "pipdeptree-2.16.2.tar.gz", hash = "sha256:96ecde8e6f40c95998491a385e4af56d387f94ff7d3b8f209aa34982a721bc43"}, -] - -[package.dependencies] -pip = ">=23.1.2" - -[package.extras] -graphviz = ["graphviz (>=0.20.1)"] -test = ["covdefaults (>=2.3)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "virtualenv (>=20.25,<21)"] - [[package]] name = "platformdirs" version = "4.3.6" @@ -1727,15 +1694,15 @@ markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s3 [[package]] name = "pydantic" -version = "2.10.5" +version = "2.10.6" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pydantic-2.10.5-py3-none-any.whl", hash = "sha256:4dd4e322dbe55472cb7ca7e73f4b63574eecccf2835ffa2af9021ce113c83c53"}, - {file = "pydantic-2.10.5.tar.gz", hash = "sha256:278b38dbbaec562011d659ee05f63346951b3a248a6f3642e1bc68894ea2b4ff"}, + {file = "pydantic-2.10.6-py3-none-any.whl", hash = "sha256:427d664bf0b8a2b34ff5dd0f5a18df00591adcee7198fbd71981054cef37b584"}, + {file = "pydantic-2.10.6.tar.gz", hash = "sha256:ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236"}, ] [package.dependencies] @@ -1911,23 +1878,25 @@ files = [ [[package]] name = "pyright" -version = "1.1.334" +version = "1.1.392.post0" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pyright-1.1.334-py3-none-any.whl", hash = "sha256:dcb13e8358e021189672c4d6ebcad192ab061e4c7225036973ec493183c6da68"}, - {file = "pyright-1.1.334.tar.gz", hash = "sha256:3adaf10f1f4209575dc022f9c897f7ef024639b7ea5b3cbe49302147e6949cd4"}, + {file = "pyright-1.1.392.post0-py3-none-any.whl", hash = "sha256:252f84458a46fa2f0fd4e2f91fc74f50b9ca52c757062e93f6c250c0d8329eb2"}, + {file = "pyright-1.1.392.post0.tar.gz", hash = "sha256:3b7f88de74a28dcfa90c7d90c782b6569a48c2be5f9d4add38472bdaac247ebd"}, ] [package.dependencies] nodeenv = ">=1.6.0" +typing-extensions = ">=4.1" [package.extras] -all = ["twine (>=3.4.1)"] +all = ["nodejs-wheel-binaries", "twine (>=3.4.1)"] dev = ["twine (>=3.4.1)"] +nodejs = ["nodejs-wheel-binaries"] [[package]] name = "pysocks" @@ -1969,15 +1938,15 @@ dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments [[package]] name = "pytest-asyncio" -version = "0.25.2" +version = "0.25.3" description = "Pytest support for asyncio" optional = false python-versions = ">=3.9" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pytest_asyncio-0.25.2-py3-none-any.whl", hash = "sha256:0d0bb693f7b99da304a0634afc0a4b19e49d5e0de2d670f38dc4bfa5727c5075"}, - {file = "pytest_asyncio-0.25.2.tar.gz", hash = "sha256:3f8ef9a98f45948ea91a0ed3dc4268b5326c0e7bce73892acc654df4262ad45f"}, + {file = "pytest_asyncio-0.25.3-py3-none-any.whl", hash = "sha256:9e89518e0f9bd08928f97a3482fdc4e244df17529460bc038291ccaf8f85c7c3"}, + {file = "pytest_asyncio-0.25.3.tar.gz", hash = "sha256:fc1da2cf9f125ada7e710b4ddad05518d4cee187ae9412e9ac9271003497f07a"}, ] [package.dependencies] @@ -2093,7 +2062,7 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["main", "dev"] +groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, @@ -2311,29 +2280,26 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==23.2.1)", "requests (>=2.31.0)" [[package]] name = "reflex-hosting-cli" -version = "0.1.32" +version = "0.1.33" description = "Reflex Hosting CLI" optional = false -python-versions = "<4.0,>=3.8" +python-versions = "<4.0,>=3.9" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "reflex_hosting_cli-0.1.32-py3-none-any.whl", hash = "sha256:86b4222f3e99d949a209be7de8c457ededebc1f12a721ee6669c6c35fdecc508"}, - {file = "reflex_hosting_cli-0.1.32.tar.gz", hash = "sha256:0b8e4b4b30d9261bf6d720265f1c428b2840bb630896e60a1a2faa095901ed59"}, + {file = "reflex_hosting_cli-0.1.33-py3-none-any.whl", hash = "sha256:3fe72fc448a231c61de4ac646f42c936c70e91330f616a23aec658f905d53bc4"}, + {file = "reflex_hosting_cli-0.1.33.tar.gz", hash = "sha256:81c4a896b106eea99f1cab53ea23a6e19802592ce0468cc38d93d440bc95263a"}, ] [package.dependencies] charset-normalizer = ">=3.3.2,<4.0.0" httpx = ">=0.25.1,<1.0" -pipdeptree = ">=2.13.1,<2.17.0" platformdirs = ">=3.10.0,<5.0" pydantic = ">=1.10.2,<3.0" -python-dateutil = ">=2.8.1" pyyaml = ">=6.0.2,<7.0.0" rich = ">=13.0.0,<14.0" tabulate = ">=0.9.0,<0.10.0" typer = ">=0.15.0,<1" -websockets = ">=10.4" [[package]] name = "requests" @@ -2459,15 +2425,15 @@ jeepney = ">=0.6" [[package]] name = "selenium" -version = "4.28.0" +version = "4.28.1" description = "Official Python bindings for Selenium WebDriver" optional = false python-versions = ">=3.9" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "selenium-4.28.0-py3-none-any.whl", hash = "sha256:3d6a2e8e1b850a1078884ea19f4e011ecdc12263434d87a0b78769836fb82dd8"}, - {file = "selenium-4.28.0.tar.gz", hash = "sha256:a9fae6eef48d470a1b0c6e45185d96f0dafb025e8da4b346cc41e4da3ac54fa0"}, + {file = "selenium-4.28.1-py3-none-any.whl", hash = "sha256:4238847e45e24e4472cfcf3554427512c7aab9443396435b1623ef406fff1cc1"}, + {file = "selenium-4.28.1.tar.gz", hash = "sha256:0072d08670d7ec32db901bd0107695a330cecac9f196e3afb3fa8163026e022a"}, ] [package.dependencies] @@ -2539,7 +2505,7 @@ version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["main", "dev"] +groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, @@ -2688,22 +2654,22 @@ SQLAlchemy = ">=2.0.14,<2.1.0" [[package]] name = "starlette" -version = "0.41.3" +version = "0.45.3" description = "The little ASGI library that shines." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "starlette-0.41.3-py3-none-any.whl", hash = "sha256:44cedb2b7c77a9de33a8b74b2b90e9f50d11fcf25d8270ea525ad71a25374ff7"}, - {file = "starlette-0.41.3.tar.gz", hash = "sha256:0e4ab3d16522a255be6b28260b938eae2482f98ce5cc934cb08dce8dc3ba5835"}, + {file = "starlette-0.45.3-py3-none-any.whl", hash = "sha256:dfb6d332576f136ec740296c7e8bb8c8a7125044e7c6da30744718880cdd059d"}, + {file = "starlette-0.45.3.tar.gz", hash = "sha256:2cbcba2a75806f8a41c722141486f37c28e30a0921c5f6fe4346cb0dcee1302f"}, ] [package.dependencies] -anyio = ">=3.4.0,<5" +anyio = ">=3.6.2,<5" [package.extras] -full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7)", "pyyaml"] +full = ["httpx (>=0.27.0,<0.29.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.18)", "pyyaml"] [[package]] name = "starlette-admin" @@ -3040,86 +3006,6 @@ docs = ["Sphinx (>=6.0)", "myst-parser (>=2.0.0)", "sphinx-rtd-theme (>=1.1.0)"] optional = ["python-socks", "wsaccel"] test = ["websockets"] -[[package]] -name = "websockets" -version = "14.2" -description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "websockets-14.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e8179f95323b9ab1c11723e5d91a89403903f7b001828161b480a7810b334885"}, - {file = "websockets-14.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0d8c3e2cdb38f31d8bd7d9d28908005f6fa9def3324edb9bf336d7e4266fd397"}, - {file = "websockets-14.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:714a9b682deb4339d39ffa674f7b674230227d981a37d5d174a4a83e3978a610"}, - {file = "websockets-14.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2e53c72052f2596fb792a7acd9704cbc549bf70fcde8a99e899311455974ca3"}, - {file = "websockets-14.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e3fbd68850c837e57373d95c8fe352203a512b6e49eaae4c2f4088ef8cf21980"}, - {file = "websockets-14.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b27ece32f63150c268593d5fdb82819584831a83a3f5809b7521df0685cd5d8"}, - {file = "websockets-14.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4daa0faea5424d8713142b33825fff03c736f781690d90652d2c8b053345b0e7"}, - {file = "websockets-14.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:bc63cee8596a6ec84d9753fd0fcfa0452ee12f317afe4beae6b157f0070c6c7f"}, - {file = "websockets-14.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7a570862c325af2111343cc9b0257b7119b904823c675b22d4ac547163088d0d"}, - {file = "websockets-14.2-cp310-cp310-win32.whl", hash = "sha256:75862126b3d2d505e895893e3deac0a9339ce750bd27b4ba515f008b5acf832d"}, - {file = "websockets-14.2-cp310-cp310-win_amd64.whl", hash = "sha256:cc45afb9c9b2dc0852d5c8b5321759cf825f82a31bfaf506b65bf4668c96f8b2"}, - {file = "websockets-14.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3bdc8c692c866ce5fefcaf07d2b55c91d6922ac397e031ef9b774e5b9ea42166"}, - {file = "websockets-14.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c93215fac5dadc63e51bcc6dceca72e72267c11def401d6668622b47675b097f"}, - {file = "websockets-14.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c9b6535c0e2cf8a6bf938064fb754aaceb1e6a4a51a80d884cd5db569886910"}, - {file = "websockets-14.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a52a6d7cf6938e04e9dceb949d35fbdf58ac14deea26e685ab6368e73744e4c"}, - {file = "websockets-14.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9f05702e93203a6ff5226e21d9b40c037761b2cfb637187c9802c10f58e40473"}, - {file = "websockets-14.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22441c81a6748a53bfcb98951d58d1af0661ab47a536af08920d129b4d1c3473"}, - {file = "websockets-14.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd9b868d78b194790e6236d9cbc46d68aba4b75b22497eb4ab64fa640c3af56"}, - {file = "websockets-14.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1a5a20d5843886d34ff8c57424cc65a1deda4375729cbca4cb6b3353f3ce4142"}, - {file = "websockets-14.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:34277a29f5303d54ec6468fb525d99c99938607bc96b8d72d675dee2b9f5bf1d"}, - {file = "websockets-14.2-cp311-cp311-win32.whl", hash = "sha256:02687db35dbc7d25fd541a602b5f8e451a238ffa033030b172ff86a93cb5dc2a"}, - {file = "websockets-14.2-cp311-cp311-win_amd64.whl", hash = "sha256:862e9967b46c07d4dcd2532e9e8e3c2825e004ffbf91a5ef9dde519ee2effb0b"}, - {file = "websockets-14.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1f20522e624d7ffbdbe259c6b6a65d73c895045f76a93719aa10cd93b3de100c"}, - {file = "websockets-14.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:647b573f7d3ada919fd60e64d533409a79dcf1ea21daeb4542d1d996519ca967"}, - {file = "websockets-14.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6af99a38e49f66be5a64b1e890208ad026cda49355661549c507152113049990"}, - {file = "websockets-14.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:091ab63dfc8cea748cc22c1db2814eadb77ccbf82829bac6b2fbe3401d548eda"}, - {file = "websockets-14.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b374e8953ad477d17e4851cdc66d83fdc2db88d9e73abf755c94510ebddceb95"}, - {file = "websockets-14.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a39d7eceeea35db85b85e1169011bb4321c32e673920ae9c1b6e0978590012a3"}, - {file = "websockets-14.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0a6f3efd47ffd0d12080594f434faf1cd2549b31e54870b8470b28cc1d3817d9"}, - {file = "websockets-14.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:065ce275e7c4ffb42cb738dd6b20726ac26ac9ad0a2a48e33ca632351a737267"}, - {file = "websockets-14.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e9d0e53530ba7b8b5e389c02282f9d2aa47581514bd6049d3a7cffe1385cf5fe"}, - {file = "websockets-14.2-cp312-cp312-win32.whl", hash = "sha256:20e6dd0984d7ca3037afcb4494e48c74ffb51e8013cac71cf607fffe11df7205"}, - {file = "websockets-14.2-cp312-cp312-win_amd64.whl", hash = "sha256:44bba1a956c2c9d268bdcdf234d5e5ff4c9b6dc3e300545cbe99af59dda9dcce"}, - {file = "websockets-14.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6f1372e511c7409a542291bce92d6c83320e02c9cf392223272287ce55bc224e"}, - {file = "websockets-14.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4da98b72009836179bb596a92297b1a61bb5a830c0e483a7d0766d45070a08ad"}, - {file = "websockets-14.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8a86a269759026d2bde227652b87be79f8a734e582debf64c9d302faa1e9f03"}, - {file = "websockets-14.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:86cf1aaeca909bf6815ea714d5c5736c8d6dd3a13770e885aafe062ecbd04f1f"}, - {file = "websockets-14.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9b0f6c3ba3b1240f602ebb3971d45b02cc12bd1845466dd783496b3b05783a5"}, - {file = "websockets-14.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:669c3e101c246aa85bc8534e495952e2ca208bd87994650b90a23d745902db9a"}, - {file = "websockets-14.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:eabdb28b972f3729348e632ab08f2a7b616c7e53d5414c12108c29972e655b20"}, - {file = "websockets-14.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2066dc4cbcc19f32c12a5a0e8cc1b7ac734e5b64ac0a325ff8353451c4b15ef2"}, - {file = "websockets-14.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ab95d357cd471df61873dadf66dd05dd4709cae001dd6342edafc8dc6382f307"}, - {file = "websockets-14.2-cp313-cp313-win32.whl", hash = "sha256:a9e72fb63e5f3feacdcf5b4ff53199ec8c18d66e325c34ee4c551ca748623bbc"}, - {file = "websockets-14.2-cp313-cp313-win_amd64.whl", hash = "sha256:b439ea828c4ba99bb3176dc8d9b933392a2413c0f6b149fdcba48393f573377f"}, - {file = "websockets-14.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7cd5706caec1686c5d233bc76243ff64b1c0dc445339bd538f30547e787c11fe"}, - {file = "websockets-14.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ec607328ce95a2f12b595f7ae4c5d71bf502212bddcea528290b35c286932b12"}, - {file = "websockets-14.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:da85651270c6bfb630136423037dd4975199e5d4114cae6d3066641adcc9d1c7"}, - {file = "websockets-14.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3ecadc7ce90accf39903815697917643f5b7cfb73c96702318a096c00aa71f5"}, - {file = "websockets-14.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1979bee04af6a78608024bad6dfcc0cc930ce819f9e10342a29a05b5320355d0"}, - {file = "websockets-14.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2dddacad58e2614a24938a50b85969d56f88e620e3f897b7d80ac0d8a5800258"}, - {file = "websockets-14.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:89a71173caaf75fa71a09a5f614f450ba3ec84ad9fca47cb2422a860676716f0"}, - {file = "websockets-14.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6af6a4b26eea4fc06c6818a6b962a952441e0e39548b44773502761ded8cc1d4"}, - {file = "websockets-14.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:80c8efa38957f20bba0117b48737993643204645e9ec45512579132508477cfc"}, - {file = "websockets-14.2-cp39-cp39-win32.whl", hash = "sha256:2e20c5f517e2163d76e2729104abc42639c41cf91f7b1839295be43302713661"}, - {file = "websockets-14.2-cp39-cp39-win_amd64.whl", hash = "sha256:b4c8cef610e8d7c70dea92e62b6814a8cd24fbd01d7103cc89308d2bfe1659ef"}, - {file = "websockets-14.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:d7d9cafbccba46e768be8a8ad4635fa3eae1ffac4c6e7cb4eb276ba41297ed29"}, - {file = "websockets-14.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c76193c1c044bd1e9b3316dcc34b174bbf9664598791e6fb606d8d29000e070c"}, - {file = "websockets-14.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fd475a974d5352390baf865309fe37dec6831aafc3014ffac1eea99e84e83fc2"}, - {file = "websockets-14.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c6c0097a41968b2e2b54ed3424739aab0b762ca92af2379f152c1aef0187e1c"}, - {file = "websockets-14.2-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d7ff794c8b36bc402f2e07c0b2ceb4a2424147ed4785ff03e2a7af03711d60a"}, - {file = "websockets-14.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dec254fcabc7bd488dab64846f588fc5b6fe0d78f641180030f8ea27b76d72c3"}, - {file = "websockets-14.2-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:bbe03eb853e17fd5b15448328b4ec7fb2407d45fb0245036d06a3af251f8e48f"}, - {file = "websockets-14.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a3c4aa3428b904d5404a0ed85f3644d37e2cb25996b7f096d77caeb0e96a3b42"}, - {file = "websockets-14.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:577a4cebf1ceaf0b65ffc42c54856214165fb8ceeba3935852fc33f6b0c55e7f"}, - {file = "websockets-14.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ad1c1d02357b7665e700eca43a31d52814ad9ad9b89b58118bdabc365454b574"}, - {file = "websockets-14.2-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f390024a47d904613577df83ba700bd189eedc09c57af0a904e5c39624621270"}, - {file = "websockets-14.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:3c1426c021c38cf92b453cdf371228d3430acd775edee6bac5a4d577efc72365"}, - {file = "websockets-14.2-py3-none-any.whl", hash = "sha256:7a6ceec4ea84469f15cf15807a747e9efe57e369c384fa86e022b3bea679b79b"}, - {file = "websockets-14.2.tar.gz", hash = "sha256:5059ed9c54945efb321f097084b4c7e52c246f2c869815876a69d1efc4ad6eb5"}, -] - [[package]] name = "wheel" version = "0.45.1" @@ -3266,4 +3152,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.10, <4.0" -content-hash = "376707066a00c43aef555c6db2ccb0ddfde0ee9011e8f20110d728fb723f1662" +content-hash = "35c503a68e87896b4f7d7c209dd3fe6d707ebcc1702377cab0a1339554c6ad77" diff --git a/pyproject.toml b/pyproject.toml index d19d1a0ac..761f9e2c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ typing_extensions = ">=4.6.0" [tool.poetry.group.dev.dependencies] pytest = ">=7.1.2,<9.0" pytest-mock = ">=3.10.0,<4.0" -pyright = ">=1.1.229,<1.1.335" +pyright = ">=1.1.392, <1.2" darglint = ">=1.8.1,<2.0" dill = ">=0.3.8" toml = ">=0.10.2,<1.0" @@ -80,12 +80,13 @@ requires = ["poetry-core>=1.5.1"] build-backend = "poetry.core.masonry.api" [tool.pyright] +reportIncompatibleMethodOverride = false [tool.ruff] target-version = "py310" output-format = "concise" lint.isort.split-on-trailing-comma = false -lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PTH", "RUF", "SIM", "T", "TRY", "W"] +lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PGH", "PTH", "RUF", "SIM", "T", "TRY", "W"] lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF012", "TRY0"] lint.pydocstyle.convention = "google" @@ -94,7 +95,7 @@ lint.pydocstyle.convention = "google" "tests/*.py" = ["D100", "D103", "D104", "B018", "PERF", "T", "N"] "benchmarks/*.py" = ["D100", "D103", "D104", "B018", "PERF", "T", "N"] "reflex/.templates/*.py" = ["D100", "D103", "D104"] -"*.pyi" = ["D301", "D415", "D417", "D418", "E742", "N"] +"*.pyi" = ["D301", "D415", "D417", "D418", "E742", "N", "PGH"] "pyi_generator.py" = ["N802"] "reflex/constants/*.py" = ["N"] "*/blank.py" = ["I001"] diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 1f9b4ecd8..5c80269ad 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -131,7 +131,7 @@ from .components.radix.themes.layout.container import container as container from .components.radix.themes.layout.flex import flex as flex from .components.radix.themes.layout.grid import grid as grid from .components.radix.themes.layout.list import list_item as list_item -from .components.radix.themes.layout.list import list_ns as list # noqa +from .components.radix.themes.layout.list import list_ns as list # noqa: F401 from .components.radix.themes.layout.list import ordered_list as ordered_list from .components.radix.themes.layout.list import unordered_list as unordered_list from .components.radix.themes.layout.section import section as section diff --git a/reflex/app.py b/reflex/app.py index 20c01cba6..e3b45e7b2 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -146,7 +146,7 @@ def default_backend_exception_handler(exception: Exception) -> EventSpec: position="top-center", id="backend_error", style={"width": "500px"}, - ) # type: ignore + ) # pyright: ignore [reportReturnType] else: error_message.insert(0, "An error occurred.") return window_alert("\n".join(error_message)) @@ -780,7 +780,7 @@ class App(MiddlewareMixin, LifespanMixin): frontend_packages = get_config().frontend_packages _frontend_packages = [] for package in frontend_packages: - if package in (get_config().tailwind or {}).get("plugins", []): # type: ignore + if package in (get_config().tailwind or {}).get("plugins", []): console.warn( f"Tailwind packages are inferred from 'plugins', remove `{package}` from `frontend_packages`" ) @@ -1025,7 +1025,7 @@ class App(MiddlewareMixin, LifespanMixin): compiler.compile_document_root( self.head_components, html_lang=self.html_lang, - html_custom_attrs=self.html_custom_attrs, # type: ignore + html_custom_attrs=self.html_custom_attrs, # pyright: ignore [reportArgumentType] ) ) diff --git a/reflex/app_mixins/lifespan.py b/reflex/app_mixins/lifespan.py index 9403e0f35..8bdef2eb9 100644 --- a/reflex/app_mixins/lifespan.py +++ b/reflex/app_mixins/lifespan.py @@ -32,7 +32,7 @@ class LifespanMixin(AppMixin): try: async with contextlib.AsyncExitStack() as stack: for task in self.lifespan_tasks: - run_msg = f"Started lifespan task: {task.__name__} as {{type}}" # type: ignore + run_msg = f"Started lifespan task: {task.__name__} as {{type}}" # pyright: ignore [reportAttributeAccessIssue] if isinstance(task, asyncio.Task): running_tasks.append(task) else: @@ -73,7 +73,7 @@ class LifespanMixin(AppMixin): if task_kwargs: original_task = task - task = functools.partial(task, **task_kwargs) # type: ignore - functools.update_wrapper(task, original_task) # type: ignore - self.lifespan_tasks.add(task) # type: ignore - console.debug(f"Registered lifespan task: {task.__name__}") # type: ignore + task = functools.partial(task, **task_kwargs) # pyright: ignore [reportArgumentType] + functools.update_wrapper(task, original_task) # pyright: ignore [reportArgumentType] + self.lifespan_tasks.add(task) + console.debug(f"Registered lifespan task: {task.__name__}") # pyright: ignore [reportAttributeAccessIssue] diff --git a/reflex/app_mixins/middleware.py b/reflex/app_mixins/middleware.py index 30593d9ae..c81fd7806 100644 --- a/reflex/app_mixins/middleware.py +++ b/reflex/app_mixins/middleware.py @@ -53,11 +53,11 @@ class MiddlewareMixin(AppMixin): """ for middleware in self.middleware: if asyncio.iscoroutinefunction(middleware.preprocess): - out = await middleware.preprocess(app=self, state=state, event=event) # type: ignore + out = await middleware.preprocess(app=self, state=state, event=event) # pyright: ignore [reportArgumentType] else: - out = middleware.preprocess(app=self, state=state, event=event) # type: ignore + out = middleware.preprocess(app=self, state=state, event=event) # pyright: ignore [reportArgumentType] if out is not None: - return out # type: ignore + return out # pyright: ignore [reportReturnType] async def _postprocess( self, state: BaseState, event: Event, update: StateUpdate @@ -78,18 +78,18 @@ class MiddlewareMixin(AppMixin): for middleware in self.middleware: if asyncio.iscoroutinefunction(middleware.postprocess): out = await middleware.postprocess( - app=self, # type: ignore + app=self, # pyright: ignore [reportArgumentType] state=state, event=event, update=update, ) else: out = middleware.postprocess( - app=self, # type: ignore + app=self, # pyright: ignore [reportArgumentType] state=state, event=event, update=update, ) if out is not None: - return out # type: ignore + return out # pyright: ignore [reportReturnType] return update diff --git a/reflex/base.py b/reflex/base.py index a88e557ef..5c0180812 100644 --- a/reflex/base.py +++ b/reflex/base.py @@ -13,7 +13,7 @@ except ModuleNotFoundError: if not TYPE_CHECKING: import pydantic.main as pydantic_main from pydantic import BaseModel - from pydantic.fields import ModelField # type: ignore + from pydantic.fields import ModelField def validate_field_name(bases: List[Type["BaseModel"]], field_name: str) -> None: @@ -44,13 +44,13 @@ def validate_field_name(bases: List[Type["BaseModel"]], field_name: str) -> None # monkeypatch pydantic validate_field_name method to skip validating # shadowed state vars when reloading app via utils.prerequisites.get_app(reload=True) -pydantic_main.validate_field_name = validate_field_name # type: ignore +pydantic_main.validate_field_name = validate_field_name # pyright: ignore [reportPossiblyUnboundVariable, reportPrivateImportUsage] if TYPE_CHECKING: from reflex.vars import Var -class Base(BaseModel): # pyright: ignore [reportUnboundVariable] +class Base(BaseModel): # pyright: ignore [reportPossiblyUnboundVariable] """The base class subclassed by all Reflex classes. This class wraps Pydantic and provides common methods such as @@ -75,7 +75,7 @@ class Base(BaseModel): # pyright: ignore [reportUnboundVariable] """ from reflex.utils.serializers import serialize - return self.__config__.json_dumps( # type: ignore + return self.__config__.json_dumps( self.dict(), default=serialize, ) @@ -113,12 +113,12 @@ class Base(BaseModel): # pyright: ignore [reportUnboundVariable] default_value: The default value of the field """ var_name = var._var_field_name - new_field = ModelField.infer( + new_field = ModelField.infer( # pyright: ignore [reportPossiblyUnboundVariable] name=var_name, value=default_value, annotation=var._var_type, class_validators=None, - config=cls.__config__, # type: ignore + config=cls.__config__, ) cls.__fields__.update({var_name: new_field}) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index c0ba28f4b..02692e43b 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -12,7 +12,9 @@ from reflex.vars.base import Var try: from pydantic.v1.fields import ModelField except ModuleNotFoundError: - from pydantic.fields import ModelField # type: ignore + from pydantic.fields import ( + ModelField, # pyright: ignore [reportAttributeAccessIssue] + ) from reflex import constants from reflex.components.base import ( @@ -115,7 +117,7 @@ def compile_imports(import_dict: ParsedImportDict) -> list[dict]: default, rest = compile_import_statement(fields) # prevent lib from being rendered on the page if all imports are non rendered kind - if not any(f.render for f in fields): # type: ignore + if not any(f.render for f in fields): continue if not lib: diff --git a/reflex/components/base/bare.py b/reflex/components/base/bare.py index e576fac85..0f0bef8b9 100644 --- a/reflex/components/base/bare.py +++ b/reflex/components/base/bare.py @@ -31,7 +31,7 @@ class Bare(Component): return cls(contents=contents) else: contents = str(contents) if contents is not None else "" - return cls(contents=contents) # type: ignore + return cls(contents=contents) def _get_all_hooks_internal(self) -> dict[str, VarData | None]: """Include the hooks for the component. diff --git a/reflex/components/base/meta.py b/reflex/components/base/meta.py index 526233c8b..10264009e 100644 --- a/reflex/components/base/meta.py +++ b/reflex/components/base/meta.py @@ -53,11 +53,11 @@ class Description(Meta): """A component that displays the title of the current page.""" # The type of the description. - name: str = "description" + name: str | None = "description" class Image(Meta): """A component that displays the title of the current page.""" # The type of the image. - property: str = "og:image" + property: str | None = "og:image" diff --git a/reflex/components/component.py b/reflex/components/component.py index 58bdfe7c2..c88330918 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -150,7 +150,7 @@ class BaseComponent(Base, ABC): class ComponentNamespace(SimpleNamespace): """A namespace to manage components with subcomponents.""" - def __hash__(self) -> int: + def __hash__(self) -> int: # pyright: ignore [reportIncompatibleVariableOverride] """Get the hash of the namespace. Returns: @@ -462,9 +462,7 @@ class Component(BaseComponent, ABC): if types.is_union(passed_type): # We need to check all possible types in the union. passed_types = ( - arg - for arg in passed_type.__args__ # type: ignore - if arg is not type(None) + arg for arg in passed_type.__args__ if arg is not type(None) ) if ( # If the passed var is a union, check if all possible types are valid. @@ -491,7 +489,7 @@ class Component(BaseComponent, ABC): # Check if the key is an event trigger. if key in component_specific_triggers: kwargs["event_triggers"][key] = EventChain.create( - value=value, # type: ignore + value=value, args_spec=component_specific_triggers[key], key=key, ) @@ -578,7 +576,7 @@ class Component(BaseComponent, ABC): annotation = field.annotation if (metadata := getattr(annotation, "__metadata__", None)) is not None: args_spec = metadata[0] - default_triggers[field.name] = args_spec or (no_args_event_spec) # type: ignore + default_triggers[field.name] = args_spec or (no_args_event_spec) return default_triggers def __repr__(self) -> str: @@ -761,7 +759,7 @@ class Component(BaseComponent, ABC): # Walk the MRO to call all `add_style` methods. for base in self._iter_parent_classes_with_method("add_style"): - s = base.add_style(self) # type: ignore + s = base.add_style(self) if s is not None: styles.append(s) @@ -1674,7 +1672,7 @@ class CustomComponent(Component): if base_value is not None and isinstance(value, Component): self.component_props[key] = value value = base_value._replace( - merge_var_data=VarData( # type: ignore + merge_var_data=VarData( imports=value._get_all_imports(), hooks=value._get_all_hooks(), ) @@ -1707,7 +1705,7 @@ class CustomComponent(Component): return hash(self.tag) @classmethod - def get_props(cls) -> Set[str]: + def get_props(cls) -> Set[str]: # pyright: ignore [reportIncompatibleVariableOverride] """Get the props for the component. Returns: @@ -1802,7 +1800,7 @@ class CustomComponent(Component): include_children=include_children, ignore_ids=ignore_ids ) - @lru_cache(maxsize=None) # noqa + @lru_cache(maxsize=None) # noqa: B019 def get_component(self) -> Component: """Render the component. diff --git a/reflex/components/core/banner.py b/reflex/components/core/banner.py index b7b6fae6c..6479bf3b2 100644 --- a/reflex/components/core/banner.py +++ b/reflex/components/core/banner.py @@ -25,7 +25,7 @@ from reflex.vars.function import FunctionStringVar from reflex.vars.number import BooleanVar from reflex.vars.sequence import LiteralArrayVar -connect_error_var_data: VarData = VarData( # type: ignore +connect_error_var_data: VarData = VarData( imports=Imports.EVENTS, hooks={Hooks.EVENTS: None}, ) @@ -99,14 +99,14 @@ class ConnectionToaster(Toaster): """ toast_id = "websocket-error" target_url = WebsocketTargetURL.create() - props = ToastProps( # type: ignore + props = ToastProps( description=LiteralVar.create( f"Check if server is reachable at {target_url}", ), close_button=True, duration=120000, id=toast_id, - ) + ) # pyright: ignore [reportCallIssue] individual_hooks = [ f"const toast_props = {LiteralVar.create(props)!s};", @@ -116,7 +116,7 @@ class ConnectionToaster(Toaster): _var_data=VarData( imports={ "react": ["useEffect", "useState"], - **dict(target_url._get_all_var_data().imports), # type: ignore + **dict(target_url._get_all_var_data().imports), # pyright: ignore [reportArgumentType, reportOptionalMemberAccess] } ), ).call( diff --git a/reflex/components/core/cond.py b/reflex/components/core/cond.py index 488990f54..25b691808 100644 --- a/reflex/components/core/cond.py +++ b/reflex/components/core/cond.py @@ -26,10 +26,9 @@ class Cond(MemoizationLeaf): cond: Var[Any] # The component to render if the cond is true. - comp1: BaseComponent = None # type: ignore - + comp1: BaseComponent | None = None # The component to render if the cond is false. - comp2: BaseComponent = None # type: ignore + comp2: BaseComponent | None = None @classmethod def create( @@ -73,8 +72,8 @@ class Cond(MemoizationLeaf): def _render(self) -> Tag: return CondTag( cond=self.cond, - true_value=self.comp1.render(), - false_value=self.comp2.render(), + true_value=self.comp1.render(), # pyright: ignore [reportOptionalMemberAccess] + false_value=self.comp2.render(), # pyright: ignore [reportOptionalMemberAccess] ) def render(self) -> Dict: @@ -111,7 +110,7 @@ class Cond(MemoizationLeaf): @overload -def cond(condition: Any, c1: Component, c2: Any) -> Component: ... +def cond(condition: Any, c1: Component, c2: Any) -> Component: ... # pyright: ignore [reportOverlappingOverload] @overload @@ -163,16 +162,16 @@ def cond(condition: Any, c1: Any, c2: Any = None) -> Component | Var: # Create the conditional var. return ternary_operation( - cond_var.bool()._replace( # type: ignore + cond_var.bool()._replace( merge_var_data=VarData(imports=_IS_TRUE_IMPORT), - ), # type: ignore + ), c1, c2, ) @overload -def color_mode_cond(light: Component, dark: Component | None = None) -> Component: ... # type: ignore +def color_mode_cond(light: Component, dark: Component | None = None) -> Component: ... # pyright: ignore [reportOverlappingOverload] @overload diff --git a/reflex/components/core/debounce.py b/reflex/components/core/debounce.py index 12cc94426..1d798994d 100644 --- a/reflex/components/core/debounce.py +++ b/reflex/components/core/debounce.py @@ -28,7 +28,7 @@ class DebounceInput(Component): min_length: Var[int] # Time to wait between end of input and triggering on_change - debounce_timeout: Var[int] = DEFAULT_DEBOUNCE_TIMEOUT # type: ignore + debounce_timeout: Var[int] = Var.create(DEFAULT_DEBOUNCE_TIMEOUT) # If true, notify when Enter key is pressed force_notify_by_enter: Var[bool] diff --git a/reflex/components/core/match.py b/reflex/components/core/match.py index 8b9382c89..ae8568ac5 100644 --- a/reflex/components/core/match.py +++ b/reflex/components/core/match.py @@ -222,7 +222,7 @@ class Match(MemoizationLeaf): cond=match_cond_var, match_cases=match_cases, default=default, - children=[case[-1] for case in match_cases] + [default], # type: ignore + children=[case[-1] for case in match_cases] + [default], # pyright: ignore [reportArgumentType] ) ) @@ -236,13 +236,13 @@ class Match(MemoizationLeaf): _js_expr=format.format_match( cond=str(match_cond_var), match_cases=match_cases, - default=default, # type: ignore + default=default, # pyright: ignore [reportArgumentType] ), - _var_type=default._var_type, # type: ignore + _var_type=default._var_type, # pyright: ignore [reportAttributeAccessIssue,reportOptionalMemberAccess] _var_data=VarData.merge( match_cond_var._get_all_var_data(), *[el._get_all_var_data() for case in match_cases for el in case], - default._get_all_var_data(), # type: ignore + default._get_all_var_data(), # pyright: ignore [reportAttributeAccessIssue, reportOptionalMemberAccess] ), ) diff --git a/reflex/components/core/upload.py b/reflex/components/core/upload.py index 4666a8f1b..897b89608 100644 --- a/reflex/components/core/upload.py +++ b/reflex/components/core/upload.py @@ -269,7 +269,7 @@ class Upload(MemoizationLeaf): on_drop = upload_props["on_drop"] if isinstance(on_drop, Callable): # Call the lambda to get the event chain. - on_drop = call_event_fn(on_drop, _on_drop_spec) # type: ignore + on_drop = call_event_fn(on_drop, _on_drop_spec) if isinstance(on_drop, EventSpec): # Update the provided args for direct use with on_drop. on_drop = on_drop.with_args( diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py index 242e812b2..4f1eb493e 100644 --- a/reflex/components/datadisplay/code.py +++ b/reflex/components/datadisplay/code.py @@ -449,7 +449,7 @@ class CodeBlock(Component, MarkdownComponentMap): if can_copy: code = children[0] - copy_button = ( # type: ignore + copy_button = ( copy_button if copy_button is not None else Button.create( diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index f71f97713..b2d6417bd 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -165,7 +165,7 @@ class DataEditor(NoSSRComponent): tag = "DataEditor" is_default = True - library: str = "@glideapps/glide-data-grid@^6.0.3" + library: str | None = "@glideapps/glide-data-grid@^6.0.3" lib_dependencies: List[str] = [ "lodash@^4.17.21", "react-responsive-carousel@^3.2.7", @@ -321,6 +321,8 @@ class DataEditor(NoSSRComponent): Returns: The import dict. """ + if self.library is None: + return {} return { "": f"{format.format_library_name(self.library)}/dist/index.css", self.library: "GridCellKind", @@ -343,7 +345,7 @@ class DataEditor(NoSSRComponent): data_callback = self.get_cell_content._js_expr else: data_callback = f"getData_{editor_id}" - self.get_cell_content = Var(_js_expr=data_callback) # type: ignore + self.get_cell_content = Var(_js_expr=data_callback) code = [f"function {data_callback}([col, row])" "{"] diff --git a/reflex/components/datadisplay/shiki_code_block.py b/reflex/components/datadisplay/shiki_code_block.py index 3b6bce8a1..2d3040966 100644 --- a/reflex/components/datadisplay/shiki_code_block.py +++ b/reflex/components/datadisplay/shiki_code_block.py @@ -602,7 +602,7 @@ class ShikiCodeBlock(Component, MarkdownComponentMap): transformer_styles = {} # Collect styles from transformers and wrapper - for transformer in code_block.transformers._var_value: # type: ignore + for transformer in code_block.transformers._var_value: # pyright: ignore [reportAttributeAccessIssue] if isinstance(transformer, ShikiBaseTransformers) and transformer.style: transformer_styles.update(transformer.style) transformer_styles.update(code_wrapper_props.pop("style", {})) @@ -653,8 +653,9 @@ class ShikiCodeBlock(Component, MarkdownComponentMap): raise ValueError( f"the function names should be str names of functions in the specified transformer: {library!r}" ) - return ShikiBaseTransformers( # type: ignore - library=library, fns=[FunctionStringVar.create(fn) for fn in fns] + return ShikiBaseTransformers( + library=library, + fns=[FunctionStringVar.create(fn) for fn in fns], # pyright: ignore [reportCallIssue] ) def _render(self, props: dict[str, Any] | None = None): @@ -757,13 +758,13 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock): if can_copy: code = children[0] - copy_button = ( # type: ignore + copy_button = ( copy_button if copy_button is not None else Button.create( Icon.create(tag="copy", size=16, color=color("gray", 11)), on_click=[ - set_clipboard(cls._strip_transformer_triggers(code)), # type: ignore + set_clipboard(cls._strip_transformer_triggers(code)), copy_script(), ], style=Style( diff --git a/reflex/components/el/constants/reflex.py b/reflex/components/el/constants/reflex.py index 05c298325..199edf569 100644 --- a/reflex/components/el/constants/reflex.py +++ b/reflex/components/el/constants/reflex.py @@ -48,4 +48,4 @@ PROP_TO_ELEMENTS = { ELEMENT_TO_PROPS = defaultdict(list) for prop, elements in PROP_TO_ELEMENTS.items(): for el in elements: - ELEMENT_TO_PROPS[el].append(prop) # type: ignore + ELEMENT_TO_PROPS[el].append(prop) diff --git a/reflex/components/el/elements/forms.py b/reflex/components/el/elements/forms.py index 3e2235721..51ad201b2 100644 --- a/reflex/components/el/elements/forms.py +++ b/reflex/components/el/elements/forms.py @@ -153,7 +153,7 @@ class Form(BaseHTML): target: Var[Union[str, int, bool]] # If true, the form will be cleared after submit. - reset_on_submit: Var[bool] = False # type: ignore + reset_on_submit: Var[bool] = Var.create(False) # The name used to make this form's submit handler function unique. handle_submit_unique_name: Var[str] @@ -405,7 +405,7 @@ class Input(BaseHTML): (value_var := Var.create(value))._var_type ): props["value"] = ternary_operation( - (value_var != Var.create(None)) # pyright: ignore [reportGeneralTypeIssues] + (value_var != Var.create(None)) # pyright: ignore [reportArgumentType] & (value_var != Var(_js_expr="undefined")), value, Var.create(""), diff --git a/reflex/components/markdown/markdown.py b/reflex/components/markdown/markdown.py index 7c65c0d43..686c49a64 100644 --- a/reflex/components/markdown/markdown.py +++ b/reflex/components/markdown/markdown.py @@ -65,8 +65,8 @@ def get_base_component_map() -> dict[str, Callable]: "h5": lambda value: Heading.create(value, as_="h5", size="2", margin_y="0.5em"), "h6": lambda value: Heading.create(value, as_="h6", size="1", margin_y="0.5em"), "p": lambda value: Text.create(value, margin_y="1em"), - "ul": lambda value: UnorderedList.create(value, margin_y="1em"), # type: ignore - "ol": lambda value: OrderedList.create(value, margin_y="1em"), # type: ignore + "ul": lambda value: UnorderedList.create(value, margin_y="1em"), + "ol": lambda value: OrderedList.create(value, margin_y="1em"), "li": lambda value: ListItem.create(value, margin_y="0.5em"), "a": lambda value: Link.create(value), "code": lambda value: Code.create(value), @@ -236,7 +236,7 @@ class Markdown(Component): ), }, *[ - component(_MOCK_ARG)._get_all_imports() # type: ignore + component(_MOCK_ARG)._get_all_imports() for component in self.component_map.values() ], ] @@ -327,7 +327,7 @@ const {_LANGUAGE!s} = match ? match[1] : ''; if tag != "codeblock" # For codeblock, the mapping for some cases returns an array of elements. Let's join them into a string. else ternary_operation( - ARRAY_ISARRAY.call(_CHILDREN), # type: ignore + ARRAY_ISARRAY.call(_CHILDREN), # pyright: ignore [reportArgumentType] _CHILDREN.to(list).join("\n"), _CHILDREN, ).to(str) @@ -425,7 +425,7 @@ const {_LANGUAGE!s} = match ? match[1] : ''; for _component in self.component_map.values(): comp = _component(_MOCK_ARG) hooks.update(comp._get_all_hooks()) - formatted_hooks = MACROS.module.renderHooks(hooks) # type: ignore + formatted_hooks = MACROS.module.renderHooks(hooks) # pyright: ignore [reportAttributeAccessIssue] return f""" function {self._get_component_map_name()} () {{ {formatted_hooks} diff --git a/reflex/components/moment/moment.py b/reflex/components/moment/moment.py index 80940d228..a5fe79f07 100644 --- a/reflex/components/moment/moment.py +++ b/reflex/components/moment/moment.py @@ -28,9 +28,9 @@ class MomentDelta: class Moment(NoSSRComponent): """The Moment component.""" - tag: str = "Moment" + tag: str | None = "Moment" is_default = True - library: str = "react-moment" + library: str | None = "react-moment" lib_dependencies: List[str] = ["moment"] # How often the date update (how often time update / 0 to disable). diff --git a/reflex/components/next/link.py b/reflex/components/next/link.py index 0f7c81296..187618a09 100644 --- a/reflex/components/next/link.py +++ b/reflex/components/next/link.py @@ -17,4 +17,4 @@ class NextLink(Component): href: Var[str] # Whether to pass the href prop to the child. - pass_href: Var[bool] = True # type: ignore + pass_href: Var[bool] = Var.create(True) diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py index 68efd4545..c85423d35 100644 --- a/reflex/components/plotly/plotly.py +++ b/reflex/components/plotly/plotly.py @@ -18,8 +18,8 @@ try: Template = layout.Template except ImportError: console.warn("Plotly is not installed. Please run `pip install plotly`.") - Figure = Any # type: ignore - Template = Any # type: ignore + Figure = Any + Template = Any def _event_points_data_signature(e0: Var) -> Tuple[Var[List[Point]]]: @@ -102,13 +102,13 @@ class Plotly(NoSSRComponent): is_default = True # The figure to display. This can be a plotly figure or a plotly data json. - data: Var[Figure] # type: ignore + data: Var[Figure] # pyright: ignore [reportInvalidTypeForm] # The layout of the graph. layout: Var[Dict] # The template for visual appearance of the graph. - template: Var[Template] # type: ignore + template: Var[Template] # pyright: ignore [reportInvalidTypeForm] # The config of the graph. config: Var[Dict] diff --git a/reflex/components/props.py b/reflex/components/props.py index adce134fc..823036406 100644 --- a/reflex/components/props.py +++ b/reflex/components/props.py @@ -62,13 +62,13 @@ class NoExtrasAllowedProps(Base): try: super().__init__(**kwargs) except ValidationError as e: - invalid_fields = ", ".join([error["loc"][0] for error in e.errors()]) # type: ignore + invalid_fields = ", ".join([error["loc"][0] for error in e.errors()]) # pyright: ignore [reportCallIssue, reportArgumentType] supported_props_str = ", ".join(f'"{field}"' for field in self.get_fields()) raise InvalidPropValueError( f"Invalid prop(s) {invalid_fields} for {component_name!r}. Supported props are {supported_props_str}" ) from None - class Config: + class Config: # pyright: ignore [reportIncompatibleVariableOverride] """Pydantic config.""" arbitrary_types_allowed = True diff --git a/reflex/components/radix/__init__.pyi b/reflex/components/radix/__init__.pyi index f4e81666a..9a16627b5 100644 --- a/reflex/components/radix/__init__.pyi +++ b/reflex/components/radix/__init__.pyi @@ -55,7 +55,7 @@ from .themes.layout.container import container as container from .themes.layout.flex import flex as flex from .themes.layout.grid import grid as grid from .themes.layout.list import list_item as list_item -from .themes.layout.list import list_ns as list # noqa +from .themes.layout.list import list_ns as list # noqa: F401 from .themes.layout.list import ordered_list as ordered_list from .themes.layout.list import unordered_list as unordered_list from .themes.layout.section import section as section diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index 534b97ac1..b9056c9d0 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -83,7 +83,7 @@ class DrawerTrigger(DrawerComponent): alias = "Vaul" + tag # Defaults to true, if the first child acts as the trigger. - as_child: Var[bool] = True # type: ignore + as_child: Var[bool] = Var.create(True) @classmethod def create(cls, *children: Any, **props: Any) -> Component: diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index 72aee1038..5fcc52f1b 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -83,7 +83,7 @@ class ProgressIndicator(ProgressComponent): "&[data_state='loading']": { "transition": f"transform {DEFAULT_ANIMATION_DURATION}ms linear", }, - "transform": f"translateX(calc(-100% + ({self.value} / {self.max} * 100%)))", # type: ignore + "transform": f"translateX(calc(-100% + ({self.value} / {self.max} * 100%)))", "boxShadow": "inset 0 0 0 1px var(--gray-a5)", } diff --git a/reflex/components/radix/primitives/slider.py b/reflex/components/radix/primitives/slider.py index 68f39e32c..6136e3171 100644 --- a/reflex/components/radix/primitives/slider.py +++ b/reflex/components/radix/primitives/slider.py @@ -30,7 +30,7 @@ def on_value_event_spec( Returns: The event handler spec. """ - return (value,) # type: ignore + return (value,) class SliderRoot(SliderComponent): diff --git a/reflex/components/radix/themes/color_mode.py b/reflex/components/radix/themes/color_mode.py index e93a26ef6..2377a2422 100644 --- a/reflex/components/radix/themes/color_mode.py +++ b/reflex/components/radix/themes/color_mode.py @@ -115,12 +115,12 @@ class ColorModeIconButton(IconButton): Returns: The button component. """ - position = props.pop("position", None) + position: str | Var = props.pop("position", None) allow_system = props.pop("allow_system", False) # position is used to set nice defaults for positioning the icon button if isinstance(position, Var): - _set_var_default(props, position, "position", "fixed", position) # type: ignore + _set_var_default(props, position, "position", "fixed", position) # pyright: ignore [reportArgumentType] _set_var_default(props, position, "bottom", "2rem") _set_var_default(props, position, "top", "2rem") _set_var_default(props, position, "left", "2rem") diff --git a/reflex/components/radix/themes/components/radio_group.py b/reflex/components/radix/themes/components/radio_group.py index 80b3ee10c..f34c92159 100644 --- a/reflex/components/radix/themes/components/radio_group.py +++ b/reflex/components/radix/themes/components/radio_group.py @@ -155,7 +155,7 @@ class HighLevelRadioGroup(RadixThemesComponent): if isinstance(default_value, str) or ( isinstance(default_value, Var) and default_value._var_type is str ): - default_value = LiteralVar.create(default_value) # type: ignore + default_value = LiteralVar.create(default_value) else: default_value = LiteralVar.create(default_value).to_string() diff --git a/reflex/components/radix/themes/components/text_field.py b/reflex/components/radix/themes/components/text_field.py index c8bdab443..130fb7aed 100644 --- a/reflex/components/radix/themes/components/text_field.py +++ b/reflex/components/radix/themes/components/text_field.py @@ -105,7 +105,7 @@ class TextFieldRoot(elements.Input, RadixThemesComponent): (value_var := Var.create(value))._var_type ): props["value"] = ternary_operation( - (value_var != Var.create(None)) # pyright: ignore [reportGeneralTypeIssues] + (value_var != Var.create(None)) # pyright: ignore [reportArgumentType] & (value_var != Var(_js_expr="undefined")), value, Var.create(""), diff --git a/reflex/components/radix/themes/layout/__init__.pyi b/reflex/components/radix/themes/layout/__init__.pyi index 6712a3068..21fc8d921 100644 --- a/reflex/components/radix/themes/layout/__init__.pyi +++ b/reflex/components/radix/themes/layout/__init__.pyi @@ -9,7 +9,7 @@ from .container import container as container from .flex import flex as flex from .grid import grid as grid from .list import list_item as list_item -from .list import list_ns as list # noqa +from .list import list_ns as list # noqa: F401 from .list import ordered_list as ordered_list from .list import unordered_list as unordered_list from .section import section as section diff --git a/reflex/components/radix/themes/layout/list.py b/reflex/components/radix/themes/layout/list.py index a306e19a4..b79e99bf7 100644 --- a/reflex/components/radix/themes/layout/list.py +++ b/reflex/components/radix/themes/layout/list.py @@ -72,7 +72,7 @@ class BaseList(Component, MarkdownComponentMap): if isinstance(items, Var): children = [Foreach.create(items, ListItem.create)] else: - children = [ListItem.create(item) for item in items] # type: ignore + children = [ListItem.create(item) for item in items] props["direction"] = "column" style = props.setdefault("style", {}) style["list_style_type"] = list_style_type diff --git a/reflex/components/radix/themes/layout/stack.py b/reflex/components/radix/themes/layout/stack.py index d11c3488b..f017ff783 100644 --- a/reflex/components/radix/themes/layout/stack.py +++ b/reflex/components/radix/themes/layout/stack.py @@ -49,14 +49,14 @@ class VStack(Stack): """A vertical stack component.""" # The direction of the stack. - direction: Var[LiteralFlexDirection] = "column" # type: ignore + direction: Var[LiteralFlexDirection] = Var.create("column") class HStack(Stack): """A horizontal stack component.""" # The direction of the stack. - direction: Var[LiteralFlexDirection] = "row" # type: ignore + direction: Var[LiteralFlexDirection] = Var.create("row") stack = Stack.create diff --git a/reflex/components/radix/themes/typography/link.py b/reflex/components/radix/themes/typography/link.py index c93102408..09172b108 100644 --- a/reflex/components/radix/themes/typography/link.py +++ b/reflex/components/radix/themes/typography/link.py @@ -60,7 +60,7 @@ class Link(RadixThemesComponent, A, MemoizationLeaf, MarkdownComponentMap): Returns: The import dict. """ - return next_link._get_imports() # type: ignore + return next_link._get_imports() # pyright: ignore [reportReturnType] @classmethod def create(cls, *children, **props) -> Component: diff --git a/reflex/components/radix/themes/typography/text.py b/reflex/components/radix/themes/typography/text.py index 1663ddedf..cb6527915 100644 --- a/reflex/components/radix/themes/typography/text.py +++ b/reflex/components/radix/themes/typography/text.py @@ -47,7 +47,7 @@ class Text(elements.Span, RadixThemesComponent, MarkdownComponentMap): as_child: Var[bool] # Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) - as_: Var[LiteralType] = "p" # type: ignore + as_: Var[LiteralType] = Var.create("p") # Text size: "1" - "9" size: Var[Responsive[LiteralTextSize]] @@ -71,7 +71,7 @@ class Text(elements.Span, RadixThemesComponent, MarkdownComponentMap): class Span(Text): """A variant of text rendering as element.""" - as_: Var[LiteralType] = "span" # type: ignore + as_: Var[LiteralType] = Var.create("span") class Em(elements.Em, RadixThemesComponent): diff --git a/reflex/components/react_player/react_player.py b/reflex/components/react_player/react_player.py index fb0319ceb..7b7bb34e3 100644 --- a/reflex/components/react_player/react_player.py +++ b/reflex/components/react_player/react_player.py @@ -39,7 +39,7 @@ class ReactPlayer(NoSSRComponent): loop: Var[bool] # Set to true or false to display native player controls. - controls: Var[bool] = True # type: ignore + controls: Var[bool] = Var.create(True) # Set to true to show just the video thumbnail, which loads the full player on click light: Var[bool] diff --git a/reflex/components/recharts/charts.py b/reflex/components/recharts/charts.py index c25107dc0..6edfce58f 100644 --- a/reflex/components/recharts/charts.py +++ b/reflex/components/recharts/charts.py @@ -25,10 +25,10 @@ class ChartBase(RechartsCharts): """A component that wraps a Recharts charts.""" # The width of chart container. String or Integer - width: Var[Union[str, int]] = "100%" # type: ignore + width: Var[Union[str, int]] = Var.create("100%") # The height of chart container. - height: Var[Union[str, int]] = "100%" # type: ignore + height: Var[Union[str, int]] = Var.create("100%") # The customized event handler of click on the component in this chart on_click: EventHandler[no_args_event_spec] @@ -84,21 +84,19 @@ class ChartBase(RechartsCharts): cls._ensure_valid_dimension("width", width) cls._ensure_valid_dimension("height", height) - dim_props = { - "width": width if width is not None else "100%", - "height": height if height is not None else "100%", - } - # Ensure that the min_height and min_width are set to prevent the chart from collapsing. # We are using small values so that height and width can still be used over min_height and min_width. # Without this, sometimes the chart will not be visible. Causing confusion to the user. # With this, the user will see a small chart and can adjust the height and width and can figure out that the issue is with the size. - dim_props["min_height"] = props.pop("min_height", 10) - dim_props["min_width"] = props.pop("min_width", 10) + min_height = props.pop("min_height", 10) + min_width = props.pop("min_width", 10) return ResponsiveContainer.create( super().create(*children, **props), - **dim_props, # type: ignore + width=width if width is not None else "100%", + height=height if height is not None else "100%", + min_width=min_width, + min_height=min_height, ) @@ -460,10 +458,10 @@ class Treemap(RechartsCharts): alias = "RechartsTreemap" # The width of chart container. String or Integer. Default: "100%" - width: Var[Union[str, int]] = "100%" # type: ignore + width: Var[Union[str, int]] = Var.create("100%") # The height of chart container. String or Integer. Default: "100%" - height: Var[Union[str, int]] = "100%" # type: ignore + height: Var[Union[str, int]] = Var.create("100%") # data of treemap. Array data: Var[List[Dict[str, Any]]] diff --git a/reflex/components/recharts/polar.py b/reflex/components/recharts/polar.py index 7bb623d34..77aa1ef5e 100644 --- a/reflex/components/recharts/polar.py +++ b/reflex/components/recharts/polar.py @@ -64,7 +64,7 @@ class Pie(Recharts): legend_type: Var[LiteralLegendType] # If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False - label: Var[bool] = False # type: ignore + label: Var[bool] = Var.create(False) # If false set, label lines will not be drawn. If true set, label lines will be drawn which have the props calculated internally. Default: False label_line: Var[bool] diff --git a/reflex/components/sonner/toast.py b/reflex/components/sonner/toast.py index 7177c6473..0f666fd64 100644 --- a/reflex/components/sonner/toast.py +++ b/reflex/components/sonner/toast.py @@ -142,7 +142,7 @@ class ToastProps(PropsBase, NoExtrasAllowedProps): Returns: The object as a dictionary with ToastAction fields intact. """ - kwargs.setdefault("exclude_none", True) # type: ignore + kwargs.setdefault("exclude_none", True) d = super().dict(*args, **kwargs) # Keep these fields as ToastAction so they can be serialized specially if "action" in d: @@ -167,7 +167,7 @@ class ToastProps(PropsBase, NoExtrasAllowedProps): class Toaster(Component): """A Toaster Component for displaying toast notifications.""" - library: str = "sonner@1.7.2" + library: str | None = "sonner@1.7.2" tag = "Toaster" @@ -222,6 +222,8 @@ class Toaster(Component): Returns: The hooks for the toaster component. """ + if self.library is None: + return [] hook = Var( _js_expr=f"{toast_ref} = toast", _var_data=VarData( @@ -266,7 +268,7 @@ class Toaster(Component): raise ValueError("Toast message or title or description must be provided.") if props: - args = LiteralVar.create(ToastProps(component_name="rx.toast", **props)) # pyright: ignore [reportCallIssue, reportGeneralTypeIssues] + args = LiteralVar.create(ToastProps(component_name="rx.toast", **props)) # pyright: ignore [reportCallIssue] toast = toast_command.call(message, args) else: toast = toast_command.call(message) diff --git a/reflex/components/tags/iter_tag.py b/reflex/components/tags/iter_tag.py index 38ecaf81c..cb02ca000 100644 --- a/reflex/components/tags/iter_tag.py +++ b/reflex/components/tags/iter_tag.py @@ -41,14 +41,14 @@ class IterTag(Tag): try: if iterable._var_type.mro()[0] is dict: # Arg is a tuple of (key, value). - return Tuple[get_args(iterable._var_type)] # type: ignore + return Tuple[get_args(iterable._var_type)] # pyright: ignore [reportReturnType] elif iterable._var_type.mro()[0] is tuple: # Arg is a union of any possible values in the tuple. - return Union[get_args(iterable._var_type)] # type: ignore + return Union[get_args(iterable._var_type)] # pyright: ignore [reportReturnType] else: return get_args(iterable._var_type)[0] except Exception: - return Any + return Any # pyright: ignore [reportReturnType] def get_index_var(self) -> Var: """Get the index var for the tag (with curly braces). diff --git a/reflex/config.py b/reflex/config.py index c3c5e4cf5..a76bf987d 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -390,7 +390,7 @@ class EnvVar(Generic[T]): os.environ[self.name] = str(value) -class env_var: # type: ignore # noqa: N801 +class env_var: # noqa: N801 # pyright: ignore [reportRedeclaration] """Descriptor for environment variables.""" name: str @@ -600,7 +600,7 @@ class Config(Base): See the [configuration](https://reflex.dev/docs/getting-started/configuration/) docs for more info. """ - class Config: + class Config: # pyright: ignore [reportIncompatibleVariableOverride] """Pydantic config for the config.""" validate_assignment = True @@ -766,7 +766,7 @@ class Config(Base): """ if self.env_file: try: - from dotenv import load_dotenv # type: ignore + from dotenv import load_dotenv # pyright: ignore [reportMissingImports] # load env file if exists load_dotenv(self.env_file, override=True) diff --git a/reflex/custom_components/custom_components.py b/reflex/custom_components/custom_components.py index 8000e7f4c..3bfbb1580 100644 --- a/reflex/custom_components/custom_components.py +++ b/reflex/custom_components/custom_components.py @@ -925,7 +925,7 @@ def _get_file_from_prompt_in_loop() -> Tuple[bytes, str] | None: image_file = file_extension = None while image_file is None: image_filepath = Path( - console.ask("Upload a preview image of your demo app (enter to skip)") + console.ask("Upload a preview image of your demo app (enter to skip)") # pyright: ignore [reportArgumentType] ) if not image_filepath: break diff --git a/reflex/event.py b/reflex/event.py index 96c2c30b9..0fc874b38 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -263,7 +263,7 @@ class EventSpec(EventActionsMixin): """ # The event handler. - handler: EventHandler = dataclasses.field(default=None) # type: ignore + handler: EventHandler = dataclasses.field(default=None) # pyright: ignore [reportAssignmentType] # The handler on the client to process event. client_handler_name: str = dataclasses.field(default="") @@ -589,7 +589,7 @@ def no_args_event_spec() -> Tuple[()]: Returns: An empty tuple. """ - return () # type: ignore + return () # These chains can be used for their side effects when no other events are desired. @@ -617,9 +617,9 @@ class IdentityEventReturn(Generic[T], Protocol): @overload -def passthrough_event_spec( +def passthrough_event_spec( # pyright: ignore [reportOverlappingOverload] event_type: Type[T], / -) -> Callable[[Var[T]], Tuple[Var[T]]]: ... # type: ignore +) -> Callable[[Var[T]], Tuple[Var[T]]]: ... @overload @@ -632,7 +632,7 @@ def passthrough_event_spec( def passthrough_event_spec(*event_types: Type[T]) -> IdentityEventReturn[T]: ... -def passthrough_event_spec(*event_types: Type[T]) -> IdentityEventReturn[T]: # type: ignore +def passthrough_event_spec(*event_types: Type[T]) -> IdentityEventReturn[T]: # pyright: ignore [reportInconsistentOverload] """A helper function that returns the input event as output. Args: @@ -646,9 +646,9 @@ def passthrough_event_spec(*event_types: Type[T]) -> IdentityEventReturn[T]: # return values inner_type = tuple(Var[event_type] for event_type in event_types) - return_annotation = Tuple[inner_type] # type: ignore + return_annotation = Tuple[inner_type] - inner.__signature__ = inspect.signature(inner).replace( # type: ignore + inner.__signature__ = inspect.signature(inner).replace( # pyright: ignore [reportFunctionMemberAccess] parameters=[ inspect.Parameter( f"ev_{i}", @@ -730,7 +730,7 @@ class FileUpload: # Call the lambda to get the event chain. events = call_event_fn( on_upload_progress, self.on_upload_progress_args_spec - ) # type: ignore + ) else: raise ValueError(f"{on_upload_progress} is not a valid event handler.") if isinstance(events, Var): @@ -777,7 +777,7 @@ def server_side(name: str, sig: inspect.Signature, **kwargs) -> EventSpec: return None fn.__qualname__ = name - fn.__signature__ = sig + fn.__signature__ = sig # pyright: ignore [reportFunctionMemberAccess] return EventSpec( handler=EventHandler(fn=fn, state_full_name=FRONTEND_EVENT_STATE), args=tuple( @@ -1050,13 +1050,13 @@ def download( is_data_url = (data.js_type() == "string") & ( data.to(str).startswith("data:") - ) # type: ignore + ) # If it's a data: URI, use it as is, otherwise convert the Var to JSON in a data: URI. - url = cond( # type: ignore + url = cond( is_data_url, data.to(str), - "data:text/plain," + data.to_string(), # type: ignore + "data:text/plain," + data.to_string(), ) elif isinstance(data, bytes): # Caller provided bytes, so base64 encode it as a data: URI. @@ -1230,7 +1230,7 @@ def call_event_handler( #noqa: DAR401 """ - event_spec_args = parse_args_spec(event_spec) # type: ignore + event_spec_args = parse_args_spec(event_spec) if isinstance(event_callback, EventSpec): check_fn_match_arg_spec( @@ -1340,7 +1340,7 @@ def call_event_handler( if delayed_exceptions: raise delayed_exceptions[0] - return event_callback(*event_spec_args) # type: ignore + return event_callback(*event_spec_args) def unwrap_var_annotation(annotation: GenericType): @@ -1574,7 +1574,7 @@ def fix_events( if not isinstance(e, EventSpec): raise ValueError(f"Unexpected event type, {type(e)}.") name = format.format_event_handler(e.handler) - payload = {k._js_expr: v._decode() for k, v in e.args} # type: ignore + payload = {k._js_expr: v._decode() for k, v in e.args} # Filter router_data to reduce payload size event_router_data = { @@ -1623,7 +1623,7 @@ class EventVar(ObjectVar, python_types=EventSpec): class LiteralEventVar(VarOperationCall, LiteralVar, EventVar): """A literal event var.""" - _var_value: EventSpec = dataclasses.field(default=None) # type: ignore + _var_value: EventSpec = dataclasses.field(default=None) # pyright: ignore [reportAssignmentType] def __hash__(self) -> int: """Get the hash of the var. @@ -1687,7 +1687,7 @@ class EventChainVar(BuilderFunctionVar, python_types=EventChain): class LiteralEventChainVar(ArgsFunctionOperationBuilder, LiteralVar, EventChainVar): """A literal event chain var.""" - _var_value: EventChain = dataclasses.field(default=None) # type: ignore + _var_value: EventChain = dataclasses.field(default=None) # pyright: ignore [reportAssignmentType] def __hash__(self) -> int: """Get the hash of the var. @@ -1717,7 +1717,7 @@ class LiteralEventChainVar(ArgsFunctionOperationBuilder, LiteralVar, EventChainV if isinstance(value.args_spec, Sequence) else value.args_spec ) - sig = inspect.signature(arg_spec) # type: ignore + sig = inspect.signature(arg_spec) # pyright: ignore [reportArgumentType] if sig.parameters: arg_def = tuple((f"_{p}" for p in sig.parameters)) arg_def_expr = LiteralVar.create([Var(_js_expr=arg) for arg in arg_def]) @@ -1819,7 +1819,7 @@ class EventCallback(Generic[P, T]): value4: V4 | Var[V4], ) -> EventCallback[Q, T]: ... - def __call__(self, *values) -> EventCallback: # type: ignore + def __call__(self, *values) -> EventCallback: # pyright: ignore [reportInconsistentOverload] """Call the function with the values. Args: @@ -1828,7 +1828,7 @@ class EventCallback(Generic[P, T]): Returns: The function with the values. """ - return self.func(*values) # type: ignore + return self.func(*values) # pyright: ignore [reportCallIssue, reportReturnType] @overload def __get__( @@ -1838,7 +1838,7 @@ class EventCallback(Generic[P, T]): @overload def __get__(self, instance, owner) -> Callable[P, T]: ... - def __get__(self, instance, owner) -> Callable: # type: ignore + def __get__(self, instance, owner) -> Callable: """Get the function with the instance bound to it. Args: @@ -1849,9 +1849,9 @@ class EventCallback(Generic[P, T]): The function with the instance bound to it """ if instance is None: - return self.func # type: ignore + return self.func - return partial(self.func, instance) # type: ignore + return partial(self.func, instance) G = ParamSpec("G") @@ -1902,7 +1902,7 @@ class EventNamespace(types.SimpleNamespace): @staticmethod def __call__( func: None = None, *, background: bool | None = None - ) -> Callable[[Callable[Concatenate[BASE_STATE, P], T]], EventCallback[P, T]]: ... + ) -> Callable[[Callable[Concatenate[BASE_STATE, P], T]], EventCallback[P, T]]: ... # pyright: ignore [reportInvalidTypeVarUse] @overload @staticmethod @@ -1945,7 +1945,7 @@ class EventNamespace(types.SimpleNamespace): "Background task must be async function or generator." ) setattr(func, BACKGROUND_TASK_MARKER, True) - return func # type: ignore + return func # pyright: ignore [reportReturnType] if func is not None: return wrapper(func) diff --git a/reflex/experimental/client_state.py b/reflex/experimental/client_state.py index ca91905ae..ce3a941bb 100644 --- a/reflex/experimental/client_state.py +++ b/reflex/experimental/client_state.py @@ -201,9 +201,7 @@ class ClientStateVar(Var): ) .to(self._var_type) ._replace( - merge_var_data=VarData( # type: ignore - imports=_refs_import if self._global_ref else {} - ) + merge_var_data=VarData(imports=_refs_import if self._global_ref else {}) ) ) diff --git a/reflex/experimental/layout.py b/reflex/experimental/layout.py index e5a1bab04..1c74271b2 100644 --- a/reflex/experimental/layout.py +++ b/reflex/experimental/layout.py @@ -44,10 +44,10 @@ class Sidebar(Box, MemoizationLeaf): Returns: The style of the component. """ - sidebar: Component = self.children[-2] # type: ignore - spacer: Component = self.children[-1] # type: ignore + sidebar: Component = self.children[-2] # pyright: ignore [reportAssignmentType] + spacer: Component = self.children[-1] # pyright: ignore [reportAssignmentType] open = ( - self.State.open # type: ignore + self.State.open # pyright: ignore [reportAttributeAccessIssue] if self.State else Var(_js_expr="open") ) @@ -159,11 +159,11 @@ class SidebarTrigger(Fragment): """ trigger_props = {**props, **sidebar_trigger_style} - inner_sidebar: Component = sidebar.children[0] # type: ignore + inner_sidebar: Component = sidebar.children[0] # pyright: ignore [reportAssignmentType] sidebar_width = inner_sidebar.style.get("width") if sidebar.State: - open, toggle = sidebar.State.open, sidebar.State.toggle # type: ignore + open, toggle = sidebar.State.open, sidebar.State.toggle # pyright: ignore [reportAttributeAccessIssue] else: open, toggle = ( Var(_js_expr="open"), diff --git a/reflex/model.py b/reflex/model.py index 295159de0..6e44498e9 100644 --- a/reflex/model.py +++ b/reflex/model.py @@ -242,7 +242,7 @@ class ModelRegistry: return metadata -class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssues] +class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssues,reportIncompatibleVariableOverride] """Base class to define a table in the database.""" # The primary key for the table. @@ -415,7 +415,7 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue connection=connection, target_metadata=ModelRegistry.get_metadata(), render_item=cls._alembic_render_item, - process_revision_directives=writer, # type: ignore + process_revision_directives=writer, compare_type=False, render_as_batch=True, # for sqlite compatibility ) diff --git a/reflex/reflex.py b/reflex/reflex.py index 34a4a58a5..2fb10a944 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -17,7 +17,7 @@ from reflex.state import reset_disk_state_manager from reflex.utils import console, telemetry # Disable typer+rich integration for help panels -typer.core.rich = None # type: ignore +typer.core.rich = None # pyright: ignore [reportPrivateImportUsage] # Create the app. try: @@ -355,7 +355,7 @@ def logout( check_version() - logout(loglevel) # type: ignore + logout(loglevel) # pyright: ignore [reportArgumentType] db_cli = typer.Typer() diff --git a/reflex/state.py b/reflex/state.py index be3deda78..badc40dfd 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -587,7 +587,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): if cls._item_is_event_handler(name, fn) } - for mixin in cls._mixins(): + for mixin in cls._mixins(): # pyright: ignore [reportAssignmentType] for name, value in mixin.__dict__.items(): if name in cls.inherited_vars: continue @@ -599,7 +599,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): cls.computed_vars[newcv._js_expr] = newcv cls.vars[newcv._js_expr] = newcv continue - if types.is_backend_base_variable(name, mixin): + if types.is_backend_base_variable(name, mixin): # pyright: ignore [reportArgumentType] cls.backend_vars[name] = copy.deepcopy(value) continue if events.get(name) is not None: @@ -899,7 +899,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): ] if len(parent_states) >= 2: raise ValueError(f"Only one parent state is allowed {parent_states}.") - return parent_states[0] if len(parent_states) == 1 else None # type: ignore + return parent_states[0] if len(parent_states) == 1 else None @classmethod def get_substates(cls) -> set[Type[BaseState]]: @@ -1268,8 +1268,8 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): fn = _no_chain_background_task(type(self), name, handler.fn) else: fn = functools.partial(handler.fn, self) - fn.__module__ = handler.fn.__module__ # type: ignore - fn.__qualname__ = handler.fn.__qualname__ # type: ignore + fn.__module__ = handler.fn.__module__ + fn.__qualname__ = handler.fn.__qualname__ return fn backend_vars = super().__getattribute__("_backend_vars") @@ -1634,7 +1634,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): """ # Oopsie case: you didn't give me a Var... so get what you give. if not isinstance(var, Var): - return var # type: ignore + return var # Fast case: this is a literal var and the value is known. if hasattr(var, "_var_value"): @@ -2453,7 +2453,7 @@ class OnLoadInternalState(State): self.router.session.client_token, router_data=self.router_data, ), - State.set_is_hydrated(True), # type: ignore + State.set_is_hydrated(True), # pyright: ignore [reportAttributeAccessIssue] ] @@ -2737,7 +2737,7 @@ class StateProxy(wrapt.ObjectProxy): # ensure mutations to these containers are blocked unless proxy is _mutable return ImmutableMutableProxy( wrapped=value.__wrapped__, - state=self, # type: ignore + state=self, field_name=value._self_field_name, ) if isinstance(value, functools.partial) and value.args[0] is self.__wrapped__: @@ -2750,7 +2750,7 @@ class StateProxy(wrapt.ObjectProxy): ) if isinstance(value, MethodType) and value.__self__ is self.__wrapped__: # Rebind methods to the proxy instance - value = type(value)(value.__func__, self) # type: ignore + value = type(value)(value.__func__, self) return value def __setattr__(self, name: str, value: Any) -> None: @@ -2950,7 +2950,7 @@ class StateManagerMemory(StateManager): # The dict of mutexes for each client _states_locks: Dict[str, asyncio.Lock] = pydantic.PrivateAttr({}) - class Config: + class Config: # pyright: ignore [reportIncompatibleVariableOverride] """The Pydantic config.""" fields = { @@ -3068,7 +3068,7 @@ class StateManagerDisk(StateManager): # The token expiration time (s). token_expiration: int = pydantic.Field(default_factory=_default_token_expiration) - class Config: + class Config: # pyright: ignore [reportIncompatibleVariableOverride] """The Pydantic config.""" fields = { @@ -3776,9 +3776,9 @@ class MutableProxy(wrapt.ObjectProxy): wrapper_cls_name, (cls,), { - dataclasses._FIELDS: getattr( # pyright: ignore [reportGeneralTypeIssues] + dataclasses._FIELDS: getattr( # pyright: ignore [reportAttributeAccessIssue] wrapped_cls, - dataclasses._FIELDS, # pyright: ignore [reportGeneralTypeIssues] + dataclasses._FIELDS, # pyright: ignore [reportAttributeAccessIssue] ), }, ) @@ -3931,7 +3931,7 @@ class MutableProxy(wrapt.ObjectProxy): ): # Wrap methods called on Base subclasses, which might do _anything_ return wrapt.FunctionWrapper( - functools.partial(value.__func__, self), + functools.partial(value.__func__, self), # pyright: ignore [reportFunctionMemberAccess] self._wrap_recursive_decorator, ) diff --git a/reflex/style.py b/reflex/style.py index 3916bbc7c..5142d0181 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -78,7 +78,7 @@ def set_color_mode( _var_data=VarData.merge( base_setter._get_all_var_data(), new_color_mode._get_all_var_data() ), - ).to(FunctionVar, EventChain) # type: ignore + ).to(FunctionVar, EventChain) # Var resolves to the current color mode for the app ("light", "dark" or "system") diff --git a/reflex/testing.py b/reflex/testing.py index 7c6aab93b..897cb3424 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -80,7 +80,7 @@ T = TypeVar("T") TimeoutType = Optional[Union[int, float]] if platform.system() == "Windows": - FRONTEND_POPEN_ARGS["creationflags"] = subprocess.CREATE_NEW_PROCESS_GROUP # type: ignore + FRONTEND_POPEN_ARGS["creationflags"] = subprocess.CREATE_NEW_PROCESS_GROUP # pyright: ignore [reportAttributeAccessIssue] FRONTEND_POPEN_ARGS["shell"] = True else: FRONTEND_POPEN_ARGS["start_new_session"] = True @@ -258,7 +258,7 @@ class AppHarness: if self.app_source is not None: app_globals = self._get_globals_from_signature(self.app_source) if isinstance(self.app_source, functools.partial): - self.app_source = self.app_source.func # type: ignore + self.app_source = self.app_source.func # get the source from a function or module object source_code = "\n".join( [ @@ -294,11 +294,15 @@ class AppHarness: if p not in before_decorated_pages ] self.app_instance = self.app_module.app - if isinstance(self.app_instance._state_manager, StateManagerRedis): + if self.app_instance and isinstance( + self.app_instance._state_manager, StateManagerRedis + ): # Create our own redis connection for testing. - self.state_manager = StateManagerRedis.create(self.app_instance._state) + self.state_manager = StateManagerRedis.create(self.app_instance._state) # pyright: ignore [reportArgumentType] else: - self.state_manager = self.app_instance._state_manager + self.state_manager = ( + self.app_instance._state_manager if self.app_instance else None + ) def _reload_state_module(self): """Reload the rx.State module to avoid conflict when reloading.""" @@ -621,23 +625,23 @@ class AppHarness: want_headless = True if driver_clz is None: requested_driver = environment.APP_HARNESS_DRIVER.get() - driver_clz = getattr(webdriver, requested_driver) + driver_clz = getattr(webdriver, requested_driver) # pyright: ignore [reportPossiblyUnboundVariable] if driver_options is None: - driver_options = getattr(webdriver, f"{requested_driver}Options")() - if driver_clz is webdriver.Chrome: + driver_options = getattr(webdriver, f"{requested_driver}Options")() # pyright: ignore [reportPossiblyUnboundVariable] + if driver_clz is webdriver.Chrome: # pyright: ignore [reportPossiblyUnboundVariable] if driver_options is None: - driver_options = webdriver.ChromeOptions() + driver_options = webdriver.ChromeOptions() # pyright: ignore [reportPossiblyUnboundVariable] driver_options.add_argument("--class=AppHarness") if want_headless: driver_options.add_argument("--headless=new") - elif driver_clz is webdriver.Firefox: + elif driver_clz is webdriver.Firefox: # pyright: ignore [reportPossiblyUnboundVariable] if driver_options is None: - driver_options = webdriver.FirefoxOptions() + driver_options = webdriver.FirefoxOptions() # pyright: ignore [reportPossiblyUnboundVariable] if want_headless: driver_options.add_argument("-headless") - elif driver_clz is webdriver.Edge: + elif driver_clz is webdriver.Edge: # pyright: ignore [reportPossiblyUnboundVariable] if driver_options is None: - driver_options = webdriver.EdgeOptions() + driver_options = webdriver.EdgeOptions() # pyright: ignore [reportPossiblyUnboundVariable] if want_headless: driver_options.add_argument("headless") if driver_options is None: @@ -653,7 +657,7 @@ class AppHarness: driver_options.set_capability(key, value) if driver_kwargs is None: driver_kwargs = {} - driver = driver_clz(options=driver_options, **driver_kwargs) # type: ignore + driver = driver_clz(options=driver_options, **driver_kwargs) # pyright: ignore [reportOptionalCall, reportArgumentType] driver.get(self.frontend_url) self._frontends.append(driver) return driver @@ -885,8 +889,8 @@ class Subdir404TCPServer(socketserver.TCPServer): request, client_address, self, - directory=str(self.root), # type: ignore - error_page_map=self.error_page_map, # type: ignore + directory=str(self.root), # pyright: ignore [reportCallIssue] + error_page_map=self.error_page_map, # pyright: ignore [reportCallIssue] ) diff --git a/reflex/utils/compat.py b/reflex/utils/compat.py index e63492a6b..339911063 100644 --- a/reflex/utils/compat.py +++ b/reflex/utils/compat.py @@ -50,11 +50,11 @@ def pydantic_v1_patch(): ] originals = {module: sys.modules.get(module) for module in patched_modules} try: - import pydantic.v1 # type: ignore + import pydantic.v1 - sys.modules["pydantic.fields"] = pydantic.v1.fields # type: ignore - sys.modules["pydantic.main"] = pydantic.v1.main # type: ignore - sys.modules["pydantic.errors"] = pydantic.v1.errors # type: ignore + sys.modules["pydantic.fields"] = pydantic.v1.fields # pyright: ignore [reportAttributeAccessIssue] + sys.modules["pydantic.main"] = pydantic.v1.main # pyright: ignore [reportAttributeAccessIssue] + sys.modules["pydantic.errors"] = pydantic.v1.errors # pyright: ignore [reportAttributeAccessIssue] sys.modules["pydantic"] = pydantic.v1 yield except (ImportError, AttributeError): diff --git a/reflex/utils/console.py b/reflex/utils/console.py index 900e5ed07..d5b7a0d6e 100644 --- a/reflex/utils/console.py +++ b/reflex/utils/console.py @@ -196,7 +196,7 @@ def _get_first_non_framework_frame() -> FrameType | None: exclude_modules = [click, rx, typer, typing_extensions] exclude_roots = [ p.parent.resolve() - if (p := Path(m.__file__)).name == "__init__.py" + if (p := Path(m.__file__)).name == "__init__.py" # pyright: ignore [reportArgumentType] else p.resolve() for m in exclude_modules ] @@ -275,7 +275,7 @@ def ask( choices: list[str] | None = None, default: str | None = None, show_choices: bool = True, -) -> str: +) -> str | None: """Takes a prompt question and optionally a list of choices and returns the user input. @@ -290,7 +290,7 @@ def ask( """ return Prompt.ask( question, choices=choices, default=default, show_choices=show_choices - ) # type: ignore + ) def progress(): diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 1e5cda10b..22322634d 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -71,7 +71,7 @@ def notify_backend(): # run_process_and_launch_url is assumed to be used # only to launch the frontend # If this is not the case, might have to change the logic -def run_process_and_launch_url(run_command: list[str], backend_present=True): +def run_process_and_launch_url(run_command: list[str | None], backend_present=True): """Run the process and launch the URL. Args: @@ -89,7 +89,7 @@ def run_process_and_launch_url(run_command: list[str], backend_present=True): if process is None: kwargs = {} if constants.IS_WINDOWS and backend_present: - kwargs["creationflags"] = subprocess.CREATE_NEW_PROCESS_GROUP # type: ignore + kwargs["creationflags"] = subprocess.CREATE_NEW_PROCESS_GROUP # pyright: ignore [reportAttributeAccessIssue] process = processes.new_process( run_command, cwd=get_web_dir(), @@ -151,7 +151,7 @@ def run_frontend(root: Path, port: str, backend_present=True): console.rule("[bold green]App Running") os.environ["PORT"] = str(get_config().frontend_port if port is None else port) run_process_and_launch_url( - [prerequisites.get_package_manager(), "run", "dev"], # type: ignore + [prerequisites.get_package_manager(), "run", "dev"], backend_present, ) @@ -173,7 +173,7 @@ def run_frontend_prod(root: Path, port: str, backend_present=True): # Run the frontend in production mode. console.rule("[bold green]App Running") run_process_and_launch_url( - [prerequisites.get_package_manager(), "run", "prod"], # type: ignore + [prerequisites.get_package_manager(), "run", "prod"], backend_present, ) @@ -295,9 +295,11 @@ def run_granian_backend(host, port, loglevel: LogLevel): """ console.debug("Using Granian for backend") try: - from granian import Granian # type: ignore - from granian.constants import Interfaces # type: ignore - from granian.log import LogLevels # type: ignore + from granian import Granian # pyright: ignore [reportMissingImports] + from granian.constants import ( # pyright: ignore [reportMissingImports] + Interfaces, + ) + from granian.log import LogLevels # pyright: ignore [reportMissingImports] Granian( target=get_granian_target(), @@ -413,7 +415,9 @@ def run_granian_backend_prod(host, port, loglevel): from reflex.utils import processes try: - from granian.constants import Interfaces # type: ignore + from granian.constants import ( # pyright: ignore [reportMissingImports] + Interfaces, + ) command = [ "granian", @@ -482,7 +486,7 @@ def output_system_info(): dependencies.append(fnm_info) if system == "Linux": - import distro # type: ignore + import distro os_version = distro.name(pretty=True) else: @@ -494,11 +498,11 @@ def output_system_info(): console.debug(f"{dep}") console.debug( - f"Using package installer at: {prerequisites.get_install_package_manager(on_failure_return_none=True)}" # type: ignore + f"Using package installer at: {prerequisites.get_install_package_manager(on_failure_return_none=True)}" ) console.debug( f"Using package executer at: {prerequisites.get_package_manager(on_failure_return_none=True)}" - ) # type: ignore + ) if system != "Windows": console.debug(f"Unzip path: {path_ops.which('unzip')}") diff --git a/reflex/utils/format.py b/reflex/utils/format.py index 87d160553..7973549b0 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -377,7 +377,7 @@ def format_prop( # For dictionaries, convert any properties to strings. elif isinstance(prop, dict): - prop = serializers.serialize_dict(prop) # type: ignore + prop = serializers.serialize_dict(prop) # pyright: ignore [reportAttributeAccessIssue] else: # Dump the prop as JSON. @@ -533,14 +533,14 @@ def format_queue_events( from reflex.vars import FunctionVar, Var if not events: - return Var("(() => null)").to(FunctionVar, EventChain) # type: ignore + return Var("(() => null)").to(FunctionVar, EventChain) # If no spec is provided, the function will take no arguments. def _default_args_spec(): return [] # Construct the arguments that the function accepts. - sig = inspect.signature(args_spec or _default_args_spec) # type: ignore + sig = inspect.signature(args_spec or _default_args_spec) if sig.parameters: arg_def = ",".join(f"_{p}" for p in sig.parameters) arg_def = f"({arg_def})" @@ -557,7 +557,7 @@ def format_queue_events( if isinstance(spec, (EventHandler, EventSpec)): specs = [call_event_handler(spec, args_spec or _default_args_spec)] elif isinstance(spec, type(lambda: None)): - specs = call_event_fn(spec, args_spec or _default_args_spec) # type: ignore + specs = call_event_fn(spec, args_spec or _default_args_spec) # pyright: ignore [reportAssignmentType, reportArgumentType] if isinstance(specs, Var): raise ValueError( f"Invalid event spec: {specs}. Expected a list of EventSpecs." @@ -569,7 +569,7 @@ def format_queue_events( return Var( f"{arg_def} => {{queueEvents([{','.join(payloads)}], {constants.CompileVars.SOCKET}); " f"processEvent({constants.CompileVars.SOCKET})}}", - ).to(FunctionVar, EventChain) # type: ignore + ).to(FunctionVar, EventChain) def format_query_params(router_data: dict[str, Any]) -> dict[str, str]: diff --git a/reflex/utils/imports.py b/reflex/utils/imports.py index ab217087c..46e8e7362 100644 --- a/reflex/utils/imports.py +++ b/reflex/utils/imports.py @@ -122,7 +122,7 @@ class ImportVar: """ if self.alias: return ( - self.alias if self.is_default else " as ".join([self.tag, self.alias]) # type: ignore + self.alias if self.is_default else " as ".join([self.tag, self.alias]) # pyright: ignore [reportCallIssue,reportArgumentType] ) else: return self.tag or "" diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 66c9156a9..edaa77aba 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -176,7 +176,7 @@ def get_node_version() -> version.Version | None: try: result = processes.new_process([node_path, "-v"], run=True) # The output will be in the form "vX.Y.Z", but version.parse() can handle it - return version.parse(result.stdout) # type: ignore + return version.parse(result.stdout) # pyright: ignore [reportArgumentType] except (FileNotFoundError, TypeError): return None @@ -189,7 +189,7 @@ def get_fnm_version() -> version.Version | None: """ try: result = processes.new_process([constants.Fnm.EXE, "--version"], run=True) - return version.parse(result.stdout.split(" ")[1]) # type: ignore + return version.parse(result.stdout.split(" ")[1]) # pyright: ignore [reportOptionalMemberAccess, reportAttributeAccessIssue] except (FileNotFoundError, TypeError): return None except version.InvalidVersion as e: @@ -211,7 +211,7 @@ def get_bun_version() -> version.Version | None: try: # Run the bun -v command and capture the output result = processes.new_process([str(bun_path), "-v"], run=True) - return version.parse(str(result.stdout)) + return version.parse(str(result.stdout)) # pyright: ignore [reportArgumentType] except FileNotFoundError: return None except version.InvalidVersion as e: @@ -1188,7 +1188,7 @@ def install_frontend_packages(packages: set[str], config: Config): ) processes.run_process_with_fallback( - [install_package_manager, "install"], # type: ignore + [install_package_manager, "install"], fallback=fallback_command, analytics_enabled=True, show_status_message="Installing base frontend packages", @@ -1481,7 +1481,7 @@ def prompt_for_template_options(templates: list[Template]) -> str: ) # Return the template. - return templates[int(template)].name + return templates[int(template)].name # pyright: ignore [reportArgumentType] def fetch_app_templates(version: str) -> dict[str, Template]: diff --git a/reflex/utils/processes.py b/reflex/utils/processes.py index 575688eda..94e0fda3e 100644 --- a/reflex/utils/processes.py +++ b/reflex/utils/processes.py @@ -62,7 +62,7 @@ def get_process_on_port(port) -> Optional[psutil.Process]: psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess ): if importlib.metadata.version("psutil") >= "6.0.0": - conns = proc.net_connections(kind="inet") # type: ignore + conns = proc.net_connections(kind="inet") else: conns = proc.connections(kind="inet") for conn in conns: @@ -91,7 +91,7 @@ def kill_process_on_port(port): """ if get_process_on_port(port) is not None: with contextlib.suppress(psutil.AccessDenied): - get_process_on_port(port).kill() # type: ignore + get_process_on_port(port).kill() # pyright: ignore [reportOptionalMemberAccess] def change_port(port: str, _type: str) -> str: @@ -212,14 +212,14 @@ def run_concurrently_context( return # Convert the functions to tuples. - fns = [fn if isinstance(fn, tuple) else (fn,) for fn in fns] # type: ignore + fns = [fn if isinstance(fn, tuple) else (fn,) for fn in fns] # pyright: ignore [reportAssignmentType] # Run the functions concurrently. executor = None try: executor = futures.ThreadPoolExecutor(max_workers=len(fns)) # Submit the tasks. - tasks = [executor.submit(*fn) for fn in fns] # type: ignore + tasks = [executor.submit(*fn) for fn in fns] # pyright: ignore [reportArgumentType] # Yield control back to the main thread while tasks are running. yield tasks diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index 152c06949..5a8cad18e 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -229,7 +229,7 @@ def _generate_imports( """ return [ *[ - ast.ImportFrom(module=name, names=[ast.alias(name=val) for val in values]) + ast.ImportFrom(module=name, names=[ast.alias(name=val) for val in values]) # pyright: ignore [reportCallIssue] for name, values in DEFAULT_IMPORTS.items() ], ast.Import([ast.alias("reflex")]), @@ -367,7 +367,7 @@ def _extract_class_props_as_ast_nodes( # Try to get default from pydantic field definition. default = target_class.__fields__[name].default if isinstance(default, Var): - default = default._decode() # type: ignore + default = default._decode() kwargs.append( ( @@ -434,10 +434,12 @@ def type_to_ast(typ, cls: type) -> ast.AST: if len(arg_nodes) == 1: slice_value = arg_nodes[0] else: - slice_value = ast.Tuple(elts=arg_nodes, ctx=ast.Load()) + slice_value = ast.Tuple(elts=arg_nodes, ctx=ast.Load()) # pyright: ignore [reportArgumentType] return ast.Subscript( - value=ast.Name(id=base_name), slice=ast.Index(value=slice_value), ctx=ast.Load() + value=ast.Name(id=base_name), + slice=ast.Index(value=slice_value), # pyright: ignore [reportArgumentType] + ctx=ast.Load(), ) @@ -575,7 +577,7 @@ def _generate_component_create_functiondef( arg=trigger, annotation=ast.Subscript( ast.Name("Optional"), - ast.Index( # type: ignore + ast.Index( # pyright: ignore [reportArgumentType] value=ast.Name( id=ast.unparse( figure_out_return_type( @@ -621,7 +623,7 @@ def _generate_component_create_functiondef( definition = ast.FunctionDef( name="create", args=create_args, - body=[ + body=[ # pyright: ignore [reportArgumentType] ast.Expr( value=ast.Constant( value=_generate_docstrings( @@ -630,7 +632,7 @@ def _generate_component_create_functiondef( ), ), ast.Expr( - value=ast.Ellipsis(), + value=ast.Constant(value=Ellipsis), ), ], decorator_list=[ @@ -641,7 +643,7 @@ def _generate_component_create_functiondef( else [ast.Name(id="classmethod")] ), ], - lineno=node.lineno if node is not None else None, + lineno=node.lineno if node is not None else None, # pyright: ignore [reportArgumentType] returns=ast.Constant(value=clz.__name__), ) return definition @@ -690,7 +692,7 @@ def _generate_staticmethod_call_functiondef( ), ], decorator_list=[ast.Name(id="staticmethod")], - lineno=node.lineno if node is not None else None, + lineno=node.lineno if node is not None else None, # pyright: ignore [reportArgumentType] returns=ast.Constant( value=_get_type_hint( typing.get_type_hints(clz.__call__).get("return", None), @@ -726,17 +728,17 @@ def _generate_namespace_call_functiondef( clz = classes[clz_name] if not hasattr(clz.__call__, "__self__"): - return _generate_staticmethod_call_functiondef(node, clz, type_hint_globals) # type: ignore + return _generate_staticmethod_call_functiondef(node, clz, type_hint_globals) # pyright: ignore [reportArgumentType] # Determine which class is wrapped by the namespace __call__ method component_clz = clz.__call__.__self__ - if clz.__call__.__func__.__name__ != "create": + if clz.__call__.__func__.__name__ != "create": # pyright: ignore [reportFunctionMemberAccess] return None definition = _generate_component_create_functiondef( node=None, - clz=component_clz, # type: ignore + clz=component_clz, # pyright: ignore [reportArgumentType] type_hint_globals=type_hint_globals, ) definition.name = "__call__" @@ -816,7 +818,7 @@ class StubGenerator(ast.NodeTransformer): The modified Module node. """ self.generic_visit(node) - return self._remove_docstring(node) # type: ignore + return self._remove_docstring(node) # pyright: ignore [reportReturnType] def visit_Import( self, node: ast.Import | ast.ImportFrom @@ -914,7 +916,7 @@ class StubGenerator(ast.NodeTransformer): node.body.append(call_definition) if not node.body: # We should never return an empty body. - node.body.append(ast.Expr(value=ast.Ellipsis())) + node.body.append(ast.Expr(value=ast.Constant(value=Ellipsis))) self.current_class = None return node @@ -941,9 +943,9 @@ class StubGenerator(ast.NodeTransformer): if node.name.startswith("_") and node.name != "__call__": return None # remove private methods - if node.body[-1] != ast.Expr(value=ast.Ellipsis()): + if node.body[-1] != ast.Expr(value=ast.Constant(value=Ellipsis)): # Blank out the function body for public functions. - node.body = [ast.Expr(value=ast.Ellipsis())] + node.body = [ast.Expr(value=ast.Constant(value=Ellipsis))] return node def visit_Assign(self, node: ast.Assign) -> ast.Assign | None: @@ -1077,7 +1079,7 @@ class PyiGenerator: + ( " # type: ignore" if mod in pyright_ignore_imports - else " # noqa" # ignore ruff formatting here for cases like rx.list. + else " # noqa: F401" # ignore ruff formatting here for cases like rx.list. if isinstance(mod, tuple) else "" ) diff --git a/reflex/utils/serializers.py b/reflex/utils/serializers.py index 4bb8dea92..f78438522 100644 --- a/reflex/utils/serializers.py +++ b/reflex/utils/serializers.py @@ -476,7 +476,7 @@ try: base64_image = base64.b64encode(image_bytes).decode("utf-8") try: # Newer method to get the mime type, but does not always work. - mime_type = image.get_format_mimetype() # type: ignore + mime_type = image.get_format_mimetype() # pyright: ignore [reportAttributeAccessIssue] except AttributeError: try: # Fallback method diff --git a/reflex/utils/types.py b/reflex/utils/types.py index 0b3ec7e9f..6257b1472 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -24,7 +24,7 @@ from typing import ( Tuple, Type, Union, - _GenericAlias, # type: ignore + _GenericAlias, # pyright: ignore [reportAttributeAccessIssue] get_args, get_type_hints, ) @@ -39,7 +39,9 @@ from reflex.components.core.breakpoints import Breakpoints try: from pydantic.v1.fields import ModelField except ModuleNotFoundError: - from pydantic.fields import ModelField # type: ignore + from pydantic.fields import ( + ModelField, # pyright: ignore [reportAttributeAccessIssue] + ) from sqlalchemy.ext.associationproxy import AssociationProxyInstance from sqlalchemy.ext.hybrid import hybrid_property @@ -70,13 +72,15 @@ GenericAliasTypes = [_GenericAlias] with contextlib.suppress(ImportError): # For newer versions of Python. - from types import GenericAlias # type: ignore + from types import GenericAlias GenericAliasTypes.append(GenericAlias) with contextlib.suppress(ImportError): # For older versions of Python. - from typing import _SpecialGenericAlias # type: ignore + from typing import ( + _SpecialGenericAlias, # pyright: ignore [reportAttributeAccessIssue] + ) GenericAliasTypes.append(_SpecialGenericAlias) @@ -175,7 +179,7 @@ def is_generic_alias(cls: GenericType) -> bool: Returns: Whether the class is a generic alias. """ - return isinstance(cls, GenericAliasTypes) + return isinstance(cls, GenericAliasTypes) # pyright: ignore [reportArgumentType] def unionize(*args: GenericType) -> Type: @@ -188,14 +192,14 @@ def unionize(*args: GenericType) -> Type: The unionized types. """ if not args: - return Any + return Any # pyright: ignore [reportReturnType] if len(args) == 1: return args[0] # We are bisecting the args list here to avoid hitting the recursion limit # In Python versions >= 3.11, we can simply do `return Union[*args]` midpoint = len(args) // 2 first_half, second_half = args[:midpoint], args[midpoint:] - return Union[unionize(*first_half), unionize(*second_half)] + return Union[unionize(*first_half), unionize(*second_half)] # pyright: ignore [reportReturnType] def is_none(cls: GenericType) -> bool: @@ -351,13 +355,13 @@ def get_attribute_access_type(cls: GenericType, name: str) -> GenericType | None if type_ is not None: if hasattr(column_type, "item_type"): try: - item_type = column_type.item_type.python_type # type: ignore + item_type = column_type.item_type.python_type # pyright: ignore [reportAttributeAccessIssue] except NotImplementedError: item_type = None if item_type is not None: if type_ in PrimitiveToAnnotation: - type_ = PrimitiveToAnnotation[type_] # type: ignore - type_ = type_[item_type] # type: ignore + type_ = PrimitiveToAnnotation[type_] + type_ = type_[item_type] # pyright: ignore [reportIndexIssue] if column.nullable: type_ = Optional[type_] return type_ @@ -432,7 +436,7 @@ def get_base_class(cls: GenericType) -> Type: return type(get_args(cls)[0]) if is_union(cls): - return tuple(get_base_class(arg) for arg in get_args(cls)) + return tuple(get_base_class(arg) for arg in get_args(cls)) # pyright: ignore [reportReturnType] return get_base_class(cls.__origin__) if is_generic_alias(cls) else cls diff --git a/reflex/vars/base.py b/reflex/vars/base.py index a3b3059e9..ac48355c4 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -662,7 +662,7 @@ class Var(Generic[VAR_TYPE]): return self.to(var_subclass.var_subclass, output) if fixed_output_type is None: - return get_to_operation(NoneVar).create(self) # type: ignore + return get_to_operation(NoneVar).create(self) # pyright: ignore [reportReturnType] # Handle fixed_output_type being Base or a dataclass. if can_use_in_object_var(fixed_output_type): @@ -679,7 +679,7 @@ class Var(Generic[VAR_TYPE]): to_operation_return = var_subclass.to_var_subclass.create( value=self, _var_type=new_var_type ) - return to_operation_return # type: ignore + return to_operation_return # pyright: ignore [reportReturnType] # If we can't determine the first argument, we just replace the _var_type. if not issubclass(output, Var) or var_type is None: @@ -1095,7 +1095,7 @@ class Var(Generic[VAR_TYPE]): The decoded value or the Var name. """ if isinstance(self, LiteralVar): - return self._var_value # type: ignore + return self._var_value try: return json.loads(str(self)) except ValueError: @@ -1222,7 +1222,7 @@ class ToOperation: """ return VarData.merge( self._original._get_all_var_data(), - self._var_data, # type: ignore + self._var_data, ) @classmethod @@ -1243,10 +1243,10 @@ class ToOperation: The ToOperation. """ return cls( - _js_expr="", # type: ignore - _var_data=_var_data, # type: ignore - _var_type=_var_type or cls._default_var_type, # type: ignore - _original=value, # type: ignore + _js_expr="", # pyright: ignore [reportCallIssue] + _var_data=_var_data, # pyright: ignore [reportCallIssue] + _var_type=_var_type or cls._default_var_type, # pyright: ignore [reportCallIssue, reportAttributeAccessIssue] + _original=value, # pyright: ignore [reportCallIssue] ) @@ -1435,7 +1435,7 @@ T = TypeVar("T") # NoReturn is used to match CustomVarOperationReturn with no type hint. @overload -def var_operation( +def var_operation( # pyright: ignore [reportOverlappingOverload] func: Callable[P, CustomVarOperationReturn[NoReturn]], ) -> Callable[P, Var]: ... @@ -1485,7 +1485,7 @@ def var_operation( ) -> Callable[P, Var[T]]: ... -def var_operation( +def var_operation( # pyright: ignore [reportInconsistentOverload] func: Callable[P, CustomVarOperationReturn[T]], ) -> Callable[P, Var[T]]: """Decorator for creating a var operation. @@ -1519,7 +1519,7 @@ def var_operation( return CustomVarOperation.create( name=func.__name__, args=tuple(list(args_vars.items()) + list(kwargs_vars.items())), - return_var=func(*args_vars.values(), **kwargs_vars), # type: ignore + return_var=func(*args_vars.values(), **kwargs_vars), # pyright: ignore [reportCallIssue, reportReturnType] ).guess_type() return wrapper @@ -1589,7 +1589,7 @@ class CachedVarOperation: next_class = parent_classes[parent_classes.index(CachedVarOperation) + 1] - return next_class.__getattr__(self, name) # type: ignore + return next_class.__getattr__(self, name) def _get_all_var_data(self) -> VarData | None: """Get all VarData associated with the Var. @@ -1611,7 +1611,7 @@ class CachedVarOperation: value._get_all_var_data() if isinstance(value, Var) else None for value in ( getattr(self, field.name) - for field in dataclasses.fields(self) # type: ignore + for field in dataclasses.fields(self) # pyright: ignore [reportArgumentType] ) ), self._var_data, @@ -1628,7 +1628,7 @@ class CachedVarOperation: type(self).__name__, *[ getattr(self, field.name) - for field in dataclasses.fields(self) # type: ignore + for field in dataclasses.fields(self) # pyright: ignore [reportArgumentType] if field.name not in ["_js_expr", "_var_data", "_var_type"] ], ) @@ -1645,7 +1645,7 @@ def and_operation(a: Var | Any, b: Var | Any) -> Var: Returns: The result of the logical AND operation. """ - return _and_operation(a, b) # type: ignore + return _and_operation(a, b) @var_operation @@ -1675,7 +1675,7 @@ def or_operation(a: Var | Any, b: Var | Any) -> Var: Returns: The result of the logical OR operation. """ - return _or_operation(a, b) # type: ignore + return _or_operation(a, b) @var_operation @@ -1804,7 +1804,7 @@ class ComputedVar(Var[RETURN_TYPE]): _fget: Callable[[BaseState], RETURN_TYPE] = dataclasses.field( default_factory=lambda: lambda _: None - ) # type: ignore + ) # pyright: ignore [reportAssignmentType] def __init__( self, @@ -2088,10 +2088,10 @@ class ComputedVar(Var[RETURN_TYPE]): return set() with contextlib.suppress(AttributeError): # unbox functools.partial - obj = cast(FunctionType, obj.func) # type: ignore + obj = cast(FunctionType, obj.func) # pyright: ignore [reportAttributeAccessIssue] with contextlib.suppress(AttributeError): # unbox EventHandler - obj = cast(FunctionType, obj.fn) # type: ignore + obj = cast(FunctionType, obj.fn) # pyright: ignore [reportAttributeAccessIssue] if self_name is None and isinstance(obj, FunctionType): try: @@ -2131,7 +2131,7 @@ class ComputedVar(Var[RETURN_TYPE]): d.update( self._deps( objclass=objclass, - obj=ref_obj, + obj=ref_obj, # pyright: ignore [reportArgumentType] ) ) # recurse into property fget functions @@ -2141,7 +2141,7 @@ class ComputedVar(Var[RETURN_TYPE]): d.update( self._deps( objclass=objclass, - obj=ref_obj.fget, # type: ignore + obj=ref_obj.fget, # pyright: ignore [reportArgumentType] ) ) elif ( @@ -2183,7 +2183,7 @@ class ComputedVar(Var[RETURN_TYPE]): hints = get_type_hints(self._fget) if "return" in hints: return hints["return"] - return Any + return Any # pyright: ignore [reportReturnType] @property def __class__(self) -> Type: @@ -2224,7 +2224,7 @@ def computed_var( interval: Optional[Union[datetime.timedelta, int]] = None, backend: bool | None = None, **kwargs, -) -> Callable[[Callable[[BASE_STATE], RETURN_TYPE]], ComputedVar[RETURN_TYPE]]: ... +) -> Callable[[Callable[[BASE_STATE], RETURN_TYPE]], ComputedVar[RETURN_TYPE]]: ... # pyright: ignore [reportInvalidTypeVarUse] @overload @@ -2553,7 +2553,7 @@ def get_uuid_string_var() -> Var: unique_uuid_var = get_unique_variable_name() unique_uuid_var_data = VarData( imports={ - f"$/{constants.Dirs.STATE_PATH}": {ImportVar(tag="generateUUID")}, # type: ignore + f"$/{constants.Dirs.STATE_PATH}": {ImportVar(tag="generateUUID")}, # pyright: ignore [reportArgumentType] "react": "useMemo", }, hooks={f"const {unique_uuid_var} = useMemo(generateUUID, [])": None}, @@ -2613,7 +2613,7 @@ def _extract_var_data(value: Iterable) -> list[VarData | None]: elif not isinstance(sub, str): # Recurse into dict values. if hasattr(sub, "values") and callable(sub.values): - var_datas.extend(_extract_var_data(sub.values())) + var_datas.extend(_extract_var_data(sub.values())) # pyright: ignore [reportArgumentType] # Recurse into iterable values (or dict keys). var_datas.extend(_extract_var_data(sub)) @@ -2624,7 +2624,7 @@ def _extract_var_data(value: Iterable) -> list[VarData | None]: # Recurse when value is a dict itself. values = getattr(value, "values", None) if callable(values): - var_datas.extend(_extract_var_data(values())) + var_datas.extend(_extract_var_data(values())) # pyright: ignore [reportArgumentType] return var_datas @@ -2932,7 +2932,7 @@ class Field(Generic[FIELD_TYPE]): @overload def __get__(self, instance, owner) -> FIELD_TYPE: ... - def __get__(self, instance, owner): # type: ignore + def __get__(self, instance, owner): # pyright: ignore [reportInconsistentOverload] """Get the Var. Args: @@ -2950,4 +2950,4 @@ def field(value: FIELD_TYPE) -> Field[FIELD_TYPE]: Returns: The Field. """ - return value # type: ignore + return value # pyright: ignore [reportReturnType] diff --git a/reflex/vars/datetime.py b/reflex/vars/datetime.py index b6f4c24c6..b20cfc7a6 100644 --- a/reflex/vars/datetime.py +++ b/reflex/vars/datetime.py @@ -40,7 +40,7 @@ class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)): def __lt__(self, other: datetime_types) -> BooleanVar: ... @overload - def __lt__(self, other: NoReturn) -> NoReturn: ... + def __lt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __lt__(self, other: Any): """Less than comparison. @@ -59,7 +59,7 @@ class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)): def __le__(self, other: datetime_types) -> BooleanVar: ... @overload - def __le__(self, other: NoReturn) -> NoReturn: ... + def __le__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __le__(self, other: Any): """Less than or equal comparison. @@ -78,7 +78,7 @@ class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)): def __gt__(self, other: datetime_types) -> BooleanVar: ... @overload - def __gt__(self, other: NoReturn) -> NoReturn: ... + def __gt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __gt__(self, other: Any): """Greater than comparison. @@ -97,7 +97,7 @@ class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)): def __ge__(self, other: datetime_types) -> BooleanVar: ... @overload - def __ge__(self, other: NoReturn) -> NoReturn: ... + def __ge__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __ge__(self, other: Any): """Greater than or equal comparison. diff --git a/reflex/vars/function.py b/reflex/vars/function.py index 131f15b9f..a82c4964b 100644 --- a/reflex/vars/function.py +++ b/reflex/vars/function.py @@ -100,7 +100,7 @@ class FunctionVar(Var[CALLABLE_TYPE], default_type=ReflexCallable[Any, Any]): @overload def partial(self, *args: Var | Any) -> FunctionVar: ... - def partial(self, *args: Var | Any) -> FunctionVar: # type: ignore + def partial(self, *args: Var | Any) -> FunctionVar: # pyright: ignore [reportInconsistentOverload] """Partially apply the function with the given arguments. Args: @@ -174,7 +174,7 @@ class FunctionVar(Var[CALLABLE_TYPE], default_type=ReflexCallable[Any, Any]): @overload def call(self, *args: Var | Any) -> Var: ... - def call(self, *args: Var | Any) -> Var: # type: ignore + def call(self, *args: Var | Any) -> Var: # pyright: ignore [reportInconsistentOverload] """Call the function with the given arguments. Args: diff --git a/reflex/vars/number.py b/reflex/vars/number.py index 082334450..475c08b55 100644 --- a/reflex/vars/number.py +++ b/reflex/vars/number.py @@ -61,7 +61,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __add__(self, other: number_types) -> NumberVar: ... @overload - def __add__(self, other: NoReturn) -> NoReturn: ... + def __add__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __add__(self, other: Any): """Add two numbers. @@ -80,7 +80,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __radd__(self, other: number_types) -> NumberVar: ... @overload - def __radd__(self, other: NoReturn) -> NoReturn: ... + def __radd__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __radd__(self, other: Any): """Add two numbers. @@ -99,7 +99,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __sub__(self, other: number_types) -> NumberVar: ... @overload - def __sub__(self, other: NoReturn) -> NoReturn: ... + def __sub__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __sub__(self, other: Any): """Subtract two numbers. @@ -119,7 +119,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __rsub__(self, other: number_types) -> NumberVar: ... @overload - def __rsub__(self, other: NoReturn) -> NoReturn: ... + def __rsub__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __rsub__(self, other: Any): """Subtract two numbers. @@ -201,7 +201,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __truediv__(self, other: number_types) -> NumberVar: ... @overload - def __truediv__(self, other: NoReturn) -> NoReturn: ... + def __truediv__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __truediv__(self, other: Any): """Divide two numbers. @@ -221,7 +221,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __rtruediv__(self, other: number_types) -> NumberVar: ... @overload - def __rtruediv__(self, other: NoReturn) -> NoReturn: ... + def __rtruediv__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __rtruediv__(self, other: Any): """Divide two numbers. @@ -241,7 +241,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __floordiv__(self, other: number_types) -> NumberVar: ... @overload - def __floordiv__(self, other: NoReturn) -> NoReturn: ... + def __floordiv__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __floordiv__(self, other: Any): """Floor divide two numbers. @@ -261,7 +261,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __rfloordiv__(self, other: number_types) -> NumberVar: ... @overload - def __rfloordiv__(self, other: NoReturn) -> NoReturn: ... + def __rfloordiv__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __rfloordiv__(self, other: Any): """Floor divide two numbers. @@ -281,7 +281,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __mod__(self, other: number_types) -> NumberVar: ... @overload - def __mod__(self, other: NoReturn) -> NoReturn: ... + def __mod__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __mod__(self, other: Any): """Modulo two numbers. @@ -301,7 +301,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __rmod__(self, other: number_types) -> NumberVar: ... @overload - def __rmod__(self, other: NoReturn) -> NoReturn: ... + def __rmod__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __rmod__(self, other: Any): """Modulo two numbers. @@ -321,7 +321,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __pow__(self, other: number_types) -> NumberVar: ... @overload - def __pow__(self, other: NoReturn) -> NoReturn: ... + def __pow__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __pow__(self, other: Any): """Exponentiate two numbers. @@ -341,7 +341,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __rpow__(self, other: number_types) -> NumberVar: ... @overload - def __rpow__(self, other: NoReturn) -> NoReturn: ... + def __rpow__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __rpow__(self, other: Any): """Exponentiate two numbers. @@ -417,7 +417,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __lt__(self, other: number_types) -> BooleanVar: ... @overload - def __lt__(self, other: NoReturn) -> NoReturn: ... + def __lt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __lt__(self, other: Any): """Less than comparison. @@ -436,7 +436,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __le__(self, other: number_types) -> BooleanVar: ... @overload - def __le__(self, other: NoReturn) -> NoReturn: ... + def __le__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __le__(self, other: Any): """Less than or equal comparison. @@ -481,7 +481,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __gt__(self, other: number_types) -> BooleanVar: ... @overload - def __gt__(self, other: NoReturn) -> NoReturn: ... + def __gt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __gt__(self, other: Any): """Greater than comparison. @@ -500,7 +500,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): def __ge__(self, other: number_types) -> BooleanVar: ... @overload - def __ge__(self, other: NoReturn) -> NoReturn: ... + def __ge__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __ge__(self, other: Any): """Greater than or equal comparison. @@ -561,7 +561,7 @@ def binary_number_operation( Returns: The binary number operation. """ - return operation(lhs, rhs) # type: ignore + return operation(lhs, rhs) # pyright: ignore [reportReturnType, reportArgumentType] return wrapper diff --git a/reflex/vars/object.py b/reflex/vars/object.py index 7b951c559..fa8cdf8ec 100644 --- a/reflex/vars/object.py +++ b/reflex/vars/object.py @@ -75,9 +75,9 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): """ fixed_type = get_origin(self._var_type) or self._var_type if not isclass(fixed_type): - return Any + return Any # pyright: ignore [reportReturnType] args = get_args(self._var_type) if issubclass(fixed_type, Mapping) else () - return args[1] if args else Any + return args[1] if args else Any # pyright: ignore [reportReturnType] def keys(self) -> ArrayVar[List[str]]: """Get the keys of the object. @@ -134,7 +134,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): # NoReturn is used here to catch when key value is Any @overload - def __getitem__( + def __getitem__( # pyright: ignore [reportOverlappingOverload] self: ObjectVar[Mapping[Any, NoReturn]], key: Var | Any, ) -> Var: ... @@ -202,7 +202,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): # NoReturn is used here to catch when key value is Any @overload - def __getattr__( + def __getattr__( # pyright: ignore [reportOverlappingOverload] self: ObjectVar[Mapping[Any, NoReturn]], name: str, ) -> Var: ... @@ -321,7 +321,7 @@ class LiteralObjectVar(CachedVarOperation, ObjectVar[OBJECT_TYPE], LiteralVar): The type of the keys of the object. """ args_list = typing.get_args(self._var_type) - return args_list[0] if args_list else Any + return args_list[0] if args_list else Any # pyright: ignore [reportReturnType] def _value_type(self) -> Type: """Get the type of the values of the object. @@ -330,7 +330,7 @@ class LiteralObjectVar(CachedVarOperation, ObjectVar[OBJECT_TYPE], LiteralVar): The type of the values of the object. """ args_list = typing.get_args(self._var_type) - return args_list[1] if args_list else Any + return args_list[1] if args_list else Any # pyright: ignore [reportReturnType] @cached_property_no_lock def _cached_var_name(self) -> str: diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index 1b11f50e6..fa1ab5bf3 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -66,7 +66,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def __add__(self, other: StringVar | str) -> ConcatVarOperation: ... @overload - def __add__(self, other: NoReturn) -> NoReturn: ... + def __add__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __add__(self, other: Any) -> ConcatVarOperation: """Concatenate two strings. @@ -86,7 +86,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def __radd__(self, other: StringVar | str) -> ConcatVarOperation: ... @overload - def __radd__(self, other: NoReturn) -> NoReturn: ... + def __radd__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __radd__(self, other: Any) -> ConcatVarOperation: """Concatenate two strings. @@ -106,7 +106,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def __mul__(self, other: NumberVar | int) -> StringVar: ... @overload - def __mul__(self, other: NoReturn) -> NoReturn: ... + def __mul__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __mul__(self, other: Any) -> StringVar: """Multiply the sequence by a number or an integer. @@ -126,7 +126,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def __rmul__(self, other: NumberVar | int) -> StringVar: ... @overload - def __rmul__(self, other: NoReturn) -> NoReturn: ... + def __rmul__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __rmul__(self, other: Any) -> StringVar: """Multiply the sequence by a number or an integer. @@ -211,7 +211,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): ) -> BooleanVar: ... @overload - def contains( + def contains( # pyright: ignore [reportOverlappingOverload] self, other: NoReturn, field: StringVar | str | None = None ) -> NoReturn: ... @@ -237,7 +237,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def split(self, separator: StringVar | str = "") -> ArrayVar[List[str]]: ... @overload - def split(self, separator: NoReturn) -> NoReturn: ... + def split(self, separator: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def split(self, separator: Any = "") -> ArrayVar[List[str]]: """Split the string. @@ -256,7 +256,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def startswith(self, prefix: StringVar | str) -> BooleanVar: ... @overload - def startswith(self, prefix: NoReturn) -> NoReturn: ... + def startswith(self, prefix: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def startswith(self, prefix: Any) -> BooleanVar: """Check if the string starts with a prefix. @@ -275,7 +275,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def endswith(self, suffix: StringVar | str) -> BooleanVar: ... @overload - def endswith(self, suffix: NoReturn) -> NoReturn: ... + def endswith(self, suffix: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def endswith(self, suffix: Any) -> BooleanVar: """Check if the string ends with a suffix. @@ -294,7 +294,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def __lt__(self, other: StringVar | str) -> BooleanVar: ... @overload - def __lt__(self, other: NoReturn) -> NoReturn: ... + def __lt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __lt__(self, other: Any): """Check if the string is less than another string. @@ -314,7 +314,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def __gt__(self, other: StringVar | str) -> BooleanVar: ... @overload - def __gt__(self, other: NoReturn) -> NoReturn: ... + def __gt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __gt__(self, other: Any): """Check if the string is greater than another string. @@ -334,7 +334,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def __le__(self, other: StringVar | str) -> BooleanVar: ... @overload - def __le__(self, other: NoReturn) -> NoReturn: ... + def __le__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __le__(self, other: Any): """Check if the string is less than or equal to another string. @@ -354,7 +354,7 @@ class StringVar(Var[STRING_TYPE], python_types=str): def __ge__(self, other: StringVar | str) -> BooleanVar: ... @overload - def __ge__(self, other: NoReturn) -> NoReturn: ... + def __ge__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __ge__(self, other: Any): """Check if the string is greater than or equal to another string. @@ -811,7 +811,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): def join(self, sep: StringVar | str = "") -> StringVar: ... @overload - def join(self, sep: NoReturn) -> NoReturn: ... + def join(self, sep: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def join(self, sep: Any = "") -> StringVar: """Join the elements of the array. @@ -858,7 +858,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): def __add__(self, other: ArrayVar[ARRAY_VAR_TYPE]) -> ArrayVar[ARRAY_VAR_TYPE]: ... @overload - def __add__(self, other: NoReturn) -> NoReturn: ... + def __add__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __add__(self, other: Any) -> ArrayVar[ARRAY_VAR_TYPE]: """Concatenate two arrays. @@ -1089,7 +1089,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): def __mul__(self, other: NumberVar | int) -> ArrayVar[ARRAY_VAR_TYPE]: ... @overload - def __mul__(self, other: NoReturn) -> NoReturn: ... + def __mul__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload] def __mul__(self, other: Any) -> ArrayVar[ARRAY_VAR_TYPE]: """Multiply the sequence by a number or integer. @@ -1107,7 +1107,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): return repeat_array_operation(self, other) - __rmul__ = __mul__ # type: ignore + __rmul__ = __mul__ @overload def __lt__(self, other: ArrayVar[ARRAY_VAR_TYPE]) -> BooleanVar: ... @@ -1691,7 +1691,7 @@ def array_concat_operation( """ return var_operation_return( js_expression=f"[...{lhs}, ...{rhs}]", - var_type=Union[lhs._var_type, rhs._var_type], + var_type=Union[lhs._var_type, rhs._var_type], # pyright: ignore [reportArgumentType] ) diff --git a/tests/integration/test_background_task.py b/tests/integration/test_background_task.py index cb8fda019..f312f8122 100644 --- a/tests/integration/test_background_task.py +++ b/tests/integration/test_background_task.py @@ -37,9 +37,9 @@ def BackgroundTask(): self._task_id += 1 for ix in range(int(self.iterations)): if ix % 2 == 0: - yield State.increment_arbitrary(1) # type: ignore + yield State.increment_arbitrary(1) else: - yield State.increment() # type: ignore + yield State.increment() await asyncio.sleep(0.005) @rx.event @@ -125,8 +125,8 @@ def BackgroundTask(): rx.input( id="iterations", placeholder="Iterations", - value=State.iterations.to_string(), # type: ignore - on_change=State.set_iterations, # type: ignore + value=State.iterations.to_string(), # pyright: ignore [reportAttributeAccessIssue] + on_change=State.set_iterations, # pyright: ignore [reportAttributeAccessIssue] ), rx.button( "Delayed Increment", @@ -288,7 +288,7 @@ def test_background_task( assert background_task._poll_for(lambda: counter.text == "620", timeout=40) # all tasks should have exited and cleaned up assert background_task._poll_for( - lambda: not background_task.app_instance._background_tasks # type: ignore + lambda: not background_task.app_instance._background_tasks # pyright: ignore [reportOptionalMemberAccess] ) diff --git a/tests/integration/test_component_state.py b/tests/integration/test_component_state.py index 381c1d23a..654dc7ce9 100644 --- a/tests/integration/test_component_state.py +++ b/tests/integration/test_component_state.py @@ -30,7 +30,7 @@ def ComponentStateApp(): @rx.event def increment(self): self.count += 1 - self._be = self.count # type: ignore + self._be = self.count # pyright: ignore [reportAttributeAccessIssue] @classmethod def get_component(cls, *children, **props): @@ -72,7 +72,7 @@ def ComponentStateApp(): State=_Counter, ) - app = rx.App(_state=rx.State) # noqa + app = rx.App(_state=rx.State) # noqa: F841 @rx.page() def index(): @@ -89,7 +89,7 @@ def ComponentStateApp(): mc_d, rx.button( "Inc A", - on_click=mc_a.State.increment, # type: ignore + on_click=mc_a.State.increment, # pyright: ignore [reportAttributeAccessIssue, reportOptionalMemberAccess] id="inc-a", ), rx.text( diff --git a/tests/integration/test_connection_banner.py b/tests/integration/test_connection_banner.py index c2a912af6..c80f30626 100644 --- a/tests/integration/test_connection_banner.py +++ b/tests/integration/test_connection_banner.py @@ -31,7 +31,7 @@ def ConnectionBanner(): rx.button( "Increment", id="increment", - on_click=State.set_foo(State.foo + 1), # type: ignore + on_click=State.set_foo(State.foo + 1), # pyright: ignore [reportAttributeAccessIssue] ), rx.button("Delay", id="delay", on_click=State.delay), ) diff --git a/tests/integration/test_deploy_url.py b/tests/integration/test_deploy_url.py index 8b5776260..207f37609 100644 --- a/tests/integration/test_deploy_url.py +++ b/tests/integration/test_deploy_url.py @@ -19,7 +19,7 @@ def DeployUrlSample() -> None: class State(rx.State): @rx.event def goto_self(self): - return rx.redirect(rx.config.get_config().deploy_url) # type: ignore + return rx.redirect(rx.config.get_config().deploy_url) # pyright: ignore [reportArgumentType] def index(): return rx.fragment( diff --git a/tests/integration/test_dynamic_routes.py b/tests/integration/test_dynamic_routes.py index 9032fd84c..40886a601 100644 --- a/tests/integration/test_dynamic_routes.py +++ b/tests/integration/test_dynamic_routes.py @@ -49,7 +49,7 @@ def DynamicRoute(): read_only=True, id="token", ), - rx.input(value=rx.State.page_id, read_only=True, id="page_id"), # type: ignore + rx.input(value=rx.State.page_id, read_only=True, id="page_id"), # pyright: ignore [reportAttributeAccessIssue] rx.input( value=DynamicState.router.page.raw_path, read_only=True, @@ -60,12 +60,12 @@ def DynamicRoute(): rx.link( "next", href="/page/" + DynamicState.next_page, - id="link_page_next", # type: ignore + id="link_page_next", ), rx.link("missing", href="/missing", id="link_missing"), - rx.list( # type: ignore + rx.list( # pyright: ignore [reportAttributeAccessIssue] rx.foreach( - DynamicState.order, # type: ignore + DynamicState.order, # pyright: ignore [reportAttributeAccessIssue] lambda i: rx.list_item(rx.text(i)), ), ), @@ -98,11 +98,11 @@ def DynamicRoute(): rx.data_list.root( rx.data_list.item( rx.data_list.label("rx.State.arg_str (dynamic)"), - rx.data_list.value(rx.State.arg_str, id="state-arg_str"), # type: ignore + rx.data_list.value(rx.State.arg_str, id="state-arg_str"), # pyright: ignore [reportAttributeAccessIssue] ), rx.data_list.item( rx.data_list.label("ArgState.arg_str (dynamic) (inherited)"), - rx.data_list.value(ArgState.arg_str, id="argstate-arg_str"), # type: ignore + rx.data_list.value(ArgState.arg_str, id="argstate-arg_str"), # pyright: ignore [reportAttributeAccessIssue] ), rx.data_list.item( rx.data_list.label("ArgState.arg"), @@ -110,7 +110,7 @@ def DynamicRoute(): ), rx.data_list.item( rx.data_list.label("ArgSubState.arg_str (dynamic) (inherited)"), - rx.data_list.value(ArgSubState.arg_str, id="argsubstate-arg_str"), # type: ignore + rx.data_list.value(ArgSubState.arg_str, id="argsubstate-arg_str"), # pyright: ignore [reportAttributeAccessIssue] ), rx.data_list.item( rx.data_list.label("ArgSubState.arg (inherited)"), @@ -134,15 +134,15 @@ def DynamicRoute(): height="100vh", ) - @rx.page(route="/redirect-page/[page_id]", on_load=DynamicState.on_load_redir) # type: ignore + @rx.page(route="/redirect-page/[page_id]", on_load=DynamicState.on_load_redir) def redirect_page(): return rx.fragment(rx.text("redirecting...")) app = rx.App(_state=rx.State) - app.add_page(index, route="/page/[page_id]", on_load=DynamicState.on_load) # type: ignore - app.add_page(index, route="/static/x", on_load=DynamicState.on_load) # type: ignore + app.add_page(index, route="/page/[page_id]", on_load=DynamicState.on_load) + app.add_page(index, route="/static/x", on_load=DynamicState.on_load) app.add_page(index) - app.add_custom_404_page(on_load=DynamicState.on_load) # type: ignore + app.add_custom_404_page(on_load=DynamicState.on_load) @pytest.fixture(scope="module") diff --git a/tests/integration/test_event_actions.py b/tests/integration/test_event_actions.py index cc8e97b09..707410075 100644 --- a/tests/integration/test_event_actions.py +++ b/tests/integration/test_event_actions.py @@ -63,16 +63,16 @@ def TestEventAction(): rx.button( "Stop Prop Only", id="btn-stop-prop-only", - on_click=rx.stop_propagation, # type: ignore + on_click=rx.stop_propagation, # pyright: ignore [reportArgumentType] ), rx.button( "Click event", - on_click=EventActionState.on_click("no_event_actions"), # type: ignore + on_click=EventActionState.on_click("no_event_actions"), # pyright: ignore [reportCallIssue] id="btn-click-event", ), rx.button( "Click stop propagation", - on_click=EventActionState.on_click("stop_propagation").stop_propagation, # type: ignore + on_click=EventActionState.on_click("stop_propagation").stop_propagation, # pyright: ignore [reportCallIssue] id="btn-click-stop-propagation", ), rx.button( @@ -88,13 +88,13 @@ def TestEventAction(): rx.link( "Link", href="#", - on_click=EventActionState.on_click("link_no_event_actions"), # type: ignore + on_click=EventActionState.on_click("link_no_event_actions"), # pyright: ignore [reportCallIssue] id="link", ), rx.link( "Link Stop Propagation", href="#", - on_click=EventActionState.on_click( # type: ignore + on_click=EventActionState.on_click( # pyright: ignore [reportCallIssue] "link_stop_propagation" ).stop_propagation, id="link-stop-propagation", @@ -102,13 +102,13 @@ def TestEventAction(): rx.link( "Link Prevent Default Only", href="/invalid", - on_click=rx.prevent_default, # type: ignore + on_click=rx.prevent_default, # pyright: ignore [reportArgumentType] id="link-prevent-default-only", ), rx.link( "Link Prevent Default", href="/invalid", - on_click=EventActionState.on_click( # type: ignore + on_click=EventActionState.on_click( # pyright: ignore [reportCallIssue] "link_prevent_default" ).prevent_default, id="link-prevent-default", @@ -116,44 +116,44 @@ def TestEventAction(): rx.link( "Link Both", href="/invalid", - on_click=EventActionState.on_click( # type: ignore + on_click=EventActionState.on_click( # pyright: ignore [reportCallIssue] "link_both" ).stop_propagation.prevent_default, id="link-stop-propagation-prevent-default", ), EventFiringComponent.create( id="custom-stop-propagation", - on_click=EventActionState.on_click( # type: ignore + on_click=EventActionState.on_click( # pyright: ignore [reportCallIssue] "custom-stop-propagation" ).stop_propagation, ), EventFiringComponent.create( id="custom-prevent-default", - on_click=EventActionState.on_click( # type: ignore + on_click=EventActionState.on_click( # pyright: ignore [reportCallIssue] "custom-prevent-default" ).prevent_default, ), rx.button( "Throttle", id="btn-throttle", - on_click=lambda: EventActionState.on_click_throttle.throttle( + on_click=lambda: EventActionState.on_click_throttle.throttle( # pyright: ignore [reportFunctionMemberAccess] 200 ).stop_propagation, ), rx.button( "Debounce", id="btn-debounce", - on_click=EventActionState.on_click_debounce.debounce( + on_click=EventActionState.on_click_debounce.debounce( # pyright: ignore [reportFunctionMemberAccess] 200 ).stop_propagation, ), - rx.list( # type: ignore + rx.list( # pyright: ignore [reportAttributeAccessIssue] rx.foreach( - EventActionState.order, # type: ignore + EventActionState.order, rx.list_item, ), ), - on_click=EventActionState.on_click("outer"), # type: ignore + on_click=EventActionState.on_click("outer"), # pyright: ignore [reportCallIssue] ) app = rx.App(_state=rx.State) diff --git a/tests/integration/test_event_chain.py b/tests/integration/test_event_chain.py index 5a933253a..df571e884 100644 --- a/tests/integration/test_event_chain.py +++ b/tests/integration/test_event_chain.py @@ -43,32 +43,32 @@ def EventChain(): def event_nested_1(self): self.event_order.append("event_nested_1") yield State.event_nested_2 - yield State.event_arg("nested_1") # type: ignore + yield State.event_arg("nested_1") @rx.event def event_nested_2(self): self.event_order.append("event_nested_2") yield State.event_nested_3 yield rx.console_log("event_nested_2") - yield State.event_arg("nested_2") # type: ignore + yield State.event_arg("nested_2") @rx.event def event_nested_3(self): self.event_order.append("event_nested_3") yield State.event_no_args - yield State.event_arg("nested_3") # type: ignore + yield State.event_arg("nested_3") @rx.event def on_load_return_chain(self): self.event_order.append("on_load_return_chain") - return [State.event_arg(1), State.event_arg(2), State.event_arg(3)] # type: ignore + return [State.event_arg(1), State.event_arg(2), State.event_arg(3)] @rx.event def on_load_yield_chain(self): self.event_order.append("on_load_yield_chain") - yield State.event_arg(4) # type: ignore - yield State.event_arg(5) # type: ignore - yield State.event_arg(6) # type: ignore + yield State.event_arg(4) + yield State.event_arg(5) + yield State.event_arg(6) @rx.event def click_return_event(self): @@ -79,28 +79,28 @@ def EventChain(): def click_return_events(self): self.event_order.append("click_return_events") return [ - State.event_arg(7), # type: ignore + State.event_arg(7), rx.console_log("click_return_events"), - State.event_arg(8), # type: ignore - State.event_arg(9), # type: ignore + State.event_arg(8), + State.event_arg(9), ] @rx.event def click_yield_chain(self): self.event_order.append("click_yield_chain:0") - yield State.event_arg(10) # type: ignore + yield State.event_arg(10) self.event_order.append("click_yield_chain:1") yield rx.console_log("click_yield_chain") - yield State.event_arg(11) # type: ignore + yield State.event_arg(11) self.event_order.append("click_yield_chain:2") - yield State.event_arg(12) # type: ignore + yield State.event_arg(12) self.event_order.append("click_yield_chain:3") @rx.event def click_yield_many_events(self): self.event_order.append("click_yield_many_events") for ix in range(MANY_EVENTS): - yield State.event_arg(ix) # type: ignore + yield State.event_arg(ix) yield rx.console_log(f"many_events_{ix}") self.event_order.append("click_yield_many_events_done") @@ -108,7 +108,7 @@ def EventChain(): def click_yield_nested(self): self.event_order.append("click_yield_nested") yield State.event_nested_1 - yield State.event_arg("yield_nested") # type: ignore + yield State.event_arg("yield_nested") @rx.event def redirect_return_chain(self): @@ -123,12 +123,12 @@ def EventChain(): @rx.event def click_return_int_type(self): self.event_order.append("click_return_int_type") - return State.event_arg_repr_type(1) # type: ignore + return State.event_arg_repr_type(1) @rx.event def click_return_dict_type(self): self.event_order.append("click_return_dict_type") - return State.event_arg_repr_type({"a": 1}) # type: ignore + return State.event_arg_repr_type({"a": 1}) @rx.event async def click_yield_interim_value_async(self): @@ -193,12 +193,12 @@ def EventChain(): rx.button( "Click Int Type", id="click_int_type", - on_click=lambda: State.event_arg_repr_type(1), # type: ignore + on_click=lambda: State.event_arg_repr_type(1), ), rx.button( "Click Dict Type", id="click_dict_type", - on_click=lambda: State.event_arg_repr_type({"a": 1}), # type: ignore + on_click=lambda: State.event_arg_repr_type({"a": 1}), ), rx.button( "Return Chain Int Type", @@ -239,7 +239,7 @@ def EventChain(): rx.text( "return", on_mount=State.on_load_return_chain, - on_unmount=lambda: State.event_arg("unmount"), # type: ignore + on_unmount=lambda: State.event_arg("unmount"), ), token_input, rx.button("Unmount", on_click=rx.redirect("/"), id="unmount"), @@ -251,7 +251,7 @@ def EventChain(): "yield", on_mount=[ State.on_load_yield_chain, - lambda: State.event_arg("mount"), # type: ignore + lambda: State.event_arg("mount"), ], on_unmount=State.event_no_args, ), @@ -259,8 +259,8 @@ def EventChain(): rx.button("Unmount", on_click=rx.redirect("/"), id="unmount"), ) - app.add_page(on_load_return_chain, on_load=State.on_load_return_chain) # type: ignore - app.add_page(on_load_yield_chain, on_load=State.on_load_yield_chain) # type: ignore + app.add_page(on_load_return_chain, on_load=State.on_load_return_chain) + app.add_page(on_load_yield_chain, on_load=State.on_load_yield_chain) app.add_page(on_mount_return_chain) app.add_page(on_mount_yield_chain) diff --git a/tests/integration/test_exception_handlers.py b/tests/integration/test_exception_handlers.py index 4d15bbf01..71858b899 100644 --- a/tests/integration/test_exception_handlers.py +++ b/tests/integration/test_exception_handlers.py @@ -51,12 +51,12 @@ def TestApp(): ), rx.button( "induce_backend_error", - on_click=lambda: TestAppState.divide_by_number(0), # type: ignore + on_click=lambda: TestAppState.divide_by_number(0), # pyright: ignore [reportCallIssue] id="induce-backend-error-btn", ), rx.button( "induce_react_error", - on_click=TestAppState.set_react_error(True), # type: ignore + on_click=TestAppState.set_react_error(True), # pyright: ignore [reportAttributeAccessIssue] id="induce-react-error-btn", ), rx.box( diff --git a/tests/integration/test_input.py b/tests/integration/test_input.py index bddeca45f..5f2948feb 100644 --- a/tests/integration/test_input.py +++ b/tests/integration/test_input.py @@ -26,11 +26,11 @@ def FullyControlledInput(): ), rx.input( id="debounce_input_input", - on_change=State.set_text, # type: ignore + on_change=State.set_text, # pyright: ignore [reportAttributeAccessIssue] value=State.text, ), rx.input(value=State.text, id="value_input", is_read_only=True), - rx.input(on_change=State.set_text, id="on_change_input"), # type: ignore + rx.input(on_change=State.set_text, id="on_change_input"), # pyright: ignore [reportAttributeAccessIssue] rx.el.input( value=State.text, id="plain_value_input", diff --git a/tests/integration/test_lifespan.py b/tests/integration/test_lifespan.py index d79273fbc..24dd7df6a 100644 --- a/tests/integration/test_lifespan.py +++ b/tests/integration/test_lifespan.py @@ -65,7 +65,7 @@ def LifespanApp(): rx.moment( interval=LifespanState.interval, on_change=LifespanState.tick ), - on_click=LifespanState.set_interval( # type: ignore + on_click=LifespanState.set_interval( # pyright: ignore [reportAttributeAccessIssue] rx.cond(LifespanState.interval, 0, 100) ), id="toggle-tick", @@ -113,13 +113,13 @@ async def test_lifespan(lifespan_app: AppHarness): task_global = driver.find_element(By.ID, "task_global") assert context_global.text == "2" - assert lifespan_app.app_module.lifespan_context_global == 2 # type: ignore + assert lifespan_app.app_module.lifespan_context_global == 2 original_task_global_text = task_global.text original_task_global_value = int(original_task_global_text) lifespan_app.poll_for_content(task_global, exp_not_equal=original_task_global_text) driver.find_element(By.ID, "toggle-tick").click() # avoid teardown errors - assert lifespan_app.app_module.lifespan_task_global > original_task_global_value # type: ignore + assert lifespan_app.app_module.lifespan_task_global > original_task_global_value assert int(task_global.text) > original_task_global_value # Kill the backend diff --git a/tests/integration/test_login_flow.py b/tests/integration/test_login_flow.py index 7eb46ab39..a1df015bf 100644 --- a/tests/integration/test_login_flow.py +++ b/tests/integration/test_login_flow.py @@ -31,8 +31,8 @@ def LoginSample(): yield rx.redirect("/") def index(): - return rx.cond( - State.is_hydrated & State.auth_token, # type: ignore + return rx.cond( # pyright: ignore [reportCallIssue] + State.is_hydrated & State.auth_token, # pyright: ignore [reportOperatorIssue] rx.vstack( rx.heading(State.auth_token, id="auth-token"), rx.button("Logout", on_click=State.logout, id="logout"), diff --git a/tests/integration/test_media.py b/tests/integration/test_media.py index 649038a7e..f3ce65c87 100644 --- a/tests/integration/test_media.py +++ b/tests/integration/test_media.py @@ -19,7 +19,7 @@ def MediaApp(): def _blue(self, format=None) -> Image.Image: img = Image.new("RGB", (200, 200), "blue") if format is not None: - img.format = format # type: ignore + img.format = format return img @rx.var @@ -50,7 +50,7 @@ def MediaApp(): def img_from_url(self) -> Image.Image: img_url = "https://picsum.photos/id/1/200/300" img_resp = httpx.get(img_url, follow_redirects=True) - return Image.open(img_resp) # type: ignore + return Image.open(img_resp) # pyright: ignore [reportArgumentType] app = rx.App() diff --git a/tests/integration/test_state_inheritance.py b/tests/integration/test_state_inheritance.py index 6b93a2ed7..f544fcc92 100644 --- a/tests/integration/test_state_inheritance.py +++ b/tests/integration/test_state_inheritance.py @@ -131,7 +131,7 @@ def StateInheritance(): rx.heading(Base1.child_mixin, id="base1-child-mixin"), rx.button( "Base1.on_click_mixin", - on_click=Base1.on_click_mixin, # type: ignore + on_click=Base1.on_click_mixin, id="base1-mixin-btn", ), rx.heading( @@ -153,7 +153,7 @@ def StateInheritance(): rx.heading(Child1.child_mixin, id="child1-child-mixin"), rx.button( "Child1.on_click_other_mixin", - on_click=Child1.on_click_other_mixin, # type: ignore + on_click=Child1.on_click_other_mixin, id="child1-other-mixin-btn", ), # Child 2 (Mixin, ChildMixin, OtherMixin) @@ -166,12 +166,12 @@ def StateInheritance(): rx.heading(Child2.child_mixin, id="child2-child-mixin"), rx.button( "Child2.on_click_mixin", - on_click=Child2.on_click_mixin, # type: ignore + on_click=Child2.on_click_mixin, id="child2-mixin-btn", ), rx.button( "Child2.on_click_other_mixin", - on_click=Child2.on_click_other_mixin, # type: ignore + on_click=Child2.on_click_other_mixin, id="child2-other-mixin-btn", ), # Child 3 (Mixin, ChildMixin, OtherMixin) @@ -186,12 +186,12 @@ def StateInheritance(): rx.heading(Child3.child_mixin, id="child3-child-mixin"), rx.button( "Child3.on_click_mixin", - on_click=Child3.on_click_mixin, # type: ignore + on_click=Child3.on_click_mixin, id="child3-mixin-btn", ), rx.button( "Child3.on_click_other_mixin", - on_click=Child3.on_click_other_mixin, # type: ignore + on_click=Child3.on_click_other_mixin, id="child3-other-mixin-btn", ), rx.heading( diff --git a/tests/integration/test_upload.py b/tests/integration/test_upload.py index 07c3997b4..a0df05f52 100644 --- a/tests/integration/test_upload.py +++ b/tests/integration/test_upload.py @@ -80,7 +80,7 @@ def UploadFile(): ), rx.button( "Upload", - on_click=lambda: UploadState.handle_upload(rx.upload_files()), # type: ignore + on_click=lambda: UploadState.handle_upload(rx.upload_files()), # pyright: ignore [reportCallIssue] id="upload_button", ), rx.box( @@ -105,7 +105,7 @@ def UploadFile(): ), rx.button( "Upload", - on_click=UploadState.handle_upload_secondary( # type: ignore + on_click=UploadState.handle_upload_secondary( # pyright: ignore [reportCallIssue] rx.upload_files( upload_id="secondary", on_upload_progress=UploadState.upload_progress, @@ -127,7 +127,7 @@ def UploadFile(): ), rx.vstack( rx.foreach( - UploadState.progress_dicts, # type: ignore + UploadState.progress_dicts, lambda d: rx.text(d.to_string()), ) ), @@ -146,7 +146,7 @@ def UploadFile(): ), rx.button( "Upload", - on_click=UploadState.handle_upload_tertiary( # type: ignore + on_click=UploadState.handle_upload_tertiary( # pyright: ignore [reportCallIssue] rx.upload_files( upload_id="tertiary", ), diff --git a/tests/integration/test_var_operations.py b/tests/integration/test_var_operations.py index 86d68340a..a09c8612e 100644 --- a/tests/integration/test_var_operations.py +++ b/tests/integration/test_var_operations.py @@ -7,42 +7,38 @@ from selenium.webdriver.common.by import By from reflex.testing import AppHarness -# pyright: reportOptionalMemberAccess=false, reportGeneralTypeIssues=false, reportUnknownMemberType=false - def VarOperations(): """App with var operations.""" - from typing import Dict, List - import reflex as rx from reflex.vars.base import LiteralVar from reflex.vars.sequence import ArrayVar class Object(rx.Base): - str: str = "hello" + name: str = "hello" class VarOperationState(rx.State): - int_var1: int = 10 - int_var2: int = 5 - int_var3: int = 7 - float_var1: float = 10.5 - float_var2: float = 5.5 - list1: List = [1, 2] - list2: List = [3, 4] - list3: List = ["first", "second", "third"] - list4: List = [Object(name="obj_1"), Object(name="obj_2")] - str_var1: str = "first" - str_var2: str = "second" - str_var3: str = "ThIrD" - str_var4: str = "a long string" - dict1: Dict[int, int] = {1: 2} - dict2: Dict[int, int] = {3: 4} - html_str: str = "
hello
" + int_var1: rx.Field[int] = rx.field(10) + int_var2: rx.Field[int] = rx.field(5) + int_var3: rx.Field[int] = rx.field(7) + float_var1: rx.Field[float] = rx.field(10.5) + float_var2: rx.Field[float] = rx.field(5.5) + list1: rx.Field[list] = rx.field([1, 2]) + list2: rx.Field[list] = rx.field([3, 4]) + list3: rx.Field[list] = rx.field(["first", "second", "third"]) + list4: rx.Field[list] = rx.field([Object(name="obj_1"), Object(name="obj_2")]) + str_var1: rx.Field[str] = rx.field("first") + str_var2: rx.Field[str] = rx.field("second") + str_var3: rx.Field[str] = rx.field("ThIrD") + str_var4: rx.Field[str] = rx.field("a long string") + dict1: rx.Field[dict[int, int]] = rx.field({1: 2}) + dict2: rx.Field[dict[int, int]] = rx.field({3: 4}) + html_str: rx.Field[str] = rx.field("
hello
") app = rx.App(_state=rx.State) @rx.memo - def memo_comp(list1: List[int], int_var1: int, id: str): + def memo_comp(list1: list[int], int_var1: int, id: str): return rx.text(list1, int_var1, id=id) @rx.memo @@ -378,7 +374,8 @@ def VarOperations(): id="str_contains", ), rx.text( - VarOperationState.str_var1 | VarOperationState.str_var1, id="str_or_str" + VarOperationState.str_var1 | VarOperationState.str_var1, + id="str_or_str", ), rx.text( VarOperationState.str_var1 & VarOperationState.str_var2, @@ -394,7 +391,8 @@ def VarOperations(): id="str_and_int", ), rx.text( - VarOperationState.str_var1 | VarOperationState.int_var2, id="str_or_int" + VarOperationState.str_var1 | VarOperationState.int_var2, + id="str_or_int", ), rx.text( (VarOperationState.str_var1 == VarOperationState.int_var1).to_string(), @@ -406,7 +404,8 @@ def VarOperations(): ), # STR, LIST rx.text( - VarOperationState.str_var1 | VarOperationState.list1, id="str_or_list" + VarOperationState.str_var1 | VarOperationState.list1, + id="str_or_list", ), rx.text( (VarOperationState.str_var1 & VarOperationState.list1).to_string(), @@ -422,7 +421,8 @@ def VarOperations(): ), # STR, DICT rx.text( - VarOperationState.str_var1 | VarOperationState.dict1, id="str_or_dict" + VarOperationState.str_var1 | VarOperationState.dict1, + id="str_or_dict", ), rx.text( (VarOperationState.str_var1 & VarOperationState.dict1).to_string(), @@ -474,7 +474,8 @@ def VarOperations(): id="list_neq_list", ), rx.text( - VarOperationState.list1.contains(1).to_string(), id="list_contains" + VarOperationState.list1.contains(1).to_string(), + id="list_contains", ), rx.text(VarOperationState.list4.pluck("name").to_string(), id="list_pluck"), rx.text(VarOperationState.list1.reverse().to_string(), id="list_reverse"), @@ -534,7 +535,8 @@ def VarOperations(): id="dict_neq_dict", ), rx.text( - VarOperationState.dict1.contains(1).to_string(), id="dict_contains" + VarOperationState.dict1.contains(1).to_string(), + id="dict_contains", ), rx.text(VarOperationState.str_var3.lower(), id="str_lower"), rx.text(VarOperationState.str_var3.upper(), id="str_upper"), @@ -571,7 +573,7 @@ def VarOperations(): ), rx.box( rx.foreach( - LiteralVar.create(list(range(0, 3))).to(ArrayVar, List[int]), + LiteralVar.create(list(range(0, 3))).to(ArrayVar, list[int]), lambda x: rx.foreach( ArrayVar.range(x), lambda y: rx.text(VarOperationState.list1[y], as_="p"), diff --git a/tests/integration/tests_playwright/test_appearance.py b/tests/integration/tests_playwright/test_appearance.py index 60aeeaa6b..d325b183f 100644 --- a/tests/integration/tests_playwright/test_appearance.py +++ b/tests/integration/tests_playwright/test_appearance.py @@ -85,7 +85,7 @@ def light_mode_app(tmp_path_factory) -> Generator[AppHarness, None, None]: """ with AppHarness.create( root=tmp_path_factory.mktemp("appearance_app"), - app_source=DefaultLightModeApp, # type: ignore + app_source=DefaultLightModeApp, ) as harness: assert harness.app_instance is not None, "app is not running" yield harness @@ -104,7 +104,7 @@ def dark_mode_app(tmp_path_factory) -> Generator[AppHarness, None, None]: """ with AppHarness.create( root=tmp_path_factory.mktemp("appearance_app"), - app_source=DefaultDarkModeApp, # type: ignore + app_source=DefaultDarkModeApp, ) as harness: assert harness.app_instance is not None, "app is not running" yield harness @@ -123,7 +123,7 @@ def system_mode_app(tmp_path_factory) -> Generator[AppHarness, None, None]: """ with AppHarness.create( root=tmp_path_factory.mktemp("appearance_app"), - app_source=DefaultSystemModeApp, # type: ignore + app_source=DefaultSystemModeApp, ) as harness: assert harness.app_instance is not None, "app is not running" yield harness @@ -142,7 +142,7 @@ def color_toggle_app(tmp_path_factory) -> Generator[AppHarness, None, None]: """ with AppHarness.create( root=tmp_path_factory.mktemp("appearance_app"), - app_source=ColorToggleApp, # type: ignore + app_source=ColorToggleApp, ) as harness: assert harness.app_instance is not None, "app is not running" yield harness diff --git a/tests/integration/tests_playwright/test_datetime_operations.py b/tests/integration/tests_playwright/test_datetime_operations.py index 5e4506776..2ac516d4a 100644 --- a/tests/integration/tests_playwright/test_datetime_operations.py +++ b/tests/integration/tests_playwright/test_datetime_operations.py @@ -54,7 +54,7 @@ def datetime_operations_app(tmp_path_factory) -> Generator[AppHarness, None, Non """ with AppHarness.create( root=tmp_path_factory.mktemp("datetime_operations_app"), - app_source=DatetimeOperationsApp, # type: ignore + app_source=DatetimeOperationsApp, ) as harness: assert harness.app_instance is not None, "app is not running" yield harness diff --git a/tests/integration/tests_playwright/test_link_hover.py b/tests/integration/tests_playwright/test_link_hover.py index 9510bd358..3c29d769a 100644 --- a/tests/integration/tests_playwright/test_link_hover.py +++ b/tests/integration/tests_playwright/test_link_hover.py @@ -29,7 +29,7 @@ def LinkApp(): def link_app(tmp_path_factory) -> Generator[AppHarness, None, None]: with AppHarness.create( root=tmp_path_factory.mktemp("link_app"), - app_source=LinkApp, # type: ignore + app_source=LinkApp, ) as harness: assert harness.app_instance is not None, "app is not running" yield harness diff --git a/tests/units/compiler/test_compiler.py b/tests/units/compiler/test_compiler.py index 25c351c01..50088e728 100644 --- a/tests/units/compiler/test_compiler.py +++ b/tests/units/compiler/test_compiler.py @@ -92,7 +92,7 @@ def test_compile_import_statement( ), ], ) -def test_compile_imports(import_dict: ParsedImportDict, test_dicts: List[dict]): +def test_compile_imports(import_dict: ParsedImportDict, test_dicts: list[dict]): """Test the compile_imports function. Args: @@ -103,7 +103,7 @@ def test_compile_imports(import_dict: ParsedImportDict, test_dicts: List[dict]): for import_dict, test_dict in zip(imports, test_dicts, strict=True): assert import_dict["lib"] == test_dict["lib"] assert import_dict["default"] == test_dict["default"] - assert sorted(import_dict["rest"]) == test_dict["rest"] # type: ignore + assert sorted(import_dict["rest"]) == test_dict["rest"] # pyright: ignore [reportArgumentType] def test_compile_stylesheets(tmp_path, mocker): @@ -198,7 +198,7 @@ def test_create_document_root(): assert isinstance(root, utils.Html) assert isinstance(root.children[0], utils.DocumentHead) # Default language. - assert root.lang == "en" # type: ignore + assert root.lang == "en" # pyright: ignore [reportAttributeAccessIssue] # No children in head. assert len(root.children[0].children) == 0 @@ -208,13 +208,13 @@ def test_create_document_root(): utils.NextScript.create(src="bar.js"), ] root = utils.create_document_root( - head_components=comps, # type: ignore + head_components=comps, # pyright: ignore [reportArgumentType] html_lang="rx", html_custom_attrs={"project": "reflex"}, ) # Two children in head. assert isinstance(root, utils.Html) assert len(root.children[0].children) == 2 - assert root.lang == "rx" # type: ignore + assert root.lang == "rx" # pyright: ignore [reportAttributeAccessIssue] assert isinstance(root.custom_attrs, dict) assert root.custom_attrs == {"project": "reflex"} diff --git a/tests/units/components/core/test_colors.py b/tests/units/components/core/test_colors.py index c1295fb41..15490e576 100644 --- a/tests/units/components/core/test_colors.py +++ b/tests/units/components/core/test_colors.py @@ -31,37 +31,37 @@ def create_color_var(color): (create_color_var(rx.color("mint", 3)), '"var(--mint-3)"', Color), (create_color_var(rx.color("mint", 3, True)), '"var(--mint-a3)"', Color), ( - create_color_var(rx.color(ColorState.color, ColorState.shade)), # type: ignore + create_color_var(rx.color(ColorState.color, ColorState.shade)), # pyright: ignore [reportArgumentType] f'("var(--"+{color_state_name!s}.color+"-"+(((__to_string) => __to_string.toString())({color_state_name!s}.shade))+")")', Color, ), ( create_color_var( - rx.color(ColorState.color, ColorState.shade, ColorState.alpha) # type: ignore + rx.color(ColorState.color, ColorState.shade, ColorState.alpha) # pyright: ignore [reportArgumentType] ), f'("var(--"+{color_state_name!s}.color+"-"+({color_state_name!s}.alpha ? "a" : "")+(((__to_string) => __to_string.toString())({color_state_name!s}.shade))+")")', Color, ), ( - create_color_var(rx.color(f"{ColorState.color}", f"{ColorState.shade}")), # type: ignore + create_color_var(rx.color(f"{ColorState.color}", f"{ColorState.shade}")), # pyright: ignore [reportArgumentType] f'("var(--"+{color_state_name!s}.color+"-"+{color_state_name!s}.shade+")")', Color, ), ( create_color_var( - rx.color(f"{ColorState.color_part}ato", f"{ColorState.shade}") # type: ignore + rx.color(f"{ColorState.color_part}ato", f"{ColorState.shade}") # pyright: ignore [reportArgumentType] ), f'("var(--"+({color_state_name!s}.color_part+"ato")+"-"+{color_state_name!s}.shade+")")', Color, ), ( - create_color_var(f'{rx.color(ColorState.color, f"{ColorState.shade}")}'), # type: ignore + create_color_var(f'{rx.color(ColorState.color, f"{ColorState.shade}")}'), # pyright: ignore [reportArgumentType] f'("var(--"+{color_state_name!s}.color+"-"+{color_state_name!s}.shade+")")', str, ), ( create_color_var( - f'{rx.color(f"{ColorState.color}", f"{ColorState.shade}")}' # type: ignore + f'{rx.color(f"{ColorState.color}", f"{ColorState.shade}")}' # pyright: ignore [reportArgumentType] ), f'("var(--"+{color_state_name!s}.color+"-"+{color_state_name!s}.shade+")")', str, @@ -81,7 +81,7 @@ def test_color(color, expected, expected_type: Union[Type[str], Type[Color]]): '(true ? "var(--mint-7)" : "var(--tomato-5)")', ), ( - rx.cond(True, rx.color(ColorState.color), rx.color(ColorState.color, 5)), # type: ignore + rx.cond(True, rx.color(ColorState.color), rx.color(ColorState.color, 5)), # pyright: ignore [reportArgumentType, reportCallIssue] f'(true ? ("var(--"+{color_state_name!s}.color+"-7)") : ("var(--"+{color_state_name!s}.color+"-5)"))', ), ( @@ -89,7 +89,7 @@ def test_color(color, expected, expected_type: Union[Type[str], Type[Color]]): "condition", ("first", rx.color("mint")), ("second", rx.color("tomato", 5)), - rx.color(ColorState.color, 2), # type: ignore + rx.color(ColorState.color, 2), # pyright: ignore [reportArgumentType] ), '(() => { switch (JSON.stringify("condition")) {case JSON.stringify("first"): return ("var(--mint-7)");' ' break;case JSON.stringify("second"): return ("var(--tomato-5)"); break;default: ' @@ -98,9 +98,9 @@ def test_color(color, expected, expected_type: Union[Type[str], Type[Color]]): ( rx.match( "condition", - ("first", rx.color(ColorState.color)), # type: ignore - ("second", rx.color(ColorState.color, 5)), # type: ignore - rx.color(ColorState.color, 2), # type: ignore + ("first", rx.color(ColorState.color)), # pyright: ignore [reportArgumentType] + ("second", rx.color(ColorState.color, 5)), # pyright: ignore [reportArgumentType] + rx.color(ColorState.color, 2), # pyright: ignore [reportArgumentType] ), '(() => { switch (JSON.stringify("condition")) {case JSON.stringify("first"): ' f'return (("var(--"+{color_state_name!s}.color+"-7)")); break;case JSON.stringify("second"): ' @@ -133,4 +133,4 @@ def test_radix_color(color, expected): expected (str): The expected custom_style string, radix or literal """ code_block = CodeBlock.create("Hello World", background_color=color) - assert str(code_block.custom_style["backgroundColor"]) == expected # type: ignore + assert str(code_block.custom_style["backgroundColor"]) == expected # pyright: ignore [reportAttributeAccessIssue] diff --git a/tests/units/components/core/test_cond.py b/tests/units/components/core/test_cond.py index e88f35c9a..ac073ed29 100644 --- a/tests/units/components/core/test_cond.py +++ b/tests/units/components/core/test_cond.py @@ -14,7 +14,7 @@ from reflex.vars.base import LiteralVar, Var, computed_var @pytest.fixture def cond_state(request): class CondState(BaseState): - value: request.param["value_type"] = request.param["value"] # noqa + value: request.param["value_type"] = request.param["value"] # pyright: ignore [reportInvalidTypeForm, reportUndefinedVariable] # noqa: F821 return CondState @@ -112,13 +112,13 @@ def test_cond_no_else(): assert isinstance(comp, Fragment) comp = comp.children[0] assert isinstance(comp, Cond) - assert comp.cond._decode() is True # type: ignore - assert comp.comp1.render() == Fragment.create(Text.create("hello")).render() + assert comp.cond._decode() is True + assert comp.comp1.render() == Fragment.create(Text.create("hello")).render() # pyright: ignore [reportOptionalMemberAccess] assert comp.comp2 == Fragment.create() # Props do not support the use of cond without else with pytest.raises(ValueError): - cond(True, "hello") # type: ignore + cond(True, "hello") # pyright: ignore [reportArgumentType] def test_cond_computed_var(): diff --git a/tests/units/components/core/test_html.py b/tests/units/components/core/test_html.py index 79c258dfb..bebb2587d 100644 --- a/tests/units/components/core/test_html.py +++ b/tests/units/components/core/test_html.py @@ -16,7 +16,7 @@ def test_html_many_children(): def test_html_create(): html = Html.create("

Hello !

") - assert str(html.dangerouslySetInnerHTML) == '({ ["__html"] : "

Hello !

" })' # type: ignore + assert str(html.dangerouslySetInnerHTML) == '({ ["__html"] : "

Hello !

" })' # pyright: ignore [reportAttributeAccessIssue] assert ( str(html) == '
Hello !

" })}/>' @@ -32,10 +32,10 @@ def test_html_fstring_create(): html = Html.create(f"

Hello {TestState.myvar}!

") assert ( - str(html.dangerouslySetInnerHTML) # type: ignore + str(html.dangerouslySetInnerHTML) # pyright: ignore [reportAttributeAccessIssue] == f'({{ ["__html"] : ("

Hello "+{TestState.myvar!s}+"!

") }})' ) assert ( str(html) - == f'
' # type: ignore + == f'
' # pyright: ignore [reportAttributeAccessIssue] ) diff --git a/tests/units/components/core/test_match.py b/tests/units/components/core/test_match.py index eaf98414d..e563873ec 100644 --- a/tests/units/components/core/test_match.py +++ b/tests/units/components/core/test_match.py @@ -29,7 +29,7 @@ def test_match_components(): rx.text("default value"), ) match_comp = Match.create(MatchState.value, *match_case_tuples) - match_dict = match_comp.render() # type: ignore + match_dict = match_comp.render() assert match_dict["name"] == "Fragment" [match_child] = match_dict["children"] @@ -151,7 +151,7 @@ def test_match_on_component_without_default(): ) match_comp = Match.create(MatchState.value, *match_case_tuples) - default = match_comp.render()["children"][0]["default"] # type: ignore + default = match_comp.render()["children"][0]["default"] assert isinstance(default, Fragment) diff --git a/tests/units/components/core/test_upload.py b/tests/units/components/core/test_upload.py index 710baa161..efade7b63 100644 --- a/tests/units/components/core/test_upload.py +++ b/tests/units/components/core/test_upload.py @@ -5,7 +5,7 @@ from reflex.components.core.upload import ( StyledUpload, Upload, UploadNamespace, - _on_drop_spec, # type: ignore + _on_drop_spec, # pyright: ignore [reportAttributeAccessIssue] cancel_upload, get_upload_url, ) @@ -60,7 +60,7 @@ def test_upload_create(): up_comp_2 = Upload.create( id="foo_id", - on_drop=UploadStateTest.drop_handler([]), # type: ignore + on_drop=UploadStateTest.drop_handler([]), ) assert isinstance(up_comp_2, Upload) assert up_comp_2.is_used @@ -80,7 +80,7 @@ def test_upload_create(): up_comp_4 = Upload.create( id="foo_id", - on_drop=UploadStateTest.not_drop_handler([]), # type: ignore + on_drop=UploadStateTest.not_drop_handler([]), ) assert isinstance(up_comp_4, Upload) assert up_comp_4.is_used @@ -96,7 +96,7 @@ def test_styled_upload_create(): styled_up_comp_2 = StyledUpload.create( id="foo_id", - on_drop=UploadStateTest.drop_handler([]), # type: ignore + on_drop=UploadStateTest.drop_handler([]), ) assert isinstance(styled_up_comp_2, StyledUpload) assert styled_up_comp_2.is_used @@ -116,7 +116,7 @@ def test_styled_upload_create(): styled_up_comp_4 = StyledUpload.create( id="foo_id", - on_drop=UploadStateTest.not_drop_handler([]), # type: ignore + on_drop=UploadStateTest.not_drop_handler([]), ) assert isinstance(styled_up_comp_4, StyledUpload) assert styled_up_comp_4.is_used diff --git a/tests/units/components/datadisplay/test_code.py b/tests/units/components/datadisplay/test_code.py index 6b7168756..db0120fe1 100644 --- a/tests/units/components/datadisplay/test_code.py +++ b/tests/units/components/datadisplay/test_code.py @@ -10,4 +10,4 @@ from reflex.components.datadisplay.code import CodeBlock, Theme def test_code_light_dark_theme(theme, expected): code_block = CodeBlock.create(theme=theme) - assert code_block.theme._js_expr == expected # type: ignore + assert code_block.theme._js_expr == expected # pyright: ignore [reportAttributeAccessIssue] diff --git a/tests/units/components/datadisplay/test_datatable.py b/tests/units/components/datadisplay/test_datatable.py index a8f966d7e..2dece464a 100644 --- a/tests/units/components/datadisplay/test_datatable.py +++ b/tests/units/components/datadisplay/test_datatable.py @@ -14,7 +14,8 @@ from reflex.utils.serializers import serialize, serialize_dataframe pytest.param( { "data": pd.DataFrame( - [["foo", "bar"], ["foo1", "bar1"]], columns=["column1", "column2"] + [["foo", "bar"], ["foo1", "bar1"]], + columns=["column1", "column2"], # pyright: ignore [reportArgumentType] ) }, "data", @@ -114,7 +115,8 @@ def test_computed_var_without_annotation(fixture, request, err_msg, is_data_fram def test_serialize_dataframe(): """Test if dataframe is serialized correctly.""" df = pd.DataFrame( - [["foo", "bar"], ["foo1", "bar1"]], columns=["column1", "column2"] + [["foo", "bar"], ["foo1", "bar1"]], + columns=["column1", "column2"], # pyright: ignore [reportArgumentType] ) value = serialize(df) assert value == serialize_dataframe(df) diff --git a/tests/units/components/datadisplay/test_shiki_code.py b/tests/units/components/datadisplay/test_shiki_code.py index eb473ba06..cc05c35b0 100644 --- a/tests/units/components/datadisplay/test_shiki_code.py +++ b/tests/units/components/datadisplay/test_shiki_code.py @@ -95,7 +95,7 @@ def test_create_shiki_code_block( # Test that the first child is the code code_block_component = component.children[0] - assert code_block_component.code._var_value == expected_first_child # type: ignore + assert code_block_component.code._var_value == expected_first_child # pyright: ignore [reportAttributeAccessIssue] applied_styles = component.style for key, value in expected_styles.items(): @@ -128,12 +128,12 @@ def test_create_shiki_high_level_code_block( # Test that the first child is the code block component code_block_component = component.children[0] - assert code_block_component.code._var_value == children[0] # type: ignore + assert code_block_component.code._var_value == children[0] # pyright: ignore [reportAttributeAccessIssue] # Check if the transformer is set correctly if expected if expected_transformers: exp_trans_names = [t.__name__ for t in expected_transformers] - for transformer in code_block_component.transformers._var_value: # type: ignore + for transformer in code_block_component.transformers._var_value: # pyright: ignore [reportAttributeAccessIssue] assert type(transformer).__name__ in exp_trans_names # Check if the second child is the copy button if can_copy is True @@ -161,12 +161,12 @@ def test_shiki_high_level_code_block_theme_language_mapping(children, props): if "theme" in props: assert component.children[ 0 - ].theme._var_value == ShikiHighLevelCodeBlock._map_themes(props["theme"]) # type: ignore + ].theme._var_value == ShikiHighLevelCodeBlock._map_themes(props["theme"]) # pyright: ignore [reportAttributeAccessIssue] # Test that the language is mapped correctly if "language" in props: assert component.children[ 0 - ].language._var_value == ShikiHighLevelCodeBlock._map_languages( # type: ignore + ].language._var_value == ShikiHighLevelCodeBlock._map_languages( # pyright: ignore [reportAttributeAccessIssue] props["language"] ) diff --git a/tests/units/components/forms/test_form.py b/tests/units/components/forms/test_form.py index 5f3ba2d37..69b5e7b63 100644 --- a/tests/units/components/forms/test_form.py +++ b/tests/units/components/forms/test_form.py @@ -10,7 +10,7 @@ def test_render_on_submit(): _var_type=EventChain, ) f = Form.create(on_submit=submit_it) - exp_submit_name = f"handleSubmit_{f.handle_submit_unique_name}" # type: ignore + exp_submit_name = f"handleSubmit_{f.handle_submit_unique_name}" # pyright: ignore [reportAttributeAccessIssue] assert f"onSubmit={{{exp_submit_name}}}" in f.render()["props"] diff --git a/tests/units/components/media/test_image.py b/tests/units/components/media/test_image.py index 742bd8c38..519ca735e 100644 --- a/tests/units/components/media/test_image.py +++ b/tests/units/components/media/test_image.py @@ -4,7 +4,7 @@ import pytest from PIL.Image import Image as Img import reflex as rx -from reflex.components.next.image import Image # type: ignore +from reflex.components.next.image import Image from reflex.utils.serializers import serialize, serialize_image from reflex.vars.sequence import StringVar @@ -17,7 +17,7 @@ def pil_image() -> Img: A random PIL image. """ imarray = np.random.rand(100, 100, 3) * 255 - return PIL.Image.fromarray(imarray.astype("uint8")).convert("RGBA") # type: ignore + return PIL.Image.fromarray(imarray.astype("uint8")).convert("RGBA") # pyright: ignore [reportAttributeAccessIssue] def test_serialize_image(pil_image: Img): @@ -36,13 +36,13 @@ def test_set_src_str(): """Test that setting the src works.""" image = rx.image(src="pic2.jpeg") # when using next/image, we explicitly create a _var_is_str Var - assert str(image.src) in ( # type: ignore + assert str(image.src) in ( # pyright: ignore [reportAttributeAccessIssue] '"pic2.jpeg"', "'pic2.jpeg'", "`pic2.jpeg`", ) # For plain rx.el.img, an explicit var is not created, so the quoting happens later - # assert str(image.src) == "pic2.jpeg" # type: ignore #noqa: ERA001 + # assert str(image.src) == "pic2.jpeg" #noqa: ERA001 def test_set_src_img(pil_image: Img): @@ -52,7 +52,7 @@ def test_set_src_img(pil_image: Img): pil_image: The image to serialize. """ image = Image.create(src=pil_image) - assert str(image.src._js_expr) == '"' + serialize_image(pil_image) + '"' # type: ignore + assert str(image.src._js_expr) == '"' + serialize_image(pil_image) + '"' # pyright: ignore [reportAttributeAccessIssue] def test_render(pil_image: Img): @@ -62,4 +62,4 @@ def test_render(pil_image: Img): pil_image: The image to serialize. """ image = Image.create(src=pil_image) - assert isinstance(image.src, StringVar) # type: ignore + assert isinstance(image.src, StringVar) # pyright: ignore [reportAttributeAccessIssue] diff --git a/tests/units/components/test_component.py b/tests/units/components/test_component.py index 6ea459142..26e530f7c 100644 --- a/tests/units/components/test_component.py +++ b/tests/units/components/test_component.py @@ -452,8 +452,8 @@ def test_add_style(component1, component2): component1: Style({"color": "white"}), component2: Style({"color": "black"}), } - c1 = component1()._add_style_recursive(style) # type: ignore - c2 = component2()._add_style_recursive(style) # type: ignore + c1 = component1()._add_style_recursive(style) + c2 = component2()._add_style_recursive(style) assert str(c1.style["color"]) == '"white"' assert str(c2.style["color"]) == '"black"' @@ -469,8 +469,8 @@ def test_add_style_create(component1, component2): component1.create: Style({"color": "white"}), component2.create: Style({"color": "black"}), } - c1 = component1()._add_style_recursive(style) # type: ignore - c2 = component2()._add_style_recursive(style) # type: ignore + c1 = component1()._add_style_recursive(style) + c2 = component2()._add_style_recursive(style) assert str(c1.style["color"]) == '"white"' assert str(c2.style["color"]) == '"black"' @@ -1363,17 +1363,17 @@ class EventState(rx.State): id="fstring-background_color", ), pytest.param( - rx.fragment(style={"background_color": TEST_VAR}), # type: ignore + rx.fragment(style={"background_color": TEST_VAR}), # pyright: ignore [reportArgumentType] [STYLE_VAR], id="direct-style-background_color", ), pytest.param( - rx.fragment(style={"background_color": f"foo{TEST_VAR}bar"}), # type: ignore + rx.fragment(style={"background_color": f"foo{TEST_VAR}bar"}), # pyright: ignore [reportArgumentType] [STYLE_VAR], id="fstring-style-background_color", ), pytest.param( - rx.fragment(on_click=EVENT_CHAIN_VAR), # type: ignore + rx.fragment(on_click=EVENT_CHAIN_VAR), [EVENT_CHAIN_VAR], id="direct-event-chain", ), @@ -1383,17 +1383,17 @@ class EventState(rx.State): id="direct-event-handler", ), pytest.param( - rx.fragment(on_click=EventState.handler2(TEST_VAR)), # type: ignore + rx.fragment(on_click=EventState.handler2(TEST_VAR)), # pyright: ignore [reportCallIssue] [ARG_VAR, TEST_VAR], id="direct-event-handler-arg", ), pytest.param( - rx.fragment(on_click=EventState.handler2(EventState.v)), # type: ignore + rx.fragment(on_click=EventState.handler2(EventState.v)), # pyright: ignore [reportCallIssue] [ARG_VAR, EventState.v], id="direct-event-handler-arg2", ), pytest.param( - rx.fragment(on_click=lambda: EventState.handler2(TEST_VAR)), # type: ignore + rx.fragment(on_click=lambda: EventState.handler2(TEST_VAR)), # pyright: ignore [reportCallIssue] [ARG_VAR, TEST_VAR], id="direct-event-handler-lambda", ), @@ -1482,7 +1482,7 @@ def test_instantiate_all_components(): comp_name for submodule_list in component_nested_list for comp_name in submodule_list - ]: # type: ignore + ]: if component_name in untested_components: continue component = getattr( @@ -1555,11 +1555,11 @@ def test_validate_valid_children(): ) valid_component1( - rx.cond( # type: ignore + rx.cond( True, rx.fragment(valid_component2()), rx.fragment( - rx.foreach(LiteralVar.create([1, 2, 3]), lambda x: valid_component2(x)) # type: ignore + rx.foreach(LiteralVar.create([1, 2, 3]), lambda x: valid_component2(x)) ), ) ) @@ -1614,12 +1614,12 @@ def test_validate_valid_parents(): ) valid_component2( - rx.cond( # type: ignore + rx.cond( True, rx.fragment(valid_component3()), rx.fragment( rx.foreach( - LiteralVar.create([1, 2, 3]), # type: ignore + LiteralVar.create([1, 2, 3]), lambda x: valid_component2(valid_component3(x)), ) ), @@ -1682,13 +1682,13 @@ def test_validate_invalid_children(): with pytest.raises(ValueError): valid_component4( - rx.cond( # type: ignore + rx.cond( True, rx.fragment(invalid_component()), rx.fragment( rx.foreach( LiteralVar.create([1, 2, 3]), lambda x: invalid_component(x) - ) # type: ignore + ) ), ) ) @@ -1870,7 +1870,7 @@ def test_invalid_event_trigger(): ) def test_component_add_imports(tags): class BaseComponent(Component): - def _get_imports(self) -> ImportDict: + def _get_imports(self) -> ImportDict: # pyright: ignore [reportIncompatibleMethodOverride] return {} class Reference(Component): @@ -1882,7 +1882,7 @@ def test_component_add_imports(tags): ) class TestBase(Component): - def add_imports( + def add_imports( # pyright: ignore [reportIncompatibleMethodOverride] self, ) -> Dict[str, Union[str, ImportVar, List[str], List[ImportVar]]]: return {"foo": "bar"} @@ -1914,7 +1914,7 @@ def test_component_add_hooks(): pass class GrandchildComponent1(ChildComponent1): - def add_hooks(self): + def add_hooks(self): # pyright: ignore [reportIncompatibleMethodOverride] return [ "const hook2 = 43", "const hook3 = 44", @@ -1927,11 +1927,11 @@ def test_component_add_hooks(): ] class GrandchildComponent2(ChildComponent1): - def _get_hooks(self): + def _get_hooks(self): # pyright: ignore [reportIncompatibleMethodOverride] return "const hook5 = 46" class GreatGrandchildComponent2(GrandchildComponent2): - def add_hooks(self): + def add_hooks(self): # pyright: ignore [reportIncompatibleMethodOverride] return [ "const hook2 = 43", "const hook6 = 47", @@ -2006,7 +2006,7 @@ def test_component_add_custom_code(): ] class GrandchildComponent2(ChildComponent1): - def _get_custom_code(self): + def _get_custom_code(self): # pyright: ignore [reportIncompatibleMethodOverride] return "const custom_code5 = 46" class GreatGrandchildComponent2(GrandchildComponent2): @@ -2102,11 +2102,11 @@ def test_add_style_embedded_vars(test_state: BaseState): test_state: A test state. """ v0 = LiteralVar.create("parent")._replace( - merge_var_data=VarData(hooks={"useParent": None}), # type: ignore + merge_var_data=VarData(hooks={"useParent": None}), ) v1 = rx.color("plum", 10) v2 = LiteralVar.create("text")._replace( - merge_var_data=VarData(hooks={"useText": None}), # type: ignore + merge_var_data=VarData(hooks={"useText": None}), ) class ParentComponent(Component): @@ -2120,7 +2120,7 @@ def test_add_style_embedded_vars(test_state: BaseState): class StyledComponent(ParentComponent): tag = "StyledComponent" - def add_style(self): + def add_style(self): # pyright: ignore [reportIncompatibleMethodOverride] return { "color": v1, "fake": v2, diff --git a/tests/units/components/typography/test_markdown.py b/tests/units/components/typography/test_markdown.py index 5e9abbb1f..12f3b0dbe 100644 --- a/tests/units/components/typography/test_markdown.py +++ b/tests/units/components/typography/test_markdown.py @@ -29,8 +29,8 @@ def test_get_component(tag, expected): expected: The expected component. """ md = Markdown.create("# Hello") - assert tag in md.component_map # type: ignore - assert md.get_component(tag).tag == expected # type: ignore + assert tag in md.component_map # pyright: ignore [reportAttributeAccessIssue] + assert md.get_component(tag).tag == expected def test_set_component_map(): @@ -42,8 +42,8 @@ def test_set_component_map(): md = Markdown.create("# Hello", component_map=component_map) # Check that the new tags have been added. - assert md.get_component("h1").tag == "Box" # type: ignore - assert md.get_component("p").tag == "Box" # type: ignore + assert md.get_component("h1").tag == "Box" + assert md.get_component("p").tag == "Box" # Make sure the old tags are still there. - assert md.get_component("h2").tag == "Heading" # type: ignore + assert md.get_component("h2").tag == "Heading" diff --git a/tests/units/conftest.py b/tests/units/conftest.py index 8c1ffe532..2ee290ea3 100644 --- a/tests/units/conftest.py +++ b/tests/units/conftest.py @@ -95,7 +95,7 @@ def upload_sub_state_event_spec(): Returns: Event Spec. """ - return EventSpec(handler=SubUploadState.handle_upload, upload=True) # type: ignore + return EventSpec(handler=SubUploadState.handle_upload, upload=True) # pyright: ignore [reportCallIssue] @pytest.fixture @@ -105,7 +105,7 @@ def upload_event_spec(): Returns: Event Spec. """ - return EventSpec(handler=UploadState.handle_upload1, upload=True) # type: ignore + return EventSpec(handler=UploadState.handle_upload1, upload=True) # pyright: ignore [reportCallIssue] @pytest.fixture @@ -143,7 +143,7 @@ def sqlite_db_config_values(base_db_config_values) -> Dict: @pytest.fixture -def router_data_headers() -> Dict[str, str]: +def router_data_headers() -> dict[str, str]: """Router data headers. Returns: @@ -170,7 +170,7 @@ def router_data_headers() -> Dict[str, str]: @pytest.fixture -def router_data(router_data_headers) -> Dict[str, str]: +def router_data(router_data_headers: dict[str, str]) -> dict[str, str | dict]: """Router data. Args: @@ -179,7 +179,7 @@ def router_data(router_data_headers) -> Dict[str, str]: Returns: Dict of router data. """ - return { # type: ignore + return { "pathname": "/", "query": {}, "token": "b181904c-3953-4a79-dc18-ae9518c22f05", diff --git a/tests/units/states/mutation.py b/tests/units/states/mutation.py index b05f558a1..ad658bbd0 100644 --- a/tests/units/states/mutation.py +++ b/tests/units/states/mutation.py @@ -18,7 +18,7 @@ class DictMutationTestState(BaseState): def add_age(self): """Add an age to the dict.""" - self.details.update({"age": 20}) # type: ignore + self.details.update({"age": 20}) # pyright: ignore [reportCallIssue, reportArgumentType] def change_name(self): """Change the name in the dict.""" diff --git a/tests/units/test_app.py b/tests/units/test_app.py index 80e0be5fd..074e7f2ef 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -133,7 +133,7 @@ def test_model() -> Type[Model]: A default model. """ - class TestModel(Model, table=True): # type: ignore + class TestModel(Model, table=True): pass return TestModel @@ -147,7 +147,7 @@ def test_model_auth() -> Type[Model]: A default model. """ - class TestModelAuth(Model, table=True): # type: ignore + class TestModelAuth(Model, table=True): """A test model with auth.""" pass @@ -185,19 +185,19 @@ def test_custom_auth_admin() -> Type[AuthProvider]: login_path: str = "/login" logout_path: str = "/logout" - def login(self): + def login(self): # pyright: ignore [reportIncompatibleMethodOverride] """Login.""" pass - def is_authenticated(self): + def is_authenticated(self): # pyright: ignore [reportIncompatibleMethodOverride] """Is authenticated.""" pass - def get_admin_user(self): + def get_admin_user(self): # pyright: ignore [reportIncompatibleMethodOverride] """Get admin user.""" pass - def logout(self): + def logout(self): # pyright: ignore [reportIncompatibleMethodOverride] """Logout.""" pass @@ -419,7 +419,7 @@ async def test_initialize_with_state(test_state: Type[ATestState], token: str): # Get a state for a given token. state = await app.state_manager.get_state(_substate_key(token, test_state)) assert isinstance(state, test_state) - assert state.var == 0 # type: ignore + assert state.var == 0 if isinstance(app.state_manager, StateManagerRedis): await app.state_manager.close() @@ -441,8 +441,8 @@ async def test_set_and_get_state(test_state): # Get the default state for each token. state1 = await app.state_manager.get_state(token1) state2 = await app.state_manager.get_state(token2) - assert state1.var == 0 # type: ignore - assert state2.var == 0 # type: ignore + assert state1.var == 0 + assert state2.var == 0 # Set the vars to different values. state1.var = 1 @@ -453,8 +453,8 @@ async def test_set_and_get_state(test_state): # Get the states again and check the values. state1 = await app.state_manager.get_state(token1) state2 = await app.state_manager.get_state(token2) - assert state1.var == 1 # type: ignore - assert state2.var == 2 # type: ignore + assert state1.var == 1 + assert state2.var == 2 if isinstance(app.state_manager, StateManagerRedis): await app.state_manager.close() @@ -469,7 +469,7 @@ async def test_dynamic_var_event(test_state: Type[ATestState], token: str): test_state: State Fixture. token: a Token. """ - state = test_state() # type: ignore + state = test_state() # pyright: ignore [reportCallIssue] state.add_var("int_val", int, 0) result = await state._process( Event( @@ -772,7 +772,7 @@ async def test_upload_file(tmp_path, state, delta, token: str, mocker): # The App state must be the "root" of the state tree app = App() app._enable_state() - app.event_namespace.emit = AsyncMock() # type: ignore + app.event_namespace.emit = AsyncMock() # pyright: ignore [reportOptionalMemberAccess] current_state = await app.state_manager.get_state(_substate_key(token, state)) data = b"This is binary data" @@ -795,7 +795,7 @@ async def test_upload_file(tmp_path, state, delta, token: str, mocker): file=bio, ) upload_fn = upload(app) - streaming_response = await upload_fn(request_mock, [file1, file2]) + streaming_response = await upload_fn(request_mock, [file1, file2]) # pyright: ignore [reportFunctionMemberAccess] async for state_update in streaming_response.body_iterator: assert ( state_update @@ -917,7 +917,7 @@ class DynamicState(BaseState): """ return self.dynamic - on_load_internal = OnLoadInternalState.on_load_internal.fn + on_load_internal = OnLoadInternalState.on_load_internal.fn # pyright: ignore [reportFunctionMemberAccess] def test_dynamic_arg_shadow( @@ -941,7 +941,7 @@ def test_dynamic_arg_shadow( app = app_module_mock.app = App(_state=DynamicState) assert app._state is not None with pytest.raises(NameError): - app.add_page(index_page, route=route, on_load=DynamicState.on_load) # type: ignore + app.add_page(index_page, route=route, on_load=DynamicState.on_load) def test_multiple_dynamic_args( @@ -993,7 +993,7 @@ async def test_dynamic_route_var_route_change_completed_on_load( app = app_module_mock.app = App(_state=DynamicState) assert app._state is not None assert arg_name not in app._state.vars - app.add_page(index_page, route=route, on_load=DynamicState.on_load) # type: ignore + app.add_page(index_page, route=route, on_load=DynamicState.on_load) assert arg_name in app._state.vars assert arg_name in app._state.computed_vars assert app._state.computed_vars[arg_name]._deps(objclass=DynamicState) == { @@ -1022,7 +1022,7 @@ async def test_dynamic_route_var_route_change_completed_on_load( def _dynamic_state_event(name, val, **kwargs): return _event( - name=format.format_event_handler(getattr(DynamicState, name)), # type: ignore + name=format.format_event_handler(getattr(DynamicState, name)), val=val, **kwargs, ) @@ -1190,7 +1190,7 @@ async def test_process_events(mocker, token: str): pass assert (await app.state_manager.get_state(event.substate_token)).value == 5 - assert app._postprocess.call_count == 6 + assert app._postprocess.call_count == 6 # pyright: ignore [reportFunctionMemberAccess] if isinstance(app.state_manager, StateManagerRedis): await app.state_manager.close() @@ -1226,7 +1226,7 @@ def test_overlay_component( assert app.overlay_component is None elif isinstance(exp_page_child, OverlayFragment): assert app.overlay_component is not None - generated_component = app._generate_component(app.overlay_component) # type: ignore + generated_component = app._generate_component(app.overlay_component) assert isinstance(generated_component, OverlayFragment) assert isinstance( generated_component.children[0], @@ -1235,7 +1235,7 @@ def test_overlay_component( else: assert app.overlay_component is not None assert isinstance( - app._generate_component(app.overlay_component), # type: ignore + app._generate_component(app.overlay_component), exp_page_child, ) @@ -1248,7 +1248,7 @@ def test_overlay_component( if exp_page_child is not None: assert len(page.children) == 3 children_types = (type(child) for child in page.children) - assert exp_page_child in children_types + assert exp_page_child in children_types # pyright: ignore [reportOperatorIssue] else: assert len(page.children) == 2 @@ -1315,19 +1315,19 @@ def test_app_wrap_priority(compilable_app: tuple[App, Path]): class Fragment1(Component): tag = "Fragment1" - def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]: + def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]: # pyright: ignore [reportIncompatibleMethodOverride] return {(99, "Box"): rx.box()} class Fragment2(Component): tag = "Fragment2" - def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]: + def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]: # pyright: ignore [reportIncompatibleMethodOverride] return {(50, "Text"): rx.text()} class Fragment3(Component): tag = "Fragment3" - def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]: + def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]: # pyright: ignore [reportIncompatibleMethodOverride] return {(10, "Fragment2"): Fragment2.create()} def page(): @@ -1448,11 +1448,11 @@ def test_generate_component(): "Bar", ) - comp = App._generate_component(index) # type: ignore + comp = App._generate_component(index) assert isinstance(comp, Component) with pytest.raises(exceptions.MatchTypeError): - App._generate_component(index_mismatch) # type: ignore + App._generate_component(index_mismatch) # pyright: ignore [reportArgumentType] def test_add_page_component_returning_tuple(): @@ -1467,8 +1467,8 @@ def test_add_page_component_returning_tuple(): def page2(): return (rx.text("third"),) - app.add_page(index) # type: ignore - app.add_page(page2) # type: ignore + app.add_page(index) # pyright: ignore [reportArgumentType] + app.add_page(page2) # pyright: ignore [reportArgumentType] app._compile_page("index") app._compile_page("page2") @@ -1477,17 +1477,17 @@ def test_add_page_component_returning_tuple(): assert isinstance(fragment_wrapper, Fragment) first_text = fragment_wrapper.children[0] assert isinstance(first_text, Text) - assert str(first_text.children[0].contents) == '"first"' # type: ignore + assert str(first_text.children[0].contents) == '"first"' # pyright: ignore [reportAttributeAccessIssue] second_text = fragment_wrapper.children[1] assert isinstance(second_text, Text) - assert str(second_text.children[0].contents) == '"second"' # type: ignore + assert str(second_text.children[0].contents) == '"second"' # pyright: ignore [reportAttributeAccessIssue] # Test page with trailing comma. page2_fragment_wrapper = app._pages["page2"].children[0] assert isinstance(page2_fragment_wrapper, Fragment) third_text = page2_fragment_wrapper.children[0] assert isinstance(third_text, Text) - assert str(third_text.children[0].contents) == '"third"' # type: ignore + assert str(third_text.children[0].contents) == '"third"' # pyright: ignore [reportAttributeAccessIssue] @pytest.mark.parametrize("export", (True, False)) @@ -1525,7 +1525,7 @@ def test_app_with_transpile_packages(compilable_app: tuple[App, Path], export: b next_config = (web_dir / "next.config.js").read_text() transpile_packages_match = re.search(r"transpilePackages: (\[.*?\])", next_config) - transpile_packages_json = transpile_packages_match.group(1) # type: ignore + transpile_packages_json = transpile_packages_match.group(1) # pyright: ignore [reportOptionalMemberAccess] transpile_packages = sorted(json.loads(transpile_packages_json)) assert transpile_packages == [ diff --git a/tests/units/test_config.py b/tests/units/test_config.py index e5d4622bd..88d8b5f2f 100644 --- a/tests/units/test_config.py +++ b/tests/units/test_config.py @@ -21,7 +21,7 @@ from reflex.constants import Endpoint, Env def test_requires_app_name(): """Test that a config requires an app_name.""" with pytest.raises(ValueError): - rx.Config() # type: ignore + rx.Config() def test_set_app_name(base_config_values): @@ -207,7 +207,7 @@ def test_replace_defaults( exp_config_values: The expected config values. """ mock_os_env = os.environ.copy() - monkeypatch.setattr(reflex.config.os, "environ", mock_os_env) # type: ignore + monkeypatch.setattr(reflex.config.os, "environ", mock_os_env) mock_os_env.update({k: str(v) for k, v in env_vars.items()}) c = rx.Config(app_name="a", **config_kwargs) c._set_persistent(**set_persistent_vars) diff --git a/tests/units/test_event.py b/tests/units/test_event.py index 520e876df..5e47991da 100644 --- a/tests/units/test_event.py +++ b/tests/units/test_event.py @@ -72,7 +72,7 @@ def test_call_event_handler(): ) # Passing args as strings should format differently. - event_spec = handler("first", "second") # type: ignore + event_spec = handler("first", "second") assert ( format.format_event(event_spec) == 'Event("test_fn_with_args", {arg1:"first",arg2:"second"})' @@ -80,7 +80,7 @@ def test_call_event_handler(): first, second = 123, "456" handler = EventHandler(fn=test_fn_with_args) - event_spec = handler(first, second) # type: ignore + event_spec = handler(first, second) assert ( format.format_event(event_spec) == 'Event("test_fn_with_args", {arg1:123,arg2:"456"})' @@ -94,7 +94,7 @@ def test_call_event_handler(): handler = EventHandler(fn=test_fn_with_args) with pytest.raises(TypeError): - handler(test_fn) # type: ignore + handler(test_fn) def test_call_event_handler_partial(): @@ -416,7 +416,7 @@ def test_event_actions_on_state(): assert isinstance(handler, EventHandler) assert not handler.event_actions - sp_handler = EventActionState.handler.stop_propagation + sp_handler = EventActionState.handler.stop_propagation # pyright: ignore [reportFunctionMemberAccess] assert sp_handler.event_actions == {"stopPropagation": True} # should NOT affect other references to the handler assert not handler.event_actions diff --git a/tests/units/test_health_endpoint.py b/tests/units/test_health_endpoint.py index 6d12d79d6..5b3aedc00 100644 --- a/tests/units/test_health_endpoint.py +++ b/tests/units/test_health_endpoint.py @@ -122,9 +122,9 @@ async def test_health( # Call the async health function response = await health() - print(json.loads(response.body)) + print(json.loads(response.body)) # pyright: ignore [reportArgumentType] print(expected_status) # Verify the response content and status code assert response.status_code == expected_code - assert json.loads(response.body) == expected_status + assert json.loads(response.body) == expected_status # pyright: ignore [reportArgumentType] diff --git a/tests/units/test_model.py b/tests/units/test_model.py index 0a83f39ec..b17538248 100644 --- a/tests/units/test_model.py +++ b/tests/units/test_model.py @@ -86,7 +86,7 @@ def test_automigration( assert versions.exists() # initial table - class AlembicThing(Model, table=True): # type: ignore + class AlembicThing(Model, table=True): # pyright: ignore [reportRedeclaration] t1: str with Model.get_db_engine().connect() as connection: @@ -105,7 +105,7 @@ def test_automigration( model_registry.get_metadata().clear() # Create column t2, mark t1 as optional with default - class AlembicThing(Model, table=True): # type: ignore + class AlembicThing(Model, table=True): # pyright: ignore [reportRedeclaration] t1: Optional[str] = "default" t2: str = "bar" @@ -125,7 +125,7 @@ def test_automigration( model_registry.get_metadata().clear() # Drop column t1 - class AlembicThing(Model, table=True): # type: ignore + class AlembicThing(Model, table=True): # pyright: ignore [reportRedeclaration] t2: str = "bar" assert Model.migrate(autogenerate=True) @@ -138,7 +138,7 @@ def test_automigration( assert result[1].t2 == "baz" # Add table - class AlembicSecond(Model, table=True): # type: ignore + class AlembicSecond(Model, table=True): a: int = 42 b: float = 4.2 @@ -160,14 +160,14 @@ def test_automigration( # drop table (AlembicSecond) model_registry.get_metadata().clear() - class AlembicThing(Model, table=True): # type: ignore + class AlembicThing(Model, table=True): # pyright: ignore [reportRedeclaration] t2: str = "bar" assert Model.migrate(autogenerate=True) assert len(list(versions.glob("*.py"))) == 5 with reflex.model.session() as session: - with pytest.raises(sqlalchemy.exc.OperationalError) as errctx: # type: ignore + with pytest.raises(sqlalchemy.exc.OperationalError) as errctx: session.exec(sqlmodel.select(AlembicSecond)).all() assert errctx.match(r"no such table: alembicsecond") # first table should still exist @@ -178,7 +178,7 @@ def test_automigration( model_registry.get_metadata().clear() - class AlembicThing(Model, table=True): # type: ignore + class AlembicThing(Model, table=True): # changing column type not supported by default t2: int = 42 diff --git a/tests/units/test_prerequisites.py b/tests/units/test_prerequisites.py index cf655d6cd..3bd029077 100644 --- a/tests/units/test_prerequisites.py +++ b/tests/units/test_prerequisites.py @@ -100,7 +100,7 @@ def test_transpile_packages(transpile_packages, expected_transpile_packages): transpile_packages=transpile_packages, ) transpile_packages_match = re.search(r"transpilePackages: (\[.*?\])", output) - transpile_packages_json = transpile_packages_match.group(1) # type: ignore + transpile_packages_json = transpile_packages_match.group(1) # pyright: ignore [reportOptionalMemberAccess] actual_transpile_packages = sorted(json.loads(transpile_packages_json)) assert actual_transpile_packages == expected_transpile_packages diff --git a/tests/units/test_sqlalchemy.py b/tests/units/test_sqlalchemy.py index 23e315785..4434f5ee1 100644 --- a/tests/units/test_sqlalchemy.py +++ b/tests/units/test_sqlalchemy.py @@ -59,7 +59,7 @@ def test_automigration( id: Mapped[Optional[int]] = mapped_column(primary_key=True, default=None) # initial table - class AlembicThing(ModelBase): # pyright: ignore[reportGeneralTypeIssues] + class AlembicThing(ModelBase): # pyright: ignore[reportRedeclaration] t1: Mapped[str] = mapped_column(default="") with Model.get_db_engine().connect() as connection: @@ -78,7 +78,7 @@ def test_automigration( model_registry.get_metadata().clear() # Create column t2, mark t1 as optional with default - class AlembicThing(ModelBase): # pyright: ignore[reportGeneralTypeIssues] + class AlembicThing(ModelBase): # pyright: ignore[reportRedeclaration] t1: Mapped[Optional[str]] = mapped_column(default="default") t2: Mapped[str] = mapped_column(default="bar") @@ -98,7 +98,7 @@ def test_automigration( model_registry.get_metadata().clear() # Drop column t1 - class AlembicThing(ModelBase): # pyright: ignore[reportGeneralTypeIssues] + class AlembicThing(ModelBase): # pyright: ignore[reportRedeclaration] t2: Mapped[str] = mapped_column(default="bar") assert Model.migrate(autogenerate=True) @@ -133,7 +133,7 @@ def test_automigration( # drop table (AlembicSecond) model_registry.get_metadata().clear() - class AlembicThing(ModelBase): # pyright: ignore[reportGeneralTypeIssues] + class AlembicThing(ModelBase): # pyright: ignore[reportRedeclaration] t2: Mapped[str] = mapped_column(default="bar") assert Model.migrate(autogenerate=True) diff --git a/tests/units/test_state.py b/tests/units/test_state.py index dfb068626..b276bad4b 100644 --- a/tests/units/test_state.py +++ b/tests/units/test_state.py @@ -241,7 +241,7 @@ def test_state() -> TestState: Returns: A test state. """ - return TestState() # type: ignore + return TestState() # pyright: ignore [reportCallIssue] @pytest.fixture @@ -431,10 +431,10 @@ def test_default_setters(test_state): def test_class_indexing_with_vars(): """Test that we can index into a state var with another var.""" - prop = TestState.array[TestState.num1] + prop = TestState.array[TestState.num1] # pyright: ignore [reportCallIssue, reportArgumentType] assert str(prop) == f"{TestState.get_name()}.array.at({TestState.get_name()}.num1)" - prop = TestState.mapping["a"][TestState.num1] + prop = TestState.mapping["a"][TestState.num1] # pyright: ignore [reportCallIssue, reportArgumentType] assert ( str(prop) == f'{TestState.get_name()}.mapping["a"].at({TestState.get_name()}.num1)' @@ -554,9 +554,9 @@ def test_get_class_var(): def test_set_class_var(): """Test setting the var of a class.""" with pytest.raises(AttributeError): - TestState.num3 # type: ignore + TestState.num3 # pyright: ignore [reportAttributeAccessIssue] TestState._set_var(Var(_js_expr="num3", _var_type=int)._var_set_state(TestState)) - var = TestState.num3 # type: ignore + var = TestState.num3 # pyright: ignore [reportAttributeAccessIssue] assert var._js_expr == TestState.get_full_name() + ".num3" assert var._var_type is int assert var._var_state == TestState.get_full_name() @@ -848,7 +848,7 @@ async def test_process_event_substate(test_state, child_state, grandchild_state) @pytest.mark.asyncio async def test_process_event_generator(): """Test event handlers that generate multiple updates.""" - gen_state = GenState() # type: ignore + gen_state = GenState() # pyright: ignore [reportCallIssue] event = Event( token="t", name="go", @@ -948,12 +948,12 @@ def test_add_var(): assert not hasattr(ds1, "dynamic_int") ds1.add_var("dynamic_int", int, 42) # Existing instances get the BaseVar - assert ds1.dynamic_int.equals(DynamicState.dynamic_int) # type: ignore + assert ds1.dynamic_int.equals(DynamicState.dynamic_int) # pyright: ignore [reportAttributeAccessIssue] # New instances get an actual value with the default assert DynamicState().dynamic_int == 42 ds1.add_var("dynamic_list", List[int], [5, 10]) - assert ds1.dynamic_list.equals(DynamicState.dynamic_list) # type: ignore + assert ds1.dynamic_list.equals(DynamicState.dynamic_list) # pyright: ignore [reportAttributeAccessIssue] ds2 = DynamicState() assert ds2.dynamic_list == [5, 10] ds2.dynamic_list.append(15) @@ -961,8 +961,8 @@ def test_add_var(): assert DynamicState().dynamic_list == [5, 10] ds1.add_var("dynamic_dict", Dict[str, int], {"k1": 5, "k2": 10}) - assert ds1.dynamic_dict.equals(DynamicState.dynamic_dict) # type: ignore - assert ds2.dynamic_dict.equals(DynamicState.dynamic_dict) # type: ignore + assert ds1.dynamic_dict.equals(DynamicState.dynamic_dict) # pyright: ignore [reportAttributeAccessIssue] + assert ds2.dynamic_dict.equals(DynamicState.dynamic_dict) # pyright: ignore [reportAttributeAccessIssue] assert DynamicState().dynamic_dict == {"k1": 5, "k2": 10} assert DynamicState().dynamic_dict == {"k1": 5, "k2": 10} @@ -1023,7 +1023,7 @@ class InterdependentState(BaseState): Returns: ComputedVar v1x2 multiplied by 2 """ - return self.v1x2 * 2 # type: ignore + return self.v1x2 * 2 @rx.var def _v3(self) -> int: @@ -1270,7 +1270,7 @@ def test_computed_var_cached_depends_on_non_cached(): @rx.var def dep_v(self) -> int: - return self.no_cache_v # type: ignore + return self.no_cache_v @rx.var def comp_v(self) -> int: @@ -1313,7 +1313,7 @@ def test_computed_var_depends_on_parent_non_cached(): class ChildState(ParentState): @rx.var def dep_v(self) -> int: - return self.no_cache_v # type: ignore + return self.no_cache_v ps = ParentState() cs = ps.substates[ChildState.get_name()] @@ -1365,7 +1365,7 @@ def test_cached_var_depends_on_event_handler(use_partial: bool): return counter if use_partial: - HandlerState.handler = functools.partial(HandlerState.handler.fn) + HandlerState.handler = functools.partial(HandlerState.handler.fn) # pyright: ignore [reportFunctionMemberAccess] assert isinstance(HandlerState.handler, functools.partial) else: assert isinstance(HandlerState.handler, EventHandler) @@ -1616,7 +1616,7 @@ async def test_state_with_invalid_yield(capsys, mock_app): id="backend_error", position="top-center", style={"width": "500px"}, - ) # type: ignore + ) # pyright: ignore [reportCallIssue, reportArgumentType] ], token="", ) @@ -1913,7 +1913,7 @@ def mock_app_simple(monkeypatch) -> rx.App: setattr(app_module, CompileVars.APP, app) app._state = TestState - app.event_namespace.emit = CopyingAsyncMock() # type: ignore + app.event_namespace.emit = CopyingAsyncMock() # pyright: ignore [reportOptionalMemberAccess] def _mock_get_app(*args, **kwargs): return app_module @@ -2022,8 +2022,8 @@ async def test_state_proxy(grandchild_state: GrandchildState, mock_app: rx.App): # ensure state update was emitted assert mock_app.event_namespace is not None - mock_app.event_namespace.emit.assert_called_once() - mcall = mock_app.event_namespace.emit.mock_calls[0] + mock_app.event_namespace.emit.assert_called_once() # pyright: ignore [reportFunctionMemberAccess] + mcall = mock_app.event_namespace.emit.mock_calls[0] # pyright: ignore [reportFunctionMemberAccess] assert mcall.args[0] == str(SocketEvent.EVENT) assert mcall.args[1] == StateUpdate( delta={ @@ -2154,7 +2154,7 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): """ router_data = {"query": {}} mock_app.state_manager.state = mock_app._state = BackgroundTaskState - async for update in rx.app.process( # type: ignore + async for update in rx.app.process( mock_app, Event( token=token, @@ -2174,7 +2174,7 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): assert len(mock_app._background_tasks) == 1 # Process another normal event - async for update in rx.app.process( # type: ignore + async for update in rx.app.process( mock_app, Event( token=token, @@ -2224,7 +2224,7 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): assert mock_app.event_namespace is not None emit_mock = mock_app.event_namespace.emit - first_ws_message = emit_mock.mock_calls[0].args[1] + first_ws_message = emit_mock.mock_calls[0].args[1] # pyright: ignore [reportFunctionMemberAccess] assert ( first_ws_message.delta[BackgroundTaskState.get_full_name()].pop("router") is not None @@ -2239,7 +2239,7 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): events=[], final=True, ) - for call in emit_mock.mock_calls[1:5]: + for call in emit_mock.mock_calls[1:5]: # pyright: ignore [reportFunctionMemberAccess] assert call.args[1] == StateUpdate( delta={ BackgroundTaskState.get_full_name(): { @@ -2249,7 +2249,7 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): events=[], final=True, ) - assert emit_mock.mock_calls[-2].args[1] == StateUpdate( + assert emit_mock.mock_calls[-2].args[1] == StateUpdate( # pyright: ignore [reportFunctionMemberAccess] delta={ BackgroundTaskState.get_full_name(): { "order": exp_order, @@ -2260,7 +2260,7 @@ async def test_background_task_no_block(mock_app: rx.App, token: str): events=[], final=True, ) - assert emit_mock.mock_calls[-1].args[1] == StateUpdate( + assert emit_mock.mock_calls[-1].args[1] == StateUpdate( # pyright: ignore [reportFunctionMemberAccess] delta={ BackgroundTaskState.get_full_name(): { "computed_order": exp_order, @@ -2281,7 +2281,7 @@ async def test_background_task_reset(mock_app: rx.App, token: str): """ router_data = {"query": {}} mock_app.state_manager.state = mock_app._state = BackgroundTaskState - async for update in rx.app.process( # type: ignore + async for update in rx.app.process( mock_app, Event( token=token, @@ -2623,10 +2623,10 @@ def test_duplicate_substate_class(mocker): class TestState(BaseState): pass - class ChildTestState(TestState): # type: ignore + class ChildTestState(TestState): # pyright: ignore [reportRedeclaration] pass - class ChildTestState(TestState): # type: ignore # noqa + class ChildTestState(TestState): # noqa: F811 pass return TestState @@ -2664,21 +2664,21 @@ def test_reset_with_mutables(): items: List[List[int]] = default instance = MutableResetState() - assert instance.items.__wrapped__ is not default # type: ignore + assert instance.items.__wrapped__ is not default # pyright: ignore [reportAttributeAccessIssue] assert instance.items == default == copied_default instance.items.append([3, 3]) assert instance.items != default assert instance.items != copied_default instance.reset() - assert instance.items.__wrapped__ is not default # type: ignore + assert instance.items.__wrapped__ is not default # pyright: ignore [reportAttributeAccessIssue] assert instance.items == default == copied_default instance.items.append([3, 3]) assert instance.items != default assert instance.items != copied_default instance.reset() - assert instance.items.__wrapped__ is not default # type: ignore + assert instance.items.__wrapped__ is not default # pyright: ignore [reportAttributeAccessIssue] assert instance.items == default == copied_default instance.items.append([3, 3]) assert instance.items != default @@ -2740,30 +2740,30 @@ def test_state_union_optional(): c3r: Custom3 = Custom3(c2r=Custom2(c1r=Custom1(foo=""))) custom_union: Union[Custom1, Custom2, Custom3] = Custom1(foo="") - assert str(UnionState.c3.c2) == f'{UnionState.c3!s}?.["c2"]' # type: ignore - assert str(UnionState.c3.c2.c1) == f'{UnionState.c3!s}?.["c2"]?.["c1"]' # type: ignore + assert str(UnionState.c3.c2) == f'{UnionState.c3!s}?.["c2"]' # pyright: ignore [reportOptionalMemberAccess] + assert str(UnionState.c3.c2.c1) == f'{UnionState.c3!s}?.["c2"]?.["c1"]' # pyright: ignore [reportOptionalMemberAccess] assert ( - str(UnionState.c3.c2.c1.foo) == f'{UnionState.c3!s}?.["c2"]?.["c1"]?.["foo"]' # type: ignore + str(UnionState.c3.c2.c1.foo) == f'{UnionState.c3!s}?.["c2"]?.["c1"]?.["foo"]' # pyright: ignore [reportOptionalMemberAccess] ) assert ( - str(UnionState.c3.c2.c1r.foo) == f'{UnionState.c3!s}?.["c2"]?.["c1r"]["foo"]' # type: ignore + str(UnionState.c3.c2.c1r.foo) == f'{UnionState.c3!s}?.["c2"]?.["c1r"]["foo"]' # pyright: ignore [reportOptionalMemberAccess] ) - assert str(UnionState.c3.c2r.c1) == f'{UnionState.c3!s}?.["c2r"]["c1"]' # type: ignore + assert str(UnionState.c3.c2r.c1) == f'{UnionState.c3!s}?.["c2r"]["c1"]' # pyright: ignore [reportOptionalMemberAccess] assert ( - str(UnionState.c3.c2r.c1.foo) == f'{UnionState.c3!s}?.["c2r"]["c1"]?.["foo"]' # type: ignore + str(UnionState.c3.c2r.c1.foo) == f'{UnionState.c3!s}?.["c2r"]["c1"]?.["foo"]' # pyright: ignore [reportOptionalMemberAccess] ) assert ( - str(UnionState.c3.c2r.c1r.foo) == f'{UnionState.c3!s}?.["c2r"]["c1r"]["foo"]' # type: ignore + str(UnionState.c3.c2r.c1r.foo) == f'{UnionState.c3!s}?.["c2r"]["c1r"]["foo"]' # pyright: ignore [reportOptionalMemberAccess] ) - assert str(UnionState.c3i.c2) == f'{UnionState.c3i!s}["c2"]' # type: ignore - assert str(UnionState.c3r.c2) == f'{UnionState.c3r!s}["c2"]' # type: ignore - assert UnionState.custom_union.foo is not None # type: ignore - assert UnionState.custom_union.c1 is not None # type: ignore - assert UnionState.custom_union.c1r is not None # type: ignore - assert UnionState.custom_union.c2 is not None # type: ignore - assert UnionState.custom_union.c2r is not None # type: ignore - assert types.is_optional(UnionState.opt_int._var_type) # type: ignore - assert types.is_union(UnionState.int_float._var_type) # type: ignore + assert str(UnionState.c3i.c2) == f'{UnionState.c3i!s}["c2"]' + assert str(UnionState.c3r.c2) == f'{UnionState.c3r!s}["c2"]' + assert UnionState.custom_union.foo is not None # pyright: ignore [reportAttributeAccessIssue] + assert UnionState.custom_union.c1 is not None # pyright: ignore [reportAttributeAccessIssue] + assert UnionState.custom_union.c1r is not None # pyright: ignore [reportAttributeAccessIssue] + assert UnionState.custom_union.c2 is not None # pyright: ignore [reportAttributeAccessIssue] + assert UnionState.custom_union.c2r is not None # pyright: ignore [reportAttributeAccessIssue] + assert types.is_optional(UnionState.opt_int._var_type) # pyright: ignore [reportAttributeAccessIssue, reportOptionalMemberAccess] + assert types.is_union(UnionState.int_float._var_type) # pyright: ignore [reportAttributeAccessIssue] def test_set_base_field_via_setter(): @@ -3360,9 +3360,9 @@ config = rx.Config( from reflex.state import State, StateManager state_manager = StateManager.create(state=State) - assert state_manager.lock_expiration == expected_values[0] # type: ignore - assert state_manager.token_expiration == expected_values[1] # type: ignore - assert state_manager.lock_warning_threshold == expected_values[2] # type: ignore + assert state_manager.lock_expiration == expected_values[0] # pyright: ignore [reportAttributeAccessIssue] + assert state_manager.token_expiration == expected_values[1] # pyright: ignore [reportAttributeAccessIssue] + assert state_manager.lock_warning_threshold == expected_values[2] # pyright: ignore [reportAttributeAccessIssue] @pytest.mark.skipif("REDIS_URL" not in os.environ, reason="Test requires redis") @@ -3441,7 +3441,7 @@ def test_mixin_state() -> None: assert "computed" in UsesMixinState.vars assert ( - UsesMixinState(_reflex_internal_init=True)._backend_no_default # type: ignore + UsesMixinState(_reflex_internal_init=True)._backend_no_default # pyright: ignore [reportCallIssue] is not UsesMixinState.backend_vars["_backend_no_default"] ) @@ -3461,7 +3461,7 @@ def test_assignment_to_undeclared_vars(): class State(BaseState): val: str _val: str - __val: str # type: ignore + __val: str # pyright: ignore [reportGeneralTypeIssues] def handle_supported_regular_vars(self): self.val = "no underscore" @@ -3481,8 +3481,8 @@ def test_assignment_to_undeclared_vars(): def handle_var(self): self.value = 20 - state = State() # type: ignore - sub_state = Substate() # type: ignore + state = State() # pyright: ignore [reportCallIssue] + sub_state = Substate() # pyright: ignore [reportCallIssue] with pytest.raises(SetUndefinedStateVarError): state.handle_regular_var() @@ -3544,7 +3544,7 @@ def test_fallback_pickle(): _f: Optional[Callable] = None _g: Any = None - state = DillState(_reflex_internal_init=True) # type: ignore + state = DillState(_reflex_internal_init=True) # pyright: ignore [reportCallIssue] state._o = Obj(_f=lambda: 42) state._f = lambda: 420 @@ -3555,14 +3555,14 @@ def test_fallback_pickle(): assert unpickled_state._o._f() == 42 # Threading locks are unpicklable normally, and raise TypeError instead of PicklingError. - state2 = DillState(_reflex_internal_init=True) # type: ignore + state2 = DillState(_reflex_internal_init=True) # pyright: ignore [reportCallIssue] state2._g = threading.Lock() pk2 = state2._serialize() unpickled_state2 = BaseState._deserialize(pk2) assert isinstance(unpickled_state2._g, type(threading.Lock())) # Some object, like generator, are still unpicklable with dill. - state3 = DillState(_reflex_internal_init=True) # type: ignore + state3 = DillState(_reflex_internal_init=True) # pyright: ignore [reportCallIssue] state3._g = (i for i in range(10)) with pytest.raises(StateSerializationError): @@ -3737,7 +3737,7 @@ class UpcastState(rx.State): assert isinstance(a, list) self.passed = True - def py_unresolvable(self, u: "Unresolvable"): # noqa: D102, F821 # type: ignore + def py_unresolvable(self, u: "Unresolvable"): # noqa: D102, F821 # pyright: ignore [reportUndefinedVariable] assert isinstance(u, list) self.passed = True diff --git a/tests/units/test_style.py b/tests/units/test_style.py index bb585fd22..6ab00d561 100644 --- a/tests/units/test_style.py +++ b/tests/units/test_style.py @@ -356,7 +356,7 @@ def test_style_via_component( style_dict: The style_dict to pass to the component. expected_get_style: The expected style dict. """ - comp = rx.el.div(style=style_dict, **kwargs) # type: ignore + comp = rx.el.div(style=style_dict, **kwargs) # pyright: ignore [reportArgumentType] compare_dict_of_var(comp._get_style(), expected_get_style) @@ -515,17 +515,17 @@ def test_evaluate_style_namespaces(): """Test that namespaces get converted to component create functions.""" style_dict = {rx.text: {"color": "blue"}} assert rx.text.__call__ not in style_dict - style_dict = evaluate_style_namespaces(style_dict) # type: ignore + style_dict = evaluate_style_namespaces(style_dict) # pyright: ignore [reportArgumentType] assert rx.text.__call__ in style_dict def test_style_update_with_var_data(): """Test that .update with a Style containing VarData works.""" red_var = LiteralVar.create("red")._replace( - merge_var_data=VarData(hooks={"const red = true": None}), # type: ignore + merge_var_data=VarData(hooks={"const red = true": None}), ) blue_var = LiteralVar.create("blue")._replace( - merge_var_data=VarData(hooks={"const blue = true": None}), # type: ignore + merge_var_data=VarData(hooks={"const blue = true": None}), ) s1 = Style( diff --git a/tests/units/test_var.py b/tests/units/test_var.py index 51b0d9a2b..899075cdb 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -288,7 +288,7 @@ def test_create(value, expected): expected: The expected name of the setter function. """ prop = LiteralVar.create(value) - assert prop.equals(expected) # type: ignore + assert prop.equals(expected) def test_create_type_error(): @@ -1133,7 +1133,7 @@ def test_var_component(): for _, imported_objects in var_data.imports ) - has_eval_react_component(ComponentVarState.field_var) # type: ignore + has_eval_react_component(ComponentVarState.field_var) # pyright: ignore [reportArgumentType] has_eval_react_component(ComponentVarState.computed_var) @@ -1145,15 +1145,15 @@ def test_type_chains(): List[int], ) assert ( - str(object_var.keys()[0].upper()) # type: ignore + str(object_var.keys()[0].upper()) == 'Object.keys(({ ["a"] : 1, ["b"] : 2, ["c"] : 3 })).at(0).toUpperCase()' ) assert ( - str(object_var.entries()[1][1] - 1) # type: ignore + str(object_var.entries()[1][1] - 1) == '(Object.entries(({ ["a"] : 1, ["b"] : 2, ["c"] : 3 })).at(1).at(1) - 1)' ) assert ( - str(object_var["c"] + object_var["b"]) # type: ignore + str(object_var["c"] + object_var["b"]) # pyright: ignore [reportCallIssue, reportOperatorIssue] == '(({ ["a"] : 1, ["b"] : 2, ["c"] : 3 })["c"] + ({ ["a"] : 1, ["b"] : 2, ["c"] : 3 })["b"])' ) @@ -1162,7 +1162,7 @@ def test_nested_dict(): arr = LiteralArrayVar.create([{"bar": ["foo", "bar"]}], List[Dict[str, List[str]]]) assert ( - str(arr[0]["bar"][0]) == '[({ ["bar"] : ["foo", "bar"] })].at(0)["bar"].at(0)' + str(arr[0]["bar"][0]) == '[({ ["bar"] : ["foo", "bar"] })].at(0)["bar"].at(0)' # pyright: ignore [reportIndexIssue] ) diff --git a/tests/units/utils/test_format.py b/tests/units/utils/test_format.py index 2a2aa8259..89197a03e 100644 --- a/tests/units/utils/test_format.py +++ b/tests/units/utils/test_format.py @@ -523,7 +523,7 @@ def test_format_event_handler(input, output): input: The event handler input. output: The expected output. """ - assert format.format_event_handler(input) == output # type: ignore + assert format.format_event_handler(input) == output @pytest.mark.parametrize( @@ -582,7 +582,7 @@ formatted_router = { "input, output", [ ( - TestState(_reflex_internal_init=True).dict(), # type: ignore + TestState(_reflex_internal_init=True).dict(), # pyright: ignore [reportCallIssue] { TestState.get_full_name(): { "array": [1, 2, 3.14], @@ -615,7 +615,7 @@ formatted_router = { }, ), ( - DateTimeState(_reflex_internal_init=True).dict(), # type: ignore + DateTimeState(_reflex_internal_init=True).dict(), # pyright: ignore [reportCallIssue] { DateTimeState.get_full_name(): { "d": "1989-11-09", diff --git a/tests/units/utils/test_utils.py b/tests/units/utils/test_utils.py index 65e77f4a7..44356dac5 100644 --- a/tests/units/utils/test_utils.py +++ b/tests/units/utils/test_utils.py @@ -31,7 +31,7 @@ def get_above_max_version(): """ semantic_version_list = constants.Bun.VERSION.split(".") - semantic_version_list[-1] = str(int(semantic_version_list[-1]) + 1) # type: ignore + semantic_version_list[-1] = str(int(semantic_version_list[-1]) + 1) # pyright: ignore [reportArgumentType, reportCallIssue] return ".".join(semantic_version_list) @@ -586,9 +586,7 @@ def test_style_prop_with_event_handler_value(callable): } with pytest.raises(ReflexError): - rx.box( - style=style, # type: ignore - ) + rx.box(style=style) # pyright: ignore [reportArgumentType] def test_is_prod_mode() -> None: From 3bd2bea54d3c30e6d2a4f1613b8d0ce5070710e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 28 Jan 2025 22:47:57 +0100 Subject: [PATCH 051/144] merging two style instance should give a style instance (#4706) * merging two style instance should give a style instance * fix ci * carry _var_data --- reflex/style.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reflex/style.py b/reflex/style.py index 5142d0181..88513dce6 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -292,6 +292,18 @@ class Style(dict): ) super().__setitem__(key, value) + def __or__(self, other: Style | dict) -> Style: + """Combine two styles. + + Args: + other: The other style to combine. + + Returns: + The combined style. + """ + _var_data = VarData.merge(self._var_data, getattr(other, "_var_data", None)) + return Style(super().__or__(self, other), _var_data=_var_data) # pyright: ignore [reportGeneralTypeIssues, reportCallIssue] + def _format_emotion_style_pseudo_selector(key: str) -> str: """Format a pseudo selector for emotion CSS-in-JS. From 2a922214a2a6d529067eea1cd21157a1a3213922 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 28 Jan 2025 16:07:53 -0800 Subject: [PATCH 052/144] improve error message for failed compile_state (#4702) --- reflex/compiler/utils.py | 8 +++++++- reflex/constants/base.py | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 02692e43b..9ccd5cb36 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -2,6 +2,8 @@ from __future__ import annotations +import traceback +from datetime import datetime from pathlib import Path from typing import Any, Callable, Dict, Optional, Type, Union from urllib.parse import urlparse @@ -165,8 +167,12 @@ def compile_state(state: Type[BaseState]) -> dict: try: initial_state = state(_reflex_internal_init=True).dict(initial=True) except Exception as e: + timestamp = datetime.now().strftime("%Y-%m-%d__%H-%M-%S") + constants.Reflex.LOGS_DIR.mkdir(parents=True, exist_ok=True) + log_path = constants.Reflex.LOGS_DIR / f"state_compile_error_{timestamp}.log" + traceback.TracebackException.from_exception(e).print(file=log_path.open("w+")) console.warn( - f"Failed to compile initial state with computed vars, excluding them: {e}" + f"Failed to compile initial state with computed vars. Error log saved to {log_path}" ) initial_state = state(_reflex_internal_init=True).dict( initial=True, include_computed=False diff --git a/reflex/constants/base.py b/reflex/constants/base.py index 11f3e3c05..7fbcdf18a 100644 --- a/reflex/constants/base.py +++ b/reflex/constants/base.py @@ -75,6 +75,8 @@ class Reflex(SimpleNamespace): # If user sets REFLEX_DIR envroment variable use that instead. DIR = PlatformDirs(MODULE_NAME, False).user_data_path + LOGS_DIR = DIR / "logs" + # The root directory of the reflex library. ROOT_DIR = Path(__file__).parents[2] From b8b3f8910e47db7b457f18bde7dd9f66ec04aa39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 29 Jan 2025 01:12:47 +0100 Subject: [PATCH 053/144] add more type annotations through the code (#4401) * add more type annotations through the code * add typing in reflex/utils * misc typing * more typings * state typing * keep typing * typing init and utils * more typing for components * fix attempt for 3.9 * need more __future * more typings * type event plz * type model * type vars/base.py * enable 'ANN001' for reflex folder (ignore tests and benchmarks) * fix pyi * add missing annotations * use more precise error when ignoring --- pyproject.toml | 6 +- reflex/__init__.py | 5 +- reflex/app.py | 35 ++++++------ reflex/app_mixins/lifespan.py | 2 +- reflex/base.py | 2 +- reflex/compiler/utils.py | 2 +- reflex/components/component.py | 10 ++-- reflex/components/core/client_side_routing.py | 2 +- .../components/core/client_side_routing.pyi | 2 +- reflex/components/core/cond.py | 2 +- reflex/components/core/match.py | 2 +- reflex/components/datadisplay/logo.py | 6 +- reflex/components/el/element.py | 2 +- reflex/components/markdown/markdown.py | 8 ++- reflex/components/next/image.py | 4 +- reflex/components/props.py | 2 +- reflex/components/radix/themes/color_mode.py | 12 ++-- reflex/components/radix/themes/layout/list.py | 2 +- reflex/components/recharts/charts.py | 2 +- reflex/components/sonner/toast.py | 20 +++---- reflex/components/sonner/toast.pyi | 10 ++-- reflex/components/suneditor/editor.py | 10 ++-- reflex/components/suneditor/editor.pyi | 4 +- reflex/components/tags/tag.py | 2 +- reflex/config.py | 6 +- reflex/custom_components/custom_components.py | 2 +- reflex/event.py | 13 +++-- reflex/experimental/hooks.py | 10 ++-- reflex/experimental/misc.py | 6 +- reflex/istate/wrappers.py | 2 +- reflex/model.py | 13 +++-- reflex/page.py | 6 +- reflex/reflex.py | 20 ++++--- reflex/route.py | 2 +- reflex/state.py | 53 ++++++++++-------- reflex/style.py | 4 +- reflex/testing.py | 6 +- reflex/utils/build.py | 2 +- reflex/utils/compat.py | 3 +- reflex/utils/exceptions.py | 4 +- reflex/utils/exec.py | 16 +++--- reflex/utils/format.py | 4 +- reflex/utils/lazy_loader.py | 8 ++- reflex/utils/prerequisites.py | 16 ++++-- reflex/utils/processes.py | 39 +++++++------ reflex/utils/pyi_generator.py | 14 +++-- reflex/utils/registry.py | 8 +-- reflex/utils/telemetry.py | 4 +- reflex/utils/types.py | 8 +-- reflex/vars/base.py | 56 ++++++++++++------- reflex/vars/function.py | 4 ++ reflex/vars/object.py | 2 +- reflex/vars/sequence.py | 9 ++- scripts/wait_for_listening_port.py | 4 +- 54 files changed, 285 insertions(+), 213 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 761f9e2c9..6eeb17489 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,14 +86,14 @@ reportIncompatibleMethodOverride = false target-version = "py310" output-format = "concise" lint.isort.split-on-trailing-comma = false -lint.select = ["B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PGH", "PTH", "RUF", "SIM", "T", "TRY", "W"] +lint.select = ["ANN001","B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PGH", "PTH", "RUF", "SIM", "T", "TRY", "W"] lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF012", "TRY0"] lint.pydocstyle.convention = "google" [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] -"tests/*.py" = ["D100", "D103", "D104", "B018", "PERF", "T", "N"] -"benchmarks/*.py" = ["D100", "D103", "D104", "B018", "PERF", "T", "N"] +"tests/*.py" = ["ANN001", "D100", "D103", "D104", "B018", "PERF", "T", "N"] +"benchmarks/*.py" = ["ANN001", "D100", "D103", "D104", "B018", "PERF", "T", "N"] "reflex/.templates/*.py" = ["D100", "D103", "D104"] "*.pyi" = ["D301", "D415", "D417", "D418", "E742", "N", "PGH"] "pyi_generator.py" = ["N802"] diff --git a/reflex/__init__.py b/reflex/__init__.py index 72089aca0..3209b505e 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -84,6 +84,9 @@ In the example above, you will be able to do `rx.list` from __future__ import annotations +from types import ModuleType +from typing import Any + from reflex.utils import ( compat, # for side-effects lazy_loader, @@ -365,5 +368,5 @@ getattr, __dir__, __all__ = lazy_loader.attach( ) -def __getattr__(name): +def __getattr__(name: ModuleType | Any): return getattr(name) diff --git a/reflex/app.py b/reflex/app.py index e3b45e7b2..9fe0f2992 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -408,15 +408,15 @@ class App(MiddlewareMixin, LifespanMixin): if self.api: class HeaderMiddleware: - def __init__(self, app): + def __init__(self, app: ASGIApp): self.app = app async def __call__( - self, scope: MutableMapping[str, Any], receive, send + self, scope: MutableMapping[str, Any], receive: Any, send: Callable ): original_send = send - async def modified_send(message): + async def modified_send(message: dict): if message["type"] == "websocket.accept": if scope.get("subprotocols"): # The following *does* say "subprotocol" instead of "subprotocols", intentionally. @@ -712,8 +712,8 @@ class App(MiddlewareMixin, LifespanMixin): Args: component: The component to display at the page. title: The title of the page. - description: The description of the page. image: The image to display on the page. + description: The description of the page. on_load: The event handler(s) that will be called each time the page load. meta: The metadata of the page. """ @@ -1056,7 +1056,7 @@ class App(MiddlewareMixin, LifespanMixin): with executor: result_futures = [] - def _submit_work(fn, *args, **kwargs): + def _submit_work(fn: Callable, *args, **kwargs): f = executor.submit(fn, *args, **kwargs) result_futures.append(f) @@ -1387,15 +1387,14 @@ async def process( if app._process_background(state, event) is not None: # `final=True` allows the frontend send more events immediately. yield StateUpdate(final=True) - return + else: + # Process the event synchronously. + async for update in state._process(event): + # Postprocess the event. + update = await app._postprocess(state, event, update) - # Process the event synchronously. - async for update in state._process(event): - # Postprocess the event. - update = await app._postprocess(state, event, update) - - # Yield the update. - yield update + # Yield the update. + yield update except Exception as ex: telemetry.send_error(ex, context="backend") @@ -1590,20 +1589,20 @@ class EventNamespace(AsyncNamespace): self.sid_to_token = {} self.app = app - def on_connect(self, sid, environ): + def on_connect(self, sid: str, environ: dict): """Event for when the websocket is connected. Args: sid: The Socket.IO session id. environ: The request information, including HTTP headers. """ - subprotocol = environ.get("HTTP_SEC_WEBSOCKET_PROTOCOL", None) + subprotocol = environ.get("HTTP_SEC_WEBSOCKET_PROTOCOL") if subprotocol and subprotocol != constants.Reflex.VERSION: console.warn( f"Frontend version {subprotocol} for session {sid} does not match the backend version {constants.Reflex.VERSION}." ) - def on_disconnect(self, sid): + def on_disconnect(self, sid: str): """Event for when the websocket disconnects. Args: @@ -1625,7 +1624,7 @@ class EventNamespace(AsyncNamespace): self.emit(str(constants.SocketEvent.EVENT), update, to=sid) ) - async def on_event(self, sid, data): + async def on_event(self, sid: str, data: Any): """Event for receiving front-end websocket events. Raises: @@ -1692,7 +1691,7 @@ class EventNamespace(AsyncNamespace): # Emit the update from processing the event. await self.emit_update(update=update, sid=sid) - async def on_ping(self, sid): + async def on_ping(self, sid: str): """Event for testing the API endpoint. Args: diff --git a/reflex/app_mixins/lifespan.py b/reflex/app_mixins/lifespan.py index 8bdef2eb9..50b90f25c 100644 --- a/reflex/app_mixins/lifespan.py +++ b/reflex/app_mixins/lifespan.py @@ -61,7 +61,7 @@ class LifespanMixin(AppMixin): Args: task: The task to register. - task_kwargs: The kwargs of the task. + **task_kwargs: The kwargs of the task. Raises: InvalidLifespanTaskTypeError: If the task is a generator function. diff --git a/reflex/base.py b/reflex/base.py index 5c0180812..f6bbb8ce4 100644 --- a/reflex/base.py +++ b/reflex/base.py @@ -80,7 +80,7 @@ class Base(BaseModel): # pyright: ignore [reportPossiblyUnboundVariable] default=serialize, ) - def set(self, **kwargs): + def set(self, **kwargs: Any): """Set multiple fields and return the object. Args: diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 9ccd5cb36..d145e6c0b 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -502,7 +502,7 @@ def empty_dir(path: str | Path, keep_files: list[str] | None = None): path_ops.rm(element) -def is_valid_url(url) -> bool: +def is_valid_url(url: str) -> bool: """Check if a url is valid. Args: diff --git a/reflex/components/component.py b/reflex/components/component.py index c88330918..3f1b88fea 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -426,7 +426,7 @@ class Component(BaseComponent, ABC): else: continue - def determine_key(value): + def determine_key(value: Any): # Try to create a var from the value key = value if isinstance(value, Var) else LiteralVar.create(value) @@ -707,7 +707,7 @@ class Component(BaseComponent, ABC): # Filter out None props props = {key: value for key, value in props.items() if value is not None} - def validate_children(children): + def validate_children(children: tuple | list): for child in children: if isinstance(child, (tuple, list)): validate_children(child) @@ -851,7 +851,7 @@ class Component(BaseComponent, ABC): else {} ) - def render(self) -> Dict: + def render(self) -> dict: """Render the component. Returns: @@ -869,7 +869,7 @@ class Component(BaseComponent, ABC): self._replace_prop_names(rendered_dict) return rendered_dict - def _replace_prop_names(self, rendered_dict) -> None: + def _replace_prop_names(self, rendered_dict: dict) -> None: """Replace the prop names in the render dictionary. Args: @@ -909,7 +909,7 @@ class Component(BaseComponent, ABC): comp.__name__ for comp in (Fragment, Foreach, Cond, Match) ] - def validate_child(child): + def validate_child(child: Any): child_name = type(child).__name__ # Iterate through the immediate children of fragment diff --git a/reflex/components/core/client_side_routing.py b/reflex/components/core/client_side_routing.py index a10b90de8..0fc40de5f 100644 --- a/reflex/components/core/client_side_routing.py +++ b/reflex/components/core/client_side_routing.py @@ -41,7 +41,7 @@ class ClientSideRouting(Component): return "" -def wait_for_client_redirect(component) -> Component: +def wait_for_client_redirect(component: Component) -> Component: """Wait for a redirect to occur before rendering a component. This prevents the 404 page from flashing while the redirect is happening. diff --git a/reflex/components/core/client_side_routing.pyi b/reflex/components/core/client_side_routing.pyi index 581b0e120..078698198 100644 --- a/reflex/components/core/client_side_routing.pyi +++ b/reflex/components/core/client_side_routing.pyi @@ -60,7 +60,7 @@ class ClientSideRouting(Component): """ ... -def wait_for_client_redirect(component) -> Component: ... +def wait_for_client_redirect(component: Component) -> Component: ... class Default404Page(Component): @overload diff --git a/reflex/components/core/cond.py b/reflex/components/core/cond.py index 25b691808..6f9110a16 100644 --- a/reflex/components/core/cond.py +++ b/reflex/components/core/cond.py @@ -153,7 +153,7 @@ def cond(condition: Any, c1: Any, c2: Any = None) -> Component | Var: if c2 is None: raise ValueError("For conditional vars, the second argument must be set.") - def create_var(cond_part): + def create_var(cond_part: Any) -> Var[Any]: return LiteralVar.create(cond_part) # convert the truth and false cond parts into vars so the _var_data can be obtained. diff --git a/reflex/components/core/match.py b/reflex/components/core/match.py index ae8568ac5..5c31669a1 100644 --- a/reflex/components/core/match.py +++ b/reflex/components/core/match.py @@ -109,7 +109,7 @@ class Match(MemoizationLeaf): return cases, default @classmethod - def _create_case_var_with_var_data(cls, case_element): + def _create_case_var_with_var_data(cls, case_element: Any) -> Var: """Convert a case element into a Var.If the case is a Style type, we extract the var data and merge it with the newly created Var. diff --git a/reflex/components/datadisplay/logo.py b/reflex/components/datadisplay/logo.py index d960b8cee..1c4c02001 100644 --- a/reflex/components/datadisplay/logo.py +++ b/reflex/components/datadisplay/logo.py @@ -15,10 +15,8 @@ def svg_logo(color: Union[str, rx.Var[str]] = rx.color_mode_cond("#110F1F", "whi The Reflex logo SVG. """ - def logo_path(d): - return rx.el.svg.path( - d=d, - ) + def logo_path(d: str): + return rx.el.svg.path(d=d) paths = [ "M0 11.5999V0.399902H8.96V4.8799H6.72V2.6399H2.24V4.8799H6.72V7.1199H2.24V11.5999H0ZM6.72 11.5999V7.1199H8.96V11.5999H6.72Z", diff --git a/reflex/components/el/element.py b/reflex/components/el/element.py index 213cea65a..c9a58b1f6 100644 --- a/reflex/components/el/element.py +++ b/reflex/components/el/element.py @@ -6,7 +6,7 @@ from reflex.components.component import Component class Element(Component): """The base class for all raw HTML elements.""" - def __eq__(self, other): + def __eq__(self, other: object): """Two elements are equal if they have the same tag. Args: diff --git a/reflex/components/markdown/markdown.py b/reflex/components/markdown/markdown.py index 686c49a64..27bd5bd62 100644 --- a/reflex/components/markdown/markdown.py +++ b/reflex/components/markdown/markdown.py @@ -8,7 +8,7 @@ from functools import lru_cache from hashlib import md5 from typing import Any, Callable, Dict, Sequence, Union -from reflex.components.component import Component, CustomComponent +from reflex.components.component import BaseComponent, Component, CustomComponent from reflex.components.tags.tag import Tag from reflex.utils import types from reflex.utils.imports import ImportDict, ImportVar @@ -379,7 +379,9 @@ const {_LANGUAGE!s} = match ? match[1] : ''; # fallback to the default fn Var creation if the component is not a MarkdownComponentMap. return MarkdownComponentMap.create_map_fn_var(fn_body=formatted_component) - def _get_map_fn_custom_code_from_children(self, component) -> list[str]: + def _get_map_fn_custom_code_from_children( + self, component: BaseComponent + ) -> list[str]: """Recursively get markdown custom code from children components. Args: @@ -409,7 +411,7 @@ const {_LANGUAGE!s} = match ? match[1] : ''; return custom_code_list @staticmethod - def _component_map_hash(component_map) -> str: + def _component_map_hash(component_map: dict) -> str: inp = str( {tag: component(_MOCK_ARG) for tag, component in component_map.items()} ).encode() diff --git a/reflex/components/next/image.py b/reflex/components/next/image.py index 00821ddaf..20ba5a304 100644 --- a/reflex/components/next/image.py +++ b/reflex/components/next/image.py @@ -1,5 +1,7 @@ """Image component from next/image.""" +from __future__ import annotations + from typing import Any, Literal, Optional, Union from reflex.event import EventHandler, no_args_event_spec @@ -93,7 +95,7 @@ class Image(NextComponent): style = props.get("style", {}) - def check_prop_type(prop_name, prop_value): + def check_prop_type(prop_name: str, prop_value: int | str | None): if types.check_prop_in_allowed_types(prop_value, allowed_types=[int]): props[prop_name] = prop_value diff --git a/reflex/components/props.py b/reflex/components/props.py index 823036406..779e714d9 100644 --- a/reflex/components/props.py +++ b/reflex/components/props.py @@ -48,7 +48,7 @@ class PropsBase(Base): class NoExtrasAllowedProps(Base): """A class that holds props to be passed or applied to a component with no extra props allowed.""" - def __init__(self, component_name=None, **kwargs): + def __init__(self, component_name: str | None = None, **kwargs): """Initialize the props. Args: diff --git a/reflex/components/radix/themes/color_mode.py b/reflex/components/radix/themes/color_mode.py index 2377a2422..d9b7c0b02 100644 --- a/reflex/components/radix/themes/color_mode.py +++ b/reflex/components/radix/themes/color_mode.py @@ -17,7 +17,7 @@ rx.text( from __future__ import annotations -from typing import Dict, List, Literal, Optional, Union, get_args +from typing import Any, Dict, List, Literal, Optional, Union, get_args from reflex.components.component import BaseComponent from reflex.components.core.cond import Cond, color_mode_cond, cond @@ -78,17 +78,19 @@ position_map: Dict[str, List[str]] = { # needed to inverse contains for find -def _find(const: List[str], var): +def _find(const: List[str], var: Any): return LiteralArrayVar.create(const).contains(var) -def _set_var_default(props, position, prop, default1, default2=""): +def _set_var_default( + props: dict, position: Any, prop: str, default1: str, default2: str = "" +): props.setdefault( prop, cond(_find(position_map[prop], position), default1, default2) ) -def _set_static_default(props, position, prop, default): +def _set_static_default(props: dict, position: Any, prop: str, default: str): if prop in position: props.setdefault(prop, default) @@ -142,7 +144,7 @@ class ColorModeIconButton(IconButton): if allow_system: - def color_mode_item(_color_mode): + def color_mode_item(_color_mode: str): return dropdown_menu.item( _color_mode.title(), on_click=set_color_mode(_color_mode) ) diff --git a/reflex/components/radix/themes/layout/list.py b/reflex/components/radix/themes/layout/list.py index b79e99bf7..04fcb6ae5 100644 --- a/reflex/components/radix/themes/layout/list.py +++ b/reflex/components/radix/themes/layout/list.py @@ -189,7 +189,7 @@ ordered_list = list_ns.ordered unordered_list = list_ns.unordered -def __getattr__(name): +def __getattr__(name: Any): # special case for when accessing list to avoid shadowing # python's built in list object. if name == "list": diff --git a/reflex/components/recharts/charts.py b/reflex/components/recharts/charts.py index 6edfce58f..3e9df4143 100644 --- a/reflex/components/recharts/charts.py +++ b/reflex/components/recharts/charts.py @@ -69,7 +69,7 @@ class ChartBase(RechartsCharts): ) @classmethod - def create(cls, *children, **props) -> Component: + def create(cls, *children: Any, **props: Any) -> Component: """Create a chart component. Args: diff --git a/reflex/components/sonner/toast.py b/reflex/components/sonner/toast.py index 0f666fd64..dbac8e733 100644 --- a/reflex/components/sonner/toast.py +++ b/reflex/components/sonner/toast.py @@ -132,7 +132,7 @@ class ToastProps(PropsBase, NoExtrasAllowedProps): # Function that gets called when the toast disappears automatically after it's timeout (duration` prop). on_auto_close: Optional[Any] - def dict(self, *args, **kwargs) -> dict[str, Any]: + def dict(self, *args: Any, **kwargs: Any) -> dict[str, Any]: """Convert the object to a dictionary. Args: @@ -276,12 +276,12 @@ class Toaster(Component): return run_script(toast) @staticmethod - def toast_info(message: str | Var = "", **kwargs): + def toast_info(message: str | Var = "", **kwargs: Any): """Display an info toast message. Args: message: The message to display. - kwargs: Additional toast props. + **kwargs: Additional toast props. Returns: The toast event. @@ -289,12 +289,12 @@ class Toaster(Component): return Toaster.send_toast(message, level="info", **kwargs) @staticmethod - def toast_warning(message: str | Var = "", **kwargs): + def toast_warning(message: str | Var = "", **kwargs: Any): """Display a warning toast message. Args: message: The message to display. - kwargs: Additional toast props. + **kwargs: Additional toast props. Returns: The toast event. @@ -302,12 +302,12 @@ class Toaster(Component): return Toaster.send_toast(message, level="warning", **kwargs) @staticmethod - def toast_error(message: str | Var = "", **kwargs): + def toast_error(message: str | Var = "", **kwargs: Any): """Display an error toast message. Args: message: The message to display. - kwargs: Additional toast props. + **kwargs: Additional toast props. Returns: The toast event. @@ -315,12 +315,12 @@ class Toaster(Component): return Toaster.send_toast(message, level="error", **kwargs) @staticmethod - def toast_success(message: str | Var = "", **kwargs): + def toast_success(message: str | Var = "", **kwargs: Any): """Display a success toast message. Args: message: The message to display. - kwargs: Additional toast props. + **kwargs: Additional toast props. Returns: The toast event. @@ -352,7 +352,7 @@ class Toaster(Component): return run_script(dismiss_action) @classmethod - def create(cls, *children, **props) -> Component: + def create(cls, *children: Any, **props: Any) -> Component: """Create a toaster component. Args: diff --git a/reflex/components/sonner/toast.pyi b/reflex/components/sonner/toast.pyi index 7fd9fdf54..829e959d5 100644 --- a/reflex/components/sonner/toast.pyi +++ b/reflex/components/sonner/toast.pyi @@ -51,7 +51,7 @@ class ToastProps(PropsBase, NoExtrasAllowedProps): on_dismiss: Optional[Any] on_auto_close: Optional[Any] - def dict(self, *args, **kwargs) -> dict[str, Any]: ... + def dict(self, *args: Any, **kwargs: Any) -> dict[str, Any]: ... class Toaster(Component): is_used: ClassVar[bool] = False @@ -62,13 +62,13 @@ class Toaster(Component): message: str | Var = "", level: str | None = None, **props ) -> EventSpec: ... @staticmethod - def toast_info(message: str | Var = "", **kwargs): ... + def toast_info(message: str | Var = "", **kwargs: Any): ... @staticmethod - def toast_warning(message: str | Var = "", **kwargs): ... + def toast_warning(message: str | Var = "", **kwargs: Any): ... @staticmethod - def toast_error(message: str | Var = "", **kwargs): ... + def toast_error(message: str | Var = "", **kwargs: Any): ... @staticmethod - def toast_success(message: str | Var = "", **kwargs): ... + def toast_success(message: str | Var = "", **kwargs: Any): ... @staticmethod def toast_dismiss(id: Var | str | None = None): ... @overload diff --git a/reflex/components/suneditor/editor.py b/reflex/components/suneditor/editor.py index d40f0e9ad..3edf27545 100644 --- a/reflex/components/suneditor/editor.py +++ b/reflex/components/suneditor/editor.py @@ -3,7 +3,7 @@ from __future__ import annotations import enum -from typing import Dict, List, Literal, Optional, Tuple, Union +from typing import Any, Dict, List, Literal, Optional, Tuple, Union from reflex.base import Base from reflex.components.component import Component, NoSSRComponent @@ -115,7 +115,7 @@ class Editor(NoSSRComponent): # Alternatively to a string, a dict of your language can be passed to this prop. # Please refer to the library docs for this. # options: "en" | "da" | "de" | "es" | "fr" | "ja" | "ko" | "pt_br" | - # "ru" | "zh_cn" | "ro" | "pl" | "ckb" | "lv" | "se" | "ua" | "he" | "it" + # "ru" | "zh_cn" | "ro" | "pl" | "ckb" | "lv" | "se" | "ua" | "he" | "it" # default: "en". lang: Var[ Union[ @@ -244,11 +244,13 @@ class Editor(NoSSRComponent): } @classmethod - def create(cls, set_options: Optional[EditorOptions] = None, **props) -> Component: + def create( + cls, set_options: Optional[EditorOptions] = None, **props: Any + ) -> Component: """Create an instance of Editor. No children allowed. Args: - set_options(Optional[EditorOptions]): Configuration object to further configure the instance. + set_options: Configuration object to further configure the instance. **props: Any properties to be passed to the Editor Returns: diff --git a/reflex/components/suneditor/editor.pyi b/reflex/components/suneditor/editor.pyi index b52fd43da..5577220cb 100644 --- a/reflex/components/suneditor/editor.pyi +++ b/reflex/components/suneditor/editor.pyi @@ -171,8 +171,8 @@ class Editor(NoSSRComponent): """Create an instance of Editor. No children allowed. Args: - set_options(Optional[EditorOptions]): Configuration object to further configure the instance. - lang: Language of the editor. Alternatively to a string, a dict of your language can be passed to this prop. Please refer to the library docs for this. options: "en" | "da" | "de" | "es" | "fr" | "ja" | "ko" | "pt_br" | "ru" | "zh_cn" | "ro" | "pl" | "ckb" | "lv" | "se" | "ua" | "he" | "it" default: "en". + set_options: Configuration object to further configure the instance. + lang: Language of the editor. Alternatively to a string, a dict of your language can be passed to this prop. Please refer to the library docs for this. options: "en" | "da" | "de" | "es" | "fr" | "ja" | "ko" | "pt_br" | "ru" | "zh_cn" | "ro" | "pl" | "ckb" | "lv" | "se" | "ua" | "he" | "it" default: "en". name: This is used to set the HTML form name of the editor. This means on HTML form submission, it will be submitted together with contents of the editor by the name provided. default_value: Sets the default value of the editor. This is useful if you don't want the on_change method to be called on render. If you want the on_change method to be called on render please use the set_contents prop width: Sets the width of the editor. px and percentage values are accepted, eg width="100%" or width="500px" default: 100% diff --git a/reflex/components/tags/tag.py b/reflex/components/tags/tag.py index 0587c61ed..8569d5d50 100644 --- a/reflex/components/tags/tag.py +++ b/reflex/components/tags/tag.py @@ -49,7 +49,7 @@ class Tag: """Set the tag's fields. Args: - kwargs: The fields to set. + **kwargs: The fields to set. Returns: The tag with the fields diff --git a/reflex/config.py b/reflex/config.py index a76bf987d..f6992f8b5 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -407,7 +407,7 @@ class env_var: # noqa: N801 # pyright: ignore [reportRedeclaration] self.default = default self.internal = internal - def __set_name__(self, owner, name): + def __set_name__(self, owner: Any, name: str): """Set the name of the descriptor. Args: @@ -416,7 +416,7 @@ class env_var: # noqa: N801 # pyright: ignore [reportRedeclaration] """ self.name = name - def __get__(self, instance, owner): + def __get__(self, instance: Any, owner: Any): """Get the EnvVar instance. Args: @@ -435,7 +435,7 @@ class env_var: # noqa: N801 # pyright: ignore [reportRedeclaration] if TYPE_CHECKING: - def env_var(default, internal=False) -> EnvVar: + def env_var(default: Any, internal: bool = False) -> EnvVar: """Typing helper for the env_var descriptor. Args: diff --git a/reflex/custom_components/custom_components.py b/reflex/custom_components/custom_components.py index 3bfbb1580..024e77eee 100644 --- a/reflex/custom_components/custom_components.py +++ b/reflex/custom_components/custom_components.py @@ -83,7 +83,7 @@ def _get_package_config(exit_on_fail: bool = True) -> dict: The package configuration. Raises: - Exit: If the pyproject.toml file is not found. + Exit: If the pyproject.toml file is not found and exit_on_fail is True. """ pyproject = Path(CustomComponents.PYPROJECT_TOML) try: diff --git a/reflex/event.py b/reflex/event.py index 0fc874b38..fbbfc70b2 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -1075,7 +1075,8 @@ def download( ) -def _callback_arg_spec(eval_result): +# This function seems unused. Check if we still need it. If not, remove in 0.7.0 +def _callback_arg_spec(eval_result: Any): """ArgSpec for call_script callback function. Args: @@ -1180,7 +1181,7 @@ def run_script( return call_function(ArgsFunctionOperation.create((), javascript_code), callback) -def get_event(state, event): +def get_event(state: BaseState, event: str): """Get the event from the given state. Args: @@ -1193,7 +1194,7 @@ def get_event(state, event): return f"{state.get_name()}.{event}" -def get_hydrate_event(state) -> str: +def get_hydrate_event(state: BaseState) -> str: """Get the name of the hydrate event for the state. Args: @@ -1832,13 +1833,13 @@ class EventCallback(Generic[P, T]): @overload def __get__( - self: EventCallback[P, T], instance: None, owner + self: EventCallback[P, T], instance: None, owner: Any ) -> EventCallback[P, T]: ... @overload - def __get__(self, instance, owner) -> Callable[P, T]: ... + def __get__(self, instance: Any, owner: Any) -> Callable[P, T]: ... - def __get__(self, instance, owner) -> Callable: + def __get__(self, instance: Any, owner: Any) -> Callable: """Get the function with the instance bound to it. Args: diff --git a/reflex/experimental/hooks.py b/reflex/experimental/hooks.py index e0d3b4a56..c00dd3bf9 100644 --- a/reflex/experimental/hooks.py +++ b/reflex/experimental/hooks.py @@ -11,7 +11,7 @@ def _compose_react_imports(tags: list[str]) -> dict[str, list[ImportVar]]: return {"react": [ImportVar(tag=tag) for tag in tags]} -def const(name, value) -> Var: +def const(name: str | list[str], value: str | Var) -> Var: """Create a constant Var. Args: @@ -26,7 +26,7 @@ def const(name, value) -> Var: return Var(_js_expr=f"const {name} = {value}") -def useCallback(func, deps) -> Var: # noqa: N802 +def useCallback(func: str, deps: list) -> Var: # noqa: N802 """Create a useCallback hook with a function and dependencies. Args: @@ -42,7 +42,7 @@ def useCallback(func, deps) -> Var: # noqa: N802 ) -def useContext(context) -> Var: # noqa: N802 +def useContext(context: str) -> Var: # noqa: N802 """Create a useContext hook with a context. Args: @@ -57,7 +57,7 @@ def useContext(context) -> Var: # noqa: N802 ) -def useRef(default) -> Var: # noqa: N802 +def useRef(default: str) -> Var: # noqa: N802 """Create a useRef hook with a default value. Args: @@ -72,7 +72,7 @@ def useRef(default) -> Var: # noqa: N802 ) -def useState(var_name, default=None) -> Var: # noqa: N802 +def useState(var_name: str, default: str | None = None) -> Var: # noqa: N802 """Create a useState hook with a variable name and setter name. Args: diff --git a/reflex/experimental/misc.py b/reflex/experimental/misc.py index a2a5a0615..986729881 100644 --- a/reflex/experimental/misc.py +++ b/reflex/experimental/misc.py @@ -1,16 +1,16 @@ """Miscellaneous functions for the experimental package.""" import asyncio -from typing import Any +from typing import Any, Callable -async def run_in_thread(func) -> Any: +async def run_in_thread(func: Callable) -> Any: """Run a function in a separate thread. To not block the UI event queue, run_in_thread must be inside inside a rx.event(background=True) decorated method. Args: - func (callable): The non-async function to run. + func: The non-async function to run. Raises: ValueError: If the function is an async function. diff --git a/reflex/istate/wrappers.py b/reflex/istate/wrappers.py index d4e74cf8a..865bd6c63 100644 --- a/reflex/istate/wrappers.py +++ b/reflex/istate/wrappers.py @@ -6,7 +6,7 @@ from reflex.istate.proxy import ReadOnlyStateProxy from reflex.state import _split_substate_key, _substate_key, get_state_manager -async def get_state(token, state_cls: Any | None = None) -> ReadOnlyStateProxy: +async def get_state(token: str, state_cls: Any | None = None) -> ReadOnlyStateProxy: """Get the instance of a state for a token. Args: diff --git a/reflex/model.py b/reflex/model.py index 6e44498e9..06bb87b02 100644 --- a/reflex/model.py +++ b/reflex/model.py @@ -18,6 +18,7 @@ import sqlalchemy import sqlalchemy.exc import sqlalchemy.ext.asyncio import sqlalchemy.orm +from alembic.runtime.migration import MigrationContext from reflex.base import Base from reflex.config import environment, get_config @@ -261,7 +262,7 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue super().__init_subclass__() @classmethod - def _dict_recursive(cls, value): + def _dict_recursive(cls, value: Any): """Recursively serialize the relationship object(s). Args: @@ -393,7 +394,11 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue writer = alembic.autogenerate.rewriter.Rewriter() @writer.rewrites(alembic.operations.ops.AddColumnOp) - def render_add_column_with_server_default(context, revision, op): + def render_add_column_with_server_default( + context: MigrationContext, + revision: str | None, + op: Any, + ): # Carry the sqlmodel default as server_default so that newly added # columns get the desired default value in existing rows. if op.column.default is not None and op.column.server_default is None: @@ -402,7 +407,7 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue ) return op - def run_autogenerate(rev, context): + def run_autogenerate(rev: str, context: MigrationContext): revision_context.run_autogenerate(rev, context) return [] @@ -444,7 +449,7 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue """ config, script_directory = cls._alembic_config() - def run_upgrade(rev, context): + def run_upgrade(rev: str, context: MigrationContext): return script_directory._upgrade_revs(to_rev, rev) with alembic.runtime.environment.EnvironmentContext( diff --git a/reflex/page.py b/reflex/page.py index 44ca6ab31..5f118aad1 100644 --- a/reflex/page.py +++ b/reflex/page.py @@ -3,7 +3,7 @@ from __future__ import annotations from collections import defaultdict -from typing import Any, Dict, List +from typing import Any, Callable, Dict, List from reflex.config import get_config from reflex.event import BASE_STATE, EventType @@ -42,7 +42,7 @@ def page( The decorated function. """ - def decorator(render_fn): + def decorator(render_fn: Callable): kwargs = {} if route: kwargs["route"] = route @@ -66,7 +66,7 @@ def page( return decorator -def get_decorated_pages(omit_implicit_routes=True) -> list[dict[str, Any]]: +def get_decorated_pages(omit_implicit_routes: bool = True) -> list[dict[str, Any]]: """Get the decorated pages. Args: diff --git a/reflex/reflex.py b/reflex/reflex.py index 2fb10a944..d1e565665 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -125,8 +125,8 @@ def _run( env: constants.Env = constants.Env.DEV, frontend: bool = True, backend: bool = True, - frontend_port: str = str(config.frontend_port), - backend_port: str = str(config.backend_port), + frontend_port: int = config.frontend_port, + backend_port: int = config.backend_port, backend_host: str = config.backend_host, loglevel: constants.LogLevel = config.loglevel, ): @@ -160,18 +160,22 @@ def _run( # Find the next available open port if applicable. if frontend: frontend_port = processes.handle_port( - "frontend", frontend_port, str(constants.DefaultPorts.FRONTEND_PORT) + "frontend", + frontend_port, + constants.DefaultPorts.FRONTEND_PORT, ) if backend: backend_port = processes.handle_port( - "backend", backend_port, str(constants.DefaultPorts.BACKEND_PORT) + "backend", + backend_port, + constants.DefaultPorts.BACKEND_PORT, ) # Apply the new ports to the config. - if frontend_port != str(config.frontend_port): + if frontend_port != config.frontend_port: config._set_persistent(frontend_port=frontend_port) - if backend_port != str(config.backend_port): + if backend_port != config.backend_port: config._set_persistent(backend_port=backend_port) # Reload the config to make sure the env vars are persistent. @@ -262,10 +266,10 @@ def run( help="Execute only backend.", envvar=environment.REFLEX_BACKEND_ONLY.name, ), - frontend_port: str = typer.Option( + frontend_port: int = typer.Option( config.frontend_port, help="Specify a different frontend port." ), - backend_port: str = typer.Option( + backend_port: int = typer.Option( config.backend_port, help="Specify a different backend port." ), backend_host: str = typer.Option( diff --git a/reflex/route.py b/reflex/route.py index 0b7172824..3f49f66e9 100644 --- a/reflex/route.py +++ b/reflex/route.py @@ -103,7 +103,7 @@ def catchall_prefix(route: str) -> str: return route.replace(pattern, "") if pattern else "" -def replace_brackets_with_keywords(input_string): +def replace_brackets_with_keywords(input_string: str) -> str: """Replace brackets and everything inside it in a string with a keyword. Args: diff --git a/reflex/state.py b/reflex/state.py index badc40dfd..a0b91c94f 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -31,6 +31,7 @@ from typing import ( Optional, Sequence, Set, + SupportsIndex, Tuple, Type, TypeVar, @@ -1058,7 +1059,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): setattr(cls, prop._var_field_name, prop) @classmethod - def _create_event_handler(cls, fn): + def _create_event_handler(cls, fn: Any): """Create an event handler for the given function. Args: @@ -1176,14 +1177,14 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): cls._check_overwritten_dynamic_args(list(args.keys())) - def argsingle_factory(param): - def inner_func(self) -> str: + def argsingle_factory(param: str): + def inner_func(self: BaseState) -> str: return self.router.page.params.get(param, "") return inner_func - def arglist_factory(param): - def inner_func(self) -> List[str]: + def arglist_factory(param: str): + def inner_func(self: BaseState) -> List[str]: return self.router.page.params.get(param, []) return inner_func @@ -2594,7 +2595,9 @@ class StateProxy(wrapt.ObjectProxy): """ def __init__( - self, state_instance, parent_state_proxy: Optional["StateProxy"] = None + self, + state_instance: BaseState, + parent_state_proxy: Optional["StateProxy"] = None, ): """Create a proxy for a state instance. @@ -3540,7 +3543,9 @@ class StateManagerRedis(StateManager): @validator("lock_warning_threshold") @classmethod - def validate_lock_warning_threshold(cls, lock_warning_threshold: int, values): + def validate_lock_warning_threshold( + cls, lock_warning_threshold: int, values: dict[str, int] + ): """Validate the lock warning threshold. Args: @@ -3808,10 +3813,10 @@ class MutableProxy(wrapt.ObjectProxy): def _mark_dirty( self, - wrapped=None, - instance=None, - args=(), - kwargs=None, + wrapped: Callable | None = None, + instance: BaseState | None = None, + args: tuple = (), + kwargs: dict | None = None, ) -> Any: """Mark the state as dirty, then call a wrapped function. @@ -3885,7 +3890,9 @@ class MutableProxy(wrapt.ObjectProxy): ) return value - def _wrap_recursive_decorator(self, wrapped, instance, args, kwargs) -> Any: + def _wrap_recursive_decorator( + self, wrapped: Callable, instance: BaseState, args: list, kwargs: dict + ) -> Any: """Wrap a function that returns a possibly mutable value. Intended for use with `FunctionWrapper` from the `wrapt` library. @@ -3944,7 +3951,7 @@ class MutableProxy(wrapt.ObjectProxy): return value - def __getitem__(self, key) -> Any: + def __getitem__(self, key: Any) -> Any: """Get the item on the proxied object and return a proxy if mutable. Args: @@ -3967,7 +3974,7 @@ class MutableProxy(wrapt.ObjectProxy): # Recursively wrap mutable items retrieved through this proxy. yield self._wrap_recursive(value) - def __delattr__(self, name): + def __delattr__(self, name: str): """Delete the attribute on the proxied object and mark state dirty. Args: @@ -3975,7 +3982,7 @@ class MutableProxy(wrapt.ObjectProxy): """ self._mark_dirty(super().__delattr__, args=(name,)) - def __delitem__(self, key): + def __delitem__(self, key: str): """Delete the item on the proxied object and mark state dirty. Args: @@ -3983,7 +3990,7 @@ class MutableProxy(wrapt.ObjectProxy): """ self._mark_dirty(super().__delitem__, args=(key,)) - def __setitem__(self, key, value): + def __setitem__(self, key: str, value: Any): """Set the item on the proxied object and mark state dirty. Args: @@ -3992,7 +3999,7 @@ class MutableProxy(wrapt.ObjectProxy): """ self._mark_dirty(super().__setitem__, args=(key, value)) - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: Any): """Set the attribute on the proxied object and mark state dirty. If the attribute starts with "_self_", then the state is NOT marked @@ -4016,7 +4023,7 @@ class MutableProxy(wrapt.ObjectProxy): """ return copy.copy(self.__wrapped__) - def __deepcopy__(self, memo=None) -> Any: + def __deepcopy__(self, memo: dict[int, Any] | None = None) -> Any: """Return a deepcopy of the proxy. Args: @@ -4027,7 +4034,7 @@ class MutableProxy(wrapt.ObjectProxy): """ return copy.deepcopy(self.__wrapped__, memo=memo) - def __reduce_ex__(self, protocol_version): + def __reduce_ex__(self, protocol_version: SupportsIndex): """Get the state for redis serialization. This method is called by cloudpickle to serialize the object. @@ -4091,10 +4098,10 @@ class ImmutableMutableProxy(MutableProxy): def _mark_dirty( self, - wrapped=None, - instance=None, - args=(), - kwargs=None, + wrapped: Callable | None = None, + instance: BaseState | None = None, + args: tuple = (), + kwargs: dict | None = None, ) -> Any: """Raise an exception when an attempt is made to modify the object. diff --git a/reflex/style.py b/reflex/style.py index 88513dce6..f5e424fe2 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -182,7 +182,9 @@ def convert( var_data = None # Track import/hook data from any Vars in the style dict. out = {} - def update_out_dict(return_value, keys_to_update): + def update_out_dict( + return_value: Var | dict | list | str, keys_to_update: tuple[str, ...] + ): for k in keys_to_update: out[k] = return_value diff --git a/reflex/testing.py b/reflex/testing.py index 897cb3424..25f9e7aac 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -90,7 +90,7 @@ else: class chdir(contextlib.AbstractContextManager): # noqa: N801 """Non thread-safe context manager to change the current working directory.""" - def __init__(self, path): + def __init__(self, path: str | Path): """Prepare contextmanager. Args: @@ -327,7 +327,7 @@ class AppHarness: return _shutdown_redis - def _start_backend(self, port=0): + def _start_backend(self, port: int = 0): if self.app_instance is None or self.app_instance.api is None: raise RuntimeError("App was not initialized.") self.backend = uvicorn.Server( @@ -430,7 +430,7 @@ class AppHarness: return self @staticmethod - def get_app_global_source(key, value): + def get_app_global_source(key: str, value: Any): """Get the source code of a global object. If value is a function or class we render the actual source of value otherwise we assign value to key. diff --git a/reflex/utils/build.py b/reflex/utils/build.py index 9ea941792..9e35ab984 100644 --- a/reflex/utils/build.py +++ b/reflex/utils/build.py @@ -27,7 +27,7 @@ def set_env_json(): ) -def generate_sitemap_config(deploy_url: str, export=False): +def generate_sitemap_config(deploy_url: str, export: bool = False): """Generate the sitemap config file. Args: diff --git a/reflex/utils/compat.py b/reflex/utils/compat.py index 339911063..e4fb5eb35 100644 --- a/reflex/utils/compat.py +++ b/reflex/utils/compat.py @@ -2,6 +2,7 @@ import contextlib import sys +from typing import Any async def windows_hot_reload_lifespan_hack(): @@ -74,7 +75,7 @@ with pydantic_v1_patch(): import sqlmodel as sqlmodel -def sqlmodel_field_has_primary_key(field) -> bool: +def sqlmodel_field_has_primary_key(field: Any) -> bool: """Determines if a field is a priamary. Args: diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py index 692c7d64b..be3f6ab69 100644 --- a/reflex/utils/exceptions.py +++ b/reflex/utils/exceptions.py @@ -78,7 +78,7 @@ class VarAttributeError(ReflexError, AttributeError): class UntypedComputedVarError(ReflexError, TypeError): """Custom TypeError for untyped computed var errors.""" - def __init__(self, var_name): + def __init__(self, var_name: str): """Initialize the UntypedComputedVarError. Args: @@ -90,7 +90,7 @@ class UntypedComputedVarError(ReflexError, TypeError): class MissingAnnotationError(ReflexError, TypeError): """Custom TypeError for missing annotations.""" - def __init__(self, var_name): + def __init__(self, var_name: str): """Initialize the MissingAnnotationError. Args: diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 22322634d..479ff816a 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -71,7 +71,9 @@ def notify_backend(): # run_process_and_launch_url is assumed to be used # only to launch the frontend # If this is not the case, might have to change the logic -def run_process_and_launch_url(run_command: list[str | None], backend_present=True): +def run_process_and_launch_url( + run_command: list[str | None], backend_present: bool = True +): """Run the process and launch the URL. Args: @@ -134,7 +136,7 @@ def run_process_and_launch_url(run_command: list[str | None], backend_present=Tr break # while True -def run_frontend(root: Path, port: str, backend_present=True): +def run_frontend(root: Path, port: str, backend_present: bool = True): """Run the frontend. Args: @@ -156,7 +158,7 @@ def run_frontend(root: Path, port: str, backend_present=True): ) -def run_frontend_prod(root: Path, port: str, backend_present=True): +def run_frontend_prod(root: Path, port: str, backend_present: bool = True): """Run the frontend. Args: @@ -265,7 +267,7 @@ def get_reload_dirs() -> list[Path]: return reload_dirs -def run_uvicorn_backend(host, port, loglevel: LogLevel): +def run_uvicorn_backend(host: str, port: int, loglevel: LogLevel): """Run the backend in development mode using Uvicorn. Args: @@ -285,7 +287,7 @@ def run_uvicorn_backend(host, port, loglevel: LogLevel): ) -def run_granian_backend(host, port, loglevel: LogLevel): +def run_granian_backend(host: str, port: int, loglevel: LogLevel): """Run the backend in development mode using Granian. Args: @@ -352,7 +354,7 @@ def run_backend_prod( run_uvicorn_backend_prod(host, port, loglevel) -def run_uvicorn_backend_prod(host, port, loglevel): +def run_uvicorn_backend_prod(host: str, port: int, loglevel: LogLevel): """Run the backend in production mode using Uvicorn. Args: @@ -404,7 +406,7 @@ def run_uvicorn_backend_prod(host, port, loglevel): ) -def run_granian_backend_prod(host, port, loglevel): +def run_granian_backend_prod(host: str, port: int, loglevel: LogLevel): """Run the backend in production mode using Granian. Args: diff --git a/reflex/utils/format.py b/reflex/utils/format.py index 7973549b0..6f05e0982 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -220,7 +220,7 @@ def _escape_js_string(string: str) -> str: """ # TODO: we may need to re-vist this logic after new Var API is implemented. - def escape_outside_segments(segment): + def escape_outside_segments(segment: str): """Escape backticks in segments outside of `${}`. Args: @@ -283,7 +283,7 @@ def format_var(var: Var) -> str: return str(var) -def format_route(route: str, format_case=True) -> str: +def format_route(route: str, format_case: bool = True) -> str: """Format the given route. Args: diff --git a/reflex/utils/lazy_loader.py b/reflex/utils/lazy_loader.py index 61e3967e5..eba89532d 100644 --- a/reflex/utils/lazy_loader.py +++ b/reflex/utils/lazy_loader.py @@ -1,11 +1,17 @@ """Module to implement lazy loading in reflex.""" +from __future__ import annotations + import copy import lazy_loader as lazy -def attach(package_name, submodules=None, submod_attrs=None): +def attach( + package_name: str, + submodules: set | None = None, + submod_attrs: dict | None = None, +): """Replaces a package's __getattr__, __dir__, and __all__ attributes using lazy.attach. The lazy loader __getattr__ doesn't support tuples as list values. We needed to add this functionality (tuples) in Reflex to support 'import as _' statements. This function diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index edaa77aba..8330a315c 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -884,7 +884,9 @@ def init_reflex_json(project_hash: int | None): path_ops.update_json_file(get_web_dir() / constants.Reflex.JSON, reflex_json) -def update_next_config(export=False, transpile_packages: Optional[List[str]] = None): +def update_next_config( + export: bool = False, transpile_packages: Optional[List[str]] = None +): """Update Next.js config from Reflex config. Args: @@ -1128,7 +1130,7 @@ def cached_procedure(cache_file: str, payload_fn: Callable[..., str]): The decorated function. """ - def _inner_decorator(func): + def _inner_decorator(func: Callable): def _inner(*args, **kwargs): payload = _read_cached_procedure_file(cache_file) new_payload = payload_fn(*args, **kwargs) @@ -1310,7 +1312,7 @@ def validate_bun(): raise typer.Exit(1) -def validate_frontend_dependencies(init=True): +def validate_frontend_dependencies(init: bool = True): """Validate frontend dependencies to ensure they meet requirements. Args: @@ -1634,7 +1636,9 @@ def initialize_default_app(app_name: str): initialize_app_directory(app_name) -def validate_and_create_app_using_remote_template(app_name, template, templates): +def validate_and_create_app_using_remote_template( + app_name: str, template: str, templates: dict[str, Template] +): """Validate and create an app using a remote template. Args: @@ -1846,7 +1850,7 @@ def initialize_main_module_index_from_generation(app_name: str, generation_hash: ) render_func_name = defined_funcs[-1] - def replace_content(_match): + def replace_content(_match: re.Match) -> str: return "\n".join( [ resp.text, @@ -1876,7 +1880,7 @@ def initialize_main_module_index_from_generation(app_name: str, generation_hash: main_module_path.write_text(main_module_code) -def format_address_width(address_width) -> int | None: +def format_address_width(address_width: str | None) -> int | None: """Cast address width to an int. Args: diff --git a/reflex/utils/processes.py b/reflex/utils/processes.py index 94e0fda3e..c92fb7d1a 100644 --- a/reflex/utils/processes.py +++ b/reflex/utils/processes.py @@ -9,18 +9,20 @@ import os import signal import subprocess from concurrent import futures +from pathlib import Path from typing import Callable, Generator, List, Optional, Tuple, Union import psutil import typer from redis.exceptions import RedisError +from rich.progress import Progress from reflex import constants from reflex.config import environment from reflex.utils import console, path_ops, prerequisites -def kill(pid): +def kill(pid: int): """Kill a process. Args: @@ -48,7 +50,7 @@ def get_num_workers() -> int: return (os.cpu_count() or 1) * 2 + 1 -def get_process_on_port(port) -> Optional[psutil.Process]: +def get_process_on_port(port: int) -> Optional[psutil.Process]: """Get the process on the given port. Args: @@ -71,7 +73,7 @@ def get_process_on_port(port) -> Optional[psutil.Process]: return None -def is_process_on_port(port) -> bool: +def is_process_on_port(port: int) -> bool: """Check if a process is running on the given port. Args: @@ -83,7 +85,7 @@ def is_process_on_port(port) -> bool: return get_process_on_port(port) is not None -def kill_process_on_port(port): +def kill_process_on_port(port: int): """Kill the process on the given port. Args: @@ -94,7 +96,7 @@ def kill_process_on_port(port): get_process_on_port(port).kill() # pyright: ignore [reportOptionalMemberAccess] -def change_port(port: str, _type: str) -> str: +def change_port(port: int, _type: str) -> int: """Change the port. Args: @@ -105,7 +107,7 @@ def change_port(port: str, _type: str) -> str: The new port. """ - new_port = str(int(port) + 1) + new_port = port + 1 if is_process_on_port(new_port): return change_port(new_port, _type) console.info( @@ -114,7 +116,7 @@ def change_port(port: str, _type: str) -> str: return new_port -def handle_port(service_name: str, port: str, default_port: str) -> str: +def handle_port(service_name: str, port: int, default_port: int) -> int: """Change port if the specified port is in use and is not explicitly specified as a CLI arg or config arg. otherwise tell the user the port is in use and exit the app. @@ -133,7 +135,7 @@ def handle_port(service_name: str, port: str, default_port: str) -> str: Exit:when the port is in use. """ if is_process_on_port(port): - if int(port) == int(default_port): + if port == int(default_port): return change_port(port, service_name) else: console.error(f"{service_name.capitalize()} port: {port} is already in use") @@ -141,7 +143,12 @@ def handle_port(service_name: str, port: str, default_port: str) -> str: return port -def new_process(args, run: bool = False, show_logs: bool = False, **kwargs): +def new_process( + args: str | list[str] | list[str | None] | list[str | Path | None], + run: bool = False, + show_logs: bool = False, + **kwargs, +): """Wrapper over subprocess.Popen to unify the launch of child processes. Args: @@ -157,7 +164,7 @@ def new_process(args, run: bool = False, show_logs: bool = False, **kwargs): Exit: When attempting to run a command with a None value. """ # Check for invalid command first. - if None in args: + if isinstance(args, list) and None in args: console.error(f"Invalid command: {args}") raise typer.Exit(1) @@ -191,7 +198,7 @@ def new_process(args, run: bool = False, show_logs: bool = False, **kwargs): } console.debug(f"Running command: {args}") fn = subprocess.run if run else subprocess.Popen - return fn(args, **kwargs) + return fn(args, **kwargs) # pyright: ignore [reportCallIssue, reportArgumentType] @contextlib.contextmanager @@ -247,7 +254,7 @@ def run_concurrently(*fns: Union[Callable, Tuple]) -> None: def stream_logs( message: str, process: subprocess.Popen, - progress=None, + progress: Progress | None = None, suppress_errors: bool = False, analytics_enabled: bool = False, ): @@ -375,10 +382,10 @@ def get_command_with_loglevel(command: list[str]) -> list[str]: def run_process_with_fallback( - args, + args: list[str], *, - show_status_message, - fallback=None, + show_status_message: str, + fallback: str | list | None = None, analytics_enabled: bool = False, **kwargs, ): @@ -417,7 +424,7 @@ def run_process_with_fallback( ) -def execute_command_and_return_output(command) -> str | None: +def execute_command_and_return_output(command: str) -> str | None: """Execute a command and return the output. Args: diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index 5a8cad18e..bd10e1c1c 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -83,7 +83,7 @@ DEFAULT_IMPORTS = { } -def _walk_files(path): +def _walk_files(path: str | Path): """Walk all files in a path. This can be replaced with Path.walk() in python3.12. @@ -114,7 +114,9 @@ def _relative_to_pwd(path: Path) -> Path: return path -def _get_type_hint(value, type_hint_globals, is_optional=True) -> str: +def _get_type_hint( + value: Any, type_hint_globals: dict, is_optional: bool = True +) -> str: """Resolve the type hint for value. Args: @@ -383,7 +385,7 @@ def _extract_class_props_as_ast_nodes( return kwargs -def type_to_ast(typ, cls: type) -> ast.AST: +def type_to_ast(typ: Any, cls: type) -> ast.AST: """Converts any type annotation into its AST representation. Handles nested generic types, unions, etc. @@ -443,7 +445,7 @@ def type_to_ast(typ, cls: type) -> ast.AST: ) -def _get_parent_imports(func): +def _get_parent_imports(func: Callable): _imports = {"reflex.vars": ["Var"]} for type_hint in inspect.get_annotations(func).values(): try: @@ -1052,7 +1054,7 @@ class PyiGenerator: pyi_path.write_text(pyi_content) logger.info(f"Wrote {relpath}") - def _get_init_lazy_imports(self, mod, new_tree): + def _get_init_lazy_imports(self, mod: tuple | ModuleType, new_tree: ast.AST): # retrieve the _SUBMODULES and _SUBMOD_ATTRS from an init file if present. sub_mods = getattr(mod, "_SUBMODULES", None) sub_mod_attrs = getattr(mod, "_SUBMOD_ATTRS", None) @@ -1138,7 +1140,7 @@ class PyiGenerator: if pyi_path: self.written_files.append(pyi_path) - def scan_all(self, targets, changed_files: list[Path] | None = None): + def scan_all(self, targets: list, changed_files: list[Path] | None = None): """Scan all targets for class inheriting Component and generate the .pyi files. Args: diff --git a/reflex/utils/registry.py b/reflex/utils/registry.py index d98178c61..47727d659 100644 --- a/reflex/utils/registry.py +++ b/reflex/utils/registry.py @@ -22,15 +22,15 @@ def latency(registry: str) -> int: return 10_000_000 -def average_latency(registry, attempts: int = 3) -> int: +def average_latency(registry: str, attempts: int = 3) -> int: """Get the average latency of a registry. Args: - registry (str): The URL of the registry. - attempts (int): The number of attempts to make. Defaults to 10. + registry: The URL of the registry. + attempts: The number of attempts to make. Defaults to 10. Returns: - int: The average latency of the registry in microseconds. + The average latency of the registry in microseconds. """ return sum(latency(registry) for _ in range(attempts)) // attempts diff --git a/reflex/utils/telemetry.py b/reflex/utils/telemetry.py index 67ec45b82..ecfd52428 100644 --- a/reflex/utils/telemetry.py +++ b/reflex/utils/telemetry.py @@ -162,7 +162,7 @@ def _send_event(event_data: dict) -> bool: return True -def _send(event, telemetry_enabled, **kwargs): +def _send(event: str, telemetry_enabled: bool | None, **kwargs): from reflex.config import get_config # Get the telemetry_enabled from the config if it is not specified. @@ -189,7 +189,7 @@ def send(event: str, telemetry_enabled: bool | None = None, **kwargs): kwargs: Additional data to send with the event. """ - async def async_send(event, telemetry_enabled, **kwargs): + async def async_send(event: str, telemetry_enabled: bool | None, **kwargs): return _send(event, telemetry_enabled, **kwargs) try: diff --git a/reflex/utils/types.py b/reflex/utils/types.py index 6257b1472..58fec8f3b 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -157,7 +157,7 @@ class Unset: @lru_cache() -def get_origin(tp): +def get_origin(tp: Any): """Get the origin of a class. Args: @@ -240,7 +240,7 @@ def is_literal(cls: GenericType) -> bool: return get_origin(cls) is Literal -def has_args(cls) -> bool: +def has_args(cls: Type) -> bool: """Check if the class has generic parameters. Args: @@ -753,7 +753,7 @@ def check_prop_in_allowed_types(prop: Any, allowed_types: Iterable) -> bool: return type_ in allowed_types -def is_encoded_fstring(value) -> bool: +def is_encoded_fstring(value: Any) -> bool: """Check if a value is an encoded Var f-string. Args: @@ -796,7 +796,7 @@ def validate_literal(key: str, value: Any, expected_type: Type, comp_name: str): ) -def validate_parameter_literals(func): +def validate_parameter_literals(func: Callable): """Decorator to check that the arguments passed to a function correspond to the correct function parameter if it (the parameter) is a literal type. diff --git a/reflex/vars/base.py b/reflex/vars/base.py index ac48355c4..4ca53eeb1 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -493,20 +493,30 @@ class Var(Generic[VAR_TYPE]): @overload def _replace( - self, _var_type: Type[OTHER_VAR_TYPE], merge_var_data=None, **kwargs: Any + self, + _var_type: Type[OTHER_VAR_TYPE], + merge_var_data: VarData | None = None, + **kwargs: Any, ) -> Var[OTHER_VAR_TYPE]: ... @overload def _replace( - self, _var_type: GenericType | None = None, merge_var_data=None, **kwargs: Any + self, + _var_type: GenericType | None = None, + merge_var_data: VarData | None = None, + **kwargs: Any, ) -> Self: ... def _replace( - self, _var_type: GenericType | None = None, merge_var_data=None, **kwargs: Any + self, + _var_type: GenericType | None = None, + merge_var_data: VarData | None = None, + **kwargs: Any, ) -> Self | Var: """Make a copy of this Var with updated fields. Args: + _var_type: The new type of the Var. merge_var_data: VarData to merge into the existing VarData. **kwargs: Var fields to update. @@ -1308,7 +1318,7 @@ class LiteralVar(Var): _var_literal_subclasses.append((cls, var_subclass)) @classmethod - def create( + def create( # pyright: ignore [reportArgumentType] cls, value: Any, _var_data: VarData | None = None, @@ -1556,7 +1566,7 @@ def figure_out_type(value: Any) -> types.GenericType: class cached_property_no_lock(functools.cached_property): # noqa: N801 """A special version of functools.cached_property that does not use a lock.""" - def __init__(self, func): + def __init__(self, func: Callable): """Initialize the cached_property_no_lock. Args: @@ -1729,7 +1739,7 @@ class CallableVar(Var): object.__setattr__(self, "fn", fn) object.__setattr__(self, "original_var", original_var) - def __call__(self, *args, **kwargs) -> Var: + def __call__(self, *args: Any, **kwargs: Any) -> Var: """Call the decorated function. Args: @@ -1885,10 +1895,16 @@ class ComputedVar(Var[RETURN_TYPE]): object.__setattr__(self, "_fget", fget) @override - def _replace(self, merge_var_data=None, **kwargs: Any) -> Self: + def _replace( + self, + _var_type: Any = None, + merge_var_data: VarData | None = None, + **kwargs: Any, + ) -> Self: """Replace the attributes of the ComputedVar. Args: + _var_type: ignored in ComputedVar. merge_var_data: VarData to merge into the existing VarData. **kwargs: Var fields to update. @@ -2002,7 +2018,7 @@ class ComputedVar(Var[RETURN_TYPE]): @overload def __get__(self, instance: BaseState, owner: Type) -> RETURN_TYPE: ... - def __get__(self, instance: BaseState | None, owner): + def __get__(self, instance: BaseState | None, owner: Type): """Get the ComputedVar value. If the value is already cached on the instance, return the cached value. @@ -2165,7 +2181,7 @@ class ComputedVar(Var[RETURN_TYPE]): self_is_top_of_stack = False return d - def mark_dirty(self, instance) -> None: + def mark_dirty(self, instance: BaseState) -> None: """Mark this ComputedVar as dirty. Args: @@ -2887,7 +2903,7 @@ MAPPING_TYPE = TypeVar("MAPPING_TYPE", bound=Mapping) class Field(Generic[FIELD_TYPE]): """Shadow class for Var to allow for type hinting in the IDE.""" - def __set__(self, instance, value: FIELD_TYPE): + def __set__(self, instance: Any, value: FIELD_TYPE): """Set the Var. Args: @@ -2896,43 +2912,43 @@ class Field(Generic[FIELD_TYPE]): """ @overload - def __get__(self: Field[bool], instance: None, owner) -> BooleanVar: ... + def __get__(self: Field[bool], instance: None, owner: Any) -> BooleanVar: ... @overload def __get__( - self: Field[int] | Field[float] | Field[int | float], instance: None, owner + self: Field[int] | Field[float] | Field[int | float], instance: None, owner: Any ) -> NumberVar: ... @overload - def __get__(self: Field[str], instance: None, owner) -> StringVar: ... + def __get__(self: Field[str], instance: None, owner: Any) -> StringVar: ... @overload - def __get__(self: Field[None], instance: None, owner) -> NoneVar: ... + def __get__(self: Field[None], instance: None, owner: Any) -> NoneVar: ... @overload def __get__( self: Field[List[V]] | Field[Set[V]] | Field[Tuple[V, ...]], instance: None, - owner, + owner: Any, ) -> ArrayVar[List[V]]: ... @overload def __get__( - self: Field[MAPPING_TYPE], instance: None, owner + self: Field[MAPPING_TYPE], instance: None, owner: Any ) -> ObjectVar[MAPPING_TYPE]: ... @overload def __get__( - self: Field[BASE_TYPE], instance: None, owner + self: Field[BASE_TYPE], instance: None, owner: Any ) -> ObjectVar[BASE_TYPE]: ... @overload - def __get__(self, instance: None, owner) -> Var[FIELD_TYPE]: ... + def __get__(self, instance: None, owner: Any) -> Var[FIELD_TYPE]: ... @overload - def __get__(self, instance, owner) -> FIELD_TYPE: ... + def __get__(self, instance: Any, owner: Any) -> FIELD_TYPE: ... - def __get__(self, instance, owner): # pyright: ignore [reportInconsistentOverload] + def __get__(self, instance: Any, owner: Any): # pyright: ignore [reportInconsistentOverload] """Get the Var. Args: diff --git a/reflex/vars/function.py b/reflex/vars/function.py index a82c4964b..e8691cfb1 100644 --- a/reflex/vars/function.py +++ b/reflex/vars/function.py @@ -210,6 +210,7 @@ class FunctionStringVar(FunctionVar[CALLABLE_TYPE]): Args: func: The function to call. + _var_type: The type of the Var. _var_data: Additional hooks and imports associated with the Var. Returns: @@ -268,6 +269,7 @@ class VarOperationCall(Generic[P, R], CachedVarOperation, Var[R]): Args: func: The function to call. *args: The arguments to call the function with. + _var_type: The type of the Var. _var_data: Additional hooks and imports associated with the Var. Returns: @@ -385,6 +387,7 @@ class ArgsFunctionOperation(CachedVarOperation, FunctionVar): return_expr: The return expression of the function. rest: The name of the rest argument. explicit_return: Whether to use explicit return syntax. + _var_type: The type of the Var. _var_data: Additional hooks and imports associated with the Var. Returns: @@ -441,6 +444,7 @@ class ArgsFunctionOperationBuilder(CachedVarOperation, BuilderFunctionVar): return_expr: The return expression of the function. rest: The name of the rest argument. explicit_return: Whether to use explicit return syntax. + _var_type: The type of the Var. _var_data: Additional hooks and imports associated with the Var. Returns: diff --git a/reflex/vars/object.py b/reflex/vars/object.py index fa8cdf8ec..ed4221e4c 100644 --- a/reflex/vars/object.py +++ b/reflex/vars/object.py @@ -253,7 +253,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): name: str, ) -> ObjectItemOperation: ... - def __getattr__(self, name) -> Var: + def __getattr__(self, name: str) -> Var: """Get an attribute of the var. Args: diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index fa1ab5bf3..5e9f6468e 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -780,7 +780,7 @@ class ConcatVarOperation(CachedVarOperation, StringVar[str]): """Create a var from a string value. Args: - value: The values to concatenate. + *value: The values to concatenate. _var_data: Additional hooks and imports associated with the Var. Returns: @@ -1323,6 +1323,7 @@ class LiteralArrayVar(CachedVarOperation, LiteralVar, ArrayVar[ARRAY_VAR_TYPE]): Args: value: The value to create the var from. + _var_type: The type of the var. _var_data: Additional hooks and imports associated with the Var. Returns: @@ -1618,7 +1619,9 @@ def array_contains_field_operation( @var_operation -def array_contains_operation(haystack: ArrayVar, needle: Any | Var): +def array_contains_operation( + haystack: ArrayVar, needle: Any | Var +) -> CustomVarOperationReturn[bool]: """Check if an array contains an element. Args: @@ -1661,7 +1664,7 @@ if TYPE_CHECKING: def map_array_operation( array: ArrayVar[ARRAY_VAR_TYPE], function: FunctionVar, -): +) -> CustomVarOperationReturn[List[Any]]: """Map a function over an array. Args: diff --git a/scripts/wait_for_listening_port.py b/scripts/wait_for_listening_port.py index 43581f0bc..4befa00bd 100644 --- a/scripts/wait_for_listening_port.py +++ b/scripts/wait_for_listening_port.py @@ -14,7 +14,7 @@ from typing import Tuple import psutil -def _pid_exists(pid): +def _pid_exists(pid: int): # os.kill(pid, 0) doesn't work on Windows (actually kills the PID) # psutil.pid_exists() doesn't work on Windows (does os.kill underneath) # psutil.pids() seems to return the right thing. Inefficient but doesn't matter - keeps things simple. @@ -23,7 +23,7 @@ def _pid_exists(pid): return pid in psutil.pids() -def _wait_for_port(port, server_pid, timeout) -> Tuple[bool, str]: +def _wait_for_port(port: int, server_pid: int, timeout: float) -> Tuple[bool, str]: start = time.time() print(f"Waiting for up to {timeout} seconds for port {port} to start listening.") # noqa: T201 while True: From 96ead076067d175ea8cca12b9edce764e11fad7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 29 Jan 2025 07:53:40 +0100 Subject: [PATCH 054/144] fix padding style in textarea (#4696) --- .../components/radix/themes/components/text_area.py | 12 ++++++++++++ .../components/radix/themes/components/text_area.pyi | 2 ++ 2 files changed, 14 insertions(+) diff --git a/reflex/components/radix/themes/components/text_area.py b/reflex/components/radix/themes/components/text_area.py index 83fa8a593..caf98eb2d 100644 --- a/reflex/components/radix/themes/components/text_area.py +++ b/reflex/components/radix/themes/components/text_area.py @@ -96,5 +96,17 @@ class TextArea(RadixThemesComponent, elements.Textarea): return DebounceInput.create(super().create(*children, **props)) return super().create(*children, **props) + def add_style(self): + """Add the style to the component. + + Returns: + The style of the component. + """ + added_style: dict[str, dict] = {} + added_style.setdefault("& textarea", {}) + if "padding" in self.style: + added_style["& textarea"]["padding"] = self.style.pop("padding") + return added_style + text_area = TextArea.create diff --git a/reflex/components/radix/themes/components/text_area.pyi b/reflex/components/radix/themes/components/text_area.pyi index f0903ba98..e1e40c936 100644 --- a/reflex/components/radix/themes/components/text_area.pyi +++ b/reflex/components/radix/themes/components/text_area.pyi @@ -268,4 +268,6 @@ class TextArea(RadixThemesComponent, elements.Textarea): """ ... + def add_style(self): ... + text_area = TextArea.create From 58f87a6aa7057bbaec9ead8aff4216c19a625f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 29 Jan 2025 07:54:23 +0100 Subject: [PATCH 055/144] only allow item inside root (#4697) --- reflex/components/radix/themes/components/radio_cards.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reflex/components/radix/themes/components/radio_cards.py b/reflex/components/radix/themes/components/radio_cards.py index e075a1ba2..4a9aefc99 100644 --- a/reflex/components/radix/themes/components/radio_cards.py +++ b/reflex/components/radix/themes/components/radio_cards.py @@ -85,6 +85,8 @@ class RadioCardsItem(RadixThemesComponent): # When true, indicates that the user must check the radio item before the owning form can be submitted. required: Var[bool] + _valid_parents: list[str] = ["RadioCardsRoot"] + class RadioCards(SimpleNamespace): """RadioCards components namespace.""" From 5beea25b3171256c72b964e9200be542850b5b19 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 28 Jan 2025 22:56:38 -0800 Subject: [PATCH 056/144] improve var create typing (#4701) --- .../components/radix/primitives/accordion.py | 3 +- .../components/radix/primitives/accordion.pyi | 4 +- reflex/vars/base.py | 53 ++++++++++++++++++- reflex/vars/number.py | 2 +- 4 files changed, 57 insertions(+), 5 deletions(-) diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 170b3ed9c..2d9c7ae96 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -196,8 +196,9 @@ class AccordionItem(AccordionComponent): # The header of the accordion item. header: Var[Union[Component, str]] + # The content of the accordion item. - content: Var[Union[Component, str]] = Var.create(None) + content: Var[Union[Component, str, None]] = Var.create(None) _valid_children: List[str] = [ "AccordionHeader", diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 03208f496..447451d11 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -308,7 +308,9 @@ class AccordionItem(AccordionComponent): value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, header: Optional[Union[Component, Var[Union[Component, str]], str]] = None, - content: Optional[Union[Component, Var[Union[Component, str]], str]] = None, + content: Optional[ + Union[Component, Var[Optional[Union[Component, str]]], str] + ] = None, color_scheme: Optional[ Union[ Literal[ diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 4ca53eeb1..6f4eddf42 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -80,6 +80,7 @@ if TYPE_CHECKING: VAR_TYPE = TypeVar("VAR_TYPE", covariant=True) OTHER_VAR_TYPE = TypeVar("OTHER_VAR_TYPE") +STRING_T = TypeVar("STRING_T", bound=str) warnings.filterwarnings("ignore", message="fields may not start with an underscore") @@ -550,12 +551,60 @@ class Var(Generic[VAR_TYPE]): return value_with_replaced + @overload + @classmethod + def create( # type: ignore[override] + cls, + value: bool, + _var_data: VarData | None = None, + ) -> BooleanVar: ... + + @overload + @classmethod + def create( # type: ignore[override] + cls, + value: int, + _var_data: VarData | None = None, + ) -> NumberVar[int]: ... + + @overload @classmethod def create( cls, - value: Any, + value: float, _var_data: VarData | None = None, - ) -> Var: + ) -> NumberVar[float]: ... + + @overload + @classmethod + def create( + cls, + value: STRING_T, + _var_data: VarData | None = None, + ) -> StringVar[STRING_T]: ... + + @overload + @classmethod + def create( + cls, + value: None, + _var_data: VarData | None = None, + ) -> NoneVar: ... + + @overload + @classmethod + def create( + cls, + value: OTHER_VAR_TYPE, + _var_data: VarData | None = None, + ) -> Var[OTHER_VAR_TYPE]: ... + + @classmethod + def create( + cls, + value: OTHER_VAR_TYPE, + _var_data: VarData | None = None, + ) -> Var[OTHER_VAR_TYPE]: """Create a var from a value. Args: diff --git a/reflex/vars/number.py b/reflex/vars/number.py index 475c08b55..050dc2329 100644 --- a/reflex/vars/number.py +++ b/reflex/vars/number.py @@ -31,7 +31,7 @@ from .base import ( var_operation_return, ) -NUMBER_T = TypeVar("NUMBER_T", int, float, Union[int, float], bool) +NUMBER_T = TypeVar("NUMBER_T", int, float, bool) if TYPE_CHECKING: from .sequence import ArrayVar From 58e63f387fe255ae888edc0637501993b8feb663 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 28 Jan 2025 23:02:14 -0800 Subject: [PATCH 057/144] assert that .render returns jsonable values (#4708) * assert that .render returns jsonable values * render component default --- .../.templates/jinja/web/pages/utils.js.jinja2 | 2 +- reflex/components/tags/tag.py | 17 +++++++++++++++++ tests/units/components/core/test_match.py | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/reflex/.templates/jinja/web/pages/utils.js.jinja2 b/reflex/.templates/jinja/web/pages/utils.js.jinja2 index 624e3bee8..567ca6e60 100644 --- a/reflex/.templates/jinja/web/pages/utils.js.jinja2 +++ b/reflex/.templates/jinja/web/pages/utils.js.jinja2 @@ -90,7 +90,7 @@ break; {% endfor %} default: - return {{ component.default }}; + return {{ render(component.default) }}; break; } })() diff --git a/reflex/components/tags/tag.py b/reflex/components/tags/tag.py index 8569d5d50..8a6326dc0 100644 --- a/reflex/components/tags/tag.py +++ b/reflex/components/tags/tag.py @@ -65,7 +65,24 @@ class Tag: Yields: Tuple[str, Any]: The field name and value. """ + from reflex.components.component import BaseComponent + for field in dataclasses.fields(self): + value = getattr(self, field.name) + if isinstance(value, list): + children = [] + for child in value: + if isinstance(child, BaseComponent): + children.append(child.render()) + else: + children.append(child) + yield field.name, children + continue + if isinstance(value, BaseComponent): + yield field.name, value.render() + continue + if callable(value) and not isinstance(value, Var): + continue yield field.name, getattr(self, field.name) def add_props(self, **kwargs: Optional[Any]) -> Tag: diff --git a/tests/units/components/core/test_match.py b/tests/units/components/core/test_match.py index e563873ec..b765750ee 100644 --- a/tests/units/components/core/test_match.py +++ b/tests/units/components/core/test_match.py @@ -78,7 +78,7 @@ def test_match_components(): assert fifth_return_value_render["name"] == "RadixThemesText" assert fifth_return_value_render["children"][0]["contents"] == '{"sixth value"}' - default = match_child["default"].render() + default = match_child["default"] assert default["name"] == "RadixThemesText" assert default["children"][0]["contents"] == '{"default value"}' @@ -153,7 +153,7 @@ def test_match_on_component_without_default(): match_comp = Match.create(MatchState.value, *match_case_tuples) default = match_comp.render()["children"][0]["default"] - assert isinstance(default, Fragment) + assert isinstance(default, dict) and default["name"] == Fragment.__name__ def test_match_on_var_no_default(): From 1e8e82ec0e0fa121426d3198c000c461a872d905 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 28 Jan 2025 23:03:22 -0800 Subject: [PATCH 058/144] allow functools partial with foreach (#4709) --- reflex/components/core/foreach.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/reflex/components/core/foreach.py b/reflex/components/core/foreach.py index c9fbe5bc5..30dda9c6a 100644 --- a/reflex/components/core/foreach.py +++ b/reflex/components/core/foreach.py @@ -2,6 +2,7 @@ from __future__ import annotations +import functools import inspect from typing import Any, Callable, Iterable @@ -97,9 +98,20 @@ class Foreach(Component): # Determine the index var name based on the params accepted by render_fn. props["index_var_name"] = params[1].name else: + render_fn = self.render_fn # Otherwise, use a deterministic index, based on the render function bytecode. code_hash = ( - hash(self.render_fn.__code__) + hash( + getattr( + render_fn, + "__code__", + ( + repr(self.render_fn) + if not isinstance(render_fn, functools.partial) + else render_fn.func.__code__ + ), + ) + ) .to_bytes( length=8, byteorder="big", From 2c3257d4ea1bae113a0b2338e2b7763189287206 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 29 Jan 2025 12:16:54 -0800 Subject: [PATCH 059/144] fix tag render to be recursive (#4714) --- .../jinja/web/pages/utils.js.jinja2 | 2 +- reflex/components/component.py | 4 +- reflex/components/tags/tag.py | 43 +++++++++++-------- tests/units/components/core/test_match.py | 12 +++--- 4 files changed, 33 insertions(+), 28 deletions(-) diff --git a/reflex/.templates/jinja/web/pages/utils.js.jinja2 b/reflex/.templates/jinja/web/pages/utils.js.jinja2 index 567ca6e60..08aeb0d38 100644 --- a/reflex/.templates/jinja/web/pages/utils.js.jinja2 +++ b/reflex/.templates/jinja/web/pages/utils.js.jinja2 @@ -86,7 +86,7 @@ {% for condition in case[:-1] %} case JSON.stringify({{ condition._js_expr }}): {% endfor %} - return {{ case[-1] }}; + return {{ render(case[-1]) }}; break; {% endfor %} default: diff --git a/reflex/components/component.py b/reflex/components/component.py index 3f1b88fea..810104d47 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -2389,7 +2389,7 @@ def render_dict_to_var(tag: dict | Component | str, imported_names: set[str]) -> if tag["name"] == "match": element = tag["cond"] - conditionals = tag["default"] + conditionals = render_dict_to_var(tag["default"], imported_names) for case in tag["match_cases"][::-1]: condition = case[0].to_string() == element.to_string() @@ -2398,7 +2398,7 @@ def render_dict_to_var(tag: dict | Component | str, imported_names: set[str]) -> conditionals = ternary_operation( condition, - case[-1], + render_dict_to_var(case[-1], imported_names), conditionals, ) diff --git a/reflex/components/tags/tag.py b/reflex/components/tags/tag.py index 8a6326dc0..983726e56 100644 --- a/reflex/components/tags/tag.py +++ b/reflex/components/tags/tag.py @@ -3,13 +3,33 @@ from __future__ import annotations import dataclasses -from typing import Any, Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Sequence, Union from reflex.event import EventChain from reflex.utils import format, types from reflex.vars.base import LiteralVar, Var +def render_prop(value: Any) -> Any: + """Render the prop. + + Args: + value: The value to render. + + Returns: + The rendered value. + """ + from reflex.components.component import BaseComponent + + if isinstance(value, BaseComponent): + return value.render() + if isinstance(value, Sequence) and not isinstance(value, str): + return [render_prop(v) for v in value] + if callable(value) and not isinstance(value, Var): + return None + return value + + @dataclasses.dataclass() class Tag: """A React tag.""" @@ -65,25 +85,10 @@ class Tag: Yields: Tuple[str, Any]: The field name and value. """ - from reflex.components.component import BaseComponent - for field in dataclasses.fields(self): - value = getattr(self, field.name) - if isinstance(value, list): - children = [] - for child in value: - if isinstance(child, BaseComponent): - children.append(child.render()) - else: - children.append(child) - yield field.name, children - continue - if isinstance(value, BaseComponent): - yield field.name, value.render() - continue - if callable(value) and not isinstance(value, Var): - continue - yield field.name, getattr(self, field.name) + rendered_value = render_prop(getattr(self, field.name)) + if rendered_value is not None: + yield field.name, rendered_value def add_props(self, **kwargs: Optional[Any]) -> Tag: """Add props to the tag. diff --git a/tests/units/components/core/test_match.py b/tests/units/components/core/test_match.py index b765750ee..47652cd43 100644 --- a/tests/units/components/core/test_match.py +++ b/tests/units/components/core/test_match.py @@ -42,7 +42,7 @@ def test_match_components(): assert match_cases[0][0]._js_expr == "1" assert match_cases[0][0]._var_type is int - first_return_value_render = match_cases[0][1].render() + first_return_value_render = match_cases[0][1] assert first_return_value_render["name"] == "RadixThemesText" assert first_return_value_render["children"][0]["contents"] == '{"first value"}' @@ -50,31 +50,31 @@ def test_match_components(): assert match_cases[1][0]._var_type is int assert match_cases[1][1]._js_expr == "3" assert match_cases[1][1]._var_type is int - second_return_value_render = match_cases[1][2].render() + second_return_value_render = match_cases[1][2] assert second_return_value_render["name"] == "RadixThemesText" assert second_return_value_render["children"][0]["contents"] == '{"second value"}' assert match_cases[2][0]._js_expr == "[1, 2]" assert match_cases[2][0]._var_type == List[int] - third_return_value_render = match_cases[2][1].render() + third_return_value_render = match_cases[2][1] assert third_return_value_render["name"] == "RadixThemesText" assert third_return_value_render["children"][0]["contents"] == '{"third value"}' assert match_cases[3][0]._js_expr == '"random"' assert match_cases[3][0]._var_type is str - fourth_return_value_render = match_cases[3][1].render() + fourth_return_value_render = match_cases[3][1] assert fourth_return_value_render["name"] == "RadixThemesText" assert fourth_return_value_render["children"][0]["contents"] == '{"fourth value"}' assert match_cases[4][0]._js_expr == '({ ["foo"] : "bar" })' assert match_cases[4][0]._var_type == Mapping[str, str] - fifth_return_value_render = match_cases[4][1].render() + fifth_return_value_render = match_cases[4][1] assert fifth_return_value_render["name"] == "RadixThemesText" assert fifth_return_value_render["children"][0]["contents"] == '{"fifth value"}' assert match_cases[5][0]._js_expr == f"({MatchState.get_name()}.num + 1)" assert match_cases[5][0]._var_type is int - fifth_return_value_render = match_cases[5][1].render() + fifth_return_value_render = match_cases[5][1] assert fifth_return_value_render["name"] == "RadixThemesText" assert fifth_return_value_render["children"][0]["contents"] == '{"sixth value"}' From 12bda1d4f597314f3ba030666e292eff0fbd6d12 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 11:15:42 -0800 Subject: [PATCH 060/144] make all triggers disable recurisve memoization (#4719) --- reflex/components/component.py | 6 +++--- reflex/components/radix/primitives/accordion.py | 3 +++ reflex/components/radix/primitives/drawer.py | 3 +++ reflex/components/radix/themes/components/alert_dialog.py | 3 +++ reflex/components/radix/themes/components/context_menu.py | 5 +++++ reflex/components/radix/themes/components/dialog.py | 3 +++ reflex/components/radix/themes/components/dropdown_menu.py | 5 +++++ reflex/components/radix/themes/components/hover_card.py | 3 +++ reflex/components/radix/themes/components/popover.py | 3 +++ reflex/components/radix/themes/components/select.py | 3 +++ reflex/components/radix/themes/components/tabs.py | 3 +++ reflex/constants/compiler.py | 5 +++-- reflex/experimental/layout.py | 3 +++ 13 files changed, 43 insertions(+), 5 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 810104d47..8982e4b4f 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -1944,7 +1944,7 @@ class StatefulComponent(BaseComponent): if not should_memoize: # Determine if any Vars have associated data. - for prop_var in component._get_vars(): + for prop_var in component._get_vars(include_children=True): if prop_var._get_all_var_data(): should_memoize = True break @@ -2327,8 +2327,8 @@ class MemoizationLeaf(Component): """ comp = super().create(*children, **props) if comp._get_all_hooks(): - comp._memoization_mode = cls._memoization_mode.copy( - update={"disposition": MemoizationDisposition.ALWAYS} + comp._memoization_mode = dataclasses.replace( + comp._memoization_mode, disposition=MemoizationDisposition.ALWAYS ) return comp diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 2d9c7ae96..90a1c41f0 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -10,6 +10,7 @@ from reflex.components.core.cond import cond from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.components.radix.themes.base import LiteralAccentColor, LiteralRadius +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler from reflex.style import Style from reflex.vars import get_uuid_string_var @@ -342,6 +343,8 @@ class AccordionTrigger(AccordionComponent): alias = "RadixAccordionTrigger" + _memoization_mode = MemoizationMode(recursive=False) + @classmethod def create(cls, *children, **props) -> Component: """Create the Accordion trigger component. diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index b9056c9d0..30d1a6ae3 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -10,6 +10,7 @@ from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.components.radix.themes.base import Theme from reflex.components.radix.themes.layout.flex import Flex +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec from reflex.vars.base import Var @@ -85,6 +86,8 @@ class DrawerTrigger(DrawerComponent): # Defaults to true, if the first child acts as the trigger. as_child: Var[bool] = Var.create(True) + _memoization_mode = MemoizationMode(recursive=False) + @classmethod def create(cls, *children: Any, **props: Any) -> Component: """Create a new DrawerTrigger instance. diff --git a/reflex/components/radix/themes/components/alert_dialog.py b/reflex/components/radix/themes/components/alert_dialog.py index 36d38532c..bc5e2dc7e 100644 --- a/reflex/components/radix/themes/components/alert_dialog.py +++ b/reflex/components/radix/themes/components/alert_dialog.py @@ -5,6 +5,7 @@ from typing import Literal from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Responsive from reflex.components.el import elements +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec from reflex.vars.base import Var @@ -33,6 +34,8 @@ class AlertDialogTrigger(RadixThemesTriggerComponent): tag = "AlertDialog.Trigger" + _memoization_mode = MemoizationMode(recursive=False) + class AlertDialogContent(elements.Div, RadixThemesComponent): """Contains the content of the dialog. This component is based on the div element.""" diff --git a/reflex/components/radix/themes/components/context_menu.py b/reflex/components/radix/themes/components/context_menu.py index f8512a902..60d23db1a 100644 --- a/reflex/components/radix/themes/components/context_menu.py +++ b/reflex/components/radix/themes/components/context_menu.py @@ -4,6 +4,7 @@ from typing import Dict, List, Literal, Union from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Responsive +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec from reflex.vars.base import Var @@ -55,6 +56,8 @@ class ContextMenuTrigger(RadixThemesComponent): _invalid_children: List[str] = ["ContextMenuContent"] + _memoization_mode = MemoizationMode(recursive=False) + class ContextMenuContent(RadixThemesComponent): """The component that pops out when the context menu is open.""" @@ -153,6 +156,8 @@ class ContextMenuSubTrigger(RadixThemesComponent): _valid_parents: List[str] = ["ContextMenuContent", "ContextMenuSub"] + _memoization_mode = MemoizationMode(recursive=False) + class ContextMenuSubContent(RadixThemesComponent): """The component that pops out when a submenu is open.""" diff --git a/reflex/components/radix/themes/components/dialog.py b/reflex/components/radix/themes/components/dialog.py index 1b7c3b532..ce6e52cb5 100644 --- a/reflex/components/radix/themes/components/dialog.py +++ b/reflex/components/radix/themes/components/dialog.py @@ -5,6 +5,7 @@ from typing import Literal from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Responsive from reflex.components.el import elements +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec from reflex.vars.base import Var @@ -31,6 +32,8 @@ class DialogTrigger(RadixThemesTriggerComponent): tag = "Dialog.Trigger" + _memoization_mode = MemoizationMode(recursive=False) + class DialogTitle(RadixThemesComponent): """Title component to display inside a Dialog modal.""" diff --git a/reflex/components/radix/themes/components/dropdown_menu.py b/reflex/components/radix/themes/components/dropdown_menu.py index abce3e3bb..6d5709e11 100644 --- a/reflex/components/radix/themes/components/dropdown_menu.py +++ b/reflex/components/radix/themes/components/dropdown_menu.py @@ -4,6 +4,7 @@ from typing import Dict, List, Literal, Union from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Responsive +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec from reflex.vars.base import Var @@ -60,6 +61,8 @@ class DropdownMenuTrigger(RadixThemesTriggerComponent): _invalid_children: List[str] = ["DropdownMenuContent"] + _memoization_mode = MemoizationMode(recursive=False) + class DropdownMenuContent(RadixThemesComponent): """The Dropdown Menu Content component that pops out when the dropdown menu is open.""" @@ -143,6 +146,8 @@ class DropdownMenuSubTrigger(RadixThemesTriggerComponent): _valid_parents: List[str] = ["DropdownMenuContent", "DropdownMenuSub"] + _memoization_mode = MemoizationMode(recursive=False) + class DropdownMenuSub(RadixThemesComponent): """Contains all the parts of a submenu.""" diff --git a/reflex/components/radix/themes/components/hover_card.py b/reflex/components/radix/themes/components/hover_card.py index bd5489ce6..9e7aa4688 100644 --- a/reflex/components/radix/themes/components/hover_card.py +++ b/reflex/components/radix/themes/components/hover_card.py @@ -5,6 +5,7 @@ from typing import Dict, Literal, Union from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Responsive from reflex.components.el import elements +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, passthrough_event_spec from reflex.vars.base import Var @@ -37,6 +38,8 @@ class HoverCardTrigger(RadixThemesTriggerComponent): tag = "HoverCard.Trigger" + _memoization_mode = MemoizationMode(recursive=False) + class HoverCardContent(elements.Div, RadixThemesComponent): """Contains the content of the open hover card.""" diff --git a/reflex/components/radix/themes/components/popover.py b/reflex/components/radix/themes/components/popover.py index bdf5f4af3..4c0542cb7 100644 --- a/reflex/components/radix/themes/components/popover.py +++ b/reflex/components/radix/themes/components/popover.py @@ -5,6 +5,7 @@ from typing import Dict, Literal, Union from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Responsive from reflex.components.el import elements +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec from reflex.vars.base import Var @@ -34,6 +35,8 @@ class PopoverTrigger(RadixThemesTriggerComponent): tag = "Popover.Trigger" + _memoization_mode = MemoizationMode(recursive=False) + class PopoverContent(elements.Div, RadixThemesComponent): """Contains content to be rendered in the open popover.""" diff --git a/reflex/components/radix/themes/components/select.py b/reflex/components/radix/themes/components/select.py index 45e5712bc..6ac992380 100644 --- a/reflex/components/radix/themes/components/select.py +++ b/reflex/components/radix/themes/components/select.py @@ -5,6 +5,7 @@ from typing import List, Literal, Union import reflex as rx from reflex.components.component import Component, ComponentNamespace from reflex.components.core.breakpoints import Responsive +from reflex.constants.compiler import MemoizationMode from reflex.event import no_args_event_spec, passthrough_event_spec from reflex.vars.base import Var @@ -69,6 +70,8 @@ class SelectTrigger(RadixThemesComponent): _valid_parents: List[str] = ["SelectRoot"] + _memoization_mode = MemoizationMode(recursive=False) + class SelectContent(RadixThemesComponent): """The component that pops out when the select is open.""" diff --git a/reflex/components/radix/themes/components/tabs.py b/reflex/components/radix/themes/components/tabs.py index adfb32fab..7b5e5f475 100644 --- a/reflex/components/radix/themes/components/tabs.py +++ b/reflex/components/radix/themes/components/tabs.py @@ -7,6 +7,7 @@ from typing import Any, Dict, List, Literal from reflex.components.component import Component, ComponentNamespace from reflex.components.core.breakpoints import Responsive from reflex.components.core.colors import color +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, passthrough_event_spec from reflex.vars.base import Var @@ -95,6 +96,8 @@ class TabsTrigger(RadixThemesComponent): _valid_parents: List[str] = ["TabsList"] + _memoization_mode = MemoizationMode(recursive=False) + @classmethod def create(cls, *children, **props) -> Component: """Create a TabsTrigger component. diff --git a/reflex/constants/compiler.py b/reflex/constants/compiler.py index dc5d80fe0..9bc9978dc 100644 --- a/reflex/constants/compiler.py +++ b/reflex/constants/compiler.py @@ -1,10 +1,10 @@ """Compiler variables.""" +import dataclasses import enum from enum import Enum from types import SimpleNamespace -from reflex.base import Base from reflex.constants import Dirs from reflex.utils.imports import ImportVar @@ -151,7 +151,8 @@ class MemoizationDisposition(enum.Enum): NEVER = "never" -class MemoizationMode(Base): +@dataclasses.dataclass(frozen=True) +class MemoizationMode: """The mode for memoizing a Component.""" # The conditions under which the component should be memoized. diff --git a/reflex/experimental/layout.py b/reflex/experimental/layout.py index 1c74271b2..d54e87f8b 100644 --- a/reflex/experimental/layout.py +++ b/reflex/experimental/layout.py @@ -12,6 +12,7 @@ from reflex.components.radix.themes.components.icon_button import IconButton from reflex.components.radix.themes.layout.box import Box from reflex.components.radix.themes.layout.container import Container from reflex.components.radix.themes.layout.stack import HStack +from reflex.constants.compiler import MemoizationMode from reflex.event import run_script from reflex.experimental import hooks from reflex.state import ComponentState @@ -146,6 +147,8 @@ sidebar_trigger_style = { class SidebarTrigger(Fragment): """A component that renders the sidebar trigger.""" + _memoization_mode = MemoizationMode(recursive=False) + @classmethod def create(cls, sidebar: Component, **props): """Create the sidebar trigger component. From 87d93b33b8efbc3c066b2118f6ca3c9cc68f43c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Fri, 31 Jan 2025 20:17:46 +0100 Subject: [PATCH 061/144] followup for merge style PR (#4721) --- reflex/style.py | 12 ++++++++++-- tests/units/test_style.py | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/reflex/style.py b/reflex/style.py index f5e424fe2..192835ca3 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -303,8 +303,16 @@ class Style(dict): Returns: The combined style. """ - _var_data = VarData.merge(self._var_data, getattr(other, "_var_data", None)) - return Style(super().__or__(self, other), _var_data=_var_data) # pyright: ignore [reportGeneralTypeIssues, reportCallIssue] + other_var_data = None + if not isinstance(other, Style): + other_dict, other_var_data = convert(other) + else: + other_dict, other_var_data = other, other._var_data + + new_style = Style(super().__or__(other_dict)) + if self._var_data or other_var_data: + new_style._var_data = VarData.merge(self._var_data, other_var_data) + return new_style def _format_emotion_style_pseudo_selector(key: str) -> str: diff --git a/tests/units/test_style.py b/tests/units/test_style.py index 6ab00d561..e8ff5bd01 100644 --- a/tests/units/test_style.py +++ b/tests/units/test_style.py @@ -541,3 +541,7 @@ def test_style_update_with_var_data(): assert s2._var_data is not None assert "const red = true" in s2._var_data.hooks assert "const blue = true" in s2._var_data.hooks + + s3 = s1 | s2 + assert s3._var_data is not None + assert "_varData" not in s3 From fc16bed7cacc61cc90fc9e8a4f836d1061adfb82 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 31 Jan 2025 11:21:51 -0800 Subject: [PATCH 062/144] Handle python `range` passed to rx.Var.create (#4716) * Handle python `range` passed to rx.Var.create Fix the range function to use Math.ceil to handle jagged steps. Update test cases. * Set ToVarOperation.__qualname__ for better repr --- reflex/vars/base.py | 12 ++++++++++-- reflex/vars/sequence.py | 2 +- tests/integration/test_var_operations.py | 10 ++++++++++ tests/units/test_var.py | 8 ++++---- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 6f4eddf42..05215c632 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -445,7 +445,12 @@ class Var(Generic[VAR_TYPE]): _default_var_type: ClassVar[GenericType] = default_type - ToVarOperation.__name__ = f'To{cls.__name__.removesuffix("Var")}Operation' + new_to_var_operation_name = f"To{cls.__name__.removesuffix('Var')}Operation" + ToVarOperation.__qualname__ = ( + ToVarOperation.__qualname__.removesuffix(ToVarOperation.__name__) + + new_to_var_operation_name + ) + ToVarOperation.__name__ = new_to_var_operation_name _var_subclasses.append(VarSubclassEntry(cls, ToVarOperation, python_types)) @@ -1385,7 +1390,7 @@ class LiteralVar(Var): TypeError: If the value is not a supported type for LiteralVar. """ from .object import LiteralObjectVar - from .sequence import LiteralStringVar + from .sequence import ArrayVar, LiteralStringVar if isinstance(value, Var): if _var_data is None: @@ -1441,6 +1446,9 @@ class LiteralVar(Var): _var_data=_var_data, ) + if isinstance(value, range): + return ArrayVar.range(value.start, value.stop, value.step) + raise TypeError( f"Unsupported type {type(value)} for LiteralVar. Tried to create a LiteralVar from {value}." ) diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index 5e9f6468e..f7a9958f5 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -1593,7 +1593,7 @@ def array_range_operation( The range of numbers. """ return var_operation_return( - js_expression=f"Array.from({{ length: ({stop!s} - {start!s}) / {step!s} }}, (_, i) => {start!s} + i * {step!s})", + js_expression=f"Array.from({{ length: Math.ceil(({stop!s} - {start!s}) / {step!s}) }}, (_, i) => {start!s} + i * {step!s})", var_type=List[int], ) diff --git a/tests/integration/test_var_operations.py b/tests/integration/test_var_operations.py index a09c8612e..9b952c575 100644 --- a/tests/integration/test_var_operations.py +++ b/tests/integration/test_var_operations.py @@ -600,6 +600,11 @@ def VarOperations(): ), id="foreach_in_match", ), + # Literal range var in a foreach + rx.box(rx.foreach(range(42, 80, 27), rx.text.span), id="range_in_foreach1"), + rx.box(rx.foreach(range(42, 80, 3), rx.text.span), id="range_in_foreach2"), + rx.box(rx.foreach(range(42, 20, -6), rx.text.span), id="range_in_foreach3"), + rx.box(rx.foreach(range(42, 43, 5), rx.text.span), id="range_in_foreach4"), ) @@ -799,6 +804,11 @@ def test_var_operations(driver, var_operations: AppHarness): ("memo_comp_nested", "345"), # foreach in a match ("foreach_in_match", "first\nsecond\nthird"), + # literal range in a foreach + ("range_in_foreach1", "4269"), + ("range_in_foreach2", "42454851545760636669727578"), + ("range_in_foreach3", "42363024"), + ("range_in_foreach4", "42"), ] for tag, expected in tests: diff --git a/tests/units/test_var.py b/tests/units/test_var.py index 899075cdb..6458c2e29 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -1076,19 +1076,19 @@ def test_array_operations(): assert str(array_var.reverse()) == "[1, 2, 3, 4, 5].slice().reverse()" assert ( str(ArrayVar.range(10)) - == "Array.from({ length: (10 - 0) / 1 }, (_, i) => 0 + i * 1)" + == "Array.from({ length: Math.ceil((10 - 0) / 1) }, (_, i) => 0 + i * 1)" ) assert ( str(ArrayVar.range(1, 10)) - == "Array.from({ length: (10 - 1) / 1 }, (_, i) => 1 + i * 1)" + == "Array.from({ length: Math.ceil((10 - 1) / 1) }, (_, i) => 1 + i * 1)" ) assert ( str(ArrayVar.range(1, 10, 2)) - == "Array.from({ length: (10 - 1) / 2 }, (_, i) => 1 + i * 2)" + == "Array.from({ length: Math.ceil((10 - 1) / 2) }, (_, i) => 1 + i * 2)" ) assert ( str(ArrayVar.range(1, 10, -1)) - == "Array.from({ length: (10 - 1) / -1 }, (_, i) => 1 + i * -1)" + == "Array.from({ length: Math.ceil((10 - 1) / -1) }, (_, i) => 1 + i * -1)" ) From 6231f82248f8a66e4141209514d4276404f207fe Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 11:39:19 -0800 Subject: [PATCH 063/144] add codspeed (#4707) * add codspeed * add codspeed to dev deps * poetry.lock: relock deps, no update * add poetry run * only compile components * at least have something * fix hash * dang it darglint * uwu * test sorting algorithms * test sort * sad * revert that guy * add test_evaluate * it's ruff out there * delete test_sort --------- Co-authored-by: Masen Furer --- .github/workflows/performance.yml | 34 +++++ .gitignore | 1 + benchmarks/test_evaluate.py | 231 ++++++++++++++++++++++++++++++ poetry.lock | 49 +++++-- pyproject.toml | 1 + 5 files changed, 307 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/performance.yml create mode 100644 benchmarks/test_evaluate.py diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml new file mode 100644 index 000000000..c7bd1003a --- /dev/null +++ b/.github/workflows/performance.yml @@ -0,0 +1,34 @@ +name: performance-tests + +on: + push: + branches: + - "main" # or "master" + paths-ignore: + - "**/*.md" + pull_request: + workflow_dispatch: + +env: + TELEMETRY_ENABLED: false + NODE_OPTIONS: "--max_old_space_size=8192" + PR_TITLE: ${{ github.event.pull_request.title }} + APP_HARNESS_HEADLESS: 1 + PYTHONUNBUFFERED: 1 + +jobs: + benchmarks: + name: Run benchmarks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup_build_env + with: + python-version: 3.12.8 + run-poetry-install: true + create-venv-at-path: .venv + - name: Run benchmarks + uses: CodSpeedHQ/action@v3 + with: + token: ${{ secrets.CODSPEED_TOKEN }} + run: poetry run pytest benchmarks/test_evaluate.py --codspeed diff --git a/.gitignore b/.gitignore index 8bd92964c..29a868796 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ requirements.txt .pyi_generator_last_run .pyi_generator_diff reflex.db +.codspeed \ No newline at end of file diff --git a/benchmarks/test_evaluate.py b/benchmarks/test_evaluate.py new file mode 100644 index 000000000..aa4c8237e --- /dev/null +++ b/benchmarks/test_evaluate.py @@ -0,0 +1,231 @@ +from dataclasses import dataclass +from typing import cast + +import pytest + +import reflex as rx + + +class SideBarState(rx.State): + """State for the side bar.""" + + current_page: rx.Field[str] = rx.field("/") + + +@dataclass(frozen=True) +class SideBarPage: + """A page in the side bar.""" + + title: str + href: str + + +@dataclass(frozen=True) +class SideBarSection: + """A section in the side bar.""" + + name: str + icon: str + pages: tuple[SideBarPage, ...] + + +@dataclass(frozen=True) +class Category: + """A category in the side bar.""" + + name: str + href: str + sections: tuple[SideBarSection, ...] + + +SIDE_BAR = ( + Category( + name="General", + href="/", + sections=( + SideBarSection( + name="Home", + icon="home", + pages=( + SideBarPage(title="Home", href="/"), + SideBarPage(title="Contact", href="/contact"), + ), + ), + SideBarSection( + name="About", + icon="info", + pages=( + SideBarPage(title="About", href="/about"), + SideBarPage(title="FAQ", href="/faq"), + ), + ), + ), + ), + Category( + name="Projects", + href="/projects", + sections=( + SideBarSection( + name="Python", + icon="worm", + pages=( + SideBarPage(title="Python", href="/projects/python"), + SideBarPage(title="Django", href="/projects/django"), + SideBarPage(title="Flask", href="/projects/flask"), + SideBarPage(title="FastAPI", href="/projects/fastapi"), + SideBarPage(title="Pyramid", href="/projects/pyramid"), + SideBarPage(title="Tornado", href="/projects/tornado"), + SideBarPage(title="TurboGears", href="/projects/turbogears"), + SideBarPage(title="Web2py", href="/projects/web2py"), + SideBarPage(title="Zope", href="/projects/zope"), + SideBarPage(title="Plone", href="/projects/plone"), + SideBarPage(title="Quixote", href="/projects/quixote"), + SideBarPage(title="Bottle", href="/projects/bottle"), + SideBarPage(title="CherryPy", href="/projects/cherrypy"), + SideBarPage(title="Falcon", href="/projects/falcon"), + SideBarPage(title="Sanic", href="/projects/sanic"), + SideBarPage(title="Starlette", href="/projects/starlette"), + ), + ), + SideBarSection( + name="JavaScript", + icon="banana", + pages=( + SideBarPage(title="JavaScript", href="/projects/javascript"), + SideBarPage(title="Angular", href="/projects/angular"), + SideBarPage(title="React", href="/projects/react"), + SideBarPage(title="Vue", href="/projects/vue"), + SideBarPage(title="Ember", href="/projects/ember"), + SideBarPage(title="Backbone", href="/projects/backbone"), + SideBarPage(title="Meteor", href="/projects/meteor"), + SideBarPage(title="Svelte", href="/projects/svelte"), + SideBarPage(title="Preact", href="/projects/preact"), + SideBarPage(title="Mithril", href="/projects/mithril"), + SideBarPage(title="Aurelia", href="/projects/aurelia"), + SideBarPage(title="Polymer", href="/projects/polymer"), + SideBarPage(title="Knockout", href="/projects/knockout"), + SideBarPage(title="Dojo", href="/projects/dojo"), + SideBarPage(title="Riot", href="/projects/riot"), + SideBarPage(title="Alpine", href="/projects/alpine"), + SideBarPage(title="Stimulus", href="/projects/stimulus"), + SideBarPage(title="Marko", href="/projects/marko"), + SideBarPage(title="Sapper", href="/projects/sapper"), + SideBarPage(title="Nuxt", href="/projects/nuxt"), + SideBarPage(title="Next", href="/projects/next"), + SideBarPage(title="Gatsby", href="/projects/gatsby"), + SideBarPage(title="Gridsome", href="/projects/gridsome"), + SideBarPage(title="Nest", href="/projects/nest"), + SideBarPage(title="Express", href="/projects/express"), + SideBarPage(title="Koa", href="/projects/koa"), + SideBarPage(title="Hapi", href="/projects/hapi"), + SideBarPage(title="LoopBack", href="/projects/loopback"), + SideBarPage(title="Feathers", href="/projects/feathers"), + SideBarPage(title="Sails", href="/projects/sails"), + SideBarPage(title="Adonis", href="/projects/adonis"), + SideBarPage(title="Meteor", href="/projects/meteor"), + SideBarPage(title="Derby", href="/projects/derby"), + SideBarPage(title="Socket.IO", href="/projects/socketio"), + ), + ), + ), + ), +) + + +def side_bar_page(page: SideBarPage): + return rx.box( + rx.link( + page.title, + href=page.href, + ) + ) + + +def side_bar_section(section: SideBarSection): + return rx.accordion.item( + rx.accordion.header( + rx.accordion.trigger( + rx.hstack( + rx.hstack( + rx.icon(section.icon), + section.name, + align="center", + ), + rx.accordion.icon(), + width="100%", + justify="between", + ) + ) + ), + rx.accordion.content( + rx.vstack( + *map(side_bar_page, section.pages), + ), + border_inline_start="1px solid", + padding_inline_start="1em", + margin_inline_start="1.5em", + ), + value=section.name, + width="100%", + variant="ghost", + ) + + +def side_bar_category(category: Category): + selected_section = cast( + rx.Var, + rx.match( + SideBarState.current_page, + *[ + ( + section.name, + section.name, + ) + for section in category.sections + ], + None, + ), + ) + return rx.vstack( + rx.heading( + rx.link( + category.name, + href=category.href, + ), + size="5", + ), + rx.accordion.root( + *map(side_bar_section, category.sections), + default_value=selected_section.to(str), + variant="ghost", + width="100%", + collapsible=True, + type="multiple", + ), + width="100%", + ) + + +def side_bar(): + return rx.vstack( + *map(side_bar_category, SIDE_BAR), + width="fit-content", + ) + + +LOREM_IPSUM = "Lorem ipsum dolor sit amet, dolor ut dolore pariatur aliqua enim tempor sed. Labore excepteur sed exercitation. Ullamco aliquip lorem sunt enim in incididunt. Magna anim officia sint cillum labore. Ut eu non dolore minim nostrud magna eu, aute ex in incididunt irure eu. Fugiat et magna magna est excepteur eiusmod minim. Quis eiusmod et non pariatur dolor veniam incididunt, eiusmod irure enim sed dolor lorem pariatur do. Occaecat duis irure excepteur dolore. Proident ut laborum pariatur sit sit, nisi nostrud voluptate magna commodo laborum esse velit. Voluptate non minim deserunt adipiscing irure deserunt cupidatat. Laboris veniam commodo incididunt veniam lorem occaecat, fugiat ipsum dolor cupidatat. Ea officia sed eu excepteur culpa adipiscing, tempor consectetur ullamco eu. Anim ex proident nulla sunt culpa, voluptate veniam proident est adipiscing sint elit velit. Laboris adipiscing est culpa cillum magna. Sit veniam nulla nulla, aliqua eiusmod commodo lorem cupidatat commodo occaecat. Fugiat cillum dolor incididunt mollit eiusmod sint. Non lorem dolore labore excepteur minim laborum sed. Irure nisi do lorem nulla sunt commodo, deserunt quis mollit consectetur minim et esse est, proident nostrud officia enim sed reprehenderit. Magna cillum consequat aute reprehenderit duis sunt ullamco. Labore qui mollit voluptate. Duis dolor sint aute amet aliquip officia, est non mollit tempor enim quis fugiat, eu do culpa consectetur magna. Do ullamco aliqua voluptate culpa excepteur reprehenderit reprehenderit. Occaecat nulla sit est magna. Deserunt ea voluptate veniam cillum. Amet cupidatat duis est tempor fugiat ex eu, officia est sunt consectetur labore esse exercitation. Nisi cupidatat irure est nisi. Officia amet eu veniam reprehenderit. In amet incididunt tempor commodo ea labore. Mollit dolor aliquip excepteur, voluptate aute occaecat id officia proident. Ullamco est amet tempor. Proident aliquip proident mollit do aliquip ipsum, culpa quis aute id irure. Velit excepteur cillum cillum ut cupidatat. Occaecat qui elit esse nulla minim. Consequat velit id ad pariatur tempor. Eiusmod deserunt aliqua ex sed quis non. Dolor sint commodo ex in deserunt nostrud excepteur, pariatur ex aliqua anim adipiscing amet proident. Laboris eu laborum magna lorem ipsum fugiat velit." + + +def complicated_page(): + return rx.hstack( + side_bar(), + rx.box( + rx.heading("Complicated Page", size="1"), + rx.text(LOREM_IPSUM), + ), + ) + + +@pytest.mark.benchmark +def test_component_init(): + complicated_page() diff --git a/poetry.lock b/poetry.lock index f8d4cf949..125b71b55 100644 --- a/poetry.lock +++ b/poetry.lock @@ -251,7 +251,7 @@ files = [ {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, ] -markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "os_name == \"nt\" and implementation_name != \"pypy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")"} +markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} [package.dependencies] pycparser = "*" @@ -495,7 +495,6 @@ files = [ {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:60eb32934076fa07e4316b7b2742fa52cbb190b42c2df2863dbc4230a0a9b385"}, {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e"}, {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e"}, {file = "cryptography-44.0.0-cp37-abi3-win32.whl", hash = "sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053"}, @@ -506,7 +505,6 @@ files = [ {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289"}, {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7"}, {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9abcc2e083cbe8dde89124a47e5e53ec38751f0d7dfd36801008f316a127d7ba"}, {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64"}, {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285"}, {file = "cryptography-44.0.0-cp39-abi3-win32.whl", hash = "sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417"}, @@ -1101,7 +1099,7 @@ version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" optional = false python-versions = ">=3.8" -groups = ["main"] +groups = ["main", "dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, @@ -1199,7 +1197,7 @@ version = "0.1.2" description = "Markdown URL utilities" optional = false python-versions = ">=3.7" -groups = ["main"] +groups = ["main", "dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, @@ -1690,7 +1688,7 @@ files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] -markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "os_name == \"nt\" and implementation_name != \"pypy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")"} +markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} [[package]] name = "pydantic" @@ -1853,7 +1851,7 @@ version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" -groups = ["main"] +groups = ["main", "dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, @@ -1998,6 +1996,39 @@ aspect = ["aspectlib"] elasticsearch = ["elasticsearch"] histogram = ["pygal", "pygaljs", "setuptools"] +[[package]] +name = "pytest-codspeed" +version = "3.1.2" +description = "Pytest plugin to create CodSpeed benchmarks" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" +files = [ + {file = "pytest_codspeed-3.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aed496f873670ce0ea8f980a7c1a2c6a08f415e0ebdf207bf651b2d922103374"}, + {file = "pytest_codspeed-3.1.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee45b0b763f6b5fa5d74c7b91d694a9615561c428b320383660672f4471756e3"}, + {file = "pytest_codspeed-3.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c84e591a7a0f67d45e2dc9fd05b276971a3aabcab7478fe43363ebefec1358f4"}, + {file = "pytest_codspeed-3.1.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6ae6d094247156407770e6b517af70b98862dd59a3c31034aede11d5f71c32c"}, + {file = "pytest_codspeed-3.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d0f264991de5b5cdc118b96fc671386cca3f0f34e411482939bf2459dc599097"}, + {file = "pytest_codspeed-3.1.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c0695a4bcd5ff04e8379124dba5d9795ea5e0cadf38be7a0406432fc1467b555"}, + {file = "pytest_codspeed-3.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6dc356c8dcaaa883af83310f397ac06c96fac9b8a1146e303d4b374b2cb46a18"}, + {file = "pytest_codspeed-3.1.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc8a5d0366322a75cf562f7d8d672d28c1cf6948695c4dddca50331e08f6b3d5"}, + {file = "pytest_codspeed-3.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6c5fe7a19b72f54f217480b3b527102579547b1de9fe3acd9e66cb4629ff46c8"}, + {file = "pytest_codspeed-3.1.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b67205755a665593f6521a98317d02a9d07d6fdc593f6634de2c94dea47a3055"}, + {file = "pytest_codspeed-3.1.2-py3-none-any.whl", hash = "sha256:5e7ed0315e33496c5c07dba262b50303b8d0bc4c3d10bf1d422a41e70783f1cb"}, + {file = "pytest_codspeed-3.1.2.tar.gz", hash = "sha256:09c1733af3aab35e94a621aa510f2d2114f65591e6f644c42ca3f67547edad4b"}, +] + +[package.dependencies] +cffi = ">=1.17.1" +pytest = ">=3.8" +rich = ">=13.8.1" + +[package.extras] +compat = ["pytest-benchmark (>=5.0.0,<5.1.0)", "pytest-xdist (>=3.6.1,<3.7.0)"] +lint = ["mypy (>=1.11.2,<1.12.0)", "ruff (>=0.6.5,<0.7.0)"] +test = ["pytest (>=7.0,<8.0)", "pytest-cov (>=4.0.0,<4.1.0)"] + [[package]] name = "pytest-cov" version = "6.0.0" @@ -2362,7 +2393,7 @@ version = "13.9.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.8.0" -groups = ["main"] +groups = ["main", "dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, @@ -3152,4 +3183,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.10, <4.0" -content-hash = "35c503a68e87896b4f7d7c209dd3fe6d707ebcc1702377cab0a1339554c6ad77" +content-hash = "822150bcbf41e5cbb61da0a059b41d8971e3c6c974c8af4be7ef55126648aea1" diff --git a/pyproject.toml b/pyproject.toml index 6eeb17489..8d0b37a23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,6 +71,7 @@ selenium = ">=4.11.0,<5.0" pytest-benchmark = ">=4.0.0,<6.0" playwright = ">=1.46.0" pytest-playwright = ">=0.5.1" +pytest-codspeed = "^3.1.2" [tool.poetry.scripts] reflex = "reflex.reflex:cli" From 335816cbf7b8991ef86c7145f067b9d78f70dc99 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 13:00:56 -0800 Subject: [PATCH 064/144] add backend disabled dialog (#4715) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add backend disabled dialog * pyi that guy * pyi the other guy * extend test_connection_banner to also test the cloud banner * oops, need asyncio _inside_ the app * Update reflex/components/core/banner.py Co-authored-by: Masen Furer * use universal cookies * fix pre-commit * revert universal cookie 🍪 --------- Co-authored-by: Masen Furer --- reflex/.templates/web/utils/state.js | 21 +++- reflex/app.py | 9 +- reflex/components/core/banner.py | 79 +++++++++++++ reflex/components/core/banner.pyi | 86 ++++++++++++++ .../radix/themes/components/card.py | 2 +- .../radix/themes/components/card.pyi | 2 +- reflex/config.py | 3 + tests/integration/test_connection_banner.py | 110 ++++++++++++++++-- 8 files changed, 295 insertions(+), 17 deletions(-) diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index 93c664ef1..009910a32 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -106,6 +106,18 @@ export const getBackendURL = (url_str) => { return endpoint; }; +/** + * Check if the backend is disabled. + * + * @returns True if the backend is disabled, false otherwise. + */ +export const isBackendDisabled = () => { + const cookie = document.cookie + .split("; ") + .find((row) => row.startsWith("backend-enabled=")); + return cookie !== undefined && cookie.split("=")[1] == "false"; +}; + /** * Determine if any event in the event queue is stateful. * @@ -301,10 +313,7 @@ export const applyEvent = async (event, socket) => { // Send the event to the server. if (socket) { - socket.emit( - "event", - event, - ); + socket.emit("event", event); return true; } @@ -497,7 +506,7 @@ export const uploadFiles = async ( return false; } - const upload_ref_name = `__upload_controllers_${upload_id}` + const upload_ref_name = `__upload_controllers_${upload_id}`; if (refs[upload_ref_name]) { console.log("Upload already in progress for ", upload_id); @@ -815,7 +824,7 @@ export const useEventLoop = ( return; } // only use websockets if state is present - if (Object.keys(initialState).length > 1) { + if (Object.keys(initialState).length > 1 && !isBackendDisabled()) { // Initialize the websocket connection. if (!socket.current) { connect( diff --git a/reflex/app.py b/reflex/app.py index 9fe0f2992..ad123a655 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -59,7 +59,11 @@ from reflex.components.component import ( ComponentStyle, evaluate_style_namespaces, ) -from reflex.components.core.banner import connection_pulser, connection_toaster +from reflex.components.core.banner import ( + backend_disabled, + connection_pulser, + connection_toaster, +) from reflex.components.core.breakpoints import set_breakpoints from reflex.components.core.client_side_routing import ( Default404Page, @@ -158,9 +162,12 @@ def default_overlay_component() -> Component: Returns: The default overlay_component, which is a connection_modal. """ + config = get_config() + return Fragment.create( connection_pulser(), connection_toaster(), + *([backend_disabled()] if config.is_reflex_cloud else []), *codespaces.codespaces_auto_redirect(), ) diff --git a/reflex/components/core/banner.py b/reflex/components/core/banner.py index 6479bf3b2..882975f2f 100644 --- a/reflex/components/core/banner.py +++ b/reflex/components/core/banner.py @@ -4,8 +4,10 @@ from __future__ import annotations from typing import Optional +from reflex import constants from reflex.components.component import Component from reflex.components.core.cond import cond +from reflex.components.datadisplay.logo import svg_logo from reflex.components.el.elements.typography import Div from reflex.components.lucide.icon import Icon from reflex.components.radix.themes.components.dialog import ( @@ -293,7 +295,84 @@ class ConnectionPulser(Div): ) +class BackendDisabled(Div): + """A component that displays a message when the backend is disabled.""" + + @classmethod + def create(cls, **props) -> Component: + """Create a backend disabled component. + + Args: + **props: The properties of the component. + + Returns: + The backend disabled component. + """ + import reflex as rx + + is_backend_disabled = Var( + "backendDisabled", + _var_type=bool, + _var_data=VarData( + hooks={ + "const [backendDisabled, setBackendDisabled] = useState(false);": None, + "useEffect(() => { setBackendDisabled(isBackendDisabled()); }, []);": None, + }, + imports={ + f"$/{constants.Dirs.STATE_PATH}": [ + ImportVar(tag="isBackendDisabled") + ], + }, + ), + ) + + return super().create( + rx.cond( + is_backend_disabled, + rx.box( + rx.box( + rx.card( + rx.vstack( + svg_logo(), + rx.text( + "You ran out of compute credits.", + ), + rx.callout( + rx.fragment( + "Please upgrade your plan or raise your compute credits at ", + rx.link( + "Reflex Cloud.", + href="https://cloud.reflex.dev/", + ), + ), + width="100%", + icon="info", + variant="surface", + ), + ), + font_size="20px", + font_family='"Inter", "Helvetica", "Arial", sans-serif', + variant="classic", + ), + position="fixed", + top="50%", + left="50%", + transform="translate(-50%, -50%)", + width="40ch", + max_width="90vw", + ), + position="fixed", + z_index=9999, + backdrop_filter="grayscale(1) blur(5px)", + width="100dvw", + height="100dvh", + ), + ) + ) + + connection_banner = ConnectionBanner.create connection_modal = ConnectionModal.create connection_toaster = ConnectionToaster.create connection_pulser = ConnectionPulser.create +backend_disabled = BackendDisabled.create diff --git a/reflex/components/core/banner.pyi b/reflex/components/core/banner.pyi index f44ee7992..2ea514965 100644 --- a/reflex/components/core/banner.pyi +++ b/reflex/components/core/banner.pyi @@ -350,7 +350,93 @@ class ConnectionPulser(Div): """ ... +class BackendDisabled(Div): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_capitalize: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + content_editable: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + context_menu: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + enter_key_hint: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[[], BASE_STATE]] = None, + **props, + ) -> "BackendDisabled": + """Create a backend disabled component. + + Args: + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The backend disabled component. + """ + ... + connection_banner = ConnectionBanner.create connection_modal = ConnectionModal.create connection_toaster = ConnectionToaster.create connection_pulser = ConnectionPulser.create +backend_disabled = BackendDisabled.create diff --git a/reflex/components/radix/themes/components/card.py b/reflex/components/radix/themes/components/card.py index 30823de56..e99ea9cef 100644 --- a/reflex/components/radix/themes/components/card.py +++ b/reflex/components/radix/themes/components/card.py @@ -20,7 +20,7 @@ class Card(elements.Div, RadixThemesComponent): # Card size: "1" - "5" size: Var[Responsive[Literal["1", "2", "3", "4", "5"],]] - # Variant of Card: "solid" | "soft" | "outline" | "ghost" + # Variant of Card: "surface" | "classic" | "ghost" variant: Var[Literal["surface", "classic", "ghost"]] diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index d8ab6c06b..e515982e4 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -94,7 +94,7 @@ class Card(elements.Div, RadixThemesComponent): *children: Child components. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Card size: "1" - "5" - variant: Variant of Card: "solid" | "soft" | "outline" | "ghost" + variant: Variant of Card: "surface" | "classic" | "ghost" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/config.py b/reflex/config.py index f6992f8b5..6609067f9 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -703,6 +703,9 @@ class Config(Base): # Path to file containing key-values pairs to override in the environment; Dotenv format. env_file: Optional[str] = None + # Whether the app is running in the reflex cloud environment. + is_reflex_cloud: bool = False + def __init__(self, *args, **kwargs): """Initialize the config values. diff --git a/tests/integration/test_connection_banner.py b/tests/integration/test_connection_banner.py index c80f30626..4867cf868 100644 --- a/tests/integration/test_connection_banner.py +++ b/tests/integration/test_connection_banner.py @@ -1,5 +1,6 @@ """Test case for displaying the connection banner when the websocket drops.""" +import functools from typing import Generator import pytest @@ -11,12 +12,19 @@ from reflex.testing import AppHarness, WebDriver from .utils import SessionStorage -def ConnectionBanner(): - """App with a connection banner.""" +def ConnectionBanner(is_reflex_cloud: bool = False): + """App with a connection banner. + + Args: + is_reflex_cloud: The value for config.is_reflex_cloud. + """ import asyncio import reflex as rx + # Simulate reflex cloud deploy + rx.config.get_config().is_reflex_cloud = is_reflex_cloud + class State(rx.State): foo: int = 0 @@ -40,19 +48,43 @@ def ConnectionBanner(): app.add_page(index) +@pytest.fixture( + params=[False, True], ids=["reflex_cloud_disabled", "reflex_cloud_enabled"] +) +def simulate_is_reflex_cloud(request) -> bool: + """Fixture to simulate reflex cloud deployment. + + Args: + request: pytest request fixture. + + Returns: + True if reflex cloud is enabled, False otherwise. + """ + return request.param + + @pytest.fixture() -def connection_banner(tmp_path) -> Generator[AppHarness, None, None]: +def connection_banner( + tmp_path, + simulate_is_reflex_cloud: bool, +) -> Generator[AppHarness, None, None]: """Start ConnectionBanner app at tmp_path via AppHarness. Args: tmp_path: pytest tmp_path fixture + simulate_is_reflex_cloud: Whether is_reflex_cloud is set for the app. Yields: running AppHarness instance """ with AppHarness.create( root=tmp_path, - app_source=ConnectionBanner, + app_source=functools.partial( + ConnectionBanner, is_reflex_cloud=simulate_is_reflex_cloud + ), + app_name="connection_banner_reflex_cloud" + if simulate_is_reflex_cloud + else "connection_banner", ) as harness: yield harness @@ -77,6 +109,38 @@ def has_error_modal(driver: WebDriver) -> bool: return True +def has_cloud_banner(driver: WebDriver) -> bool: + """Check if the cloud banner is displayed. + + Args: + driver: Selenium webdriver instance. + + Returns: + True if the banner is displayed, False otherwise. + """ + try: + driver.find_element( + By.XPATH, "//*[ contains(text(), 'You ran out of compute credits.') ]" + ) + except NoSuchElementException: + return False + else: + return True + + +def _assert_token(connection_banner, driver): + """Poll for backend to be up. + + Args: + connection_banner: AppHarness instance. + driver: Selenium webdriver instance. + """ + ss = SessionStorage(driver) + assert connection_banner._poll_for( + lambda: ss.get("token") is not None + ), "token not found" + + @pytest.mark.asyncio async def test_connection_banner(connection_banner: AppHarness): """Test that the connection banner is displayed when the websocket drops. @@ -88,10 +152,7 @@ async def test_connection_banner(connection_banner: AppHarness): assert connection_banner.backend is not None driver = connection_banner.frontend() - ss = SessionStorage(driver) - assert connection_banner._poll_for( - lambda: ss.get("token") is not None - ), "token not found" + _assert_token(connection_banner, driver) assert connection_banner._poll_for(lambda: not has_error_modal(driver)) @@ -132,3 +193,36 @@ async def test_connection_banner(connection_banner: AppHarness): # Count should have incremented after coming back up assert connection_banner.poll_for_value(counter_element, exp_not_equal="1") == "2" + + +@pytest.mark.asyncio +async def test_cloud_banner( + connection_banner: AppHarness, simulate_is_reflex_cloud: bool +): + """Test that the connection banner is displayed when the websocket drops. + + Args: + connection_banner: AppHarness instance. + simulate_is_reflex_cloud: Whether is_reflex_cloud is set for the app. + """ + assert connection_banner.app_instance is not None + assert connection_banner.backend is not None + driver = connection_banner.frontend() + + driver.add_cookie({"name": "backend-enabled", "value": "truly"}) + driver.refresh() + _assert_token(connection_banner, driver) + assert connection_banner._poll_for(lambda: not has_cloud_banner(driver)) + + driver.add_cookie({"name": "backend-enabled", "value": "false"}) + driver.refresh() + if simulate_is_reflex_cloud: + assert connection_banner._poll_for(lambda: has_cloud_banner(driver)) + else: + _assert_token(connection_banner, driver) + assert connection_banner._poll_for(lambda: not has_cloud_banner(driver)) + + driver.delete_cookie("backend-enabled") + driver.refresh() + _assert_token(connection_banner, driver) + assert connection_banner._poll_for(lambda: not has_cloud_banner(driver)) From 12a42b6c47fc2dd231307a8238bab99bb6e3c4d3 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 13:07:51 -0800 Subject: [PATCH 065/144] var_data fixes with hooks values (#4717) * var_data fixes with hooks values * remove the raise error --- reflex/event.py | 9 ++++++++- reflex/vars/base.py | 17 ++++++++++++++++- tests/units/test_event.py | 24 ++++++++++++++++++++++-- tests/units/test_var.py | 16 ++++++++++++++++ 4 files changed, 62 insertions(+), 4 deletions(-) diff --git a/reflex/event.py b/reflex/event.py index fbbfc70b2..96790e24c 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -37,6 +37,7 @@ from typing_extensions import ( ) from reflex import constants +from reflex.constants.compiler import CompileVars, Hooks, Imports from reflex.constants.state import FRONTEND_EVENT_STATE from reflex.utils import console, format from reflex.utils.exceptions import ( @@ -1729,7 +1730,13 @@ class LiteralEventChainVar(ArgsFunctionOperationBuilder, LiteralVar, EventChainV arg_def_expr = Var(_js_expr="args") if value.invocation is None: - invocation = FunctionStringVar.create("addEvents") + invocation = FunctionStringVar.create( + CompileVars.ADD_EVENTS, + _var_data=VarData( + imports=Imports.EVENTS, + hooks={Hooks.EVENTS: None}, + ), + ) else: invocation = value.invocation diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 05215c632..0b84c1036 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -29,6 +29,7 @@ from typing import ( Mapping, NoReturn, Optional, + Sequence, Set, Tuple, Type, @@ -131,7 +132,7 @@ class VarData: state: str = "", field_name: str = "", imports: ImportDict | ParsedImportDict | None = None, - hooks: Mapping[str, VarData | None] | None = None, + hooks: Mapping[str, VarData | None] | Sequence[str] | str | None = None, deps: list[Var] | None = None, position: Hooks.HookPosition | None = None, ): @@ -145,6 +146,10 @@ class VarData: deps: Dependencies of the var for useCallback. position: Position of the hook in the component. """ + if isinstance(hooks, str): + hooks = [hooks] + if not isinstance(hooks, dict): + hooks = {hook: None for hook in (hooks or [])} immutable_imports: ImmutableParsedImportDict = tuple( (k, tuple(v)) for k, v in parse_imports(imports or {}).items() ) @@ -155,6 +160,16 @@ class VarData: object.__setattr__(self, "deps", tuple(deps or [])) object.__setattr__(self, "position", position or None) + if hooks and any(hooks.values()): + merged_var_data = VarData.merge(self, *hooks.values()) + if merged_var_data is not None: + object.__setattr__(self, "state", merged_var_data.state) + object.__setattr__(self, "field_name", merged_var_data.field_name) + object.__setattr__(self, "imports", merged_var_data.imports) + object.__setattr__(self, "hooks", merged_var_data.hooks) + object.__setattr__(self, "deps", merged_var_data.deps) + object.__setattr__(self, "position", merged_var_data.position) + def old_school_imports(self) -> ImportDict: """Return the imports as a mutable dict. diff --git a/tests/units/test_event.py b/tests/units/test_event.py index 5e47991da..afcfda504 100644 --- a/tests/units/test_event.py +++ b/tests/units/test_event.py @@ -3,6 +3,7 @@ from typing import Callable, List import pytest import reflex as rx +from reflex.constants.compiler import Hooks, Imports from reflex.event import ( Event, EventChain, @@ -14,7 +15,7 @@ from reflex.event import ( ) from reflex.state import BaseState from reflex.utils import format -from reflex.vars.base import Field, LiteralVar, Var, field +from reflex.vars.base import Field, LiteralVar, Var, VarData, field def make_var(value) -> Var: @@ -443,9 +444,28 @@ def test_event_var_data(): return (value,) # Ensure chain carries _var_data - chain_var = Var.create(EventChain(events=[S.s(S.x)], args_spec=_args_spec)) + chain_var = Var.create( + EventChain( + events=[S.s(S.x)], + args_spec=_args_spec, + invocation=rx.vars.FunctionStringVar.create(""), + ) + ) assert chain_var._get_all_var_data() == S.x._get_all_var_data() + chain_var_data = Var.create( + EventChain( + events=[], + args_spec=_args_spec, + ) + )._get_all_var_data() + assert chain_var_data is not None + + assert chain_var_data == VarData( + imports=Imports.EVENTS, + hooks={Hooks.EVENTS: None}, + ) + def test_event_bound_method() -> None: class S(BaseState): diff --git a/tests/units/test_var.py b/tests/units/test_var.py index 6458c2e29..a5cd56a91 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -1862,3 +1862,19 @@ def test_to_string_operation(): single_var = Var.create(Email()) assert single_var._var_type == Email + + +def test_var_data_hooks(): + var_data_str = VarData(hooks="what") + var_data_list = VarData(hooks=["what"]) + var_data_dict = VarData(hooks={"what": None}) + assert var_data_str == var_data_list == var_data_dict + + var_data_list_multiple = VarData(hooks=["what", "whot"]) + var_data_dict_multiple = VarData(hooks={"what": None, "whot": None}) + assert var_data_list_multiple == var_data_dict_multiple + + +def test_var_data_with_hooks_value(): + var_data = VarData(hooks={"what": VarData(hooks={"whot": VarData(hooks="whott")})}) + assert var_data == VarData(hooks=["what", "whot", "whott"]) From 8663dbcb974bacc1e03d9f5158f62d7a98e398eb Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 13:12:33 -0800 Subject: [PATCH 066/144] improve var base typing (#4718) * improve var base typing * fix pyi * dang it darglint * drain _process in tests * fixes #4576 * dang it darglint --- reflex/components/base/error_boundary.py | 3 +- reflex/components/base/error_boundary.pyi | 3 +- reflex/components/component.py | 1 + reflex/components/core/foreach.py | 12 +- reflex/components/datadisplay/dataeditor.py | 3 +- .../datadisplay/shiki_code_block.py | 12 +- reflex/event.py | 25 ++- reflex/experimental/client_state.py | 3 +- reflex/state.py | 6 +- reflex/utils/exceptions.py | 4 + reflex/vars/base.py | 203 +++++++++--------- reflex/vars/datetime.py | 3 +- reflex/vars/function.py | 6 +- reflex/vars/number.py | 9 +- reflex/vars/object.py | 40 ++-- reflex/vars/sequence.py | 74 +++---- tests/units/components/core/test_match.py | 4 + tests/units/components/test_component.py | 9 +- tests/units/test_app.py | 28 ++- tests/units/test_state.py | 72 +++---- tests/units/test_var.py | 23 +- 21 files changed, 279 insertions(+), 264 deletions(-) diff --git a/reflex/components/base/error_boundary.py b/reflex/components/base/error_boundary.py index f328773c2..74867a757 100644 --- a/reflex/components/base/error_boundary.py +++ b/reflex/components/base/error_boundary.py @@ -11,10 +11,11 @@ from reflex.event import EventHandler, set_clipboard from reflex.state import FrontendEventExceptionState from reflex.vars.base import Var from reflex.vars.function import ArgsFunctionOperation +from reflex.vars.object import ObjectVar def on_error_spec( - error: Var[Dict[str, str]], info: Var[Dict[str, str]] + error: ObjectVar[Dict[str, str]], info: ObjectVar[Dict[str, str]] ) -> Tuple[Var[str], Var[str]]: """The spec for the on_error event handler. diff --git a/reflex/components/base/error_boundary.pyi b/reflex/components/base/error_boundary.pyi index 2e01c7da0..8d27af0f3 100644 --- a/reflex/components/base/error_boundary.pyi +++ b/reflex/components/base/error_boundary.pyi @@ -9,9 +9,10 @@ from reflex.components.component import Component from reflex.event import BASE_STATE, EventType from reflex.style import Style from reflex.vars.base import Var +from reflex.vars.object import ObjectVar def on_error_spec( - error: Var[Dict[str, str]], info: Var[Dict[str, str]] + error: ObjectVar[Dict[str, str]], info: ObjectVar[Dict[str, str]] ) -> Tuple[Var[str], Var[str]]: ... class ErrorBoundary(Component): diff --git a/reflex/components/component.py b/reflex/components/component.py index 8982e4b4f..440a408df 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -2457,6 +2457,7 @@ def render_dict_to_var(tag: dict | Component | str, imported_names: set[str]) -> @dataclasses.dataclass( eq=False, frozen=True, + slots=True, ) class LiteralComponentVar(CachedVarOperation, LiteralVar, ComponentVar): """A Var that represents a Component.""" diff --git a/reflex/components/core/foreach.py b/reflex/components/core/foreach.py index 30dda9c6a..927b01333 100644 --- a/reflex/components/core/foreach.py +++ b/reflex/components/core/foreach.py @@ -11,6 +11,7 @@ from reflex.components.component import Component from reflex.components.tags import IterTag from reflex.constants import MemoizationMode from reflex.state import ComponentState +from reflex.utils.exceptions import UntypedVarError from reflex.vars.base import LiteralVar, Var @@ -51,6 +52,7 @@ class Foreach(Component): Raises: ForeachVarError: If the iterable is of type Any. TypeError: If the render function is a ComponentState. + UntypedVarError: If the iterable is of type Any without a type annotation. """ iterable = LiteralVar.create(iterable) if iterable._var_type == Any: @@ -72,8 +74,14 @@ class Foreach(Component): iterable=iterable, render_fn=render_fn, ) - # Keep a ref to a rendered component to determine correct imports/hooks/styles. - component.children = [component._render().render_component()] + try: + # Keep a ref to a rendered component to determine correct imports/hooks/styles. + component.children = [component._render().render_component()] + except UntypedVarError as e: + raise UntypedVarError( + f"Could not foreach over var `{iterable!s}` without a type annotation. " + "See https://reflex.dev/docs/library/dynamic-rendering/foreach/" + ) from e return component def _render(self) -> IterTag: diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index b2d6417bd..338fb2e44 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -387,7 +387,8 @@ class DataEditor(NoSSRComponent): raise ValueError( "DataEditor data must be an ArrayVar if rows is not provided." ) - props["rows"] = data.length() if isinstance(data, Var) else len(data) + + props["rows"] = data.length() if isinstance(data, ArrayVar) else len(data) if not isinstance(columns, Var) and len(columns): if types.is_dataframe(type(data)) or ( diff --git a/reflex/components/datadisplay/shiki_code_block.py b/reflex/components/datadisplay/shiki_code_block.py index 2d3040966..a4aaec1d4 100644 --- a/reflex/components/datadisplay/shiki_code_block.py +++ b/reflex/components/datadisplay/shiki_code_block.py @@ -621,18 +621,22 @@ class ShikiCodeBlock(Component, MarkdownComponentMap): Returns: Imports for the component. + + Raises: + ValueError: If the transformers are not of type LiteralVar. """ imports = defaultdict(list) + if not isinstance(self.transformers, LiteralVar): + raise ValueError( + f"transformers should be a LiteralVar type. Got {type(self.transformers)} instead." + ) for transformer in self.transformers._var_value: if isinstance(transformer, ShikiBaseTransformers): imports[transformer.library].extend( [ImportVar(tag=str(fn)) for fn in transformer.fns] ) - ( + if transformer.library not in self.lib_dependencies: self.lib_dependencies.append(transformer.library) - if transformer.library not in self.lib_dependencies - else None - ) return imports @classmethod diff --git a/reflex/event.py b/reflex/event.py index 96790e24c..5ce0f3dc1 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -4,7 +4,6 @@ from __future__ import annotations import dataclasses import inspect -import sys import types import urllib.parse from base64 import b64encode @@ -541,7 +540,7 @@ class JavasciptKeyboardEvent: shiftKey: bool = False # noqa: N815 -def input_event(e: Var[JavascriptInputEvent]) -> Tuple[Var[str]]: +def input_event(e: ObjectVar[JavascriptInputEvent]) -> Tuple[Var[str]]: """Get the value from an input event. Args: @@ -562,7 +561,9 @@ class KeyInputInfo(TypedDict): shift_key: bool -def key_event(e: Var[JavasciptKeyboardEvent]) -> Tuple[Var[str], Var[KeyInputInfo]]: +def key_event( + e: ObjectVar[JavasciptKeyboardEvent], +) -> Tuple[Var[str], Var[KeyInputInfo]]: """Get the key from a keyboard event. Args: @@ -572,7 +573,7 @@ def key_event(e: Var[JavasciptKeyboardEvent]) -> Tuple[Var[str], Var[KeyInputInf The key from the keyboard event. """ return ( - e.key, + e.key.to(str), Var.create( { "alt_key": e.altKey, @@ -580,7 +581,7 @@ def key_event(e: Var[JavasciptKeyboardEvent]) -> Tuple[Var[str], Var[KeyInputInf "meta_key": e.metaKey, "shift_key": e.shiftKey, }, - ), + ).to(KeyInputInfo), ) @@ -1354,7 +1355,7 @@ def unwrap_var_annotation(annotation: GenericType): Returns: The unwrapped annotation. """ - if get_origin(annotation) is Var and (args := get_args(annotation)): + if get_origin(annotation) in (Var, ObjectVar) and (args := get_args(annotation)): return args[0] return annotation @@ -1620,7 +1621,7 @@ class EventVar(ObjectVar, python_types=EventSpec): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralEventVar(VarOperationCall, LiteralVar, EventVar): """A literal event var.""" @@ -1681,7 +1682,7 @@ class EventChainVar(BuilderFunctionVar, python_types=EventChain): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) # Note: LiteralVar is second in the inheritance list allowing it act like a # CachedVarOperation (ArgsFunctionOperation) and get the _js_expr from the @@ -1713,6 +1714,9 @@ class LiteralEventChainVar(ArgsFunctionOperationBuilder, LiteralVar, EventChainV Returns: The created LiteralEventChainVar instance. + + Raises: + ValueError: If the invocation is not a FunctionVar. """ arg_spec = ( value.args_spec[0] @@ -1740,6 +1744,11 @@ class LiteralEventChainVar(ArgsFunctionOperationBuilder, LiteralVar, EventChainV else: invocation = value.invocation + if invocation is not None and not isinstance(invocation, FunctionVar): + raise ValueError( + f"EventChain invocation must be a FunctionVar, got {invocation!s} of type {invocation._var_type!s}." + ) + return cls( _js_expr="", _var_type=EventChain, diff --git a/reflex/experimental/client_state.py b/reflex/experimental/client_state.py index ce3a941bb..8138c2721 100644 --- a/reflex/experimental/client_state.py +++ b/reflex/experimental/client_state.py @@ -4,7 +4,6 @@ from __future__ import annotations import dataclasses import re -import sys from typing import Any, Callable, Union from reflex import constants @@ -49,7 +48,7 @@ def _client_state_ref_dict(var_name: str) -> str: @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class ClientStateVar(Var): """A Var that exists on the client via useState.""" diff --git a/reflex/state.py b/reflex/state.py index a0b91c94f..6c74d5e55 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -1637,9 +1637,11 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): if not isinstance(var, Var): return var + unset = object() + # Fast case: this is a literal var and the value is known. - if hasattr(var, "_var_value"): - return var._var_value + if (var_value := getattr(var, "_var_value", unset)) is not unset: + return var_value # pyright: ignore [reportReturnType] var_data = var._get_all_var_data() if var_data is None or not var_data.state: diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py index be3f6ab69..05fbb297c 100644 --- a/reflex/utils/exceptions.py +++ b/reflex/utils/exceptions.py @@ -75,6 +75,10 @@ class VarAttributeError(ReflexError, AttributeError): """Custom AttributeError for var related errors.""" +class UntypedVarError(ReflexError, TypeError): + """Custom TypeError for untyped var errors.""" + + class UntypedComputedVarError(ReflexError, TypeError): """Custom TypeError for untyped computed var errors.""" diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 0b84c1036..d34bc8ff5 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -12,7 +12,6 @@ import json import random import re import string -import sys import warnings from types import CodeType, FunctionType from typing import ( @@ -82,6 +81,7 @@ if TYPE_CHECKING: VAR_TYPE = TypeVar("VAR_TYPE", covariant=True) OTHER_VAR_TYPE = TypeVar("OTHER_VAR_TYPE") STRING_T = TypeVar("STRING_T", bound=str) +SEQUENCE_TYPE = TypeVar("SEQUENCE_TYPE", bound=Sequence) warnings.filterwarnings("ignore", message="fields may not start with an underscore") @@ -449,7 +449,7 @@ class Var(Generic[VAR_TYPE]): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class ToVarOperation(ToOperation, cls): """Base class of converting a var to another var type.""" @@ -597,7 +597,7 @@ class Var(Generic[VAR_TYPE]): @overload @classmethod - def create( + def create( # pyright: ignore [reportOverlappingOverload] cls, value: STRING_T, _var_data: VarData | None = None, @@ -611,6 +611,22 @@ class Var(Generic[VAR_TYPE]): _var_data: VarData | None = None, ) -> NoneVar: ... + @overload + @classmethod + def create( + cls, + value: MAPPING_TYPE, + _var_data: VarData | None = None, + ) -> ObjectVar[MAPPING_TYPE]: ... + + @overload + @classmethod + def create( + cls, + value: SEQUENCE_TYPE, + _var_data: VarData | None = None, + ) -> ArrayVar[SEQUENCE_TYPE]: ... + @overload @classmethod def create( @@ -692,8 +708,8 @@ class Var(Generic[VAR_TYPE]): @overload def to( self, - output: type[Mapping], - ) -> ObjectVar[Mapping]: ... + output: type[MAPPING_TYPE], + ) -> ObjectVar[MAPPING_TYPE]: ... @overload def to( @@ -744,7 +760,7 @@ class Var(Generic[VAR_TYPE]): return get_to_operation(NoneVar).create(self) # pyright: ignore [reportReturnType] # Handle fixed_output_type being Base or a dataclass. - if can_use_in_object_var(fixed_output_type): + if can_use_in_object_var(output): return self.to(ObjectVar, output) if inspect.isclass(output): @@ -776,6 +792,9 @@ class Var(Generic[VAR_TYPE]): return self + @overload + def guess_type(self: Var[NoReturn]) -> Var[Any]: ... # pyright: ignore [reportOverlappingOverload] + @overload def guess_type(self: Var[str]) -> StringVar: ... @@ -785,6 +804,9 @@ class Var(Generic[VAR_TYPE]): @overload def guess_type(self: Var[int] | Var[float] | Var[int | float]) -> NumberVar: ... + @overload + def guess_type(self: Var[BASE_TYPE]) -> ObjectVar[BASE_TYPE]: ... + @overload def guess_type(self) -> Self: ... @@ -933,7 +955,7 @@ class Var(Generic[VAR_TYPE]): return setter - def _var_set_state(self, state: type[BaseState] | str): + def _var_set_state(self, state: type[BaseState] | str) -> Self: """Set the state of the var. Args: @@ -948,7 +970,7 @@ class Var(Generic[VAR_TYPE]): else format_state_name(state.get_full_name()) ) - return StateOperation.create( + return StateOperation.create( # pyright: ignore [reportReturnType] formatted_state_name, self, _var_data=VarData.merge( @@ -1127,43 +1149,6 @@ class Var(Generic[VAR_TYPE]): """ return self - def __getattr__(self, name: str): - """Get an attribute of the var. - - Args: - name: The name of the attribute. - - Returns: - The attribute. - - Raises: - VarAttributeError: If the attribute does not exist. - TypeError: If the var type is Any. - """ - if name.startswith("_"): - return self.__getattribute__(name) - - if name == "contains": - raise TypeError( - f"Var of type {self._var_type} does not support contains check." - ) - if name == "reverse": - raise TypeError("Cannot reverse non-list var.") - - if self._var_type is Any: - raise TypeError( - f"You must provide an annotation for the state var `{self!s}`. Annotation cannot be `{self._var_type}`." - ) - - if name in REPLACED_NAMES: - raise VarAttributeError( - f"Field {name!r} was renamed to {REPLACED_NAMES[name]!r}" - ) - - raise VarAttributeError( - f"The State var has no attribute '{name}' or may have been annotated wrongly.", - ) - def _decode(self) -> Any: """Decode Var as a python value. @@ -1225,36 +1210,76 @@ class Var(Generic[VAR_TYPE]): return ArrayVar.range(first_endpoint, second_endpoint, step) - def __bool__(self) -> bool: - """Raise exception if using Var in a boolean context. + if not TYPE_CHECKING: - Raises: - VarTypeError: when attempting to bool-ify the Var. - """ - raise VarTypeError( - f"Cannot convert Var {str(self)!r} to bool for use with `if`, `and`, `or`, and `not`. " - "Instead use `rx.cond` and bitwise operators `&` (and), `|` (or), `~` (invert)." - ) + def __getattr__(self, name: str): + """Get an attribute of the var. - def __iter__(self) -> Any: - """Raise exception if using Var in an iterable context. + Args: + name: The name of the attribute. - Raises: - VarTypeError: when attempting to iterate over the Var. - """ - raise VarTypeError( - f"Cannot iterate over Var {str(self)!r}. Instead use `rx.foreach`." - ) + Raises: + VarAttributeError: If the attribute does not exist. + UntypedVarError: If the var type is Any. + TypeError: If the var type is Any. - def __contains__(self, _: Any) -> Var: - """Override the 'in' operator to alert the user that it is not supported. + # noqa: DAR101 self + """ + if name.startswith("_"): + raise VarAttributeError(f"Attribute {name} not found.") - Raises: - VarTypeError: the operation is not supported - """ - raise VarTypeError( - "'in' operator not supported for Var types, use Var.contains() instead." - ) + if name == "contains": + raise TypeError( + f"Var of type {self._var_type} does not support contains check." + ) + if name == "reverse": + raise TypeError("Cannot reverse non-list var.") + + if self._var_type is Any: + raise exceptions.UntypedVarError( + f"You must provide an annotation for the state var `{self!s}`. Annotation cannot be `{self._var_type}`." + ) + + raise VarAttributeError( + f"The State var has no attribute '{name}' or may have been annotated wrongly.", + ) + + def __bool__(self) -> bool: + """Raise exception if using Var in a boolean context. + + Raises: + VarTypeError: when attempting to bool-ify the Var. + + # noqa: DAR101 self + """ + raise VarTypeError( + f"Cannot convert Var {str(self)!r} to bool for use with `if`, `and`, `or`, and `not`. " + "Instead use `rx.cond` and bitwise operators `&` (and), `|` (or), `~` (invert)." + ) + + def __iter__(self) -> Any: + """Raise exception if using Var in an iterable context. + + Raises: + VarTypeError: when attempting to iterate over the Var. + + # noqa: DAR101 self + """ + raise VarTypeError( + f"Cannot iterate over Var {str(self)!r}. Instead use `rx.foreach`." + ) + + def __contains__(self, _: Any) -> Var: + """Override the 'in' operator to alert the user that it is not supported. + + Raises: + VarTypeError: the operation is not supported + + # noqa: DAR101 self + """ + raise VarTypeError( + "'in' operator not supported for Var types, use Var.contains() instead." + ) OUTPUT = TypeVar("OUTPUT", bound=Var) @@ -1471,6 +1496,12 @@ class LiteralVar(Var): def __post_init__(self): """Post-initialize the var.""" + @property + def _var_value(self) -> Any: + raise NotImplementedError( + "LiteralVar subclasses must implement the _var_value property." + ) + def json(self) -> str: """Serialize the var to a JSON string. @@ -1543,7 +1574,7 @@ def var_operation( ) -> Callable[P, StringVar]: ... -LIST_T = TypeVar("LIST_T", bound=Union[List[Any], Tuple, Set]) +LIST_T = TypeVar("LIST_T", bound=Sequence) @overload @@ -1780,7 +1811,7 @@ def _or_operation(a: Var, b: Var): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class CallableVar(Var): """Decorate a Var-returning function to act as both a Var and a function. @@ -1861,7 +1892,7 @@ def is_computed_var(obj: Any) -> TypeGuard[ComputedVar]: @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class ComputedVar(Var[RETURN_TYPE]): """A field with computed getters.""" @@ -2070,13 +2101,6 @@ class ComputedVar(Var[RETURN_TYPE]): owner: Type, ) -> ArrayVar[list[LIST_INSIDE]]: ... - @overload - def __get__( - self: ComputedVar[set[LIST_INSIDE]], - instance: None, - owner: Type, - ) -> ArrayVar[set[LIST_INSIDE]]: ... - @overload def __get__( self: ComputedVar[tuple[LIST_INSIDE, ...]], @@ -2436,7 +2460,7 @@ def var_operation_return( @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class CustomVarOperation(CachedVarOperation, Var[T]): """Base class for custom var operations.""" @@ -2507,7 +2531,7 @@ class NoneVar(Var[None], python_types=type(None)): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralNoneVar(LiteralVar, NoneVar): """A var representing None.""" @@ -2569,7 +2593,7 @@ def get_to_operation(var_subclass: Type[Var]) -> Type[ToOperation]: @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class StateOperation(CachedVarOperation, Var): """A var operation that accesses a field on an object.""" @@ -2716,19 +2740,6 @@ def _extract_var_data(value: Iterable) -> list[VarData | None]: return var_datas -# These names were changed in reflex 0.3.0 -REPLACED_NAMES = { - "full_name": "_var_full_name", - "name": "_js_expr", - "state": "_var_data.state", - "type_": "_var_type", - "is_local": "_var_is_local", - "is_string": "_var_is_string", - "set_state": "_var_set_state", - "deps": "_deps", -} - - dispatchers: Dict[GenericType, Callable[[Var], Var]] = {} diff --git a/reflex/vars/datetime.py b/reflex/vars/datetime.py index b20cfc7a6..c43c24165 100644 --- a/reflex/vars/datetime.py +++ b/reflex/vars/datetime.py @@ -3,7 +3,6 @@ from __future__ import annotations import dataclasses -import sys from datetime import date, datetime from typing import Any, NoReturn, TypeVar, Union, overload @@ -193,7 +192,7 @@ def date_compare_operation( @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralDatetimeVar(LiteralVar, DateTimeVar): """Base class for immutable datetime and date vars.""" diff --git a/reflex/vars/function.py b/reflex/vars/function.py index e8691cfb1..505a69b4c 100644 --- a/reflex/vars/function.py +++ b/reflex/vars/function.py @@ -226,7 +226,7 @@ class FunctionStringVar(FunctionVar[CALLABLE_TYPE]): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class VarOperationCall(Generic[P, R], CachedVarOperation, Var[R]): """Base class for immutable vars that are the result of a function call.""" @@ -350,7 +350,7 @@ def format_args_function_operation( @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class ArgsFunctionOperation(CachedVarOperation, FunctionVar): """Base class for immutable function defined via arguments and return expression.""" @@ -407,7 +407,7 @@ class ArgsFunctionOperation(CachedVarOperation, FunctionVar): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class ArgsFunctionOperationBuilder(CachedVarOperation, BuilderFunctionVar): """Base class for immutable function defined via arguments and return expression with the builder pattern.""" diff --git a/reflex/vars/number.py b/reflex/vars/number.py index 050dc2329..35a55490a 100644 --- a/reflex/vars/number.py +++ b/reflex/vars/number.py @@ -5,7 +5,6 @@ from __future__ import annotations import dataclasses import json import math -import sys from typing import ( TYPE_CHECKING, Any, @@ -160,7 +159,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): """ from .sequence import ArrayVar, LiteralArrayVar - if isinstance(other, (list, tuple, set, ArrayVar)): + if isinstance(other, (list, tuple, ArrayVar)): if isinstance(other, ArrayVar): return other * self return LiteralArrayVar.create(other) * self @@ -187,7 +186,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)): """ from .sequence import ArrayVar, LiteralArrayVar - if isinstance(other, (list, tuple, set, ArrayVar)): + if isinstance(other, (list, tuple, ArrayVar)): if isinstance(other, ArrayVar): return other * self return LiteralArrayVar.create(other) * self @@ -973,7 +972,7 @@ def boolean_not_operation(value: BooleanVar): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralNumberVar(LiteralVar, NumberVar): """Base class for immutable literal number vars.""" @@ -1032,7 +1031,7 @@ class LiteralNumberVar(LiteralVar, NumberVar): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralBooleanVar(LiteralVar, BooleanVar): """Base class for immutable literal boolean vars.""" diff --git a/reflex/vars/object.py b/reflex/vars/object.py index ed4221e4c..cb29cabfb 100644 --- a/reflex/vars/object.py +++ b/reflex/vars/object.py @@ -3,7 +3,6 @@ from __future__ import annotations import dataclasses -import sys import typing from inspect import isclass from typing import ( @@ -167,12 +166,6 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): key: Var | Any, ) -> ArrayVar[list[ARRAY_INNER_TYPE]]: ... - @overload - def __getitem__( - self: ObjectVar[Mapping[Any, set[ARRAY_INNER_TYPE]]], - key: Var | Any, - ) -> ArrayVar[set[ARRAY_INNER_TYPE]]: ... - @overload def __getitem__( self: ObjectVar[Mapping[Any, tuple[ARRAY_INNER_TYPE, ...]]], @@ -229,12 +222,6 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): name: str, ) -> ArrayVar[list[ARRAY_INNER_TYPE]]: ... - @overload - def __getattr__( - self: ObjectVar[Mapping[Any, set[ARRAY_INNER_TYPE]]], - name: str, - ) -> ArrayVar[set[ARRAY_INNER_TYPE]]: ... - @overload def __getattr__( self: ObjectVar[Mapping[Any, tuple[ARRAY_INNER_TYPE, ...]]], @@ -305,7 +292,7 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralObjectVar(CachedVarOperation, ObjectVar[OBJECT_TYPE], LiteralVar): """Base class for immutable literal object vars.""" @@ -355,17 +342,20 @@ class LiteralObjectVar(CachedVarOperation, ObjectVar[OBJECT_TYPE], LiteralVar): Returns: The JSON representation of the object. + + Raises: + TypeError: The keys and values of the object must be literal vars to get the JSON representation """ - return ( - "{" - + ", ".join( - [ - f"{LiteralVar.create(key).json()}:{LiteralVar.create(value).json()}" - for key, value in self._var_value.items() - ] - ) - + "}" - ) + keys_and_values = [] + for key, value in self._var_value.items(): + key = LiteralVar.create(key) + value = LiteralVar.create(value) + if not isinstance(key, LiteralVar) or not isinstance(value, LiteralVar): + raise TypeError( + "The keys and values of the object must be literal vars to get the JSON representation." + ) + keys_and_values.append(f"{key.json()}:{value.json()}") + return "{" + ", ".join(keys_and_values) + "}" def __hash__(self) -> int: """Get the hash of the var. @@ -487,7 +477,7 @@ def object_merge_operation(lhs: ObjectVar, rhs: ObjectVar): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class ObjectItemOperation(CachedVarOperation, Var): """Operation to get an item from an object.""" diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index f7a9958f5..dfd9a6af8 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -6,7 +6,6 @@ import dataclasses import inspect import json import re -import sys import typing from typing import ( TYPE_CHECKING, @@ -15,7 +14,7 @@ from typing import ( List, Literal, NoReturn, - Set, + Sequence, Tuple, Type, Union, @@ -596,7 +595,7 @@ _decode_var_pattern = re.compile(_decode_var_pattern_re, flags=re.DOTALL) @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralStringVar(LiteralVar, StringVar[str]): """Base class for immutable literal string vars.""" @@ -718,7 +717,7 @@ class LiteralStringVar(LiteralVar, StringVar[str]): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class ConcatVarOperation(CachedVarOperation, StringVar[str]): """Representing a concatenation of literal string vars.""" @@ -794,7 +793,8 @@ class ConcatVarOperation(CachedVarOperation, StringVar[str]): ) -ARRAY_VAR_TYPE = TypeVar("ARRAY_VAR_TYPE", bound=Union[List, Tuple, Set]) +ARRAY_VAR_TYPE = TypeVar("ARRAY_VAR_TYPE", bound=Sequence, covariant=True) +OTHER_ARRAY_VAR_TYPE = TypeVar("OTHER_ARRAY_VAR_TYPE", bound=Sequence) OTHER_TUPLE = TypeVar("OTHER_TUPLE") @@ -887,6 +887,11 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): i: Literal[0, -2], ) -> NumberVar: ... + @overload + def __getitem__( + self: ArrayVar[Tuple[Any, bool]], i: Literal[1, -1] + ) -> BooleanVar: ... + @overload def __getitem__( self: ( @@ -914,7 +919,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): @overload def __getitem__( - self: ArrayVar[Tuple[Any, bool]], i: Literal[1, -1] + self: ARRAY_VAR_OF_LIST_ELEMENT[bool], i: int | NumberVar ) -> BooleanVar: ... @overload @@ -932,23 +937,12 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): self: ARRAY_VAR_OF_LIST_ELEMENT[str], i: int | NumberVar ) -> StringVar: ... - @overload - def __getitem__( - self: ARRAY_VAR_OF_LIST_ELEMENT[bool], i: int | NumberVar - ) -> BooleanVar: ... - @overload def __getitem__( self: ARRAY_VAR_OF_LIST_ELEMENT[List[INNER_ARRAY_VAR]], i: int | NumberVar, ) -> ArrayVar[List[INNER_ARRAY_VAR]]: ... - @overload - def __getitem__( - self: ARRAY_VAR_OF_LIST_ELEMENT[Set[INNER_ARRAY_VAR]], - i: int | NumberVar, - ) -> ArrayVar[Set[INNER_ARRAY_VAR]]: ... - @overload def __getitem__( self: ARRAY_VAR_OF_LIST_ELEMENT[Tuple[KEY_TYPE, VALUE_TYPE]], @@ -1239,26 +1233,18 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): LIST_ELEMENT = TypeVar("LIST_ELEMENT") -ARRAY_VAR_OF_LIST_ELEMENT = Union[ - ArrayVar[List[LIST_ELEMENT]], - ArrayVar[Set[LIST_ELEMENT]], - ArrayVar[Tuple[LIST_ELEMENT, ...]], -] +ARRAY_VAR_OF_LIST_ELEMENT = ArrayVar[Sequence[LIST_ELEMENT]] @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralArrayVar(CachedVarOperation, LiteralVar, ArrayVar[ARRAY_VAR_TYPE]): """Base class for immutable literal array vars.""" - _var_value: Union[ - List[Union[Var, Any]], - Set[Union[Var, Any]], - Tuple[Union[Var, Any], ...], - ] = dataclasses.field(default_factory=list) + _var_value: Sequence[Union[Var, Any]] = dataclasses.field(default=()) @cached_property_no_lock def _cached_var_name(self) -> str: @@ -1303,22 +1289,28 @@ class LiteralArrayVar(CachedVarOperation, LiteralVar, ArrayVar[ARRAY_VAR_TYPE]): Returns: The JSON representation of the var. + + Raises: + TypeError: If the array elements are not of type LiteralVar. """ - return ( - "[" - + ", ".join( - [LiteralVar.create(element).json() for element in self._var_value] - ) - + "]" - ) + elements = [] + for element in self._var_value: + element_var = LiteralVar.create(element) + if not isinstance(element_var, LiteralVar): + raise TypeError( + f"Array elements must be of type LiteralVar, not {type(element_var)}" + ) + elements.append(element_var.json()) + + return "[" + ", ".join(elements) + "]" @classmethod def create( cls, - value: ARRAY_VAR_TYPE, - _var_type: Type[ARRAY_VAR_TYPE] | None = None, + value: OTHER_ARRAY_VAR_TYPE, + _var_type: Type[OTHER_ARRAY_VAR_TYPE] | None = None, _var_data: VarData | None = None, - ) -> LiteralArrayVar[ARRAY_VAR_TYPE]: + ) -> LiteralArrayVar[OTHER_ARRAY_VAR_TYPE]: """Create a var from a string value. Args: @@ -1329,7 +1321,7 @@ class LiteralArrayVar(CachedVarOperation, LiteralVar, ArrayVar[ARRAY_VAR_TYPE]): Returns: The var. """ - return cls( + return LiteralArrayVar( _js_expr="", _var_type=figure_out_type(value) if _var_type is None else _var_type, _var_data=_var_data, @@ -1356,7 +1348,7 @@ def string_split_operation(string: StringVar[Any], sep: StringVar | str = ""): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class ArraySliceOperation(CachedVarOperation, ArrayVar): """Base class for immutable string vars that are the result of a string slice operation.""" @@ -1705,7 +1697,7 @@ class ColorVar(StringVar[Color], python_types=Color): @dataclasses.dataclass( eq=False, frozen=True, - **{"slots": True} if sys.version_info >= (3, 10) else {}, + slots=True, ) class LiteralColorVar(CachedVarOperation, LiteralVar, ColorVar): """Base class for immutable literal color vars.""" diff --git a/tests/units/components/core/test_match.py b/tests/units/components/core/test_match.py index 47652cd43..11602b77a 100644 --- a/tests/units/components/core/test_match.py +++ b/tests/units/components/core/test_match.py @@ -3,6 +3,7 @@ from typing import List, Mapping, Tuple import pytest import reflex as rx +from reflex.components.component import Component from reflex.components.core.match import Match from reflex.state import BaseState from reflex.utils.exceptions import MatchTypeError @@ -29,6 +30,8 @@ def test_match_components(): rx.text("default value"), ) match_comp = Match.create(MatchState.value, *match_case_tuples) + + assert isinstance(match_comp, Component) match_dict = match_comp.render() assert match_dict["name"] == "Fragment" @@ -151,6 +154,7 @@ def test_match_on_component_without_default(): ) match_comp = Match.create(MatchState.value, *match_case_tuples) + assert isinstance(match_comp, Component) default = match_comp.render()["children"][0]["default"] assert isinstance(default, dict) and default["name"] == Fragment.__name__ diff --git a/tests/units/components/test_component.py b/tests/units/components/test_component.py index 26e530f7c..8cffa6e0e 100644 --- a/tests/units/components/test_component.py +++ b/tests/units/components/test_component.py @@ -36,6 +36,7 @@ from reflex.utils.exceptions import ( from reflex.utils.imports import ImportDict, ImportVar, ParsedImportDict, parse_imports from reflex.vars import VarData from reflex.vars.base import LiteralVar, Var +from reflex.vars.object import ObjectVar @pytest.fixture @@ -842,12 +843,12 @@ def test_component_event_trigger_arbitrary_args(): """Test that we can define arbitrary types for the args of an event trigger.""" def on_foo_spec( - _e: Var[JavascriptInputEvent], + _e: ObjectVar[JavascriptInputEvent], alpha: Var[str], bravo: dict[str, Any], - charlie: Var[_Obj], + charlie: ObjectVar[_Obj], ): - return [_e.target.value, bravo["nested"], charlie.custom + 42] + return [_e.target.value, bravo["nested"], charlie.custom.to(int) + 42] class C1(Component): library = "/local" @@ -1328,7 +1329,7 @@ class EventState(rx.State): ), pytest.param( rx.fragment(class_name=[TEST_VAR, "other-class"]), - [LiteralVar.create([TEST_VAR, "other-class"]).join(" ")], + [Var.create([TEST_VAR, "other-class"]).join(" ")], id="fstring-dual-class_name", ), pytest.param( diff --git a/tests/units/test_app.py b/tests/units/test_app.py index 074e7f2ef..4a6c16d6e 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -471,15 +471,15 @@ async def test_dynamic_var_event(test_state: Type[ATestState], token: str): """ state = test_state() # pyright: ignore [reportCallIssue] state.add_var("int_val", int, 0) - result = await state._process( + async for result in state._process( Event( token=token, name=f"{test_state.get_name()}.set_int_val", router_data={"pathname": "/", "query": {}}, payload={"value": 50}, ) - ).__anext__() - assert result.delta == {test_state.get_name(): {"int_val": 50}} + ): + assert result.delta == {test_state.get_name(): {"int_val": 50}} @pytest.mark.asyncio @@ -583,18 +583,17 @@ async def test_list_mutation_detection__plain_list( token: a Token. """ for event_name, expected_delta in event_tuples: - result = await list_mutation_state._process( + async for result in list_mutation_state._process( Event( token=token, name=f"{list_mutation_state.get_name()}.{event_name}", router_data={"pathname": "/", "query": {}}, payload={}, ) - ).__anext__() - - # prefix keys in expected_delta with the state name - expected_delta = {list_mutation_state.get_name(): expected_delta} - assert result.delta == expected_delta + ): + # prefix keys in expected_delta with the state name + expected_delta = {list_mutation_state.get_name(): expected_delta} + assert result.delta == expected_delta @pytest.mark.asyncio @@ -709,19 +708,18 @@ async def test_dict_mutation_detection__plain_list( token: a Token. """ for event_name, expected_delta in event_tuples: - result = await dict_mutation_state._process( + async for result in dict_mutation_state._process( Event( token=token, name=f"{dict_mutation_state.get_name()}.{event_name}", router_data={"pathname": "/", "query": {}}, payload={}, ) - ).__anext__() + ): + # prefix keys in expected_delta with the state name + expected_delta = {dict_mutation_state.get_name(): expected_delta} - # prefix keys in expected_delta with the state name - expected_delta = {dict_mutation_state.get_name(): expected_delta} - - assert result.delta == expected_delta + assert result.delta == expected_delta @pytest.mark.asyncio diff --git a/tests/units/test_state.py b/tests/units/test_state.py index b276bad4b..9e1932305 100644 --- a/tests/units/test_state.py +++ b/tests/units/test_state.py @@ -789,17 +789,16 @@ async def test_process_event_simple(test_state): assert test_state.num1 == 0 event = Event(token="t", name="set_num1", payload={"value": 69}) - update = await test_state._process(event).__anext__() + async for update in test_state._process(event): + # The event should update the value. + assert test_state.num1 == 69 - # The event should update the value. - assert test_state.num1 == 69 - - # The delta should contain the changes, including computed vars. - assert update.delta == { - TestState.get_full_name(): {"num1": 69, "sum": 72.14}, - GrandchildState3.get_full_name(): {"computed": ""}, - } - assert update.events == [] + # The delta should contain the changes, including computed vars. + assert update.delta == { + TestState.get_full_name(): {"num1": 69, "sum": 72.14}, + GrandchildState3.get_full_name(): {"computed": ""}, + } + assert update.events == [] @pytest.mark.asyncio @@ -819,15 +818,15 @@ async def test_process_event_substate(test_state, child_state, grandchild_state) name=f"{ChildState.get_name()}.change_both", payload={"value": "hi", "count": 12}, ) - update = await test_state._process(event).__anext__() - assert child_state.value == "HI" - assert child_state.count == 24 - assert update.delta == { - # TestState.get_full_name(): {"sum": 3.14, "upper": ""}, - ChildState.get_full_name(): {"value": "HI", "count": 24}, - GrandchildState3.get_full_name(): {"computed": ""}, - } - test_state._clean() + async for update in test_state._process(event): + assert child_state.value == "HI" + assert child_state.count == 24 + assert update.delta == { + # TestState.get_full_name(): {"sum": 3.14, "upper": ""}, + ChildState.get_full_name(): {"value": "HI", "count": 24}, + GrandchildState3.get_full_name(): {"computed": ""}, + } + test_state._clean() # Test with the granchild state. assert grandchild_state.value2 == "" @@ -836,13 +835,13 @@ async def test_process_event_substate(test_state, child_state, grandchild_state) name=f"{GrandchildState.get_full_name()}.set_value2", payload={"value": "new"}, ) - update = await test_state._process(event).__anext__() - assert grandchild_state.value2 == "new" - assert update.delta == { - # TestState.get_full_name(): {"sum": 3.14, "upper": ""}, - GrandchildState.get_full_name(): {"value2": "new"}, - GrandchildState3.get_full_name(): {"computed": ""}, - } + async for update in test_state._process(event): + assert grandchild_state.value2 == "new" + assert update.delta == { + # TestState.get_full_name(): {"sum": 3.14, "upper": ""}, + GrandchildState.get_full_name(): {"value2": "new"}, + GrandchildState3.get_full_name(): {"computed": ""}, + } @pytest.mark.asyncio @@ -2909,10 +2908,10 @@ async def test_preprocess(app_module_mock, token, test_state, expected, mocker): events = updates[0].events assert len(events) == 2 - assert (await state._process(events[0]).__anext__()).delta == { - test_state.get_full_name(): {"num": 1} - } - assert (await state._process(events[1]).__anext__()).delta == exp_is_hydrated(state) + async for update in state._process(events[0]): + assert update.delta == {test_state.get_full_name(): {"num": 1}} + async for update in state._process(events[1]): + assert update.delta == exp_is_hydrated(state) if isinstance(app.state_manager, StateManagerRedis): await app.state_manager.close() @@ -2957,13 +2956,12 @@ async def test_preprocess_multiple_load_events(app_module_mock, token, mocker): events = updates[0].events assert len(events) == 3 - assert (await state._process(events[0]).__anext__()).delta == { - OnLoadState.get_full_name(): {"num": 1} - } - assert (await state._process(events[1]).__anext__()).delta == { - OnLoadState.get_full_name(): {"num": 2} - } - assert (await state._process(events[2]).__anext__()).delta == exp_is_hydrated(state) + async for update in state._process(events[0]): + assert update.delta == {OnLoadState.get_full_name(): {"num": 1}} + async for update in state._process(events[1]): + assert update.delta == {OnLoadState.get_full_name(): {"num": 2}} + async for update in state._process(events[2]): + assert update.delta == exp_is_hydrated(state) if isinstance(app.state_manager, StateManagerRedis): await app.state_manager.close() diff --git a/tests/units/test_var.py b/tests/units/test_var.py index a5cd56a91..ef19e86e8 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -1,6 +1,5 @@ import json import math -import sys import typing from typing import Dict, List, Mapping, Optional, Set, Tuple, Union, cast @@ -422,19 +421,13 @@ class Bar(rx.Base): @pytest.mark.parametrize( ("var", "var_type"), - ( - [ - (Var(_js_expr="", _var_type=Foo | Bar).guess_type(), Foo | Bar), - (Var(_js_expr="", _var_type=Foo | Bar).guess_type().bar, Union[int, str]), - ] - if sys.version_info >= (3, 10) - else [] - ) - + [ - (Var(_js_expr="", _var_type=Union[Foo, Bar]).guess_type(), Union[Foo, Bar]), - (Var(_js_expr="", _var_type=Union[Foo, Bar]).guess_type().baz, str), + [ + (Var(_js_expr="").to(Foo | Bar), Foo | Bar), + (Var(_js_expr="").to(Foo | Bar).bar, Union[int, str]), + (Var(_js_expr="").to(Union[Foo, Bar]), Union[Foo, Bar]), + (Var(_js_expr="").to(Union[Foo, Bar]).baz, str), ( - Var(_js_expr="", _var_type=Union[Foo, Bar]).guess_type().foo, + Var(_js_expr="").to(Union[Foo, Bar]).foo, Union[int, None], ), ], @@ -1358,7 +1351,7 @@ def test_unsupported_types_for_contains(var: Var): var: The base var. """ with pytest.raises(TypeError) as err: - assert var.contains(1) + assert var.contains(1) # pyright: ignore [reportAttributeAccessIssue] assert ( err.value.args[0] == f"Var of type {var._var_type} does not support contains check." @@ -1388,7 +1381,7 @@ def test_unsupported_types_for_string_contains(other): def test_unsupported_default_contains(): with pytest.raises(TypeError) as err: - assert 1 in Var(_js_expr="var", _var_type=str).guess_type() + assert 1 in Var(_js_expr="var", _var_type=str).guess_type() # pyright: ignore [reportOperatorIssue] assert ( err.value.args[0] == "'in' operator not supported for Var types, use Var.contains() instead." From 7da5fa0e5cd5e8b072dd7ac007884abf5609007a Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 14:28:04 -0800 Subject: [PATCH 067/144] implement a global var cache (#4691) * implement a global var cache * fix misisng types --------- Co-authored-by: Masen Furer --- reflex/vars/base.py | 86 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 81 insertions(+), 5 deletions(-) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index d34bc8ff5..8a76f250d 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -12,6 +12,7 @@ import json import random import re import string +import uuid import warnings from types import CodeType, FunctionType from typing import ( @@ -1666,17 +1667,92 @@ def figure_out_type(value: Any) -> types.GenericType: return type(value) -class cached_property_no_lock(functools.cached_property): # noqa: N801 - """A special version of functools.cached_property that does not use a lock.""" +GLOBAL_CACHE = {} + + +class cached_property: # noqa: N801 + """A cached property that caches the result of the function.""" def __init__(self, func: Callable): - """Initialize the cached_property_no_lock. + """Initialize the cached_property. Args: func: The function to cache. """ - super().__init__(func) - self.lock = contextlib.nullcontext() + self._func = func + self._attrname = None + + def __set_name__(self, owner: Any, name: str): + """Set the name of the cached property. + + Args: + owner: The owner of the cached property. + name: The name of the cached property. + + Raises: + TypeError: If the cached property is assigned to two different names. + """ + if self._attrname is None: + self._attrname = name + + original_del = getattr(owner, "__del__", None) + + def delete_property(this: Any): + """Delete the cached property. + + Args: + this: The object to delete the cached property from. + """ + cached_field_name = "_reflex_cache_" + name + try: + unique_id = object.__getattribute__(this, cached_field_name) + except AttributeError: + if original_del is not None: + original_del(this) + return + if unique_id in GLOBAL_CACHE: + del GLOBAL_CACHE[unique_id] + + if original_del is not None: + original_del(this) + + owner.__del__ = delete_property + + elif name != self._attrname: + raise TypeError( + "Cannot assign the same cached_property to two different names " + f"({self._attrname!r} and {name!r})." + ) + + def __get__(self, instance: Any, owner: Type | None = None): + """Get the cached property. + + Args: + instance: The instance to get the cached property from. + owner: The owner of the cached property. + + Returns: + The cached property. + + Raises: + TypeError: If the class does not have __set_name__. + """ + if self._attrname is None: + raise TypeError( + "Cannot use cached_property on a class without __set_name__." + ) + cached_field_name = "_reflex_cache_" + self._attrname + try: + unique_id = object.__getattribute__(instance, cached_field_name) + except AttributeError: + unique_id = uuid.uuid4().int + object.__setattr__(instance, cached_field_name, unique_id) + if unique_id not in GLOBAL_CACHE: + GLOBAL_CACHE[unique_id] = self._func(instance) + return GLOBAL_CACHE[unique_id] + + +cached_property_no_lock = cached_property class CachedVarOperation: From a2243190ff6818b6108ebf841e6dac1509e45569 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 31 Jan 2025 16:33:30 -0800 Subject: [PATCH 068/144] [ENG-4326] Async ComputedVar (#4711) * WiP * Save the var from get_var_name * flatten StateManagerRedis.get_state algorithm simplify fetching of states and avoid repeatedly fetching the same state * Get all the states in a single redis round-trip * update docstrings in StateManagerRedis * Move computed var dep tracking to separate module * Fix pre-commit issues * ComputedVar.add_dependency: explicitly dependency declaration Allow var dependencies to be added at runtime, for example, when defining a ComponentState that depends on vars that cannot be known statically. Fix more pyright issues. * Fix/ignore more pyright issues from recent merge * handle cleaning out _potentially_dirty_states on reload * ignore accessed attributes missing on state class these might be added dynamically later in which case we recompute the dependency tracking dicts... if not, they'll blow up anyway at runtime. * fix playwright tests, which insist on running an asyncio loop --------- Co-authored-by: Khaleel Al-Adhami --- reflex/app.py | 16 +- reflex/compiler/utils.py | 24 +- reflex/middleware/hydrate_middleware.py | 4 +- reflex/state.py | 570 ++++++++---------- reflex/utils/exec.py | 2 +- reflex/vars/base.py | 347 +++++++---- reflex/vars/dep_tracking.py | 344 +++++++++++ .../tests_playwright/test_table.py | 12 +- tests/units/test_app.py | 18 +- tests/units/test_state.py | 212 +++++-- tests/units/test_var.py | 28 +- 11 files changed, 1088 insertions(+), 489 deletions(-) create mode 100644 reflex/vars/dep_tracking.py diff --git a/reflex/app.py b/reflex/app.py index ad123a655..ce6808816 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -908,11 +908,17 @@ class App(MiddlewareMixin, LifespanMixin): if not var._cache: continue deps = var._deps(objclass=state) - for dep in deps: - if dep not in state.vars and dep not in state.backend_vars: - raise exceptions.VarDependencyError( - f"ComputedVar {var._js_expr} on state {state.__name__} has an invalid dependency {dep}" - ) + for state_name, dep_set in deps.items(): + state_cls = ( + state.get_root_state().get_class_substate(state_name) + if state_name != state.get_full_name() + else state + ) + for dep in dep_set: + if dep not in state_cls.vars and dep not in state_cls.backend_vars: + raise exceptions.VarDependencyError( + f"ComputedVar {var._js_expr} on state {state.__name__} has an invalid dependency {state_name}.{dep}" + ) for substate in state.class_subclasses: self._validate_var_dependencies(substate) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index d145e6c0b..9b388400b 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -2,12 +2,15 @@ from __future__ import annotations +import asyncio +import concurrent.futures import traceback from datetime import datetime from pathlib import Path from typing import Any, Callable, Dict, Optional, Type, Union from urllib.parse import urlparse +from reflex.utils.exec import is_in_app_harness from reflex.utils.prerequisites import get_web_dir from reflex.vars.base import Var @@ -33,7 +36,7 @@ from reflex.components.base import ( ) from reflex.components.component import Component, ComponentStyle, CustomComponent from reflex.istate.storage import Cookie, LocalStorage, SessionStorage -from reflex.state import BaseState +from reflex.state import BaseState, _resolve_delta from reflex.style import Style from reflex.utils import console, format, imports, path_ops from reflex.utils.imports import ImportVar, ParsedImportDict @@ -177,7 +180,24 @@ def compile_state(state: Type[BaseState]) -> dict: initial_state = state(_reflex_internal_init=True).dict( initial=True, include_computed=False ) - return initial_state + try: + _ = asyncio.get_running_loop() + except RuntimeError: + pass + else: + if is_in_app_harness(): + # Playwright tests already have an event loop running, so we can't use asyncio.run. + with concurrent.futures.ThreadPoolExecutor() as pool: + resolved_initial_state = pool.submit( + asyncio.run, _resolve_delta(initial_state) + ).result() + console.warn( + f"Had to get initial state in a thread 🤮 {resolved_initial_state}", + ) + return resolved_initial_state + + # Normally the compile runs before any event loop starts, we asyncio.run is available for calling. + return asyncio.run(_resolve_delta(initial_state)) def _compile_client_storage_field( diff --git a/reflex/middleware/hydrate_middleware.py b/reflex/middleware/hydrate_middleware.py index 2198b82c2..2dea54e17 100644 --- a/reflex/middleware/hydrate_middleware.py +++ b/reflex/middleware/hydrate_middleware.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Optional from reflex import constants from reflex.event import Event, get_hydrate_event from reflex.middleware.middleware import Middleware -from reflex.state import BaseState, StateUpdate +from reflex.state import BaseState, StateUpdate, _resolve_delta if TYPE_CHECKING: from reflex.app import App @@ -42,7 +42,7 @@ class HydrateMiddleware(Middleware): setattr(state, constants.CompileVars.IS_HYDRATED, False) # Get the initial state. - delta = state.dict() + delta = await _resolve_delta(state.dict()) # since a full dict was captured, clean any dirtiness state._clean() diff --git a/reflex/state.py b/reflex/state.py index 6c74d5e55..92aaa4710 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -15,7 +15,6 @@ import time import typing import uuid from abc import ABC, abstractmethod -from collections import defaultdict from hashlib import md5 from pathlib import Path from types import FunctionType, MethodType @@ -329,6 +328,25 @@ def get_var_for_field(cls: Type[BaseState], f: ModelField): ) +async def _resolve_delta(delta: Delta) -> Delta: + """Await all coroutines in the delta. + + Args: + delta: The delta to process. + + Returns: + The same delta dict with all coroutines resolved to their return value. + """ + tasks = {} + for state_name, state_delta in delta.items(): + for var_name, value in state_delta.items(): + if asyncio.iscoroutine(value): + tasks[state_name, var_name] = asyncio.create_task(value) + for (state_name, var_name), task in tasks.items(): + delta[state_name][var_name] = await task + return delta + + class BaseState(Base, ABC, extra=pydantic.Extra.allow): """The state of the app.""" @@ -356,11 +374,8 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): # A set of subclassses of this class. class_subclasses: ClassVar[Set[Type[BaseState]]] = set() - # Mapping of var name to set of computed variables that depend on it - _computed_var_dependencies: ClassVar[Dict[str, Set[str]]] = {} - - # Mapping of var name to set of substates that depend on it - _substate_var_dependencies: ClassVar[Dict[str, Set[str]]] = {} + # Mapping of var name to set of (state_full_name, var_name) that depend on it. + _var_dependencies: ClassVar[Dict[str, Set[Tuple[str, str]]]] = {} # Set of vars which always need to be recomputed _always_dirty_computed_vars: ClassVar[Set[str]] = set() @@ -368,6 +383,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): # Set of substates which always need to be recomputed _always_dirty_substates: ClassVar[Set[str]] = set() + # Set of states which might need to be recomputed if vars in this state change. + _potentially_dirty_states: ClassVar[Set[str]] = set() + # The parent state. parent_state: Optional[BaseState] = None @@ -519,6 +537,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): # Reset dirty substate tracking for this class. cls._always_dirty_substates = set() + cls._potentially_dirty_states = set() # Get the parent vars. parent_state = cls.get_parent_state() @@ -622,8 +641,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): setattr(cls, name, handler) # Initialize per-class var dependency tracking. - cls._computed_var_dependencies = defaultdict(set) - cls._substate_var_dependencies = defaultdict(set) + cls._var_dependencies = {} cls._init_var_dependency_dicts() @staticmethod @@ -768,26 +786,27 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): Additional updates tracking dicts for vars and substates that always need to be recomputed. """ - inherited_vars = set(cls.inherited_vars).union( - set(cls.inherited_backend_vars), - ) for cvar_name, cvar in cls.computed_vars.items(): - # Add the dependencies. - for var in cvar._deps(objclass=cls): - cls._computed_var_dependencies[var].add(cvar_name) - if var in inherited_vars: - # track that this substate depends on its parent for this var - state_name = cls.get_name() - parent_state = cls.get_parent_state() - while parent_state is not None and var in { - **parent_state.vars, - **parent_state.backend_vars, + if not cvar._cache: + # Do not perform dep calculation when cache=False (these are always dirty). + continue + for state_name, dvar_set in cvar._deps(objclass=cls).items(): + state_cls = cls.get_root_state().get_class_substate(state_name) + for dvar in dvar_set: + defining_state_cls = state_cls + while dvar in { + *defining_state_cls.inherited_vars, + *defining_state_cls.inherited_backend_vars, }: - parent_state._substate_var_dependencies[var].add(state_name) - state_name, parent_state = ( - parent_state.get_name(), - parent_state.get_parent_state(), - ) + parent_state = defining_state_cls.get_parent_state() + if parent_state is not None: + defining_state_cls = parent_state + defining_state_cls._var_dependencies.setdefault(dvar, set()).add( + (cls.get_full_name(), cvar_name) + ) + defining_state_cls._potentially_dirty_states.add( + cls.get_full_name() + ) # ComputedVar with cache=False always need to be recomputed cls._always_dirty_computed_vars = { @@ -902,6 +921,17 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): raise ValueError(f"Only one parent state is allowed {parent_states}.") return parent_states[0] if len(parent_states) == 1 else None + @classmethod + @functools.lru_cache() + def get_root_state(cls) -> Type[BaseState]: + """Get the root state. + + Returns: + The root state. + """ + parent_state = cls.get_parent_state() + return cls if parent_state is None else parent_state.get_root_state() + @classmethod def get_substates(cls) -> set[Type[BaseState]]: """Get the substates of the state. @@ -1351,7 +1381,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): super().__setattr__(name, value) # Add the var to the dirty list. - if name in self.vars or name in self._computed_var_dependencies: + if name in self.base_vars: self.dirty_vars.add(name) self._mark_dirty() @@ -1422,64 +1452,21 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): return self.substates[path[0]].get_substate(path[1:]) @classmethod - def _get_common_ancestor(cls, other: Type[BaseState]) -> str: - """Find the name of the nearest common ancestor shared by this and the other state. - - Args: - other: The other state. + def _get_potentially_dirty_states(cls) -> set[type[BaseState]]: + """Get substates which may have dirty vars due to dependencies. Returns: - Full name of the nearest common ancestor. + The set of potentially dirty substate classes. """ - common_ancestor_parts = [] - for part1, part2 in zip( - cls.get_full_name().split("."), - other.get_full_name().split("."), - strict=True, - ): - if part1 != part2: - break - common_ancestor_parts.append(part1) - return ".".join(common_ancestor_parts) - - @classmethod - def _determine_missing_parent_states( - cls, target_state_cls: Type[BaseState] - ) -> tuple[str, list[str]]: - """Determine the missing parent states between the target_state_cls and common ancestor of this state. - - Args: - target_state_cls: The class of the state to find missing parent states for. - - Returns: - The name of the common ancestor and the list of missing parent states. - """ - common_ancestor_name = cls._get_common_ancestor(target_state_cls) - common_ancestor_parts = common_ancestor_name.split(".") - target_state_parts = tuple(target_state_cls.get_full_name().split(".")) - relative_target_state_parts = target_state_parts[len(common_ancestor_parts) :] - - # Determine which parent states to fetch from the common ancestor down to the target_state_cls. - fetch_parent_states = [common_ancestor_name] - for relative_parent_state_name in relative_target_state_parts: - fetch_parent_states.append( - ".".join((fetch_parent_states[-1], relative_parent_state_name)) - ) - - return common_ancestor_name, fetch_parent_states[1:-1] - - def _get_parent_states(self) -> list[tuple[str, BaseState]]: - """Get all parent state instances up to the root of the state tree. - - Returns: - A list of tuples containing the name and the instance of each parent state. - """ - parent_states_with_name = [] - parent_state = self - while parent_state.parent_state is not None: - parent_state = parent_state.parent_state - parent_states_with_name.append((parent_state.get_full_name(), parent_state)) - return parent_states_with_name + return { + cls.get_class_substate(substate_name) + for substate_name in cls._always_dirty_substates + }.union( + { + cls.get_root_state().get_class_substate(substate_name) + for substate_name in cls._potentially_dirty_states + } + ) def _get_root_state(self) -> BaseState: """Get the root state of the state tree. @@ -1492,55 +1479,38 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): parent_state = parent_state.parent_state return parent_state - async def _populate_parent_states(self, target_state_cls: Type[BaseState]): - """Populate substates in the tree between the target_state_cls and common ancestor of this state. + async def _get_state_from_redis(self, state_cls: Type[T_STATE]) -> T_STATE: + """Get a state instance from redis. Args: - target_state_cls: The class of the state to populate parent states for. + state_cls: The class of the state. Returns: - The parent state instance of target_state_cls. + The instance of state_cls associated with this state's client_token. Raises: RuntimeError: If redis is not used in this backend process. + StateMismatchError: If the state instance is not of the expected type. """ + # Then get the target state and all its substates. state_manager = get_state_manager() if not isinstance(state_manager, StateManagerRedis): raise RuntimeError( - f"Cannot populate parent states of {target_state_cls.get_full_name()} without redis. " + f"Requested state {state_cls.get_full_name()} is not cached and cannot be accessed without redis. " "(All states should already be available -- this is likely a bug).", ) + state_in_redis = await state_manager.get_state( + token=_substate_key(self.router.session.client_token, state_cls), + top_level=False, + for_state_instance=self, + ) - # Find the missing parent states up to the common ancestor. - ( - common_ancestor_name, - missing_parent_states, - ) = self._determine_missing_parent_states(target_state_cls) - - # Fetch all missing parent states and link them up to the common ancestor. - parent_states_tuple = self._get_parent_states() - root_state = parent_states_tuple[-1][1] - parent_states_by_name = dict(parent_states_tuple) - parent_state = parent_states_by_name[common_ancestor_name] - for parent_state_name in missing_parent_states: - try: - parent_state = root_state.get_substate(parent_state_name.split(".")) - # The requested state is already cached, do NOT fetch it again. - continue - except ValueError: - # The requested state is missing, fetch from redis. - pass - parent_state = await state_manager.get_state( - token=_substate_key( - self.router.session.client_token, parent_state_name - ), - top_level=False, - get_substates=False, - parent_state=parent_state, + if not isinstance(state_in_redis, state_cls): + raise StateMismatchError( + f"Searched for state {state_cls.get_full_name()} but found {state_in_redis}." ) - # Return the direct parent of target_state_cls for subsequent linking. - return parent_state + return state_in_redis def _get_state_from_cache(self, state_cls: Type[T_STATE]) -> T_STATE: """Get a state instance from the cache. @@ -1562,44 +1532,6 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): ) return substate - async def _get_state_from_redis(self, state_cls: Type[T_STATE]) -> T_STATE: - """Get a state instance from redis. - - Args: - state_cls: The class of the state. - - Returns: - The instance of state_cls associated with this state's client_token. - - Raises: - RuntimeError: If redis is not used in this backend process. - StateMismatchError: If the state instance is not of the expected type. - """ - # Fetch all missing parent states from redis. - parent_state_of_state_cls = await self._populate_parent_states(state_cls) - - # Then get the target state and all its substates. - state_manager = get_state_manager() - if not isinstance(state_manager, StateManagerRedis): - raise RuntimeError( - f"Requested state {state_cls.get_full_name()} is not cached and cannot be accessed without redis. " - "(All states should already be available -- this is likely a bug).", - ) - - state_in_redis = await state_manager.get_state( - token=_substate_key(self.router.session.client_token, state_cls), - top_level=False, - get_substates=True, - parent_state=parent_state_of_state_cls, - ) - - if not isinstance(state_in_redis, state_cls): - raise StateMismatchError( - f"Searched for state {state_cls.get_full_name()} but found {state_in_redis}." - ) - - return state_in_redis - async def get_state(self, state_cls: Type[T_STATE]) -> T_STATE: """Get an instance of the state associated with this token. @@ -1738,7 +1670,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): f"Your handler {handler.fn.__qualname__} must only return/yield: None, Events or other EventHandlers referenced by their class (not using `self`)" ) - def _as_state_update( + async def _as_state_update( self, handler: EventHandler, events: EventSpec | list[EventSpec] | None, @@ -1766,7 +1698,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): try: # Get the delta after processing the event. - delta = state.get_delta() + delta = await _resolve_delta(state.get_delta()) state._clean() return StateUpdate( @@ -1866,24 +1798,28 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): # Handle async generators. if inspect.isasyncgen(events): async for event in events: - yield state._as_state_update(handler, event, final=False) - yield state._as_state_update(handler, events=None, final=True) + yield await state._as_state_update(handler, event, final=False) + yield await state._as_state_update(handler, events=None, final=True) # Handle regular generators. elif inspect.isgenerator(events): try: while True: - yield state._as_state_update(handler, next(events), final=False) + yield await state._as_state_update( + handler, next(events), final=False + ) except StopIteration as si: # the "return" value of the generator is not available # in the loop, we must catch StopIteration to access it if si.value is not None: - yield state._as_state_update(handler, si.value, final=False) - yield state._as_state_update(handler, events=None, final=True) + yield await state._as_state_update( + handler, si.value, final=False + ) + yield await state._as_state_update(handler, events=None, final=True) # Handle regular event chains. else: - yield state._as_state_update(handler, events, final=True) + yield await state._as_state_update(handler, events, final=True) # If an error occurs, throw a window alert. except Exception as ex: @@ -1893,7 +1829,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): prerequisites.get_and_validate_app().app.backend_exception_handler(ex) ) - yield state._as_state_update( + yield await state._as_state_update( handler, event_specs, final=True, @@ -1901,15 +1837,28 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): def _mark_dirty_computed_vars(self) -> None: """Mark ComputedVars that need to be recalculated based on dirty_vars.""" + # Append expired computed vars to dirty_vars to trigger recalculation + self.dirty_vars.update(self._expired_computed_vars()) + # Append always dirty computed vars to dirty_vars to trigger recalculation + self.dirty_vars.update(self._always_dirty_computed_vars) + dirty_vars = self.dirty_vars while dirty_vars: calc_vars, dirty_vars = dirty_vars, set() - for cvar in self._dirty_computed_vars(from_vars=calc_vars): - self.dirty_vars.add(cvar) + for state_name, cvar in self._dirty_computed_vars(from_vars=calc_vars): + if state_name == self.get_full_name(): + defining_state = self + else: + defining_state = self._get_root_state().get_substate( + tuple(state_name.split(".")) + ) + defining_state.dirty_vars.add(cvar) dirty_vars.add(cvar) - actual_var = self.computed_vars.get(cvar) + actual_var = defining_state.computed_vars.get(cvar) if actual_var is not None: - actual_var.mark_dirty(instance=self) + actual_var.mark_dirty(instance=defining_state) + if defining_state is not self: + defining_state._mark_dirty() def _expired_computed_vars(self) -> set[str]: """Determine ComputedVars that need to be recalculated based on the expiration time. @@ -1925,7 +1874,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): def _dirty_computed_vars( self, from_vars: set[str] | None = None, include_backend: bool = True - ) -> set[str]: + ) -> set[tuple[str, str]]: """Determine ComputedVars that need to be recalculated based on the given vars. Args: @@ -1936,33 +1885,12 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): Set of computed vars to include in the delta. """ return { - cvar + (state_name, cvar) for dirty_var in from_vars or self.dirty_vars - for cvar in self._computed_var_dependencies[dirty_var] + for state_name, cvar in self._var_dependencies.get(dirty_var, set()) if include_backend or not self.computed_vars[cvar]._backend } - @classmethod - def _potentially_dirty_substates(cls) -> set[Type[BaseState]]: - """Determine substates which could be affected by dirty vars in this state. - - Returns: - Set of State classes that may need to be fetched to recalc computed vars. - """ - # _always_dirty_substates need to be fetched to recalc computed vars. - fetch_substates = { - cls.get_class_substate((cls.get_name(), *substate_name.split("."))) - for substate_name in cls._always_dirty_substates - } - for dependent_substates in cls._substate_var_dependencies.values(): - fetch_substates.update( - { - cls.get_class_substate((cls.get_name(), *substate_name.split("."))) - for substate_name in dependent_substates - } - ) - return fetch_substates - def get_delta(self) -> Delta: """Get the delta for the state. @@ -1971,21 +1899,15 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): """ delta = {} - # Apply dirty variables down into substates - self.dirty_vars.update(self._always_dirty_computed_vars) - self._mark_dirty() - + self._mark_dirty_computed_vars() frontend_computed_vars: set[str] = { name for name, cv in self.computed_vars.items() if not cv._backend } # Return the dirty vars for this instance, any cached/dependent computed vars, # and always dirty computed vars (cache=False) - delta_vars = ( - self.dirty_vars.intersection(self.base_vars) - .union(self.dirty_vars.intersection(frontend_computed_vars)) - .union(self._dirty_computed_vars(include_backend=False)) - .union(self._always_dirty_computed_vars) + delta_vars = self.dirty_vars.intersection(self.base_vars).union( + self.dirty_vars.intersection(frontend_computed_vars) ) subdelta: Dict[str, Any] = { @@ -2015,23 +1937,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): self.parent_state.dirty_substates.add(self.get_name()) self.parent_state._mark_dirty() - # Append expired computed vars to dirty_vars to trigger recalculation - self.dirty_vars.update(self._expired_computed_vars()) - # have to mark computed vars dirty to allow access to newly computed # values within the same ComputedVar function self._mark_dirty_computed_vars() - self._mark_dirty_substates() - - def _mark_dirty_substates(self): - """Propagate dirty var / computed var status into substates.""" - substates = self.substates - for var in self.dirty_vars: - for substate_name in self._substate_var_dependencies[var]: - self.dirty_substates.add(substate_name) - substate = substates[substate_name] - substate.dirty_vars.add(var) - substate._mark_dirty() def _update_was_touched(self): """Update the _was_touched flag based on dirty_vars.""" @@ -2103,11 +2011,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): The object as a dictionary. """ if include_computed: - # Apply dirty variables down into substates to allow never-cached ComputedVar to - # trigger recalculation of dependent vars - self.dirty_vars.update(self._always_dirty_computed_vars) - self._mark_dirty() - + self._mark_dirty_computed_vars() base_vars = { prop_name: self.get_value(prop_name) for prop_name in self.base_vars } @@ -2824,7 +2728,7 @@ class StateProxy(wrapt.ObjectProxy): await self.__wrapped__.get_state(state_cls), parent_state_proxy=self ) - def _as_state_update(self, *args, **kwargs) -> StateUpdate: + async def _as_state_update(self, *args, **kwargs) -> StateUpdate: """Temporarily allow mutability to access parent_state. Args: @@ -2837,7 +2741,7 @@ class StateProxy(wrapt.ObjectProxy): original_mutable = self._self_mutable self._self_mutable = True try: - return self.__wrapped__._as_state_update(*args, **kwargs) + return await self.__wrapped__._as_state_update(*args, **kwargs) finally: self._self_mutable = original_mutable @@ -3313,103 +3217,106 @@ class StateManagerRedis(StateManager): b"evicted", } - async def _get_parent_state( - self, token: str, state: BaseState | None = None - ) -> BaseState | None: - """Get the parent state for the state requested in the token. + def _get_required_state_classes( + self, + target_state_cls: Type[BaseState], + subclasses: bool = False, + required_state_classes: set[Type[BaseState]] | None = None, + ) -> set[Type[BaseState]]: + """Recursively determine which states are required to fetch the target state. + + This will always include potentially dirty substates that depend on vars + in the target_state_cls. Args: - token: The token to get the state for (_substate_key). - state: The state instance to get parent state for. + target_state_cls: The target state class being fetched. + subclasses: Whether to include subclasses of the target state. + required_state_classes: Recursive argument tracking state classes that have already been seen. Returns: - The parent state for the state requested by the token or None if there is no such parent. + The set of state classes required to fetch the target state. """ - parent_state = None - client_token, state_path = _split_substate_key(token) - parent_state_name = state_path.rpartition(".")[0] - if parent_state_name: - cached_substates = None - if state is not None: - cached_substates = [state] - # Retrieve the parent state to populate event handlers onto this substate. - parent_state = await self.get_state( - token=_substate_key(client_token, parent_state_name), - top_level=False, - get_substates=False, - cached_substates=cached_substates, + if required_state_classes is None: + required_state_classes = set() + # Get the substates if requested. + if subclasses: + for substate in target_state_cls.get_substates(): + self._get_required_state_classes( + substate, + subclasses=True, + required_state_classes=required_state_classes, + ) + if target_state_cls in required_state_classes: + return required_state_classes + required_state_classes.add(target_state_cls) + + # Get dependent substates. + for pd_substates in target_state_cls._get_potentially_dirty_states(): + self._get_required_state_classes( + pd_substates, + subclasses=False, + required_state_classes=required_state_classes, ) - return parent_state - async def _populate_substates( + # Get the parent state if it exists. + if parent_state := target_state_cls.get_parent_state(): + self._get_required_state_classes( + parent_state, + subclasses=False, + required_state_classes=required_state_classes, + ) + return required_state_classes + + def _get_populated_states( self, - token: str, - state: BaseState, - all_substates: bool = False, - ): - """Fetch and link substates for the given state instance. - - There is no return value; the side-effect is that `state` will have `substates` populated, - and each substate will have its `parent_state` set to `state`. + target_state: BaseState, + populated_states: dict[str, BaseState] | None = None, + ) -> dict[str, BaseState]: + """Recursively determine which states from target_state are already fetched. Args: - token: The token to get the state for. - state: The state instance to populate substates for. - all_substates: Whether to fetch all substates or just required substates. + target_state: The state to check for populated states. + populated_states: Recursive argument tracking states seen in previous calls. + + Returns: + A dictionary of state full name to state instance. """ - client_token, _ = _split_substate_key(token) - - if all_substates: - # All substates are requested. - fetch_substates = state.get_substates() - else: - # Only _potentially_dirty_substates need to be fetched to recalc computed vars. - fetch_substates = state._potentially_dirty_substates() - - tasks = {} - # Retrieve the necessary substates from redis. - for substate_cls in fetch_substates: - if substate_cls.get_name() in state.substates: - continue - substate_name = substate_cls.get_name() - tasks[substate_name] = asyncio.create_task( - self.get_state( - token=_substate_key(client_token, substate_cls), - top_level=False, - get_substates=all_substates, - parent_state=state, - ) + if populated_states is None: + populated_states = {} + if target_state.get_full_name() in populated_states: + return populated_states + populated_states[target_state.get_full_name()] = target_state + for substate in target_state.substates.values(): + self._get_populated_states(substate, populated_states=populated_states) + if target_state.parent_state is not None: + self._get_populated_states( + target_state.parent_state, populated_states=populated_states ) - - for substate_name, substate_task in tasks.items(): - state.substates[substate_name] = await substate_task + return populated_states @override async def get_state( self, token: str, top_level: bool = True, - get_substates: bool = True, - parent_state: BaseState | None = None, - cached_substates: list[BaseState] | None = None, + for_state_instance: BaseState | None = None, ) -> BaseState: """Get the state for a token. Args: token: The token to get the state for. top_level: If true, return an instance of the top-level state (self.state). - get_substates: If true, also retrieve substates. - parent_state: If provided, use this parent_state instead of getting it from redis. - cached_substates: If provided, attach these substates to the state. + for_state_instance: If provided, attach the requested states to this existing state tree. Returns: The state for the token. Raises: - RuntimeError: when the state_cls is not specified in the token + RuntimeError: when the state_cls is not specified in the token, or when the parent state for a + requested state was not fetched. """ # Split the actual token from the fully qualified substate name. - _, state_path = _split_substate_key(token) + token, state_path = _split_substate_key(token) if state_path: # Get the State class associated with the given path. state_cls = self.state.get_class_substate(state_path) @@ -3418,43 +3325,59 @@ class StateManagerRedis(StateManager): f"StateManagerRedis requires token to be specified in the form of {{token}}_{{state_full_name}}, but got {token}" ) - # The deserialized or newly created (sub)state instance. - state = None + # Determine which states we already have. + flat_state_tree: dict[str, BaseState] = ( + self._get_populated_states(for_state_instance) if for_state_instance else {} + ) - # Fetch the serialized substate from redis. - redis_state = await self.redis.get(token) + # Determine which states from the tree need to be fetched. + required_state_classes = sorted( + self._get_required_state_classes(state_cls, subclasses=True) + - {type(s) for s in flat_state_tree.values()}, + key=lambda x: x.get_full_name(), + ) - if redis_state is not None: - # Deserialize the substate. - with contextlib.suppress(StateSchemaMismatchError): - state = BaseState._deserialize(data=redis_state) - if state is None: - # Key didn't exist or schema mismatch so create a new instance for this token. - state = state_cls( - init_substates=False, - _reflex_internal_init=True, - ) - # Populate parent state if missing and requested. - if parent_state is None: - parent_state = await self._get_parent_state(token, state) - # Set up Bidirectional linkage between this state and its parent. - if parent_state is not None: - parent_state.substates[state.get_name()] = state - state.parent_state = parent_state - # Avoid fetching substates multiple times. - if cached_substates: - for substate in cached_substates: - state.substates[substate.get_name()] = substate - if substate.parent_state is None: - substate.parent_state = state - # Populate substates if requested. - await self._populate_substates(token, state, all_substates=get_substates) + redis_pipeline = self.redis.pipeline() + for state_cls in required_state_classes: + redis_pipeline.get(_substate_key(token, state_cls)) + + for state_cls, redis_state in zip( + required_state_classes, + await redis_pipeline.execute(), + strict=False, + ): + state = None + + if redis_state is not None: + # Deserialize the substate. + with contextlib.suppress(StateSchemaMismatchError): + state = BaseState._deserialize(data=redis_state) + if state is None: + # Key didn't exist or schema mismatch so create a new instance for this token. + state = state_cls( + init_substates=False, + _reflex_internal_init=True, + ) + flat_state_tree[state.get_full_name()] = state + if state.get_parent_state() is not None: + parent_state_name, _dot, state_name = state.get_full_name().rpartition( + "." + ) + parent_state = flat_state_tree.get(parent_state_name) + if parent_state is None: + raise RuntimeError( + f"Parent state for {state.get_full_name()} was not found " + "in the state tree, but should have already been fetched. " + "This is a bug", + ) + parent_state.substates[state_name] = state + state.parent_state = parent_state # To retain compatibility with previous implementation, by default, we return - # the top-level state by chasing `parent_state` pointers up the tree. + # the top-level state which should always be fetched or already cached. if top_level: - return state._get_root_state() - return state + return flat_state_tree[self.state.get_full_name()] + return flat_state_tree[state_cls.get_full_name()] @override async def set_state( @@ -4154,12 +4077,19 @@ def reload_state_module( state: Recursive argument for the state class to reload. """ + # Clean out all potentially dirty states of reloaded modules. + for pd_state in tuple(state._potentially_dirty_states): + with contextlib.suppress(ValueError): + if ( + state.get_root_state().get_class_substate(pd_state).__module__ == module + and module is not None + ): + state._potentially_dirty_states.remove(pd_state) for subclass in tuple(state.class_subclasses): reload_state_module(module=module, state=subclass) if subclass.__module__ == module and module is not None: state.class_subclasses.remove(subclass) state._always_dirty_substates.discard(subclass.get_name()) - state._computed_var_dependencies = defaultdict(set) - state._substate_var_dependencies = defaultdict(set) + state._var_dependencies = {} state._init_var_dependency_dicts() state.get_class_substate.cache_clear() diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 479ff816a..67df7ea91 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -488,7 +488,7 @@ def output_system_info(): dependencies.append(fnm_info) if system == "Linux": - import distro + import distro # pyright: ignore[reportMissingImports] os_version = distro.name(pretty=True) else: diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 8a76f250d..ec65c3711 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -5,7 +5,6 @@ from __future__ import annotations import contextlib import dataclasses import datetime -import dis import functools import inspect import json @@ -20,6 +19,7 @@ from typing import ( Any, Callable, ClassVar, + Coroutine, Dict, FrozenSet, Generic, @@ -51,7 +51,6 @@ from reflex.utils.exceptions import ( VarAttributeError, VarDependencyError, VarTypeError, - VarValueError, ) from reflex.utils.format import format_state_name from reflex.utils.imports import ( @@ -1983,7 +1982,7 @@ class ComputedVar(Var[RETURN_TYPE]): _initial_value: RETURN_TYPE | types.Unset = dataclasses.field(default=types.Unset()) # Explicit var dependencies to track - _static_deps: set[str] = dataclasses.field(default_factory=set) + _static_deps: dict[str, set[str]] = dataclasses.field(default_factory=dict) # Whether var dependencies should be auto-determined _auto_deps: bool = dataclasses.field(default=True) @@ -2053,21 +2052,34 @@ class ComputedVar(Var[RETURN_TYPE]): object.__setattr__(self, "_update_interval", interval) - if deps is None: - deps = [] - else: + _static_deps = {} + if isinstance(deps, dict): + # Assume a dict is coming from _replace, so no special processing. + _static_deps = deps + elif deps is not None: for dep in deps: if isinstance(dep, Var): - continue - if isinstance(dep, str) and dep != "": - continue - raise TypeError( - "ComputedVar dependencies must be Var instances or var names (non-empty strings)." - ) + state_name = ( + all_var_data.state + if (all_var_data := dep._get_all_var_data()) + and all_var_data.state + else None + ) + if all_var_data is not None: + var_name = all_var_data.field_name + else: + var_name = dep._js_expr + _static_deps.setdefault(state_name, set()).add(var_name) + elif isinstance(dep, str) and dep != "": + _static_deps.setdefault(None, set()).add(dep) + else: + raise TypeError( + "ComputedVar dependencies must be Var instances or var names (non-empty strings)." + ) object.__setattr__( self, "_static_deps", - {dep._js_expr if isinstance(dep, Var) else dep for dep in deps}, + _static_deps, ) object.__setattr__(self, "_auto_deps", auto_deps) @@ -2149,6 +2161,13 @@ class ComputedVar(Var[RETURN_TYPE]): return True return datetime.datetime.now() - last_updated > self._update_interval + @overload + def __get__( + self: ComputedVar[bool], + instance: None, + owner: Type, + ) -> BooleanVar: ... + @overload def __get__( self: ComputedVar[int] | ComputedVar[float], @@ -2233,125 +2252,67 @@ class ComputedVar(Var[RETURN_TYPE]): setattr(instance, self._last_updated_attr, datetime.datetime.now()) value = getattr(instance, self._cache_attr) + self._check_deprecated_return_type(instance, value) + + return value + + def _check_deprecated_return_type(self, instance: BaseState, value: Any) -> None: if not _isinstance(value, self._var_type): console.error( f"Computed var '{type(instance).__name__}.{self._js_expr}' must return" f" type '{self._var_type}', got '{type(value)}'." ) - return value - def _deps( self, - objclass: Type, + objclass: Type[BaseState], obj: FunctionType | CodeType | None = None, - self_name: Optional[str] = None, - ) -> set[str]: + ) -> dict[str, set[str]]: """Determine var dependencies of this ComputedVar. - Save references to attributes accessed on "self". Recursively called - when the function makes a method call on "self" or define comprehensions - or nested functions that may reference "self". + Save references to attributes accessed on "self" or other fetched states. + + Recursively called when the function makes a method call on "self" or + define comprehensions or nested functions that may reference "self". Args: objclass: the class obj this ComputedVar is attached to. obj: the object to disassemble (defaults to the fget function). - self_name: if specified, look for this name in LOAD_FAST and LOAD_DEREF instructions. Returns: - A set of variable names accessed by the given obj. - - Raises: - VarValueError: if the function references the get_state, parent_state, or substates attributes - (cannot track deps in a related state, only implicitly via parent state). + A dictionary mapping state names to the set of variable names + accessed by the given obj. """ + from .dep_tracking import DependencyTracker + + d = {} + if self._static_deps: + d.update(self._static_deps) + # None is a placeholder for the current state class. + if None in d: + d[objclass.get_full_name()] = d.pop(None) + if not self._auto_deps: - return self._static_deps - d = self._static_deps.copy() + return d + if obj is None: fget = self._fget if fget is not None: obj = cast(FunctionType, fget) else: - return set() - with contextlib.suppress(AttributeError): - # unbox functools.partial - obj = cast(FunctionType, obj.func) # pyright: ignore [reportAttributeAccessIssue] - with contextlib.suppress(AttributeError): - # unbox EventHandler - obj = cast(FunctionType, obj.fn) # pyright: ignore [reportAttributeAccessIssue] + return d - if self_name is None and isinstance(obj, FunctionType): - try: - # the first argument to the function is the name of "self" arg - self_name = obj.__code__.co_varnames[0] - except (AttributeError, IndexError): - self_name = None - if self_name is None: - # cannot reference attributes on self if method takes no args - return set() - - invalid_names = ["get_state", "parent_state", "substates", "get_substate"] - self_is_top_of_stack = False - for instruction in dis.get_instructions(obj): - if ( - instruction.opname in ("LOAD_FAST", "LOAD_DEREF") - and instruction.argval == self_name - ): - # bytecode loaded the class instance to the top of stack, next load instruction - # is referencing an attribute on self - self_is_top_of_stack = True - continue - if self_is_top_of_stack and instruction.opname in ( - "LOAD_ATTR", - "LOAD_METHOD", - ): - try: - ref_obj = getattr(objclass, instruction.argval) - except Exception: - ref_obj = None - if instruction.argval in invalid_names: - raise VarValueError( - f"Cached var {self!s} cannot access arbitrary state via `{instruction.argval}`." - ) - if callable(ref_obj): - # recurse into callable attributes - d.update( - self._deps( - objclass=objclass, - obj=ref_obj, # pyright: ignore [reportArgumentType] - ) - ) - # recurse into property fget functions - elif isinstance(ref_obj, property) and not isinstance( - ref_obj, ComputedVar - ): - d.update( - self._deps( - objclass=objclass, - obj=ref_obj.fget, # pyright: ignore [reportArgumentType] - ) - ) - elif ( - instruction.argval in objclass.backend_vars - or instruction.argval in objclass.vars - ): - # var access - d.add(instruction.argval) - elif instruction.opname == "LOAD_CONST" and isinstance( - instruction.argval, CodeType - ): - # recurse into nested functions / comprehensions, which can reference - # instance attributes from the outer scope - d.update( - self._deps( - objclass=objclass, - obj=instruction.argval, - self_name=self_name, - ) - ) - self_is_top_of_stack = False - return d + try: + return DependencyTracker( + func=obj, state_cls=objclass, dependencies=d + ).dependencies + except Exception as e: + console.warn( + "Failed to automatically determine dependencies for computed var " + f"{objclass.__name__}.{self._js_expr}: {e}. " + "Provide static_deps and set auto_deps=False to suppress this warning." + ) + return d def mark_dirty(self, instance: BaseState) -> None: """Mark this ComputedVar as dirty. @@ -2362,6 +2323,37 @@ class ComputedVar(Var[RETURN_TYPE]): with contextlib.suppress(AttributeError): delattr(instance, self._cache_attr) + def add_dependency(self, objclass: Type[BaseState], dep: Var): + """Explicitly add a dependency to the ComputedVar. + + After adding the dependency, when the `dep` changes, this computed var + will be marked dirty. + + Args: + objclass: The class obj this ComputedVar is attached to. + dep: The dependency to add. + + Raises: + VarDependencyError: If the dependency is not a Var instance with a + state and field name + """ + if all_var_data := dep._get_all_var_data(): + state_name = all_var_data.state + if state_name: + var_name = all_var_data.field_name + if var_name: + self._static_deps.setdefault(state_name, set()).add(var_name) + objclass.get_root_state().get_class_substate( + state_name + )._var_dependencies.setdefault(var_name, set()).add( + (objclass.get_full_name(), self._js_expr) + ) + return + raise VarDependencyError( + "ComputedVar dependencies must be Var instances with a state and " + f"field name, got {dep!r}." + ) + def _determine_var_type(self) -> Type: """Get the type of the var. @@ -2398,6 +2390,126 @@ class DynamicRouteVar(ComputedVar[Union[str, List[str]]]): pass +async def _default_async_computed_var(_self: BaseState) -> Any: + return None + + +@dataclasses.dataclass( + eq=False, + frozen=True, + init=False, + slots=True, +) +class AsyncComputedVar(ComputedVar[RETURN_TYPE]): + """A computed var that wraps a coroutinefunction.""" + + _fget: Callable[[BaseState], Coroutine[None, None, RETURN_TYPE]] = ( + dataclasses.field(default=_default_async_computed_var) + ) + + @overload + def __get__( + self: AsyncComputedVar[bool], + instance: None, + owner: Type, + ) -> BooleanVar: ... + + @overload + def __get__( + self: AsyncComputedVar[int] | ComputedVar[float], + instance: None, + owner: Type, + ) -> NumberVar: ... + + @overload + def __get__( + self: AsyncComputedVar[str], + instance: None, + owner: Type, + ) -> StringVar: ... + + @overload + def __get__( + self: AsyncComputedVar[Mapping[DICT_KEY, DICT_VAL]], + instance: None, + owner: Type, + ) -> ObjectVar[Mapping[DICT_KEY, DICT_VAL]]: ... + + @overload + def __get__( + self: AsyncComputedVar[list[LIST_INSIDE]], + instance: None, + owner: Type, + ) -> ArrayVar[list[LIST_INSIDE]]: ... + + @overload + def __get__( + self: AsyncComputedVar[tuple[LIST_INSIDE, ...]], + instance: None, + owner: Type, + ) -> ArrayVar[tuple[LIST_INSIDE, ...]]: ... + + @overload + def __get__(self, instance: None, owner: Type) -> AsyncComputedVar[RETURN_TYPE]: ... + + @overload + def __get__( + self, instance: BaseState, owner: Type + ) -> Coroutine[None, None, RETURN_TYPE]: ... + + def __get__( + self, instance: BaseState | None, owner + ) -> Var | Coroutine[None, None, RETURN_TYPE]: + """Get the ComputedVar value. + + If the value is already cached on the instance, return the cached value. + + Args: + instance: the instance of the class accessing this computed var. + owner: the class that this descriptor is attached to. + + Returns: + The value of the var for the given instance. + """ + if instance is None: + return super(AsyncComputedVar, self).__get__(instance, owner) + + if not self._cache: + + async def _awaitable_result(instance: BaseState = instance) -> RETURN_TYPE: + value = await self.fget(instance) + self._check_deprecated_return_type(instance, value) + return value + + return _awaitable_result() + else: + # handle caching + async def _awaitable_result(instance: BaseState = instance) -> RETURN_TYPE: + if not hasattr(instance, self._cache_attr) or self.needs_update( + instance + ): + # Set cache attr on state instance. + setattr(instance, self._cache_attr, await self.fget(instance)) + # Ensure the computed var gets serialized to redis. + instance._was_touched = True + # Set the last updated timestamp on the state instance. + setattr(instance, self._last_updated_attr, datetime.datetime.now()) + value = getattr(instance, self._cache_attr) + self._check_deprecated_return_type(instance, value) + return value + + return _awaitable_result() + + @property + def fget(self) -> Callable[[BaseState], Coroutine[None, None, RETURN_TYPE]]: + """Get the getter function. + + Returns: + The getter function. + """ + return self._fget + + if TYPE_CHECKING: BASE_STATE = TypeVar("BASE_STATE", bound=BaseState) @@ -2464,10 +2576,27 @@ def computed_var( raise VarDependencyError("Cannot track dependencies without caching.") if fget is not None: - return ComputedVar(fget, cache=cache) + if inspect.iscoroutinefunction(fget): + computed_var_cls = AsyncComputedVar + else: + computed_var_cls = ComputedVar + return computed_var_cls( + fget, + initial_value=initial_value, + cache=cache, + deps=deps, + auto_deps=auto_deps, + interval=interval, + backend=backend, + **kwargs, + ) def wrapper(fget: Callable[[BASE_STATE], Any]) -> ComputedVar: - return ComputedVar( + if inspect.iscoroutinefunction(fget): + computed_var_cls = AsyncComputedVar + else: + computed_var_cls = ComputedVar + return computed_var_cls( fget, initial_value=initial_value, cache=cache, diff --git a/reflex/vars/dep_tracking.py b/reflex/vars/dep_tracking.py new file mode 100644 index 000000000..0b2367799 --- /dev/null +++ b/reflex/vars/dep_tracking.py @@ -0,0 +1,344 @@ +"""Collection of base classes.""" + +from __future__ import annotations + +import contextlib +import dataclasses +import dis +import enum +import inspect +from types import CellType, CodeType, FunctionType +from typing import TYPE_CHECKING, Any, ClassVar, Type, cast + +from reflex.utils.exceptions import VarValueError + +if TYPE_CHECKING: + from reflex.state import BaseState + + from .base import Var + + +CellEmpty = object() + + +def get_cell_value(cell: CellType) -> Any: + """Get the value of a cell object. + + Args: + cell: The cell object to get the value from. (func.__closure__ objects) + + Returns: + The value from the cell or CellEmpty if a ValueError is raised. + """ + try: + return cell.cell_contents + except ValueError: + return CellEmpty + + +class ScanStatus(enum.Enum): + """State of the dis instruction scanning loop.""" + + SCANNING = enum.auto() + GETTING_ATTR = enum.auto() + GETTING_STATE = enum.auto() + GETTING_VAR = enum.auto() + + +@dataclasses.dataclass +class DependencyTracker: + """State machine for identifying state attributes that are accessed by a function.""" + + func: FunctionType | CodeType = dataclasses.field() + state_cls: Type[BaseState] = dataclasses.field() + + dependencies: dict[str, set[str]] = dataclasses.field(default_factory=dict) + + scan_status: ScanStatus = dataclasses.field(default=ScanStatus.SCANNING) + top_of_stack: str | None = dataclasses.field(default=None) + + tracked_locals: dict[str, Type[BaseState]] = dataclasses.field(default_factory=dict) + + _getting_state_class: Type[BaseState] | None = dataclasses.field(default=None) + _getting_var_instructions: list[dis.Instruction] = dataclasses.field( + default_factory=list + ) + + INVALID_NAMES: ClassVar[list[str]] = ["parent_state", "substates", "get_substate"] + + def __post_init__(self): + """After initializing, populate the dependencies dict.""" + with contextlib.suppress(AttributeError): + # unbox functools.partial + self.func = cast(FunctionType, self.func.func) # pyright: ignore[reportAttributeAccessIssue] + with contextlib.suppress(AttributeError): + # unbox EventHandler + self.func = cast(FunctionType, self.func.fn) # pyright: ignore[reportAttributeAccessIssue] + + if isinstance(self.func, FunctionType): + with contextlib.suppress(AttributeError, IndexError): + # the first argument to the function is the name of "self" arg + self.tracked_locals[self.func.__code__.co_varnames[0]] = self.state_cls + + self._populate_dependencies() + + def _merge_deps(self, tracker: DependencyTracker) -> None: + """Merge dependencies from another DependencyTracker. + + Args: + tracker: The DependencyTracker to merge dependencies from. + """ + for state_name, dep_name in tracker.dependencies.items(): + self.dependencies.setdefault(state_name, set()).update(dep_name) + + def load_attr_or_method(self, instruction: dis.Instruction) -> None: + """Handle loading an attribute or method from the object on top of the stack. + + This method directly tracks attributes and recursively merges + dependencies from analyzing the dependencies of any methods called. + + Args: + instruction: The dis instruction to process. + + Raises: + VarValueError: if the attribute is an disallowed name. + """ + from .base import ComputedVar + + if instruction.argval in self.INVALID_NAMES: + raise VarValueError( + f"Cached var {self!s} cannot access arbitrary state via `{instruction.argval}`." + ) + if instruction.argval == "get_state": + # Special case: arbitrary state access requested. + self.scan_status = ScanStatus.GETTING_STATE + return + if instruction.argval == "get_var_value": + # Special case: arbitrary var access requested. + self.scan_status = ScanStatus.GETTING_VAR + return + + # Reset status back to SCANNING after attribute is accessed. + self.scan_status = ScanStatus.SCANNING + if not self.top_of_stack: + return + target_state = self.tracked_locals[self.top_of_stack] + try: + ref_obj = getattr(target_state, instruction.argval) + except AttributeError: + # Not found on this state class, maybe it is a dynamic attribute that will be picked up later. + ref_obj = None + + if isinstance(ref_obj, property) and not isinstance(ref_obj, ComputedVar): + # recurse into property fget functions + ref_obj = ref_obj.fget + if callable(ref_obj): + # recurse into callable attributes + self._merge_deps( + type(self)(func=cast(FunctionType, ref_obj), state_cls=target_state) + ) + elif ( + instruction.argval in target_state.backend_vars + or instruction.argval in target_state.vars + ): + # var access + self.dependencies.setdefault(target_state.get_full_name(), set()).add( + instruction.argval + ) + + def _get_globals(self) -> dict[str, Any]: + """Get the globals of the function. + + Returns: + The var names and values in the globals of the function. + """ + if isinstance(self.func, CodeType): + return {} + return self.func.__globals__ # pyright: ignore[reportAttributeAccessIssue] + + def _get_closure(self) -> dict[str, Any]: + """Get the closure of the function, with unbound values omitted. + + Returns: + The var names and values in the closure of the function. + """ + if isinstance(self.func, CodeType): + return {} + return { + var_name: get_cell_value(cell) + for var_name, cell in zip( + self.func.__code__.co_freevars, # pyright: ignore[reportAttributeAccessIssue] + self.func.__closure__ or (), + strict=False, + ) + if get_cell_value(cell) is not CellEmpty + } + + def handle_getting_state(self, instruction: dis.Instruction) -> None: + """Handle bytecode analysis when `get_state` was called in the function. + + If the wrapped function is getting an arbitrary state and saving it to a + local variable, this method associates the local variable name with the + state class in self.tracked_locals. + + When an attribute/method is accessed on a tracked local, it will be + associated with this state. + + Args: + instruction: The dis instruction to process. + + Raises: + VarValueError: if the state class cannot be determined from the instruction. + """ + from reflex.state import BaseState + + if instruction.opname == "LOAD_FAST": + raise VarValueError( + f"Dependency detection cannot identify get_state class from local var {instruction.argval}." + ) + if isinstance(self.func, CodeType): + raise VarValueError( + "Dependency detection cannot identify get_state class from a code object." + ) + if instruction.opname == "LOAD_GLOBAL": + # Special case: referencing state class from global scope. + try: + self._getting_state_class = self._get_globals()[instruction.argval] + except (ValueError, KeyError) as ve: + raise VarValueError( + f"Cached var {self!s} cannot access arbitrary state `{instruction.argval}`, not found in globals." + ) from ve + elif instruction.opname == "LOAD_DEREF": + # Special case: referencing state class from closure. + try: + self._getting_state_class = self._get_closure()[instruction.argval] + except (ValueError, KeyError) as ve: + raise VarValueError( + f"Cached var {self!s} cannot access arbitrary state `{instruction.argval}`, is it defined yet?" + ) from ve + elif instruction.opname == "STORE_FAST": + # Storing the result of get_state in a local variable. + if not isinstance(self._getting_state_class, type) or not issubclass( + self._getting_state_class, BaseState + ): + raise VarValueError( + f"Cached var {self!s} cannot determine dependencies in fetched state `{instruction.argval}`." + ) + self.tracked_locals[instruction.argval] = self._getting_state_class + self.scan_status = ScanStatus.SCANNING + self._getting_state_class = None + + def _eval_var(self) -> Var: + """Evaluate instructions from the wrapped function to get the Var object. + + Returns: + The Var object. + + Raises: + VarValueError: if the source code for the var cannot be determined. + """ + # Get the original source code and eval it to get the Var. + module = inspect.getmodule(self.func) + positions0 = self._getting_var_instructions[0].positions + positions1 = self._getting_var_instructions[-1].positions + if module is None or positions0 is None or positions1 is None: + raise VarValueError( + f"Cannot determine the source code for the var in {self.func!r}." + ) + start_line = positions0.lineno + start_column = positions0.col_offset + end_line = positions1.end_lineno + end_column = positions1.end_col_offset + if ( + start_line is None + or start_column is None + or end_line is None + or end_column is None + ): + raise VarValueError( + f"Cannot determine the source code for the var in {self.func!r}." + ) + source = inspect.getsource(module).splitlines(True)[start_line - 1 : end_line] + # Create a python source string snippet. + if len(source) > 1: + snipped_source = "".join( + [ + *source[0][start_column:], + *(source[1:-2] if len(source) > 2 else []), + *source[-1][: end_column - 1], + ] + ) + else: + snipped_source = source[0][start_column : end_column - 1] + # Evaluate the string in the context of the function's globals and closure. + return eval(f"({snipped_source})", self._get_globals(), self._get_closure()) + + def handle_getting_var(self, instruction: dis.Instruction) -> None: + """Handle bytecode analysis when `get_var_value` was called in the function. + + This only really works if the expression passed to `get_var_value` is + evaluable in the function's global scope or closure, so getting the var + value from a var saved in a local variable or in the class instance is + not possible. + + Args: + instruction: The dis instruction to process. + + Raises: + VarValueError: if the source code for the var cannot be determined. + """ + if instruction.opname == "CALL" and self._getting_var_instructions: + if self._getting_var_instructions: + the_var = self._eval_var() + the_var_data = the_var._get_all_var_data() + if the_var_data is None: + raise VarValueError( + f"Cannot determine the source code for the var in {self.func!r}." + ) + self.dependencies.setdefault(the_var_data.state, set()).add( + the_var_data.field_name + ) + self._getting_var_instructions.clear() + self.scan_status = ScanStatus.SCANNING + else: + self._getting_var_instructions.append(instruction) + + def _populate_dependencies(self) -> None: + """Update self.dependencies based on the disassembly of self.func. + + Save references to attributes accessed on "self" or other fetched states. + + Recursively called when the function makes a method call on "self" or + define comprehensions or nested functions that may reference "self". + """ + for instruction in dis.get_instructions(self.func): + if self.scan_status == ScanStatus.GETTING_STATE: + self.handle_getting_state(instruction) + elif self.scan_status == ScanStatus.GETTING_VAR: + self.handle_getting_var(instruction) + elif ( + instruction.opname in ("LOAD_FAST", "LOAD_DEREF") + and instruction.argval in self.tracked_locals + ): + # bytecode loaded the class instance to the top of stack, next load instruction + # is referencing an attribute on self + self.top_of_stack = instruction.argval + self.scan_status = ScanStatus.GETTING_ATTR + elif self.scan_status == ScanStatus.GETTING_ATTR and instruction.opname in ( + "LOAD_ATTR", + "LOAD_METHOD", + ): + self.load_attr_or_method(instruction) + self.top_of_stack = None + elif instruction.opname == "LOAD_CONST" and isinstance( + instruction.argval, CodeType + ): + # recurse into nested functions / comprehensions, which can reference + # instance attributes from the outer scope + self._merge_deps( + type(self)( + func=instruction.argval, + state_cls=self.state_cls, + tracked_locals=self.tracked_locals, + ) + ) diff --git a/tests/integration/tests_playwright/test_table.py b/tests/integration/tests_playwright/test_table.py index bd399a840..a88c4a621 100644 --- a/tests/integration/tests_playwright/test_table.py +++ b/tests/integration/tests_playwright/test_table.py @@ -3,7 +3,7 @@ from typing import Generator import pytest -from playwright.sync_api import Page +from playwright.sync_api import Page, expect from reflex.testing import AppHarness @@ -87,12 +87,14 @@ def test_table(page: Page, table_app: AppHarness): table = page.get_by_role("table") # Check column headers - headers = table.get_by_role("columnheader").all_inner_texts() - assert headers == expected_col_headers + headers = table.get_by_role("columnheader") + for header, exp_value in zip(headers.all(), expected_col_headers, strict=True): + expect(header).to_have_text(exp_value) # Check rows headers - rows = table.get_by_role("rowheader").all_inner_texts() - assert rows == expected_row_headers + rows = table.get_by_role("rowheader") + for row, expected_row in zip(rows.all(), expected_row_headers, strict=True): + expect(row).to_have_text(expected_row) # Check cells rows = table.get_by_role("cell").all_inner_texts() diff --git a/tests/units/test_app.py b/tests/units/test_app.py index 4a6c16d6e..bf1a8a313 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -277,9 +277,9 @@ def test_add_page_set_route_dynamic(index_page, windows_platform: bool): assert app._pages.keys() == {"test/[dynamic]"} assert "dynamic" in app._state.computed_vars assert app._state.computed_vars["dynamic"]._deps(objclass=EmptyState) == { - constants.ROUTER + EmptyState.get_full_name(): {constants.ROUTER}, } - assert constants.ROUTER in app._state()._computed_var_dependencies + assert constants.ROUTER in app._state()._var_dependencies def test_add_page_set_route_nested(app: App, index_page, windows_platform: bool): @@ -995,9 +995,9 @@ async def test_dynamic_route_var_route_change_completed_on_load( assert arg_name in app._state.vars assert arg_name in app._state.computed_vars assert app._state.computed_vars[arg_name]._deps(objclass=DynamicState) == { - constants.ROUTER + DynamicState.get_full_name(): {constants.ROUTER}, } - assert constants.ROUTER in app._state()._computed_var_dependencies + assert constants.ROUTER in app._state()._var_dependencies substate_token = _substate_key(token, DynamicState) sid = "mock_sid" @@ -1555,6 +1555,16 @@ def test_app_with_valid_var_dependencies(compilable_app: tuple[App, Path]): def bar(self) -> str: return "bar" + class Child1(ValidDepState): + @computed_var(deps=["base", ValidDepState.bar]) + def other(self) -> str: + return "other" + + class Child2(ValidDepState): + @computed_var(deps=["base", Child1.other]) + def other(self) -> str: + return "other" + app._state = ValidDepState app._compile() diff --git a/tests/units/test_state.py b/tests/units/test_state.py index 9e1932305..44c3f60b7 100644 --- a/tests/units/test_state.py +++ b/tests/units/test_state.py @@ -14,6 +14,7 @@ from typing import ( Any, AsyncGenerator, Callable, + ClassVar, Dict, List, Optional, @@ -1169,13 +1170,17 @@ def test_conditional_computed_vars(): ms = MainState() # Initially there are no dirty computed vars. - assert ms._dirty_computed_vars(from_vars={"flag"}) == {"rendered_var"} - assert ms._dirty_computed_vars(from_vars={"t2"}) == {"rendered_var"} - assert ms._dirty_computed_vars(from_vars={"t1"}) == {"rendered_var"} + assert ms._dirty_computed_vars(from_vars={"flag"}) == { + (MainState.get_full_name(), "rendered_var") + } + assert ms._dirty_computed_vars(from_vars={"t2"}) == { + (MainState.get_full_name(), "rendered_var") + } + assert ms._dirty_computed_vars(from_vars={"t1"}) == { + (MainState.get_full_name(), "rendered_var") + } assert ms.computed_vars["rendered_var"]._deps(objclass=MainState) == { - "flag", - "t1", - "t2", + MainState.get_full_name(): {"flag", "t1", "t2"} } @@ -1370,7 +1375,10 @@ def test_cached_var_depends_on_event_handler(use_partial: bool): assert isinstance(HandlerState.handler, EventHandler) s = HandlerState() - assert "cached_x_side_effect" in s._computed_var_dependencies["x"] + assert ( + HandlerState.get_full_name(), + "cached_x_side_effect", + ) in s._var_dependencies["x"] assert s.cached_x_side_effect == 1 assert s.x == 43 s.handler() @@ -1460,15 +1468,15 @@ def test_computed_var_dependencies(): return [z in self._z for z in range(5)] cs = ComputedState() - assert cs._computed_var_dependencies["v"] == { - "comp_v", - "comp_v_backend", - "comp_v_via_property", + assert cs._var_dependencies["v"] == { + (ComputedState.get_full_name(), "comp_v"), + (ComputedState.get_full_name(), "comp_v_backend"), + (ComputedState.get_full_name(), "comp_v_via_property"), } - assert cs._computed_var_dependencies["w"] == {"comp_w"} - assert cs._computed_var_dependencies["x"] == {"comp_x"} - assert cs._computed_var_dependencies["y"] == {"comp_y"} - assert cs._computed_var_dependencies["_z"] == {"comp_z"} + assert cs._var_dependencies["w"] == {(ComputedState.get_full_name(), "comp_w")} + assert cs._var_dependencies["x"] == {(ComputedState.get_full_name(), "comp_x")} + assert cs._var_dependencies["y"] == {(ComputedState.get_full_name(), "comp_y")} + assert cs._var_dependencies["_z"] == {(ComputedState.get_full_name(), "comp_z")} def test_backend_method(): @@ -3180,7 +3188,7 @@ async def test_get_state_from_sibling_not_cached(mock_app: rx.App, token: str): RxState = State -def test_potentially_dirty_substates(): +def test_potentially_dirty_states(): """Test that potentially_dirty_substates returns the correct substates. Even if the name "State" is shadowed, it should still work correctly. @@ -3196,13 +3204,19 @@ def test_potentially_dirty_substates(): def bar(self) -> str: return "" - assert RxState._potentially_dirty_substates() == set() - assert State._potentially_dirty_substates() == set() - assert C1._potentially_dirty_substates() == set() + assert RxState._get_potentially_dirty_states() == set() + assert State._get_potentially_dirty_states() == set() + assert C1._get_potentially_dirty_states() == set() -def test_router_var_dep() -> None: - """Test that router var dependencies are correctly tracked.""" +@pytest.mark.asyncio +async def test_router_var_dep(state_manager: StateManager, token: str) -> None: + """Test that router var dependencies are correctly tracked. + + Args: + state_manager: A state manager. + token: A token. + """ class RouterVarParentState(State): """A parent state for testing router var dependency.""" @@ -3219,30 +3233,27 @@ def test_router_var_dep() -> None: foo = RouterVarDepState.computed_vars["foo"] State._init_var_dependency_dicts() - assert foo._deps(objclass=RouterVarDepState) == {"router"} - assert RouterVarParentState._potentially_dirty_substates() == {RouterVarDepState} - assert RouterVarParentState._substate_var_dependencies == { - "router": {RouterVarDepState.get_name()} - } - assert RouterVarDepState._computed_var_dependencies == { - "router": {"foo"}, + assert foo._deps(objclass=RouterVarDepState) == { + RouterVarDepState.get_full_name(): {"router"} } + assert (RouterVarDepState.get_full_name(), "foo") in State._var_dependencies[ + "router" + ] - rx_state = State() - parent_state = RouterVarParentState() - state = RouterVarDepState() - - # link states - rx_state.substates = {RouterVarParentState.get_name(): parent_state} - parent_state.parent_state = rx_state - state.parent_state = parent_state - parent_state.substates = {RouterVarDepState.get_name(): state} + # Get state from state manager. + state_manager.state = State + rx_state = await state_manager.get_state(_substate_key(token, State)) + assert RouterVarParentState.get_name() in rx_state.substates + parent_state = rx_state.substates[RouterVarParentState.get_name()] + assert RouterVarDepState.get_name() in parent_state.substates + state = parent_state.substates[RouterVarDepState.get_name()] assert state.dirty_vars == set() # Reassign router var state.router = state.router - assert state.dirty_vars == {"foo", "router"} + assert rx_state.dirty_vars == {"router"} + assert state.dirty_vars == {"foo"} assert parent_state.dirty_substates == {RouterVarDepState.get_name()} @@ -3801,3 +3812,128 @@ async def test_get_var_value(state_manager: StateManager, substate_token: str): # Generic Var with no state with pytest.raises(UnretrievableVarValueError): await state.get_var_value(rx.Var("undefined")) + + +@pytest.mark.asyncio +async def test_async_computed_var_get_state(mock_app: rx.App, token: str): + """A test where an async computed var depends on a var in another state. + + Args: + mock_app: An app that will be returned by `get_app()` + token: A token. + """ + + class Parent(BaseState): + """A root state like rx.State.""" + + parent_var: int = 0 + + class Child2(Parent): + """An unconnected child state.""" + + pass + + class Child3(Parent): + """A child state with a computed var causing it to be pre-fetched. + + If child3_var gets set to a value, and `get_state` erroneously + re-fetches it from redis, the value will be lost. + """ + + child3_var: int = 0 + + @rx.var(cache=True) + def v(self) -> int: + return self.child3_var + + class Child(Parent): + """A state simulating UpdateVarsInternalState.""" + + @rx.var(cache=True) + async def v(self) -> int: + p = await self.get_state(Parent) + child3 = await self.get_state(Child3) + return child3.child3_var + p.parent_var + + mock_app.state_manager.state = mock_app._state = Parent + + # Get the top level state via unconnected sibling. + root = await mock_app.state_manager.get_state(_substate_key(token, Child)) + # Set value in parent_var to assert it does not get refetched later. + root.parent_var = 1 + + if isinstance(mock_app.state_manager, StateManagerRedis): + # When redis is used, only states with uncached computed vars are pre-fetched. + assert Child2.get_name() not in root.substates + assert Child3.get_name() not in root.substates + + # Get the unconnected sibling state, which will be used to `get_state` other instances. + child = root.get_substate(Child.get_full_name().split(".")) + + # Get an uncached child state. + child2 = await child.get_state(Child2) + assert child2.parent_var == 1 + + # Set value on already-cached Child3 state (prefetched because it has a Computed Var). + child3 = await child.get_state(Child3) + child3.child3_var = 1 + + assert await child.v == 2 + assert await child.v == 2 + root.parent_var = 2 + assert await child.v == 3 + + +class Table(rx.ComponentState): + """A table state.""" + + data: ClassVar[Var] + + @rx.var(cache=True, auto_deps=False) + async def rows(self) -> List[Dict[str, Any]]: + """Computed var over the given rows. + + Returns: + The data rows. + """ + return await self.get_var_value(self.data) + + @classmethod + def get_component(cls, data: Var) -> rx.Component: + """Get the component for the table. + + Args: + data: The data var. + + Returns: + The component. + """ + cls.data = data + cls.computed_vars["rows"].add_dependency(cls, data) + return rx.foreach(data, lambda d: rx.text(d.to_string())) + + +@pytest.mark.asyncio +async def test_async_computed_var_get_var_value(mock_app: rx.App, token: str): + """A test where an async computed var depends on a var in another state. + + Args: + mock_app: An app that will be returned by `get_app()` + token: A token. + """ + + class OtherState(rx.State): + """A state with a var.""" + + data: List[Dict[str, Any]] = [{"foo": "bar"}] + + mock_app.state_manager.state = mock_app._state = rx.State + comp = Table.create(data=OtherState.data) + state = await mock_app.state_manager.get_state(_substate_key(token, OtherState)) + other_state = await state.get_state(OtherState) + assert comp.State is not None + comp_state = await state.get_state(comp.State) + assert comp_state.dirty_vars == set() + + other_state.data.append({"foo": "baz"}) + assert "rows" in comp_state.dirty_vars diff --git a/tests/units/test_var.py b/tests/units/test_var.py index ef19e86e8..a72242814 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -1807,9 +1807,9 @@ def cv_fget(state: BaseState) -> int: @pytest.mark.parametrize( "deps,expected", [ - (["a"], {"a"}), - (["b"], {"b"}), - ([ComputedVar(fget=cv_fget)], {"cv_fget"}), + (["a"], {None: {"a"}}), + (["b"], {None: {"b"}}), + ([ComputedVar(fget=cv_fget)], {None: {"cv_fget"}}), ], ) def test_computed_var_deps(deps: List[Union[str, Var]], expected: Set[str]): @@ -1857,6 +1857,28 @@ def test_to_string_operation(): assert single_var._var_type == Email +@pytest.mark.asyncio +async def test_async_computed_var(): + side_effect_counter = 0 + + class AsyncComputedVarState(BaseState): + v: int = 1 + + @computed_var(cache=True) + async def async_computed_var(self) -> int: + nonlocal side_effect_counter + side_effect_counter += 1 + return self.v + 1 + + my_state = AsyncComputedVarState() + assert await my_state.async_computed_var == 2 + assert await my_state.async_computed_var == 2 + my_state.v = 2 + assert await my_state.async_computed_var == 3 + assert await my_state.async_computed_var == 3 + assert side_effect_counter == 2 + + def test_var_data_hooks(): var_data_str = VarData(hooks="what") var_data_list = VarData(hooks=["what"]) From 80a26b440d219047bddda00dadcf028130615243 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 16:42:55 -0800 Subject: [PATCH 069/144] include dynamic imports for custom components (#4725) --- reflex/compiler/compiler.py | 8 ++++++++ reflex/compiler/utils.py | 1 + 2 files changed, 9 insertions(+) diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 218dd0c55..c2a76aad3 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -239,11 +239,19 @@ def _compile_components( component_renders.append(component_render) imports = utils.merge_imports(imports, component_imports) + dynamic_imports = { + comp_import: None + for comp_render in component_renders + if "dynamic_imports" in comp_render + for comp_import in comp_render["dynamic_imports"] + } + # Compile the components page. return ( templates.COMPONENTS.render( imports=utils.compile_imports(imports), components=component_renders, + dynamic_imports=dynamic_imports, ), imports, ) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 9b388400b..57241fea9 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -320,6 +320,7 @@ def compile_custom_component( "render": render.render(), "hooks": render._get_all_hooks(), "custom_code": render._get_all_custom_code(), + "dynamic_imports": render._get_all_dynamic_imports(), }, imports, ) From 3cb44431288dd143bed6ba67e9b13afc2cde1aa9 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 16:43:05 -0800 Subject: [PATCH 070/144] add evaluate time to the progress counter (#4722) --- reflex/app.py | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index ce6808816..dd4f4f5cb 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -958,19 +958,15 @@ class App(MiddlewareMixin, LifespanMixin): should_compile = self._should_compile() - for route in self._unevaluated_pages: - console.debug(f"Evaluating page: {route}") - self._compile_page(route, save_page=should_compile) - - # Add the optional endpoints (_upload) - self._add_optional_endpoints() - if not should_compile: - return + for route in self._unevaluated_pages: + console.debug(f"Evaluating page: {route}") + self._compile_page(route, save_page=should_compile) - self._validate_var_dependencies() - self._setup_overlay_component() - self._setup_error_boundary() + # Add the optional endpoints (_upload) + self._add_optional_endpoints() + + return # Create a progress bar. progress = Progress( @@ -980,16 +976,31 @@ class App(MiddlewareMixin, LifespanMixin): ) # try to be somewhat accurate - but still not 100% - adhoc_steps_without_executor = 6 + adhoc_steps_without_executor = 7 fixed_pages_within_executor = 5 progress.start() task = progress.add_task( f"[{get_compilation_time()}] Compiling:", total=len(self._pages) + + (len(self._unevaluated_pages) * 2) + fixed_pages_within_executor + adhoc_steps_without_executor, ) + for route in self._unevaluated_pages: + console.debug(f"Evaluating page: {route}") + self._compile_page(route, save_page=should_compile) + progress.advance(task) + + # Add the optional endpoints (_upload) + self._add_optional_endpoints() + + self._validate_var_dependencies() + self._setup_overlay_component() + self._setup_error_boundary() + + progress.advance(task) + # Get the env mode. config = get_config() From 83e635de0ed3b59d045166e2719a1c2719386375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Sat, 1 Feb 2025 02:20:51 +0100 Subject: [PATCH 071/144] bump ruff version to 0.9.3 (#4705) * bump ruff version to 0.9.3 * relock poetry file * poetry relock * ignore RUF008 for now * pass pre-commit * update-pyi-files: require_serial to avoid mp explosion --------- Co-authored-by: Masen Furer --- .pre-commit-config.yaml | 5 +- poetry.lock | 102 +++++++++--------- pyproject.toml | 4 +- reflex/app.py | 2 +- reflex/components/component.py | 3 +- reflex/components/datadisplay/dataeditor.py | 2 +- reflex/custom_components/custom_components.py | 4 +- reflex/event.py | 2 +- reflex/utils/prerequisites.py | 2 +- reflex/utils/pyi_generator.py | 4 +- reflex/vars/datetime.py | 2 +- tests/integration/test_connection_banner.py | 7 +- tests/units/components/core/test_colors.py | 4 +- 13 files changed, 71 insertions(+), 72 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dbe069ae8..0bad7b996 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ fail_fast: true repos: - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.8.2 + rev: v0.9.3 hooks: - id: ruff-format args: [reflex, tests] @@ -24,11 +24,12 @@ repos: name: update-pyi-files always_run: true language: system + require_serial: true description: 'Update pyi files as needed' entry: python3 scripts/make_pyi.py - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.392 + rev: v1.1.393 hooks: - id: pyright args: [reflex, tests] diff --git a/poetry.lock b/poetry.lock index 125b71b55..be9d19e53 100644 --- a/poetry.lock +++ b/poetry.lock @@ -164,15 +164,15 @@ virtualenv = ["virtualenv (>=20.0.35)"] [[package]] name = "certifi" -version = "2024.12.14" +version = "2025.1.31" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" groups = ["main", "dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, - {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, + {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"}, + {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, ] [[package]] @@ -618,15 +618,15 @@ test = ["pytest (>=6)"] [[package]] name = "fastapi" -version = "0.115.7" +version = "0.115.8" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "fastapi-0.115.7-py3-none-any.whl", hash = "sha256:eb6a8c8bf7f26009e8147111ff15b5177a0e19bb4a45bc3486ab14804539d21e"}, - {file = "fastapi-0.115.7.tar.gz", hash = "sha256:0f106da6c01d88a6786b3248fb4d7a940d071f6f488488898ad5d354b25ed015"}, + {file = "fastapi-0.115.8-py3-none-any.whl", hash = "sha256:753a96dd7e036b34eeef8babdfcfe3f28ff79648f86551eb36bfc1b0bf4a8cbf"}, + {file = "fastapi-0.115.8.tar.gz", hash = "sha256:0ce9111231720190473e222cdf0f07f7206ad7e53ea02beb1d2dc36e2f0741e9"}, ] [package.dependencies] @@ -1876,15 +1876,15 @@ files = [ [[package]] name = "pyright" -version = "1.1.392.post0" +version = "1.1.393" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pyright-1.1.392.post0-py3-none-any.whl", hash = "sha256:252f84458a46fa2f0fd4e2f91fc74f50b9ca52c757062e93f6c250c0d8329eb2"}, - {file = "pyright-1.1.392.post0.tar.gz", hash = "sha256:3b7f88de74a28dcfa90c7d90c782b6569a48c2be5f9d4add38472bdaac247ebd"}, + {file = "pyright-1.1.393-py3-none-any.whl", hash = "sha256:8320629bb7a44ca90944ba599390162bf59307f3d9fb6e27da3b7011b8c17ae5"}, + {file = "pyright-1.1.393.tar.gz", hash = "sha256:aeeb7ff4e0364775ef416a80111613f91a05c8e01e58ecfefc370ca0db7aed9c"}, ] [package.dependencies] @@ -1998,25 +1998,25 @@ histogram = ["pygal", "pygaljs", "setuptools"] [[package]] name = "pytest-codspeed" -version = "3.1.2" +version = "3.2.0" description = "Pytest plugin to create CodSpeed benchmarks" optional = false python-versions = ">=3.9" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pytest_codspeed-3.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aed496f873670ce0ea8f980a7c1a2c6a08f415e0ebdf207bf651b2d922103374"}, - {file = "pytest_codspeed-3.1.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee45b0b763f6b5fa5d74c7b91d694a9615561c428b320383660672f4471756e3"}, - {file = "pytest_codspeed-3.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c84e591a7a0f67d45e2dc9fd05b276971a3aabcab7478fe43363ebefec1358f4"}, - {file = "pytest_codspeed-3.1.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6ae6d094247156407770e6b517af70b98862dd59a3c31034aede11d5f71c32c"}, - {file = "pytest_codspeed-3.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d0f264991de5b5cdc118b96fc671386cca3f0f34e411482939bf2459dc599097"}, - {file = "pytest_codspeed-3.1.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c0695a4bcd5ff04e8379124dba5d9795ea5e0cadf38be7a0406432fc1467b555"}, - {file = "pytest_codspeed-3.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6dc356c8dcaaa883af83310f397ac06c96fac9b8a1146e303d4b374b2cb46a18"}, - {file = "pytest_codspeed-3.1.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc8a5d0366322a75cf562f7d8d672d28c1cf6948695c4dddca50331e08f6b3d5"}, - {file = "pytest_codspeed-3.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6c5fe7a19b72f54f217480b3b527102579547b1de9fe3acd9e66cb4629ff46c8"}, - {file = "pytest_codspeed-3.1.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b67205755a665593f6521a98317d02a9d07d6fdc593f6634de2c94dea47a3055"}, - {file = "pytest_codspeed-3.1.2-py3-none-any.whl", hash = "sha256:5e7ed0315e33496c5c07dba262b50303b8d0bc4c3d10bf1d422a41e70783f1cb"}, - {file = "pytest_codspeed-3.1.2.tar.gz", hash = "sha256:09c1733af3aab35e94a621aa510f2d2114f65591e6f644c42ca3f67547edad4b"}, + {file = "pytest_codspeed-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c5165774424c7ab8db7e7acdb539763a0e5657996effefdf0664d7fd95158d34"}, + {file = "pytest_codspeed-3.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9bd55f92d772592c04a55209950c50880413ae46876e66bd349ef157075ca26c"}, + {file = "pytest_codspeed-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4cf6f56067538f4892baa8d7ab5ef4e45bb59033be1ef18759a2c7fc55b32035"}, + {file = "pytest_codspeed-3.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:39a687b05c3d145642061b45ea78e47e12f13ce510104d1a2cda00eee0e36f58"}, + {file = "pytest_codspeed-3.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:46a1afaaa1ac4c2ca5b0700d31ac46d80a27612961d031067d73c6ccbd8d3c2b"}, + {file = "pytest_codspeed-3.2.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c48ce3af3dfa78413ed3d69d1924043aa1519048dbff46edccf8f35a25dab3c2"}, + {file = "pytest_codspeed-3.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:66692506d33453df48b36a84703448cb8b22953eea51f03fbb2eb758dc2bdc4f"}, + {file = "pytest_codspeed-3.2.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:479774f80d0bdfafa16112700df4dbd31bf2a6757fac74795fd79c0a7b3c389b"}, + {file = "pytest_codspeed-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:109f9f4dd1088019c3b3f887d003b7d65f98a7736ca1d457884f5aa293e8e81c"}, + {file = "pytest_codspeed-3.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e2f69a03b52c9bb041aec1b8ee54b7b6c37a6d0a948786effa4c71157765b6da"}, + {file = "pytest_codspeed-3.2.0-py3-none-any.whl", hash = "sha256:54b5c2e986d6a28e7b0af11d610ea57bd5531cec8326abe486f1b55b09d91c39"}, + {file = "pytest_codspeed-3.2.0.tar.gz", hash = "sha256:f9d1b1a3b2c69cdc0490a1e8b1ced44bffbd0e8e21d81a7160cfdd923f6e8155"}, ] [package.dependencies] @@ -2070,15 +2070,15 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] [[package]] name = "pytest-playwright" -version = "0.6.2" +version = "0.7.0" description = "A pytest wrapper with fixtures for Playwright to automate web browsers" optional = false python-versions = ">=3.9" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pytest_playwright-0.6.2-py3-none-any.whl", hash = "sha256:0eff73bebe497b0158befed91e2f5fe94cfa17181f8b3acf575beed84e7e9043"}, - {file = "pytest_playwright-0.6.2.tar.gz", hash = "sha256:ff4054b19aa05df096ac6f74f0572591566aaf0f6d97f6cb9674db8a4d4ed06c"}, + {file = "pytest_playwright-0.7.0-py3-none-any.whl", hash = "sha256:2516d0871fa606634bfe32afbcc0342d68da2dbff97fe3459849e9c428486da2"}, + {file = "pytest_playwright-0.7.0.tar.gz", hash = "sha256:b3f2ea514bbead96d26376fac182f68dcd6571e7cb41680a89ff1673c05d60b6"}, ] [package.dependencies] @@ -2180,15 +2180,15 @@ docs = ["sphinx"] [[package]] name = "pytz" -version = "2024.2" +version = "2025.1" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, - {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, + {file = "pytz-2025.1-py2.py3-none-any.whl", hash = "sha256:89dd22dca55b46eac6eda23b2d72721bf1bdfef212645d81513ef5d03038de57"}, + {file = "pytz-2025.1.tar.gz", hash = "sha256:c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e"}, ] [[package]] @@ -2311,15 +2311,15 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==23.2.1)", "requests (>=2.31.0)" [[package]] name = "reflex-hosting-cli" -version = "0.1.33" +version = "0.1.34" description = "Reflex Hosting CLI" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "reflex_hosting_cli-0.1.33-py3-none-any.whl", hash = "sha256:3fe72fc448a231c61de4ac646f42c936c70e91330f616a23aec658f905d53bc4"}, - {file = "reflex_hosting_cli-0.1.33.tar.gz", hash = "sha256:81c4a896b106eea99f1cab53ea23a6e19802592ce0468cc38d93d440bc95263a"}, + {file = "reflex_hosting_cli-0.1.34-py3-none-any.whl", hash = "sha256:eabc4dc7bf68e022a9388614c1a35b5ab36b01021df063d0c3356eda0e245264"}, + {file = "reflex_hosting_cli-0.1.34.tar.gz", hash = "sha256:07be37fda6dcede0a5d4bc1fd1786d9a3df5ad4e49dc1b6ba335418563cfecec"}, ] [package.dependencies] @@ -2410,31 +2410,31 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.8.2" +version = "0.9.3" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "ruff-0.8.2-py3-none-linux_armv6l.whl", hash = "sha256:c49ab4da37e7c457105aadfd2725e24305ff9bc908487a9bf8d548c6dad8bb3d"}, - {file = "ruff-0.8.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ec016beb69ac16be416c435828be702ee694c0d722505f9c1f35e1b9c0cc1bf5"}, - {file = "ruff-0.8.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f05cdf8d050b30e2ba55c9b09330b51f9f97d36d4673213679b965d25a785f3c"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60f578c11feb1d3d257b2fb043ddb47501ab4816e7e221fbb0077f0d5d4e7b6f"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cbd5cf9b0ae8f30eebc7b360171bd50f59ab29d39f06a670b3e4501a36ba5897"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b402ddee3d777683de60ff76da801fa7e5e8a71038f57ee53e903afbcefdaa58"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:705832cd7d85605cb7858d8a13d75993c8f3ef1397b0831289109e953d833d29"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:32096b41aaf7a5cc095fa45b4167b890e4c8d3fd217603f3634c92a541de7248"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e769083da9439508833cfc7c23e351e1809e67f47c50248250ce1ac52c21fb93"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fe716592ae8a376c2673fdfc1f5c0c193a6d0411f90a496863c99cd9e2ae25d"}, - {file = "ruff-0.8.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:81c148825277e737493242b44c5388a300584d73d5774defa9245aaef55448b0"}, - {file = "ruff-0.8.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d261d7850c8367704874847d95febc698a950bf061c9475d4a8b7689adc4f7fa"}, - {file = "ruff-0.8.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:1ca4e3a87496dc07d2427b7dd7ffa88a1e597c28dad65ae6433ecb9f2e4f022f"}, - {file = "ruff-0.8.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:729850feed82ef2440aa27946ab39c18cb4a8889c1128a6d589ffa028ddcfc22"}, - {file = "ruff-0.8.2-py3-none-win32.whl", hash = "sha256:ac42caaa0411d6a7d9594363294416e0e48fc1279e1b0e948391695db2b3d5b1"}, - {file = "ruff-0.8.2-py3-none-win_amd64.whl", hash = "sha256:2aae99ec70abf43372612a838d97bfe77d45146254568d94926e8ed5bbb409ea"}, - {file = "ruff-0.8.2-py3-none-win_arm64.whl", hash = "sha256:fb88e2a506b70cfbc2de6fae6681c4f944f7dd5f2fe87233a7233d888bad73e8"}, - {file = "ruff-0.8.2.tar.gz", hash = "sha256:b84f4f414dda8ac7f75075c1fa0b905ac0ff25361f42e6d5da681a465e0f78e5"}, + {file = "ruff-0.9.3-py3-none-linux_armv6l.whl", hash = "sha256:7f39b879064c7d9670197d91124a75d118d00b0990586549949aae80cdc16624"}, + {file = "ruff-0.9.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a187171e7c09efa4b4cc30ee5d0d55a8d6c5311b3e1b74ac5cb96cc89bafc43c"}, + {file = "ruff-0.9.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c59ab92f8e92d6725b7ded9d4a31be3ef42688a115c6d3da9457a5bda140e2b4"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dc153c25e715be41bb228bc651c1e9b1a88d5c6e5ed0194fa0dfea02b026439"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:646909a1e25e0dc28fbc529eab8eb7bb583079628e8cbe738192853dbbe43af5"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a5a46e09355695fbdbb30ed9889d6cf1c61b77b700a9fafc21b41f097bfbba4"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c4bb09d2bbb394e3730d0918c00276e79b2de70ec2a5231cd4ebb51a57df9ba1"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96a87ec31dc1044d8c2da2ebbed1c456d9b561e7d087734336518181b26b3aa5"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb7554aca6f842645022fe2d301c264e6925baa708b392867b7a62645304df4"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cabc332b7075a914ecea912cd1f3d4370489c8018f2c945a30bcc934e3bc06a6"}, + {file = "ruff-0.9.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:33866c3cc2a575cbd546f2cd02bdd466fed65118e4365ee538a3deffd6fcb730"}, + {file = "ruff-0.9.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:006e5de2621304c8810bcd2ee101587712fa93b4f955ed0985907a36c427e0c2"}, + {file = "ruff-0.9.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ba6eea4459dbd6b1be4e6bfc766079fb9b8dd2e5a35aff6baee4d9b1514ea519"}, + {file = "ruff-0.9.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:90230a6b8055ad47d3325e9ee8f8a9ae7e273078a66401ac66df68943ced029b"}, + {file = "ruff-0.9.3-py3-none-win32.whl", hash = "sha256:eabe5eb2c19a42f4808c03b82bd313fc84d4e395133fb3fc1b1516170a31213c"}, + {file = "ruff-0.9.3-py3-none-win_amd64.whl", hash = "sha256:040ceb7f20791dfa0e78b4230ee9dce23da3b64dd5848e40e3bf3ab76468dcf4"}, + {file = "ruff-0.9.3-py3-none-win_arm64.whl", hash = "sha256:800d773f6d4d33b0a3c60e2c6ae8f4c202ea2de056365acfa519aa48acf28e0b"}, + {file = "ruff-0.9.3.tar.gz", hash = "sha256:8293f89985a090ebc3ed1064df31f3b4b56320cdfcec8b60d3295bddb955c22a"}, ] [[package]] @@ -3183,4 +3183,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.10, <4.0" -content-hash = "822150bcbf41e5cbb61da0a059b41d8971e3c6c974c8af4be7ef55126648aea1" +content-hash = "25e6ea21f5acb616cbec4a7967bd6de619b684e6828f3d04381352353793e56b" diff --git a/pyproject.toml b/pyproject.toml index 8d0b37a23..a7d554b84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ dill = ">=0.3.8" toml = ">=0.10.2,<1.0" pytest-asyncio = ">=0.24.0" pytest-cov = ">=4.0.0,<7.0" -ruff = "0.8.2" +ruff = "0.9.3" pandas = ">=2.1.1,<3.0" pillow = ">=10.0.0,<12.0" plotly = ">=5.13.0,<6.0" @@ -88,7 +88,7 @@ target-version = "py310" output-format = "concise" lint.isort.split-on-trailing-comma = false lint.select = ["ANN001","B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PGH", "PTH", "RUF", "SIM", "T", "TRY", "W"] -lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF012", "TRY0"] +lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF008", "RUF012", "TRY0"] lint.pydocstyle.convention = "google" [tool.ruff.lint.per-file-ignores] diff --git a/reflex/app.py b/reflex/app.py index dd4f4f5cb..f681addc5 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -1310,7 +1310,7 @@ class App(MiddlewareMixin, LifespanMixin): ): raise ValueError( f"Provided custom {handler_domain} exception handler `{_fn_name}` has the wrong argument order." - f"Expected `{required_arg}` as the {required_arg_index+1} argument but got `{list(arg_annotations.keys())[required_arg_index]}`" + f"Expected `{required_arg}` as the {required_arg_index + 1} argument but got `{list(arg_annotations.keys())[required_arg_index]}`" ) if not issubclass(arg_annotations[required_arg], Exception): diff --git a/reflex/components/component.py b/reflex/components/component.py index 440a408df..6d1264f4d 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -623,8 +623,7 @@ class Component(BaseComponent, ABC): if props is None: # Add component props to the tag. props = { - attr[:-1] if attr.endswith("_") else attr: getattr(self, attr) - for attr in self.get_props() + attr.removesuffix("_"): getattr(self, attr) for attr in self.get_props() } # Add ref to element if `id` is not None. diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index 338fb2e44..dfac0452a 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -347,7 +347,7 @@ class DataEditor(NoSSRComponent): data_callback = f"getData_{editor_id}" self.get_cell_content = Var(_js_expr=data_callback) - code = [f"function {data_callback}([col, row])" "{"] + code = [f"function {data_callback}([col, row]){{"] columns_path = str(self.columns) data_path = str(self.data) diff --git a/reflex/custom_components/custom_components.py b/reflex/custom_components/custom_components.py index 024e77eee..a54004803 100644 --- a/reflex/custom_components/custom_components.py +++ b/reflex/custom_components/custom_components.py @@ -772,7 +772,7 @@ def _validate_project_info(): pyproject_toml = _get_package_config() project = pyproject_toml["project"] console.print( - f'Double check the information before publishing: {project["name"]} version {project["version"]}' + f"Double check the information before publishing: {project['name']} version {project['version']}" ) console.print("Update or enter to keep the current information.") @@ -784,7 +784,7 @@ def _validate_project_info(): author["name"] = console.ask("Author Name", default=author.get("name", "")) author["email"] = console.ask("Author Email", default=author.get("email", "")) - console.print(f'Current keywords are: {project.get("keywords") or []}') + console.print(f"Current keywords are: {project.get('keywords') or []}") keyword_action = console.ask( "Keep, replace or append?", choices=["k", "r", "a"], default="k" ) diff --git a/reflex/event.py b/reflex/event.py index 5ce0f3dc1..f35e88389 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -332,7 +332,7 @@ class EventSpec(EventActionsMixin): arg = None try: for arg in args: - values.append(LiteralVar.create(value=arg)) # noqa: PERF401 + values.append(LiteralVar.create(value=arg)) # noqa: PERF401, RUF100 except TypeError as e: raise EventHandlerTypeError( f"Arguments to event handlers must be Vars or JSON-serializable. Got {arg} of type {type(arg)}." diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 8330a315c..f78908a84 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -1855,7 +1855,7 @@ def initialize_main_module_index_from_generation(app_name: str, generation_hash: [ resp.text, "", - "" "def index() -> rx.Component:", + "def index() -> rx.Component:", f" return {render_func_name}()", "", "", diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index bd10e1c1c..bd9c94a6e 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -622,7 +622,7 @@ def _generate_component_create_functiondef( defaults=[], ) - definition = ast.FunctionDef( + definition = ast.FunctionDef( # pyright: ignore [reportCallIssue] name="create", args=create_args, body=[ # pyright: ignore [reportArgumentType] @@ -684,7 +684,7 @@ def _generate_staticmethod_call_functiondef( else [] ), ) - definition = ast.FunctionDef( + definition = ast.FunctionDef( # pyright: ignore [reportCallIssue] name="__call__", args=call_args, body=[ diff --git a/reflex/vars/datetime.py b/reflex/vars/datetime.py index c43c24165..a18df78d0 100644 --- a/reflex/vars/datetime.py +++ b/reflex/vars/datetime.py @@ -184,7 +184,7 @@ def date_compare_operation( The result of the operation. """ return var_operation_return( - f"({lhs} { '<' if strict else '<='} {rhs})", + f"({lhs} {'<' if strict else '<='} {rhs})", bool, ) diff --git a/tests/integration/test_connection_banner.py b/tests/integration/test_connection_banner.py index 4867cf868..e6a8caef6 100644 --- a/tests/integration/test_connection_banner.py +++ b/tests/integration/test_connection_banner.py @@ -136,9 +136,9 @@ def _assert_token(connection_banner, driver): driver: Selenium webdriver instance. """ ss = SessionStorage(driver) - assert connection_banner._poll_for( - lambda: ss.get("token") is not None - ), "token not found" + assert connection_banner._poll_for(lambda: ss.get("token") is not None), ( + "token not found" + ) @pytest.mark.asyncio @@ -153,7 +153,6 @@ async def test_connection_banner(connection_banner: AppHarness): driver = connection_banner.frontend() _assert_token(connection_banner, driver) - assert connection_banner._poll_for(lambda: not has_error_modal(driver)) delay_button = driver.find_element(By.ID, "delay") diff --git a/tests/units/components/core/test_colors.py b/tests/units/components/core/test_colors.py index 15490e576..31cd75b47 100644 --- a/tests/units/components/core/test_colors.py +++ b/tests/units/components/core/test_colors.py @@ -55,13 +55,13 @@ def create_color_var(color): Color, ), ( - create_color_var(f'{rx.color(ColorState.color, f"{ColorState.shade}")}'), # pyright: ignore [reportArgumentType] + create_color_var(f"{rx.color(ColorState.color, f'{ColorState.shade}')}"), # pyright: ignore [reportArgumentType] f'("var(--"+{color_state_name!s}.color+"-"+{color_state_name!s}.shade+")")', str, ), ( create_color_var( - f'{rx.color(f"{ColorState.color}", f"{ColorState.shade}")}' # pyright: ignore [reportArgumentType] + f"{rx.color(f'{ColorState.color}', f'{ColorState.shade}')}" # pyright: ignore [reportArgumentType] ), f'("var(--"+{color_state_name!s}.color+"-"+{color_state_name!s}.shade+")")', str, From 238b03a8c753e27e51581de384f005fcf855b192 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 31 Jan 2025 18:36:35 -0800 Subject: [PATCH 072/144] disable react strict mode for event loop (#4720) * disable react strict mode for event loop * oops * pyi oui * separate socket connection from event loop * prettier state.js * disable react strict mode * didn't work sadge * socket connect/disconnect depends on new isBackendDisabled state * only start the event loop when the socket is set or we're not stateful * Always drain the queue unless backend is disabled --------- Co-authored-by: Masen Furer --- .../.templates/jinja/web/pages/_app.js.jinja2 | 14 ++-- reflex/.templates/web/utils/state.js | 69 +++++++++++-------- reflex/app.py | 10 ++- reflex/components/base/strict_mode.py | 10 +++ reflex/components/base/strict_mode.pyi | 57 +++++++++++++++ reflex/utils/prerequisites.py | 1 - tests/units/test_app.py | 38 +++++++--- tests/units/test_prerequisites.py | 12 ++-- 8 files changed, 157 insertions(+), 54 deletions(-) create mode 100644 reflex/components/base/strict_mode.py create mode 100644 reflex/components/base/strict_mode.pyi diff --git a/reflex/.templates/jinja/web/pages/_app.js.jinja2 b/reflex/.templates/jinja/web/pages/_app.js.jinja2 index 40e31dee6..ee3e24540 100644 --- a/reflex/.templates/jinja/web/pages/_app.js.jinja2 +++ b/reflex/.templates/jinja/web/pages/_app.js.jinja2 @@ -38,13 +38,13 @@ export default function MyApp({ Component, pageProps }) { }, []); return ( - - - - - - - + + + + + + + ); } diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index 009910a32..2f09ac2de 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -227,8 +227,8 @@ export const applyEvent = async (event, socket) => { a.href = eval?.( event.payload.url.replace( "getBackendURL(env.UPLOAD)", - `"${getBackendURL(env.UPLOAD)}"` - ) + `"${getBackendURL(env.UPLOAD)}"`, + ), ); } a.download = event.payload.filename; @@ -341,7 +341,7 @@ export const applyRestEvent = async (event, socket) => { event.payload.files, event.payload.upload_id, event.payload.on_upload_progress, - socket + socket, ); return false; } @@ -408,7 +408,7 @@ export const connect = async ( dispatch, transports, setConnectErrors, - client_storage = {} + client_storage = {}, ) => { // Get backend URL object from the endpoint. const endpoint = getBackendURL(EVENTURL); @@ -499,7 +499,7 @@ export const uploadFiles = async ( files, upload_id, on_upload_progress, - socket + socket, ) => { // return if there's no file to upload if (files === undefined || files.length === 0) { @@ -604,7 +604,7 @@ export const Event = ( name, payload = {}, event_actions = {}, - handler = null + handler = null, ) => { return { name, payload, handler, event_actions }; }; @@ -631,7 +631,7 @@ export const hydrateClientStorage = (client_storage) => { for (const state_key in client_storage.local_storage) { const options = client_storage.local_storage[state_key]; const local_storage_value = localStorage.getItem( - options.name || state_key + options.name || state_key, ); if (local_storage_value !== null) { client_storage_values[state_key] = local_storage_value; @@ -642,7 +642,7 @@ export const hydrateClientStorage = (client_storage) => { for (const state_key in client_storage.session_storage) { const session_options = client_storage.session_storage[state_key]; const session_storage_value = sessionStorage.getItem( - session_options.name || state_key + session_options.name || state_key, ); if (session_storage_value != null) { client_storage_values[state_key] = session_storage_value; @@ -667,7 +667,7 @@ export const hydrateClientStorage = (client_storage) => { const applyClientStorageDelta = (client_storage, delta) => { // find the main state and check for is_hydrated const unqualified_states = Object.keys(delta).filter( - (key) => key.split(".").length === 1 + (key) => key.split(".").length === 1, ); if (unqualified_states.length === 1) { const main_state = delta[unqualified_states[0]]; @@ -701,7 +701,7 @@ const applyClientStorageDelta = (client_storage, delta) => { const session_options = client_storage.session_storage[state_key]; sessionStorage.setItem( session_options.name || state_key, - delta[substate][key] + delta[substate][key], ); } } @@ -721,7 +721,7 @@ const applyClientStorageDelta = (client_storage, delta) => { export const useEventLoop = ( dispatch, initial_events = () => [], - client_storage = {} + client_storage = {}, ) => { const socket = useRef(null); const router = useRouter(); @@ -735,7 +735,7 @@ export const useEventLoop = ( event_actions = events.reduce( (acc, e) => ({ ...acc, ...e.event_actions }), - event_actions ?? {} + event_actions ?? {}, ); const _e = args.filter((o) => o?.preventDefault !== undefined)[0]; @@ -763,7 +763,7 @@ export const useEventLoop = ( debounce( combined_name, () => queueEvents(events, socket), - event_actions.debounce + event_actions.debounce, ); } else { queueEvents(events, socket); @@ -782,7 +782,7 @@ export const useEventLoop = ( query, asPath, }))(router), - })) + })), ); sentHydrate.current = true; } @@ -817,13 +817,9 @@ export const useEventLoop = ( }; }, []); - // Main event loop. + // Handle socket connect/disconnect. useEffect(() => { - // Skip if the router is not ready. - if (!router.isReady) { - return; - } - // only use websockets if state is present + // only use websockets if state is present and backend is not disabled (reflex cloud). if (Object.keys(initialState).length > 1 && !isBackendDisabled()) { // Initialize the websocket connection. if (!socket.current) { @@ -832,16 +828,31 @@ export const useEventLoop = ( dispatch, ["websocket"], setConnectErrors, - client_storage + client_storage, ); } - (async () => { - // Process all outstanding events. - while (event_queue.length > 0 && !event_processing) { - await processEvent(socket.current); - } - })(); } + + // Cleanup function. + return () => { + if (socket.current) { + socket.current.disconnect(); + } + }; + }, []); + + // Main event loop. + useEffect(() => { + // Skip if the router is not ready. + if (!router.isReady || isBackendDisabled()) { + return; + } + (async () => { + // Process all outstanding events. + while (event_queue.length > 0 && !event_processing) { + await processEvent(socket.current); + } + })(); }); // localStorage event handling @@ -865,7 +876,7 @@ export const useEventLoop = ( vars[storage_to_state_map[e.key]] = e.newValue; const event = Event( `${state_name}.reflex___state____update_vars_internal_state.update_vars_internal`, - { vars: vars } + { vars: vars }, ); addEvents([event], e); } @@ -958,7 +969,7 @@ export const getRefValues = (refs) => { return refs.map((ref) => ref.current ? ref.current.value || ref.current.getAttribute("aria-valuenow") - : null + : null, ); }; diff --git a/reflex/app.py b/reflex/app.py index f681addc5..247977e7e 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -54,6 +54,7 @@ from reflex.compiler.compiler import ExecutorSafeFunctions, compile_theme from reflex.components.base.app_wrap import AppWrap from reflex.components.base.error_boundary import ErrorBoundary from reflex.components.base.fragment import Fragment +from reflex.components.base.strict_mode import StrictMode from reflex.components.component import ( Component, ComponentStyle, @@ -956,6 +957,12 @@ class App(MiddlewareMixin, LifespanMixin): # If a theme component was provided, wrap the app with it app_wrappers[(20, "Theme")] = self.theme + # Get the env mode. + config = get_config() + + if config.react_strict_mode: + app_wrappers[(200, "StrictMode")] = StrictMode.create() + should_compile = self._should_compile() if not should_compile: @@ -1001,9 +1008,6 @@ class App(MiddlewareMixin, LifespanMixin): progress.advance(task) - # Get the env mode. - config = get_config() - # Store the compile results. compile_results = [] diff --git a/reflex/components/base/strict_mode.py b/reflex/components/base/strict_mode.py new file mode 100644 index 000000000..46b01ad87 --- /dev/null +++ b/reflex/components/base/strict_mode.py @@ -0,0 +1,10 @@ +"""Module for the StrictMode component.""" + +from reflex.components.component import Component + + +class StrictMode(Component): + """A React strict mode component to enable strict mode for its children.""" + + library = "react" + tag = "StrictMode" diff --git a/reflex/components/base/strict_mode.pyi b/reflex/components/base/strict_mode.pyi new file mode 100644 index 000000000..9005c0222 --- /dev/null +++ b/reflex/components/base/strict_mode.pyi @@ -0,0 +1,57 @@ +"""Stub file for reflex/components/base/strict_mode.py""" + +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `reflex/utils/pyi_generator.py`! +# ------------------------------------------------------ +from typing import Any, Dict, Optional, Union, overload + +from reflex.components.component import Component +from reflex.event import BASE_STATE, EventType +from reflex.style import Style +from reflex.vars.base import Var + +class StrictMode(Component): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[[], BASE_STATE]] = None, + **props, + ) -> "StrictMode": + """Create the component. + + Args: + *children: The children of the component. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The props of the component. + + Returns: + The component. + """ + ... diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index f78908a84..4741400f8 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -912,7 +912,6 @@ def _update_next_config( next_config = { "basePath": config.frontend_path or "", "compress": config.next_compression, - "reactStrictMode": config.react_strict_mode, "trailingSlash": True, "staticPageGenerationTimeout": config.static_page_generation_timeout, } diff --git a/tests/units/test_app.py b/tests/units/test_app.py index bf1a8a313..058174a1b 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -1274,12 +1274,23 @@ def compilable_app(tmp_path) -> Generator[tuple[App, Path], None, None]: yield app, web_dir -def test_app_wrap_compile_theme(compilable_app: tuple[App, Path]): +@pytest.mark.parametrize( + "react_strict_mode", + [True, False], +) +def test_app_wrap_compile_theme( + react_strict_mode: bool, compilable_app: tuple[App, Path], mocker +): """Test that the radix theme component wraps the app. Args: + react_strict_mode: Whether to use React Strict Mode. compilable_app: compilable_app fixture. + mocker: pytest mocker object. """ + conf = rx.Config(app_name="testing", react_strict_mode=react_strict_mode) + mocker.patch("reflex.config._get_config", return_value=conf) + app, web_dir = compilable_app app.theme = rx.theme(accent_color="plum") app._compile() @@ -1290,24 +1301,37 @@ def test_app_wrap_compile_theme(compilable_app: tuple[App, Path]): assert ( "function AppWrap({children}) {" "return (" - "" + + ("" if react_strict_mode else "") + + "" "" "" "{children}" "" "" "" - ")" + + ("" if react_strict_mode else "") + + ")" "}" ) in "".join(app_js_lines) -def test_app_wrap_priority(compilable_app: tuple[App, Path]): +@pytest.mark.parametrize( + "react_strict_mode", + [True, False], +) +def test_app_wrap_priority( + react_strict_mode: bool, compilable_app: tuple[App, Path], mocker +): """Test that the app wrap components are wrapped in the correct order. Args: + react_strict_mode: Whether to use React Strict Mode. compilable_app: compilable_app fixture. + mocker: pytest mocker object. """ + conf = rx.Config(app_name="testing", react_strict_mode=react_strict_mode) + mocker.patch("reflex.config._get_config", return_value=conf) + app, web_dir = compilable_app class Fragment1(Component): @@ -1339,8 +1363,7 @@ def test_app_wrap_priority(compilable_app: tuple[App, Path]): ] assert ( "function AppWrap({children}) {" - "return (" - "" + "return (" + ("" if react_strict_mode else "") + "" '' "" "" @@ -1350,8 +1373,7 @@ def test_app_wrap_priority(compilable_app: tuple[App, Path]): "" "" "" - "" - ")" + "" + ("" if react_strict_mode else "") + ")" "}" ) in "".join(app_js_lines) diff --git a/tests/units/test_prerequisites.py b/tests/units/test_prerequisites.py index 3bd029077..4723d8648 100644 --- a/tests/units/test_prerequisites.py +++ b/tests/units/test_prerequisites.py @@ -32,7 +32,7 @@ runner = CliRunner() app_name="test", ), False, - 'module.exports = {basePath: "", compress: true, reactStrictMode: true, trailingSlash: true, staticPageGenerationTimeout: 60};', + 'module.exports = {basePath: "", compress: true, trailingSlash: true, staticPageGenerationTimeout: 60};', ), ( Config( @@ -40,7 +40,7 @@ runner = CliRunner() static_page_generation_timeout=30, ), False, - 'module.exports = {basePath: "", compress: true, reactStrictMode: true, trailingSlash: true, staticPageGenerationTimeout: 30};', + 'module.exports = {basePath: "", compress: true, trailingSlash: true, staticPageGenerationTimeout: 30};', ), ( Config( @@ -48,7 +48,7 @@ runner = CliRunner() next_compression=False, ), False, - 'module.exports = {basePath: "", compress: false, reactStrictMode: true, trailingSlash: true, staticPageGenerationTimeout: 60};', + 'module.exports = {basePath: "", compress: false, trailingSlash: true, staticPageGenerationTimeout: 60};', ), ( Config( @@ -56,7 +56,7 @@ runner = CliRunner() frontend_path="/test", ), False, - 'module.exports = {basePath: "/test", compress: true, reactStrictMode: true, trailingSlash: true, staticPageGenerationTimeout: 60};', + 'module.exports = {basePath: "/test", compress: true, trailingSlash: true, staticPageGenerationTimeout: 60};', ), ( Config( @@ -65,14 +65,14 @@ runner = CliRunner() next_compression=False, ), False, - 'module.exports = {basePath: "/test", compress: false, reactStrictMode: true, trailingSlash: true, staticPageGenerationTimeout: 60};', + 'module.exports = {basePath: "/test", compress: false, trailingSlash: true, staticPageGenerationTimeout: 60};', ), ( Config( app_name="test", ), True, - 'module.exports = {basePath: "", compress: true, reactStrictMode: true, trailingSlash: true, staticPageGenerationTimeout: 60, output: "export", distDir: "_static"};', + 'module.exports = {basePath: "", compress: true, trailingSlash: true, staticPageGenerationTimeout: 60, output: "export", distDir: "_static"};', ), ], ) From 68547dce4ce3ff098d24af8a971ea78d5745189e Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Fri, 31 Jan 2025 19:22:00 -0800 Subject: [PATCH 073/144] Remove upper pin (#4684) Co-authored-by: Alek Petuskey Co-authored-by: Khaleel Al-Adhami --- poetry.lock | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index be9d19e53..f5007ee07 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3183,4 +3183,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.10, <4.0" -content-hash = "25e6ea21f5acb616cbec4a7967bd6de619b684e6828f3d04381352353793e56b" +content-hash = "3b7e6e6e872c68f951f191d85a7d76fe1dd86caf32e2143a53a3152a3686fc7f" diff --git a/pyproject.toml b/pyproject.toml index a7d554b84..2b5507a1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ wrapt = [ { version = ">=1.11.0,<2.0", python = "<3.11" }, ] packaging = ">=23.1,<25.0" -reflex-hosting-cli = ">=0.1.29,<2.0" +reflex-hosting-cli = ">=0.1.29" charset-normalizer = ">=3.3.2,<4.0" wheel = ">=0.42.0,<1.0" build = ">=1.0.3,<2.0" From 15da4e17bd885c1b1a05fcbfea8a38a96a1e434b Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 3 Feb 2025 09:31:32 -0800 Subject: [PATCH 074/144] fix optional wrapping of static call methods in pyi (#4727) --- reflex/app.py | 2 +- reflex/components/sonner/toast.pyi | 2 +- reflex/utils/pyi_generator.py | 1 + tests/units/test_state.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 247977e7e..060f03469 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -151,7 +151,7 @@ def default_backend_exception_handler(exception: Exception) -> EventSpec: position="top-center", id="backend_error", style={"width": "500px"}, - ) # pyright: ignore [reportReturnType] + ) else: error_message.insert(0, "An error occurred.") return window_alert("\n".join(error_message)) diff --git a/reflex/components/sonner/toast.pyi b/reflex/components/sonner/toast.pyi index 829e959d5..632fb0d87 100644 --- a/reflex/components/sonner/toast.pyi +++ b/reflex/components/sonner/toast.pyi @@ -177,7 +177,7 @@ class ToastNamespace(ComponentNamespace): @staticmethod def __call__( message: Union[str, Var] = "", level: Optional[str] = None, **props - ) -> "Optional[EventSpec]": + ) -> "EventSpec": """Send a toast message. Args: diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index bd9c94a6e..beb355d31 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -699,6 +699,7 @@ def _generate_staticmethod_call_functiondef( value=_get_type_hint( typing.get_type_hints(clz.__call__).get("return", None), type_hint_globals, + is_optional=False, ) ), ) diff --git a/tests/units/test_state.py b/tests/units/test_state.py index 44c3f60b7..e0390c5ac 100644 --- a/tests/units/test_state.py +++ b/tests/units/test_state.py @@ -1623,7 +1623,7 @@ async def test_state_with_invalid_yield(capsys, mock_app): id="backend_error", position="top-center", style={"width": "500px"}, - ) # pyright: ignore [reportCallIssue, reportArgumentType] + ) ], token="", ) From 2b7e4d6b4e0ae41856080c2ff4db0c2f67f52476 Mon Sep 17 00:00:00 2001 From: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Date: Mon, 3 Feb 2025 18:33:22 +0100 Subject: [PATCH 075/144] improve rx.Field ObjectVar typing for sqlalchemy and dataclasses (#4728) * improve rx.Field ObjectVar typing for sqlalchemy and dataclasses * enable parametrized objectvar tests for sqlamodel and dataclass * improve typing for ObjectVars in ArrayVars * ruffing * drop duplicate objectvar import * remove redundant overload * allow optional hints in rx.Field annotations to resolve to the correct var type --- reflex/vars/base.py | 29 ++++++++++--- reflex/vars/sequence.py | 25 ++++++++++-- tests/units/vars/test_object.py | 72 ++++++++++++++++++++++++++++++--- 3 files changed, 111 insertions(+), 15 deletions(-) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index ec65c3711..8609d46cc 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -40,6 +40,7 @@ from typing import ( overload, ) +from sqlalchemy.orm import DeclarativeBase from typing_extensions import ParamSpec, TypeGuard, deprecated, get_type_hints, override from reflex import constants @@ -573,7 +574,7 @@ class Var(Generic[VAR_TYPE]): @overload @classmethod - def create( # type: ignore[override] + def create( # pyright: ignore[reportOverlappingOverload] cls, value: bool, _var_data: VarData | None = None, @@ -581,7 +582,7 @@ class Var(Generic[VAR_TYPE]): @overload @classmethod - def create( # type: ignore[override] + def create( cls, value: int, _var_data: VarData | None = None, @@ -605,7 +606,7 @@ class Var(Generic[VAR_TYPE]): @overload @classmethod - def create( + def create( # pyright: ignore[reportOverlappingOverload] cls, value: None, _var_data: VarData | None = None, @@ -3182,10 +3183,16 @@ def dispatch( V = TypeVar("V") -BASE_TYPE = TypeVar("BASE_TYPE", bound=Base) +BASE_TYPE = TypeVar("BASE_TYPE", bound=Base | None) +SQLA_TYPE = TypeVar("SQLA_TYPE", bound=DeclarativeBase | None) + +if TYPE_CHECKING: + from _typeshed import DataclassInstance + + DATACLASS_TYPE = TypeVar("DATACLASS_TYPE", bound=DataclassInstance | None) FIELD_TYPE = TypeVar("FIELD_TYPE") -MAPPING_TYPE = TypeVar("MAPPING_TYPE", bound=Mapping) +MAPPING_TYPE = TypeVar("MAPPING_TYPE", bound=Mapping | None) class Field(Generic[FIELD_TYPE]): @@ -3230,6 +3237,18 @@ class Field(Generic[FIELD_TYPE]): self: Field[BASE_TYPE], instance: None, owner: Any ) -> ObjectVar[BASE_TYPE]: ... + @overload + def __get__( + self: Field[SQLA_TYPE], instance: None, owner: Any + ) -> ObjectVar[SQLA_TYPE]: ... + + if TYPE_CHECKING: + + @overload + def __get__( + self: Field[DATACLASS_TYPE], instance: None, owner: Any + ) -> ObjectVar[DATACLASS_TYPE]: ... + @overload def __get__(self, instance: None, owner: Any) -> Var[FIELD_TYPE]: ... diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index dfd9a6af8..fb797b4ec 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -53,8 +53,11 @@ from .number import ( ) if TYPE_CHECKING: + from .base import BASE_TYPE, DATACLASS_TYPE, SQLA_TYPE + from .function import FunctionVar from .object import ObjectVar + STRING_TYPE = TypeVar("STRING_TYPE", default=str) @@ -961,6 +964,24 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(list, tuple, set)): i: int | NumberVar, ) -> ObjectVar[Dict[KEY_TYPE, VALUE_TYPE]]: ... + @overload + def __getitem__( + self: ARRAY_VAR_OF_LIST_ELEMENT[BASE_TYPE], + i: int | NumberVar, + ) -> ObjectVar[BASE_TYPE]: ... + + @overload + def __getitem__( + self: ARRAY_VAR_OF_LIST_ELEMENT[SQLA_TYPE], + i: int | NumberVar, + ) -> ObjectVar[SQLA_TYPE]: ... + + @overload + def __getitem__( + self: ARRAY_VAR_OF_LIST_ELEMENT[DATACLASS_TYPE], + i: int | NumberVar, + ) -> ObjectVar[DATACLASS_TYPE]: ... + @overload def __getitem__(self, i: int | NumberVar) -> Var: ... @@ -1648,10 +1669,6 @@ def repeat_array_operation( ) -if TYPE_CHECKING: - from .function import FunctionVar - - @var_operation def map_array_operation( array: ArrayVar[ARRAY_VAR_TYPE], diff --git a/tests/units/vars/test_object.py b/tests/units/vars/test_object.py index efcb21166..90e34be96 100644 --- a/tests/units/vars/test_object.py +++ b/tests/units/vars/test_object.py @@ -1,10 +1,14 @@ +import dataclasses + import pytest +from sqlalchemy.orm import DeclarativeBase, Mapped, MappedAsDataclass, mapped_column from typing_extensions import assert_type import reflex as rx from reflex.utils.types import GenericType from reflex.vars.base import Var from reflex.vars.object import LiteralObjectVar, ObjectVar +from reflex.vars.sequence import ArrayVar class Bare: @@ -32,14 +36,44 @@ class Base(rx.Base): quantity: int = 0 +class SqlaBase(DeclarativeBase, MappedAsDataclass): + """Sqlalchemy declarative mapping base class.""" + + pass + + +class SqlaModel(SqlaBase): + """A sqlalchemy model with a single attribute.""" + + __tablename__: str = "sqla_model" + + id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True, init=False) + quantity: Mapped[int] = mapped_column(default=0) + + +@dataclasses.dataclass +class Dataclass: + """A dataclass with a single attribute.""" + + quantity: int = 0 + + class ObjectState(rx.State): - """A reflex state with bare and base objects.""" + """A reflex state with bare, base and sqlalchemy base vars.""" bare: rx.Field[Bare] = rx.field(Bare()) + bare_optional: rx.Field[Bare | None] = rx.field(None) base: rx.Field[Base] = rx.field(Base()) + base_optional: rx.Field[Base | None] = rx.field(None) + sqlamodel: rx.Field[SqlaModel] = rx.field(SqlaModel()) + sqlamodel_optional: rx.Field[SqlaModel | None] = rx.field(None) + dataclass: rx.Field[Dataclass] = rx.field(Dataclass()) + dataclass_optional: rx.Field[Dataclass | None] = rx.field(None) + + base_list: rx.Field[list[Base]] = rx.field([Base()]) -@pytest.mark.parametrize("type_", [Base, Bare]) +@pytest.mark.parametrize("type_", [Base, Bare, SqlaModel, Dataclass]) def test_var_create(type_: GenericType) -> None: my_object = type_() var = Var.create(my_object) @@ -49,7 +83,7 @@ def test_var_create(type_: GenericType) -> None: assert quantity._var_type is int -@pytest.mark.parametrize("type_", [Base, Bare]) +@pytest.mark.parametrize("type_", [Base, Bare, SqlaModel, Dataclass]) def test_literal_create(type_: GenericType) -> None: my_object = type_() var = LiteralObjectVar.create(my_object) @@ -59,7 +93,7 @@ def test_literal_create(type_: GenericType) -> None: assert quantity._var_type is int -@pytest.mark.parametrize("type_", [Base, Bare]) +@pytest.mark.parametrize("type_", [Base, Bare, SqlaModel, Dataclass]) def test_guess(type_: GenericType) -> None: my_object = type_() var = Var.create(my_object) @@ -70,7 +104,7 @@ def test_guess(type_: GenericType) -> None: assert quantity._var_type is int -@pytest.mark.parametrize("type_", [Base, Bare]) +@pytest.mark.parametrize("type_", [Base, Bare, SqlaModel, Dataclass]) def test_state(type_: GenericType) -> None: attr_name = type_.__name__.lower() var = getattr(ObjectState, attr_name) @@ -80,7 +114,7 @@ def test_state(type_: GenericType) -> None: assert quantity._var_type is int -@pytest.mark.parametrize("type_", [Base, Bare]) +@pytest.mark.parametrize("type_", [Base, Bare, SqlaModel, Dataclass]) def test_state_to_operation(type_: GenericType) -> None: attr_name = type_.__name__.lower() original_var = getattr(ObjectState, attr_name) @@ -100,3 +134,29 @@ def test_typing() -> None: # Base var = ObjectState.base _ = assert_type(var, ObjectVar[Base]) + optional_var = ObjectState.base_optional + _ = assert_type(optional_var, ObjectVar[Base | None]) + list_var = ObjectState.base_list + _ = assert_type(list_var, ArrayVar[list[Base]]) + list_var_0 = list_var[0] + _ = assert_type(list_var_0, ObjectVar[Base]) + + # Sqla + var = ObjectState.sqlamodel + _ = assert_type(var, ObjectVar[SqlaModel]) + optional_var = ObjectState.sqlamodel_optional + _ = assert_type(optional_var, ObjectVar[SqlaModel | None]) + list_var = ObjectState.base_list + _ = assert_type(list_var, ArrayVar[list[Base]]) + list_var_0 = list_var[0] + _ = assert_type(list_var_0, ObjectVar[Base]) + + # Dataclass + var = ObjectState.dataclass + _ = assert_type(var, ObjectVar[Dataclass]) + optional_var = ObjectState.dataclass_optional + _ = assert_type(optional_var, ObjectVar[Dataclass | None]) + list_var = ObjectState.base_list + _ = assert_type(list_var, ArrayVar[list[Base]]) + list_var_0 = list_var[0] + _ = assert_type(list_var_0, ObjectVar[Base]) From d6e08e90a899fc4910877ffbd154bf30a4ca3b31 Mon Sep 17 00:00:00 2001 From: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Date: Mon, 3 Feb 2025 18:34:12 +0100 Subject: [PATCH 076/144] better computed var static deps (#4729) * better computed var static deps * typing and usability improvements for computed var static dependencies --- reflex/vars/base.py | 87 +++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 26 deletions(-) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 8609d46cc..9f6652122 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -1983,7 +1983,7 @@ class ComputedVar(Var[RETURN_TYPE]): _initial_value: RETURN_TYPE | types.Unset = dataclasses.field(default=types.Unset()) # Explicit var dependencies to track - _static_deps: dict[str, set[str]] = dataclasses.field(default_factory=dict) + _static_deps: dict[str | None, set[str]] = dataclasses.field(default_factory=dict) # Whether var dependencies should be auto-determined _auto_deps: bool = dataclasses.field(default=True) @@ -2053,39 +2053,72 @@ class ComputedVar(Var[RETURN_TYPE]): object.__setattr__(self, "_update_interval", interval) - _static_deps = {} - if isinstance(deps, dict): - # Assume a dict is coming from _replace, so no special processing. - _static_deps = deps - elif deps is not None: - for dep in deps: - if isinstance(dep, Var): - state_name = ( - all_var_data.state - if (all_var_data := dep._get_all_var_data()) - and all_var_data.state - else None - ) - if all_var_data is not None: - var_name = all_var_data.field_name - else: - var_name = dep._js_expr - _static_deps.setdefault(state_name, set()).add(var_name) - elif isinstance(dep, str) and dep != "": - _static_deps.setdefault(None, set()).add(dep) - else: - raise TypeError( - "ComputedVar dependencies must be Var instances or var names (non-empty strings)." - ) object.__setattr__( self, "_static_deps", - _static_deps, + self._calculate_static_deps(deps), ) object.__setattr__(self, "_auto_deps", auto_deps) object.__setattr__(self, "_fget", fget) + def _calculate_static_deps( + self, + deps: Union[List[Union[str, Var]], dict[str | None, set[str]]] | None = None, + ) -> dict[str | None, set[str]]: + """Calculate the static dependencies of the computed var from user input or existing dependencies. + + Args: + deps: The user input dependencies or existing dependencies. + + Returns: + The static dependencies. + """ + if isinstance(deps, dict): + # Assume a dict is coming from _replace, so no special processing. + return deps + _static_deps = {} + if deps is not None: + for dep in deps: + _static_deps = self._add_static_dep(dep, _static_deps) + return _static_deps + + def _add_static_dep( + self, dep: Union[str, Var], deps: dict[str | None, set[str]] | None = None + ) -> dict[str | None, set[str]]: + """Add a static dependency to the computed var or existing dependency set. + + Args: + dep: The dependency to add. + deps: The existing dependency set. + + Returns: + The updated dependency set. + + Raises: + TypeError: If the computed var dependencies are not Var instances or var names. + """ + if deps is None: + deps = self._static_deps + if isinstance(dep, Var): + state_name = ( + all_var_data.state + if (all_var_data := dep._get_all_var_data()) and all_var_data.state + else None + ) + if all_var_data is not None: + var_name = all_var_data.field_name + else: + var_name = dep._js_expr + deps.setdefault(state_name, set()).add(var_name) + elif isinstance(dep, str) and dep != "": + deps.setdefault(None, set()).add(dep) + else: + raise TypeError( + "ComputedVar dependencies must be Var instances or var names (non-empty strings)." + ) + return deps + @override def _replace( self, @@ -2106,6 +2139,8 @@ class ComputedVar(Var[RETURN_TYPE]): Raises: TypeError: If kwargs contains keys that are not allowed. """ + if "deps" in kwargs: + kwargs["deps"] = self._calculate_static_deps(kwargs["deps"]) field_values = { "fget": kwargs.pop("fget", self._fget), "initial_value": kwargs.pop("initial_value", self._initial_value), From 73ef17b96dd736e0cd564872d527bfbdab66a6d7 Mon Sep 17 00:00:00 2001 From: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com> Date: Mon, 3 Feb 2025 19:16:01 +0100 Subject: [PATCH 077/144] fix: allow replacing of _var_type in ComputedVar (worked in previous reflex versions) (#4730) --- reflex/vars/base.py | 2 -- tests/units/vars/test_base.py | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 9f6652122..be4f19955 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -2122,14 +2122,12 @@ class ComputedVar(Var[RETURN_TYPE]): @override def _replace( self, - _var_type: Any = None, merge_var_data: VarData | None = None, **kwargs: Any, ) -> Self: """Replace the attributes of the ComputedVar. Args: - _var_type: ignored in ComputedVar. merge_var_data: VarData to merge into the existing VarData. **kwargs: Var fields to update. diff --git a/tests/units/vars/test_base.py b/tests/units/vars/test_base.py index e4ae7327a..8f9e99fe4 100644 --- a/tests/units/vars/test_base.py +++ b/tests/units/vars/test_base.py @@ -2,7 +2,8 @@ from typing import List, Mapping, Union import pytest -from reflex.vars.base import figure_out_type +from reflex.state import State +from reflex.vars.base import computed_var, figure_out_type class CustomDict(dict[str, str]): @@ -47,3 +48,16 @@ class ChildGenericDict(GenericDict): ) def test_figure_out_type(value, expected): assert figure_out_type(value) == expected + + +def test_computed_var_replace() -> None: + class StateTest(State): + @computed_var(cache=True) + def cv(self) -> int: + return 1 + + cv = StateTest.cv + assert cv._var_type is int + + replaced = cv._replace(_var_type=float) + assert replaced._var_type is float From ef93161840df472e14510c809b9ef9454a2519de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Mon, 3 Feb 2025 20:50:31 +0100 Subject: [PATCH 078/144] Add a sticky Built with Reflex badge (#4584) * add the watermark class * remove shortcut exposing badge publicly for now * Rename as "sticky" because "watermark" has a negative connotation * Add config `show_built_with_reflex` This config option is available for authenticated users on various plan tiers * py3.11 compatible f-string * sticky badge inherit from A instead of using on_click/redirect * fix integration test * Move export checking logic to reflex CLI * rx.logo: make it accessible to screen readers Add role="img" aria_label="Reflex" and title="Reflex". * Hide the built with reflex badge for localhost * Revert "fix integration test" This reverts commit a978684d70b59a077b714792603bcefd1939b41a. * experimental: do not show warning for internal imports Only show experimental feature warnings when accessing the names through the rx._x namespace. If reflex internally imports the names via deep imports, then this bypasses the warning to avoid showing it to users that have no control over how the framework uses experimental features. * add help link for show_built_with_reflex option * pre-commit fixes --------- Co-authored-by: Masen Furer --- reflex/app.py | 12 + reflex/components/core/sticky.py | 160 +++++++++ reflex/components/core/sticky.pyi | 449 ++++++++++++++++++++++++++ reflex/components/datadisplay/logo.py | 15 +- reflex/config.py | 3 + reflex/experimental/__init__.py | 28 +- reflex/reflex.py | 29 ++ reflex/utils/prerequisites.py | 39 ++- 8 files changed, 721 insertions(+), 14 deletions(-) create mode 100644 reflex/components/core/sticky.py create mode 100644 reflex/components/core/sticky.pyi diff --git a/reflex/app.py b/reflex/app.py index 060f03469..d9104ece6 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -70,6 +70,7 @@ from reflex.components.core.client_side_routing import ( Default404Page, wait_for_client_redirect, ) +from reflex.components.core.sticky import sticky from reflex.components.core.upload import Upload, get_upload_dir from reflex.components.radix import themes from reflex.config import environment, get_config @@ -875,6 +876,15 @@ class App(MiddlewareMixin, LifespanMixin): continue self._pages[k] = self._add_error_boundary_to_component(component) + def _setup_sticky_badge(self): + """Add the sticky badge to the app.""" + for k, component in self._pages.items(): + # Would be nice to share single sticky_badge across all pages, but + # it bungles the StatefulComponent compile step. + sticky_badge = sticky() + sticky_badge._add_style_recursive({}) + self._pages[k] = Fragment.create(sticky_badge, component) + def _apply_decorated_pages(self): """Add @rx.page decorated pages to the app. @@ -1005,6 +1015,8 @@ class App(MiddlewareMixin, LifespanMixin): self._validate_var_dependencies() self._setup_overlay_component() self._setup_error_boundary() + if config.show_built_with_reflex: + self._setup_sticky_badge() progress.advance(task) diff --git a/reflex/components/core/sticky.py b/reflex/components/core/sticky.py new file mode 100644 index 000000000..162bab3cd --- /dev/null +++ b/reflex/components/core/sticky.py @@ -0,0 +1,160 @@ +"""Components for displaying the Reflex sticky logo.""" + +from reflex.components.component import ComponentNamespace +from reflex.components.core.colors import color +from reflex.components.core.cond import color_mode_cond, cond +from reflex.components.core.responsive import tablet_and_desktop +from reflex.components.el.elements.inline import A +from reflex.components.el.elements.media import Path, Rect, Svg +from reflex.components.radix.themes.typography.text import Text +from reflex.experimental.client_state import ClientStateVar +from reflex.style import Style +from reflex.vars.base import Var, VarData + + +class StickyLogo(Svg): + """A simple Reflex logo SVG with only the letter R.""" + + @classmethod + def create(cls): + """Create the simple Reflex logo SVG. + + Returns: + The simple Reflex logo SVG. + """ + return super().create( + Rect.create(width="16", height="16", rx="2", fill="#6E56CF"), + Path.create(d="M10 9V13H12V9H10Z", fill="white"), + Path.create(d="M4 3V13H6V9H10V7H6V5H10V7H12V3H4Z", fill="white"), + width="16", + height="16", + viewBox="0 0 16 16", + xmlns="http://www.w3.org/2000/svg", + ) + + def add_style(self): + """Add the style to the component. + + Returns: + The style of the component. + """ + return Style( + { + "fill": "white", + } + ) + + +class StickyLabel(Text): + """A label that displays the Reflex sticky.""" + + @classmethod + def create(cls): + """Create the sticky label. + + Returns: + The sticky label. + """ + return super().create("Built with Reflex") + + def add_style(self): + """Add the style to the component. + + Returns: + The style of the component. + """ + return Style( + { + "color": color("slate", 1), + "font_weight": "600", + "font_family": "'Instrument Sans', sans-serif", + "font_size": "0.875rem", + "line_height": "1rem", + "letter_spacing": "-0.00656rem", + } + ) + + +class StickyBadge(A): + """A badge that displays the Reflex sticky logo.""" + + @classmethod + def create(cls): + """Create the sticky badge. + + Returns: + The sticky badge. + """ + return super().create( + StickyLogo.create(), + tablet_and_desktop(StickyLabel.create()), + href="https://reflex.dev", + target="_blank", + width="auto", + padding="0.375rem", + align="center", + text_align="center", + ) + + def add_style(self): + """Add the style to the component. + + Returns: + The style of the component. + """ + is_localhost_cs = ClientStateVar.create( + "is_localhost", + default=True, + global_ref=False, + ) + localhost_hostnames = Var.create( + ["localhost", "127.0.0.1", "[::1]"] + ).guess_type() + is_localhost_expr = localhost_hostnames.contains( + Var("window.location.hostname", _var_type=str).guess_type(), + ) + check_is_localhost = Var( + f"useEffect(({is_localhost_cs}) => {is_localhost_cs.set}({is_localhost_expr}), [])", + _var_data=VarData( + imports={"react": "useEffect"}, + ), + ) + is_localhost = is_localhost_cs.value._replace( + merge_var_data=VarData.merge( + check_is_localhost._get_all_var_data(), + VarData(hooks={str(check_is_localhost): None}), + ), + ) + return Style( + { + "position": "fixed", + "bottom": "1rem", + "right": "1rem", + # Do not show the badge on localhost. + "display": cond(is_localhost, "none", "flex"), + "flex-direction": "row", + "gap": "0.375rem", + "align-items": "center", + "width": "auto", + "border-radius": "0.5rem", + "color": color_mode_cond("#E5E7EB", "#27282B"), + "border": color_mode_cond("1px solid #27282B", "1px solid #E5E7EB"), + "background-color": color_mode_cond("#151618", "#FCFCFD"), + "padding": "0.375rem", + "transition": "background-color 0.2s ease-in-out", + "box-shadow": "0 1px 2px 0 rgba(0, 0, 0, 0.05)", + "z-index": "9998", + "cursor": "pointer", + }, + ) + + +class StickyNamespace(ComponentNamespace): + """Sticky components namespace.""" + + __call__ = staticmethod(StickyBadge.create) + label = staticmethod(StickyLabel.create) + logo = staticmethod(StickyLogo.create) + + +sticky = StickyNamespace() diff --git a/reflex/components/core/sticky.pyi b/reflex/components/core/sticky.pyi new file mode 100644 index 000000000..fb27d74ea --- /dev/null +++ b/reflex/components/core/sticky.pyi @@ -0,0 +1,449 @@ +"""Stub file for reflex/components/core/sticky.py""" + +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `reflex/utils/pyi_generator.py`! +# ------------------------------------------------------ +from typing import Any, Dict, Literal, Optional, Union, overload + +from reflex.components.component import ComponentNamespace +from reflex.components.core.breakpoints import Breakpoints +from reflex.components.el.elements.inline import A +from reflex.components.el.elements.media import Svg +from reflex.components.radix.themes.typography.text import Text +from reflex.event import BASE_STATE, EventType +from reflex.style import Style +from reflex.vars.base import Var + +class StickyLogo(Svg): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + width: Optional[Union[Var[Union[int, str]], int, str]] = None, + height: Optional[Union[Var[Union[int, str]], int, str]] = None, + xmlns: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_capitalize: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + content_editable: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + context_menu: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + enter_key_hint: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[[], BASE_STATE]] = None, + **props, + ) -> "StickyLogo": + """Create the simple Reflex logo SVG. + + Returns: + The simple Reflex logo SVG. + """ + ... + + def add_style(self): ... + +class StickyLabel(Text): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + as_child: Optional[Union[Var[bool], bool]] = None, + as_: Optional[ + Union[ + Literal[ + "abbr", + "b", + "cite", + "del", + "div", + "em", + "i", + "ins", + "kbd", + "label", + "mark", + "p", + "s", + "samp", + "span", + "sub", + "sup", + "u", + ], + Var[ + Literal[ + "abbr", + "b", + "cite", + "del", + "div", + "em", + "i", + "ins", + "kbd", + "label", + "mark", + "p", + "s", + "samp", + "span", + "sub", + "sup", + "u", + ] + ], + ] + ] = None, + size: Optional[ + Union[ + Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[ + Union[ + Breakpoints[ + str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] + ], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ], + ] + ] = None, + weight: Optional[ + Union[ + Breakpoints[str, Literal["bold", "light", "medium", "regular"]], + Literal["bold", "light", "medium", "regular"], + Var[ + Union[ + Breakpoints[str, Literal["bold", "light", "medium", "regular"]], + Literal["bold", "light", "medium", "regular"], + ] + ], + ] + ] = None, + align: Optional[ + Union[ + Breakpoints[str, Literal["center", "left", "right"]], + Literal["center", "left", "right"], + Var[ + Union[ + Breakpoints[str, Literal["center", "left", "right"]], + Literal["center", "left", "right"], + ] + ], + ] + ] = None, + trim: Optional[ + Union[ + Breakpoints[str, Literal["both", "end", "normal", "start"]], + Literal["both", "end", "normal", "start"], + Var[ + Union[ + Breakpoints[str, Literal["both", "end", "normal", "start"]], + Literal["both", "end", "normal", "start"], + ] + ], + ] + ] = None, + color_scheme: Optional[ + Union[ + Literal[ + "amber", + "blue", + "bronze", + "brown", + "crimson", + "cyan", + "gold", + "grass", + "gray", + "green", + "indigo", + "iris", + "jade", + "lime", + "mint", + "orange", + "pink", + "plum", + "purple", + "red", + "ruby", + "sky", + "teal", + "tomato", + "violet", + "yellow", + ], + Var[ + Literal[ + "amber", + "blue", + "bronze", + "brown", + "crimson", + "cyan", + "gold", + "grass", + "gray", + "green", + "indigo", + "iris", + "jade", + "lime", + "mint", + "orange", + "pink", + "plum", + "purple", + "red", + "ruby", + "sky", + "teal", + "tomato", + "violet", + "yellow", + ] + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_capitalize: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + content_editable: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + context_menu: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + enter_key_hint: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[[], BASE_STATE]] = None, + **props, + ) -> "StickyLabel": + """Create the sticky label. + + Returns: + The sticky label. + """ + ... + + def add_style(self): ... + +class StickyBadge(A): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + referrer_policy: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + target: 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[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + content_editable: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + context_menu: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + enter_key_hint: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[[], BASE_STATE]] = None, + **props, + ) -> "StickyBadge": + """Create the sticky badge. + + Returns: + The sticky badge. + """ + ... + + def add_style(self): ... + +class StickyNamespace(ComponentNamespace): + label = staticmethod(StickyLabel.create) + logo = staticmethod(StickyLogo.create) + + @staticmethod + def __call__( + *children, + download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + referrer_policy: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + target: 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[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + content_editable: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + context_menu: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + enter_key_hint: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[[], BASE_STATE]] = None, + **props, + ) -> "StickyBadge": + """Create the sticky badge. + + Returns: + The sticky badge. + """ + ... + +sticky = StickyNamespace() diff --git a/reflex/components/datadisplay/logo.py b/reflex/components/datadisplay/logo.py index 1c4c02001..dab6d2468 100644 --- a/reflex/components/datadisplay/logo.py +++ b/reflex/components/datadisplay/logo.py @@ -5,11 +5,15 @@ from typing import Union import reflex as rx -def svg_logo(color: Union[str, rx.Var[str]] = rx.color_mode_cond("#110F1F", "white")): +def svg_logo( + color: Union[str, rx.Var[str]] = rx.color_mode_cond("#110F1F", "white"), + **props, +): """A Reflex logo SVG. Args: color: The color of the logo. + props: Extra props to pass to the svg component. Returns: The Reflex logo SVG. @@ -29,11 +33,14 @@ def svg_logo(color: Union[str, rx.Var[str]] = rx.color_mode_cond("#110F1F", "whi return rx.el.svg( *[logo_path(d) for d in paths], - width="56", - height="12", - viewBox="0 0 56 12", + rx.el.title("Reflex"), + aria_label="Reflex", + role="img", + width=props.pop("width", "56"), + height=props.pop("height", "12"), fill=color, xmlns="http://www.w3.org/2000/svg", + **props, ) diff --git a/reflex/config.py b/reflex/config.py index 6609067f9..050676227 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -703,6 +703,9 @@ class Config(Base): # Path to file containing key-values pairs to override in the environment; Dotenv format. env_file: Optional[str] = None + # Whether to display the sticky "Built with Reflex" badge on all pages. + show_built_with_reflex: bool = True + # Whether the app is running in the reflex cloud environment. is_reflex_cloud: bool = False diff --git a/reflex/experimental/__init__.py b/reflex/experimental/__init__.py index 1a198f35a..7971c33ae 100644 --- a/reflex/experimental/__init__.py +++ b/reflex/experimental/__init__.py @@ -13,16 +13,25 @@ from .client_state import ClientStateVar as ClientStateVar from .layout import layout as layout from .misc import run_in_thread as run_in_thread -warn( - "`rx._x` contains experimental features and might be removed at any time in the future .", -) - -_EMITTED_PROMOTION_WARNINGS = set() - class ExperimentalNamespace(SimpleNamespace): """Namespace for experimental features.""" + def __getattribute__(self, item: str): + """Get attribute from the namespace. + + Args: + item: attribute name. + + Returns: + The attribute. + """ + warn( + "`rx._x` contains experimental features and might be removed at any time in the future.", + dedupe=True, + ) + return super().__getattribute__(item) + @property def toast(self): """Temporary property returning the toast namespace. @@ -55,9 +64,10 @@ class ExperimentalNamespace(SimpleNamespace): Args: component_name: name of the component. """ - if component_name not in _EMITTED_PROMOTION_WARNINGS: - _EMITTED_PROMOTION_WARNINGS.add(component_name) - warn(f"`rx._x.{component_name}` was promoted to `rx.{component_name}`.") + warn( + f"`rx._x.{component_name}` was promoted to `rx.{component_name}`.", + dedupe=True, + ) _x = ExperimentalNamespace( diff --git a/reflex/reflex.py b/reflex/reflex.py index d1e565665..70aa16a05 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -26,6 +26,8 @@ except TypeError: # Fallback for older typer versions. cli = typer.Typer(add_completion=False) +SHOW_BUILT_WITH_REFLEX_INFO = "https://reflex.dev/docs/hosting/reflex-branding/" + # Get the config. config = get_config() @@ -186,6 +188,15 @@ def _run( prerequisites.check_latest_package_version(constants.Reflex.MODULE_NAME) if frontend: + if not config.show_built_with_reflex: + # The sticky badge may be disabled at runtime for team/enterprise tiers. + prerequisites.check_config_option_in_tier( + option_name="show_built_with_reflex", + allowed_tiers=["team", "enterprise"], + fallback_value=True, + help_link=SHOW_BUILT_WITH_REFLEX_INFO, + ) + # Get the app module. prerequisites.get_compiled_app() @@ -324,6 +335,15 @@ def export( if prerequisites.needs_reinit(frontend=True): _init(name=config.app_name, loglevel=loglevel) + if frontend and not config.show_built_with_reflex: + # The sticky badge may be disabled on export for team/enterprise tiers. + prerequisites.check_config_option_in_tier( + option_name="show_built_with_reflex", + allowed_tiers=["team", "enterprise"], + fallback_value=False, + help_link=SHOW_BUILT_WITH_REFLEX_INFO, + ) + export_utils.export( zipping=zipping, frontend=frontend, @@ -518,6 +538,15 @@ def deploy( check_version() + if not config.show_built_with_reflex: + # The sticky badge may be disabled on deploy for pro/team/enterprise tiers. + prerequisites.check_config_option_in_tier( + option_name="show_built_with_reflex", + allowed_tiers=["pro", "team", "enterprise"], + fallback_value=True, + help_link=SHOW_BUILT_WITH_REFLEX_INFO, + ) + # Set the log level. console.set_log_level(loglevel) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 4741400f8..629198185 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -23,7 +23,7 @@ import zipfile from datetime import datetime from pathlib import Path from types import ModuleType -from typing import Callable, List, NamedTuple, Optional +from typing import Any, Callable, List, NamedTuple, Optional import httpx import typer @@ -1978,3 +1978,40 @@ def is_generation_hash(template: str) -> bool: True if the template is composed of 32 or more hex characters. """ return re.match(r"^[0-9a-f]{32,}$", template) is not None + + +def check_config_option_in_tier( + option_name: str, + allowed_tiers: list[str], + fallback_value: Any, + help_link: str | None = None, +): + """Check if a config option is allowed for the authenticated user's current tier. + + Args: + option_name: The name of the option to check. + allowed_tiers: The tiers that are allowed to use the option. + fallback_value: The fallback value if the option is not allowed. + help_link: The help link to show to a user that is authenticated. + """ + from reflex_cli.v2.utils import hosting + + config = get_config() + authenticated_token = hosting.authenticated_token() + if not authenticated_token[0]: + the_remedy = ( + "You are currently logged out. Run `reflex login` to access this option." + ) + current_tier = "anonymous" + else: + current_tier = authenticated_token[1].get("tier", "").lower() + the_remedy = ( + f"Your current subscription tier is `{current_tier}`. " + f"Please upgrade to {allowed_tiers} to access this option. " + ) + if help_link: + the_remedy += f"See {help_link} for more information." + if current_tier not in allowed_tiers: + console.warn(f"Config option `{option_name}` is restricted. {the_remedy}") + setattr(config, option_name, fallback_value) + config._set_persistent(**{option_name: fallback_value}) From 44d6e1124c8951f47792d60e12c14125bdfb5267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 4 Feb 2025 01:05:47 +0100 Subject: [PATCH 079/144] fix bun message (#4739) * fix bun message * fix units tests mocking --- reflex/utils/prerequisites.py | 2 +- tests/units/utils/test_utils.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 629198185..099ccaf69 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -1293,7 +1293,7 @@ def validate_bun(): """ bun_path = path_ops.get_bun_path() - if bun_path and bun_path.samefile(constants.Bun.DEFAULT_PATH): + if bun_path and not bun_path.samefile(constants.Bun.DEFAULT_PATH): console.info(f"Using custom Bun path: {bun_path}") bun_version = get_bun_version() if not bun_version: diff --git a/tests/units/utils/test_utils.py b/tests/units/utils/test_utils.py index 44356dac5..7cd53f14a 100644 --- a/tests/units/utils/test_utils.py +++ b/tests/units/utils/test_utils.py @@ -123,6 +123,7 @@ def test_validate_invalid_bun_path(mocker): mocker: Pytest mocker object. """ mock_path = mocker.Mock() + mock_path.samefile.return_value = False mocker.patch("reflex.utils.path_ops.get_bun_path", return_value=mock_path) mocker.patch("reflex.utils.prerequisites.get_bun_version", return_value=None) @@ -138,6 +139,7 @@ def test_validate_bun_path_incompatible_version(mocker): mocker: Pytest mocker object. """ mock_path = mocker.Mock() + mock_path.samefile.return_value = False mocker.patch("reflex.utils.path_ops.get_bun_path", return_value=mock_path) mocker.patch( "reflex.utils.prerequisites.get_bun_version", From 2ff840aba6aa3a515b64a57e10e809807ef706e5 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 3 Feb 2025 16:28:36 -0800 Subject: [PATCH 080/144] Allow template with unspecified demo_url (#4741) --- reflex/utils/prerequisites.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 099ccaf69..6c6d34923 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -64,7 +64,7 @@ class Template: name: str description: str code_url: str - demo_url: str + demo_url: str | None = None @dataclasses.dataclass(frozen=True) @@ -1461,7 +1461,7 @@ def prompt_for_template_options(templates: list[Template]) -> str: # Show the user the URLs of each template to preview. console.print("\nGet started with a template:") - def format_demo_url_str(url: str) -> str: + def format_demo_url_str(url: str | None) -> str: return f" ({url})" if url else "" # Prompt the user to select a template. From 20e8b83421fa53cb83a4c57f7cbaa01ff110d33f Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 3 Feb 2025 17:21:00 -0800 Subject: [PATCH 081/144] [ENG-4570] Fix rx.foreach over dict (#4743) * Add test case for literal dict in foreach * [ENG-4570] Iterate over ObjectVar.entries * Adjust expectations of test_foreach.py unit tests --- .../.templates/jinja/web/pages/utils.js.jinja2 | 2 +- reflex/components/core/foreach.py | 5 +++++ tests/integration/test_var_operations.py | 17 +++++++++++++++++ tests/units/components/core/test_foreach.py | 16 ++++++++-------- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/reflex/.templates/jinja/web/pages/utils.js.jinja2 b/reflex/.templates/jinja/web/pages/utils.js.jinja2 index 08aeb0d38..c883dadcb 100644 --- a/reflex/.templates/jinja/web/pages/utils.js.jinja2 +++ b/reflex/.templates/jinja/web/pages/utils.js.jinja2 @@ -60,7 +60,7 @@ {# Args: #} {# component: component dictionary #} {% macro render_iterable_tag(component) %} -<>{ {%- if component.iterable_type == 'dict' -%}Object.entries({{- component.iterable_state }}){%- else -%}{{- component.iterable_state }}{%- endif -%}.map(({{ component.arg_name }}, {{ component.arg_index }}) => ( +<>{ {{ component.iterable_state }}.map(({{ component.arg_name }}, {{ component.arg_index }}) => ( {% for child in component.children %} {{ render(child) }} {% endfor %} diff --git a/reflex/components/core/foreach.py b/reflex/components/core/foreach.py index 927b01333..e9222b200 100644 --- a/reflex/components/core/foreach.py +++ b/reflex/components/core/foreach.py @@ -54,6 +54,8 @@ class Foreach(Component): TypeError: If the render function is a ComponentState. UntypedVarError: If the iterable is of type Any without a type annotation. """ + from reflex.vars.object import ObjectVar + iterable = LiteralVar.create(iterable) if iterable._var_type == Any: raise ForeachVarError( @@ -70,6 +72,9 @@ class Foreach(Component): "Using a ComponentState as `render_fn` inside `rx.foreach` is not supported yet." ) + if isinstance(iterable, ObjectVar): + iterable = iterable.entries() + component = cls( iterable=iterable, render_fn=render_fn, diff --git a/tests/integration/test_var_operations.py b/tests/integration/test_var_operations.py index 9b952c575..a5a74c9ee 100644 --- a/tests/integration/test_var_operations.py +++ b/tests/integration/test_var_operations.py @@ -605,6 +605,20 @@ def VarOperations(): rx.box(rx.foreach(range(42, 80, 3), rx.text.span), id="range_in_foreach2"), rx.box(rx.foreach(range(42, 20, -6), rx.text.span), id="range_in_foreach3"), rx.box(rx.foreach(range(42, 43, 5), rx.text.span), id="range_in_foreach4"), + # Literal dict in a foreach + rx.box(rx.foreach({"a": 1, "b": 2}, rx.text.span), id="dict_in_foreach1"), + # State Var dict in a foreach + rx.box( + rx.foreach(VarOperationState.dict1, rx.text.span), + id="dict_in_foreach2", + ), + rx.box( + rx.foreach( + VarOperationState.dict1.merge(VarOperationState.dict2), + rx.text.span, + ), + id="dict_in_foreach3", + ), ) @@ -809,6 +823,9 @@ def test_var_operations(driver, var_operations: AppHarness): ("range_in_foreach2", "42454851545760636669727578"), ("range_in_foreach3", "42363024"), ("range_in_foreach4", "42"), + ("dict_in_foreach1", "a1b2"), + ("dict_in_foreach2", "12"), + ("dict_in_foreach3", "1234"), ] for tag, expected in tests: diff --git a/tests/units/components/core/test_foreach.py b/tests/units/components/core/test_foreach.py index 094f6029d..48fae85e8 100644 --- a/tests/units/components/core/test_foreach.py +++ b/tests/units/components/core/test_foreach.py @@ -170,32 +170,32 @@ seen_index_vars = set() ForEachState.primary_color, display_primary_colors, { - "iterable_state": f"{ForEachState.get_full_name()}.primary_color", - "iterable_type": "dict", + "iterable_state": f"Object.entries({ForEachState.get_full_name()}.primary_color)", + "iterable_type": "list", }, ), ( ForEachState.color_with_shades, display_color_with_shades, { - "iterable_state": f"{ForEachState.get_full_name()}.color_with_shades", - "iterable_type": "dict", + "iterable_state": f"Object.entries({ForEachState.get_full_name()}.color_with_shades)", + "iterable_type": "list", }, ), ( ForEachState.nested_colors_with_shades, display_nested_color_with_shades, { - "iterable_state": f"{ForEachState.get_full_name()}.nested_colors_with_shades", - "iterable_type": "dict", + "iterable_state": f"Object.entries({ForEachState.get_full_name()}.nested_colors_with_shades)", + "iterable_type": "list", }, ), ( ForEachState.nested_colors_with_shades, display_nested_color_with_shades_v2, { - "iterable_state": f"{ForEachState.get_full_name()}.nested_colors_with_shades", - "iterable_type": "dict", + "iterable_state": f"Object.entries({ForEachState.get_full_name()}.nested_colors_with_shades)", + "iterable_type": "list", }, ), ( From 2e9654725eeff1661f5df278cdb780ddb20d09a7 Mon Sep 17 00:00:00 2001 From: PeterYusuke <58464065+PeterYusuke@users.noreply.github.com> Date: Wed, 5 Feb 2025 00:27:14 +0900 Subject: [PATCH 082/144] fix readme typo and update gallery to templates (#4745) --- docs/es/README.md | 2 +- docs/in/README.md | 2 +- docs/ja/README.md | 4 ++-- docs/pe/README.md | 2 +- docs/tr/README.md | 4 ++-- docs/vi/README.md | 4 ++-- docs/zh/zh_tw/README.md | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/es/README.md b/docs/es/README.md index 538192e4b..400e1fe20 100644 --- a/docs/es/README.md +++ b/docs/es/README.md @@ -239,7 +239,7 @@ Reflex se lanzó en diciembre de 2022 con el nombre de Pynecone. - **Discusiones de GitHub**: Una excelente manera de hablar sobre las características que deseas agregar o las cosas que te resultan confusas o necesitan aclaración. - **GitHub Issues**: Las incidencias son una forma excelente de informar de errores. Además, puedes intentar resolver un problema existente y enviar un PR. -Buscamos colaboradores, sin importar su nivel o experiencia. Para contribuir consulta [CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) +Buscamos colaboradores, sin importar su nivel o experiencia. Para contribuir consulta [CONTRIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) ## Licencia diff --git a/docs/in/README.md b/docs/in/README.md index 81b1106ff..aefa3a385 100644 --- a/docs/in/README.md +++ b/docs/in/README.md @@ -239,7 +239,7 @@ Reflex में हर सप्ताह नए रिलीज़ और फ - **GitHub Discussions** (गिटहब चर्चाएँ): उन सुविधाओं के बारे में बात करने का एक शानदार तरीका जिन्हें आप जोड़ना चाहते हैं या ऐसी चीज़ें जो भ्रमित करने वाली हैं/स्पष्टीकरण की आवश्यकता है। - **GitHub Issues** (गिटहब समस्याएं): ये [बग](https://github.com/reflex-dev/reflex/issues) की रिपोर्ट करने का एक शानदार तरीका है। इसके अतिरिक्त, आप किसी मौजूदा समस्या को हल करने का प्रयास कर सकते हैं और एक पीआर सबमिट कर सकते हैं। -हम सक्रिय रूप से योगदानकर्ताओं की तलाश कर रहे हैं, चाहे आपका कौशल स्तर या अनुभव कुछ भी हो।योगदान करने के लिए [CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) देखें। +हम सक्रिय रूप से योगदानकर्ताओं की तलाश कर रहे हैं, चाहे आपका कौशल स्तर या अनुभव कुछ भी हो।योगदान करने के लिए [CONTRIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) देखें। ## हमारे सभी योगदानकर्ताओं का धन्यवाद: diff --git a/docs/ja/README.md b/docs/ja/README.md index 941bef601..b42875db8 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -222,7 +222,7 @@ app.add_page(index, title="DALL-E")
-📑 [Docs](https://reflex.dev/docs/getting-started/introduction)   |   🗞️ [Blog](https://reflex.dev/blog)   |   📱 [Component Library](https://reflex.dev/docs/library)   |   🖼️ [Gallery](https://reflex.dev/docs/gallery)   |   🛸 [Deployment](https://reflex.dev/docs/hosting/deploy-quick-start)   +📑 [Docs](https://reflex.dev/docs/getting-started/introduction)   |   🗞️ [Blog](https://reflex.dev/blog)   |   📱 [Component Library](https://reflex.dev/docs/library)   |   🖼️ [Templates](https://reflex.dev/templates/)   |   🛸 [Deployment](https://reflex.dev/docs/hosting/deploy-quick-start)  
@@ -242,7 +242,7 @@ Reflex は毎週、新しいリリースや機能追加を行っています! - **GitHub Discussions**: GitHub Discussions では、追加したい機能や、複雑で解明が必要な事柄についての議論に適している場所です。 - **GitHub Issues**: [Issues](https://github.com/reflex-dev/reflex/issues)はバグの報告に適している場所です。また、課題を解決した PR のサブミットにチャレンジしていただくことも、可能です。 -スキルや経験に関わらず、私たちはコントリビュータを積極的に探しています。コントリビュートするために、[CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md)をご覧ください。 +CONTスキルや経験に関わらず、私たちはコントリビュータを積極的に探しています。コントリビュートするために、[CONTRIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md)をご覧ください。 ## 私たちのコントリビュータに感謝!: diff --git a/docs/pe/README.md b/docs/pe/README.md index 867b543bc..b12ce0149 100644 --- a/docs/pe/README.md +++ b/docs/pe/README.md @@ -249,7 +249,7 @@ app.add_page(index, title="DALL-E") - **بحث های GitHub**: راهی عالی برای صحبت در مورد ویژگی هایی که می خواهید اضافه کنید یا چیزهایی که گیج کننده هستند/نیاز به توضیح دارند. - **قسمت مشکلات GitHub**: [قسمت مشکلات](https://github.com/reflex-dev/reflex/issues) یک راه عالی برای گزارش اشکال هستند. علاوه بر این، می توانید یک مشکل موجود را حل کنید و یک PR(pull request) ارسال کنید. -ما فعالانه به دنبال مشارکت کنندگان هستیم، فارغ از سطح مهارت یا تجربه شما. برای مشارکت [CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) را بررسی کنید. +ما فعالانه به دنبال مشارکت کنندگان هستیم، فارغ از سطح مهارت یا تجربه شما. برای مشارکت [CONTRIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) را بررسی کنید. ## All Thanks To Our Contributors - با تشکر از همکاران ما: diff --git a/docs/tr/README.md b/docs/tr/README.md index afb8ae5b9..3bc716f3e 100644 --- a/docs/tr/README.md +++ b/docs/tr/README.md @@ -200,7 +200,7 @@ Daha fazla sayfa ekleyerek çok sayfalı bir uygulama oluşturabilirsiniz.
-📑 [Docs](https://reflex.dev/docs/getting-started/introduction)   |   🗞️ [Blog](https://reflex.dev/blog)   |   📱 [Component Library](https://reflex.dev/docs/library)   |   🖼️ [Gallery](https://reflex.dev/docs/gallery)   |   🛸 [Deployment](https://reflex.dev/docs/hosting/deploy)   +📑 [Docs](https://reflex.dev/docs/getting-started/introduction)   |   🗞️ [Blog](https://reflex.dev/blog)   |   📱 [Component Library](https://reflex.dev/docs/library)   |   🖼️ [Templates](https://reflex.dev/templates/)   |   🛸 [Deployment](https://reflex.dev/docs/hosting/deploy)  
@@ -229,7 +229,7 @@ Her boyuttaki katkıları memnuniyetle karşılıyoruz! Aşağıda Reflex toplul - **GitHub Discussions**: Eklemek istediğiniz özellikler veya kafa karıştırıcı, açıklığa kavuşturulması gereken şeyler hakkında konuşmanın harika bir yolu. - **GitHub Issues**: [Issues](https://github.com/reflex-dev/reflex/issues) hataları bildirmenin mükemmel bir yoludur. Ayrıca mevcut bir sorunu deneyip çözebilir ve bir PR (Pull Requests) gönderebilirsiniz. -Beceri düzeyiniz veya deneyiminiz ne olursa olsun aktif olarak katkıda bulunacak kişiler arıyoruz. Katkı sağlamak için katkı sağlama rehberimize bakabilirsiniz: [CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) +Beceri düzeyiniz veya deneyiminiz ne olursa olsun aktif olarak katkıda bulunacak kişiler arıyoruz. Katkı sağlamak için katkı sağlama rehberimize bakabilirsiniz: [CONTRIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) ## Hepsi Katkıda Bulunanlar Sayesinde: diff --git a/docs/vi/README.md b/docs/vi/README.md index 53fcad936..50c0a464e 100644 --- a/docs/vi/README.md +++ b/docs/vi/README.md @@ -232,7 +232,7 @@ Bạn có thể tạo một ứng dụng nhiều trang bằng cách thêm trang.
-📑 [Docs](https://reflex.dev/docs/getting-started/introduction)   |   🗞️ [Blog](https://reflex.dev/blog)   |   📱 [Component Library](https://reflex.dev/docs/library)   |   🖼️ [Gallery](https://reflex.dev/docs/gallery)   |   🛸 [Deployment](https://reflex.dev/docs/hosting/deploy-quick-start)   +📑 [Docs](https://reflex.dev/docs/getting-started/introduction)   |   🗞️ [Blog](https://reflex.dev/blog)   |   📱 [Component Library](https://reflex.dev/docs/library)   |   🖼️ [Templates](https://reflex.dev/templates/)   |   🛸 [Deployment](https://reflex.dev/docs/hosting/deploy-quick-start)  
@@ -254,7 +254,7 @@ Chúng tôi chào đón mọi đóng góp dù lớn hay nhỏ. Dưới đây là - **GitHub Issues**: [Issues](https://github.com/reflex-dev/reflex/issues) là nơi tốt nhất để thông báo. Ngoài ra bạn có thể sửa chữa các vấn đề bằng cách tạo PR. Chúng tôi luôn sẵn sàng tìm kiếm các contributor, bất kể kinh nghiệm. Để tham gia đóng góp, xin mời xem -[CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) +[CONTRIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) ## Xin cảm ơn các Contributors: diff --git a/docs/zh/zh_tw/README.md b/docs/zh/zh_tw/README.md index 6161e17d0..08da12321 100644 --- a/docs/zh/zh_tw/README.md +++ b/docs/zh/zh_tw/README.md @@ -229,7 +229,7 @@ app.add_page(index, title="DALL-E")
-📑 [Docs](https://reflex.dev/docs/getting-started/introduction)   |   🗞️ [Blog](https://reflex.dev/blog)   |   📱 [Component Library](https://reflex.dev/docs/library)   |   🖼️ [Gallery](https://reflex.dev/docs/gallery)   |   🛸 [Deployment](https://reflex.dev/docs/hosting/deploy-quick-start)   +📑 [Docs](https://reflex.dev/docs/getting-started/introduction)   |   🗞️ [Blog](https://reflex.dev/blog)   |   📱 [Component Library](https://reflex.dev/docs/library)   |   🖼️ [Templates](https://reflex.dev/templates/)   |   🛸 [Deployment](https://reflex.dev/docs/hosting/deploy-quick-start)  
@@ -251,7 +251,7 @@ Reflex 每周都有新功能和釋出新版本! 確保你按下 :star: 和 :eyes - **GitHub Discussions**: 這是一個討論您想新增的功能或對於一些困惑/需要澄清事項的好方法。 - **GitHub Issues**: 在 [Issues](https://github.com/reflex-dev/reflex/issues) 頁面報告錯誤是一個絕佳的方式。此外,您也可以嘗試解決現有 Issue 並提交 PR。 -我們積極尋找貢獻者,不論您的技能水平或經驗如何。要貢獻,請查看 [CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) +我們積極尋找貢獻者,不論您的技能水平或經驗如何。要貢獻,請查看 [CONTRIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) ## 感謝所有貢獻者: From c3ac051bbb4098b7cebb7cd269fc961fb7155dda Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 4 Feb 2025 10:59:03 -0800 Subject: [PATCH 083/144] don't memoize tooltip or skeleton children (#4744) * don't memoize tooltip children * Skip memoizing skeleton children --------- Co-authored-by: Masen Furer --- reflex/components/radix/themes/components/skeleton.py | 3 +++ reflex/components/radix/themes/components/tooltip.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/reflex/components/radix/themes/components/skeleton.py b/reflex/components/radix/themes/components/skeleton.py index 1fb6390a1..57eba6234 100644 --- a/reflex/components/radix/themes/components/skeleton.py +++ b/reflex/components/radix/themes/components/skeleton.py @@ -1,6 +1,7 @@ """Skeleton theme from Radix components.""" from reflex.components.core.breakpoints import Responsive +from reflex.constants.compiler import MemoizationMode from reflex.vars.base import Var from ..base import RadixLoadingProp, RadixThemesComponent @@ -29,5 +30,7 @@ class Skeleton(RadixLoadingProp, RadixThemesComponent): # The maximum height of the skeleton max_height: Var[Responsive[str]] + _memoization_mode = MemoizationMode(recursive=False) + skeleton = Skeleton.create diff --git a/reflex/components/radix/themes/components/tooltip.py b/reflex/components/radix/themes/components/tooltip.py index 53ec35264..761cdf166 100644 --- a/reflex/components/radix/themes/components/tooltip.py +++ b/reflex/components/radix/themes/components/tooltip.py @@ -3,6 +3,7 @@ from typing import Dict, Literal, Union from reflex.components.component import Component +from reflex.constants.compiler import MemoizationMode from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec from reflex.utils import format from reflex.vars.base import Var @@ -94,6 +95,8 @@ class Tooltip(RadixThemesComponent): # Fired when the pointer is down outside the tooltip. on_pointer_down_outside: EventHandler[no_args_event_spec] + _memoization_mode = MemoizationMode(recursive=False) + @classmethod def create(cls, *children, **props) -> Component: """Initialize the Tooltip component. From af9a914ecc7098363faee0d1082d1c18ea020be3 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 4 Feb 2025 17:30:41 -0800 Subject: [PATCH 084/144] move id to trigger instead of root (#4752) --- reflex/components/radix/themes/components/select.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reflex/components/radix/themes/components/select.py b/reflex/components/radix/themes/components/select.py index 6ac992380..cef91eabf 100644 --- a/reflex/components/radix/themes/components/select.py +++ b/reflex/components/radix/themes/components/select.py @@ -190,6 +190,7 @@ class HighLevelSelect(SelectRoot): The select component. """ trigger_prop_list = [ + "id", "placeholder", "variant", "radius", From 59d8d1eb62c5bd4ac241fcad9c07cdec39f61fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 5 Feb 2025 18:23:41 +0100 Subject: [PATCH 085/144] throw error if computed var has args (#4753) * throw error if computed var has args * change message --- reflex/utils/exceptions.py | 13 +++++++++++++ reflex/vars/base.py | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py index 05fbb297c..17a1e2beb 100644 --- a/reflex/utils/exceptions.py +++ b/reflex/utils/exceptions.py @@ -91,6 +91,19 @@ class UntypedComputedVarError(ReflexError, TypeError): super().__init__(f"Computed var '{var_name}' must have a type annotation.") +class ComputedVarSignatureError(ReflexError, TypeError): + """Custom TypeError for computed var signature errors.""" + + def __init__(self, var_name: str, signature: str): + """Initialize the ComputedVarSignatureError. + + Args: + var_name: The name of the var. + signature: The invalid signature. + """ + super().__init__(f"Computed var `{var_name}{signature}` cannot take arguments.") + + class MissingAnnotationError(ReflexError, TypeError): """Custom TypeError for missing annotations.""" diff --git a/reflex/vars/base.py b/reflex/vars/base.py index be4f19955..34d626f1d 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -48,6 +48,7 @@ from reflex.base import Base from reflex.constants.compiler import Hooks from reflex.utils import console, exceptions, imports, serializers, types from reflex.utils.exceptions import ( + ComputedVarSignatureError, UntypedComputedVarError, VarAttributeError, VarDependencyError, @@ -2602,6 +2603,7 @@ def computed_var( Raises: ValueError: If caching is disabled and an update interval is set. VarDependencyError: If user supplies dependencies without caching. + ComputedVarSignatureError: If the getter function has more than one argument. """ if cache is False and interval is not None: raise ValueError("Cannot set update interval without caching.") @@ -2610,6 +2612,10 @@ def computed_var( raise VarDependencyError("Cannot track dependencies without caching.") if fget is not None: + sign = inspect.signature(fget) + if len(sign.parameters) != 1: + raise ComputedVarSignatureError(fget.__name__, signature=str(sign)) + if inspect.iscoroutinefunction(fget): computed_var_cls = AsyncComputedVar else: From 88f9424df767e0d07a08e43c0fe3f712ac540fda Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 5 Feb 2025 10:25:47 -0800 Subject: [PATCH 086/144] chmod rm when rm fails (#4755) --- reflex/utils/path_ops.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/reflex/utils/path_ops.py b/reflex/utils/path_ops.py index edab085ff..07a541201 100644 --- a/reflex/utils/path_ops.py +++ b/reflex/utils/path_ops.py @@ -6,6 +6,7 @@ import json import os import re import shutil +import stat from pathlib import Path from reflex import constants @@ -15,6 +16,19 @@ from reflex.config import environment, get_config join = os.linesep.join +def chmod_rm(path: Path): + """Remove a file or directory with chmod. + + Args: + path: The path to the file or directory. + """ + path.chmod(stat.S_IWRITE) + if path.is_dir(): + shutil.rmtree(path) + elif path.is_file(): + path.unlink() + + def rm(path: str | Path): """Remove a file or directory. @@ -23,7 +37,8 @@ def rm(path: str | Path): """ path = Path(path) if path.is_dir(): - shutil.rmtree(path) + # In Python 3.12, onerror is deprecated in favor of onexc + shutil.rmtree(path, onerror=lambda _func, _path, _info: chmod_rm(path)) elif path.is_file(): path.unlink() From d0ffc9b6ce5b2ebb706db3842f10bb6a7a94bbb2 Mon Sep 17 00:00:00 2001 From: Carlos <36110765+carlosabadia@users.noreply.github.com> Date: Wed, 5 Feb 2025 19:35:48 +0100 Subject: [PATCH 087/144] Update disabled backend component (#4747) * Update disabled backend component * fix test message * it's ruff out there --------- Co-authored-by: Khaleel Al-Adhami --- reflex/components/core/banner.py | 122 ++++++++++++++++---- tests/integration/test_connection_banner.py | 4 +- 2 files changed, 100 insertions(+), 26 deletions(-) diff --git a/reflex/components/core/banner.py b/reflex/components/core/banner.py index 882975f2f..d96f1655a 100644 --- a/reflex/components/core/banner.py +++ b/reflex/components/core/banner.py @@ -7,7 +7,6 @@ from typing import Optional from reflex import constants from reflex.components.component import Component from reflex.components.core.cond import cond -from reflex.components.datadisplay.logo import svg_logo from reflex.components.el.elements.typography import Div from reflex.components.lucide.icon import Icon from reflex.components.radix.themes.components.dialog import ( @@ -330,36 +329,113 @@ class BackendDisabled(Div): rx.cond( is_backend_disabled, rx.box( + rx.el.link( + rel="preconnect", + href="https://fonts.googleapis.com", + ), + rx.el.link( + rel="preconnect", + href="https://fonts.gstatic.com", + crossorigin="", + ), + rx.el.link( + href="https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,500;0,600&display=swap", + rel="stylesheet", + ), rx.box( - rx.card( - rx.vstack( - svg_logo(), - rx.text( - "You ran out of compute credits.", - ), - rx.callout( - rx.fragment( - "Please upgrade your plan or raise your compute credits at ", - rx.link( - "Reflex Cloud.", - href="https://cloud.reflex.dev/", - ), - ), - width="100%", - icon="info", - variant="surface", - ), + rx.vstack( + rx.text( + "This app is paused", + font_size="1.5rem", + font_weight="600", + line_height="1.25rem", + letter_spacing="-0.0375rem", ), - font_size="20px", - font_family='"Inter", "Helvetica", "Arial", sans-serif', - variant="classic", + rx.hstack( + rx.el.svg( + rx.el.svg.path( + d="M6.90816 1.34341C7.61776 1.10786 8.38256 1.10786 9.09216 1.34341C9.7989 1.57799 10.3538 2.13435 10.9112 2.91605C11.4668 3.69515 12.0807 4.78145 12.872 6.18175L12.9031 6.23672C13.6946 7.63721 14.3085 8.72348 14.6911 9.60441C15.0755 10.4896 15.267 11.2539 15.1142 11.9881C14.9604 12.7275 14.5811 13.3997 14.0287 13.9079C13.4776 14.4147 12.7273 14.6286 11.7826 14.7313C10.8432 14.8334 9.6143 14.8334 8.0327 14.8334H7.9677C6.38604 14.8334 5.15719 14.8334 4.21778 14.7313C3.27301 14.6286 2.52269 14.4147 1.97164 13.9079C1.41924 13.3997 1.03995 12.7275 0.88613 11.9881C0.733363 11.2539 0.92483 10.4896 1.30926 9.60441C1.69184 8.72348 2.30573 7.63721 3.09722 6.23671L3.12828 6.18175C3.91964 4.78146 4.53355 3.69515 5.08914 2.91605C5.64658 2.13435 6.20146 1.57799 6.90816 1.34341ZM7.3335 11.3334C7.3335 10.9652 7.63063 10.6667 7.99716 10.6667H8.00316C8.3697 10.6667 8.66683 10.9652 8.66683 11.3334C8.66683 11.7016 8.3697 12.0001 8.00316 12.0001H7.99716C7.63063 12.0001 7.3335 11.7016 7.3335 11.3334ZM7.3335 8.66675C7.3335 9.03495 7.63196 9.33341 8.00016 9.33341C8.36836 9.33341 8.66683 9.03495 8.66683 8.66675V6.00008C8.66683 5.63189 8.36836 5.33341 8.00016 5.33341C7.63196 5.33341 7.3335 5.63189 7.3335 6.00008V8.66675Z", + fill_rule="evenodd", + clip_rule="evenodd", + fill=rx.color("amber", 11), + ), + width="16", + height="16", + viewBox="0 0 16 16", + fill="none", + xmlns="http://www.w3.org/2000/svg", + margin_top="0.125rem", + flex_shrink="0", + ), + rx.text( + "If you are the owner of this app, visit ", + rx.link( + "Reflex Cloud", + color=rx.color("amber", 11), + underline="always", + _hover={ + "color": rx.color("amber", 11), + "text_decoration_color": rx.color( + "amber", 11 + ), + }, + text_decoration_color=rx.color("amber", 10), + href="https://cloud.reflex.dev/", + font_weight="600", + is_external=True, + ), + " for more information on how to resume your app.", + font_size="0.875rem", + font_weight="500", + line_height="1.25rem", + letter_spacing="-0.01094rem", + color=rx.color("amber", 11), + ), + align="start", + gap="0.625rem", + border_radius="0.75rem", + border_width="1px", + border_color=rx.color("amber", 5), + background_color=rx.color("amber", 3), + padding="0.625rem", + ), + rx.link( + rx.el.button( + "Resume app", + color="rgba(252, 252, 253, 1)", + font_size="0.875rem", + font_weight="600", + line_height="1.25rem", + letter_spacing="-0.01094rem", + height="2.5rem", + padding="0rem 0.75rem", + width="100%", + border_radius="0.75rem", + background=f"linear-gradient(180deg, {rx.color('violet', 9)} 0%, {rx.color('violet', 10)} 100%)", + _hover={ + "background": f"linear-gradient(180deg, {rx.color('violet', 10)} 0%, {rx.color('violet', 10)} 100%)", + }, + ), + width="100%", + underline="none", + href="https://cloud.reflex.dev/", + is_external=True, + ), + gap="1rem", ), + font_family='"Instrument Sans", "Helvetica", "Arial", sans-serif', position="fixed", top="50%", left="50%", transform="translate(-50%, -50%)", - width="40ch", + width="60ch", max_width="90vw", + border_radius="0.75rem", + border_width="1px", + border_color=rx.color("slate", 4), + padding="1.5rem", + background_color=rx.color("slate", 1), + box_shadow="0px 2px 5px 0px light-dark(rgba(28, 32, 36, 0.03), rgba(0, 0, 0, 0.00))", ), position="fixed", z_index=9999, diff --git a/tests/integration/test_connection_banner.py b/tests/integration/test_connection_banner.py index e6a8caef6..bfc9ea0ae 100644 --- a/tests/integration/test_connection_banner.py +++ b/tests/integration/test_connection_banner.py @@ -119,9 +119,7 @@ def has_cloud_banner(driver: WebDriver) -> bool: True if the banner is displayed, False otherwise. """ try: - driver.find_element( - By.XPATH, "//*[ contains(text(), 'You ran out of compute credits.') ]" - ) + driver.find_element(By.XPATH, "//*[ contains(text(), 'This app is paused') ]") except NoSuchElementException: return False else: From 19f40745f80e528c8b4e3cf058e75d4c6a1bb457 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 5 Feb 2025 12:09:15 -0800 Subject: [PATCH 088/144] remove base_state from event types (#4740) * remove base_state from event types * pyi that guy * unpack is new * woops * use type alias type to remove ambiguity of where types go * use same thing with LAMBDA_OR_STATE * do it for event type --- reflex/app.py | 14 +- reflex/components/base/app_wrap.pyi | 32 +- reflex/components/base/body.pyi | 32 +- reflex/components/base/document.pyi | 152 ++-- reflex/components/base/error_boundary.pyi | 38 +- reflex/components/base/fragment.pyi | 32 +- reflex/components/base/head.pyi | 62 +- reflex/components/base/link.pyi | 62 +- reflex/components/base/meta.pyi | 122 +-- reflex/components/base/script.pyi | 38 +- reflex/components/base/strict_mode.pyi | 32 +- reflex/components/core/banner.pyi | 182 ++-- .../components/core/client_side_routing.pyi | 62 +- reflex/components/core/clipboard.pyi | 37 +- reflex/components/core/debounce.pyi | 34 +- reflex/components/core/html.pyi | 32 +- reflex/components/core/sticky.pyi | 122 +-- reflex/components/core/upload.pyi | 168 ++-- reflex/components/datadisplay/code.pyi | 62 +- reflex/components/datadisplay/dataeditor.pyi | 94 +- .../datadisplay/shiki_code_block.pyi | 92 +- reflex/components/el/element.pyi | 32 +- reflex/components/el/elements/base.pyi | 32 +- reflex/components/el/elements/forms.pyi | 474 +++++----- reflex/components/el/elements/inline.pyi | 842 +++++++++--------- reflex/components/el/elements/media.pyi | 752 ++++++++-------- reflex/components/el/elements/metadata.pyi | 182 ++-- reflex/components/el/elements/other.pyi | 212 ++--- reflex/components/el/elements/scripts.pyi | 92 +- reflex/components/el/elements/sectioning.pyi | 452 +++++----- reflex/components/el/elements/tables.pyi | 302 +++---- reflex/components/el/elements/typography.pyi | 452 +++++----- reflex/components/gridjs/datatable.pyi | 62 +- reflex/components/lucide/icon.pyi | 92 +- reflex/components/markdown/markdown.pyi | 32 +- reflex/components/moment/moment.pyi | 36 +- reflex/components/next/base.pyi | 32 +- reflex/components/next/image.pyi | 36 +- reflex/components/next/link.pyi | 32 +- reflex/components/next/video.pyi | 32 +- reflex/components/plotly/plotly.pyi | 78 +- .../components/radix/primitives/accordion.pyi | 214 ++--- reflex/components/radix/primitives/base.pyi | 62 +- reflex/components/radix/primitives/drawer.pyi | 358 ++++---- reflex/components/radix/primitives/form.pyi | 332 ++++--- .../components/radix/primitives/progress.pyi | 152 ++-- reflex/components/radix/primitives/slider.pyi | 160 ++-- reflex/components/radix/themes/base.pyi | 242 ++--- reflex/components/radix/themes/color_mode.pyi | 96 +- .../radix/themes/components/alert_dialog.pyi | 222 +++-- .../radix/themes/components/aspect_ratio.pyi | 32 +- .../radix/themes/components/avatar.pyi | 32 +- .../radix/themes/components/badge.pyi | 32 +- .../radix/themes/components/button.pyi | 32 +- .../radix/themes/components/callout.pyi | 152 ++-- .../radix/themes/components/card.pyi | 32 +- .../radix/themes/components/checkbox.pyi | 104 +-- .../themes/components/checkbox_cards.pyi | 62 +- .../themes/components/checkbox_group.pyi | 62 +- .../radix/themes/components/context_menu.pyi | 304 ++++--- .../radix/themes/components/data_list.pyi | 122 +-- .../radix/themes/components/dialog.pyi | 230 +++-- .../radix/themes/components/dropdown_menu.pyi | 270 +++--- .../radix/themes/components/hover_card.pyi | 130 ++- .../radix/themes/components/icon_button.pyi | 32 +- .../radix/themes/components/inset.pyi | 32 +- .../radix/themes/components/popover.pyi | 138 ++- .../radix/themes/components/progress.pyi | 32 +- .../radix/themes/components/radio.pyi | 32 +- .../radix/themes/components/radio_cards.pyi | 66 +- .../radix/themes/components/radio_group.pyi | 126 ++- .../radix/themes/components/scroll_area.pyi | 32 +- .../themes/components/segmented_control.pyi | 67 +- .../radix/themes/components/select.pyi | 302 +++---- .../radix/themes/components/separator.pyi | 32 +- .../radix/themes/components/skeleton.pyi | 32 +- .../radix/themes/components/slider.pyi | 50 +- .../radix/themes/components/spinner.pyi | 32 +- .../radix/themes/components/switch.pyi | 36 +- .../radix/themes/components/table.pyi | 212 ++--- .../radix/themes/components/tabs.pyi | 160 ++-- .../radix/themes/components/text_area.pyi | 52 +- .../radix/themes/components/text_field.pyi | 132 ++- .../radix/themes/components/tooltip.pyi | 40 +- .../components/radix/themes/layout/base.pyi | 32 +- reflex/components/radix/themes/layout/box.pyi | 32 +- .../components/radix/themes/layout/center.pyi | 32 +- .../radix/themes/layout/container.pyi | 32 +- .../components/radix/themes/layout/flex.pyi | 32 +- .../components/radix/themes/layout/grid.pyi | 32 +- .../components/radix/themes/layout/list.pyi | 152 ++-- .../radix/themes/layout/section.pyi | 32 +- .../components/radix/themes/layout/spacer.pyi | 32 +- .../components/radix/themes/layout/stack.pyi | 92 +- .../radix/themes/typography/blockquote.pyi | 32 +- .../radix/themes/typography/code.pyi | 32 +- .../radix/themes/typography/heading.pyi | 32 +- .../radix/themes/typography/link.pyi | 32 +- .../radix/themes/typography/text.pyi | 212 ++--- reflex/components/react_player/audio.pyi | 72 +- .../components/react_player/react_player.pyi | 70 +- reflex/components/react_player/video.pyi | 72 +- reflex/components/recharts/cartesian.pyi | 564 ++++++------ reflex/components/recharts/charts.pyi | 328 +++---- reflex/components/recharts/general.pyi | 184 ++-- reflex/components/recharts/polar.pyi | 110 +-- reflex/components/recharts/recharts.pyi | 62 +- reflex/components/sonner/toast.pyi | 32 +- reflex/components/suneditor/editor.pyi | 62 +- reflex/event.py | 140 +-- reflex/experimental/layout.pyi | 160 ++-- reflex/page.py | 4 +- reflex/utils/format.py | 2 +- reflex/utils/pyi_generator.py | 17 +- tests/integration/test_dynamic_components.py | 1 + tests/integration/test_dynamic_routes.py | 2 + tests/integration/test_state_inheritance.py | 2 + tests/integration/test_upload.py | 6 +- tests/units/test_app.py | 1 + tests/units/test_event.py | 2 +- 120 files changed, 6683 insertions(+), 6878 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index d9104ece6..2f4e57a63 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -25,7 +25,6 @@ from typing import ( Callable, Coroutine, Dict, - Generic, List, MutableMapping, Optional, @@ -76,7 +75,6 @@ from reflex.components.radix import themes from reflex.config import environment, get_config from reflex.event import ( _EVENT_FIELDS, - BASE_STATE, Event, EventHandler, EventSpec, @@ -196,7 +194,7 @@ class OverlayFragment(Fragment): @dataclasses.dataclass( frozen=True, ) -class UnevaluatedPage(Generic[BASE_STATE]): +class UnevaluatedPage: """An uncompiled page.""" component: Union[Component, ComponentCallable] @@ -204,7 +202,7 @@ class UnevaluatedPage(Generic[BASE_STATE]): title: Union[Var, str, None] description: Union[Var, str, None] image: str - on_load: Union[EventType[[], BASE_STATE], None] + on_load: Union[EventType[()], None] meta: List[Dict[str, str]] @@ -279,7 +277,7 @@ class App(MiddlewareMixin, LifespanMixin): _state_manager: Optional[StateManager] = None # Mapping from a route to event handlers to trigger when the page loads. - _load_events: Dict[str, List[IndividualEventType[[], Any]]] = dataclasses.field( + _load_events: Dict[str, List[IndividualEventType[()]]] = dataclasses.field( default_factory=dict ) @@ -544,7 +542,7 @@ class App(MiddlewareMixin, LifespanMixin): title: str | Var | None = None, description: str | Var | None = None, image: str = constants.DefaultPage.IMAGE, - on_load: EventType[[], BASE_STATE] | None = None, + on_load: EventType[()] | None = None, meta: list[dict[str, str]] = constants.DefaultPage.META_LIST, ): """Add a page to the app. @@ -648,7 +646,7 @@ class App(MiddlewareMixin, LifespanMixin): if save_page: self._pages[route] = component - def get_load_events(self, route: str) -> list[IndividualEventType[[], Any]]: + def get_load_events(self, route: str) -> list[IndividualEventType[()]]: """Get the load events for a route. Args: @@ -710,7 +708,7 @@ class App(MiddlewareMixin, LifespanMixin): title: str = constants.Page404.TITLE, image: str = constants.Page404.IMAGE, description: str = constants.Page404.DESCRIPTION, - on_load: EventType[[], BASE_STATE] | None = None, + on_load: EventType[()] | None = None, meta: list[dict[str, str]] = constants.DefaultPage.META_LIST, ): """Define a custom 404 page for any url having no match. diff --git a/reflex/components/base/app_wrap.pyi b/reflex/components/base/app_wrap.pyi index 962e70c76..5cf84816a 100644 --- a/reflex/components/base/app_wrap.pyi +++ b/reflex/components/base/app_wrap.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.base.fragment import Fragment -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class AppWrap(Fragment): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AppWrap": """Create a new AppWrap component. diff --git a/reflex/components/base/body.pyi b/reflex/components/base/body.pyi index 8a20a6c06..e3fcbb804 100644 --- a/reflex/components/base/body.pyi +++ b/reflex/components/base/body.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class Body(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Body": """Create the component. diff --git a/reflex/components/base/document.pyi b/reflex/components/base/document.pyi index 5b5e1a7f4..3ef4d5fb0 100644 --- a/reflex/components/base/document.pyi +++ b/reflex/components/base/document.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class NextDocumentLib(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "NextDocumentLib": """Create the component. @@ -69,21 +69,21 @@ class Html(NextDocumentLib): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Html": """Create the component. @@ -115,21 +115,21 @@ class DocumentHead(NextDocumentLib): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DocumentHead": """Create the component. @@ -161,21 +161,21 @@ class Main(NextDocumentLib): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Main": """Create the component. @@ -207,21 +207,21 @@ class NextScript(NextDocumentLib): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "NextScript": """Create the component. diff --git a/reflex/components/base/error_boundary.pyi b/reflex/components/base/error_boundary.pyi index 8d27af0f3..013e23e61 100644 --- a/reflex/components/base/error_boundary.pyi +++ b/reflex/components/base/error_boundary.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Tuple, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var from reflex.vars.object import ObjectVar @@ -28,28 +28,24 @@ class ErrorBoundary(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, on_error: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, str], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, str]] ] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ErrorBoundary": """Create an ErrorBoundary component. diff --git a/reflex/components/base/fragment.pyi b/reflex/components/base/fragment.pyi index 33030bc01..fe338718c 100644 --- a/reflex/components/base/fragment.pyi +++ b/reflex/components/base/fragment.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class Fragment(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Fragment": """Create the component. diff --git a/reflex/components/base/head.pyi b/reflex/components/base/head.pyi index b01778094..d05cff650 100644 --- a/reflex/components/base/head.pyi +++ b/reflex/components/base/head.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component, MemoizationLeaf -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class NextHeadLib(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "NextHeadLib": """Create the component. @@ -68,21 +68,21 @@ class Head(NextHeadLib, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Head": """Create a new memoization leaf component. diff --git a/reflex/components/base/link.pyi b/reflex/components/base/link.pyi index b48fae3a5..70eb8301c 100644 --- a/reflex/components/base/link.pyi +++ b/reflex/components/base/link.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -24,21 +24,21 @@ class RawLink(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RawLink": """Create the component. @@ -79,21 +79,21 @@ class ScriptTag(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ScriptTag": """Create the component. diff --git a/reflex/components/base/meta.pyi b/reflex/components/base/meta.pyi index b388b4794..1af8f9873 100644 --- a/reflex/components/base/meta.pyi +++ b/reflex/components/base/meta.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -23,21 +23,21 @@ class Title(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Title": """Create the component. @@ -74,21 +74,21 @@ class Meta(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Meta": """Create the component. @@ -130,21 +130,21 @@ class Description(Meta): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Description": """Create the component. @@ -186,21 +186,21 @@ class Image(Meta): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Image": """Create the component. diff --git a/reflex/components/base/script.pyi b/reflex/components/base/script.pyi index 1633fdb70..33b2f867d 100644 --- a/reflex/components/base/script.pyi +++ b/reflex/components/base/script.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -29,24 +29,24 @@ class Script(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_error: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_load: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_ready: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_error: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_load: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_ready: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Script": """Create an inline or user-defined script. diff --git a/reflex/components/base/strict_mode.pyi b/reflex/components/base/strict_mode.pyi index 9005c0222..a316cbe08 100644 --- a/reflex/components/base/strict_mode.pyi +++ b/reflex/components/base/strict_mode.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class StrictMode(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "StrictMode": """Create the component. diff --git a/reflex/components/core/banner.pyi b/reflex/components/core/banner.pyi index 2ea514965..707076310 100644 --- a/reflex/components/core/banner.pyi +++ b/reflex/components/core/banner.pyi @@ -10,7 +10,7 @@ from reflex.components.el.elements.typography import Div from reflex.components.lucide.icon import Icon from reflex.components.sonner.toast import Toaster, ToastProps from reflex.constants.compiler import CompileVars -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportVar from reflex.vars import VarData @@ -89,21 +89,21 @@ class ConnectionToaster(Toaster): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ConnectionToaster": """Create a connection toaster component. @@ -149,21 +149,21 @@ class ConnectionBanner(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ConnectionBanner": """Create a connection banner component. @@ -188,21 +188,21 @@ class ConnectionModal(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ConnectionModal": """Create a connection banner component. @@ -228,21 +228,21 @@ class WifiOffPulse(Icon): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "WifiOffPulse": """Create a wifi_off icon with an animated opacity pulse. @@ -301,21 +301,21 @@ class ConnectionPulser(Div): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ConnectionPulser": """Create a connection pulser component. @@ -386,21 +386,21 @@ class BackendDisabled(Div): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "BackendDisabled": """Create a backend disabled component. diff --git a/reflex/components/core/client_side_routing.pyi b/reflex/components/core/client_side_routing.pyi index 078698198..3520f99ee 100644 --- a/reflex/components/core/client_side_routing.pyi +++ b/reflex/components/core/client_side_routing.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -26,21 +26,21 @@ class ClientSideRouting(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ClientSideRouting": """Create the component. @@ -75,21 +75,21 @@ class Default404Page(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Default404Page": """Create the component. diff --git a/reflex/components/core/clipboard.pyi b/reflex/components/core/clipboard.pyi index 328554f2a..2e70dccec 100644 --- a/reflex/components/core/clipboard.pyi +++ b/reflex/components/core/clipboard.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional, Union, overload from reflex.components.base.fragment import Fragment -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportVar from reflex.vars.base import Var @@ -27,27 +27,24 @@ class Clipboard(Fragment): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, on_paste: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[list[tuple[str, str]]], BASE_STATE], - ] + Union[EventType[()], EventType[list[tuple[str, str]]]] ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Clipboard": """Create a Clipboard component. diff --git a/reflex/components/core/debounce.pyi b/reflex/components/core/debounce.pyi index 9e61af6e3..a8e9ba3eb 100644 --- a/reflex/components/core/debounce.pyi +++ b/reflex/components/core/debounce.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Type, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -31,22 +31,22 @@ class DebounceInput(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DebounceInput": """Create a DebounceInput component. diff --git a/reflex/components/core/html.pyi b/reflex/components/core/html.pyi index e65549d0f..9fb80fb42 100644 --- a/reflex/components/core/html.pyi +++ b/reflex/components/core/html.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.el.elements.typography import Div -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -49,21 +49,21 @@ class Html(Div): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Html": """Create a html component. diff --git a/reflex/components/core/sticky.pyi b/reflex/components/core/sticky.pyi index fb27d74ea..40d58ae84 100644 --- a/reflex/components/core/sticky.pyi +++ b/reflex/components/core/sticky.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el.elements.inline import A from reflex.components.el.elements.media import Svg from reflex.components.radix.themes.typography.text import Text -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -53,21 +53,21 @@ class StickyLogo(Svg): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "StickyLogo": """Create the simple Reflex logo SVG. @@ -275,21 +275,21 @@ class StickyLabel(Text): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "StickyLabel": """Create the sticky label. @@ -348,21 +348,21 @@ class StickyBadge(A): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "StickyBadge": """Create the sticky badge. @@ -422,21 +422,21 @@ class StickyNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "StickyBadge": """Create the sticky badge. diff --git a/reflex/components/core/upload.pyi b/reflex/components/core/upload.pyi index 6238ff9cb..6ed96a15e 100644 --- a/reflex/components/core/upload.pyi +++ b/reflex/components/core/upload.pyi @@ -9,7 +9,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Union, overload from reflex.components.base.fragment import Fragment from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf from reflex.constants import Dirs -from reflex.event import BASE_STATE, CallableEventSpec, EventSpec, EventType +from reflex.event import CallableEventSpec, EventSpec, EventType from reflex.style import Style from reflex.utils.imports import ImportVar from reflex.vars import VarData @@ -51,21 +51,21 @@ class UploadFilesProvider(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "UploadFilesProvider": """Create the component. @@ -97,24 +97,22 @@ class GhostUpload(Fragment): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_drop: Optional[ - Union[EventType[[], BASE_STATE], EventType[[Any], BASE_STATE]] - ] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_drop: Optional[Union[EventType[()], EventType[Any]]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "GhostUpload": """Create the component. @@ -158,24 +156,22 @@ class Upload(MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_drop: Optional[ - Union[EventType[[], BASE_STATE], EventType[[Any], BASE_STATE]] - ] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_drop: Optional[Union[EventType[()], EventType[Any]]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Upload": """Create an upload component. @@ -226,24 +222,22 @@ class StyledUpload(Upload): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_drop: Optional[ - Union[EventType[[], BASE_STATE], EventType[[Any], BASE_STATE]] - ] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_drop: Optional[Union[EventType[()], EventType[Any]]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "StyledUpload": """Create the styled upload component. @@ -294,24 +288,22 @@ class UploadNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_drop: Optional[ - Union[EventType[[], BASE_STATE], EventType[[Any], BASE_STATE]] - ] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_drop: Optional[Union[EventType[()], EventType[Any]]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "StyledUpload": """Create the styled upload component. diff --git a/reflex/components/datadisplay/code.pyi b/reflex/components/datadisplay/code.pyi index da89195ce..fc35092fe 100644 --- a/reflex/components/datadisplay/code.pyi +++ b/reflex/components/datadisplay/code.pyi @@ -9,7 +9,7 @@ from typing import Any, ClassVar, Dict, Literal, Optional, Union, overload from reflex.components.component import Component, ComponentNamespace from reflex.components.markdown.markdown import MarkdownComponentMap from reflex.constants.colors import Color -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -938,21 +938,21 @@ class CodeBlock(Component, MarkdownComponentMap): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CodeBlock": """Create a text component. @@ -1576,21 +1576,21 @@ class CodeblockNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CodeBlock": """Create a text component. diff --git a/reflex/components/datadisplay/dataeditor.pyi b/reflex/components/datadisplay/dataeditor.pyi index d930fe256..f99f37117 100644 --- a/reflex/components/datadisplay/dataeditor.pyi +++ b/reflex/components/datadisplay/dataeditor.pyi @@ -10,7 +10,7 @@ from typing_extensions import TypedDict from reflex.base import Base from reflex.components.component import NoSSRComponent -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.utils.serializers import serializer @@ -183,93 +183,79 @@ class DataEditor(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, on_cell_activated: Optional[ - Union[EventType[[], BASE_STATE], EventType[[tuple[int, int]], BASE_STATE]] + Union[EventType[()], EventType[tuple[int, int]]] ] = None, on_cell_clicked: Optional[ - Union[EventType[[], BASE_STATE], EventType[[tuple[int, int]], BASE_STATE]] + Union[EventType[()], EventType[tuple[int, int]]] ] = None, on_cell_context_menu: Optional[ - Union[EventType[[], BASE_STATE], EventType[[tuple[int, int]], BASE_STATE]] + Union[EventType[()], EventType[tuple[int, int]]] ] = None, on_cell_edited: Optional[ Union[ - EventType[[], BASE_STATE], - EventType[[tuple[int, int]], BASE_STATE], - EventType[[tuple[int, int], GridCell], BASE_STATE], + EventType[()], + EventType[tuple[int, int]], + EventType[tuple[int, int], GridCell], ] ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[()]] = None, on_column_resize: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[GridColumn], BASE_STATE], - EventType[[GridColumn, int], BASE_STATE], - ] + Union[EventType[()], EventType[GridColumn], EventType[GridColumn, int]] ] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_delete: Optional[ - Union[EventType[[], BASE_STATE], EventType[[GridSelection], BASE_STATE]] - ] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_delete: Optional[Union[EventType[()], EventType[GridSelection]]] = None, + on_double_click: Optional[EventType[()]] = None, on_finished_editing: Optional[ Union[ - EventType[[], BASE_STATE], - EventType[[Union[GridCell, None]], BASE_STATE], - EventType[[Union[GridCell, None], tuple[int, int]], BASE_STATE], + EventType[()], + EventType[Union[GridCell, None]], + EventType[Union[GridCell, None], tuple[int, int]], ] ] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, + on_focus: Optional[EventType[()]] = None, on_group_header_clicked: Optional[ Union[ - EventType[[], BASE_STATE], - EventType[[tuple[int, int]], BASE_STATE], - EventType[[tuple[int, int], GridCell], BASE_STATE], + EventType[()], + EventType[tuple[int, int]], + EventType[tuple[int, int], GridCell], ] ] = None, on_group_header_context_menu: Optional[ Union[ - EventType[[], BASE_STATE], - EventType[[int], BASE_STATE], - EventType[[int, GroupHeaderClickedEventArgs], BASE_STATE], + EventType[()], + EventType[int], + EventType[int, GroupHeaderClickedEventArgs], ] ] = None, on_group_header_renamed: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, str], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, str]] ] = None, on_header_clicked: Optional[ - Union[EventType[[], BASE_STATE], EventType[[tuple[int, int]], BASE_STATE]] + Union[EventType[()], EventType[tuple[int, int]]] ] = None, on_header_context_menu: Optional[ - Union[EventType[[], BASE_STATE], EventType[[tuple[int, int]], BASE_STATE]] + Union[EventType[()], EventType[tuple[int, int]]] ] = None, on_header_menu_click: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[int], BASE_STATE], - EventType[[int, Rectangle], BASE_STATE], - ] + Union[EventType[()], EventType[int], EventType[int, Rectangle]] ] = None, on_item_hovered: Optional[ - Union[EventType[[], BASE_STATE], EventType[[tuple[int, int]], BASE_STATE]] + Union[EventType[()], EventType[tuple[int, int]]] ] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_row_appended: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_selection_cleared: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_row_appended: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selection_cleared: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DataEditor": """Create the DataEditor component. diff --git a/reflex/components/datadisplay/shiki_code_block.pyi b/reflex/components/datadisplay/shiki_code_block.pyi index 92546ee4f..befab9305 100644 --- a/reflex/components/datadisplay/shiki_code_block.pyi +++ b/reflex/components/datadisplay/shiki_code_block.pyi @@ -9,7 +9,7 @@ from reflex.base import Base from reflex.components.component import Component, ComponentNamespace from reflex.components.markdown.markdown import MarkdownComponentMap from reflex.components.props import NoExtrasAllowedProps -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var from reflex.vars.function import FunctionStringVar @@ -928,21 +928,21 @@ class ShikiCodeBlock(Component, MarkdownComponentMap): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ShikiCodeBlock": """Create a code block component using [shiki syntax highlighter](https://shiki.matsu.io/). @@ -1555,21 +1555,21 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ShikiHighLevelCodeBlock": """Create a code block component using [shiki syntax highlighter](https://shiki.matsu.io/). @@ -2185,21 +2185,21 @@ class CodeblockNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ShikiHighLevelCodeBlock": """Create a code block component using [shiki syntax highlighter](https://shiki.matsu.io/). diff --git a/reflex/components/el/element.pyi b/reflex/components/el/element.pyi index de5dee956..33c7dc93a 100644 --- a/reflex/components/el/element.pyi +++ b/reflex/components/el/element.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class Element(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Element": """Create the component. diff --git a/reflex/components/el/elements/base.pyi b/reflex/components/el/elements/base.pyi index b60dabe87..a1b29d5f5 100644 --- a/reflex/components/el/elements/base.pyi +++ b/reflex/components/el/elements/base.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.el.element import Element -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -46,21 +46,21 @@ class BaseHTML(Element): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "BaseHTML": """Create the component. diff --git a/reflex/components/el/elements/forms.pyi b/reflex/components/el/elements/forms.pyi index 6dbff65b2..762d5772a 100644 --- a/reflex/components/el/elements/forms.pyi +++ b/reflex/components/el/elements/forms.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Optional, Tuple, Union, overload from jinja2 import Environment from reflex.components.el.element import Element -from reflex.event import BASE_STATE, EventType, KeyInputInfo +from reflex.event import EventType, KeyInputInfo from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.vars.base import Var @@ -71,21 +71,21 @@ class Button(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Button": """Create the component. @@ -168,21 +168,21 @@ class Datalist(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Datalist": """Create the component. @@ -233,21 +233,21 @@ class Fieldset(Element): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Fieldset": """Create the component. @@ -324,31 +324,27 @@ class Form(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, on_submit: Optional[ Union[ - Union[ - EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE] - ], - Union[ - EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE] - ], + Union[EventType[()], EventType[dict[str, Any]]], + Union[EventType[()], EventType[dict[str, str]]], ] ] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Form": """Create a form component. @@ -474,42 +470,28 @@ class Input(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, + on_blur: Optional[Union[EventType[()], EventType[str]]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[Union[EventType[()], EventType[str]]] = None, on_key_down: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, on_key_up: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Input": """Create an Input component. @@ -621,21 +603,21 @@ class Label(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Label": """Create the component. @@ -709,21 +691,21 @@ class Legend(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Legend": """Create the component. @@ -802,21 +784,21 @@ class Meter(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Meter": """Create the component. @@ -897,21 +879,21 @@ class Optgroup(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Optgroup": """Create the component. @@ -989,21 +971,21 @@ class Option(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Option": """Create the component. @@ -1082,21 +1064,21 @@ class Output(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Output": """Create the component. @@ -1174,21 +1156,21 @@ class Progress(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Progress": """Create the component. @@ -1273,24 +1255,22 @@ class Select(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Select": """Create the component. @@ -1394,42 +1374,28 @@ class Textarea(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, + on_blur: Optional[Union[EventType[()], EventType[str]]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[Union[EventType[()], EventType[str]]] = None, on_key_down: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, on_key_up: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Textarea": """Create a textarea component. diff --git a/reflex/components/el/elements/inline.pyi b/reflex/components/el/elements/inline.pyi index 06aeeca76..10258f4c6 100644 --- a/reflex/components/el/elements/inline.pyi +++ b/reflex/components/el/elements/inline.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -58,21 +58,21 @@ class A(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "A": """Create the component. @@ -153,21 +153,21 @@ class Abbr(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Abbr": """Create the component. @@ -239,21 +239,21 @@ class B(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "B": """Create the component. @@ -325,21 +325,21 @@ class Bdi(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Bdi": """Create the component. @@ -411,21 +411,21 @@ class Bdo(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Bdo": """Create the component. @@ -497,21 +497,21 @@ class Br(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Br": """Create the component. @@ -583,21 +583,21 @@ class Cite(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Cite": """Create the component. @@ -669,21 +669,21 @@ class Code(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Code": """Create the component. @@ -756,21 +756,21 @@ class Data(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Data": """Create the component. @@ -843,21 +843,21 @@ class Dfn(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Dfn": """Create the component. @@ -929,21 +929,21 @@ class Em(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Em": """Create the component. @@ -1015,21 +1015,21 @@ class I(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "I": """Create the component. @@ -1101,21 +1101,21 @@ class Kbd(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Kbd": """Create the component. @@ -1187,21 +1187,21 @@ class Mark(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Mark": """Create the component. @@ -1274,21 +1274,21 @@ class Q(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Q": """Create the component. @@ -1361,21 +1361,21 @@ class Rp(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Rp": """Create the component. @@ -1447,21 +1447,21 @@ class Rt(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Rt": """Create the component. @@ -1533,21 +1533,21 @@ class Ruby(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Ruby": """Create the component. @@ -1619,21 +1619,21 @@ class S(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "S": """Create the component. @@ -1705,21 +1705,21 @@ class Samp(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Samp": """Create the component. @@ -1791,21 +1791,21 @@ class Small(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Small": """Create the component. @@ -1877,21 +1877,21 @@ class Span(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Span": """Create the component. @@ -1963,21 +1963,21 @@ class Strong(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Strong": """Create the component. @@ -2049,21 +2049,21 @@ class Sub(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Sub": """Create the component. @@ -2135,21 +2135,21 @@ class Sup(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Sup": """Create the component. @@ -2222,21 +2222,21 @@ class Time(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Time": """Create the component. @@ -2309,21 +2309,21 @@ class U(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "U": """Create the component. @@ -2395,21 +2395,21 @@ class Wbr(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Wbr": """Create the component. diff --git a/reflex/components/el/elements/media.pyi b/reflex/components/el/elements/media.pyi index b172d0c07..8b7b63b7b 100644 --- a/reflex/components/el/elements/media.pyi +++ b/reflex/components/el/elements/media.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex import ComponentNamespace from reflex.constants.colors import Color -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -62,21 +62,21 @@ class Area(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Area": """Create the component. @@ -169,21 +169,21 @@ class Audio(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Audio": """Create the component. @@ -281,21 +281,21 @@ class Img(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Img": """Override create method to apply source attribute to value if user fails to pass in attribute. @@ -380,21 +380,21 @@ class Map(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Map": """Create the component. @@ -472,21 +472,21 @@ class Track(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Track": """Create the component. @@ -577,21 +577,21 @@ class Video(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Video": """Create the component. @@ -675,21 +675,21 @@ class Embed(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Embed": """Create the component. @@ -774,21 +774,21 @@ class Iframe(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Iframe": """Create the component. @@ -874,21 +874,21 @@ class Object(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Object": """Create the component. @@ -965,21 +965,21 @@ class Picture(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Picture": """Create the component. @@ -1051,21 +1051,21 @@ class Portal(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Portal": """Create the component. @@ -1142,21 +1142,21 @@ class Source(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Source": """Create the component. @@ -1236,21 +1236,21 @@ class Svg(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Svg": """Create the component. @@ -1332,21 +1332,21 @@ class Text(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Text": """Create the component. @@ -1430,21 +1430,21 @@ class Line(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Line": """Create the component. @@ -1525,21 +1525,21 @@ class Circle(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Circle": """Create the component. @@ -1620,21 +1620,21 @@ class Ellipse(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Ellipse": """Create the component. @@ -1718,21 +1718,21 @@ class Rect(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Rect": """Create the component. @@ -1813,21 +1813,21 @@ class Polygon(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Polygon": """Create the component. @@ -1901,21 +1901,21 @@ class Defs(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Defs": """Create the component. @@ -1994,21 +1994,21 @@ class LinearGradient(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "LinearGradient": """Create the component. @@ -2096,21 +2096,21 @@ class RadialGradient(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadialGradient": """Create the component. @@ -2198,21 +2198,21 @@ class Stop(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Stop": """Create the component. @@ -2288,21 +2288,21 @@ class Path(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Path": """Create the component. @@ -2388,21 +2388,21 @@ class SVG(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Svg": """Create the component. diff --git a/reflex/components/el/elements/metadata.pyi b/reflex/components/el/elements/metadata.pyi index 08cd2fd76..7cc6afa80 100644 --- a/reflex/components/el/elements/metadata.pyi +++ b/reflex/components/el/elements/metadata.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.el.element import Element -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -50,21 +50,21 @@ class Base(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Base": """Create the component. @@ -136,21 +136,21 @@ class Head(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Head": """Create the component. @@ -235,21 +235,21 @@ class Link(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Link": """Create the component. @@ -334,21 +334,21 @@ class Meta(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Meta": """Create the component. @@ -400,21 +400,21 @@ class Title(Element): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Title": """Create the component. @@ -447,21 +447,21 @@ class StyleEl(Element): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "StyleEl": """Create the component. diff --git a/reflex/components/el/elements/other.pyi b/reflex/components/el/elements/other.pyi index 57e4ab24b..5e58d29f0 100644 --- a/reflex/components/el/elements/other.pyi +++ b/reflex/components/el/elements/other.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -48,21 +48,21 @@ class Details(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Details": """Create the component. @@ -136,21 +136,21 @@ class Dialog(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Dialog": """Create the component. @@ -223,21 +223,21 @@ class Summary(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Summary": """Create the component. @@ -309,21 +309,21 @@ class Slot(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Slot": """Create the component. @@ -395,21 +395,21 @@ class Template(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Template": """Create the component. @@ -481,21 +481,21 @@ class Math(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Math": """Create the component. @@ -568,21 +568,21 @@ class Html(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Html": """Create the component. diff --git a/reflex/components/el/elements/scripts.pyi b/reflex/components/el/elements/scripts.pyi index c66e150af..9354a7337 100644 --- a/reflex/components/el/elements/scripts.pyi +++ b/reflex/components/el/elements/scripts.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -47,21 +47,21 @@ class Canvas(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Canvas": """Create the component. @@ -133,21 +133,21 @@ class Noscript(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Noscript": """Create the component. @@ -232,21 +232,21 @@ class Script(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Script": """Create the component. diff --git a/reflex/components/el/elements/sectioning.pyi b/reflex/components/el/elements/sectioning.pyi index ecbabe516..e179fc779 100644 --- a/reflex/components/el/elements/sectioning.pyi +++ b/reflex/components/el/elements/sectioning.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -47,21 +47,21 @@ class Body(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Body": """Create the component. @@ -133,21 +133,21 @@ class Address(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Address": """Create the component. @@ -219,21 +219,21 @@ class Article(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Article": """Create the component. @@ -305,21 +305,21 @@ class Aside(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Aside": """Create the component. @@ -391,21 +391,21 @@ class Footer(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Footer": """Create the component. @@ -477,21 +477,21 @@ class Header(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Header": """Create the component. @@ -563,21 +563,21 @@ class H1(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "H1": """Create the component. @@ -649,21 +649,21 @@ class H2(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "H2": """Create the component. @@ -735,21 +735,21 @@ class H3(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "H3": """Create the component. @@ -821,21 +821,21 @@ class H4(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "H4": """Create the component. @@ -907,21 +907,21 @@ class H5(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "H5": """Create the component. @@ -993,21 +993,21 @@ class H6(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "H6": """Create the component. @@ -1079,21 +1079,21 @@ class Main(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Main": """Create the component. @@ -1165,21 +1165,21 @@ class Nav(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Nav": """Create the component. @@ -1251,21 +1251,21 @@ class Section(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Section": """Create the component. diff --git a/reflex/components/el/elements/tables.pyi b/reflex/components/el/elements/tables.pyi index 420bad585..06904eacc 100644 --- a/reflex/components/el/elements/tables.pyi +++ b/reflex/components/el/elements/tables.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -48,21 +48,21 @@ class Caption(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Caption": """Create the component. @@ -137,21 +137,21 @@ class Col(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Col": """Create the component. @@ -227,21 +227,21 @@ class Colgroup(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Colgroup": """Create the component. @@ -317,21 +317,21 @@ class Table(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Table": """Create the component. @@ -406,21 +406,21 @@ class Tbody(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Tbody": """Create the component. @@ -497,21 +497,21 @@ class Td(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Td": """Create the component. @@ -588,21 +588,21 @@ class Tfoot(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Tfoot": """Create the component. @@ -680,21 +680,21 @@ class Th(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Th": """Create the component. @@ -772,21 +772,21 @@ class Thead(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Thead": """Create the component. @@ -860,21 +860,21 @@ class Tr(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Tr": """Create the component. diff --git a/reflex/components/el/elements/typography.pyi b/reflex/components/el/elements/typography.pyi index 8332b3306..a51bdcf08 100644 --- a/reflex/components/el/elements/typography.pyi +++ b/reflex/components/el/elements/typography.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -48,21 +48,21 @@ class Blockquote(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Blockquote": """Create the component. @@ -135,21 +135,21 @@ class Dd(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Dd": """Create the component. @@ -221,21 +221,21 @@ class Div(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Div": """Create the component. @@ -307,21 +307,21 @@ class Dl(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Dl": """Create the component. @@ -393,21 +393,21 @@ class Dt(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Dt": """Create the component. @@ -479,21 +479,21 @@ class Figcaption(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Figcaption": """Create the component. @@ -566,21 +566,21 @@ class Hr(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Hr": """Create the component. @@ -653,21 +653,21 @@ class Li(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Li": """Create the component. @@ -740,21 +740,21 @@ class Menu(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Menu": """Create the component. @@ -830,21 +830,21 @@ class Ol(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Ol": """Create the component. @@ -919,21 +919,21 @@ class P(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "P": """Create the component. @@ -1005,21 +1005,21 @@ class Pre(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Pre": """Create the component. @@ -1091,21 +1091,21 @@ class Ul(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Ul": """Create the component. @@ -1179,21 +1179,21 @@ class Ins(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Ins": """Create the component. @@ -1269,21 +1269,21 @@ class Del(BaseHTML): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Del": """Create the component. diff --git a/reflex/components/gridjs/datatable.pyi b/reflex/components/gridjs/datatable.pyi index f3f732db3..e4c78dba1 100644 --- a/reflex/components/gridjs/datatable.pyi +++ b/reflex/components/gridjs/datatable.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.vars.base import Var @@ -23,21 +23,21 @@ class Gridjs(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Gridjs": """Create the component. @@ -75,21 +75,21 @@ class DataTable(Gridjs): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DataTable": """Create a datatable component. diff --git a/reflex/components/lucide/icon.pyi b/reflex/components/lucide/icon.pyi index 6094cfd87..cf24cf9e6 100644 --- a/reflex/components/lucide/icon.pyi +++ b/reflex/components/lucide/icon.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class LucideIconComponent(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "LucideIconComponent": """Create the component. @@ -69,21 +69,21 @@ class Icon(LucideIconComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Icon": """Initialize the Icon component. @@ -124,21 +124,21 @@ class DynamicIcon(LucideIconComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DynamicIcon": """Create the component. diff --git a/reflex/components/markdown/markdown.pyi b/reflex/components/markdown/markdown.pyi index 1c329fb8c..606780a7a 100644 --- a/reflex/components/markdown/markdown.pyi +++ b/reflex/components/markdown/markdown.pyi @@ -8,7 +8,7 @@ from functools import lru_cache from typing import Any, Callable, Dict, Optional, Sequence, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.vars.base import LiteralVar, Var @@ -59,21 +59,21 @@ class Markdown(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Markdown": """Create a markdown component. diff --git a/reflex/components/moment/moment.pyi b/reflex/components/moment/moment.pyi index 83ab670b0..eee338cd5 100644 --- a/reflex/components/moment/moment.pyi +++ b/reflex/components/moment/moment.pyi @@ -8,7 +8,7 @@ from datetime import date, datetime, time, timedelta from typing import Any, Dict, Optional, Union, overload from reflex.components.component import NoSSRComponent -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.vars.base import Var @@ -68,24 +68,22 @@ class Moment(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Moment": """Create the component. diff --git a/reflex/components/next/base.pyi b/reflex/components/next/base.pyi index 4a82d7bef..5d512594a 100644 --- a/reflex/components/next/base.pyi +++ b/reflex/components/next/base.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -24,21 +24,21 @@ class NextComponent(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "NextComponent": """Create the component. diff --git a/reflex/components/next/image.pyi b/reflex/components/next/image.pyi index b8da4973d..73bf64743 100644 --- a/reflex/components/next/image.pyi +++ b/reflex/components/next/image.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Literal, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -39,23 +39,23 @@ class Image(NextComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_error: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_load: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_error: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_load: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Image": """Create an Image component from next/image. diff --git a/reflex/components/next/link.pyi b/reflex/components/next/link.pyi index fdccc9ee6..f62ff46d6 100644 --- a/reflex/components/next/link.pyi +++ b/reflex/components/next/link.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -24,21 +24,21 @@ class NextLink(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "NextLink": """Create the component. diff --git a/reflex/components/next/video.pyi b/reflex/components/next/video.pyi index 8f31748f7..cd1136767 100644 --- a/reflex/components/next/video.pyi +++ b/reflex/components/next/video.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -26,21 +26,21 @@ class Video(NextComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Video": """Create a Video component. diff --git a/reflex/components/plotly/plotly.pyi b/reflex/components/plotly/plotly.pyi index ca1ddef39..f60e5a6a4 100644 --- a/reflex/components/plotly/plotly.pyi +++ b/reflex/components/plotly/plotly.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, List, Optional, Union, overload from typing_extensions import TypedDict, TypeVar from reflex.components.component import NoSSRComponent -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils import console from reflex.vars.base import Var @@ -65,49 +65,39 @@ class Plotly(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_after_plot: Optional[EventType[[], BASE_STATE]] = None, - on_animated: Optional[EventType[[], BASE_STATE]] = None, - on_animating_frame: Optional[EventType[[], BASE_STATE]] = None, - on_animation_interrupted: Optional[EventType[[], BASE_STATE]] = None, - on_autosize: Optional[EventType[[], BASE_STATE]] = None, - on_before_hover: Optional[EventType[[], BASE_STATE]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_button_clicked: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[ - Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]] - ] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_deselect: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_hover: Optional[ - Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]] - ] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_redraw: Optional[EventType[[], BASE_STATE]] = None, - on_relayout: Optional[EventType[[], BASE_STATE]] = None, - on_relayouting: Optional[EventType[[], BASE_STATE]] = None, - on_restyle: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_selected: Optional[ - Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]] - ] = None, - on_selecting: Optional[ - Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]] - ] = None, - on_transition_interrupted: Optional[EventType[[], BASE_STATE]] = None, - on_transitioning: Optional[EventType[[], BASE_STATE]] = None, - on_unhover: Optional[ - Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]] - ] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Plotly": """Create the Plotly component. diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 447451d11..32bde5037 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload from reflex.components.component import Component, ComponentNamespace from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -101,21 +101,21 @@ class AccordionComponent(RadixPrimitiveComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AccordionComponent": """Create the component. @@ -247,23 +247,23 @@ class AccordionRoot(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, on_value_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str | List[str]], BASE_STATE]] + Union[EventType[()], EventType[str | List[str]]] ] = None, **props, ) -> "AccordionRoot": @@ -386,21 +386,21 @@ class AccordionItem(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AccordionItem": """Create an accordion item. @@ -510,21 +510,21 @@ class AccordionHeader(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AccordionHeader": """Create the Accordion header component. @@ -630,21 +630,21 @@ class AccordionTrigger(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AccordionTrigger": """Create the Accordion trigger component. @@ -682,21 +682,21 @@ class AccordionIcon(Icon): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AccordionIcon": """Create the Accordion icon component. @@ -799,21 +799,21 @@ class AccordionContent(AccordionComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AccordionContent": """Create the Accordion content component. diff --git a/reflex/components/radix/primitives/base.pyi b/reflex/components/radix/primitives/base.pyi index 42847f160..9ce5d27c5 100644 --- a/reflex/components/radix/primitives/base.pyi +++ b/reflex/components/radix/primitives/base.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.component import Component -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -23,21 +23,21 @@ class RadixPrimitiveComponent(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadixPrimitiveComponent": """Create the component. @@ -71,21 +71,21 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadixPrimitiveComponentWithClassName": """Create the component. diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi index bb2890fea..42c7b734b 100644 --- a/reflex/components/radix/primitives/drawer.pyi +++ b/reflex/components/radix/primitives/drawer.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponent -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -24,21 +24,21 @@ class DrawerComponent(RadixPrimitiveComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerComponent": """Create the component. @@ -91,27 +91,23 @@ class DrawerRoot(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[Union[EventType[()], EventType[bool]]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerRoot": """Create the component. @@ -159,21 +155,21 @@ class DrawerTrigger(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerTrigger": """Create a new DrawerTrigger instance. @@ -207,21 +203,21 @@ class DrawerPortal(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerPortal": """Create the component. @@ -255,26 +251,26 @@ class DrawerContent(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_interact_outside: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_close_auto_focus: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_interact_outside: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_auto_focus: Optional[EventType[()]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerContent": """Create a Drawer Content. @@ -312,21 +308,21 @@ class DrawerOverlay(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerOverlay": """Create the component. @@ -360,21 +356,21 @@ class DrawerClose(DrawerTrigger): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerClose": """Create a new DrawerTrigger instance. @@ -408,21 +404,21 @@ class DrawerTitle(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerTitle": """Create the component. @@ -456,21 +452,21 @@ class DrawerDescription(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerDescription": """Create the component. @@ -504,21 +500,21 @@ class DrawerHandle(DrawerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerHandle": """Create the component. @@ -577,27 +573,23 @@ class Drawer(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[Union[EventType[()], EventType[bool]]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerRoot": """Create the component. diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index d06b57090..c839e3a18 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.el.elements.forms import Form as HTMLForm -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -26,21 +26,21 @@ class FormComponent(RadixPrimitiveComponentWithClassName): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FormComponent": """Create the component. @@ -114,32 +114,28 @@ class FormRoot(FormComponent, HTMLForm): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_clear_server_errors: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_clear_server_errors: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, on_submit: Optional[ Union[ - Union[ - EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE] - ], - Union[ - EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE] - ], + Union[EventType[()], EventType[dict[str, Any]]], + Union[EventType[()], EventType[dict[str, str]]], ] ] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FormRoot": """Create a form component. @@ -205,21 +201,21 @@ class FormField(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FormField": """Create the component. @@ -256,21 +252,21 @@ class FormLabel(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FormLabel": """Create the component. @@ -304,21 +300,21 @@ class FormControl(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FormControl": """Create a Form Control component. @@ -402,21 +398,21 @@ class FormMessage(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FormMessage": """Create the component. @@ -453,21 +449,21 @@ class FormValidityState(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FormValidityState": """Create the component. @@ -501,21 +497,21 @@ class FormSubmit(FormComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FormSubmit": """Create the component. @@ -590,32 +586,28 @@ class Form(FormRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_clear_server_errors: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_clear_server_errors: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, on_submit: Optional[ Union[ - Union[ - EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE] - ], - Union[ - EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE] - ], + Union[EventType[()], EventType[dict[str, Any]]], + Union[EventType[()], EventType[dict[str, str]]], ] ] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Form": """Create a form component. @@ -723,32 +715,28 @@ class FormNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_clear_server_errors: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_clear_server_errors: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, on_submit: Optional[ Union[ - Union[ - EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE] - ], - Union[ - EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE] - ], + Union[EventType[()], EventType[dict[str, Any]]], + Union[EventType[()], EventType[dict[str, str]]], ] ] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Form": """Create a form component. diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index 32e4bb155..e699373a1 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -24,21 +24,21 @@ class ProgressComponent(RadixPrimitiveComponentWithClassName): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ProgressComponent": """Create the component. @@ -79,21 +79,21 @@ class ProgressRoot(ProgressComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ProgressRoot": """Create the component. @@ -193,21 +193,21 @@ class ProgressIndicator(ProgressComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ProgressIndicator": """Create the component. @@ -314,21 +314,21 @@ class Progress(ProgressRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Progress": """High-level API for progress bar. @@ -436,21 +436,21 @@ class ProgressNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Progress": """High-level API for progress bar. diff --git a/reflex/components/radix/primitives/slider.pyi b/reflex/components/radix/primitives/slider.pyi index 2a14ba518..48099037d 100644 --- a/reflex/components/radix/primitives/slider.pyi +++ b/reflex/components/radix/primitives/slider.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -27,21 +27,21 @@ class SliderComponent(RadixPrimitiveComponentWithClassName): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SliderComponent": """Create the component. @@ -94,27 +94,23 @@ class SliderRoot(SliderComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, - on_value_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[List[int]], BASE_STATE]] - ] = None, - on_value_commit: Optional[ - Union[EventType[[], BASE_STATE], EventType[[List[int]], BASE_STATE]] - ] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, + on_value_change: Optional[Union[EventType[()], EventType[List[int]]]] = None, + on_value_commit: Optional[Union[EventType[()], EventType[List[int]]]] = None, **props, ) -> "SliderRoot": """Create the component. @@ -151,21 +147,21 @@ class SliderTrack(SliderComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SliderTrack": """Create the component. @@ -200,21 +196,21 @@ class SliderRange(SliderComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SliderRange": """Create the component. @@ -249,21 +245,21 @@ class SliderThumb(SliderComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SliderThumb": """Create the component. diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi index b0a8e2fcb..86bac4267 100644 --- a/reflex/components/radix/themes/base.pyi +++ b/reflex/components/radix/themes/base.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components import Component from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.vars.base import Var @@ -104,21 +104,21 @@ class CommonMarginProps(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CommonMarginProps": """Create the component. @@ -276,21 +276,21 @@ class CommonPaddingProps(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CommonPaddingProps": """Create the component. @@ -330,21 +330,21 @@ class RadixLoadingProp(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadixLoadingProp": """Create the component. @@ -377,21 +377,21 @@ class RadixThemesComponent(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadixThemesComponent": """Create a new component instance. @@ -426,21 +426,21 @@ class RadixThemesTriggerComponent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadixThemesTriggerComponent": """Create a new RadixThemesTriggerComponent instance. @@ -558,21 +558,21 @@ class Theme(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Theme": """Create a new Radix Theme specification. @@ -617,21 +617,21 @@ class ThemePanel(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ThemePanel": """Create a new component instance. @@ -667,21 +667,21 @@ class RadixThemesColorModeProvider(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadixThemesColorModeProvider": """Create the component. diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi index 3a9347017..3b92b752d 100644 --- a/reflex/components/radix/themes/color_mode.pyi +++ b/reflex/components/radix/themes/color_mode.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.cond import Cond from reflex.components.lucide.icon import Icon from reflex.components.radix.themes.components.switch import Switch -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style, color_mode from reflex.vars.base import Var @@ -34,21 +34,21 @@ class ColorModeIcon(Cond): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ColorModeIcon": """Create an icon component based on color_mode. @@ -218,21 +218,21 @@ class ColorModeIconButton(IconButton): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ColorModeIconButton": """Create an icon button component that calls toggle_color_mode on click. @@ -391,24 +391,22 @@ class ColorModeSwitch(Switch): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ColorModeSwitch": """Create a switch component bound to color_mode. diff --git a/reflex/components/radix/themes/components/alert_dialog.pyi b/reflex/components/radix/themes/components/alert_dialog.pyi index 6188fdd45..80a12c7a6 100644 --- a/reflex/components/radix/themes/components/alert_dialog.pyi +++ b/reflex/components/radix/themes/components/alert_dialog.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -30,24 +30,22 @@ class AlertDialogRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AlertDialogRoot": """Create a new component instance. @@ -85,21 +83,21 @@ class AlertDialogTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AlertDialogTrigger": """Create a new RadixThemesTriggerComponent instance. @@ -162,24 +160,24 @@ class AlertDialogContent(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_close_auto_focus: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_auto_focus: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AlertDialogContent": """Create a new component instance. @@ -235,21 +233,21 @@ class AlertDialogTitle(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AlertDialogTitle": """Create a new component instance. @@ -284,21 +282,21 @@ class AlertDialogDescription(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AlertDialogDescription": """Create a new component instance. @@ -333,21 +331,21 @@ class AlertDialogAction(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AlertDialogAction": """Create a new RadixThemesTriggerComponent instance. @@ -373,21 +371,21 @@ class AlertDialogCancel(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AlertDialogCancel": """Create a new RadixThemesTriggerComponent instance. diff --git a/reflex/components/radix/themes/components/aspect_ratio.pyi b/reflex/components/radix/themes/components/aspect_ratio.pyi index 882014073..631872e67 100644 --- a/reflex/components/radix/themes/components/aspect_ratio.pyi +++ b/reflex/components/radix/themes/components/aspect_ratio.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -24,21 +24,21 @@ class AspectRatio(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AspectRatio": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi index e0ff0d913..f0813b074 100644 --- a/reflex/components/radix/themes/components/avatar.pyi +++ b/reflex/components/radix/themes/components/avatar.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -114,21 +114,21 @@ class Avatar(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Avatar": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index 38f20efeb..5d66e480c 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -135,21 +135,21 @@ class Badge(elements.Span, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Badge": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index cee24abc4..7ce055485 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -155,21 +155,21 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Button": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index 2c469956f..5aa6a72d0 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -133,21 +133,21 @@ class CalloutRoot(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CalloutRoot": """Create a new component instance. @@ -227,21 +227,21 @@ class CalloutIcon(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CalloutIcon": """Create a new component instance. @@ -316,21 +316,21 @@ class CalloutText(elements.P, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CalloutText": """Create a new component instance. @@ -488,21 +488,21 @@ class Callout(CalloutRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Callout": """Create a callout component. @@ -666,21 +666,21 @@ class CalloutNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Callout": """Create a callout component. diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index e515982e4..9b528eada 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -68,21 +68,21 @@ class Card(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Card": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index fb6b51434..b69b27aaf 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -115,24 +115,22 @@ class Checkbox(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Checkbox": """Create a new component instance. @@ -265,24 +263,22 @@ class HighLevelCheckbox(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HighLevelCheckbox": """Create a checkbox with a label. @@ -412,24 +408,22 @@ class CheckboxNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HighLevelCheckbox": """Create a checkbox with a label. diff --git a/reflex/components/radix/themes/components/checkbox_cards.pyi b/reflex/components/radix/themes/components/checkbox_cards.pyi index 64eb151b0..40ed28639 100644 --- a/reflex/components/radix/themes/components/checkbox_cards.pyi +++ b/reflex/components/radix/themes/components/checkbox_cards.pyi @@ -7,7 +7,7 @@ from types import SimpleNamespace from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -148,21 +148,21 @@ class CheckboxCardsRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CheckboxCardsRoot": """Create a new component instance. @@ -203,21 +203,21 @@ class CheckboxCardsItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CheckboxCardsItem": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/checkbox_group.pyi b/reflex/components/radix/themes/components/checkbox_group.pyi index ffeeb75cf..713710b70 100644 --- a/reflex/components/radix/themes/components/checkbox_group.pyi +++ b/reflex/components/radix/themes/components/checkbox_group.pyi @@ -7,7 +7,7 @@ from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -107,21 +107,21 @@ class CheckboxGroupRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CheckboxGroupRoot": """Create a new component instance. @@ -164,21 +164,21 @@ class CheckboxGroupItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CheckboxGroupItem": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/context_menu.pyi b/reflex/components/radix/themes/components/context_menu.pyi index 2d3ffbebc..81ccb125b 100644 --- a/reflex/components/radix/themes/components/context_menu.pyi +++ b/reflex/components/radix/themes/components/context_menu.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -35,24 +35,22 @@ class ContextMenuRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuRoot": """Create a new component instance. @@ -91,21 +89,21 @@ class ContextMenuTrigger(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuTrigger": """Create a new component instance. @@ -244,26 +242,26 @@ class ContextMenuContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_focus_outside: Optional[EventType[[], BASE_STATE]] = None, - on_interact_outside: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_close_auto_focus: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_focus_outside: Optional[EventType[()]] = None, + on_interact_outside: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuContent": """Create a new component instance. @@ -320,24 +318,22 @@ class ContextMenuSub(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuSub": """Create a new component instance. @@ -378,21 +374,21 @@ class ContextMenuSubTrigger(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuSubTrigger": """Create a new component instance. @@ -448,25 +444,25 @@ class ContextMenuSubContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_focus_outside: Optional[EventType[[], BASE_STATE]] = None, - on_interact_outside: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_focus_outside: Optional[EventType[()]] = None, + on_interact_outside: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuSubContent": """Create a new component instance. @@ -580,22 +576,22 @@ class ContextMenuItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_select: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_select: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuItem": """Create a new component instance. @@ -636,21 +632,21 @@ class ContextMenuSeparator(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuSeparator": """Create a new component instance. @@ -773,24 +769,22 @@ class ContextMenuCheckbox(Checkbox): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ContextMenuCheckbox": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/data_list.pyi b/reflex/components/radix/themes/components/data_list.pyi index 3b409363b..d800b9841 100644 --- a/reflex/components/radix/themes/components/data_list.pyi +++ b/reflex/components/radix/themes/components/data_list.pyi @@ -7,7 +7,7 @@ from types import SimpleNamespace from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -60,21 +60,21 @@ class DataListRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DataListRoot": """Create a new component instance. @@ -129,21 +129,21 @@ class DataListItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DataListItem": """Create a new component instance. @@ -250,21 +250,21 @@ class DataListLabel(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DataListLabel": """Create a new component instance. @@ -303,21 +303,21 @@ class DataListValue(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DataListValue": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index b1dfc1b54..1f713a093 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -28,24 +28,22 @@ class DialogRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DialogRoot": """Create a new component instance. @@ -83,21 +81,21 @@ class DialogTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DialogTrigger": """Create a new RadixThemesTriggerComponent instance. @@ -123,21 +121,21 @@ class DialogTitle(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DialogTitle": """Create a new component instance. @@ -208,26 +206,26 @@ class DialogContent(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_interact_outside: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_close_auto_focus: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_interact_outside: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_auto_focus: Optional[EventType[()]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DialogContent": """Create a new component instance. @@ -284,21 +282,21 @@ class DialogDescription(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DialogDescription": """Create a new component instance. @@ -333,21 +331,21 @@ class DialogClose(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DialogClose": """Create a new RadixThemesTriggerComponent instance. @@ -380,24 +378,22 @@ class Dialog(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DialogRoot": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/dropdown_menu.pyi b/reflex/components/radix/themes/components/dropdown_menu.pyi index 96c624f89..991a6ee7b 100644 --- a/reflex/components/radix/themes/components/dropdown_menu.pyi +++ b/reflex/components/radix/themes/components/dropdown_menu.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -36,24 +36,22 @@ class DropdownMenuRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DropdownMenuRoot": """Create a new component instance. @@ -94,21 +92,21 @@ class DropdownMenuTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DropdownMenuTrigger": """Create a new RadixThemesTriggerComponent instance. @@ -237,26 +235,26 @@ class DropdownMenuContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_focus_outside: Optional[EventType[[], BASE_STATE]] = None, - on_interact_outside: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_close_auto_focus: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_focus_outside: Optional[EventType[()]] = None, + on_interact_outside: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DropdownMenuContent": """Create a new component instance. @@ -314,21 +312,21 @@ class DropdownMenuSubTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DropdownMenuSubTrigger": """Create a new RadixThemesTriggerComponent instance. @@ -356,24 +354,22 @@ class DropdownMenuSub(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DropdownMenuSub": """Create a new component instance. @@ -429,25 +425,25 @@ class DropdownMenuSubContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_focus_outside: Optional[EventType[[], BASE_STATE]] = None, - on_interact_outside: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_focus_outside: Optional[EventType[()]] = None, + on_interact_outside: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DropdownMenuSubContent": """Create a new component instance. @@ -561,22 +557,22 @@ class DropdownMenuItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_select: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_select: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DropdownMenuItem": """Create a new component instance. @@ -617,21 +613,21 @@ class DropdownMenuSeparator(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DropdownMenuSeparator": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/hover_card.pyi b/reflex/components/radix/themes/components/hover_card.pyi index d43b583c2..d68977061 100644 --- a/reflex/components/radix/themes/components/hover_card.pyi +++ b/reflex/components/radix/themes/components/hover_card.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -30,24 +30,22 @@ class HoverCardRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HoverCardRoot": """Create a new component instance. @@ -87,21 +85,21 @@ class HoverCardTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HoverCardTrigger": """Create a new RadixThemesTriggerComponent instance. @@ -195,21 +193,21 @@ class HoverCardContent(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HoverCardContent": """Create a new component instance. @@ -275,24 +273,22 @@ class HoverCard(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HoverCardRoot": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/icon_button.pyi b/reflex/components/radix/themes/components/icon_button.pyi index bdb0fe845..4810936b6 100644 --- a/reflex/components/radix/themes/components/icon_button.pyi +++ b/reflex/components/radix/themes/components/icon_button.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -156,21 +156,21 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "IconButton": """Create a IconButton component. diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index f03275ec0..90621fa33 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -133,21 +133,21 @@ class Inset(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Inset": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index 51f114dd2..6f5d32c1e 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -29,24 +29,22 @@ class PopoverRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "PopoverRoot": """Create a new component instance. @@ -85,21 +83,21 @@ class PopoverTrigger(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "PopoverTrigger": """Create a new RadixThemesTriggerComponent instance. @@ -188,27 +186,27 @@ class PopoverContent(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_focus_outside: Optional[EventType[[], BASE_STATE]] = None, - on_interact_outside: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_close_auto_focus: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_focus_outside: Optional[EventType[()]] = None, + on_interact_outside: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_auto_focus: Optional[EventType[()]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "PopoverContent": """Create a new component instance. @@ -274,21 +272,21 @@ class PopoverClose(RadixThemesTriggerComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "PopoverClose": """Create a new RadixThemesTriggerComponent instance. diff --git a/reflex/components/radix/themes/components/progress.pyi b/reflex/components/radix/themes/components/progress.pyi index 5b3f8ba51..58beac793 100644 --- a/reflex/components/radix/themes/components/progress.pyi +++ b/reflex/components/radix/themes/components/progress.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -114,21 +114,21 @@ class Progress(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Progress": """Create a Progress component. diff --git a/reflex/components/radix/themes/components/radio.pyi b/reflex/components/radix/themes/components/radio.pyi index 49490286f..72caad59d 100644 --- a/reflex/components/radix/themes/components/radio.pyi +++ b/reflex/components/radix/themes/components/radio.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -104,21 +104,21 @@ class Radio(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Radio": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/radio_cards.pyi b/reflex/components/radix/themes/components/radio_cards.pyi index 5ba01d0a0..6c90e4b2f 100644 --- a/reflex/components/radix/themes/components/radio_cards.pyi +++ b/reflex/components/radix/themes/components/radio_cards.pyi @@ -7,7 +7,7 @@ from types import SimpleNamespace from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -162,24 +162,22 @@ class RadioCardsRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, - on_value_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, + on_value_change: Optional[Union[EventType[()], EventType[str]]] = None, **props, ) -> "RadioCardsRoot": """Create a new component instance. @@ -233,21 +231,21 @@ class RadioCardsItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadioCardsItem": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/radio_group.pyi b/reflex/components/radix/themes/components/radio_group.pyi index e8e4e4254..bb3082545 100644 --- a/reflex/components/radix/themes/components/radio_group.pyi +++ b/reflex/components/radix/themes/components/radio_group.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -112,24 +112,22 @@ class RadioGroupRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadioGroupRoot": """Create a new component instance. @@ -177,21 +175,21 @@ class RadioGroupItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadioGroupItem": """Create a new component instance. @@ -319,21 +317,21 @@ class HighLevelRadioGroup(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HighLevelRadioGroup": """Create a radio group component. @@ -471,21 +469,21 @@ class RadioGroup(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HighLevelRadioGroup": """Create a radio group component. diff --git a/reflex/components/radix/themes/components/scroll_area.pyi b/reflex/components/radix/themes/components/scroll_area.pyi index 5945cc3af..8de1232da 100644 --- a/reflex/components/radix/themes/components/scroll_area.pyi +++ b/reflex/components/radix/themes/components/scroll_area.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Literal, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -36,21 +36,21 @@ class ScrollArea(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ScrollArea": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/segmented_control.pyi b/reflex/components/radix/themes/components/segmented_control.pyi index c7e87ca34..7631d9a36 100644 --- a/reflex/components/radix/themes/components/segmented_control.pyi +++ b/reflex/components/radix/themes/components/segmented_control.pyi @@ -7,7 +7,7 @@ from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -118,27 +118,24 @@ class SegmentedControlRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, on_change: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[Union[str, List[str]]], BASE_STATE], - ] + Union[EventType[()], EventType[Union[str, List[str]]]] ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SegmentedControlRoot": """Create a new component instance. @@ -182,21 +179,21 @@ class SegmentedControlItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SegmentedControlItem": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index a6c1ff144..20b7b1968 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -43,27 +43,23 @@ class SelectRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SelectRoot": """Create a new component instance. @@ -183,21 +179,21 @@ class SelectTrigger(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SelectTrigger": """Create a new component instance. @@ -322,24 +318,24 @@ class SelectContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_close_auto_focus: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SelectContent": """Create a new component instance. @@ -385,21 +381,21 @@ class SelectGroup(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SelectGroup": """Create a new component instance. @@ -436,21 +432,21 @@ class SelectItem(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SelectItem": """Create a new component instance. @@ -487,21 +483,21 @@ class SelectLabel(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SelectLabel": """Create a new component instance. @@ -536,21 +532,21 @@ class SelectSeparator(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SelectSeparator": """Create a new component instance. @@ -688,27 +684,23 @@ class HighLevelSelect(SelectRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HighLevelSelect": """Create a select component. @@ -868,27 +860,23 @@ class Select(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HighLevelSelect": """Create a select component. diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi index 7c4bcd55f..c28370af7 100644 --- a/reflex/components/radix/themes/components/separator.pyi +++ b/reflex/components/radix/themes/components/separator.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -113,21 +113,21 @@ class Separator(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Separator": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/skeleton.pyi b/reflex/components/radix/themes/components/skeleton.pyi index 859954ccc..2188d8085 100644 --- a/reflex/components/radix/themes/components/skeleton.pyi +++ b/reflex/components/radix/themes/components/skeleton.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -43,21 +43,21 @@ class Skeleton(RadixLoadingProp, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Skeleton": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/slider.pyi b/reflex/components/radix/themes/components/slider.pyi index f2552fbc6..242532d41 100644 --- a/reflex/components/radix/themes/components/slider.pyi +++ b/reflex/components/radix/themes/components/slider.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType, passthrough_event_spec +from reflex.event import EventType, passthrough_event_spec from reflex.style import Style from reflex.vars.base import Var @@ -139,39 +139,33 @@ class Slider(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, on_change: Optional[ Union[ - Union[ - EventType[[], BASE_STATE], - EventType[[list[Union[int, float]]], BASE_STATE], - ], - Union[EventType[[], BASE_STATE], EventType[[list[int]], BASE_STATE]], - Union[EventType[[], BASE_STATE], EventType[[list[float]], BASE_STATE]], + Union[EventType[()], EventType[list[Union[int, float]]]], + Union[EventType[()], EventType[list[int]]], + Union[EventType[()], EventType[list[float]]], ] ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, on_value_commit: Optional[ Union[ - Union[ - EventType[[], BASE_STATE], - EventType[[list[Union[int, float]]], BASE_STATE], - ], - Union[EventType[[], BASE_STATE], EventType[[list[int]], BASE_STATE]], - Union[EventType[[], BASE_STATE], EventType[[list[float]], BASE_STATE]], + Union[EventType[()], EventType[list[Union[int, float]]]], + Union[EventType[()], EventType[list[int]]], + Union[EventType[()], EventType[list[float]]], ] ] = None, **props, diff --git a/reflex/components/radix/themes/components/spinner.pyi b/reflex/components/radix/themes/components/spinner.pyi index 1c2b9c65e..fefd1180c 100644 --- a/reflex/components/radix/themes/components/spinner.pyi +++ b/reflex/components/radix/themes/components/spinner.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -38,21 +38,21 @@ class Spinner(RadixLoadingProp, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Spinner": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/switch.pyi b/reflex/components/radix/themes/components/switch.pyi index 4aabd7da2..81d473e44 100644 --- a/reflex/components/radix/themes/components/switch.pyi +++ b/reflex/components/radix/themes/components/switch.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -118,24 +118,22 @@ class Switch(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Switch": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 99a0ba96d..fb926d3f5 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -66,21 +66,21 @@ class TableRoot(elements.Table, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TableRoot": """Create a new component instance. @@ -160,21 +160,21 @@ class TableHeader(elements.Thead, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TableHeader": """Create a new component instance. @@ -256,21 +256,21 @@ class TableRow(elements.Tr, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TableRow": """Create a new component instance. @@ -363,21 +363,21 @@ class TableColumnHeaderCell(elements.Th, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TableColumnHeaderCell": """Create a new component instance. @@ -461,21 +461,21 @@ class TableBody(elements.Tbody, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TableBody": """Create a new component instance. @@ -686,21 +686,21 @@ class TableCell(elements.Td, CommonPaddingProps, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TableCell": """Create a new component instance. @@ -925,21 +925,21 @@ class TableRowHeaderCell(elements.Th, CommonPaddingProps, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TableRowHeaderCell": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index 8830c8e21..fa39f5e08 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -40,24 +40,22 @@ class TabsRoot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TabsRoot": """Create a new component instance. @@ -107,21 +105,21 @@ class TabsList(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TabsList": """Create a new component instance. @@ -222,21 +220,21 @@ class TabsTrigger(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TabsTrigger": """Create a TabsTrigger component. @@ -276,21 +274,21 @@ class TabsContent(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TabsContent": """Create a new component instance. @@ -342,24 +340,22 @@ class Tabs(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TabsRoot": """Create a new component instance. diff --git a/reflex/components/radix/themes/components/text_area.pyi b/reflex/components/radix/themes/components/text_area.pyi index e1e40c936..096ec2de6 100644 --- a/reflex/components/radix/themes/components/text_area.pyi +++ b/reflex/components/radix/themes/components/text_area.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType, KeyInputInfo +from reflex.event import EventType, KeyInputInfo from reflex.style import Style from reflex.vars.base import Var @@ -169,42 +169,28 @@ class TextArea(RadixThemesComponent, elements.Textarea): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, + on_blur: Optional[Union[EventType[()], EventType[str]]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[Union[EventType[()], EventType[str]]] = None, on_key_down: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, on_key_up: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TextArea": """Create an Input component. diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi index 81c991899..1cc9f5303 100644 --- a/reflex/components/radix/themes/components/text_field.pyi +++ b/reflex/components/radix/themes/components/text_field.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType, KeyInputInfo +from reflex.event import EventType, KeyInputInfo from reflex.style import Style from reflex.vars.base import Var @@ -174,42 +174,28 @@ class TextFieldRoot(elements.Input, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, + on_blur: Optional[Union[EventType[()], EventType[str]]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[Union[EventType[()], EventType[str]]] = None, on_key_down: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, on_key_up: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TextFieldRoot": """Create an Input component. @@ -360,21 +346,21 @@ class TextFieldSlot(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TextFieldSlot": """Create a new component instance. @@ -555,42 +541,28 @@ class TextField(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, + on_blur: Optional[Union[EventType[()], EventType[str]]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[Union[EventType[()], EventType[str]]] = None, on_key_down: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, on_key_up: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, KeyInputInfo], BASE_STATE], - ] + Union[EventType[()], EventType[str], EventType[str, KeyInputInfo]] ] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "TextFieldRoot": """Create an Input component. diff --git a/reflex/components/radix/themes/components/tooltip.pyi b/reflex/components/radix/themes/components/tooltip.pyi index 0786bfada..6cf0471be 100644 --- a/reflex/components/radix/themes/components/tooltip.pyi +++ b/reflex/components/radix/themes/components/tooltip.pyi @@ -5,7 +5,7 @@ # ------------------------------------------------------ from typing import Any, Dict, Literal, Optional, Union, overload -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -63,26 +63,24 @@ class Tooltip(RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_escape_key_down: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_pointer_down_outside: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Tooltip": """Initialize the Tooltip component. diff --git a/reflex/components/radix/themes/layout/base.pyi b/reflex/components/radix/themes/layout/base.pyi index 440ec882a..3c5f92935 100644 --- a/reflex/components/radix/themes/layout/base.pyi +++ b/reflex/components/radix/themes/layout/base.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -201,21 +201,21 @@ class LayoutComponent(CommonMarginProps, CommonPaddingProps, RadixThemesComponen class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "LayoutComponent": """Create a new component instance. diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi index 416e45f3a..58003e505 100644 --- a/reflex/components/radix/themes/layout/box.pyi +++ b/reflex/components/radix/themes/layout/box.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, overload from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -48,21 +48,21 @@ class Box(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Box": """Create a new component instance. diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index 59062b293..f95f7e1e7 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -125,21 +125,21 @@ class Center(Flex): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Center": """Create a new component instance. diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi index 36ea79457..69a1e7ed4 100644 --- a/reflex/components/radix/themes/layout/container.pyi +++ b/reflex/components/radix/themes/layout/container.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -65,21 +65,21 @@ class Container(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Container": """Create the container component. diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index dafa91c6c..cb15d476a 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -128,21 +128,21 @@ class Flex(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Flex": """Create a new component instance. diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index 55153fca3..60f4ea1b4 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -157,21 +157,21 @@ class Grid(elements.Div, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Grid": """Create a new component instance. diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index 8517a6897..96fcd0895 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Iterable, Literal, Optional, Union, overload from reflex.components.component import Component, ComponentNamespace from reflex.components.el.elements.typography import Li, Ol, Ul from reflex.components.markdown.markdown import MarkdownComponentMap -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -85,21 +85,21 @@ class BaseList(Component, MarkdownComponentMap): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "BaseList": """Create a list component. @@ -202,21 +202,21 @@ class UnorderedList(BaseList, Ul): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "UnorderedList": """Create an unordered list component. @@ -336,21 +336,21 @@ class OrderedList(BaseList, Ol): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "OrderedList": """Create an ordered list component. @@ -427,21 +427,21 @@ class ListItem(Li, MarkdownComponentMap): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ListItem": """Create a list item component. @@ -534,21 +534,21 @@ class List(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "BaseList": """Create a list component. diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi index c005f273f..9cca9d144 100644 --- a/reflex/components/radix/themes/layout/section.pyi +++ b/reflex/components/radix/themes/layout/section.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -62,21 +62,21 @@ class Section(elements.Section, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Section": """Create a new component instance. diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index 9854aa1ba..a45fbe69a 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -125,21 +125,21 @@ class Spacer(Flex): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Spacer": """Create a new component instance. diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index d96c72504..e1286ea4f 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -102,21 +102,21 @@ class Stack(Flex): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Stack": """Create a new instance of the component. @@ -237,21 +237,21 @@ class VStack(Stack): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "VStack": """Create a new instance of the component. @@ -372,21 +372,21 @@ class HStack(Stack): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "HStack": """Create a new instance of the component. diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi index 747724763..fb5cc1fc3 100644 --- a/reflex/components/radix/themes/typography/blockquote.pyi +++ b/reflex/components/radix/themes/typography/blockquote.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -139,21 +139,21 @@ class Blockquote(elements.Blockquote, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Blockquote": """Create a new component instance. diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi index 847df267c..027630ee2 100644 --- a/reflex/components/radix/themes/typography/code.pyi +++ b/reflex/components/radix/themes/typography/code.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.components.markdown.markdown import MarkdownComponentMap -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -145,21 +145,21 @@ class Code(elements.Code, RadixThemesComponent, MarkdownComponentMap): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Code": """Create a new component instance. diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi index 4a1e30dbf..d2e9cc5fa 100644 --- a/reflex/components/radix/themes/typography/heading.pyi +++ b/reflex/components/radix/themes/typography/heading.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.components.markdown.markdown import MarkdownComponentMap -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -165,21 +165,21 @@ class Heading(elements.H1, RadixThemesComponent, MarkdownComponentMap): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Heading": """Create a new component instance. diff --git a/reflex/components/radix/themes/typography/link.pyi b/reflex/components/radix/themes/typography/link.pyi index 807f8dda0..712c8b9ea 100644 --- a/reflex/components/radix/themes/typography/link.pyi +++ b/reflex/components/radix/themes/typography/link.pyi @@ -10,7 +10,7 @@ from reflex.components.core.breakpoints import Breakpoints from reflex.components.el.elements.inline import A from reflex.components.markdown.markdown import MarkdownComponentMap from reflex.components.next.link import NextLink -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.vars.base import Var @@ -177,21 +177,21 @@ class Link(RadixThemesComponent, A, MemoizationLeaf, MarkdownComponentMap): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Link": """Create a Link component. diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index d96b5799b..43d1309e2 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -9,7 +9,7 @@ from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints from reflex.components.el import elements from reflex.components.markdown.markdown import MarkdownComponentMap -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -232,21 +232,21 @@ class Text(elements.Span, RadixThemesComponent, MarkdownComponentMap): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Text": """Create a new component instance. @@ -489,21 +489,21 @@ class Span(Text): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Span": """Create a new component instance. @@ -586,21 +586,21 @@ class Em(elements.Em, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Em": """Create a new component instance. @@ -681,21 +681,21 @@ class Kbd(elements.Kbd, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Kbd": """Create a new component instance. @@ -772,21 +772,21 @@ class Quote(elements.Q, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Quote": """Create a new component instance. @@ -862,21 +862,21 @@ class Strong(elements.Strong, RadixThemesComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Strong": """Create a new component instance. @@ -1115,21 +1115,21 @@ class TextNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Text": """Create a new component instance. diff --git a/reflex/components/react_player/audio.pyi b/reflex/components/react_player/audio.pyi index 797d5ad8a..11d9783e7 100644 --- a/reflex/components/react_player/audio.pyi +++ b/reflex/components/react_player/audio.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Optional, Union, overload import reflex from reflex.components.react_player.react_player import ReactPlayer -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -34,48 +34,42 @@ class Audio(ReactPlayer): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_buffer: Optional[EventType[[], BASE_STATE]] = None, - on_buffer_end: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_click_preview: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_disable_pip: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_duration: Optional[ - Union[EventType[[], BASE_STATE], EventType[[float], BASE_STATE]] - ] = None, - on_enable_pip: Optional[EventType[[], BASE_STATE]] = None, - on_ended: Optional[EventType[[], BASE_STATE]] = None, - on_error: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_pause: Optional[EventType[[], BASE_STATE]] = None, - on_play: Optional[EventType[[], BASE_STATE]] = None, - on_playback_quality_change: Optional[EventType[[], BASE_STATE]] = None, - on_playback_rate_change: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_buffer: Optional[EventType[()]] = None, + on_buffer_end: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_click_preview: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_disable_pip: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_duration: Optional[Union[EventType[()], EventType[float]]] = None, + on_enable_pip: Optional[EventType[()]] = None, + on_ended: Optional[EventType[()]] = None, + on_error: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_pause: Optional[EventType[()]] = None, + on_play: Optional[EventType[()]] = None, + on_playback_quality_change: Optional[EventType[()]] = None, + on_playback_rate_change: Optional[EventType[()]] = None, on_progress: Optional[ Union[ - EventType[[], BASE_STATE], - EventType[ - [reflex.components.react_player.react_player.Progress], BASE_STATE - ], + EventType[()], + EventType[reflex.components.react_player.react_player.Progress], ] ] = None, - on_ready: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_seek: Optional[ - Union[EventType[[], BASE_STATE], EventType[[float], BASE_STATE]] - ] = None, - on_start: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_ready: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_seek: Optional[Union[EventType[()], EventType[float]]] = None, + on_start: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Audio": """Create the component. diff --git a/reflex/components/react_player/react_player.pyi b/reflex/components/react_player/react_player.pyi index 4e2a8a821..e5345defb 100644 --- a/reflex/components/react_player/react_player.pyi +++ b/reflex/components/react_player/react_player.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, Optional, Union, overload from typing_extensions import TypedDict from reflex.components.component import NoSSRComponent -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -39,43 +39,37 @@ class ReactPlayer(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_buffer: Optional[EventType[[], BASE_STATE]] = None, - on_buffer_end: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_click_preview: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_disable_pip: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_duration: Optional[ - Union[EventType[[], BASE_STATE], EventType[[float], BASE_STATE]] - ] = None, - on_enable_pip: Optional[EventType[[], BASE_STATE]] = None, - on_ended: Optional[EventType[[], BASE_STATE]] = None, - on_error: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_pause: Optional[EventType[[], BASE_STATE]] = None, - on_play: Optional[EventType[[], BASE_STATE]] = None, - on_playback_quality_change: Optional[EventType[[], BASE_STATE]] = None, - on_playback_rate_change: Optional[EventType[[], BASE_STATE]] = None, - on_progress: Optional[ - Union[EventType[[], BASE_STATE], EventType[[Progress], BASE_STATE]] - ] = None, - on_ready: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_seek: Optional[ - Union[EventType[[], BASE_STATE], EventType[[float], BASE_STATE]] - ] = None, - on_start: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_buffer: Optional[EventType[()]] = None, + on_buffer_end: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_click_preview: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_disable_pip: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_duration: Optional[Union[EventType[()], EventType[float]]] = None, + on_enable_pip: Optional[EventType[()]] = None, + on_ended: Optional[EventType[()]] = None, + on_error: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_pause: Optional[EventType[()]] = None, + on_play: Optional[EventType[()]] = None, + on_playback_quality_change: Optional[EventType[()]] = None, + on_playback_rate_change: Optional[EventType[()]] = None, + on_progress: Optional[Union[EventType[()], EventType[Progress]]] = None, + on_ready: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_seek: Optional[Union[EventType[()], EventType[float]]] = None, + on_start: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ReactPlayer": """Create the component. diff --git a/reflex/components/react_player/video.pyi b/reflex/components/react_player/video.pyi index 3739d45c0..719f4f8e0 100644 --- a/reflex/components/react_player/video.pyi +++ b/reflex/components/react_player/video.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Optional, Union, overload import reflex from reflex.components.react_player.react_player import ReactPlayer -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -34,48 +34,42 @@ class Video(ReactPlayer): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_buffer: Optional[EventType[[], BASE_STATE]] = None, - on_buffer_end: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_click_preview: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_disable_pip: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_duration: Optional[ - Union[EventType[[], BASE_STATE], EventType[[float], BASE_STATE]] - ] = None, - on_enable_pip: Optional[EventType[[], BASE_STATE]] = None, - on_ended: Optional[EventType[[], BASE_STATE]] = None, - on_error: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_pause: Optional[EventType[[], BASE_STATE]] = None, - on_play: Optional[EventType[[], BASE_STATE]] = None, - on_playback_quality_change: Optional[EventType[[], BASE_STATE]] = None, - on_playback_rate_change: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_buffer: Optional[EventType[()]] = None, + on_buffer_end: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_click_preview: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_disable_pip: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_duration: Optional[Union[EventType[()], EventType[float]]] = None, + on_enable_pip: Optional[EventType[()]] = None, + on_ended: Optional[EventType[()]] = None, + on_error: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_pause: Optional[EventType[()]] = None, + on_play: Optional[EventType[()]] = None, + on_playback_quality_change: Optional[EventType[()]] = None, + on_playback_rate_change: Optional[EventType[()]] = None, on_progress: Optional[ Union[ - EventType[[], BASE_STATE], - EventType[ - [reflex.components.react_player.react_player.Progress], BASE_STATE - ], + EventType[()], + EventType[reflex.components.react_player.react_player.Progress], ] ] = None, - on_ready: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_seek: Optional[ - Union[EventType[[], BASE_STATE], EventType[[float], BASE_STATE]] - ] = None, - on_start: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_ready: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_seek: Optional[Union[EventType[()], EventType[float]]] = None, + on_start: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Video": """Create the component. diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi index 64921ec55..21edbddb5 100644 --- a/reflex/components/recharts/cartesian.pyi +++ b/reflex/components/recharts/cartesian.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.constants.colors import Color -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -120,21 +120,21 @@ class Axis(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Axis": """Create the component. @@ -301,21 +301,21 @@ class XAxis(Axis): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "XAxis": """Create the component. @@ -485,21 +485,21 @@ class YAxis(Axis): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "YAxis": """Create the component. @@ -611,21 +611,21 @@ class ZAxis(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ZAxis": """Create the component. @@ -676,7 +676,7 @@ class Brush(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_change: Optional[EventType[[], BASE_STATE]] = None, + on_change: Optional[EventType[()]] = None, **props, ) -> "Brush": """Create the component. @@ -772,23 +772,23 @@ class Cartesian(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Cartesian": """Create the component. @@ -949,23 +949,23 @@ class Area(Cartesian): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Area": """Create the component. @@ -1091,23 +1091,23 @@ class Bar(Cartesian): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Bar": """Create the component. @@ -1275,23 +1275,23 @@ class Line(Cartesian): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Line": """Create the component. @@ -1422,21 +1422,21 @@ class Scatter(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Scatter": """Create the component. @@ -1537,23 +1537,23 @@ class Funnel(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Funnel": """Create the component. @@ -1610,21 +1610,21 @@ class ErrorBar(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ErrorBar": """Create the component. @@ -1671,21 +1671,21 @@ class Reference(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Reference": """Create the component. @@ -1737,21 +1737,21 @@ class ReferenceLine(Reference): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ReferenceLine": """Create the component. @@ -1808,21 +1808,21 @@ class ReferenceDot(Reference): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ReferenceDot": """Create the component. @@ -1888,21 +1888,21 @@ class ReferenceArea(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ReferenceArea": """Create the component. @@ -1949,21 +1949,21 @@ class Grid(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Grid": """Create the component. @@ -2015,21 +2015,21 @@ class CartesianGrid(Grid): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CartesianGrid": """Create the component. @@ -2097,21 +2097,21 @@ class CartesianAxis(Grid): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CartesianAxis": """Create the component. diff --git a/reflex/components/recharts/charts.pyi b/reflex/components/recharts/charts.pyi index 6bf9b6a60..a02ea5a8d 100644 --- a/reflex/components/recharts/charts.pyi +++ b/reflex/components/recharts/charts.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.constants.colors import Color -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -26,21 +26,21 @@ class ChartBase(RechartsCharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ChartBase": """Create a chart component. @@ -98,21 +98,21 @@ class CategoricalChartBase(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "CategoricalChartBase": """Create a chart component. @@ -183,21 +183,21 @@ class AreaChart(CategoricalChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "AreaChart": """Create a chart component. @@ -267,21 +267,21 @@ class BarChart(CategoricalChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "BarChart": """Create a chart component. @@ -350,21 +350,21 @@ class LineChart(CategoricalChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "LineChart": """Create a chart component. @@ -439,21 +439,21 @@ class ComposedChart(CategoricalChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ComposedChart": """Create a chart component. @@ -505,21 +505,21 @@ class PieChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "PieChart": """Create a chart component. @@ -573,9 +573,9 @@ class RadarChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, **props, ) -> "RadarChart": """Create a chart component. @@ -633,21 +633,21 @@ class RadialBarChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RadialBarChart": """Create a chart component. @@ -700,14 +700,14 @@ class ScatterChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, **props, ) -> "ScatterChart": """Create a chart component. @@ -751,21 +751,21 @@ class FunnelChart(ChartBase): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "FunnelChart": """Create a chart component. @@ -821,23 +821,23 @@ class Treemap(RechartsCharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Treemap": """Create a chart component. diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi index 9c63d6de9..f84cd891b 100644 --- a/reflex/components/recharts/general.pyi +++ b/reflex/components/recharts/general.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.components.component import MemoizationLeaf from reflex.constants.colors import Color -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -31,22 +31,22 @@ class ResponsiveContainer(Recharts, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_resize: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_resize: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "ResponsiveContainer": """Create a new memoization leaf component. @@ -142,21 +142,21 @@ class Legend(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Legend": """Create the component. @@ -232,21 +232,21 @@ class GraphingTooltip(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "GraphingTooltip": """Create the component. @@ -343,21 +343,21 @@ class Label(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Label": """Create the component. @@ -443,21 +443,21 @@ class LabelList(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "LabelList": """Create the component. @@ -496,21 +496,21 @@ class Cell(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Cell": """Create the component. diff --git a/reflex/components/recharts/polar.pyi b/reflex/components/recharts/polar.pyi index 5388fbcf2..8f08aed16 100644 --- a/reflex/components/recharts/polar.pyi +++ b/reflex/components/recharts/polar.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.constants.colors import Color -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -82,14 +82,14 @@ class Pie(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, **props, ) -> "Pie": """Create the component. @@ -191,8 +191,8 @@ class Radar(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, **props, ) -> "Radar": """Create the component. @@ -287,14 +287,14 @@ class RadialBar(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[EventType[[], BASE_STATE]] = None, - on_animation_start: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[EventType[()]] = None, + on_animation_start: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, **props, ) -> "RadialBar": """Create the component. @@ -356,21 +356,21 @@ class PolarAngleAxis(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "PolarAngleAxis": """Create the component. @@ -432,21 +432,21 @@ class PolarGrid(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "PolarGrid": """Create the component. @@ -552,12 +552,12 @@ class PolarRadiusAxis(Recharts): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, **props, ) -> "PolarRadiusAxis": """Create the component. diff --git a/reflex/components/recharts/recharts.pyi b/reflex/components/recharts/recharts.pyi index 65e65bce1..f20b732ec 100644 --- a/reflex/components/recharts/recharts.pyi +++ b/reflex/components/recharts/recharts.pyi @@ -6,7 +6,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.component import Component, MemoizationLeaf, NoSSRComponent -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var @@ -22,21 +22,21 @@ class Recharts(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Recharts": """Create the component. @@ -68,21 +68,21 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "RechartsCharts": """Create a new memoization leaf component. diff --git a/reflex/components/sonner/toast.pyi b/reflex/components/sonner/toast.pyi index 632fb0d87..cb12834d5 100644 --- a/reflex/components/sonner/toast.pyi +++ b/reflex/components/sonner/toast.pyi @@ -9,7 +9,7 @@ from reflex.base import Base from reflex.components.component import Component, ComponentNamespace from reflex.components.lucide.icon import Icon from reflex.components.props import NoExtrasAllowedProps, PropsBase -from reflex.event import BASE_STATE, EventSpec, EventType +from reflex.event import EventSpec, EventType from reflex.style import Style from reflex.utils.serializers import serializer from reflex.vars.base import Var @@ -117,21 +117,21 @@ class Toaster(Component): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Toaster": """Create a toaster component. diff --git a/reflex/components/suneditor/editor.pyi b/reflex/components/suneditor/editor.pyi index 5577220cb..f5fb1b830 100644 --- a/reflex/components/suneditor/editor.pyi +++ b/reflex/components/suneditor/editor.pyi @@ -8,7 +8,7 @@ from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload from reflex.base import Base from reflex.components.component import NoSSRComponent -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportDict from reflex.vars.base import Var @@ -127,45 +127,31 @@ class Editor(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]] - ] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_copy: Optional[EventType[[], BASE_STATE]] = None, - on_cut: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_input: Optional[EventType[[], BASE_STATE]] = None, - on_load: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[Union[EventType[()], EventType[str]]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_copy: Optional[EventType[()]] = None, + on_cut: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_input: Optional[EventType[()]] = None, + on_load: Optional[Union[EventType[()], EventType[bool]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, on_paste: Optional[ - Union[ - EventType[[], BASE_STATE], - EventType[[str], BASE_STATE], - EventType[[str, bool], BASE_STATE], - ] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, - toggle_code_view: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - toggle_full_screen: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] + Union[EventType[()], EventType[str], EventType[str, bool]] ] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, + toggle_code_view: Optional[Union[EventType[()], EventType[bool]]] = None, + toggle_full_screen: Optional[Union[EventType[()], EventType[bool]]] = None, **props, ) -> "Editor": """Create an instance of Editor. No children allowed. diff --git a/reflex/event.py b/reflex/event.py index f35e88389..f247047cf 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -25,12 +25,12 @@ from typing import ( ) from typing_extensions import ( - Concatenate, - ParamSpec, Protocol, TypeAliasType, TypedDict, TypeVar, + TypeVarTuple, + Unpack, get_args, get_origin, ) @@ -1092,7 +1092,7 @@ def _callback_arg_spec(eval_result: Any): def call_script( javascript_code: str | Var[str], - callback: EventType | None = None, + callback: EventType[Any] | None = None, ) -> EventSpec: """Create an event handler that executes arbitrary javascript code. @@ -1131,7 +1131,7 @@ def call_script( def call_function( javascript_code: str | Var, - callback: EventType | None = None, + callback: EventType[Any] | None = None, ) -> EventSpec: """Create an event handler that executes arbitrary javascript code. @@ -1165,7 +1165,7 @@ def call_function( def run_script( javascript_code: str | Var, - callback: EventType | None = None, + callback: EventType[Any] | None = None, ) -> EventSpec: """Create an event handler that executes arbitrary javascript code. @@ -1763,8 +1763,8 @@ class LiteralEventChainVar(ArgsFunctionOperationBuilder, LiteralVar, EventChainV ) -P = ParamSpec("P") -Q = ParamSpec("Q") +P = TypeVarTuple("P") +Q = TypeVarTuple("Q") T = TypeVar("T") V = TypeVar("V") V2 = TypeVar("V2") @@ -1773,10 +1773,10 @@ V4 = TypeVar("V4") V5 = TypeVar("V5") -class EventCallback(Generic[P, T]): +class EventCallback(Generic[Unpack[P]]): """A descriptor that wraps a function to be used as an event.""" - def __init__(self, func: Callable[Concatenate[Any, P], T]): + def __init__(self, func: Callable[[Any, Unpack[P]], Any]): """Initialize the descriptor with the function to be wrapped. Args: @@ -1804,37 +1804,37 @@ class EventCallback(Generic[P, T]): @overload def __call__( - self: EventCallback[Q, T], - ) -> EventCallback[Q, T]: ... + self: EventCallback[Unpack[Q]], + ) -> EventCallback[Unpack[Q]]: ... @overload def __call__( - self: EventCallback[Concatenate[V, Q], T], value: V | Var[V] - ) -> EventCallback[Q, T]: ... + self: EventCallback[V, Unpack[Q]], value: V | Var[V] + ) -> EventCallback[Unpack[Q]]: ... @overload def __call__( - self: EventCallback[Concatenate[V, V2, Q], T], + self: EventCallback[V, V2, Unpack[Q]], value: V | Var[V], value2: V2 | Var[V2], - ) -> EventCallback[Q, T]: ... + ) -> EventCallback[Unpack[Q]]: ... @overload def __call__( - self: EventCallback[Concatenate[V, V2, V3, Q], T], + self: EventCallback[V, V2, V3, Unpack[Q]], value: V | Var[V], value2: V2 | Var[V2], value3: V3 | Var[V3], - ) -> EventCallback[Q, T]: ... + ) -> EventCallback[Unpack[Q]]: ... @overload def __call__( - self: EventCallback[Concatenate[V, V2, V3, V4, Q], T], + self: EventCallback[V, V2, V3, V4, Unpack[Q]], value: V | Var[V], value2: V2 | Var[V2], value3: V3 | Var[V3], value4: V4 | Var[V4], - ) -> EventCallback[Q, T]: ... + ) -> EventCallback[Unpack[Q]]: ... def __call__(self, *values) -> EventCallback: # pyright: ignore [reportInconsistentOverload] """Call the function with the values. @@ -1845,15 +1845,15 @@ class EventCallback(Generic[P, T]): Returns: The function with the values. """ - return self.func(*values) # pyright: ignore [reportCallIssue, reportReturnType] + return self.func(*values) # pyright: ignore [reportArgumentType] @overload def __get__( - self: EventCallback[P, T], instance: None, owner: Any - ) -> EventCallback[P, T]: ... + self: EventCallback[Unpack[P]], instance: None, owner: Any + ) -> EventCallback[Unpack[P]]: ... @overload - def __get__(self, instance: Any, owner: Any) -> Callable[P, T]: ... + def __get__(self, instance: Any, owner: Any) -> Callable[[Unpack[P]]]: ... def __get__(self, instance: Any, owner: Any) -> Callable: """Get the function with the instance bound to it. @@ -1871,7 +1871,62 @@ class EventCallback(Generic[P, T]): return partial(self.func, instance) -G = ParamSpec("G") +class LambdaEventCallback(Protocol[Unpack[P]]): + """A protocol for a lambda event callback.""" + + @overload + def __call__(self: LambdaEventCallback[()]) -> Any: ... + + @overload + def __call__(self: LambdaEventCallback[V], value: Var[V], /) -> Any: ... + + @overload + def __call__( + self: LambdaEventCallback[V, V2], value: Var[V], value2: Var[V2], / + ) -> Any: ... + + @overload + def __call__( + self: LambdaEventCallback[V, V2, V3], + value: Var[V], + value2: Var[V2], + value3: Var[V3], + /, + ) -> Any: ... + + def __call__(self, *args: Var) -> Any: + """Call the lambda with the args. + + Args: + *args: The args to call the lambda with. + """ + + +ARGS = TypeVarTuple("ARGS") + + +LAMBDA_OR_STATE = TypeAliasType( + "LAMBDA_OR_STATE", + LambdaEventCallback[Unpack[ARGS]] | EventCallback[Unpack[ARGS]], + type_params=(ARGS,), +) + +ItemOrList = V | List[V] + +BASIC_EVENT_TYPES = TypeAliasType( + "BASIC_EVENT_TYPES", EventSpec | EventHandler | Var[Any], type_params=() +) + +IndividualEventType = TypeAliasType( + "IndividualEventType", + LAMBDA_OR_STATE[Unpack[ARGS]] | BASIC_EVENT_TYPES, + type_params=(ARGS,), +) + +EventType = TypeAliasType( + "EventType", ItemOrList[IndividualEventType[Unpack[ARGS]]], type_params=(ARGS,) +) + if TYPE_CHECKING: from reflex.state import BaseState @@ -1880,25 +1935,6 @@ if TYPE_CHECKING: else: BASE_STATE = TypeVar("BASE_STATE") -StateCallable = TypeAliasType( - "StateCallable", - Callable[Concatenate[BASE_STATE, G], Any], - type_params=(G, BASE_STATE), -) - -IndividualEventType = Union[ - EventSpec, - EventHandler, - Callable[G, Any], - StateCallable[G, BASE_STATE], - EventCallback[G, Any], - Var[Any], -] - -ItemOrList = Union[V, List[V]] - -EventType = ItemOrList[IndividualEventType[G, BASE_STATE]] - class EventNamespace(types.SimpleNamespace): """A namespace for event related classes.""" @@ -1919,24 +1955,26 @@ class EventNamespace(types.SimpleNamespace): @staticmethod def __call__( func: None = None, *, background: bool | None = None - ) -> Callable[[Callable[Concatenate[BASE_STATE, P], T]], EventCallback[P, T]]: ... # pyright: ignore [reportInvalidTypeVarUse] + ) -> Callable[ + [Callable[[BASE_STATE, Unpack[P]], Any]], EventCallback[Unpack[P]] # pyright: ignore [reportInvalidTypeVarUse] + ]: ... @overload @staticmethod def __call__( - func: Callable[Concatenate[BASE_STATE, P], T], + func: Callable[[BASE_STATE, Unpack[P]], Any], *, background: bool | None = None, - ) -> EventCallback[P, T]: ... + ) -> EventCallback[Unpack[P]]: ... @staticmethod def __call__( - func: Callable[Concatenate[BASE_STATE, P], T] | None = None, + func: Callable[[BASE_STATE, Unpack[P]], Any] | None = None, *, background: bool | None = None, ) -> Union[ - EventCallback[P, T], - Callable[[Callable[Concatenate[BASE_STATE, P], T]], EventCallback[P, T]], + EventCallback[Unpack[P]], + Callable[[Callable[[BASE_STATE, Unpack[P]], Any]], EventCallback[Unpack[P]]], ]: """Wrap a function to be used as an event. @@ -1952,8 +1990,8 @@ class EventNamespace(types.SimpleNamespace): """ def wrapper( - func: Callable[Concatenate[BASE_STATE, P], T], - ) -> EventCallback[P, T]: + func: Callable[[BASE_STATE, Unpack[P]], T], + ) -> EventCallback[Unpack[P]]: if background is True: if not inspect.iscoroutinefunction( func diff --git a/reflex/experimental/layout.pyi b/reflex/experimental/layout.pyi index 93c8c0137..81097c21a 100644 --- a/reflex/experimental/layout.pyi +++ b/reflex/experimental/layout.pyi @@ -10,7 +10,7 @@ from reflex.components.base.fragment import Fragment from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf from reflex.components.radix.primitives.drawer import DrawerRoot from reflex.components.radix.themes.layout.box import Box -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType from reflex.state import ComponentState from reflex.style import Style from reflex.vars.base import Var @@ -51,21 +51,21 @@ class Sidebar(Box, MemoizationLeaf): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Sidebar": """Create the sidebar component. @@ -119,27 +119,23 @@ class DrawerSidebar(DrawerRoot): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_animation_end: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_open_change: Optional[ - Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]] - ] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_animation_end: Optional[Union[EventType[()], EventType[bool]]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "DrawerSidebar": """Create the sidebar component. @@ -173,21 +169,21 @@ class SidebarTrigger(Fragment): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "SidebarTrigger": """Create the sidebar trigger component. @@ -238,21 +234,21 @@ class Layout(Box): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Layout": """Create the layout component. @@ -306,21 +302,21 @@ class LayoutNamespace(ComponentNamespace): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, - on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_click: Optional[EventType[[], BASE_STATE]] = None, - on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_double_click: Optional[EventType[[], BASE_STATE]] = None, - on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_mount: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, - on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_unmount: Optional[EventType[[], BASE_STATE]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, **props, ) -> "Layout": """Create the layout component. diff --git a/reflex/page.py b/reflex/page.py index 5f118aad1..7d9ac1b5b 100644 --- a/reflex/page.py +++ b/reflex/page.py @@ -6,7 +6,7 @@ from collections import defaultdict from typing import Any, Callable, Dict, List from reflex.config import get_config -from reflex.event import BASE_STATE, EventType +from reflex.event import EventType DECORATED_PAGES: Dict[str, List] = defaultdict(list) @@ -18,7 +18,7 @@ def page( description: str | None = None, meta: list[Any] | None = None, script_tags: list[Any] | None = None, - on_load: EventType[[], BASE_STATE] | None = None, + on_load: EventType[()] | None = None, ): """Decorate a function as a page. diff --git a/reflex/utils/format.py b/reflex/utils/format.py index 6f05e0982..225d52f3a 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -502,7 +502,7 @@ if TYPE_CHECKING: def format_queue_events( - events: EventType | None = None, + events: EventType[Any] | None = None, args_spec: Optional[ArgsSpec] = None, ) -> Var[EventChain]: """Format a list of event handler / event spec as a javascript callback. diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index beb355d31..93c0e89d3 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -75,7 +75,6 @@ DEFAULT_IMPORTS = { "EventHandler", "EventSpec", "EventType", - "BASE_STATE", "KeyInputInfo", ], "reflex.style": ["Style"], @@ -502,7 +501,7 @@ def _generate_component_create_functiondef( def figure_out_return_type(annotation: Any): if inspect.isclass(annotation) and issubclass(annotation, inspect._empty): - return ast.Name(id="EventType[..., BASE_STATE]") + return ast.Name(id="EventType[Any]") if not isinstance(annotation, str) and get_origin(annotation) is tuple: arguments = get_args(annotation) @@ -518,8 +517,10 @@ def _generate_component_create_functiondef( # Get all prefixes of the type arguments all_count_args_type = [ ast.Name( - f"EventType[[{', '.join([ast.unparse(arg) for arg in type_args[:i]])}], BASE_STATE]" + f"EventType[{', '.join([ast.unparse(arg) for arg in type_args[:i]])}]" ) + if i > 0 + else ast.Name("EventType[()]") for i in range(len(type_args) + 1) ] @@ -532,7 +533,7 @@ def _generate_component_create_functiondef( inside_of_tuple = annotation.removeprefix("Tuple[").removesuffix("]") if inside_of_tuple == "()": - return ast.Name(id="EventType[[], BASE_STATE]") + return ast.Name(id="EventType[()]") arguments = [""] @@ -559,16 +560,16 @@ def _generate_component_create_functiondef( ] all_count_args_type = [ - ast.Name( - f"EventType[[{', '.join(arguments_without_var[:i])}], BASE_STATE]" - ) + ast.Name(f"EventType[{', '.join(arguments_without_var[:i])}]") + if i > 0 + else ast.Name("EventType[()]") for i in range(len(arguments) + 1) ] return ast.Name( id=f"Union[{', '.join(map(ast.unparse, all_count_args_type))}]" ) - return ast.Name(id="EventType[..., BASE_STATE]") + return ast.Name(id="EventType[Any]") event_triggers = clz().get_event_triggers() diff --git a/tests/integration/test_dynamic_components.py b/tests/integration/test_dynamic_components.py index 6a68aa1a1..df2515303 100644 --- a/tests/integration/test_dynamic_components.py +++ b/tests/integration/test_dynamic_components.py @@ -25,6 +25,7 @@ def DynamicComponents(): }, ) + @rx.event def got_clicked(self): self.button = rx.button( "Clicked", diff --git a/tests/integration/test_dynamic_routes.py b/tests/integration/test_dynamic_routes.py index 40886a601..327c5565b 100644 --- a/tests/integration/test_dynamic_routes.py +++ b/tests/integration/test_dynamic_routes.py @@ -23,11 +23,13 @@ def DynamicRoute(): class DynamicState(rx.State): order: List[str] = [] + @rx.event def on_load(self): page_data = f"{self.router.page.path}-{self.page_id or 'no page id'}" print(f"on_load: {page_data}") self.order.append(page_data) + @rx.event def on_load_redir(self): query_params = self.router.page.params page_data = f"on_load_redir-{query_params}" diff --git a/tests/integration/test_state_inheritance.py b/tests/integration/test_state_inheritance.py index f544fcc92..6e0ffd195 100644 --- a/tests/integration/test_state_inheritance.py +++ b/tests/integration/test_state_inheritance.py @@ -59,6 +59,7 @@ def StateInheritance(): def computed_mixin(self) -> str: return "computed_mixin" + @rx.event def on_click_mixin(self): return rx.call_script("alert('clicked')") @@ -70,6 +71,7 @@ def StateInheritance(): def computed_other_mixin(self) -> str: return self.other_mixin + @rx.event def on_click_other_mixin(self): self.other_mixin_clicks += 1 self.other_mixin = ( diff --git a/tests/integration/test_upload.py b/tests/integration/test_upload.py index a0df05f52..e20b1cd6d 100644 --- a/tests/integration/test_upload.py +++ b/tests/integration/test_upload.py @@ -54,12 +54,14 @@ def UploadFile(): self.large_data = "" self.event_order.append("chain_event") + @rx.event async def handle_upload_tertiary(self, files: List[rx.UploadFile]): for file in files: (rx.get_upload_dir() / (file.filename or "INVALID")).write_bytes( await file.read() ) + @rx.event def do_download(self): return rx.download(rx.get_upload_url("test.txt")) @@ -146,8 +148,8 @@ def UploadFile(): ), rx.button( "Upload", - on_click=UploadState.handle_upload_tertiary( # pyright: ignore [reportCallIssue] - rx.upload_files( + on_click=UploadState.handle_upload_tertiary( + rx.upload_files( # pyright: ignore [reportArgumentType] upload_id="tertiary", ), ), diff --git a/tests/units/test_app.py b/tests/units/test_app.py index 058174a1b..ae5a01c1a 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -897,6 +897,7 @@ class DynamicState(BaseState): loaded: int = 0 counter: int = 0 + @rx.event def on_load(self): """Event handler for page on_load, should trigger for all navigation events.""" self.loaded = self.loaded + 1 diff --git a/tests/units/test_event.py b/tests/units/test_event.py index afcfda504..df4f282cf 100644 --- a/tests/units/test_event.py +++ b/tests/units/test_event.py @@ -474,7 +474,7 @@ def test_event_bound_method() -> None: print(arg) class Wrapper: - def get_handler(self, arg: str): + def get_handler(self, arg: Var[str]): return S.e(arg) w = Wrapper() From d0199a326fff40b6e38b15dacecb26d74a6ad0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 5 Feb 2025 22:19:45 +0100 Subject: [PATCH 089/144] move benchmarks and add some more (#4758) * move benchmarks and add some more * change key and paths * parametrize tests * more specific ignore * rename fixture * remove previous file * add tests for _compile_stateful_components --- .github/workflows/performance.yml | 2 +- pyproject.toml | 1 + tests/benchmarks/__init__.py | 0 tests/benchmarks/conftest.py | 3 +++ .../benchmarks/fixtures.py | 15 +++++++++++---- tests/benchmarks/test_compilation.py | 18 ++++++++++++++++++ tests/benchmarks/test_evaluate.py | 9 +++++++++ 7 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 tests/benchmarks/__init__.py create mode 100644 tests/benchmarks/conftest.py rename benchmarks/test_evaluate.py => tests/benchmarks/fixtures.py (97%) create mode 100644 tests/benchmarks/test_compilation.py create mode 100644 tests/benchmarks/test_evaluate.py diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index c7bd1003a..cefa331de 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -31,4 +31,4 @@ jobs: uses: CodSpeedHQ/action@v3 with: token: ${{ secrets.CODSPEED_TOKEN }} - run: poetry run pytest benchmarks/test_evaluate.py --codspeed + run: poetry run pytest tests/benchmarks --codspeed diff --git a/pyproject.toml b/pyproject.toml index 2b5507a1d..b54f578fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,6 +102,7 @@ lint.pydocstyle.convention = "google" "*/blank.py" = ["I001"] [tool.pytest.ini_options] +filterwarnings = "ignore:fields may not start with an underscore:RuntimeWarning" asyncio_default_fixture_loop_scope = "function" asyncio_mode = "auto" diff --git a/tests/benchmarks/__init__.py b/tests/benchmarks/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/benchmarks/conftest.py b/tests/benchmarks/conftest.py new file mode 100644 index 000000000..bf777be2e --- /dev/null +++ b/tests/benchmarks/conftest.py @@ -0,0 +1,3 @@ +from .fixtures import evaluated_page + +__all__ = ["evaluated_page"] diff --git a/benchmarks/test_evaluate.py b/tests/benchmarks/fixtures.py similarity index 97% rename from benchmarks/test_evaluate.py rename to tests/benchmarks/fixtures.py index aa4c8237e..d9c0d7688 100644 --- a/benchmarks/test_evaluate.py +++ b/tests/benchmarks/fixtures.py @@ -216,7 +216,14 @@ def side_bar(): LOREM_IPSUM = "Lorem ipsum dolor sit amet, dolor ut dolore pariatur aliqua enim tempor sed. Labore excepteur sed exercitation. Ullamco aliquip lorem sunt enim in incididunt. Magna anim officia sint cillum labore. Ut eu non dolore minim nostrud magna eu, aute ex in incididunt irure eu. Fugiat et magna magna est excepteur eiusmod minim. Quis eiusmod et non pariatur dolor veniam incididunt, eiusmod irure enim sed dolor lorem pariatur do. Occaecat duis irure excepteur dolore. Proident ut laborum pariatur sit sit, nisi nostrud voluptate magna commodo laborum esse velit. Voluptate non minim deserunt adipiscing irure deserunt cupidatat. Laboris veniam commodo incididunt veniam lorem occaecat, fugiat ipsum dolor cupidatat. Ea officia sed eu excepteur culpa adipiscing, tempor consectetur ullamco eu. Anim ex proident nulla sunt culpa, voluptate veniam proident est adipiscing sint elit velit. Laboris adipiscing est culpa cillum magna. Sit veniam nulla nulla, aliqua eiusmod commodo lorem cupidatat commodo occaecat. Fugiat cillum dolor incididunt mollit eiusmod sint. Non lorem dolore labore excepteur minim laborum sed. Irure nisi do lorem nulla sunt commodo, deserunt quis mollit consectetur minim et esse est, proident nostrud officia enim sed reprehenderit. Magna cillum consequat aute reprehenderit duis sunt ullamco. Labore qui mollit voluptate. Duis dolor sint aute amet aliquip officia, est non mollit tempor enim quis fugiat, eu do culpa consectetur magna. Do ullamco aliqua voluptate culpa excepteur reprehenderit reprehenderit. Occaecat nulla sit est magna. Deserunt ea voluptate veniam cillum. Amet cupidatat duis est tempor fugiat ex eu, officia est sunt consectetur labore esse exercitation. Nisi cupidatat irure est nisi. Officia amet eu veniam reprehenderit. In amet incididunt tempor commodo ea labore. Mollit dolor aliquip excepteur, voluptate aute occaecat id officia proident. Ullamco est amet tempor. Proident aliquip proident mollit do aliquip ipsum, culpa quis aute id irure. Velit excepteur cillum cillum ut cupidatat. Occaecat qui elit esse nulla minim. Consequat velit id ad pariatur tempor. Eiusmod deserunt aliqua ex sed quis non. Dolor sint commodo ex in deserunt nostrud excepteur, pariatur ex aliqua anim adipiscing amet proident. Laboris eu laborum magna lorem ipsum fugiat velit." -def complicated_page(): +def _simple_page(): + return rx.box( + rx.heading("Simple Page", size="1"), + rx.text(LOREM_IPSUM), + ) + + +def _complicated_page(): return rx.hstack( side_bar(), rx.box( @@ -226,6 +233,6 @@ def complicated_page(): ) -@pytest.mark.benchmark -def test_component_init(): - complicated_page() +@pytest.fixture(params=[_simple_page, _complicated_page]) +def evaluated_page(request): + return request.param() diff --git a/tests/benchmarks/test_compilation.py b/tests/benchmarks/test_compilation.py new file mode 100644 index 000000000..0a20ed521 --- /dev/null +++ b/tests/benchmarks/test_compilation.py @@ -0,0 +1,18 @@ +import pytest + +from reflex.compiler.compiler import _compile_page, _compile_stateful_components + + +@pytest.mark.benchmark +def test_compile_page(evaluated_page): + _compile_page(evaluated_page, None) + + +@pytest.mark.benchmark +def test_compile_stateful(evaluated_page): + _compile_stateful_components([evaluated_page]) + + +@pytest.mark.benchmark +def test_get_all_imports(evaluated_page): + evaluated_page._get_all_imports() diff --git a/tests/benchmarks/test_evaluate.py b/tests/benchmarks/test_evaluate.py new file mode 100644 index 000000000..c8a6b392d --- /dev/null +++ b/tests/benchmarks/test_evaluate.py @@ -0,0 +1,9 @@ +import pytest + +from .fixtures import _complicated_page, _simple_page + + +@pytest.mark.benchmark +@pytest.mark.parametrize("page", [_simple_page, _complicated_page]) +def test_evaluate_page(page): + page() From 49e48a5a8c9617ea74e468eb347582e3a033710d Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 5 Feb 2025 16:15:23 -0800 Subject: [PATCH 090/144] Resolve custom component version dynamically (#4759) If the custom component is using setuptools_scm or some other dynamic versioning scheme, use `build.util` to get the actual version being published. --- reflex/custom_components/custom_components.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/reflex/custom_components/custom_components.py b/reflex/custom_components/custom_components.py index a54004803..6bb428072 100644 --- a/reflex/custom_components/custom_components.py +++ b/reflex/custom_components/custom_components.py @@ -14,7 +14,7 @@ from typing import Optional, Tuple import httpx import tomlkit import typer -from tomlkit.exceptions import TOMLKitError +from tomlkit.exceptions import NonExistentKey, TOMLKitError from reflex import constants from reflex.config import environment, get_config @@ -533,7 +533,13 @@ def _get_version_to_publish() -> str: Returns: The version to publish. """ - return _get_package_config()["project"]["version"] + try: + return _get_package_config()["project"]["version"] + except NonExistentKey: + # Try to get the version from dynamic sources + import build.util + + return build.util.project_wheel_metadata(".", isolated=True)["version"] def _ensure_dist_dir(version_to_publish: str, build: bool): @@ -756,7 +762,7 @@ def _min_validate_project_info(): ) raise typer.Exit(code=1) - if not project.get("version"): + if not project.get("version") and "version" not in project.get("dynamic", []): console.error( f"The project version is not found in {CustomComponents.PYPROJECT_TOML}" ) @@ -772,7 +778,7 @@ def _validate_project_info(): pyproject_toml = _get_package_config() project = pyproject_toml["project"] console.print( - f"Double check the information before publishing: {project['name']} version {project['version']}" + f"Double check the information before publishing: {project['name']} version {_get_version_to_publish()}" ) console.print("Update or enter to keep the current information.") From 88eae92d9b00a4c79b28404c1e22c9a2036624d7 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 5 Feb 2025 16:16:30 -0800 Subject: [PATCH 091/144] make computed var generic over mapping (#4762) --- reflex/vars/base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 34d626f1d..c9dd81986 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -2219,10 +2219,10 @@ class ComputedVar(Var[RETURN_TYPE]): @overload def __get__( - self: ComputedVar[Mapping[DICT_KEY, DICT_VAL]], + self: ComputedVar[MAPPING_TYPE], instance: None, owner: Type, - ) -> ObjectVar[Mapping[DICT_KEY, DICT_VAL]]: ... + ) -> ObjectVar[MAPPING_TYPE]: ... @overload def __get__( @@ -2465,10 +2465,10 @@ class AsyncComputedVar(ComputedVar[RETURN_TYPE]): @overload def __get__( - self: AsyncComputedVar[Mapping[DICT_KEY, DICT_VAL]], + self: AsyncComputedVar[MAPPING_TYPE], instance: None, owner: Type, - ) -> ObjectVar[Mapping[DICT_KEY, DICT_VAL]]: ... + ) -> ObjectVar[MAPPING_TYPE]: ... @overload def __get__( From 6f4d328cde9674dc6caaaa1bb5d73d33230b322d Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 5 Feb 2025 18:34:53 -0800 Subject: [PATCH 092/144] add a config variable to add extra overlay components (#4763) * add a config variable to add extra overlay components * add integration test * Apply suggestions from code review --------- Co-authored-by: Masen Furer --- reflex/app.py | 17 ++++ reflex/compiler/utils.py | 21 ++++- reflex/config.py | 3 + .../test_extra_overlay_function.py | 87 +++++++++++++++++++ 4 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 tests/integration/test_extra_overlay_function.py diff --git a/reflex/app.py b/reflex/app.py index 2f4e57a63..a3d0d8e10 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -164,9 +164,26 @@ def default_overlay_component() -> Component: """ config = get_config() + extra_config = config.extra_overlay_function + config_overlay = None + if extra_config: + module, _, function_name = extra_config.rpartition(".") + try: + module = __import__(module) + config_overlay = getattr(module, function_name)() + except Exception as e: + from reflex.compiler.utils import save_error + + log_path = save_error(e) + + console.error( + f"Error loading extra_overlay_function {extra_config}. Error saved to {log_path}" + ) + return Fragment.create( connection_pulser(), connection_toaster(), + *([config_overlay] if config_overlay else []), *([backend_disabled()] if config.is_reflex_cloud else []), *codespaces.codespaces_auto_redirect(), ) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 57241fea9..c797a095f 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -158,6 +158,22 @@ def get_import_dict(lib: str, default: str = "", rest: list[str] | None = None) } +def save_error(error: Exception) -> str: + """Save the error to a file. + + Args: + error: The error to save. + + Returns: + The path of the saved error. + """ + timestamp = datetime.now().strftime("%Y-%m-%d__%H-%M-%S") + constants.Reflex.LOGS_DIR.mkdir(parents=True, exist_ok=True) + log_path = constants.Reflex.LOGS_DIR / f"error_{timestamp}.log" + traceback.TracebackException.from_exception(error).print(file=log_path.open("w+")) + return str(log_path) + + def compile_state(state: Type[BaseState]) -> dict: """Compile the state of the app. @@ -170,10 +186,7 @@ def compile_state(state: Type[BaseState]) -> dict: try: initial_state = state(_reflex_internal_init=True).dict(initial=True) except Exception as e: - timestamp = datetime.now().strftime("%Y-%m-%d__%H-%M-%S") - constants.Reflex.LOGS_DIR.mkdir(parents=True, exist_ok=True) - log_path = constants.Reflex.LOGS_DIR / f"state_compile_error_{timestamp}.log" - traceback.TracebackException.from_exception(e).print(file=log_path.open("w+")) + log_path = save_error(e) console.warn( f"Failed to compile initial state with computed vars. Error log saved to {log_path}" ) diff --git a/reflex/config.py b/reflex/config.py index 050676227..f3d40dc37 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -709,6 +709,9 @@ class Config(Base): # Whether the app is running in the reflex cloud environment. is_reflex_cloud: bool = False + # Extra overlay function to run after the app is built. Formatted such that `from path_0.path_1... import path[-1]`, and calling it with no arguments would work. For example, "reflex.components.moment.momnet". + extra_overlay_function: Optional[str] = None + def __init__(self, *args, **kwargs): """Initialize the config values. diff --git a/tests/integration/test_extra_overlay_function.py b/tests/integration/test_extra_overlay_function.py new file mode 100644 index 000000000..2e36057ca --- /dev/null +++ b/tests/integration/test_extra_overlay_function.py @@ -0,0 +1,87 @@ +"""Test case for adding an overlay component defined in the rxconfig.""" + +from typing import Generator + +import pytest +from selenium.webdriver.common.by import By + +from reflex.testing import AppHarness, WebDriver + + +def ExtraOverlay(): + import reflex as rx + + rx.config.get_config().extra_overlay_function = "reflex.components.moment.moment" + + def index(): + return rx.vstack( + rx.el.input( + id="token", + value=rx.State.router.session.client_token, + is_read_only=True, + ), + rx.text( + "Hello World", + ), + ) + + app = rx.App(_state=rx.State) + app.add_page(index) + + +@pytest.fixture(scope="module") +def extra_overlay(tmp_path_factory) -> Generator[AppHarness, None, None]: + """Start ExtraOverlay app at tmp_path via AppHarness. + + Args: + tmp_path_factory: pytest tmp_path_factory fixture + + Yields: + running AppHarness instance + """ + with AppHarness.create( + root=tmp_path_factory.mktemp("extra_overlay"), + app_source=ExtraOverlay, + ) as harness: + assert harness.app_instance is not None, "app is not running" + yield harness + + +@pytest.fixture +def driver(extra_overlay: AppHarness): + """Get an instance of the browser open to the extra overlay app. + + Args: + extra_overlay: harness for the ExtraOverlay app. + + Yields: + WebDriver instance. + """ + driver = extra_overlay.frontend() + try: + token_input = driver.find_element(By.ID, "token") + assert token_input + # wait for the backend connection to send the token + token = extra_overlay.poll_for_value(token_input) + assert token is not None + + yield driver + finally: + driver.quit() + + +def test_extra_overlay(driver: WebDriver, extra_overlay: AppHarness): + """Test the ExtraOverlay app. + + Args: + driver: WebDriver instance. + extra_overlay: harness for the ExtraOverlay app. + """ + # Check that the text is displayed. + text = driver.find_element(By.XPATH, "//*[contains(text(), 'Hello World')]") + assert text + assert text.text == "Hello World" + + time = driver.find_element(By.TAG_NAME, "time") + assert time + assert time.text From 1651289485d194118eafd6fa987608dbaaa100c6 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 6 Feb 2025 10:09:05 -0800 Subject: [PATCH 093/144] use getattr when given str in getitem (#4761) * use getattr when given str in getitem * stronger checking and tests * switch ordering * use safe issubclass * calculate origin differently --- reflex/vars/object.py | 17 +++++++++++++---- tests/integration/test_var_operations.py | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/reflex/vars/object.py b/reflex/vars/object.py index cb29cabfb..89479bbc4 100644 --- a/reflex/vars/object.py +++ b/reflex/vars/object.py @@ -22,7 +22,12 @@ from typing_extensions import is_typeddict from reflex.utils import types from reflex.utils.exceptions import VarAttributeError -from reflex.utils.types import GenericType, get_attribute_access_type, get_origin +from reflex.utils.types import ( + GenericType, + get_attribute_access_type, + get_origin, + safe_issubclass, +) from .base import ( CachedVarOperation, @@ -187,10 +192,14 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): Returns: The item from the object. """ + from .sequence import LiteralStringVar + if not isinstance(key, (StringVar, str, int, NumberVar)) or ( isinstance(key, NumberVar) and key._is_strict_float() ): raise_unsupported_operand_types("[]", (type(self), type(key))) + if isinstance(key, str) and isinstance(Var.create(key), LiteralStringVar): + return self.__getattr__(key) return ObjectItemOperation.create(self, key).guess_type() # NoReturn is used here to catch when key value is Any @@ -260,12 +269,12 @@ class ObjectVar(Var[OBJECT_TYPE], python_types=Mapping): if types.is_optional(var_type): var_type = get_args(var_type)[0] - fixed_type = var_type if isclass(var_type) else get_origin(var_type) + fixed_type = get_origin(var_type) or var_type if ( - (isclass(fixed_type) and not issubclass(fixed_type, Mapping)) + is_typeddict(fixed_type) + or (isclass(fixed_type) and not safe_issubclass(fixed_type, Mapping)) or (fixed_type in types.UnionTypes) - or is_typeddict(fixed_type) ): attribute_type = get_attribute_access_type(var_type, name) if attribute_type is None: diff --git a/tests/integration/test_var_operations.py b/tests/integration/test_var_operations.py index a5a74c9ee..16885cd06 100644 --- a/tests/integration/test_var_operations.py +++ b/tests/integration/test_var_operations.py @@ -10,6 +10,8 @@ from reflex.testing import AppHarness def VarOperations(): """App with var operations.""" + from typing import TypedDict + import reflex as rx from reflex.vars.base import LiteralVar from reflex.vars.sequence import ArrayVar @@ -17,6 +19,10 @@ def VarOperations(): class Object(rx.Base): name: str = "hello" + class Person(TypedDict): + name: str + age: int + class VarOperationState(rx.State): int_var1: rx.Field[int] = rx.field(10) int_var2: rx.Field[int] = rx.field(5) @@ -34,6 +40,9 @@ def VarOperations(): dict1: rx.Field[dict[int, int]] = rx.field({1: 2}) dict2: rx.Field[dict[int, int]] = rx.field({3: 4}) html_str: rx.Field[str] = rx.field("
hello
") + people: rx.Field[list[Person]] = rx.field( + [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}] + ) app = rx.App(_state=rx.State) @@ -619,6 +628,15 @@ def VarOperations(): ), id="dict_in_foreach3", ), + rx.box( + rx.foreach( + VarOperationState.people, + lambda person: rx.text.span( + "Hello " + person["name"], person["age"] + 3 + ), + ), + id="typed_dict_in_foreach", + ), ) @@ -826,6 +844,7 @@ def test_var_operations(driver, var_operations: AppHarness): ("dict_in_foreach1", "a1b2"), ("dict_in_foreach2", "12"), ("dict_in_foreach3", "1234"), + ("typed_dict_in_foreach", "Hello Alice33Hello Bob28"), ] for tag, expected in tests: From 9d23271c14a136df85475c465aad94a46fe90052 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 6 Feb 2025 10:09:26 -0800 Subject: [PATCH 094/144] improve behavior on missing language with markdown code blocks (#4750) * improve behavior on missing language with markdown code blocks * special case on literal var * fix tests * missing f * remove extra throw --- reflex/components/datadisplay/code.py | 46 +++++++++++++++---- reflex/components/datadisplay/code.pyi | 2 +- reflex/components/markdown/markdown.py | 35 +++++++++++--- reflex/components/markdown/markdown.pyi | 5 +- .../components/markdown/test_markdown.py | 9 ++-- 5 files changed, 73 insertions(+), 24 deletions(-) diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py index 4f1eb493e..3e4794482 100644 --- a/reflex/components/datadisplay/code.py +++ b/reflex/components/datadisplay/code.py @@ -3,6 +3,7 @@ from __future__ import annotations import dataclasses +import typing from typing import ClassVar, Dict, Literal, Optional, Union from reflex.components.component import Component, ComponentNamespace @@ -503,7 +504,7 @@ class CodeBlock(Component, MarkdownComponentMap): return ["can_copy", "copy_button"] @classmethod - def _get_language_registration_hook(cls, language_var: Var = _LANGUAGE) -> str: + def _get_language_registration_hook(cls, language_var: Var = _LANGUAGE) -> Var: """Get the hook to register the language. Args: @@ -514,21 +515,46 @@ class CodeBlock(Component, MarkdownComponentMap): Returns: The hook to register the language. """ - return f""" - if ({language_var!s}) {{ - (async () => {{ - try {{ + language_in_there = Var.create(typing.get_args(LiteralCodeLanguage)).contains( + language_var + ) + async_load = f""" +(async () => {{ + try {{ const module = await import(`react-syntax-highlighter/dist/cjs/languages/prism/${{{language_var!s}}}`); SyntaxHighlighter.registerLanguage({language_var!s}, module.default); - }} catch (error) {{ - console.error(`Error importing language module for ${{{language_var!s}}}:`, error); - }} - }})(); + }} catch (error) {{ + console.error(`Language ${{{language_var!s}}} is not supported for code blocks inside of markdown: `, error); + }} +}})(); +""" + return Var( + f""" + if ({language_var!s}) {{ + if (!{language_in_there!s}) {{ + console.warn(`Language \\`${{{language_var!s}}}\\` is not supported for code blocks inside of markdown.`); + {language_var!s} = ''; + }} else {{ + {async_load!s} + }} }} """ + if not isinstance(language_var, LiteralVar) + else f""" +if ({language_var!s}) {{ + {async_load!s} +}}""", + _var_data=VarData( + imports={ + cls.__fields__["library"].default: [ + ImportVar(tag="PrismAsyncLight", alias="SyntaxHighlighter") + ] + }, + ), + ) @classmethod - def get_component_map_custom_code(cls) -> str: + def get_component_map_custom_code(cls) -> Var: """Get the custom code for the component. Returns: diff --git a/reflex/components/datadisplay/code.pyi b/reflex/components/datadisplay/code.pyi index fc35092fe..fda92a974 100644 --- a/reflex/components/datadisplay/code.pyi +++ b/reflex/components/datadisplay/code.pyi @@ -984,7 +984,7 @@ class CodeBlock(Component, MarkdownComponentMap): def add_style(self): ... @classmethod - def get_component_map_custom_code(cls) -> str: ... + def get_component_map_custom_code(cls) -> Var: ... def add_hooks(self) -> list[str | Var]: ... class CodeblockNamespace(ComponentNamespace): diff --git a/reflex/components/markdown/markdown.py b/reflex/components/markdown/markdown.py index 27bd5bd62..91d34ea9b 100644 --- a/reflex/components/markdown/markdown.py +++ b/reflex/components/markdown/markdown.py @@ -12,7 +12,7 @@ from reflex.components.component import BaseComponent, Component, CustomComponen from reflex.components.tags.tag import Tag from reflex.utils import types from reflex.utils.imports import ImportDict, ImportVar -from reflex.vars.base import LiteralVar, Var +from reflex.vars.base import LiteralVar, Var, VarData from reflex.vars.function import ARRAY_ISARRAY, ArgsFunctionOperation, DestructuredArg from reflex.vars.number import ternary_operation @@ -83,13 +83,13 @@ class MarkdownComponentMap: _explicit_return: bool = dataclasses.field(default=False) @classmethod - def get_component_map_custom_code(cls) -> str: + def get_component_map_custom_code(cls) -> Var: """Get the custom code for the component map. Returns: The custom code for the component map. """ - return "" + return Var("") @classmethod def create_map_fn_var( @@ -97,6 +97,7 @@ class MarkdownComponentMap: fn_body: Var | None = None, fn_args: Sequence[str] | None = None, explicit_return: bool | None = None, + var_data: VarData | None = None, ) -> Var: """Create a function Var for the component map. @@ -104,6 +105,7 @@ class MarkdownComponentMap: fn_body: The formatted component as a string. fn_args: The function arguments. explicit_return: Whether to use explicit return syntax. + var_data: The var data for the function. Returns: The function Var for the component map. @@ -116,6 +118,7 @@ class MarkdownComponentMap: args_names=(DestructuredArg(fields=tuple(fn_args)),), return_expr=fn_body, explicit_return=explicit_return, + _var_data=var_data, ) @classmethod @@ -239,6 +242,15 @@ class Markdown(Component): component(_MOCK_ARG)._get_all_imports() for component in self.component_map.values() ], + *( + [inline_code_var_data.old_school_imports()] + if ( + inline_code_var_data + := self._get_inline_code_fn_var()._get_all_var_data() + ) + is not None + else [] + ), ] def _get_tag_map_fn_var(self, tag: str) -> Var: @@ -278,12 +290,20 @@ class Markdown(Component): self._get_map_fn_custom_code_from_children(self.get_component("code")) ) - codeblock_custom_code = "\n".join(custom_code_list) + var_data = VarData.merge( + *[ + code._get_all_var_data() + for code in custom_code_list + if isinstance(code, Var) + ] + ) + + codeblock_custom_code = "\n".join(map(str, custom_code_list)) # Format the code to handle inline and block code. formatted_code = f""" const match = (className || '').match(/language-(?.*)/); -const {_LANGUAGE!s} = match ? match[1] : ''; +let {_LANGUAGE!s} = match ? match[1] : ''; {codeblock_custom_code}; return inline ? ( {self.format_component("code")} @@ -302,6 +322,7 @@ const {_LANGUAGE!s} = match ? match[1] : ''; ), fn_body=Var(_js_expr=formatted_code), explicit_return=True, + var_data=var_data, ) def get_component(self, tag: str, **props) -> Component: @@ -381,7 +402,7 @@ const {_LANGUAGE!s} = match ? match[1] : ''; def _get_map_fn_custom_code_from_children( self, component: BaseComponent - ) -> list[str]: + ) -> list[str | Var]: """Recursively get markdown custom code from children components. Args: @@ -390,7 +411,7 @@ const {_LANGUAGE!s} = match ? match[1] : ''; Returns: A list of markdown custom code strings. """ - custom_code_list = [] + custom_code_list: list[str | Var] = [] if isinstance(component, MarkdownComponentMap): custom_code_list.append(component.get_component_map_custom_code()) diff --git a/reflex/components/markdown/markdown.pyi b/reflex/components/markdown/markdown.pyi index 606780a7a..61ddee094 100644 --- a/reflex/components/markdown/markdown.pyi +++ b/reflex/components/markdown/markdown.pyi @@ -11,7 +11,7 @@ from reflex.components.component import Component from reflex.event import EventType from reflex.style import Style from reflex.utils.imports import ImportDict -from reflex.vars.base import LiteralVar, Var +from reflex.vars.base import LiteralVar, Var, VarData _CHILDREN = Var(_js_expr="children", _var_type=str) _PROPS = Var(_js_expr="...props") @@ -32,13 +32,14 @@ def get_base_component_map() -> dict[str, Callable]: ... @dataclasses.dataclass() class MarkdownComponentMap: @classmethod - def get_component_map_custom_code(cls) -> str: ... + def get_component_map_custom_code(cls) -> Var: ... @classmethod def create_map_fn_var( cls, fn_body: Var | None = None, fn_args: Sequence[str] | None = None, explicit_return: bool | None = None, + var_data: VarData | None = None, ) -> Var: ... @classmethod def get_fn_args(cls) -> Sequence[str]: ... diff --git a/tests/units/components/markdown/test_markdown.py b/tests/units/components/markdown/test_markdown.py index 866f32ae1..c6d395eb1 100644 --- a/tests/units/components/markdown/test_markdown.py +++ b/tests/units/components/markdown/test_markdown.py @@ -148,7 +148,7 @@ def test_create_map_fn_var_subclass(cls, fn_body, fn_args, explicit_return, expe ( "code", {}, - """(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); const _language = match ? match[1] : ''; if (_language) { (async () => { try { const module = await import(`react-syntax-highlighter/dist/cjs/languages/prism/${_language}`); SyntaxHighlighter.registerLanguage(_language, module.default); } catch (error) { console.error(`Error importing language module for ${_language}:`, error); } })(); } ; return inline ? ( {children} ) : ( ); })""", + r"""(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); let _language = match ? match[1] : ''; if (_language) { if (!["abap", "abnf", "actionscript", "ada", "agda", "al", "antlr4", "apacheconf", "apex", "apl", "applescript", "aql", "arduino", "arff", "asciidoc", "asm6502", "asmatmel", "aspnet", "autohotkey", "autoit", "avisynth", "avro-idl", "bash", "basic", "batch", "bbcode", "bicep", "birb", "bison", "bnf", "brainfuck", "brightscript", "bro", "bsl", "c", "cfscript", "chaiscript", "cil", "clike", "clojure", "cmake", "cobol", "coffeescript", "concurnas", "coq", "core", "cpp", "crystal", "csharp", "cshtml", "csp", "css", "css-extras", "csv", "cypher", "d", "dart", "dataweave", "dax", "dhall", "diff", "django", "dns-zone-file", "docker", "dot", "ebnf", "editorconfig", "eiffel", "ejs", "elixir", "elm", "erb", "erlang", "etlua", "excel-formula", "factor", "false", "firestore-security-rules", "flow", "fortran", "fsharp", "ftl", "gap", "gcode", "gdscript", "gedcom", "gherkin", "git", "glsl", "gml", "gn", "go", "go-module", "graphql", "groovy", "haml", "handlebars", "haskell", "haxe", "hcl", "hlsl", "hoon", "hpkp", "hsts", "http", "ichigojam", "icon", "icu-message-format", "idris", "iecst", "ignore", "index", "inform7", "ini", "io", "j", "java", "javadoc", "javadoclike", "javascript", "javastacktrace", "jexl", "jolie", "jq", "js-extras", "js-templates", "jsdoc", "json", "json5", "jsonp", "jsstacktrace", "jsx", "julia", "keepalived", "keyman", "kotlin", "kumir", "kusto", "latex", "latte", "less", "lilypond", "liquid", "lisp", "livescript", "llvm", "log", "lolcode", "lua", "magma", "makefile", "markdown", "markup", "markup-templating", "matlab", "maxscript", "mel", "mermaid", "mizar", "mongodb", "monkey", "moonscript", "n1ql", "n4js", "nand2tetris-hdl", "naniscript", "nasm", "neon", "nevod", "nginx", "nim", "nix", "nsis", "objectivec", "ocaml", "opencl", "openqasm", "oz", "parigp", "parser", "pascal", "pascaligo", "pcaxis", "peoplecode", "perl", "php", "php-extras", "phpdoc", "plsql", "powerquery", "powershell", "processing", "prolog", "promql", "properties", "protobuf", "psl", "pug", "puppet", "pure", "purebasic", "purescript", "python", "q", "qml", "qore", "qsharp", "r", "racket", "reason", "regex", "rego", "renpy", "rest", "rip", "roboconf", "robotframework", "ruby", "rust", "sas", "sass", "scala", "scheme", "scss", "shell-session", "smali", "smalltalk", "smarty", "sml", "solidity", "solution-file", "soy", "sparql", "splunk-spl", "sqf", "sql", "squirrel", "stan", "stylus", "swift", "systemd", "t4-cs", "t4-templating", "t4-vb", "tap", "tcl", "textile", "toml", "tremor", "tsx", "tt2", "turtle", "twig", "typescript", "typoscript", "unrealscript", "uorazor", "uri", "v", "vala", "vbnet", "velocity", "verilog", "vhdl", "vim", "visual-basic", "warpscript", "wasm", "web-idl", "wiki", "wolfram", "wren", "xeora", "xml-doc", "xojo", "xquery", "yaml", "yang", "zig"].includes(_language)) { console.warn(`Language \`${_language}\` is not supported for code blocks inside of markdown.`); _language = ''; } else { (async () => { try { const module = await import(`react-syntax-highlighter/dist/cjs/languages/prism/${_language}`); SyntaxHighlighter.registerLanguage(_language, module.default); } catch (error) { console.error(`Language ${_language} is not supported for code blocks inside of markdown: `, error); } })(); } } ; return inline ? ( {children} ) : ( ); })""", ), ( "code", @@ -157,7 +157,7 @@ def test_create_map_fn_var_subclass(cls, fn_body, fn_args, explicit_return, expe value, **props ) }, - """(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); const _language = match ? match[1] : ''; ; return inline ? ( {children} ) : ( ); })""", + r"""(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); let _language = match ? match[1] : ''; ; return inline ? ( {children} ) : ( ); })""", ), ( "h1", @@ -171,7 +171,7 @@ def test_create_map_fn_var_subclass(cls, fn_body, fn_args, explicit_return, expe ( "code", {"codeblock": syntax_highlighter_memoized_component(CodeBlock)}, - """(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); const _language = match ? match[1] : ''; if (_language) { (async () => { try { const module = await import(`react-syntax-highlighter/dist/cjs/languages/prism/${_language}`); SyntaxHighlighter.registerLanguage(_language, module.default); } catch (error) { console.error(`Error importing language module for ${_language}:`, error); } })(); } ; return inline ? ( {children} ) : ( ); })""", + r"""(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); let _language = match ? match[1] : ''; if (_language) { if (!["abap", "abnf", "actionscript", "ada", "agda", "al", "antlr4", "apacheconf", "apex", "apl", "applescript", "aql", "arduino", "arff", "asciidoc", "asm6502", "asmatmel", "aspnet", "autohotkey", "autoit", "avisynth", "avro-idl", "bash", "basic", "batch", "bbcode", "bicep", "birb", "bison", "bnf", "brainfuck", "brightscript", "bro", "bsl", "c", "cfscript", "chaiscript", "cil", "clike", "clojure", "cmake", "cobol", "coffeescript", "concurnas", "coq", "core", "cpp", "crystal", "csharp", "cshtml", "csp", "css", "css-extras", "csv", "cypher", "d", "dart", "dataweave", "dax", "dhall", "diff", "django", "dns-zone-file", "docker", "dot", "ebnf", "editorconfig", "eiffel", "ejs", "elixir", "elm", "erb", "erlang", "etlua", "excel-formula", "factor", "false", "firestore-security-rules", "flow", "fortran", "fsharp", "ftl", "gap", "gcode", "gdscript", "gedcom", "gherkin", "git", "glsl", "gml", "gn", "go", "go-module", "graphql", "groovy", "haml", "handlebars", "haskell", "haxe", "hcl", "hlsl", "hoon", "hpkp", "hsts", "http", "ichigojam", "icon", "icu-message-format", "idris", "iecst", "ignore", "index", "inform7", "ini", "io", "j", "java", "javadoc", "javadoclike", "javascript", "javastacktrace", "jexl", "jolie", "jq", "js-extras", "js-templates", "jsdoc", "json", "json5", "jsonp", "jsstacktrace", "jsx", "julia", "keepalived", "keyman", "kotlin", "kumir", "kusto", "latex", "latte", "less", "lilypond", "liquid", "lisp", "livescript", "llvm", "log", "lolcode", "lua", "magma", "makefile", "markdown", "markup", "markup-templating", "matlab", "maxscript", "mel", "mermaid", "mizar", "mongodb", "monkey", "moonscript", "n1ql", "n4js", "nand2tetris-hdl", "naniscript", "nasm", "neon", "nevod", "nginx", "nim", "nix", "nsis", "objectivec", "ocaml", "opencl", "openqasm", "oz", "parigp", "parser", "pascal", "pascaligo", "pcaxis", "peoplecode", "perl", "php", "php-extras", "phpdoc", "plsql", "powerquery", "powershell", "processing", "prolog", "promql", "properties", "protobuf", "psl", "pug", "puppet", "pure", "purebasic", "purescript", "python", "q", "qml", "qore", "qsharp", "r", "racket", "reason", "regex", "rego", "renpy", "rest", "rip", "roboconf", "robotframework", "ruby", "rust", "sas", "sass", "scala", "scheme", "scss", "shell-session", "smali", "smalltalk", "smarty", "sml", "solidity", "solution-file", "soy", "sparql", "splunk-spl", "sqf", "sql", "squirrel", "stan", "stylus", "swift", "systemd", "t4-cs", "t4-templating", "t4-vb", "tap", "tcl", "textile", "toml", "tremor", "tsx", "tt2", "turtle", "twig", "typescript", "typoscript", "unrealscript", "uorazor", "uri", "v", "vala", "vbnet", "velocity", "verilog", "vhdl", "vim", "visual-basic", "warpscript", "wasm", "web-idl", "wiki", "wolfram", "wren", "xeora", "xml-doc", "xojo", "xquery", "yaml", "yang", "zig"].includes(_language)) { console.warn(`Language \`${_language}\` is not supported for code blocks inside of markdown.`); _language = ''; } else { (async () => { try { const module = await import(`react-syntax-highlighter/dist/cjs/languages/prism/${_language}`); SyntaxHighlighter.registerLanguage(_language, module.default); } catch (error) { console.error(`Language ${_language} is not supported for code blocks inside of markdown: `, error); } })(); } } ; return inline ? ( {children} ) : ( ); })""", ), ( "code", @@ -180,11 +180,12 @@ def test_create_map_fn_var_subclass(cls, fn_body, fn_args, explicit_return, expe ShikiHighLevelCodeBlock ) }, - """(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); const _language = match ? match[1] : ''; ; return inline ? ( {children} ) : ( ); })""", + r"""(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); let _language = match ? match[1] : ''; ; return inline ? ( {children} ) : ( ); })""", ), ], ) def test_markdown_format_component(key, component_map, expected): markdown = Markdown.create("# header", component_map=component_map) result = markdown.format_component_map() + print(str(result[key])) assert str(result[key]) == expected From ab558ce17285a30ccf88d479277f2b2ebea2760c Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 6 Feb 2025 10:09:40 -0800 Subject: [PATCH 095/144] increase nested type checking for component var types (#4756) * increase nested type checking for component var types * handle mapping as dict in type hint * fix weird cases of using _isinstance instead of isinstance * test out nested=0 * move union below * don't use _instance for simple unions --- reflex/components/component.py | 15 +++------ reflex/components/core/match.py | 8 ++--- reflex/components/markdown/markdown.py | 5 ++- reflex/components/tags/tag.py | 4 +-- reflex/utils/types.py | 42 +++++++++++++++++--------- 5 files changed, 40 insertions(+), 34 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 6d1264f4d..6e4c6c37f 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -179,6 +179,7 @@ ComponentStyle = Dict[ Union[str, Type[BaseComponent], Callable, ComponentNamespace], Any ] ComponentChild = Union[types.PrimitiveType, Var, BaseComponent] +ComponentChildTypes = (*types.PrimitiveTypes, Var, BaseComponent) def satisfies_type_hint(obj: Any, type_hint: Any) -> bool: @@ -191,11 +192,7 @@ def satisfies_type_hint(obj: Any, type_hint: Any) -> bool: Returns: Whether the object satisfies the type hint. """ - if isinstance(obj, LiteralVar): - return types._isinstance(obj._var_value, type_hint) - if isinstance(obj, Var): - return types._issubclass(obj._var_type, type_hint) - return types._isinstance(obj, type_hint) + return types._isinstance(obj, type_hint, nested=1) class Component(BaseComponent, ABC): @@ -712,8 +709,8 @@ class Component(BaseComponent, ABC): validate_children(child) # Make sure the child is a valid type. - if isinstance(child, dict) or not types._isinstance( - child, ComponentChild + if isinstance(child, dict) or not isinstance( + child, ComponentChildTypes ): raise ChildrenTypeError(component=cls.__name__, child=child) @@ -1771,9 +1768,7 @@ class CustomComponent(Component): return [ Var( _js_expr=name, - _var_type=( - prop._var_type if types._isinstance(prop, Var) else type(prop) - ), + _var_type=(prop._var_type if isinstance(prop, Var) else type(prop)), ).guess_type() for name, prop in self.props.items() ] diff --git a/reflex/components/core/match.py b/reflex/components/core/match.py index 5c31669a1..2d936544a 100644 --- a/reflex/components/core/match.py +++ b/reflex/components/core/match.py @@ -178,9 +178,9 @@ class Match(MemoizationLeaf): first_case_return = match_cases[0][-1] return_type = type(first_case_return) - if types._isinstance(first_case_return, BaseComponent): + if isinstance(first_case_return, BaseComponent): return_type = BaseComponent - elif types._isinstance(first_case_return, Var): + elif isinstance(first_case_return, Var): return_type = Var for index, case in enumerate(match_cases): @@ -228,8 +228,8 @@ class Match(MemoizationLeaf): # Validate the match cases (as well as the default case) to have Var return types. if any( - case for case in match_cases if not types._isinstance(case[-1], Var) - ) or not types._isinstance(default, Var): + case for case in match_cases if not isinstance(case[-1], Var) + ) or not isinstance(default, Var): raise ValueError("Return types of match cases should be Vars.") return Var( diff --git a/reflex/components/markdown/markdown.py b/reflex/components/markdown/markdown.py index 91d34ea9b..51d3dd3dd 100644 --- a/reflex/components/markdown/markdown.py +++ b/reflex/components/markdown/markdown.py @@ -6,11 +6,10 @@ import dataclasses import textwrap from functools import lru_cache from hashlib import md5 -from typing import Any, Callable, Dict, Sequence, Union +from typing import Any, Callable, Dict, Sequence from reflex.components.component import BaseComponent, Component, CustomComponent from reflex.components.tags.tag import Tag -from reflex.utils import types from reflex.utils.imports import ImportDict, ImportVar from reflex.vars.base import LiteralVar, Var, VarData from reflex.vars.function import ARRAY_ISARRAY, ArgsFunctionOperation, DestructuredArg @@ -169,7 +168,7 @@ class Markdown(Component): Returns: The markdown component. """ - if len(children) != 1 or not types._isinstance(children[0], Union[str, Var]): + if len(children) != 1 or not isinstance(children[0], (str, Var)): raise ValueError( "Markdown component must have exactly one child containing the markdown source." ) diff --git a/reflex/components/tags/tag.py b/reflex/components/tags/tag.py index 983726e56..515d9e05f 100644 --- a/reflex/components/tags/tag.py +++ b/reflex/components/tags/tag.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses -from typing import Any, Dict, List, Optional, Sequence, Union +from typing import Any, Dict, List, Mapping, Optional, Sequence from reflex.event import EventChain from reflex.utils import format, types @@ -103,7 +103,7 @@ class Tag: { format.to_camel_case(name, allow_hyphens=True): ( prop - if types._isinstance(prop, Union[EventChain, dict]) + if types._isinstance(prop, (EventChain, Mapping)) else LiteralVar.create(prop) ) # rx.color is always a string for name, prop in kwargs.items() diff --git a/reflex/utils/types.py b/reflex/utils/types.py index 58fec8f3b..b432319e0 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -95,6 +95,7 @@ GenericType = Union[Type, _GenericAlias] # Valid state var types. JSONType = {str, int, float, bool} PrimitiveType = Union[int, float, bool, str, list, dict, set, tuple] +PrimitiveTypes = (int, float, bool, str, list, dict, set, tuple) StateVar = Union[PrimitiveType, Base, None] StateIterVar = Union[list, set, tuple] @@ -551,13 +552,13 @@ def does_obj_satisfy_typed_dict(obj: Any, cls: GenericType) -> bool: return required_keys.issubset(required_keys) -def _isinstance(obj: Any, cls: GenericType, nested: bool = False) -> bool: +def _isinstance(obj: Any, cls: GenericType, nested: int = 0) -> bool: """Check if an object is an instance of a class. Args: obj: The object to check. cls: The class to check against. - nested: Whether the check is nested. + nested: How many levels deep to check. Returns: Whether the object is an instance of the class. @@ -565,15 +566,24 @@ def _isinstance(obj: Any, cls: GenericType, nested: bool = False) -> bool: if cls is Any: return True + from reflex.vars import LiteralVar, Var + + if cls is Var: + return isinstance(obj, Var) + if isinstance(obj, LiteralVar): + return _isinstance(obj._var_value, cls, nested=nested) + if isinstance(obj, Var): + return _issubclass(obj._var_type, cls) + if cls is None or cls is type(None): return obj is None + if cls and is_union(cls): + return any(_isinstance(obj, arg, nested=nested) for arg in get_args(cls)) + if is_literal(cls): return obj in get_args(cls) - if is_union(cls): - return any(_isinstance(obj, arg) for arg in get_args(cls)) - origin = get_origin(cls) if origin is None: @@ -596,38 +606,40 @@ def _isinstance(obj: Any, cls: GenericType, nested: bool = False) -> bool: # cls is a simple generic class return isinstance(obj, origin) - if nested and args: + if nested > 0 and args: if origin is list: return isinstance(obj, list) and all( - _isinstance(item, args[0]) for item in obj + _isinstance(item, args[0], nested=nested - 1) for item in obj ) if origin is tuple: if args[-1] is Ellipsis: return isinstance(obj, tuple) and all( - _isinstance(item, args[0]) for item in obj + _isinstance(item, args[0], nested=nested - 1) for item in obj ) return ( isinstance(obj, tuple) and len(obj) == len(args) and all( - _isinstance(item, arg) for item, arg in zip(obj, args, strict=True) + _isinstance(item, arg, nested=nested - 1) + for item, arg in zip(obj, args, strict=True) ) ) - if origin in (dict, Breakpoints): - return isinstance(obj, dict) and all( - _isinstance(key, args[0]) and _isinstance(value, args[1]) + if origin in (dict, Mapping, Breakpoints): + return isinstance(obj, Mapping) and all( + _isinstance(key, args[0], nested=nested - 1) + and _isinstance(value, args[1], nested=nested - 1) for key, value in obj.items() ) if origin is set: return isinstance(obj, set) and all( - _isinstance(item, args[0]) for item in obj + _isinstance(item, args[0], nested=nested - 1) for item in obj ) if args: from reflex.vars import Field if origin is Field: - return _isinstance(obj, args[0]) + return _isinstance(obj, args[0], nested=nested) return isinstance(obj, get_base_class(cls)) @@ -749,7 +761,7 @@ def check_prop_in_allowed_types(prop: Any, allowed_types: Iterable) -> bool: """ from reflex.vars import Var - type_ = prop._var_type if _isinstance(prop, Var) else type(prop) + type_ = prop._var_type if isinstance(prop, Var) else type(prop) return type_ in allowed_types From b3b79a652d3e1b7f85740f0e6210f536236f7041 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 6 Feb 2025 10:41:38 -0800 Subject: [PATCH 096/144] improve foreach behavior with strings (#4751) * improve foreach behavior with strings * add a defensive guard before giving up * add integration tests --- reflex/components/core/foreach.py | 14 ++++++++++++-- tests/integration/test_var_operations.py | 10 ++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/reflex/components/core/foreach.py b/reflex/components/core/foreach.py index e9222b200..13db48575 100644 --- a/reflex/components/core/foreach.py +++ b/reflex/components/core/foreach.py @@ -54,9 +54,10 @@ class Foreach(Component): TypeError: If the render function is a ComponentState. UntypedVarError: If the iterable is of type Any without a type annotation. """ - from reflex.vars.object import ObjectVar + from reflex.vars import ArrayVar, ObjectVar, StringVar + + iterable = LiteralVar.create(iterable).guess_type() - iterable = LiteralVar.create(iterable) if iterable._var_type == Any: raise ForeachVarError( f"Could not foreach over var `{iterable!s}` of type Any. " @@ -75,6 +76,15 @@ class Foreach(Component): if isinstance(iterable, ObjectVar): iterable = iterable.entries() + if isinstance(iterable, StringVar): + iterable = iterable.split() + + if not isinstance(iterable, ArrayVar): + raise ForeachVarError( + f"Could not foreach over var `{iterable!s}` of type {iterable._var_type}. " + "See https://reflex.dev/docs/library/dynamic-rendering/foreach/" + ) + component = cls( iterable=iterable, render_fn=render_fn, diff --git a/tests/integration/test_var_operations.py b/tests/integration/test_var_operations.py index 16885cd06..35763556a 100644 --- a/tests/integration/test_var_operations.py +++ b/tests/integration/test_var_operations.py @@ -628,6 +628,14 @@ def VarOperations(): ), id="dict_in_foreach3", ), + rx.box( + rx.foreach("abcdef", lambda x: rx.text.span(x + " ")), + id="str_in_foreach", + ), + rx.box( + rx.foreach(VarOperationState.str_var1, lambda x: rx.text.span(x + " ")), + id="str_var_in_foreach", + ), rx.box( rx.foreach( VarOperationState.people, @@ -844,6 +852,8 @@ def test_var_operations(driver, var_operations: AppHarness): ("dict_in_foreach1", "a1b2"), ("dict_in_foreach2", "12"), ("dict_in_foreach3", "1234"), + ("str_in_foreach", "a b c d e f"), + ("str_var_in_foreach", "f i r s t"), ("typed_dict_in_foreach", "Hello Alice33Hello Bob28"), ] From f3220470e8141a2017edb3a2183a78b30e0a903e Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 7 Feb 2025 14:20:29 -0800 Subject: [PATCH 097/144] fix dynamic icons for underscore and positional argument (#4767) * fix dynamic icons for underscore and positional argument * use no return --- reflex/components/core/sticky.py | 4 +-- reflex/components/lucide/icon.py | 14 ++++++-- reflex/vars/base.py | 34 ++++++++++++++----- reflex/vars/number.py | 2 +- reflex/vars/sequence.py | 31 +++++++++++++++-- .../components/datadisplay/test_shiki_code.py | 5 ++- tests/units/vars/test_object.py | 8 ++--- 7 files changed, 75 insertions(+), 23 deletions(-) diff --git a/reflex/components/core/sticky.py b/reflex/components/core/sticky.py index 162bab3cd..cbcec00a9 100644 --- a/reflex/components/core/sticky.py +++ b/reflex/components/core/sticky.py @@ -107,9 +107,7 @@ class StickyBadge(A): default=True, global_ref=False, ) - localhost_hostnames = Var.create( - ["localhost", "127.0.0.1", "[::1]"] - ).guess_type() + localhost_hostnames = Var.create(["localhost", "127.0.0.1", "[::1]"]) is_localhost_expr = localhost_hostnames.contains( Var("window.location.hostname", _var_type=str).guess_type(), ) diff --git a/reflex/components/lucide/icon.py b/reflex/components/lucide/icon.py index 6c7cbede7..269ef7f79 100644 --- a/reflex/components/lucide/icon.py +++ b/reflex/components/lucide/icon.py @@ -4,7 +4,7 @@ from reflex.components.component import Component from reflex.utils import format from reflex.utils.imports import ImportVar from reflex.vars.base import LiteralVar, Var -from reflex.vars.sequence import LiteralStringVar +from reflex.vars.sequence import LiteralStringVar, StringVar class LucideIconComponent(Component): @@ -40,7 +40,12 @@ class Icon(LucideIconComponent): The created component. """ if children: - if len(children) == 1 and isinstance(children[0], str): + if len(children) == 1: + child = Var.create(children[0]).guess_type() + if not isinstance(child, StringVar): + raise AttributeError( + f"Icon name must be a string, got {children[0]._var_type if isinstance(children[0], Var) else children[0]}" + ) props["tag"] = children[0] else: raise AttributeError( @@ -56,7 +61,10 @@ class Icon(LucideIconComponent): else: raise TypeError(f"Icon name must be a string, got {type(tag)}") elif isinstance(tag, Var): - return DynamicIcon.create(name=tag, **props) + tag_stringified = tag.guess_type() + if not isinstance(tag_stringified, StringVar): + raise TypeError(f"Icon name must be a string, got {tag._var_type}") + return DynamicIcon.create(name=tag_stringified.replace("_", "-"), **props) if ( not isinstance(tag, str) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index c9dd81986..0d8af8f3c 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -75,9 +75,9 @@ from reflex.utils.types import ( if TYPE_CHECKING: from reflex.state import BaseState - from .number import BooleanVar, NumberVar - from .object import ObjectVar - from .sequence import ArrayVar, StringVar + from .number import BooleanVar, LiteralBooleanVar, LiteralNumberVar, NumberVar + from .object import LiteralObjectVar, ObjectVar + from .sequence import ArrayVar, LiteralArrayVar, LiteralStringVar, StringVar VAR_TYPE = TypeVar("VAR_TYPE", covariant=True) @@ -573,13 +573,21 @@ class Var(Generic[VAR_TYPE]): return value_with_replaced + @overload + @classmethod + def create( # pyright: ignore[reportOverlappingOverload] + cls, + value: NoReturn, + _var_data: VarData | None = None, + ) -> Var[Any]: ... + @overload @classmethod def create( # pyright: ignore[reportOverlappingOverload] cls, value: bool, _var_data: VarData | None = None, - ) -> BooleanVar: ... + ) -> LiteralBooleanVar: ... @overload @classmethod @@ -587,7 +595,7 @@ class Var(Generic[VAR_TYPE]): cls, value: int, _var_data: VarData | None = None, - ) -> NumberVar[int]: ... + ) -> LiteralNumberVar[int]: ... @overload @classmethod @@ -595,7 +603,15 @@ class Var(Generic[VAR_TYPE]): cls, value: float, _var_data: VarData | None = None, - ) -> NumberVar[float]: ... + ) -> LiteralNumberVar[float]: ... + + @overload + @classmethod + def create( # pyright: ignore [reportOverlappingOverload] + cls, + value: str, + _var_data: VarData | None = None, + ) -> LiteralStringVar: ... @overload @classmethod @@ -611,7 +627,7 @@ class Var(Generic[VAR_TYPE]): cls, value: None, _var_data: VarData | None = None, - ) -> NoneVar: ... + ) -> LiteralNoneVar: ... @overload @classmethod @@ -619,7 +635,7 @@ class Var(Generic[VAR_TYPE]): cls, value: MAPPING_TYPE, _var_data: VarData | None = None, - ) -> ObjectVar[MAPPING_TYPE]: ... + ) -> LiteralObjectVar[MAPPING_TYPE]: ... @overload @classmethod @@ -627,7 +643,7 @@ class Var(Generic[VAR_TYPE]): cls, value: SEQUENCE_TYPE, _var_data: VarData | None = None, - ) -> ArrayVar[SEQUENCE_TYPE]: ... + ) -> LiteralArrayVar[SEQUENCE_TYPE]: ... @overload @classmethod diff --git a/reflex/vars/number.py b/reflex/vars/number.py index 35a55490a..87f1760a6 100644 --- a/reflex/vars/number.py +++ b/reflex/vars/number.py @@ -974,7 +974,7 @@ def boolean_not_operation(value: BooleanVar): frozen=True, slots=True, ) -class LiteralNumberVar(LiteralVar, NumberVar): +class LiteralNumberVar(LiteralVar, NumberVar[NUMBER_T]): """Base class for immutable literal number vars.""" _var_value: float | int = dataclasses.field(default=0) diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index fb797b4ec..0e7b082f9 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -372,6 +372,33 @@ class StringVar(Var[STRING_TYPE], python_types=str): return string_ge_operation(self, other) + @overload + def replace( # pyright: ignore [reportOverlappingOverload] + self, search_value: StringVar | str, new_value: StringVar | str + ) -> StringVar: ... + + @overload + def replace( + self, search_value: Any, new_value: Any + ) -> CustomVarOperationReturn[StringVar]: ... + + def replace(self, search_value: Any, new_value: Any) -> StringVar: # pyright: ignore [reportInconsistentOverload] + """Replace a string with a value. + + Args: + search_value: The string to search. + new_value: The value to be replaced with. + + Returns: + The string replace operation. + """ + if not isinstance(search_value, (StringVar, str)): + raise_unsupported_operand_types("replace", (type(self), type(search_value))) + if not isinstance(new_value, (StringVar, str)): + raise_unsupported_operand_types("replace", (type(self), type(new_value))) + + return string_replace_operation(self, search_value, new_value) + @var_operation def string_lt_operation(lhs: StringVar[Any] | str, rhs: StringVar[Any] | str): @@ -570,7 +597,7 @@ def array_join_operation(array: ArrayVar, sep: StringVar[Any] | str = ""): @var_operation def string_replace_operation( - string: StringVar, search_value: StringVar | str, new_value: StringVar | str + string: StringVar[Any], search_value: StringVar | str, new_value: StringVar | str ): """Replace a string with a value. @@ -583,7 +610,7 @@ def string_replace_operation( The string replace operation. """ return var_operation_return( - js_expression=f"{string}.replace({search_value}, {new_value})", + js_expression=f"{string}.replaceAll({search_value}, {new_value})", var_type=str, ) diff --git a/tests/units/components/datadisplay/test_shiki_code.py b/tests/units/components/datadisplay/test_shiki_code.py index cc05c35b0..e1c7984f1 100644 --- a/tests/units/components/datadisplay/test_shiki_code.py +++ b/tests/units/components/datadisplay/test_shiki_code.py @@ -11,6 +11,7 @@ from reflex.components.lucide.icon import Icon from reflex.components.radix.themes.layout.box import Box from reflex.style import Style from reflex.vars import Var +from reflex.vars.base import LiteralVar @pytest.mark.parametrize( @@ -99,7 +100,9 @@ def test_create_shiki_code_block( applied_styles = component.style for key, value in expected_styles.items(): - assert Var.create(applied_styles[key])._var_value == value + var = Var.create(applied_styles[key]) + assert isinstance(var, LiteralVar) + assert var._var_value == value @pytest.mark.parametrize( diff --git a/tests/units/vars/test_object.py b/tests/units/vars/test_object.py index 90e34be96..89ace55bb 100644 --- a/tests/units/vars/test_object.py +++ b/tests/units/vars/test_object.py @@ -74,11 +74,11 @@ class ObjectState(rx.State): @pytest.mark.parametrize("type_", [Base, Bare, SqlaModel, Dataclass]) -def test_var_create(type_: GenericType) -> None: +def test_var_create(type_: type[Base | Bare | SqlaModel | Dataclass]) -> None: my_object = type_() var = Var.create(my_object) assert var._var_type is type_ - + assert isinstance(var, ObjectVar) quantity = var.quantity assert quantity._var_type is int @@ -94,12 +94,12 @@ def test_literal_create(type_: GenericType) -> None: @pytest.mark.parametrize("type_", [Base, Bare, SqlaModel, Dataclass]) -def test_guess(type_: GenericType) -> None: +def test_guess(type_: type[Base | Bare | SqlaModel | Dataclass]) -> None: my_object = type_() var = Var.create(my_object) var = var.guess_type() assert var._var_type is type_ - + assert isinstance(var, ObjectVar) quantity = var.quantity assert quantity._var_type is int From c17cda3e951a54e47222a6eb75c6584a8b56491b Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 7 Feb 2025 14:57:12 -0800 Subject: [PATCH 098/144] Ensure EventCallback exposes EventActionsMixin properties (#4772) --- reflex/event.py | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/reflex/event.py b/reflex/event.py index f247047cf..c2eb8db3a 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -26,6 +26,7 @@ from typing import ( from typing_extensions import ( Protocol, + Self, TypeAliasType, TypedDict, TypeVar, @@ -110,7 +111,7 @@ class EventActionsMixin: event_actions: Dict[str, Union[bool, int]] = dataclasses.field(default_factory=dict) @property - def stop_propagation(self): + def stop_propagation(self) -> Self: """Stop the event from bubbling up the DOM tree. Returns: @@ -122,7 +123,7 @@ class EventActionsMixin: ) @property - def prevent_default(self): + def prevent_default(self) -> Self: """Prevent the default behavior of the event. Returns: @@ -133,7 +134,7 @@ class EventActionsMixin: event_actions={"preventDefault": True, **self.event_actions}, ) - def throttle(self, limit_ms: int): + def throttle(self, limit_ms: int) -> Self: """Throttle the event handler. Args: @@ -147,7 +148,7 @@ class EventActionsMixin: event_actions={"throttle": limit_ms, **self.event_actions}, ) - def debounce(self, delay_ms: int): + def debounce(self, delay_ms: int) -> Self: """Debounce the event handler. Args: @@ -162,7 +163,7 @@ class EventActionsMixin: ) @property - def temporal(self): + def temporal(self) -> Self: """Do not queue the event if the backend is down. Returns: @@ -1773,7 +1774,7 @@ V4 = TypeVar("V4") V5 = TypeVar("V5") -class EventCallback(Generic[Unpack[P]]): +class EventCallback(Generic[Unpack[P]], EventActionsMixin): """A descriptor that wraps a function to be used as an event.""" def __init__(self, func: Callable[[Any, Unpack[P]], Any]): @@ -1784,24 +1785,6 @@ class EventCallback(Generic[Unpack[P]]): """ self.func = func - @property - def prevent_default(self): - """Prevent default behavior. - - Returns: - The event callback with prevent default behavior. - """ - return self - - @property - def stop_propagation(self): - """Stop event propagation. - - Returns: - The event callback with stop propagation behavior. - """ - return self - @overload def __call__( self: EventCallback[Unpack[Q]], From 70920a64be4fb1b55827010f33a6117006c132e1 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 7 Feb 2025 14:59:22 -0800 Subject: [PATCH 099/144] Copy/update assets on compile (#4765) * Add path_ops.update_directory_tree: Copy missing and newer files from src to dest * add console.timing context Log debug messages with timing for different processes. * Update assets tree as app._compile step. If the assets change between hot reload, then update them before reloading (in case a CSS file was added or something). * Add timing for other app._compile events * Only copy assets if assets exist * Fix docstring for update_directory_tree --- reflex/app.py | 66 +++++++++++++++++++++++++++------------- reflex/utils/console.py | 19 ++++++++++++ reflex/utils/path_ops.py | 30 ++++++++++++++++++ 3 files changed, 94 insertions(+), 21 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index a3d0d8e10..18cce69d2 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -99,7 +99,15 @@ from reflex.state import ( _substate_key, code_uses_state_contexts, ) -from reflex.utils import codespaces, console, exceptions, format, prerequisites, types +from reflex.utils import ( + codespaces, + console, + exceptions, + format, + path_ops, + prerequisites, + types, +) from reflex.utils.exec import is_prod_mode, is_testing_env from reflex.utils.imports import ImportVar @@ -991,9 +999,10 @@ class App(MiddlewareMixin, LifespanMixin): should_compile = self._should_compile() if not should_compile: - for route in self._unevaluated_pages: - console.debug(f"Evaluating page: {route}") - self._compile_page(route, save_page=should_compile) + with console.timing("Evaluate Pages (Backend)"): + for route in self._unevaluated_pages: + console.debug(f"Evaluating page: {route}") + self._compile_page(route, save_page=should_compile) # Add the optional endpoints (_upload) self._add_optional_endpoints() @@ -1019,10 +1028,11 @@ class App(MiddlewareMixin, LifespanMixin): + adhoc_steps_without_executor, ) - for route in self._unevaluated_pages: - console.debug(f"Evaluating page: {route}") - self._compile_page(route, save_page=should_compile) - progress.advance(task) + with console.timing("Evaluate Pages (Frontend)"): + for route in self._unevaluated_pages: + console.debug(f"Evaluating page: {route}") + self._compile_page(route, save_page=should_compile) + progress.advance(task) # Add the optional endpoints (_upload) self._add_optional_endpoints() @@ -1057,13 +1067,13 @@ class App(MiddlewareMixin, LifespanMixin): custom_components |= component._get_all_custom_components() # Perform auto-memoization of stateful components. - ( - stateful_components_path, - stateful_components_code, - page_components, - ) = compiler.compile_stateful_components(self._pages.values()) - - progress.advance(task) + with console.timing("Auto-memoize StatefulComponents"): + ( + stateful_components_path, + stateful_components_code, + page_components, + ) = compiler.compile_stateful_components(self._pages.values()) + progress.advance(task) # Catch "static" apps (that do not define a rx.State subclass) which are trying to access rx.State. if code_uses_state_contexts(stateful_components_code) and self._state is None: @@ -1086,6 +1096,17 @@ class App(MiddlewareMixin, LifespanMixin): progress.advance(task) + # Copy the assets. + assets_src = Path.cwd() / constants.Dirs.APP_ASSETS + if assets_src.is_dir(): + with console.timing("Copy assets"): + path_ops.update_directory_tree( + src=assets_src, + dest=( + Path.cwd() / prerequisites.get_web_dir() / constants.Dirs.PUBLIC + ), + ) + # Use a forking process pool, if possible. Much faster, especially for large sites. # Fallback to ThreadPoolExecutor as something that will always work. executor = None @@ -1138,9 +1159,10 @@ class App(MiddlewareMixin, LifespanMixin): _submit_work(compiler.remove_tailwind_from_postcss) # Wait for all compilation tasks to complete. - for future in concurrent.futures.as_completed(result_futures): - compile_results.append(future.result()) - progress.advance(task) + with console.timing("Compile to Javascript"): + for future in concurrent.futures.as_completed(result_futures): + compile_results.append(future.result()) + progress.advance(task) app_root = self._app_root(app_wrappers=app_wrappers) @@ -1175,7 +1197,8 @@ class App(MiddlewareMixin, LifespanMixin): progress.stop() # Install frontend packages. - self._get_frontend_packages(all_imports) + with console.timing("Install Frontend Packages"): + self._get_frontend_packages(all_imports) # Setup the next.config.js transpile_packages = [ @@ -1201,8 +1224,9 @@ class App(MiddlewareMixin, LifespanMixin): # Remove pages that are no longer in the app. p.unlink() - for output_path, code in compile_results: - compiler_utils.write_page(output_path, code) + with console.timing("Write to Disk"): + for output_path, code in compile_results: + compiler_utils.write_page(output_path, code) @contextlib.asynccontextmanager async def modify_state(self, token: str) -> AsyncIterator[BaseState]: diff --git a/reflex/utils/console.py b/reflex/utils/console.py index d5b7a0d6e..5c47eee6f 100644 --- a/reflex/utils/console.py +++ b/reflex/utils/console.py @@ -2,8 +2,10 @@ from __future__ import annotations +import contextlib import inspect import shutil +import time from pathlib import Path from types import FrameType @@ -317,3 +319,20 @@ def status(*args, **kwargs): A new status. """ return _console.status(*args, **kwargs) + + +@contextlib.contextmanager +def timing(msg: str): + """Create a context manager to time a block of code. + + Args: + msg: The message to display. + + Yields: + None. + """ + start = time.time() + try: + yield + finally: + debug(f"[white]\\[timing] {msg}: {time.time() - start:.2f}s[/white]") diff --git a/reflex/utils/path_ops.py b/reflex/utils/path_ops.py index 07a541201..92557d801 100644 --- a/reflex/utils/path_ops.py +++ b/reflex/utils/path_ops.py @@ -260,3 +260,33 @@ def find_replace(directory: str | Path, find: str, replace: str): text = filepath.read_text(encoding="utf-8") text = re.sub(find, replace, text) filepath.write_text(text, encoding="utf-8") + + +def update_directory_tree(src: Path, dest: Path): + """Recursively copies a directory tree from src to dest. + Only copies files if the destination file is missing or modified earlier than the source file. + + Args: + src: Source directory + dest: Destination directory + + Raises: + ValueError: If the source is not a directory + """ + if not src.is_dir(): + raise ValueError(f"Source {src} is not a directory") + + # Ensure the destination directory exists + dest.mkdir(parents=True, exist_ok=True) + + for item in src.iterdir(): + dest_item = dest / item.name + + if item.is_dir(): + # Recursively copy subdirectories + update_directory_tree(item, dest_item) + elif item.is_file() and ( + not dest_item.exists() or item.stat().st_mtime > dest_item.stat().st_mtime + ): + # Copy file if it doesn't exist in the destination or is older than the source + shutil.copy2(item, dest_item) From ee731a908d0da39aae651d60f034d6a4a77350bb Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Fri, 7 Feb 2025 17:19:28 -0800 Subject: [PATCH 100/144] provide plotly subpackages (#4776) --- reflex/compiler/utils.py | 34 +- reflex/components/plotly/__init__.py | 31 +- reflex/components/plotly/plotly.py | 235 ++++++++ reflex/components/plotly/plotly.pyi | 765 +++++++++++++++++++++++++++ reflex/utils/imports.py | 3 + 5 files changed, 1054 insertions(+), 14 deletions(-) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index c797a095f..91ee18b86 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -119,24 +119,34 @@ def compile_imports(import_dict: ParsedImportDict) -> list[dict]: validate_imports(collapsed_import_dict) import_dicts = [] for lib, fields in collapsed_import_dict.items(): - default, rest = compile_import_statement(fields) - # prevent lib from being rendered on the page if all imports are non rendered kind if not any(f.render for f in fields): continue - if not lib: - if default: - raise ValueError("No default field allowed for empty library.") - if rest is None or len(rest) == 0: - raise ValueError("No fields to import.") - import_dicts.extend(get_import_dict(module) for module in sorted(rest)) - continue + lib_paths: dict[str, list[ImportVar]] = {} - # remove the version before rendering the package imports - lib = format.format_library_name(lib) + for field in fields: + lib_paths.setdefault(field.package_path, []).append(field) - import_dicts.append(get_import_dict(lib, default, rest)) + compiled = { + path: compile_import_statement(fields) for path, fields in lib_paths.items() + } + + for path, (default, rest) in compiled.items(): + if not lib: + if default: + raise ValueError("No default field allowed for empty library.") + if rest is None or len(rest) == 0: + raise ValueError("No fields to import.") + import_dicts.extend(get_import_dict(module) for module in sorted(rest)) + continue + + # remove the version before rendering the package imports + formatted_lib = format.format_library_name(lib) + ( + path if path != "/" else "" + ) + + import_dicts.append(get_import_dict(formatted_lib, default, rest)) return import_dicts diff --git a/reflex/components/plotly/__init__.py b/reflex/components/plotly/__init__.py index 5620d5fc4..8743b31b2 100644 --- a/reflex/components/plotly/__init__.py +++ b/reflex/components/plotly/__init__.py @@ -1,5 +1,32 @@ """Plotly components.""" -from .plotly import Plotly +from reflex.components.component import ComponentNamespace -plotly = Plotly.create +from .plotly import ( + Plotly, + PlotlyBasic, + PlotlyCartesian, + PlotlyFinance, + PlotlyGeo, + PlotlyGl2d, + PlotlyGl3d, + PlotlyMapbox, + PlotlyStrict, +) + + +class PlotlyNamespace(ComponentNamespace): + """Plotly namespace.""" + + __call__ = Plotly.create + basic = PlotlyBasic.create + cartesian = PlotlyCartesian.create + geo = PlotlyGeo.create + gl2d = PlotlyGl2d.create + gl3d = PlotlyGl3d.create + finance = PlotlyFinance.create + mapbox = PlotlyMapbox.create + strict = PlotlyStrict.create + + +plotly = PlotlyNamespace() diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py index c85423d35..2ddaad8d7 100644 --- a/reflex/components/plotly/plotly.py +++ b/reflex/components/plotly/plotly.py @@ -10,6 +10,7 @@ from reflex.components.component import Component, NoSSRComponent from reflex.components.core.cond import color_mode_cond from reflex.event import EventHandler, no_args_event_spec from reflex.utils import console +from reflex.utils.imports import ImportDict, ImportVar from reflex.vars.base import LiteralVar, Var try: @@ -278,3 +279,237 @@ const extractPoints = (points) => { # Spread the figure dict over props, nothing to merge. tag.special_props.append(Var(_js_expr=f"{{...{figure!s}}}")) return tag + + +CREATE_PLOTLY_COMPONENT: ImportDict = { + "react-plotly.js": [ + ImportVar( + tag="createPlotlyComponent", + is_default=True, + package_path="/factory", + ), + ] +} + + +def dynamic_plotly_import(name: str, package: str) -> str: + """Create a dynamic import for a plotly component. + + Args: + name: The name of the component. + package: The package path of the component. + + Returns: + The dynamic import for the plotly component. + """ + return f""" +const {name} = dynamic(() => import('{package}').then(mod => createPlotlyComponent(mod)), {{ssr: false}}) +""" + + +class PlotlyBasic(Plotly): + """Display a basic plotly graph.""" + + tag: str = "BasicPlotlyPlot" + + library = "react-plotly.js@2.6.0" + + lib_dependencies: list[str] = ["plotly.js-basic-dist-min@3.0.0"] + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports for the plotly basic component. + + Returns: + The imports for the plotly basic component. + """ + return CREATE_PLOTLY_COMPONENT + + def _get_dynamic_imports(self) -> str: + """Get the dynamic imports for the plotly basic component. + + Returns: + The dynamic imports for the plotly basic component. + """ + return dynamic_plotly_import(self.tag, "plotly.js-basic-dist-min") + + +class PlotlyCartesian(Plotly): + """Display a plotly cartesian graph.""" + + tag: str = "CartesianPlotlyPlot" + + library = "react-plotly.js@2.6.0" + + lib_dependencies: list[str] = ["plotly.js-cartesian-dist-min@3.0.0"] + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports for the plotly cartesian component. + + Returns: + The imports for the plotly cartesian component. + """ + return CREATE_PLOTLY_COMPONENT + + def _get_dynamic_imports(self) -> str: + """Get the dynamic imports for the plotly cartesian component. + + Returns: + The dynamic imports for the plotly cartesian component. + """ + return dynamic_plotly_import(self.tag, "plotly.js-cartesian-dist-min") + + +class PlotlyGeo(Plotly): + """Display a plotly geo graph.""" + + tag: str = "GeoPlotlyPlot" + + library = "react-plotly.js@2.6.0" + + lib_dependencies: list[str] = ["plotly.js-geo-dist-min@3.0.0"] + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports for the plotly geo component. + + Returns: + The imports for the plotly geo component. + """ + return CREATE_PLOTLY_COMPONENT + + def _get_dynamic_imports(self) -> str: + """Get the dynamic imports for the plotly geo component. + + Returns: + The dynamic imports for the plotly geo component. + """ + return dynamic_plotly_import(self.tag, "plotly.js-geo-dist-min") + + +class PlotlyGl3d(Plotly): + """Display a plotly 3d graph.""" + + tag: str = "Gl3dPlotlyPlot" + + library = "react-plotly.js@2.6.0" + + lib_dependencies: list[str] = ["plotly.js-gl3d-dist-min@3.0.0"] + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports for the plotly 3d component. + + Returns: + The imports for the plotly 3d component. + """ + return CREATE_PLOTLY_COMPONENT + + def _get_dynamic_imports(self) -> str: + """Get the dynamic imports for the plotly 3d component. + + Returns: + The dynamic imports for the plotly 3d component. + """ + return dynamic_plotly_import(self.tag, "plotly.js-gl3d-dist-min") + + +class PlotlyGl2d(Plotly): + """Display a plotly 2d graph.""" + + tag: str = "Gl2dPlotlyPlot" + + library = "react-plotly.js@2.6.0" + + lib_dependencies: list[str] = ["plotly.js-gl2d-dist-min@3.0.0"] + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports for the plotly 2d component. + + Returns: + The imports for the plotly 2d component. + """ + return CREATE_PLOTLY_COMPONENT + + def _get_dynamic_imports(self) -> str: + """Get the dynamic imports for the plotly 2d component. + + Returns: + The dynamic imports for the plotly 2d component. + """ + return dynamic_plotly_import(self.tag, "plotly.js-gl2d-dist-min") + + +class PlotlyMapbox(Plotly): + """Display a plotly mapbox graph.""" + + tag: str = "MapboxPlotlyPlot" + + library = "react-plotly.js@2.6.0" + + lib_dependencies: list[str] = ["plotly.js-mapbox-dist-min@3.0.0"] + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports for the plotly mapbox component. + + Returns: + The imports for the plotly mapbox component. + """ + return CREATE_PLOTLY_COMPONENT + + def _get_dynamic_imports(self) -> str: + """Get the dynamic imports for the plotly mapbox component. + + Returns: + The dynamic imports for the plotly mapbox component. + """ + return dynamic_plotly_import(self.tag, "plotly.js-mapbox-dist-min") + + +class PlotlyFinance(Plotly): + """Display a plotly finance graph.""" + + tag: str = "FinancePlotlyPlot" + + library = "react-plotly.js@2.6.0" + + lib_dependencies: list[str] = ["plotly.js-finance-dist-min@3.0.0"] + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports for the plotly finance component. + + Returns: + The imports for the plotly finance component. + """ + return CREATE_PLOTLY_COMPONENT + + def _get_dynamic_imports(self) -> str: + """Get the dynamic imports for the plotly finance component. + + Returns: + The dynamic imports for the plotly finance component. + """ + return dynamic_plotly_import(self.tag, "plotly.js-finance-dist-min") + + +class PlotlyStrict(Plotly): + """Display a plotly strict graph.""" + + tag: str = "StrictPlotlyPlot" + + library = "react-plotly.js@2.6.0" + + lib_dependencies: list[str] = ["plotly.js-strict-dist-min@3.0.0"] + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports for the plotly strict component. + + Returns: + The imports for the plotly strict component. + """ + return CREATE_PLOTLY_COMPONENT + + def _get_dynamic_imports(self) -> str: + """Get the dynamic imports for the plotly strict component. + + Returns: + The dynamic imports for the plotly strict component. + """ + return dynamic_plotly_import(self.tag, "plotly.js-strict-dist-min") diff --git a/reflex/components/plotly/plotly.pyi b/reflex/components/plotly/plotly.pyi index f60e5a6a4..c4d8bf64a 100644 --- a/reflex/components/plotly/plotly.pyi +++ b/reflex/components/plotly/plotly.pyi @@ -11,6 +11,7 @@ from reflex.components.component import NoSSRComponent from reflex.event import EventType from reflex.style import Style from reflex.utils import console +from reflex.utils.imports import ImportDict from reflex.vars.base import Var try: @@ -141,3 +142,767 @@ class Plotly(NoSSRComponent): The Plotly component. """ ... + +CREATE_PLOTLY_COMPONENT: ImportDict + +def dynamic_plotly_import(name: str, package: str) -> str: ... + +class PlotlyBasic(Plotly): + def add_imports(self) -> ImportDict | list[ImportDict]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore + layout: Optional[Union[Dict, Var[Dict]]] = None, + template: Optional[Union[Template, Var[Template]]] = None, # type: ignore + config: Optional[Union[Dict, Var[Dict]]] = None, + use_resize_handler: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "PlotlyBasic": + """Create the Plotly component. + + Args: + *children: The children of the component. + data: The figure to display. This can be a plotly figure or a plotly data json. + layout: The layout of the graph. + template: The template for visual appearance of the graph. + config: The config of the graph. + use_resize_handler: If true, the graph will resize when the window is resized. + on_after_plot: Fired after the plot is redrawn. + on_animated: Fired after the plot was animated. + on_animating_frame: Fired while animating a single frame (does not currently pass data through). + on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example). + on_autosize: Fired when the plot is responsively sized. + on_before_hover: Fired whenever mouse moves over a plot. + on_button_clicked: Fired when a plotly UI button is clicked. + on_click: Fired when the plot is clicked. + on_deselect: Fired when a selection is cleared (via double click). + on_double_click: Fired when the plot is double clicked. + on_hover: Fired when a plot element is hovered over. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. + on_restyle: Fired after the plot style is changed. + on_redraw: Fired after the plot is redrawn. + on_selected: Fired after selecting plot elements. + on_selecting: Fired while dragging a selection. + on_transitioning: Fired while an animation is occurring. + on_transition_interrupted: Fired when a transition is stopped early. + on_unhover: Fired when a hovered element is no longer hovered. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Plotly component. + """ + ... + +class PlotlyCartesian(Plotly): + def add_imports(self) -> ImportDict | list[ImportDict]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore + layout: Optional[Union[Dict, Var[Dict]]] = None, + template: Optional[Union[Template, Var[Template]]] = None, # type: ignore + config: Optional[Union[Dict, Var[Dict]]] = None, + use_resize_handler: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "PlotlyCartesian": + """Create the Plotly component. + + Args: + *children: The children of the component. + data: The figure to display. This can be a plotly figure or a plotly data json. + layout: The layout of the graph. + template: The template for visual appearance of the graph. + config: The config of the graph. + use_resize_handler: If true, the graph will resize when the window is resized. + on_after_plot: Fired after the plot is redrawn. + on_animated: Fired after the plot was animated. + on_animating_frame: Fired while animating a single frame (does not currently pass data through). + on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example). + on_autosize: Fired when the plot is responsively sized. + on_before_hover: Fired whenever mouse moves over a plot. + on_button_clicked: Fired when a plotly UI button is clicked. + on_click: Fired when the plot is clicked. + on_deselect: Fired when a selection is cleared (via double click). + on_double_click: Fired when the plot is double clicked. + on_hover: Fired when a plot element is hovered over. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. + on_restyle: Fired after the plot style is changed. + on_redraw: Fired after the plot is redrawn. + on_selected: Fired after selecting plot elements. + on_selecting: Fired while dragging a selection. + on_transitioning: Fired while an animation is occurring. + on_transition_interrupted: Fired when a transition is stopped early. + on_unhover: Fired when a hovered element is no longer hovered. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Plotly component. + """ + ... + +class PlotlyGeo(Plotly): + def add_imports(self) -> ImportDict | list[ImportDict]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore + layout: Optional[Union[Dict, Var[Dict]]] = None, + template: Optional[Union[Template, Var[Template]]] = None, # type: ignore + config: Optional[Union[Dict, Var[Dict]]] = None, + use_resize_handler: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "PlotlyGeo": + """Create the Plotly component. + + Args: + *children: The children of the component. + data: The figure to display. This can be a plotly figure or a plotly data json. + layout: The layout of the graph. + template: The template for visual appearance of the graph. + config: The config of the graph. + use_resize_handler: If true, the graph will resize when the window is resized. + on_after_plot: Fired after the plot is redrawn. + on_animated: Fired after the plot was animated. + on_animating_frame: Fired while animating a single frame (does not currently pass data through). + on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example). + on_autosize: Fired when the plot is responsively sized. + on_before_hover: Fired whenever mouse moves over a plot. + on_button_clicked: Fired when a plotly UI button is clicked. + on_click: Fired when the plot is clicked. + on_deselect: Fired when a selection is cleared (via double click). + on_double_click: Fired when the plot is double clicked. + on_hover: Fired when a plot element is hovered over. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. + on_restyle: Fired after the plot style is changed. + on_redraw: Fired after the plot is redrawn. + on_selected: Fired after selecting plot elements. + on_selecting: Fired while dragging a selection. + on_transitioning: Fired while an animation is occurring. + on_transition_interrupted: Fired when a transition is stopped early. + on_unhover: Fired when a hovered element is no longer hovered. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Plotly component. + """ + ... + +class PlotlyGl3d(Plotly): + def add_imports(self) -> ImportDict | list[ImportDict]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore + layout: Optional[Union[Dict, Var[Dict]]] = None, + template: Optional[Union[Template, Var[Template]]] = None, # type: ignore + config: Optional[Union[Dict, Var[Dict]]] = None, + use_resize_handler: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "PlotlyGl3d": + """Create the Plotly component. + + Args: + *children: The children of the component. + data: The figure to display. This can be a plotly figure or a plotly data json. + layout: The layout of the graph. + template: The template for visual appearance of the graph. + config: The config of the graph. + use_resize_handler: If true, the graph will resize when the window is resized. + on_after_plot: Fired after the plot is redrawn. + on_animated: Fired after the plot was animated. + on_animating_frame: Fired while animating a single frame (does not currently pass data through). + on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example). + on_autosize: Fired when the plot is responsively sized. + on_before_hover: Fired whenever mouse moves over a plot. + on_button_clicked: Fired when a plotly UI button is clicked. + on_click: Fired when the plot is clicked. + on_deselect: Fired when a selection is cleared (via double click). + on_double_click: Fired when the plot is double clicked. + on_hover: Fired when a plot element is hovered over. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. + on_restyle: Fired after the plot style is changed. + on_redraw: Fired after the plot is redrawn. + on_selected: Fired after selecting plot elements. + on_selecting: Fired while dragging a selection. + on_transitioning: Fired while an animation is occurring. + on_transition_interrupted: Fired when a transition is stopped early. + on_unhover: Fired when a hovered element is no longer hovered. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Plotly component. + """ + ... + +class PlotlyGl2d(Plotly): + def add_imports(self) -> ImportDict | list[ImportDict]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore + layout: Optional[Union[Dict, Var[Dict]]] = None, + template: Optional[Union[Template, Var[Template]]] = None, # type: ignore + config: Optional[Union[Dict, Var[Dict]]] = None, + use_resize_handler: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "PlotlyGl2d": + """Create the Plotly component. + + Args: + *children: The children of the component. + data: The figure to display. This can be a plotly figure or a plotly data json. + layout: The layout of the graph. + template: The template for visual appearance of the graph. + config: The config of the graph. + use_resize_handler: If true, the graph will resize when the window is resized. + on_after_plot: Fired after the plot is redrawn. + on_animated: Fired after the plot was animated. + on_animating_frame: Fired while animating a single frame (does not currently pass data through). + on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example). + on_autosize: Fired when the plot is responsively sized. + on_before_hover: Fired whenever mouse moves over a plot. + on_button_clicked: Fired when a plotly UI button is clicked. + on_click: Fired when the plot is clicked. + on_deselect: Fired when a selection is cleared (via double click). + on_double_click: Fired when the plot is double clicked. + on_hover: Fired when a plot element is hovered over. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. + on_restyle: Fired after the plot style is changed. + on_redraw: Fired after the plot is redrawn. + on_selected: Fired after selecting plot elements. + on_selecting: Fired while dragging a selection. + on_transitioning: Fired while an animation is occurring. + on_transition_interrupted: Fired when a transition is stopped early. + on_unhover: Fired when a hovered element is no longer hovered. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Plotly component. + """ + ... + +class PlotlyMapbox(Plotly): + def add_imports(self) -> ImportDict | list[ImportDict]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore + layout: Optional[Union[Dict, Var[Dict]]] = None, + template: Optional[Union[Template, Var[Template]]] = None, # type: ignore + config: Optional[Union[Dict, Var[Dict]]] = None, + use_resize_handler: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "PlotlyMapbox": + """Create the Plotly component. + + Args: + *children: The children of the component. + data: The figure to display. This can be a plotly figure or a plotly data json. + layout: The layout of the graph. + template: The template for visual appearance of the graph. + config: The config of the graph. + use_resize_handler: If true, the graph will resize when the window is resized. + on_after_plot: Fired after the plot is redrawn. + on_animated: Fired after the plot was animated. + on_animating_frame: Fired while animating a single frame (does not currently pass data through). + on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example). + on_autosize: Fired when the plot is responsively sized. + on_before_hover: Fired whenever mouse moves over a plot. + on_button_clicked: Fired when a plotly UI button is clicked. + on_click: Fired when the plot is clicked. + on_deselect: Fired when a selection is cleared (via double click). + on_double_click: Fired when the plot is double clicked. + on_hover: Fired when a plot element is hovered over. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. + on_restyle: Fired after the plot style is changed. + on_redraw: Fired after the plot is redrawn. + on_selected: Fired after selecting plot elements. + on_selecting: Fired while dragging a selection. + on_transitioning: Fired while an animation is occurring. + on_transition_interrupted: Fired when a transition is stopped early. + on_unhover: Fired when a hovered element is no longer hovered. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Plotly component. + """ + ... + +class PlotlyFinance(Plotly): + def add_imports(self) -> ImportDict | list[ImportDict]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore + layout: Optional[Union[Dict, Var[Dict]]] = None, + template: Optional[Union[Template, Var[Template]]] = None, # type: ignore + config: Optional[Union[Dict, Var[Dict]]] = None, + use_resize_handler: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "PlotlyFinance": + """Create the Plotly component. + + Args: + *children: The children of the component. + data: The figure to display. This can be a plotly figure or a plotly data json. + layout: The layout of the graph. + template: The template for visual appearance of the graph. + config: The config of the graph. + use_resize_handler: If true, the graph will resize when the window is resized. + on_after_plot: Fired after the plot is redrawn. + on_animated: Fired after the plot was animated. + on_animating_frame: Fired while animating a single frame (does not currently pass data through). + on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example). + on_autosize: Fired when the plot is responsively sized. + on_before_hover: Fired whenever mouse moves over a plot. + on_button_clicked: Fired when a plotly UI button is clicked. + on_click: Fired when the plot is clicked. + on_deselect: Fired when a selection is cleared (via double click). + on_double_click: Fired when the plot is double clicked. + on_hover: Fired when a plot element is hovered over. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. + on_restyle: Fired after the plot style is changed. + on_redraw: Fired after the plot is redrawn. + on_selected: Fired after selecting plot elements. + on_selecting: Fired while dragging a selection. + on_transitioning: Fired while an animation is occurring. + on_transition_interrupted: Fired when a transition is stopped early. + on_unhover: Fired when a hovered element is no longer hovered. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Plotly component. + """ + ... + +class PlotlyStrict(Plotly): + def add_imports(self) -> ImportDict | list[ImportDict]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore + layout: Optional[Union[Dict, Var[Dict]]] = None, + template: Optional[Union[Template, Var[Template]]] = None, # type: ignore + config: Optional[Union[Dict, Var[Dict]]] = None, + use_resize_handler: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_after_plot: Optional[EventType[()]] = None, + on_animated: Optional[EventType[()]] = None, + on_animating_frame: Optional[EventType[()]] = None, + on_animation_interrupted: Optional[EventType[()]] = None, + on_autosize: Optional[EventType[()]] = None, + on_before_hover: Optional[EventType[()]] = None, + on_blur: Optional[EventType[()]] = None, + on_button_clicked: Optional[EventType[()]] = None, + on_click: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_deselect: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_hover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_redraw: Optional[EventType[()]] = None, + on_relayout: Optional[EventType[()]] = None, + on_relayouting: Optional[EventType[()]] = None, + on_restyle: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_selected: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_transition_interrupted: Optional[EventType[()]] = None, + on_transitioning: Optional[EventType[()]] = None, + on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "PlotlyStrict": + """Create the Plotly component. + + Args: + *children: The children of the component. + data: The figure to display. This can be a plotly figure or a plotly data json. + layout: The layout of the graph. + template: The template for visual appearance of the graph. + config: The config of the graph. + use_resize_handler: If true, the graph will resize when the window is resized. + on_after_plot: Fired after the plot is redrawn. + on_animated: Fired after the plot was animated. + on_animating_frame: Fired while animating a single frame (does not currently pass data through). + on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example). + on_autosize: Fired when the plot is responsively sized. + on_before_hover: Fired whenever mouse moves over a plot. + on_button_clicked: Fired when a plotly UI button is clicked. + on_click: Fired when the plot is clicked. + on_deselect: Fired when a selection is cleared (via double click). + on_double_click: Fired when the plot is double clicked. + on_hover: Fired when a plot element is hovered over. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. + on_restyle: Fired after the plot style is changed. + on_redraw: Fired after the plot is redrawn. + on_selected: Fired after selecting plot elements. + on_selecting: Fired while dragging a selection. + on_transitioning: Fired while an animation is occurring. + on_transition_interrupted: Fired when a transition is stopped early. + on_unhover: Fired when a hovered element is no longer hovered. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Plotly component. + """ + ... diff --git a/reflex/utils/imports.py b/reflex/utils/imports.py index 46e8e7362..66ae4b023 100644 --- a/reflex/utils/imports.py +++ b/reflex/utils/imports.py @@ -109,6 +109,9 @@ class ImportVar: # whether this import should be rendered or not render: Optional[bool] = True + # The path of the package to import from. + package_path: str = "/" + # whether this import package should be added to transpilePackages in next.config.js # https://nextjs.org/docs/app/api-reference/next-config-js/transpilePackages transpile: Optional[bool] = False From 3de04156e9da1ccbbbb80a7be170e9d7ffe319f4 Mon Sep 17 00:00:00 2001 From: Simon Young <40179067+Kastier1@users.noreply.github.com> Date: Fri, 7 Feb 2025 17:20:35 -0800 Subject: [PATCH 101/144] allow gunicorn worker to be disabled (#4774) * allow gunicorn worker to be disabled * allow gunicorn worker to be disabled * rewrite the command --------- Co-authored-by: Khaleel Al-Adhami --- reflex/config.py | 2 +- reflex/utils/exec.py | 47 +++++++++++++++++++++++++++++--------------- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/reflex/config.py b/reflex/config.py index f3d40dc37..dbc88619b 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -679,7 +679,7 @@ class Config(Base): # Number of gunicorn workers from user gunicorn_workers: Optional[int] = None - # Number of requests before a worker is restarted + # Number of requests before a worker is restarted; set to 0 to disable gunicorn_max_requests: int = 100 # Variance limit for max requests; gunicorn only diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 67df7ea91..de326dacc 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -368,34 +368,49 @@ def run_uvicorn_backend_prod(host: str, port: int, loglevel: LogLevel): app_module = get_app_module() - run_backend_prod = f"gunicorn --worker-class {config.gunicorn_worker_class} --max-requests {config.gunicorn_max_requests} --max-requests-jitter {config.gunicorn_max_requests_jitter} --preload --timeout {config.timeout} --log-level critical".split() - run_backend_prod_windows = f"uvicorn --limit-max-requests {config.gunicorn_max_requests} --timeout-keep-alive {config.timeout}".split() command = ( [ - *run_backend_prod_windows, - "--host", - host, - "--port", - str(port), + "uvicorn", + *( + [ + "--limit-max-requests", + str(config.gunicorn_max_requests), + ] + if config.gunicorn_max_requests > 0 + else [] + ), + *("--timeout-keep-alive", str(config.timeout)), + *("--host", host), + *("--port", str(port)), + *("--workers", str(_get_backend_workers())), app_module, ] if constants.IS_WINDOWS else [ - *run_backend_prod, - "--bind", - f"{host}:{port}", - "--threads", - str(_get_backend_workers()), + "gunicorn", + *("--worker-class", config.gunicorn_worker_class), + *( + [ + "--max-requests", + str(config.gunicorn_max_requests), + "--max-requests-jitter", + str(config.gunicorn_max_requests_jitter), + ] + if config.gunicorn_max_requests > 0 + else [] + ), + "--preload", + *("--timeout", str(config.timeout)), + *("--bind", f"{host}:{port}"), + *("--threads", str(_get_backend_workers())), f"{app_module}()", ] ) command += [ - "--log-level", - loglevel.value, - "--workers", - str(_get_backend_workers()), + *("--log-level", loglevel.value), ] + processes.new_process( command, run=True, From 8b2c7291d3ed605fc1cd82192555ac76ac8b76d3 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 7 Feb 2025 17:38:42 -0800 Subject: [PATCH 102/144] Add ComputedVar overloads for BASE_TYPE, SQLA_TYPE, and DATACLASS_TYPE (#4777) Allow typing to find __getattr__ for rx.var that returns an object-like model. --- reflex/vars/base.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 0d8af8f3c..a24db4010 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -2254,6 +2254,27 @@ class ComputedVar(Var[RETURN_TYPE]): owner: Type, ) -> ArrayVar[tuple[LIST_INSIDE, ...]]: ... + @overload + def __get__( + self: ComputedVar[BASE_TYPE], + instance: None, + owner: Type, + ) -> ObjectVar[BASE_TYPE]: ... + + @overload + def __get__( + self: ComputedVar[SQLA_TYPE], + instance: None, + owner: Type, + ) -> ObjectVar[SQLA_TYPE]: ... + + if TYPE_CHECKING: + + @overload + def __get__( + self: ComputedVar[DATACLASS_TYPE], instance: None, owner: Any + ) -> ObjectVar[DATACLASS_TYPE]: ... + @overload def __get__(self, instance: None, owner: Type) -> ComputedVar[RETURN_TYPE]: ... @@ -2500,6 +2521,27 @@ class AsyncComputedVar(ComputedVar[RETURN_TYPE]): owner: Type, ) -> ArrayVar[tuple[LIST_INSIDE, ...]]: ... + @overload + def __get__( + self: AsyncComputedVar[BASE_TYPE], + instance: None, + owner: Type, + ) -> ObjectVar[BASE_TYPE]: ... + + @overload + def __get__( + self: AsyncComputedVar[SQLA_TYPE], + instance: None, + owner: Type, + ) -> ObjectVar[SQLA_TYPE]: ... + + if TYPE_CHECKING: + + @overload + def __get__( + self: AsyncComputedVar[DATACLASS_TYPE], instance: None, owner: Any + ) -> ObjectVar[DATACLASS_TYPE]: ... + @overload def __get__(self, instance: None, owner: Type) -> AsyncComputedVar[RETURN_TYPE]: ... From 3a02d03cb1b9d78ff8ad221e95aa38fbe1e867f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Mon, 10 Feb 2025 20:44:44 +0100 Subject: [PATCH 103/144] fix bun path handling and add a test (#4785) * fix bun path handling and add a test * fix flags * fix tests * fix unit tests and mock object * fix units test again * revert some changes for now * remove unused test --- reflex/reflex.py | 21 ++++++++++++++------- reflex/utils/path_ops.py | 16 ++++++++++++++++ reflex/utils/prerequisites.py | 22 ++++++++++++++++++++-- tests/units/utils/test_utils.py | 19 ++++++++++++++++--- 4 files changed, 66 insertions(+), 12 deletions(-) diff --git a/reflex/reflex.py b/reflex/reflex.py index 70aa16a05..e4be0c89a 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -145,10 +145,7 @@ def _run( exec.output_system_info() # If no --frontend-only and no --backend-only, then turn on frontend and backend both - if not frontend and not backend: - frontend = True - backend = True - + frontend, backend = prerequisites.check_running_mode(frontend, backend) if not frontend and backend: _skip_compile() @@ -306,10 +303,18 @@ def export( True, "--no-zip", help="Disable zip for backend and frontend exports." ), frontend: bool = typer.Option( - True, "--backend-only", help="Export only backend.", show_default=False + False, + "--frontend-only", + help="Export only frontend.", + show_default=False, + envvar=environment.REFLEX_FRONTEND_ONLY.name, ), backend: bool = typer.Option( - True, "--frontend-only", help="Export only frontend.", show_default=False + False, + "--backend-only", + help="Export only backend.", + show_default=False, + envvar=environment.REFLEX_BACKEND_ONLY.name, ), zip_dest_dir: str = typer.Option( str(Path.cwd()), @@ -332,7 +337,9 @@ def export( from reflex.utils import export as export_utils from reflex.utils import prerequisites - if prerequisites.needs_reinit(frontend=True): + frontend, backend = prerequisites.check_running_mode(frontend, backend) + + if prerequisites.needs_reinit(frontend=frontend or not backend): _init(name=config.app_name, loglevel=loglevel) if frontend and not config.show_built_with_reflex: diff --git a/reflex/utils/path_ops.py b/reflex/utils/path_ops.py index 92557d801..dae938316 100644 --- a/reflex/utils/path_ops.py +++ b/reflex/utils/path_ops.py @@ -262,6 +262,22 @@ def find_replace(directory: str | Path, find: str, replace: str): filepath.write_text(text, encoding="utf-8") +def samefile(file1: Path, file2: Path) -> bool: + """Check if two files are the same. + + Args: + file1: The first file. + file2: The second file. + + Returns: + Whether the files are the same. If either file does not exist, returns False. + """ + if file1.exists() and file2.exists(): + return file1.samefile(file2) + + return False + + def update_directory_tree(src: Path, dest: Path): """Recursively copies a directory tree from src to dest. Only copies files if the destination file is missing or modified earlier than the source file. diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 6c6d34923..8047e1256 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -1225,6 +1225,21 @@ def install_frontend_packages(packages: set[str], config: Config): ) +def check_running_mode(frontend: bool, backend: bool) -> tuple[bool, bool]: + """Check if the app is running in frontend or backend mode. + + Args: + frontend: Whether to run the frontend of the app. + backend: Whether to run the backend of the app. + + Returns: + The running modes. + """ + if not frontend and not backend: + return True, True + return frontend, backend + + def needs_reinit(frontend: bool = True) -> bool: """Check if an app needs to be reinitialized. @@ -1293,10 +1308,13 @@ def validate_bun(): """ bun_path = path_ops.get_bun_path() - if bun_path and not bun_path.samefile(constants.Bun.DEFAULT_PATH): + if bun_path is None: + return + + if not path_ops.samefile(bun_path, constants.Bun.DEFAULT_PATH): console.info(f"Using custom Bun path: {bun_path}") bun_version = get_bun_version() - if not bun_version: + if bun_version is None: console.error( "Failed to obtain bun version. Make sure the specified bun path in your config is correct." ) diff --git a/tests/units/utils/test_utils.py b/tests/units/utils/test_utils.py index 7cd53f14a..74dcf79b0 100644 --- a/tests/units/utils/test_utils.py +++ b/tests/units/utils/test_utils.py @@ -115,7 +115,20 @@ def test_typehint_issubclass(subclass, superclass, expected): assert types.typehint_issubclass(subclass, superclass) == expected -def test_validate_invalid_bun_path(mocker): +def test_validate_none_bun_path(mocker): + """Test that an error is thrown when a bun path is not specified. + + Args: + mocker: Pytest mocker object. + """ + mocker.patch("reflex.utils.path_ops.get_bun_path", return_value=None) + # with pytest.raises(typer.Exit): + prerequisites.validate_bun() + + +def test_validate_invalid_bun_path( + mocker, +): """Test that an error is thrown when a custom specified bun path is not valid or does not exist. @@ -123,13 +136,12 @@ def test_validate_invalid_bun_path(mocker): mocker: Pytest mocker object. """ mock_path = mocker.Mock() - mock_path.samefile.return_value = False mocker.patch("reflex.utils.path_ops.get_bun_path", return_value=mock_path) + mocker.patch("reflex.utils.path_ops.samefile", return_value=False) mocker.patch("reflex.utils.prerequisites.get_bun_version", return_value=None) with pytest.raises(typer.Exit): prerequisites.validate_bun() - mock_path.samefile.assert_called_once() def test_validate_bun_path_incompatible_version(mocker): @@ -141,6 +153,7 @@ def test_validate_bun_path_incompatible_version(mocker): mock_path = mocker.Mock() mock_path.samefile.return_value = False mocker.patch("reflex.utils.path_ops.get_bun_path", return_value=mock_path) + mocker.patch("reflex.utils.path_ops.samefile", return_value=False) mocker.patch( "reflex.utils.prerequisites.get_bun_version", return_value=version.parse("0.6.5"), From 85f07fcd89dcc17594ee6e5fad5424ba19019e8e Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 10 Feb 2025 12:22:37 -0800 Subject: [PATCH 104/144] Sticky tweaks: only show in prod mode (#4789) * Sticky tweaks: only show in prod mode Only display the sticky badge in prod mode. Display the mini-badge for mobile and tablet; full badge only displayed at desktop width. * Remove localhost checking --- reflex/app.py | 2 +- reflex/components/core/sticky.py | 32 ++++---------------------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 18cce69d2..7b7010521 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -1040,7 +1040,7 @@ class App(MiddlewareMixin, LifespanMixin): self._validate_var_dependencies() self._setup_overlay_component() self._setup_error_boundary() - if config.show_built_with_reflex: + if is_prod_mode() and config.show_built_with_reflex: self._setup_sticky_badge() progress.advance(task) diff --git a/reflex/components/core/sticky.py b/reflex/components/core/sticky.py index cbcec00a9..b5dd4bcfd 100644 --- a/reflex/components/core/sticky.py +++ b/reflex/components/core/sticky.py @@ -2,14 +2,12 @@ from reflex.components.component import ComponentNamespace from reflex.components.core.colors import color -from reflex.components.core.cond import color_mode_cond, cond -from reflex.components.core.responsive import tablet_and_desktop +from reflex.components.core.cond import color_mode_cond +from reflex.components.core.responsive import desktop_only from reflex.components.el.elements.inline import A from reflex.components.el.elements.media import Path, Rect, Svg from reflex.components.radix.themes.typography.text import Text -from reflex.experimental.client_state import ClientStateVar from reflex.style import Style -from reflex.vars.base import Var, VarData class StickyLogo(Svg): @@ -87,7 +85,7 @@ class StickyBadge(A): """ return super().create( StickyLogo.create(), - tablet_and_desktop(StickyLabel.create()), + desktop_only(StickyLabel.create()), href="https://reflex.dev", target="_blank", width="auto", @@ -102,34 +100,12 @@ class StickyBadge(A): Returns: The style of the component. """ - is_localhost_cs = ClientStateVar.create( - "is_localhost", - default=True, - global_ref=False, - ) - localhost_hostnames = Var.create(["localhost", "127.0.0.1", "[::1]"]) - is_localhost_expr = localhost_hostnames.contains( - Var("window.location.hostname", _var_type=str).guess_type(), - ) - check_is_localhost = Var( - f"useEffect(({is_localhost_cs}) => {is_localhost_cs.set}({is_localhost_expr}), [])", - _var_data=VarData( - imports={"react": "useEffect"}, - ), - ) - is_localhost = is_localhost_cs.value._replace( - merge_var_data=VarData.merge( - check_is_localhost._get_all_var_data(), - VarData(hooks={str(check_is_localhost): None}), - ), - ) return Style( { "position": "fixed", "bottom": "1rem", "right": "1rem", - # Do not show the badge on localhost. - "display": cond(is_localhost, "none", "flex"), + "display": "flex", "flex-direction": "row", "gap": "0.375rem", "align-items": "center", From 90be6649811fcf9929bd897b35519cdbc8e931a8 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 11 Feb 2025 11:39:14 -0800 Subject: [PATCH 105/144] improve icon error message (#4796) --- reflex/components/lucide/icon.py | 14 +++++++++++--- reflex/utils/format.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/reflex/components/lucide/icon.py b/reflex/components/lucide/icon.py index 269ef7f79..ea6efe133 100644 --- a/reflex/components/lucide/icon.py +++ b/reflex/components/lucide/icon.py @@ -54,7 +54,7 @@ class Icon(LucideIconComponent): if "tag" not in props: raise AttributeError("Missing 'tag' keyword-argument for Icon") - tag: str | Var | LiteralVar = props.pop("tag") + tag: str | Var | LiteralVar = Var.create(props.pop("tag")) if isinstance(tag, LiteralVar): if isinstance(tag, LiteralStringVar): tag = tag._var_value @@ -70,9 +70,17 @@ class Icon(LucideIconComponent): not isinstance(tag, str) or format.to_snake_case(tag) not in LUCIDE_ICON_LIST ): + if isinstance(tag, str): + icons_sorted = sorted( + LUCIDE_ICON_LIST, + key=lambda s: format.length_of_largest_common_substring(tag, s), + reverse=True, + ) + else: + icons_sorted = LUCIDE_ICON_LIST raise ValueError( - f"Invalid icon tag: {tag}. Please use one of the following: {', '.join(LUCIDE_ICON_LIST[0:25])}, ..." - "\nSee full list at https://lucide.dev/icons." + f"Invalid icon tag: {tag}. Please use one of the following: {', '.join(icons_sorted[0:25])}, ..." + "\nSee full list at https://reflex.dev/docs/library/data-display/icon/#icons-list." ) if tag in LUCIDE_ICON_MAPPING_OVERRIDE: diff --git a/reflex/utils/format.py b/reflex/utils/format.py index 225d52f3a..214c845f8 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -27,6 +27,36 @@ WRAP_MAP = { } +def length_of_largest_common_substring(str1: str, str2: str) -> int: + """Find the length of the largest common substring between two strings. + + Args: + str1: The first string. + str2: The second string. + + Returns: + The length of the largest common substring. + """ + if not str1 or not str2: + return 0 + + # Create a matrix of size (len(str1) + 1) x (len(str2) + 1) + dp = [[0] * (len(str2) + 1) for _ in range(len(str1) + 1)] + + # Variables to keep track of maximum length and ending position + max_length = 0 + + # Fill the dp matrix + for i in range(1, len(str1) + 1): + for j in range(1, len(str2) + 1): + if str1[i - 1] == str2[j - 1]: + dp[i][j] = dp[i - 1][j - 1] + 1 + if dp[i][j] > max_length: + max_length = dp[i][j] + + return max_length + + def get_close_char(open: str, close: str | None = None) -> str: """Check if the given character is a valid brace. From a194c90d6f86bac0e049b83cc3a74812326b8d0a Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 11 Feb 2025 11:39:28 -0800 Subject: [PATCH 106/144] improve hot reload handling (#4795) --- reflex/config.py | 22 +++++++++++++++- reflex/utils/exec.py | 53 +++++++++++++++++++++++++++++++------- tests/units/test_config.py | 9 +++++++ 3 files changed, 74 insertions(+), 10 deletions(-) diff --git a/reflex/config.py b/reflex/config.py index dbc88619b..f5f000e82 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -23,6 +23,7 @@ from typing import ( Set, TypeVar, get_args, + get_origin, ) from typing_extensions import Annotated, get_type_hints @@ -304,6 +305,15 @@ def interpret_env_var_value( return interpret_path_env(value, field_name) elif field_type is ExistingPath: return interpret_existing_path_env(value, field_name) + elif get_origin(field_type) is list: + return [ + interpret_env_var_value( + v, + get_args(field_type)[0], + f"{field_name}[{i}]", + ) + for i, v in enumerate(value.split(":")) + ] elif inspect.isclass(field_type) and issubclass(field_type, enum.Enum): return interpret_enum_env(value, field_type, field_name) @@ -387,7 +397,11 @@ class EnvVar(Generic[T]): else: if isinstance(value, enum.Enum): value = value.value - os.environ[self.name] = str(value) + if isinstance(value, list): + str_value = ":".join(str(v) for v in value) + else: + str_value = str(value) + os.environ[self.name] = str_value class env_var: # noqa: N801 # pyright: ignore [reportRedeclaration] @@ -571,6 +585,12 @@ class EnvironmentVariables: # Whether to use the turbopack bundler. REFLEX_USE_TURBOPACK: EnvVar[bool] = env_var(True) + # Additional paths to include in the hot reload. Separated by a colon. + REFLEX_HOT_RELOAD_INCLUDE_PATHS: EnvVar[List[Path]] = env_var([]) + + # Paths to exclude from the hot reload. Takes precedence over include paths. Separated by a colon. + REFLEX_HOT_RELOAD_EXCLUDE_PATHS: EnvVar[List[Path]] = env_var([]) + environment = EnvironmentVariables() diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index de326dacc..7318b7ff6 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -10,6 +10,7 @@ import re import subprocess import sys from pathlib import Path +from typing import Sequence from urllib.parse import urljoin import psutil @@ -242,14 +243,14 @@ def run_backend( run_uvicorn_backend(host, port, loglevel) -def get_reload_dirs() -> list[Path]: - """Get the reload directories for the backend. +def get_reload_paths() -> Sequence[Path]: + """Get the reload paths for the backend. Returns: - The reload directories for the backend. + The reload paths for the backend. """ config = get_config() - reload_dirs = [Path(config.app_name)] + reload_paths = [Path(config.app_name).parent] if config.app_module is not None and config.app_module.__file__: module_path = Path(config.app_module.__file__).resolve().parent @@ -263,8 +264,43 @@ def get_reload_dirs() -> list[Path]: else: break - reload_dirs = [module_path] - return reload_dirs + reload_paths = [module_path] + + include_dirs = tuple( + map(Path.absolute, environment.REFLEX_HOT_RELOAD_INCLUDE_PATHS.get()) + ) + exclude_dirs = tuple( + map(Path.absolute, environment.REFLEX_HOT_RELOAD_EXCLUDE_PATHS.get()) + ) + + def is_excluded_by_default(path: Path) -> bool: + if path.is_dir(): + if path.name.startswith("."): + # exclude hidden directories + return True + if path.name.startswith("__"): + # ignore things like __pycache__ + return True + return path.name not in (".gitignore", "uploaded_files") + + reload_paths = ( + tuple( + path.absolute() + for dir in reload_paths + for path in dir.iterdir() + if not is_excluded_by_default(path) + ) + + include_dirs + ) + + if exclude_dirs: + reload_paths = tuple( + path + for path in reload_paths + if all(not path.samefile(exclude) for exclude in exclude_dirs) + ) + + return reload_paths def run_uvicorn_backend(host: str, port: int, loglevel: LogLevel): @@ -283,7 +319,7 @@ def run_uvicorn_backend(host: str, port: int, loglevel: LogLevel): port=port, log_level=loglevel.value, reload=True, - reload_dirs=list(map(str, get_reload_dirs())), + reload_dirs=list(map(str, get_reload_paths())), ) @@ -310,8 +346,7 @@ def run_granian_backend(host: str, port: int, loglevel: LogLevel): interface=Interfaces.ASGI, log_level=LogLevels(loglevel.value), reload=True, - reload_paths=get_reload_dirs(), - reload_ignore_dirs=[".web", ".states"], + reload_paths=get_reload_paths(), ).serve() except ImportError: console.error( diff --git a/tests/units/test_config.py b/tests/units/test_config.py index 88d8b5f2f..18d8cd90c 100644 --- a/tests/units/test_config.py +++ b/tests/units/test_config.py @@ -252,6 +252,7 @@ def test_env_var(): BLUBB: EnvVar[str] = env_var("default") INTERNAL: EnvVar[str] = env_var("default", internal=True) BOOLEAN: EnvVar[bool] = env_var(False) + LIST: EnvVar[list[int]] = env_var([1, 2, 3]) assert TestEnv.BLUBB.get() == "default" assert TestEnv.BLUBB.name == "BLUBB" @@ -280,3 +281,11 @@ def test_env_var(): assert TestEnv.BOOLEAN.get() is False TestEnv.BOOLEAN.set(None) assert "BOOLEAN" not in os.environ + + assert TestEnv.LIST.get() == [1, 2, 3] + assert TestEnv.LIST.name == "LIST" + TestEnv.LIST.set([4, 5, 6]) + assert os.environ.get("LIST") == "4:5:6" + assert TestEnv.LIST.get() == [4, 5, 6] + TestEnv.LIST.set(None) + assert "LIST" not in os.environ From d545ee3f0baa036ecb34e8698b50615984d7c2c4 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 11 Feb 2025 11:39:38 -0800 Subject: [PATCH 107/144] move overlays to _app.js (#4794) * move overlays to _app.js * fix unit tests * fix dynamic imports app * fix unit cases once again * clear custom compoent cache between app harness tests --- reflex/app.py | 92 ++++++++++++++++++++++------------ reflex/compiler/compiler.py | 1 + reflex/components/component.py | 4 +- reflex/testing.py | 2 + reflex/utils/exec.py | 15 +++--- tests/units/test_app.py | 9 ++-- 6 files changed, 76 insertions(+), 47 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 7b7010521..281727b3f 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -164,11 +164,11 @@ def default_backend_exception_handler(exception: Exception) -> EventSpec: return window_alert("\n".join(error_message)) -def default_overlay_component() -> Component: - """Default overlay_component attribute for App. +def extra_overlay_function() -> Optional[Component]: + """Extra overlay function to add to the overlay component. Returns: - The default overlay_component, which is a connection_modal. + The extra overlay function. """ config = get_config() @@ -178,7 +178,8 @@ def default_overlay_component() -> Component: module, _, function_name = extra_config.rpartition(".") try: module = __import__(module) - config_overlay = getattr(module, function_name)() + config_overlay = Fragment.create(getattr(module, function_name)()) + config_overlay._get_all_imports() except Exception as e: from reflex.compiler.utils import save_error @@ -188,13 +189,27 @@ def default_overlay_component() -> Component: f"Error loading extra_overlay_function {extra_config}. Error saved to {log_path}" ) - return Fragment.create( - connection_pulser(), - connection_toaster(), - *([config_overlay] if config_overlay else []), - *([backend_disabled()] if config.is_reflex_cloud else []), - *codespaces.codespaces_auto_redirect(), - ) + return config_overlay + + +def default_overlay_component() -> Component: + """Default overlay_component attribute for App. + + Returns: + The default overlay_component, which is a connection_modal. + """ + config = get_config() + from reflex.components.component import memo + + def default_overlay_components(): + return Fragment.create( + connection_pulser(), + connection_toaster(), + *([backend_disabled()] if config.is_reflex_cloud else []), + *codespaces.codespaces_auto_redirect(), + ) + + return Fragment.create(memo(default_overlay_components)()) def default_error_boundary(*children: Component) -> Component: @@ -266,11 +281,26 @@ class App(MiddlewareMixin, LifespanMixin): # A component that is present on every page (defaults to the Connection Error banner). overlay_component: Optional[Union[Component, ComponentCallable]] = ( - dataclasses.field(default_factory=default_overlay_component) + dataclasses.field(default=None) ) # Error boundary component to wrap the app with. - error_boundary: Optional[ComponentCallable] = default_error_boundary + error_boundary: Optional[ComponentCallable] = dataclasses.field(default=None) + + # App wraps to be applied to the whole app. Expected to be a dictionary of (order, name) to a function that takes whether the state is enabled and optionally returns a component. + app_wraps: Dict[tuple[int, str], Callable[[bool], Optional[Component]]] = ( + dataclasses.field( + default_factory=lambda: { + (55, "ErrorBoundary"): ( + lambda stateful: default_error_boundary() if stateful else None + ), + (5, "Overlay"): ( + lambda stateful: default_overlay_component() if stateful else None + ), + (4, "ExtraOverlay"): lambda stateful: extra_overlay_function(), + } + ) + ) # Components to add to the head of every page. head_components: List[Component] = dataclasses.field(default_factory=list) @@ -880,25 +910,6 @@ class App(MiddlewareMixin, LifespanMixin): for k, component in self._pages.items(): self._pages[k] = self._add_overlay_to_component(component) - def _add_error_boundary_to_component(self, component: Component) -> Component: - if self.error_boundary is None: - return component - - component = self.error_boundary(*component.children) - - return component - - def _setup_error_boundary(self): - """If a State is not used and no error_boundary is specified, do not render the error boundary.""" - if self._state is None and self.error_boundary is default_error_boundary: - self.error_boundary = None - - for k, component in self._pages.items(): - # Skip the 404 page - if k == constants.Page404.SLUG: - continue - self._pages[k] = self._add_error_boundary_to_component(component) - def _setup_sticky_badge(self): """Add the sticky badge to the app.""" for k, component in self._pages.items(): @@ -1039,7 +1050,6 @@ class App(MiddlewareMixin, LifespanMixin): self._validate_var_dependencies() self._setup_overlay_component() - self._setup_error_boundary() if is_prod_mode() and config.show_built_with_reflex: self._setup_sticky_badge() @@ -1066,6 +1076,22 @@ class App(MiddlewareMixin, LifespanMixin): # Add the custom components from the page to the set. custom_components |= component._get_all_custom_components() + # Add the app wraps to the app. + for key, app_wrap in self.app_wraps.items(): + component = app_wrap(self._state is not None) + if component is not None: + app_wrappers[key] = component + custom_components |= component._get_all_custom_components() + + if self.error_boundary: + console.deprecate( + feature_name="App.error_boundary", + reason="Use app_wraps instead.", + deprecation_version="0.7.1", + removal_version="0.8.0", + ) + app_wrappers[(55, "ErrorBoundary")] = self.error_boundary() + # Perform auto-memoization of stateful components. with console.timing("Auto-memoize StatefulComponents"): ( diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index c2a76aad3..7cd87fb71 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -78,6 +78,7 @@ def _compile_app(app_root: Component) -> str: hooks=app_root._get_all_hooks(), window_libraries=window_libraries, render=app_root.render(), + dynamic_imports=app_root._get_all_dynamic_imports(), ) diff --git a/reflex/components/component.py b/reflex/components/component.py index 6e4c6c37f..9466933c5 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -23,6 +23,8 @@ from typing import ( Union, ) +from typing_extensions import Self + import reflex.state from reflex.base import Base from reflex.compiler.templates import STATEFUL_COMPONENT @@ -685,7 +687,7 @@ class Component(BaseComponent, ABC): } @classmethod - def create(cls, *children, **props) -> Component: + def create(cls, *children, **props) -> Self: """Create the component. Args: diff --git a/reflex/testing.py b/reflex/testing.py index 25f9e7aac..e463ddea7 100644 --- a/reflex/testing.py +++ b/reflex/testing.py @@ -43,6 +43,7 @@ import reflex.utils.exec import reflex.utils.format import reflex.utils.prerequisites import reflex.utils.processes +from reflex.components.component import CustomComponent from reflex.config import environment from reflex.state import ( BaseState, @@ -254,6 +255,7 @@ class AppHarness: # disable telemetry reporting for tests os.environ["TELEMETRY_ENABLED"] = "false" + CustomComponent.create().get_component.cache_clear() self.app_path.mkdir(parents=True, exist_ok=True) if self.app_source is not None: app_globals = self._get_globals_from_signature(self.app_source) diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 7318b7ff6..3e729cbf8 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -254,15 +254,12 @@ def get_reload_paths() -> Sequence[Path]: if config.app_module is not None and config.app_module.__file__: module_path = Path(config.app_module.__file__).resolve().parent - while module_path.parent.name: - if any( - sibling_file.name == "__init__.py" - for sibling_file in module_path.parent.iterdir() - ): - # go up a level to find dir without `__init__.py` - module_path = module_path.parent - else: - break + while module_path.parent.name and any( + sibling_file.name == "__init__.py" + for sibling_file in module_path.parent.iterdir() + ): + # go up a level to find dir without `__init__.py` + module_path = module_path.parent reload_paths = [module_path] diff --git a/tests/units/test_app.py b/tests/units/test_app.py index ae5a01c1a..5d25b09ac 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -1299,6 +1299,7 @@ def test_app_wrap_compile_theme( app_js_lines = [ line.strip() for line in app_js_contents.splitlines() if line.strip() ] + lines = "".join(app_js_lines) assert ( "function AppWrap({children}) {" "return (" @@ -1313,7 +1314,7 @@ def test_app_wrap_compile_theme( + ("" if react_strict_mode else "") + ")" "}" - ) in "".join(app_js_lines) + ) in lines @pytest.mark.parametrize( @@ -1362,6 +1363,7 @@ def test_app_wrap_priority( app_js_lines = [ line.strip() for line in app_js_contents.splitlines() if line.strip() ] + lines = "".join(app_js_lines) assert ( "function AppWrap({children}) {" "return (" + ("" if react_strict_mode else "") + "" @@ -1374,9 +1376,8 @@ def test_app_wrap_priority( "" "
" "" - "" + ("" if react_strict_mode else "") + ")" - "}" - ) in "".join(app_js_lines) + "" + ("" if react_strict_mode else "") + ) in lines def test_app_state_determination(): From 372bd22475a4f6d1a6c10d5a4091170b0b45ff18 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 11 Feb 2025 11:39:55 -0800 Subject: [PATCH 108/144] raise error when passing a str(var) (#4769) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * raise error when passing a str(var) * make it faster * fix typo * fix tests * mocker consistency Co-authored-by: Thomas Brandého * ditto Co-authored-by: Thomas Brandého --------- Co-authored-by: Thomas Brandého --- reflex/components/base/bare.py | 40 ++++++++++++++++++++++++++++++++++ reflex/config.py | 2 +- reflex/utils/decorator.py | 25 +++++++++++++++++++++ tests/units/test_var.py | 25 +++++++++++++++++++++ 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 reflex/utils/decorator.py diff --git a/reflex/components/base/bare.py b/reflex/components/base/bare.py index 0f0bef8b9..73b0680d3 100644 --- a/reflex/components/base/bare.py +++ b/reflex/components/base/bare.py @@ -7,9 +7,44 @@ from typing import Any, Iterator from reflex.components.component import Component, LiteralComponentVar from reflex.components.tags import Tag from reflex.components.tags.tagless import Tagless +from reflex.config import PerformanceMode, environment +from reflex.utils import console +from reflex.utils.decorator import once from reflex.utils.imports import ParsedImportDict from reflex.vars import BooleanVar, ObjectVar, Var from reflex.vars.base import VarData +from reflex.vars.sequence import LiteralStringVar + + +@once +def get_performance_mode(): + """Get the performance mode. + + Returns: + The performance mode. + """ + return environment.REFLEX_PERF_MODE.get() + + +def validate_str(value: str): + """Validate a string value. + + Args: + value: The value to validate. + + Raises: + ValueError: If the value is a Var and the performance mode is set to raise. + """ + perf_mode = get_performance_mode() + if perf_mode != PerformanceMode.OFF and value.startswith("reflex___state"): + if perf_mode == PerformanceMode.WARN: + console.warn( + f"Output includes {value!s} which will be displayed as a string. If you are calling `str` on a Var, consider using .to_string() instead." + ) + elif perf_mode == PerformanceMode.RAISE: + raise ValueError( + f"Output includes {value!s} which will be displayed as a string. If you are calling `str` on a Var, consider using .to_string() instead." + ) class Bare(Component): @@ -28,9 +63,14 @@ class Bare(Component): The component. """ if isinstance(contents, Var): + if isinstance(contents, LiteralStringVar): + validate_str(contents._var_value) return cls(contents=contents) else: + if isinstance(contents, str): + validate_str(contents) contents = str(contents) if contents is not None else "" + return cls(contents=contents) def _get_all_hooks_internal(self) -> dict[str, VarData | None]: diff --git a/reflex/config.py b/reflex/config.py index f5f000e82..8a062f4e6 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -577,7 +577,7 @@ class EnvironmentVariables: REFLEX_CHECK_LATEST_VERSION: EnvVar[bool] = env_var(True) # In which performance mode to run the app. - REFLEX_PERF_MODE: EnvVar[Optional[PerformanceMode]] = env_var(PerformanceMode.WARN) + REFLEX_PERF_MODE: EnvVar[PerformanceMode] = env_var(PerformanceMode.WARN) # The maximum size of the reflex state in kilobytes. REFLEX_STATE_SIZE_LIMIT: EnvVar[int] = env_var(1000) diff --git a/reflex/utils/decorator.py b/reflex/utils/decorator.py new file mode 100644 index 000000000..5c9c0bf3a --- /dev/null +++ b/reflex/utils/decorator.py @@ -0,0 +1,25 @@ +"""Decorator utilities.""" + +from typing import Callable, TypeVar + +T = TypeVar("T") + + +def once(f: Callable[[], T]) -> Callable[[], T]: + """A decorator that calls the function once and caches the result. + + Args: + f: The function to call. + + Returns: + A function that calls the function once and caches the result. + """ + unset = object() + value: object | T = unset + + def wrapper() -> T: + nonlocal value + value = f() if value is unset else value + return value # pyright: ignore[reportReturnType] + + return wrapper diff --git a/tests/units/test_var.py b/tests/units/test_var.py index a72242814..8fcd288e6 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -8,6 +8,7 @@ from pandas import DataFrame import reflex as rx from reflex.base import Base +from reflex.config import PerformanceMode from reflex.constants.base import REFLEX_VAR_CLOSING_TAG, REFLEX_VAR_OPENING_TAG from reflex.state import BaseState from reflex.utils.exceptions import ( @@ -1893,3 +1894,27 @@ def test_var_data_hooks(): def test_var_data_with_hooks_value(): var_data = VarData(hooks={"what": VarData(hooks={"whot": VarData(hooks="whott")})}) assert var_data == VarData(hooks=["what", "whot", "whott"]) + + +def test_str_var_in_components(mocker): + class StateWithVar(rx.State): + field: int = 1 + + mocker.patch( + "reflex.components.base.bare.get_performance_mode", + return_value=PerformanceMode.RAISE, + ) + + with pytest.raises(ValueError): + rx.vstack( + str(StateWithVar.field), + ) + + mocker.patch( + "reflex.components.base.bare.get_performance_mode", + return_value=PerformanceMode.OFF, + ) + + rx.vstack( + str(StateWithVar.field), + ) From 64b1630d02562e4fdb3e2cdda2f15b32ef3bfb6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 11 Feb 2025 21:15:38 +0100 Subject: [PATCH 109/144] set global loglevel for subprocesses (#4791) --- reflex/utils/console.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reflex/utils/console.py b/reflex/utils/console.py index 5c47eee6f..70bbb0e82 100644 --- a/reflex/utils/console.py +++ b/reflex/utils/console.py @@ -4,6 +4,7 @@ from __future__ import annotations import contextlib import inspect +import os import shutil import time from pathlib import Path @@ -60,6 +61,9 @@ def set_log_level(log_level: LogLevel): f"log_level must be a LogLevel enum value, got {log_level} of type {type(log_level)} instead." ) global _LOG_LEVEL + if log_level != _LOG_LEVEL: + # Set the loglevel persistenly for subprocesses. + os.environ["LOGLEVEL"] = log_level.value _LOG_LEVEL = log_level From 894a01a5a5cb2c75622e6fdcf71caedd029d5810 Mon Sep 17 00:00:00 2001 From: Declan Brady <36574477+drbrady8800@users.noreply.github.com> Date: Tue, 11 Feb 2025 15:21:27 -0500 Subject: [PATCH 110/144] Add toast.loading from the sonner package (#4792) --- reflex/components/sonner/toast.py | 14 ++++++++++++++ reflex/components/sonner/toast.pyi | 3 +++ 2 files changed, 17 insertions(+) diff --git a/reflex/components/sonner/toast.py b/reflex/components/sonner/toast.py index dbac8e733..e215f356f 100644 --- a/reflex/components/sonner/toast.py +++ b/reflex/components/sonner/toast.py @@ -327,6 +327,19 @@ class Toaster(Component): """ return Toaster.send_toast(message, level="success", **kwargs) + @staticmethod + def toast_loading(message: str | Var = "", **kwargs: Any): + """Display a loading toast message. + + Args: + message: The message to display. + **kwargs: Additional toast props. + + Returns: + The toast event. + """ + return Toaster.send_toast(message, level="loading", **kwargs) + @staticmethod def toast_dismiss(id: Var | str | None = None): """Dismiss a toast. @@ -378,6 +391,7 @@ class ToastNamespace(ComponentNamespace): warning = staticmethod(Toaster.toast_warning) error = staticmethod(Toaster.toast_error) success = staticmethod(Toaster.toast_success) + loading = staticmethod(Toaster.toast_loading) dismiss = staticmethod(Toaster.toast_dismiss) __call__ = staticmethod(Toaster.send_toast) diff --git a/reflex/components/sonner/toast.pyi b/reflex/components/sonner/toast.pyi index cb12834d5..7ff0b9196 100644 --- a/reflex/components/sonner/toast.pyi +++ b/reflex/components/sonner/toast.pyi @@ -70,6 +70,8 @@ class Toaster(Component): @staticmethod def toast_success(message: str | Var = "", **kwargs: Any): ... @staticmethod + def toast_loading(message: str | Var = "", **kwargs: Any): ... + @staticmethod def toast_dismiss(id: Var | str | None = None): ... @overload @classmethod @@ -172,6 +174,7 @@ class ToastNamespace(ComponentNamespace): warning = staticmethod(Toaster.toast_warning) error = staticmethod(Toaster.toast_error) success = staticmethod(Toaster.toast_success) + loading = staticmethod(Toaster.toast_loading) dismiss = staticmethod(Toaster.toast_dismiss) @staticmethod From e5e6c4e1d77c42073e5e7fdfb10f0351946960c5 Mon Sep 17 00:00:00 2001 From: Simon Young <40179067+Kastier1@users.noreply.github.com> Date: Tue, 11 Feb 2025 15:49:06 -0800 Subject: [PATCH 111/144] Create codeql.yml (#4799) * Create codeql.yml * add config * fix that guy who's mad --------- Co-authored-by: Khaleel Al-Adhami --- .github/codeql-config.yml | 2 + .github/workflows/codeql.yml | 101 ++++++++++++++++++++++++++++++++++ reflex/utils/prerequisites.py | 7 ++- 3 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 .github/codeql-config.yml create mode 100644 .github/workflows/codeql.yml diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml new file mode 100644 index 000000000..f4091ea39 --- /dev/null +++ b/.github/codeql-config.yml @@ -0,0 +1,2 @@ +paths-ignore: + - "**/tests/**" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..18d826fe2 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,101 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + schedule: + - cron: "36 7 * * 4" + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: javascript-typescript + build-mode: none + - language: python + build-mode: none + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Add any setup steps before running the `github/codeql-action/init` action. + # This includes steps like installing compilers or runtimes (`actions/setup-node` + # or others). This is typically only required for manual builds. + # - name: Setup runtime (example) + # uses: actions/setup-example@v1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + config-file: .github/codeql-config.yml + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 8047e1256..3cd65a7eb 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -24,6 +24,7 @@ from datetime import datetime from pathlib import Path from types import ModuleType from typing import Any, Callable, List, NamedTuple, Optional +from urllib.parse import urlparse import httpx import typer @@ -1679,9 +1680,11 @@ def validate_and_create_app_using_remote_template( template_url = templates[template].code_url else: + template_parsed_url = urlparse(template) # Check if the template is a github repo. - if template.startswith("https://github.com"): - template_url = f"{template.strip('/').replace('.git', '')}/archive/main.zip" + if template_parsed_url.hostname == "github.com": + path = template_parsed_url.path.strip("/").removesuffix(".git") + template_url = f"https://github.com/{path}/archive/main.zip" else: console.error(f"Template `{template}` not found or invalid.") raise typer.Exit(1) From 289d10d30e1b52cd2be36be9d629c1c67add3498 Mon Sep 17 00:00:00 2001 From: Simon Young <40179067+Kastier1@users.noreply.github.com> Date: Tue, 11 Feb 2025 16:04:03 -0800 Subject: [PATCH 112/144] test actions in codeql (#4802) --- .github/workflows/codeql.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 18d826fe2..6b2a54dd5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -47,6 +47,8 @@ jobs: build-mode: none - language: python build-mode: none + - language: actions + build-mode: none # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' # Use `c-cpp` to analyze code written in C, C++ or both # Use 'java-kotlin' to analyze code written in Java, Kotlin or both From 6cbdd0016985f0f7eadce725faf3bb2dddadbe49 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 11 Feb 2025 16:46:06 -0800 Subject: [PATCH 113/144] fix toast provider needed (#4801) * fix toast provider needed * fix tests --- reflex/app.py | 25 ++++++++++++++++++++++++- reflex/components/component.py | 3 --- reflex/components/sonner/toast.py | 6 +++++- reflex/components/sonner/toast.pyi | 8 +++++++- tests/units/test_app.py | 6 ++++++ 5 files changed, 42 insertions(+), 6 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 281727b3f..d290b8f49 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -355,6 +355,9 @@ class App(MiddlewareMixin, LifespanMixin): [Exception], Union[EventSpec, List[EventSpec], None] ] = default_backend_exception_handler + # Put the toast provider in the app wrap. + bundle_toaster: bool = True + @property def api(self) -> FastAPI | None: """Get the backend api. @@ -1010,6 +1013,10 @@ class App(MiddlewareMixin, LifespanMixin): should_compile = self._should_compile() if not should_compile: + if self.bundle_toaster: + from reflex.components.sonner.toast import Toaster + + Toaster.is_used = True with console.timing("Evaluate Pages (Backend)"): for route in self._unevaluated_pages: console.debug(f"Evaluating page: {route}") @@ -1039,6 +1046,20 @@ class App(MiddlewareMixin, LifespanMixin): + adhoc_steps_without_executor, ) + if self.bundle_toaster: + from reflex.components.component import memo + from reflex.components.sonner.toast import toast + + internal_toast_provider = toast.provider() + + @memo + def memoized_toast_provider(): + return internal_toast_provider + + toast_provider = Fragment.create(memoized_toast_provider()) + + app_wrappers[(1, "ToasterProvider")] = toast_provider + with console.timing("Evaluate Pages (Frontend)"): for route in self._unevaluated_pages: console.debug(f"Evaluating page: {route}") @@ -1081,7 +1102,9 @@ class App(MiddlewareMixin, LifespanMixin): component = app_wrap(self._state is not None) if component is not None: app_wrappers[key] = component - custom_components |= component._get_all_custom_components() + + for component in app_wrappers.values(): + custom_components |= component._get_all_custom_components() if self.error_boundary: console.deprecate( diff --git a/reflex/components/component.py b/reflex/components/component.py index 9466933c5..d27bddf78 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -1792,9 +1792,6 @@ class CustomComponent(Component): include_children=include_children, ignore_ids=ignore_ids ) yield from filter(lambda prop: isinstance(prop, Var), self.props.values()) - yield from self.get_component(self)._get_vars( - include_children=include_children, ignore_ids=ignore_ids - ) @lru_cache(maxsize=None) # noqa: B019 def get_component(self) -> Component: diff --git a/reflex/components/sonner/toast.py b/reflex/components/sonner/toast.py index e215f356f..d1f9464d8 100644 --- a/reflex/components/sonner/toast.py +++ b/reflex/components/sonner/toast.py @@ -8,6 +8,7 @@ from reflex.base import Base from reflex.components.component import Component, ComponentNamespace from reflex.components.lucide.icon import Icon from reflex.components.props import NoExtrasAllowedProps, PropsBase +from reflex.constants.base import Dirs from reflex.event import EventSpec, run_script from reflex.style import Style, resolved_color_mode from reflex.utils import format @@ -27,7 +28,10 @@ LiteralPosition = Literal[ "bottom-right", ] -toast_ref = Var(_js_expr="refs['__toast']") +toast_ref = Var( + _js_expr="refs['__toast']", + _var_data=VarData(imports={f"$/{Dirs.STATE_PATH}": [ImportVar(tag="refs")]}), +) class ToastAction(Base): diff --git a/reflex/components/sonner/toast.pyi b/reflex/components/sonner/toast.pyi index 7ff0b9196..cb637bfff 100644 --- a/reflex/components/sonner/toast.pyi +++ b/reflex/components/sonner/toast.pyi @@ -9,9 +9,12 @@ from reflex.base import Base from reflex.components.component import Component, ComponentNamespace from reflex.components.lucide.icon import Icon from reflex.components.props import NoExtrasAllowedProps, PropsBase +from reflex.constants.base import Dirs from reflex.event import EventSpec, EventType from reflex.style import Style +from reflex.utils.imports import ImportVar from reflex.utils.serializers import serializer +from reflex.vars import VarData from reflex.vars.base import Var LiteralPosition = Literal[ @@ -22,7 +25,10 @@ LiteralPosition = Literal[ "bottom-center", "bottom-right", ] -toast_ref = Var(_js_expr="refs['__toast']") +toast_ref = Var( + _js_expr="refs['__toast']", + _var_data=VarData(imports={f"$/{Dirs.STATE_PATH}": [ImportVar(tag="refs")]}), +) class ToastAction(Base): label: str diff --git a/tests/units/test_app.py b/tests/units/test_app.py index 5d25b09ac..88cb36509 100644 --- a/tests/units/test_app.py +++ b/tests/units/test_app.py @@ -1307,8 +1307,11 @@ def test_app_wrap_compile_theme( + "" "" "" + "" + "" "{children}" "" + "" "" "" + ("" if react_strict_mode else "") @@ -1371,8 +1374,11 @@ def test_app_wrap_priority( "" "" "" + "" + "" "{children}" "" + "" "" "" "" From cb2e7df96a065a7ad15115b1137b4ec01039b7ea Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 11 Feb 2025 17:47:44 -0800 Subject: [PATCH 114/144] invert logic of default hot reload exclusion (#4807) * invert logic of default hot reload exclusion * console debug reload paths --- reflex/utils/exec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 3e729cbf8..b16aaea1c 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -278,7 +278,7 @@ def get_reload_paths() -> Sequence[Path]: if path.name.startswith("__"): # ignore things like __pycache__ return True - return path.name not in (".gitignore", "uploaded_files") + return path.name in (".gitignore", "uploaded_files") reload_paths = ( tuple( @@ -297,6 +297,8 @@ def get_reload_paths() -> Sequence[Path]: if all(not path.samefile(exclude) for exclude in exclude_dirs) ) + console.debug(f"Reload paths: {list(map(str, reload_paths))}") + return reload_paths From 3f68a27a22b8e653038a43421cbf83b672d8af89 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 11 Feb 2025 18:05:33 -0800 Subject: [PATCH 115/144] [ENG-4647] Fix env_file handling (#4805) * [ENG-4647] Fix env_file handling * Import dotenv.load_dotenv early to avoid ImportError while loading rxconfig.py * Read ENV_FILE from the environment explicitly. fix #4803 * Config.Config: use_enum_values = False Save enum fields as the enum object rather than the value. --- reflex/config.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/reflex/config.py b/reflex/config.py index 8a062f4e6..21614b9b1 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -26,8 +26,12 @@ from typing import ( get_origin, ) +from reflex_cli.constants.hosting import Hosting from typing_extensions import Annotated, get_type_hints +from reflex import constants +from reflex.base import Base +from reflex.utils import console from reflex.utils.exceptions import ConfigError, EnvironmentVarValueError from reflex.utils.types import GenericType, is_union, value_inside_optional @@ -36,11 +40,11 @@ try: except ModuleNotFoundError: import pydantic -from reflex_cli.constants.hosting import Hosting -from reflex import constants -from reflex.base import Base -from reflex.utils import console +try: + from dotenv import load_dotenv # pyright: ignore [reportMissingImports] +except ImportError: + load_dotenv = None class DBConfig(Base): @@ -624,6 +628,7 @@ class Config(Base): """Pydantic config for the config.""" validate_assignment = True + use_enum_values = False # The name of the app (should match the name of the app directory). app_name: str @@ -754,6 +759,9 @@ class Config(Base): self._non_default_attributes.update(kwargs) self._replace_defaults(**kwargs) + # Set the log level for this process + console.set_log_level(self.loglevel) + if ( self.state_manager_mode == constants.StateManagerMode.REDIS and not self.redis_url @@ -793,16 +801,15 @@ class Config(Base): Returns: The updated config values. """ - if self.env_file: - try: - from dotenv import load_dotenv # pyright: ignore [reportMissingImports] - - # load env file if exists - load_dotenv(self.env_file, override=True) - except ImportError: + env_file = self.env_file or os.environ.get("ENV_FILE", None) + if env_file: + if load_dotenv is None: console.error( """The `python-dotenv` package is required to load environment variables from a file. Run `pip install "python-dotenv>=1.0.1"`.""" ) + else: + # load env file if exists + load_dotenv(env_file, override=True) updated_values = {} # Iterate over the fields. From 7da96a1175b02b6a62fe78ffe92604a5f4053bdd Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 11 Feb 2025 18:41:04 -0800 Subject: [PATCH 116/144] pyproject.toml: bump to 0.7.1 for further development (#4808) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b54f578fd..c192a1139 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "reflex" -version = "0.7.0dev1" +version = "0.7.1dev1" description = "Web apps in pure Python." license = "Apache-2.0" authors = [ From a31301cb4f85e7030e641675df57c1f14fc30986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 12 Feb 2025 03:51:05 +0100 Subject: [PATCH 117/144] add stateful benchmarks (#4764) * add stateful benchmarks * make stateful stuff more complex * unpack tuple in itertag * fix comment --- reflex/components/tags/iter_tag.py | 4 + tests/benchmarks/conftest.py | 4 +- tests/benchmarks/fixtures.py | 147 ++++++++++++++++++++++++++++- tests/benchmarks/test_evaluate.py | 7 +- 4 files changed, 154 insertions(+), 8 deletions(-) diff --git a/reflex/components/tags/iter_tag.py b/reflex/components/tags/iter_tag.py index cb02ca000..221b65ca9 100644 --- a/reflex/components/tags/iter_tag.py +++ b/reflex/components/tags/iter_tag.py @@ -134,6 +134,10 @@ class IterTag(Tag): if isinstance(component, (Foreach, Cond)): component = Fragment.create(component) + # If the component is a tuple, unpack and wrap it in a fragment. + if isinstance(component, tuple): + component = Fragment.create(*component) + # Set the component key. if component.key is None: component.key = index diff --git a/tests/benchmarks/conftest.py b/tests/benchmarks/conftest.py index bf777be2e..ff8f01f3a 100644 --- a/tests/benchmarks/conftest.py +++ b/tests/benchmarks/conftest.py @@ -1,3 +1,3 @@ -from .fixtures import evaluated_page +from .fixtures import evaluated_page, unevaluated_page -__all__ = ["evaluated_page"] +__all__ = ["evaluated_page", "unevaluated_page"] diff --git a/tests/benchmarks/fixtures.py b/tests/benchmarks/fixtures.py index d9c0d7688..16233100a 100644 --- a/tests/benchmarks/fixtures.py +++ b/tests/benchmarks/fixtures.py @@ -213,6 +213,75 @@ def side_bar(): ) +class NestedElement(rx.Base): + """A nested element.""" + + identifier: str + value: list[int] + + +class BenchmarkState(rx.State): + """State for the benchmark.""" + + counter: rx.Field[int] = rx.field(17) + + current_key: rx.Field[str] = rx.field("key_2") + + @rx.event + def increment(self): + """Increment the counter.""" + self.counter = self.counter + 1 + + @rx.event + def decrement(self): + """Decrement the counter.""" + self.counter = self.counter - 1 + + @rx.var + def elements(self) -> list[int]: + """List of elements. + + Returns: + List of elements. + """ + if self.counter < 0: + return list(range(0)) + return list(range(self.counter)) + + @rx.var + def nested_elements(self) -> list[NestedElement]: + """List of nested elements. + + Returns: + List of nested elements. + """ + return [ + NestedElement( + identifier=str(i), + value=list(range(i)), + ) + for i in range(self.counter) + ] + + @rx.var + def show_odd(self) -> bool: + """Check if the counter is odd. + + Returns: + True if the counter is odd, False otherwise. + """ + return self.counter % 2 == 1 + + @rx.var + def show_even(self) -> bool: + """Check if the counter is even. + + Returns: + True if the counter is even, False otherwise. + """ + return self.counter % 2 == 0 + + LOREM_IPSUM = "Lorem ipsum dolor sit amet, dolor ut dolore pariatur aliqua enim tempor sed. Labore excepteur sed exercitation. Ullamco aliquip lorem sunt enim in incididunt. Magna anim officia sint cillum labore. Ut eu non dolore minim nostrud magna eu, aute ex in incididunt irure eu. Fugiat et magna magna est excepteur eiusmod minim. Quis eiusmod et non pariatur dolor veniam incididunt, eiusmod irure enim sed dolor lorem pariatur do. Occaecat duis irure excepteur dolore. Proident ut laborum pariatur sit sit, nisi nostrud voluptate magna commodo laborum esse velit. Voluptate non minim deserunt adipiscing irure deserunt cupidatat. Laboris veniam commodo incididunt veniam lorem occaecat, fugiat ipsum dolor cupidatat. Ea officia sed eu excepteur culpa adipiscing, tempor consectetur ullamco eu. Anim ex proident nulla sunt culpa, voluptate veniam proident est adipiscing sint elit velit. Laboris adipiscing est culpa cillum magna. Sit veniam nulla nulla, aliqua eiusmod commodo lorem cupidatat commodo occaecat. Fugiat cillum dolor incididunt mollit eiusmod sint. Non lorem dolore labore excepteur minim laborum sed. Irure nisi do lorem nulla sunt commodo, deserunt quis mollit consectetur minim et esse est, proident nostrud officia enim sed reprehenderit. Magna cillum consequat aute reprehenderit duis sunt ullamco. Labore qui mollit voluptate. Duis dolor sint aute amet aliquip officia, est non mollit tempor enim quis fugiat, eu do culpa consectetur magna. Do ullamco aliqua voluptate culpa excepteur reprehenderit reprehenderit. Occaecat nulla sit est magna. Deserunt ea voluptate veniam cillum. Amet cupidatat duis est tempor fugiat ex eu, officia est sunt consectetur labore esse exercitation. Nisi cupidatat irure est nisi. Officia amet eu veniam reprehenderit. In amet incididunt tempor commodo ea labore. Mollit dolor aliquip excepteur, voluptate aute occaecat id officia proident. Ullamco est amet tempor. Proident aliquip proident mollit do aliquip ipsum, culpa quis aute id irure. Velit excepteur cillum cillum ut cupidatat. Occaecat qui elit esse nulla minim. Consequat velit id ad pariatur tempor. Eiusmod deserunt aliqua ex sed quis non. Dolor sint commodo ex in deserunt nostrud excepteur, pariatur ex aliqua anim adipiscing amet proident. Laboris eu laborum magna lorem ipsum fugiat velit." @@ -233,6 +302,82 @@ def _complicated_page(): ) -@pytest.fixture(params=[_simple_page, _complicated_page]) +def _counter(): + return ( + rx.text(BenchmarkState.counter), + rx.button("Increment", on_click=BenchmarkState.increment), + rx.button("Decrement", on_click=BenchmarkState.decrement), + rx.cond( + BenchmarkState.counter < 0, + rx.text("Counter is negative"), + rx.fragment( + rx.cond( + BenchmarkState.show_odd, + rx.text("Counter is odd"), + ), + rx.cond( + BenchmarkState.show_even, + rx.text("Counter is even"), + ), + ), + ), + ) + + +def _show_key(): + return rx.match( + BenchmarkState.current_key, + ( + "key_1", + rx.text("Key 1"), + ), + ( + "key_2", + rx.text("Key 2"), + ), + ( + "key_3", + rx.text("Key 3"), + ), + rx.text("Key not found"), + ) + + +def _simple_foreach(): + return rx.foreach( + BenchmarkState.elements, + lambda elem: rx.text(elem), + ) + + +def _render_nested_element(elem: NestedElement, idx): + return ( + rx.text(f"{idx} {elem.identifier}"), + rx.foreach(elem.value, lambda value: rx.text(value)), + ) + + +def _nested_foreach(): + return rx.foreach( + BenchmarkState.nested_elements, + _render_nested_element, + ) + + +def _stateful_page(): + return rx.hstack( + _counter(), + _show_key(), + _simple_foreach(), + _nested_foreach(), + ) + + +@pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page]) +def unevaluated_page(request): + return request.param + + +@pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page]) def evaluated_page(request): return request.param() diff --git a/tests/benchmarks/test_evaluate.py b/tests/benchmarks/test_evaluate.py index c8a6b392d..fbc75dea7 100644 --- a/tests/benchmarks/test_evaluate.py +++ b/tests/benchmarks/test_evaluate.py @@ -1,9 +1,6 @@ import pytest -from .fixtures import _complicated_page, _simple_page - @pytest.mark.benchmark -@pytest.mark.parametrize("page", [_simple_page, _complicated_page]) -def test_evaluate_page(page): - page() +def test_evaluate_page(unevaluated_page): + unevaluated_page() From 977e1dcb6720d5c0c65f92af14bff5efc53f8bdc Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 12 Feb 2025 09:05:36 -0800 Subject: [PATCH 118/144] update deps 2025-02-11 (#4804) --- poetry.lock | 355 ++++++++++++++++++++++++++-------------------------- 1 file changed, 180 insertions(+), 175 deletions(-) diff --git a/poetry.lock b/poetry.lock index f5007ee07..b96749316 100644 --- a/poetry.lock +++ b/poetry.lock @@ -403,75 +403,76 @@ markers = {main = "(platform_system == \"Windows\" or os_name == \"nt\") and (py [[package]] name = "coverage" -version = "7.6.10" +version = "7.6.12" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "coverage-7.6.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5c912978f7fbf47ef99cec50c4401340436d200d41d714c7a4766f377c5b7b78"}, - {file = "coverage-7.6.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a01ec4af7dfeb96ff0078ad9a48810bb0cc8abcb0115180c6013a6b26237626c"}, - {file = "coverage-7.6.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3b204c11e2b2d883946fe1d97f89403aa1811df28ce0447439178cc7463448a"}, - {file = "coverage-7.6.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:32ee6d8491fcfc82652a37109f69dee9a830e9379166cb73c16d8dc5c2915165"}, - {file = "coverage-7.6.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675cefc4c06e3b4c876b85bfb7c59c5e2218167bbd4da5075cbe3b5790a28988"}, - {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f4f620668dbc6f5e909a0946a877310fb3d57aea8198bde792aae369ee1c23b5"}, - {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:4eea95ef275de7abaef630c9b2c002ffbc01918b726a39f5a4353916ec72d2f3"}, - {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e2f0280519e42b0a17550072861e0bc8a80a0870de260f9796157d3fca2733c5"}, - {file = "coverage-7.6.10-cp310-cp310-win32.whl", hash = "sha256:bc67deb76bc3717f22e765ab3e07ee9c7a5e26b9019ca19a3b063d9f4b874244"}, - {file = "coverage-7.6.10-cp310-cp310-win_amd64.whl", hash = "sha256:0f460286cb94036455e703c66988851d970fdfd8acc2a1122ab7f4f904e4029e"}, - {file = "coverage-7.6.10-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ea3c8f04b3e4af80e17bab607c386a830ffc2fb88a5484e1df756478cf70d1d3"}, - {file = "coverage-7.6.10-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:507a20fc863cae1d5720797761b42d2d87a04b3e5aeb682ef3b7332e90598f43"}, - {file = "coverage-7.6.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d37a84878285b903c0fe21ac8794c6dab58150e9359f1aaebbeddd6412d53132"}, - {file = "coverage-7.6.10-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a534738b47b0de1995f85f582d983d94031dffb48ab86c95bdf88dc62212142f"}, - {file = "coverage-7.6.10-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d7a2bf79378d8fb8afaa994f91bfd8215134f8631d27eba3e0e2c13546ce994"}, - {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6713ba4b4ebc330f3def51df1d5d38fad60b66720948112f114968feb52d3f99"}, - {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ab32947f481f7e8c763fa2c92fd9f44eeb143e7610c4ca9ecd6a36adab4081bd"}, - {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7bbd8c8f1b115b892e34ba66a097b915d3871db7ce0e6b9901f462ff3a975377"}, - {file = "coverage-7.6.10-cp311-cp311-win32.whl", hash = "sha256:299e91b274c5c9cdb64cbdf1b3e4a8fe538a7a86acdd08fae52301b28ba297f8"}, - {file = "coverage-7.6.10-cp311-cp311-win_amd64.whl", hash = "sha256:489a01f94aa581dbd961f306e37d75d4ba16104bbfa2b0edb21d29b73be83609"}, - {file = "coverage-7.6.10-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:27c6e64726b307782fa5cbe531e7647aee385a29b2107cd87ba7c0105a5d3853"}, - {file = "coverage-7.6.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c56e097019e72c373bae32d946ecf9858fda841e48d82df7e81c63ac25554078"}, - {file = "coverage-7.6.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7827a5bc7bdb197b9e066cdf650b2887597ad124dd99777332776f7b7c7d0d0"}, - {file = "coverage-7.6.10-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:204a8238afe787323a8b47d8be4df89772d5c1e4651b9ffa808552bdf20e1d50"}, - {file = "coverage-7.6.10-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67926f51821b8e9deb6426ff3164870976fe414d033ad90ea75e7ed0c2e5022"}, - {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e78b270eadb5702938c3dbe9367f878249b5ef9a2fcc5360ac7bff694310d17b"}, - {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:714f942b9c15c3a7a5fe6876ce30af831c2ad4ce902410b7466b662358c852c0"}, - {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:abb02e2f5a3187b2ac4cd46b8ced85a0858230b577ccb2c62c81482ca7d18852"}, - {file = "coverage-7.6.10-cp312-cp312-win32.whl", hash = "sha256:55b201b97286cf61f5e76063f9e2a1d8d2972fc2fcfd2c1272530172fd28c359"}, - {file = "coverage-7.6.10-cp312-cp312-win_amd64.whl", hash = "sha256:e4ae5ac5e0d1e4edfc9b4b57b4cbecd5bc266a6915c500f358817a8496739247"}, - {file = "coverage-7.6.10-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:05fca8ba6a87aabdd2d30d0b6c838b50510b56cdcfc604d40760dae7153b73d9"}, - {file = "coverage-7.6.10-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9e80eba8801c386f72e0712a0453431259c45c3249f0009aff537a517b52942b"}, - {file = "coverage-7.6.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a372c89c939d57abe09e08c0578c1d212e7a678135d53aa16eec4430adc5e690"}, - {file = "coverage-7.6.10-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec22b5e7fe7a0fa8509181c4aac1db48f3dd4d3a566131b313d1efc102892c18"}, - {file = "coverage-7.6.10-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26bcf5c4df41cad1b19c84af71c22cbc9ea9a547fc973f1f2cc9a290002c8b3c"}, - {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e4630c26b6084c9b3cb53b15bd488f30ceb50b73c35c5ad7871b869cb7365fd"}, - {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2396e8116db77789f819d2bc8a7e200232b7a282c66e0ae2d2cd84581a89757e"}, - {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:79109c70cc0882e4d2d002fe69a24aa504dec0cc17169b3c7f41a1d341a73694"}, - {file = "coverage-7.6.10-cp313-cp313-win32.whl", hash = "sha256:9e1747bab246d6ff2c4f28b4d186b205adced9f7bd9dc362051cc37c4a0c7bd6"}, - {file = "coverage-7.6.10-cp313-cp313-win_amd64.whl", hash = "sha256:254f1a3b1eef5f7ed23ef265eaa89c65c8c5b6b257327c149db1ca9d4a35f25e"}, - {file = "coverage-7.6.10-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2ccf240eb719789cedbb9fd1338055de2761088202a9a0b73032857e53f612fe"}, - {file = "coverage-7.6.10-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0c807ca74d5a5e64427c8805de15b9ca140bba13572d6d74e262f46f50b13273"}, - {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bcfa46d7709b5a7ffe089075799b902020b62e7ee56ebaed2f4bdac04c508d8"}, - {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e0de1e902669dccbf80b0415fb6b43d27edca2fbd48c74da378923b05316098"}, - {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f7b444c42bbc533aaae6b5a2166fd1a797cdb5eb58ee51a92bee1eb94a1e1cb"}, - {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b330368cb99ef72fcd2dc3ed260adf67b31499584dc8a20225e85bfe6f6cfed0"}, - {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:9a7cfb50515f87f7ed30bc882f68812fd98bc2852957df69f3003d22a2aa0abf"}, - {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f93531882a5f68c28090f901b1d135de61b56331bba82028489bc51bdd818d2"}, - {file = "coverage-7.6.10-cp313-cp313t-win32.whl", hash = "sha256:89d76815a26197c858f53c7f6a656686ec392b25991f9e409bcef020cd532312"}, - {file = "coverage-7.6.10-cp313-cp313t-win_amd64.whl", hash = "sha256:54a5f0f43950a36312155dae55c505a76cd7f2b12d26abeebbe7a0b36dbc868d"}, - {file = "coverage-7.6.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:656c82b8a0ead8bba147de9a89bda95064874c91a3ed43a00e687f23cc19d53a"}, - {file = "coverage-7.6.10-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ccc2b70a7ed475c68ceb548bf69cec1e27305c1c2606a5eb7c3afff56a1b3b27"}, - {file = "coverage-7.6.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5e37dc41d57ceba70956fa2fc5b63c26dba863c946ace9705f8eca99daecdc4"}, - {file = "coverage-7.6.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0aa9692b4fdd83a4647eeb7db46410ea1322b5ed94cd1715ef09d1d5922ba87f"}, - {file = "coverage-7.6.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa744da1820678b475e4ba3dfd994c321c5b13381d1041fe9c608620e6676e25"}, - {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c0b1818063dc9e9d838c09e3a473c1422f517889436dd980f5d721899e66f315"}, - {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:59af35558ba08b758aec4d56182b222976330ef8d2feacbb93964f576a7e7a90"}, - {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7ed2f37cfce1ce101e6dffdfd1c99e729dd2ffc291d02d3e2d0af8b53d13840d"}, - {file = "coverage-7.6.10-cp39-cp39-win32.whl", hash = "sha256:4bcc276261505d82f0ad426870c3b12cb177752834a633e737ec5ee79bbdff18"}, - {file = "coverage-7.6.10-cp39-cp39-win_amd64.whl", hash = "sha256:457574f4599d2b00f7f637a0700a6422243b3565509457b2dbd3f50703e11f59"}, - {file = "coverage-7.6.10-pp39.pp310-none-any.whl", hash = "sha256:fd34e7b3405f0cc7ab03d54a334c17a9e802897580d964bd8c2001f4b9fd488f"}, - {file = "coverage-7.6.10.tar.gz", hash = "sha256:7fb105327c8f8f0682e29843e2ff96af9dcbe5bab8eeb4b398c6a33a16d80a23"}, + {file = "coverage-7.6.12-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:704c8c8c6ce6569286ae9622e534b4f5b9759b6f2cd643f1c1a61f666d534fe8"}, + {file = "coverage-7.6.12-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ad7525bf0241e5502168ae9c643a2f6c219fa0a283001cee4cf23a9b7da75879"}, + {file = "coverage-7.6.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06097c7abfa611c91edb9e6920264e5be1d6ceb374efb4986f38b09eed4cb2fe"}, + {file = "coverage-7.6.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:220fa6c0ad7d9caef57f2c8771918324563ef0d8272c94974717c3909664e674"}, + {file = "coverage-7.6.12-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3688b99604a24492bcfe1c106278c45586eb819bf66a654d8a9a1433022fb2eb"}, + {file = "coverage-7.6.12-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d1a987778b9c71da2fc8948e6f2656da6ef68f59298b7e9786849634c35d2c3c"}, + {file = "coverage-7.6.12-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:cec6b9ce3bd2b7853d4a4563801292bfee40b030c05a3d29555fd2a8ee9bd68c"}, + {file = "coverage-7.6.12-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ace9048de91293e467b44bce0f0381345078389814ff6e18dbac8fdbf896360e"}, + {file = "coverage-7.6.12-cp310-cp310-win32.whl", hash = "sha256:ea31689f05043d520113e0552f039603c4dd71fa4c287b64cb3606140c66f425"}, + {file = "coverage-7.6.12-cp310-cp310-win_amd64.whl", hash = "sha256:676f92141e3c5492d2a1596d52287d0d963df21bf5e55c8b03075a60e1ddf8aa"}, + {file = "coverage-7.6.12-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e18aafdfb3e9ec0d261c942d35bd7c28d031c5855dadb491d2723ba54f4c3015"}, + {file = "coverage-7.6.12-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:66fe626fd7aa5982cdebad23e49e78ef7dbb3e3c2a5960a2b53632f1f703ea45"}, + {file = "coverage-7.6.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ef01d70198431719af0b1f5dcbefc557d44a190e749004042927b2a3fed0702"}, + {file = "coverage-7.6.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e92ae5a289a4bc4c0aae710c0948d3c7892e20fd3588224ebe242039573bf0"}, + {file = "coverage-7.6.12-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e695df2c58ce526eeab11a2e915448d3eb76f75dffe338ea613c1201b33bab2f"}, + {file = "coverage-7.6.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d74c08e9aaef995f8c4ef6d202dbd219c318450fe2a76da624f2ebb9c8ec5d9f"}, + {file = "coverage-7.6.12-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e995b3b76ccedc27fe4f477b349b7d64597e53a43fc2961db9d3fbace085d69d"}, + {file = "coverage-7.6.12-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b1f097878d74fe51e1ddd1be62d8e3682748875b461232cf4b52ddc6e6db0bba"}, + {file = "coverage-7.6.12-cp311-cp311-win32.whl", hash = "sha256:1f7ffa05da41754e20512202c866d0ebfc440bba3b0ed15133070e20bf5aeb5f"}, + {file = "coverage-7.6.12-cp311-cp311-win_amd64.whl", hash = "sha256:e216c5c45f89ef8971373fd1c5d8d1164b81f7f5f06bbf23c37e7908d19e8558"}, + {file = "coverage-7.6.12-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b172f8e030e8ef247b3104902cc671e20df80163b60a203653150d2fc204d1ad"}, + {file = "coverage-7.6.12-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:641dfe0ab73deb7069fb972d4d9725bf11c239c309ce694dd50b1473c0f641c3"}, + {file = "coverage-7.6.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e549f54ac5f301e8e04c569dfdb907f7be71b06b88b5063ce9d6953d2d58574"}, + {file = "coverage-7.6.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:959244a17184515f8c52dcb65fb662808767c0bd233c1d8a166e7cf74c9ea985"}, + {file = "coverage-7.6.12-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bda1c5f347550c359f841d6614fb8ca42ae5cb0b74d39f8a1e204815ebe25750"}, + {file = "coverage-7.6.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1ceeb90c3eda1f2d8c4c578c14167dbd8c674ecd7d38e45647543f19839dd6ea"}, + {file = "coverage-7.6.12-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f16f44025c06792e0fb09571ae454bcc7a3ec75eeb3c36b025eccf501b1a4c3"}, + {file = "coverage-7.6.12-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b076e625396e787448d27a411aefff867db2bffac8ed04e8f7056b07024eed5a"}, + {file = "coverage-7.6.12-cp312-cp312-win32.whl", hash = "sha256:00b2086892cf06c7c2d74983c9595dc511acca00665480b3ddff749ec4fb2a95"}, + {file = "coverage-7.6.12-cp312-cp312-win_amd64.whl", hash = "sha256:7ae6eabf519bc7871ce117fb18bf14e0e343eeb96c377667e3e5dd12095e0288"}, + {file = "coverage-7.6.12-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:488c27b3db0ebee97a830e6b5a3ea930c4a6e2c07f27a5e67e1b3532e76b9ef1"}, + {file = "coverage-7.6.12-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d1095bbee1851269f79fd8e0c9b5544e4c00c0c24965e66d8cba2eb5bb535fd"}, + {file = "coverage-7.6.12-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0533adc29adf6a69c1baa88c3d7dbcaadcffa21afbed3ca7a225a440e4744bf9"}, + {file = "coverage-7.6.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53c56358d470fa507a2b6e67a68fd002364d23c83741dbc4c2e0680d80ca227e"}, + {file = "coverage-7.6.12-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64cbb1a3027c79ca6310bf101014614f6e6e18c226474606cf725238cf5bc2d4"}, + {file = "coverage-7.6.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:79cac3390bfa9836bb795be377395f28410811c9066bc4eefd8015258a7578c6"}, + {file = "coverage-7.6.12-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:9b148068e881faa26d878ff63e79650e208e95cf1c22bd3f77c3ca7b1d9821a3"}, + {file = "coverage-7.6.12-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8bec2ac5da793c2685ce5319ca9bcf4eee683b8a1679051f8e6ec04c4f2fd7dc"}, + {file = "coverage-7.6.12-cp313-cp313-win32.whl", hash = "sha256:200e10beb6ddd7c3ded322a4186313d5ca9e63e33d8fab4faa67ef46d3460af3"}, + {file = "coverage-7.6.12-cp313-cp313-win_amd64.whl", hash = "sha256:2b996819ced9f7dbb812c701485d58f261bef08f9b85304d41219b1496b591ef"}, + {file = "coverage-7.6.12-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:299cf973a7abff87a30609879c10df0b3bfc33d021e1adabc29138a48888841e"}, + {file = "coverage-7.6.12-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4b467a8c56974bf06e543e69ad803c6865249d7a5ccf6980457ed2bc50312703"}, + {file = "coverage-7.6.12-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2458f275944db8129f95d91aee32c828a408481ecde3b30af31d552c2ce284a0"}, + {file = "coverage-7.6.12-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a9d8be07fb0832636a0f72b80d2a652fe665e80e720301fb22b191c3434d924"}, + {file = "coverage-7.6.12-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14d47376a4f445e9743f6c83291e60adb1b127607a3618e3185bbc8091f0467b"}, + {file = "coverage-7.6.12-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b95574d06aa9d2bd6e5cc35a5bbe35696342c96760b69dc4287dbd5abd4ad51d"}, + {file = "coverage-7.6.12-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:ecea0c38c9079570163d663c0433a9af4094a60aafdca491c6a3d248c7432827"}, + {file = "coverage-7.6.12-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2251fabcfee0a55a8578a9d29cecfee5f2de02f11530e7d5c5a05859aa85aee9"}, + {file = "coverage-7.6.12-cp313-cp313t-win32.whl", hash = "sha256:eb5507795caabd9b2ae3f1adc95f67b1104971c22c624bb354232d65c4fc90b3"}, + {file = "coverage-7.6.12-cp313-cp313t-win_amd64.whl", hash = "sha256:f60a297c3987c6c02ffb29effc70eadcbb412fe76947d394a1091a3615948e2f"}, + {file = "coverage-7.6.12-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e7575ab65ca8399c8c4f9a7d61bbd2d204c8b8e447aab9d355682205c9dd948d"}, + {file = "coverage-7.6.12-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8161d9fbc7e9fe2326de89cd0abb9f3599bccc1287db0aba285cb68d204ce929"}, + {file = "coverage-7.6.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a1e465f398c713f1b212400b4e79a09829cd42aebd360362cd89c5bdc44eb87"}, + {file = "coverage-7.6.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f25d8b92a4e31ff1bd873654ec367ae811b3a943583e05432ea29264782dc32c"}, + {file = "coverage-7.6.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a936309a65cc5ca80fa9f20a442ff9e2d06927ec9a4f54bcba9c14c066323f2"}, + {file = "coverage-7.6.12-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:aa6f302a3a0b5f240ee201297fff0bbfe2fa0d415a94aeb257d8b461032389bd"}, + {file = "coverage-7.6.12-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f973643ef532d4f9be71dd88cf7588936685fdb576d93a79fe9f65bc337d9d73"}, + {file = "coverage-7.6.12-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:78f5243bb6b1060aed6213d5107744c19f9571ec76d54c99cc15938eb69e0e86"}, + {file = "coverage-7.6.12-cp39-cp39-win32.whl", hash = "sha256:69e62c5034291c845fc4df7f8155e8544178b6c774f97a99e2734b05eb5bed31"}, + {file = "coverage-7.6.12-cp39-cp39-win_amd64.whl", hash = "sha256:b01a840ecc25dce235ae4c1b6a0daefb2a203dba0e6e980637ee9c2f6ee0df57"}, + {file = "coverage-7.6.12-pp39.pp310-none-any.whl", hash = "sha256:7e39e845c4d764208e7b8f6a21c541ade741e2c41afabdfa1caa28687a3c98cf"}, + {file = "coverage-7.6.12-py3-none-any.whl", hash = "sha256:eb8668cfbc279a536c633137deeb9435d2962caec279c3f8cf8b91fff6ff8953"}, + {file = "coverage-7.6.12.tar.gz", hash = "sha256:48cfc4641d95d34766ad41d9573cc0f22a48aa88d22657a1fe01dca0dbae4de2"}, ] [package.dependencies] @@ -482,40 +483,44 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "44.0.0" +version = "44.0.1" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = "!=3.9.0,!=3.9.1,>=3.7" groups = ["main"] markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" files = [ - {file = "cryptography-44.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:84111ad4ff3f6253820e6d3e58be2cc2a00adb29335d4cacb5ab4d4d34f2a123"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b15492a11f9e1b62ba9d73c210e2416724633167de94607ec6069ef724fad092"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831c3c4d0774e488fdc83a1923b49b9957d33287de923d58ebd3cec47a0ae43f"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543"}, - {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e"}, - {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e"}, - {file = "cryptography-44.0.0-cp37-abi3-win32.whl", hash = "sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053"}, - {file = "cryptography-44.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:abc998e0c0eee3c8a1904221d3f67dcfa76422b23620173e28c11d3e626c21bd"}, - {file = "cryptography-44.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:660cb7312a08bc38be15b696462fa7cc7cd85c3ed9c576e81f4dc4d8b2b31591"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1923cb251c04be85eec9fda837661c67c1049063305d6be5721643c22dd4e2b7"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:404fdc66ee5f83a1388be54300ae978b2efd538018de18556dde92575e05defc"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c"}, - {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64"}, - {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285"}, - {file = "cryptography-44.0.0-cp39-abi3-win32.whl", hash = "sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417"}, - {file = "cryptography-44.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:708ee5f1bafe76d041b53a4f95eb28cdeb8d18da17e597d46d7833ee59b97ede"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:37d76e6863da3774cd9db5b409a9ecfd2c71c981c38788d3fcfaf177f447b731"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:f677e1268c4e23420c3acade68fac427fffcb8d19d7df95ed7ad17cdef8404f4"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f5e7cb1e5e56ca0933b4873c0220a78b773b24d40d186b6738080b73d3d0a756"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:8b3e6eae66cf54701ee7d9c83c30ac0a1e3fa17be486033000f2a73a12ab507c"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:be4ce505894d15d5c5037167ffb7f0ae90b7be6f2a98f9a5c3442395501c32fa"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:62901fb618f74d7d81bf408c8719e9ec14d863086efe4185afd07c352aee1d2c"}, - {file = "cryptography-44.0.0.tar.gz", hash = "sha256:cd4e834f340b4293430701e772ec543b0fbe6c2dea510a5286fe0acabe153a02"}, + {file = "cryptography-44.0.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf688f615c29bfe9dfc44312ca470989279f0e94bb9f631f85e3459af8efc009"}, + {file = "cryptography-44.0.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd7c7e2d71d908dc0f8d2027e1604102140d84b155e658c20e8ad1304317691f"}, + {file = "cryptography-44.0.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:887143b9ff6bad2b7570da75a7fe8bbf5f65276365ac259a5d2d5147a73775f2"}, + {file = "cryptography-44.0.1-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:322eb03ecc62784536bc173f1483e76747aafeb69c8728df48537eb431cd1911"}, + {file = "cryptography-44.0.1-cp37-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:21377472ca4ada2906bc313168c9dc7b1d7ca417b63c1c3011d0c74b7de9ae69"}, + {file = "cryptography-44.0.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:df978682c1504fc93b3209de21aeabf2375cb1571d4e61907b3e7a2540e83026"}, + {file = "cryptography-44.0.1-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:eb3889330f2a4a148abead555399ec9a32b13b7c8ba969b72d8e500eb7ef84cd"}, + {file = "cryptography-44.0.1-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:8e6a85a93d0642bd774460a86513c5d9d80b5c002ca9693e63f6e540f1815ed0"}, + {file = "cryptography-44.0.1-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6f76fdd6fd048576a04c5210d53aa04ca34d2ed63336d4abd306d0cbe298fddf"}, + {file = "cryptography-44.0.1-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6c8acf6f3d1f47acb2248ec3ea261171a671f3d9428e34ad0357148d492c7864"}, + {file = "cryptography-44.0.1-cp37-abi3-win32.whl", hash = "sha256:24979e9f2040c953a94bf3c6782e67795a4c260734e5264dceea65c8f4bae64a"}, + {file = "cryptography-44.0.1-cp37-abi3-win_amd64.whl", hash = "sha256:fd0ee90072861e276b0ff08bd627abec29e32a53b2be44e41dbcdf87cbee2b00"}, + {file = "cryptography-44.0.1-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:a2d8a7045e1ab9b9f803f0d9531ead85f90c5f2859e653b61497228b18452008"}, + {file = "cryptography-44.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b8272f257cf1cbd3f2e120f14c68bff2b6bdfcc157fafdee84a1b795efd72862"}, + {file = "cryptography-44.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e8d181e90a777b63f3f0caa836844a1182f1f265687fac2115fcf245f5fbec3"}, + {file = "cryptography-44.0.1-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:436df4f203482f41aad60ed1813811ac4ab102765ecae7a2bbb1dbb66dcff5a7"}, + {file = "cryptography-44.0.1-cp39-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4f422e8c6a28cf8b7f883eb790695d6d45b0c385a2583073f3cec434cc705e1a"}, + {file = "cryptography-44.0.1-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:72198e2b5925155497a5a3e8c216c7fb3e64c16ccee11f0e7da272fa93b35c4c"}, + {file = "cryptography-44.0.1-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:2a46a89ad3e6176223b632056f321bc7de36b9f9b93b2cc1cccf935a3849dc62"}, + {file = "cryptography-44.0.1-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:53f23339864b617a3dfc2b0ac8d5c432625c80014c25caac9082314e9de56f41"}, + {file = "cryptography-44.0.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:888fcc3fce0c888785a4876ca55f9f43787f4c5c1cc1e2e0da71ad481ff82c5b"}, + {file = "cryptography-44.0.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:00918d859aa4e57db8299607086f793fa7813ae2ff5a4637e318a25ef82730f7"}, + {file = "cryptography-44.0.1-cp39-abi3-win32.whl", hash = "sha256:9b336599e2cb77b1008cb2ac264b290803ec5e8e89d618a5e978ff5eb6f715d9"}, + {file = "cryptography-44.0.1-cp39-abi3-win_amd64.whl", hash = "sha256:e403f7f766ded778ecdb790da786b418a9f2394f36e8cc8b796cc056ab05f44f"}, + {file = "cryptography-44.0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:1f9a92144fa0c877117e9748c74501bea842f93d21ee00b0cf922846d9d0b183"}, + {file = "cryptography-44.0.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:610a83540765a8d8ce0f351ce42e26e53e1f774a6efb71eb1b41eb01d01c3d12"}, + {file = "cryptography-44.0.1-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:5fed5cd6102bb4eb843e3315d2bf25fede494509bddadb81e03a859c1bc17b83"}, + {file = "cryptography-44.0.1-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:f4daefc971c2d1f82f03097dc6f216744a6cd2ac0f04c68fb935ea2ba2a0d420"}, + {file = "cryptography-44.0.1-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:94f99f2b943b354a5b6307d7e8d19f5c423a794462bde2bf310c770ba052b1c4"}, + {file = "cryptography-44.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d9c5b9f698a83c8bd71e0f4d3f9f839ef244798e5ffe96febfa9714717db7af7"}, + {file = "cryptography-44.0.1.tar.gz", hash = "sha256:f51f5705ab27898afda1aaa430f34ad90dc117421057782022edf0600bec5f14"}, ] [package.dependencies] @@ -528,7 +533,7 @@ nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2)"] pep8test = ["check-sdist", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] sdist = ["build (>=1.0.0)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi (>=2024)", "cryptography-vectors (==44.0.0)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] +test = ["certifi (>=2024)", "cryptography-vectors (==44.0.1)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] test-randomorder = ["pytest-randomly"] [[package]] @@ -852,15 +857,15 @@ test = ["coverage[toml]", "pretend", "pytest", "pytest-cov"] [[package]] name = "identify" -version = "2.6.6" +version = "2.6.7" description = "File identification library for Python" optional = false python-versions = ">=3.9" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "identify-2.6.6-py2.py3-none-any.whl", hash = "sha256:cbd1810bce79f8b671ecb20f53ee0ae8e86ae84b557de31d89709dc2a48ba881"}, - {file = "identify-2.6.6.tar.gz", hash = "sha256:7bec12768ed44ea4761efb47806f0a41f86e7c0a5fdf5950d4648c90eca7e251"}, + {file = "identify-2.6.7-py2.py3-none-any.whl", hash = "sha256:155931cb617a401807b09ecec6635d6c692d180090a1cedca8ef7d58ba5b6aa0"}, + {file = "identify-2.6.7.tar.gz", hash = "sha256:3fa266b42eba321ee0b2bb0936a6a6b9e36a1351cbb69055b3082f4193035684"}, ] [package.extras] @@ -1074,15 +1079,15 @@ test = ["pytest (>=7.4)", "pytest-cov (>=4.1)"] [[package]] name = "mako" -version = "1.3.8" +version = "1.3.9" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." optional = false python-versions = ">=3.8" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "Mako-1.3.8-py3-none-any.whl", hash = "sha256:42f48953c7eb91332040ff567eb7eea69b22e7a4affbc5ba8e845e8f730f6627"}, - {file = "mako-1.3.8.tar.gz", hash = "sha256:577b97e414580d3e088d47c2dbbe9594aa7a5146ed2875d4dfa9075af2dd3cc8"}, + {file = "Mako-1.3.9-py3-none-any.whl", hash = "sha256:95920acccb578427a9aa38e37a186b1e43156c87260d7ba18ca63aa4c7cbd3a1"}, + {file = "mako-1.3.9.tar.gz", hash = "sha256:b5d65ff3462870feec922dbccf38f6efb44e5714d7b593a656be86663d8600ac"}, ] [package.dependencies] @@ -1558,25 +1563,25 @@ type = ["mypy (>=1.11.2)"] [[package]] name = "playwright" -version = "1.49.1" +version = "1.50.0" description = "A high-level API to automate web browsers" optional = false python-versions = ">=3.9" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "playwright-1.49.1-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:1041ffb45a0d0bc44d698d3a5aa3ac4b67c9bd03540da43a0b70616ad52592b8"}, - {file = "playwright-1.49.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:9f38ed3d0c1f4e0a6d1c92e73dd9a61f8855133249d6f0cec28648d38a7137be"}, - {file = "playwright-1.49.1-py3-none-macosx_11_0_universal2.whl", hash = "sha256:3be48c6d26dc819ca0a26567c1ae36a980a0303dcd4249feb6f59e115aaddfb8"}, - {file = "playwright-1.49.1-py3-none-manylinux1_x86_64.whl", hash = "sha256:753ca90ee31b4b03d165cfd36e477309ebf2b4381953f2a982ff612d85b147d2"}, - {file = "playwright-1.49.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd9bc8dab37aa25198a01f555f0a2e2c3813fe200fef018ac34dfe86b34994b9"}, - {file = "playwright-1.49.1-py3-none-win32.whl", hash = "sha256:43b304be67f096058e587dac453ece550eff87b8fbed28de30f4f022cc1745bb"}, - {file = "playwright-1.49.1-py3-none-win_amd64.whl", hash = "sha256:47b23cb346283278f5b4d1e1990bcb6d6302f80c0aa0ca93dd0601a1400191df"}, + {file = "playwright-1.50.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:f36d754a6c5bd9bf7f14e8f57a2aea6fd08f39ca4c8476481b9c83e299531148"}, + {file = "playwright-1.50.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:40f274384591dfd27f2b014596250b2250c843ed1f7f4ef5d2960ecb91b4961e"}, + {file = "playwright-1.50.0-py3-none-macosx_11_0_universal2.whl", hash = "sha256:9922ef9bcd316995f01e220acffd2d37a463b4ad10fd73e388add03841dfa230"}, + {file = "playwright-1.50.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:8fc628c492d12b13d1f347137b2ac6c04f98197ff0985ef0403a9a9ee0d39131"}, + {file = "playwright-1.50.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcff35f72db2689a79007aee78f1b0621a22e6e3d6c1f58aaa9ac805bf4497c"}, + {file = "playwright-1.50.0-py3-none-win32.whl", hash = "sha256:3b906f4d351260016a8c5cc1e003bb341651ae682f62213b50168ed581c7558a"}, + {file = "playwright-1.50.0-py3-none-win_amd64.whl", hash = "sha256:1859423da82de631704d5e3d88602d755462b0906824c1debe140979397d2e8d"}, ] [package.dependencies] -greenlet = "3.1.1" -pyee = "12.0.0" +greenlet = ">=3.1.1,<4.0.0" +pyee = ">=12,<13" [[package]] name = "plotly" @@ -1828,15 +1833,15 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pyee" -version = "12.0.0" +version = "12.1.1" description = "A rough port of Node.js's EventEmitter to Python with a few tricks of its own" optional = false python-versions = ">=3.8" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pyee-12.0.0-py3-none-any.whl", hash = "sha256:7b14b74320600049ccc7d0e0b1becd3b4bd0a03c745758225e31a59f4095c990"}, - {file = "pyee-12.0.0.tar.gz", hash = "sha256:c480603f4aa2927d4766eb41fa82793fe60a82cbfdb8d688e0d08c55a534e145"}, + {file = "pyee-12.1.1-py3-none-any.whl", hash = "sha256:18a19c650556bb6b32b406d7f017c8f513aceed1ef7ca618fb65de7bd2d347ef"}, + {file = "pyee-12.1.1.tar.gz", hash = "sha256:bbc33c09e2ff827f74191e3e5bbc6be7da02f627b7ec30d86f5ce1a6fb2424a3"}, ] [package.dependencies] @@ -2311,15 +2316,15 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==23.2.1)", "requests (>=2.31.0)" [[package]] name = "reflex-hosting-cli" -version = "0.1.34" +version = "0.1.35" description = "Reflex Hosting CLI" optional = false python-versions = "<4.0,>=3.9" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "reflex_hosting_cli-0.1.34-py3-none-any.whl", hash = "sha256:eabc4dc7bf68e022a9388614c1a35b5ab36b01021df063d0c3356eda0e245264"}, - {file = "reflex_hosting_cli-0.1.34.tar.gz", hash = "sha256:07be37fda6dcede0a5d4bc1fd1786d9a3df5ad4e49dc1b6ba335418563cfecec"}, + {file = "reflex_hosting_cli-0.1.35-py3-none-any.whl", hash = "sha256:619687be27e6691cb54f6cf038e98d4d622fcf25a85bc9986f8daf52b48e6744"}, + {file = "reflex_hosting_cli-0.1.35.tar.gz", hash = "sha256:9a5d02978b900045464a1a5581f3adc6260daaa09e8acf95fd05024cda926ae7"}, ] [package.dependencies] @@ -2571,70 +2576,70 @@ files = [ [[package]] name = "sqlalchemy" -version = "2.0.37" +version = "2.0.38" description = "Database Abstraction Library" optional = false python-versions = ">=3.7" groups = ["main"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "SQLAlchemy-2.0.37-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:da36c3b0e891808a7542c5c89f224520b9a16c7f5e4d6a1156955605e54aef0e"}, - {file = "SQLAlchemy-2.0.37-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e7402ff96e2b073a98ef6d6142796426d705addd27b9d26c3b32dbaa06d7d069"}, - {file = "SQLAlchemy-2.0.37-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6f5d254a22394847245f411a2956976401e84da4288aa70cbcd5190744062c1"}, - {file = "SQLAlchemy-2.0.37-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41296bbcaa55ef5fdd32389a35c710133b097f7b2609d8218c0eabded43a1d84"}, - {file = "SQLAlchemy-2.0.37-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:bedee60385c1c0411378cbd4dc486362f5ee88deceea50002772912d798bb00f"}, - {file = "SQLAlchemy-2.0.37-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6c67415258f9f3c69867ec02fea1bf6508153709ecbd731a982442a590f2b7e4"}, - {file = "SQLAlchemy-2.0.37-cp310-cp310-win32.whl", hash = "sha256:650dcb70739957a492ad8acff65d099a9586b9b8920e3507ca61ec3ce650bb72"}, - {file = "SQLAlchemy-2.0.37-cp310-cp310-win_amd64.whl", hash = "sha256:93d1543cd8359040c02b6614421c8e10cd7a788c40047dbc507ed46c29ae5636"}, - {file = "SQLAlchemy-2.0.37-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:78361be6dc9073ed17ab380985d1e45e48a642313ab68ab6afa2457354ff692c"}, - {file = "SQLAlchemy-2.0.37-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b661b49d0cb0ab311a189b31e25576b7ac3e20783beb1e1817d72d9d02508bf5"}, - {file = "SQLAlchemy-2.0.37-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d57bafbab289e147d064ffbd5cca2d7b1394b63417c0636cea1f2e93d16eb9e8"}, - {file = "SQLAlchemy-2.0.37-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fa2c0913f02341d25fb858e4fb2031e6b0813494cca1ba07d417674128ce11b"}, - {file = "SQLAlchemy-2.0.37-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9df21b8d9e5c136ea6cde1c50d2b1c29a2b5ff2b1d610165c23ff250e0704087"}, - {file = "SQLAlchemy-2.0.37-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db18ff6b8c0f1917f8b20f8eca35c28bbccb9f83afa94743e03d40203ed83de9"}, - {file = "SQLAlchemy-2.0.37-cp311-cp311-win32.whl", hash = "sha256:46954173612617a99a64aee103bcd3f078901b9a8dcfc6ae80cbf34ba23df989"}, - {file = "SQLAlchemy-2.0.37-cp311-cp311-win_amd64.whl", hash = "sha256:7b7e772dc4bc507fdec4ee20182f15bd60d2a84f1e087a8accf5b5b7a0dcf2ba"}, - {file = "SQLAlchemy-2.0.37-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2952748ecd67ed3b56773c185e85fc084f6bdcdec10e5032a7c25a6bc7d682ef"}, - {file = "SQLAlchemy-2.0.37-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3151822aa1db0eb5afd65ccfafebe0ef5cda3a7701a279c8d0bf17781a793bb4"}, - {file = "SQLAlchemy-2.0.37-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eaa8039b6d20137a4e02603aba37d12cd2dde7887500b8855356682fc33933f4"}, - {file = "SQLAlchemy-2.0.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1cdba1f73b64530c47b27118b7053b8447e6d6f3c8104e3ac59f3d40c33aa9fd"}, - {file = "SQLAlchemy-2.0.37-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1b2690456528a87234a75d1a1644cdb330a6926f455403c8e4f6cad6921f9098"}, - {file = "SQLAlchemy-2.0.37-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cf5ae8a9dcf657fd72144a7fd01f243236ea39e7344e579a121c4205aedf07bb"}, - {file = "SQLAlchemy-2.0.37-cp312-cp312-win32.whl", hash = "sha256:ea308cec940905ba008291d93619d92edaf83232ec85fbd514dcb329f3192761"}, - {file = "SQLAlchemy-2.0.37-cp312-cp312-win_amd64.whl", hash = "sha256:635d8a21577341dfe4f7fa59ec394b346da12420b86624a69e466d446de16aff"}, - {file = "SQLAlchemy-2.0.37-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8c4096727193762e72ce9437e2a86a110cf081241919ce3fab8e89c02f6b6658"}, - {file = "SQLAlchemy-2.0.37-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e4fb5ac86d8fe8151966814f6720996430462e633d225497566b3996966b9bdb"}, - {file = "SQLAlchemy-2.0.37-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e56a139bfe136a22c438478a86f8204c1eb5eed36f4e15c4224e4b9db01cb3e4"}, - {file = "SQLAlchemy-2.0.37-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f95fc8e3f34b5f6b3effb49d10ac97c569ec8e32f985612d9b25dd12d0d2e94"}, - {file = "SQLAlchemy-2.0.37-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c505edd429abdfe3643fa3b2e83efb3445a34a9dc49d5f692dd087be966020e0"}, - {file = "SQLAlchemy-2.0.37-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:12b0f1ec623cccf058cf21cb544f0e74656618165b083d78145cafde156ea7b6"}, - {file = "SQLAlchemy-2.0.37-cp313-cp313-win32.whl", hash = "sha256:293f9ade06b2e68dd03cfb14d49202fac47b7bb94bffcff174568c951fbc7af2"}, - {file = "SQLAlchemy-2.0.37-cp313-cp313-win_amd64.whl", hash = "sha256:d70f53a0646cc418ca4853da57cf3ddddbccb8c98406791f24426f2dd77fd0e2"}, - {file = "SQLAlchemy-2.0.37-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:44f569d0b1eb82301b92b72085583277316e7367e038d97c3a1a899d9a05e342"}, - {file = "SQLAlchemy-2.0.37-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2eae3423e538c10d93ae3e87788c6a84658c3ed6db62e6a61bb9495b0ad16bb"}, - {file = "SQLAlchemy-2.0.37-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfff7be361048244c3aa0f60b5e63221c5e0f0e509f4e47b8910e22b57d10ae7"}, - {file = "SQLAlchemy-2.0.37-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:5bc3339db84c5fb9130ac0e2f20347ee77b5dd2596ba327ce0d399752f4fce39"}, - {file = "SQLAlchemy-2.0.37-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:84b9f23b0fa98a6a4b99d73989350a94e4a4ec476b9a7dfe9b79ba5939f5e80b"}, - {file = "SQLAlchemy-2.0.37-cp37-cp37m-win32.whl", hash = "sha256:51bc9cfef83e0ac84f86bf2b10eaccb27c5a3e66a1212bef676f5bee6ef33ebb"}, - {file = "SQLAlchemy-2.0.37-cp37-cp37m-win_amd64.whl", hash = "sha256:8e47f1af09444f87c67b4f1bb6231e12ba6d4d9f03050d7fc88df6d075231a49"}, - {file = "SQLAlchemy-2.0.37-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6b788f14c5bb91db7f468dcf76f8b64423660a05e57fe277d3f4fad7b9dcb7ce"}, - {file = "SQLAlchemy-2.0.37-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521ef85c04c33009166777c77e76c8a676e2d8528dc83a57836b63ca9c69dcd1"}, - {file = "SQLAlchemy-2.0.37-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:75311559f5c9881a9808eadbeb20ed8d8ba3f7225bef3afed2000c2a9f4d49b9"}, - {file = "SQLAlchemy-2.0.37-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cce918ada64c956b62ca2c2af59b125767097ec1dca89650a6221e887521bfd7"}, - {file = "SQLAlchemy-2.0.37-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:9d087663b7e1feabea8c578d6887d59bb00388158e8bff3a76be11aa3f748ca2"}, - {file = "SQLAlchemy-2.0.37-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:cf95a60b36997dad99692314c4713f141b61c5b0b4cc5c3426faad570b31ca01"}, - {file = "SQLAlchemy-2.0.37-cp38-cp38-win32.whl", hash = "sha256:d75ead7dd4d255068ea0f21492ee67937bd7c90964c8f3c2bea83c7b7f81b95f"}, - {file = "SQLAlchemy-2.0.37-cp38-cp38-win_amd64.whl", hash = "sha256:74bbd1d0a9bacf34266a7907d43260c8d65d31d691bb2356f41b17c2dca5b1d0"}, - {file = "SQLAlchemy-2.0.37-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:648ec5acf95ad59255452ef759054f2176849662af4521db6cb245263ae4aa33"}, - {file = "SQLAlchemy-2.0.37-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:35bd2df269de082065d4b23ae08502a47255832cc3f17619a5cea92ce478b02b"}, - {file = "SQLAlchemy-2.0.37-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f581d365af9373a738c49e0c51e8b18e08d8a6b1b15cc556773bcd8a192fa8b"}, - {file = "SQLAlchemy-2.0.37-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82df02816c14f8dc9f4d74aea4cb84a92f4b0620235daa76dde002409a3fbb5a"}, - {file = "SQLAlchemy-2.0.37-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:94b564e38b344d3e67d2e224f0aec6ba09a77e4582ced41e7bfd0f757d926ec9"}, - {file = "SQLAlchemy-2.0.37-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:955a2a765aa1bd81aafa69ffda179d4fe3e2a3ad462a736ae5b6f387f78bfeb8"}, - {file = "SQLAlchemy-2.0.37-cp39-cp39-win32.whl", hash = "sha256:03f0528c53ca0b67094c4764523c1451ea15959bbf0a8a8a3096900014db0278"}, - {file = "SQLAlchemy-2.0.37-cp39-cp39-win_amd64.whl", hash = "sha256:4b12885dc85a2ab2b7d00995bac6d967bffa8594123b02ed21e8eb2205a7584b"}, - {file = "SQLAlchemy-2.0.37-py3-none-any.whl", hash = "sha256:a8998bf9f8658bd3839cbc44ddbe982955641863da0c1efe5b00c1ab4f5c16b1"}, - {file = "sqlalchemy-2.0.37.tar.gz", hash = "sha256:12b28d99a9c14eaf4055810df1001557176716de0167b91026e648e65229bffb"}, + {file = "SQLAlchemy-2.0.38-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5e1d9e429028ce04f187a9f522818386c8b076723cdbe9345708384f49ebcec6"}, + {file = "SQLAlchemy-2.0.38-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b87a90f14c68c925817423b0424381f0e16d80fc9a1a1046ef202ab25b19a444"}, + {file = "SQLAlchemy-2.0.38-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:402c2316d95ed90d3d3c25ad0390afa52f4d2c56b348f212aa9c8d072a40eee5"}, + {file = "SQLAlchemy-2.0.38-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6493bc0eacdbb2c0f0d260d8988e943fee06089cd239bd7f3d0c45d1657a70e2"}, + {file = "SQLAlchemy-2.0.38-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0561832b04c6071bac3aad45b0d3bb6d2c4f46a8409f0a7a9c9fa6673b41bc03"}, + {file = "SQLAlchemy-2.0.38-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:49aa2cdd1e88adb1617c672a09bf4ebf2f05c9448c6dbeba096a3aeeb9d4d443"}, + {file = "SQLAlchemy-2.0.38-cp310-cp310-win32.whl", hash = "sha256:64aa8934200e222f72fcfd82ee71c0130a9c07d5725af6fe6e919017d095b297"}, + {file = "SQLAlchemy-2.0.38-cp310-cp310-win_amd64.whl", hash = "sha256:c57b8e0841f3fce7b703530ed70c7c36269c6d180ea2e02e36b34cb7288c50c7"}, + {file = "SQLAlchemy-2.0.38-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bf89e0e4a30714b357f5d46b6f20e0099d38b30d45fa68ea48589faf5f12f62d"}, + {file = "SQLAlchemy-2.0.38-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8455aa60da49cb112df62b4721bd8ad3654a3a02b9452c783e651637a1f21fa2"}, + {file = "SQLAlchemy-2.0.38-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f53c0d6a859b2db58332e0e6a921582a02c1677cc93d4cbb36fdf49709b327b2"}, + {file = "SQLAlchemy-2.0.38-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3c4817dff8cef5697f5afe5fec6bc1783994d55a68391be24cb7d80d2dbc3a6"}, + {file = "SQLAlchemy-2.0.38-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c9cea5b756173bb86e2235f2f871b406a9b9d722417ae31e5391ccaef5348f2c"}, + {file = "SQLAlchemy-2.0.38-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:40e9cdbd18c1f84631312b64993f7d755d85a3930252f6276a77432a2b25a2f3"}, + {file = "SQLAlchemy-2.0.38-cp311-cp311-win32.whl", hash = "sha256:cb39ed598aaf102251483f3e4675c5dd6b289c8142210ef76ba24aae0a8f8aba"}, + {file = "SQLAlchemy-2.0.38-cp311-cp311-win_amd64.whl", hash = "sha256:f9d57f1b3061b3e21476b0ad5f0397b112b94ace21d1f439f2db472e568178ae"}, + {file = "SQLAlchemy-2.0.38-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:12d5b06a1f3aeccf295a5843c86835033797fea292c60e72b07bcb5d820e6dd3"}, + {file = "SQLAlchemy-2.0.38-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e036549ad14f2b414c725349cce0772ea34a7ab008e9cd67f9084e4f371d1f32"}, + {file = "SQLAlchemy-2.0.38-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee3bee874cb1fadee2ff2b79fc9fc808aa638670f28b2145074538d4a6a5028e"}, + {file = "SQLAlchemy-2.0.38-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e185ea07a99ce8b8edfc788c586c538c4b1351007e614ceb708fd01b095ef33e"}, + {file = "SQLAlchemy-2.0.38-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b79ee64d01d05a5476d5cceb3c27b5535e6bb84ee0f872ba60d9a8cd4d0e6579"}, + {file = "SQLAlchemy-2.0.38-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:afd776cf1ebfc7f9aa42a09cf19feadb40a26366802d86c1fba080d8e5e74bdd"}, + {file = "SQLAlchemy-2.0.38-cp312-cp312-win32.whl", hash = "sha256:a5645cd45f56895cfe3ca3459aed9ff2d3f9aaa29ff7edf557fa7a23515a3725"}, + {file = "SQLAlchemy-2.0.38-cp312-cp312-win_amd64.whl", hash = "sha256:1052723e6cd95312f6a6eff9a279fd41bbae67633415373fdac3c430eca3425d"}, + {file = "SQLAlchemy-2.0.38-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ecef029b69843b82048c5b347d8e6049356aa24ed644006c9a9d7098c3bd3bfd"}, + {file = "SQLAlchemy-2.0.38-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9c8bcad7fc12f0cc5896d8e10fdf703c45bd487294a986903fe032c72201596b"}, + {file = "SQLAlchemy-2.0.38-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a0ef3f98175d77180ffdc623d38e9f1736e8d86b6ba70bff182a7e68bed7727"}, + {file = "SQLAlchemy-2.0.38-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b0ac78898c50e2574e9f938d2e5caa8fe187d7a5b69b65faa1ea4648925b096"}, + {file = "SQLAlchemy-2.0.38-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9eb4fa13c8c7a2404b6a8e3772c17a55b1ba18bc711e25e4d6c0c9f5f541b02a"}, + {file = "SQLAlchemy-2.0.38-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5dba1cdb8f319084f5b00d41207b2079822aa8d6a4667c0f369fce85e34b0c86"}, + {file = "SQLAlchemy-2.0.38-cp313-cp313-win32.whl", hash = "sha256:eae27ad7580529a427cfdd52c87abb2dfb15ce2b7a3e0fc29fbb63e2ed6f8120"}, + {file = "SQLAlchemy-2.0.38-cp313-cp313-win_amd64.whl", hash = "sha256:b335a7c958bc945e10c522c069cd6e5804f4ff20f9a744dd38e748eb602cbbda"}, + {file = "SQLAlchemy-2.0.38-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:40310db77a55512a18827488e592965d3dec6a3f1e3d8af3f8243134029daca3"}, + {file = "SQLAlchemy-2.0.38-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d3043375dd5bbcb2282894cbb12e6c559654c67b5fffb462fda815a55bf93f7"}, + {file = "SQLAlchemy-2.0.38-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70065dfabf023b155a9c2a18f573e47e6ca709b9e8619b2e04c54d5bcf193178"}, + {file = "SQLAlchemy-2.0.38-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:c058b84c3b24812c859300f3b5abf300daa34df20d4d4f42e9652a4d1c48c8a4"}, + {file = "SQLAlchemy-2.0.38-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0398361acebb42975deb747a824b5188817d32b5c8f8aba767d51ad0cc7bb08d"}, + {file = "SQLAlchemy-2.0.38-cp37-cp37m-win32.whl", hash = "sha256:a2bc4e49e8329f3283d99840c136ff2cd1a29e49b5624a46a290f04dff48e079"}, + {file = "SQLAlchemy-2.0.38-cp37-cp37m-win_amd64.whl", hash = "sha256:9cd136184dd5f58892f24001cdce986f5d7e96059d004118d5410671579834a4"}, + {file = "SQLAlchemy-2.0.38-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:665255e7aae5f38237b3a6eae49d2358d83a59f39ac21036413fab5d1e810578"}, + {file = "SQLAlchemy-2.0.38-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:92f99f2623ff16bd4aaf786ccde759c1f676d39c7bf2855eb0b540e1ac4530c8"}, + {file = "SQLAlchemy-2.0.38-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa498d1392216fae47eaf10c593e06c34476ced9549657fca713d0d1ba5f7248"}, + {file = "SQLAlchemy-2.0.38-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9afbc3909d0274d6ac8ec891e30210563b2c8bdd52ebbda14146354e7a69373"}, + {file = "SQLAlchemy-2.0.38-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:57dd41ba32430cbcc812041d4de8d2ca4651aeefad2626921ae2a23deb8cd6ff"}, + {file = "SQLAlchemy-2.0.38-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:3e35d5565b35b66905b79ca4ae85840a8d40d31e0b3e2990f2e7692071b179ca"}, + {file = "SQLAlchemy-2.0.38-cp38-cp38-win32.whl", hash = "sha256:f0d3de936b192980209d7b5149e3c98977c3810d401482d05fb6d668d53c1c63"}, + {file = "SQLAlchemy-2.0.38-cp38-cp38-win_amd64.whl", hash = "sha256:3868acb639c136d98107c9096303d2d8e5da2880f7706f9f8c06a7f961961149"}, + {file = "SQLAlchemy-2.0.38-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:07258341402a718f166618470cde0c34e4cec85a39767dce4e24f61ba5e667ea"}, + {file = "SQLAlchemy-2.0.38-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a826f21848632add58bef4f755a33d45105d25656a0c849f2dc2df1c71f6f50"}, + {file = "SQLAlchemy-2.0.38-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:386b7d136919bb66ced64d2228b92d66140de5fefb3c7df6bd79069a269a7b06"}, + {file = "SQLAlchemy-2.0.38-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f2951dc4b4f990a4b394d6b382accb33141d4d3bd3ef4e2b27287135d6bdd68"}, + {file = "SQLAlchemy-2.0.38-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:8bf312ed8ac096d674c6aa9131b249093c1b37c35db6a967daa4c84746bc1bc9"}, + {file = "SQLAlchemy-2.0.38-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:6db316d6e340f862ec059dc12e395d71f39746a20503b124edc255973977b728"}, + {file = "SQLAlchemy-2.0.38-cp39-cp39-win32.whl", hash = "sha256:c09a6ea87658695e527104cf857c70f79f14e9484605e205217aae0ec27b45fc"}, + {file = "SQLAlchemy-2.0.38-cp39-cp39-win_amd64.whl", hash = "sha256:12f5c9ed53334c3ce719155424dc5407aaa4f6cadeb09c5b627e06abb93933a1"}, + {file = "SQLAlchemy-2.0.38-py3-none-any.whl", hash = "sha256:63178c675d4c80def39f1febd625a6333f44c0ba269edd8a468b156394b27753"}, + {file = "sqlalchemy-2.0.38.tar.gz", hash = "sha256:e5a4d82bdb4bf1ac1285a68eab02d253ab73355d9f0fe725a97e1e0fa689decb"}, ] [package.dependencies] @@ -2999,15 +3004,15 @@ standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", [[package]] name = "virtualenv" -version = "20.29.1" +version = "20.29.2" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "virtualenv-20.29.1-py3-none-any.whl", hash = "sha256:4e4cb403c0b0da39e13b46b1b2476e505cb0046b25f242bee80f62bf990b2779"}, - {file = "virtualenv-20.29.1.tar.gz", hash = "sha256:b8b8970138d32fb606192cb97f6cd4bb644fa486be9308fb9b63f81091b5dc35"}, + {file = "virtualenv-20.29.2-py3-none-any.whl", hash = "sha256:febddfc3d1ea571bdb1dc0f98d7b45d24def7428214d4fb73cc486c9568cce6a"}, + {file = "virtualenv-20.29.2.tar.gz", hash = "sha256:fdaabebf6d03b5ba83ae0a02cfe96f48a716f4fae556461d180825866f75b728"}, ] [package.dependencies] From dd5b817f0fddf98b50009b73b31f396b5a7d4831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 12 Feb 2025 19:06:01 +0100 Subject: [PATCH 119/144] fix port handling (#4773) * handle port better * setting port via envvar is possible again * change default deploy_url and api_url * fix for review * update docstring * type new envvar as optional --- reflex/config.py | 16 ++++++++++++---- reflex/reflex.py | 33 ++++++++++++++++++++++++--------- reflex/utils/processes.py | 25 ++++++++++++------------- 3 files changed, 48 insertions(+), 26 deletions(-) diff --git a/reflex/config.py b/reflex/config.py index 21614b9b1..233087938 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -562,6 +562,12 @@ class EnvironmentVariables: # Whether to run the frontend only. Exclusive with REFLEX_BACKEND_ONLY. REFLEX_FRONTEND_ONLY: EnvVar[bool] = env_var(False) + # The port to run the frontend on. + REFLEX_FRONTEND_PORT: EnvVar[int | None] = env_var(None) + + # The port to run the backend on. + REFLEX_BACKEND_PORT: EnvVar[int | None] = env_var(None) + # Reflex internal env to reload the config. RELOAD_CONFIG: EnvVar[bool] = env_var(False, internal=True) @@ -640,19 +646,21 @@ class Config(Base): loglevel: constants.LogLevel = constants.LogLevel.DEFAULT # The port to run the frontend on. NOTE: When running in dev mode, the next available port will be used if this is taken. - frontend_port: int = constants.DefaultPorts.FRONTEND_PORT + frontend_port: int | None = None # The path to run the frontend on. For example, "/app" will run the frontend on http://localhost:3000/app frontend_path: str = "" # The port to run the backend on. NOTE: When running in dev mode, the next available port will be used if this is taken. - backend_port: int = constants.DefaultPorts.BACKEND_PORT + backend_port: int | None = None # The backend url the frontend will connect to. This must be updated if the backend is hosted elsewhere, or in production. - api_url: str = f"http://localhost:{backend_port}" + api_url: str = f"http://localhost:{constants.DefaultPorts.BACKEND_PORT}" # The url the frontend will be hosted on. - deploy_url: Optional[str] = f"http://localhost:{frontend_port}" + deploy_url: Optional[str] = ( + f"http://localhost:{constants.DefaultPorts.FRONTEND_PORT}" + ) # The url the backend will be hosted on. backend_host: str = "0.0.0.0" diff --git a/reflex/reflex.py b/reflex/reflex.py index e4be0c89a..410485551 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -127,8 +127,8 @@ def _run( env: constants.Env = constants.Env.DEV, frontend: bool = True, backend: bool = True, - frontend_port: int = config.frontend_port, - backend_port: int = config.backend_port, + frontend_port: int | None = None, + backend_port: int | None = None, backend_host: str = config.backend_host, loglevel: constants.LogLevel = config.loglevel, ): @@ -158,17 +158,28 @@ def _run( # Find the next available open port if applicable. if frontend: + auto_increment_frontend = not bool(frontend_port or config.frontend_port) frontend_port = processes.handle_port( "frontend", - frontend_port, - constants.DefaultPorts.FRONTEND_PORT, + ( + frontend_port + or config.frontend_port + or constants.DefaultPorts.FRONTEND_PORT + ), + auto_increment=auto_increment_frontend, ) if backend: + auto_increment_backend = not bool(backend_port or config.backend_port) + backend_port = processes.handle_port( "backend", - backend_port, - constants.DefaultPorts.BACKEND_PORT, + ( + backend_port + or config.backend_port + or constants.DefaultPorts.BACKEND_PORT + ), + auto_increment=auto_increment_backend, ) # Apply the new ports to the config. @@ -246,7 +257,7 @@ def _run( # Start the frontend and backend. with processes.run_concurrently_context(*commands): # In dev mode, run the backend on the main thread. - if backend and env == constants.Env.DEV: + if backend and backend_port and env == constants.Env.DEV: backend_cmd( backend_host, int(backend_port), loglevel.subprocess_level(), frontend ) @@ -275,10 +286,14 @@ def run( envvar=environment.REFLEX_BACKEND_ONLY.name, ), frontend_port: int = typer.Option( - config.frontend_port, help="Specify a different frontend port." + config.frontend_port, + help="Specify a different frontend port.", + envvar=environment.REFLEX_FRONTEND_PORT.name, ), backend_port: int = typer.Option( - config.backend_port, help="Specify a different backend port." + config.backend_port, + help="Specify a different backend port.", + envvar=environment.REFLEX_BACKEND_PORT.name, ), backend_host: str = typer.Option( config.backend_host, help="Specify the backend host." diff --git a/reflex/utils/processes.py b/reflex/utils/processes.py index c92fb7d1a..a0c13300d 100644 --- a/reflex/utils/processes.py +++ b/reflex/utils/processes.py @@ -116,17 +116,14 @@ def change_port(port: int, _type: str) -> int: return new_port -def handle_port(service_name: str, port: int, default_port: int) -> int: +def handle_port(service_name: str, port: int, auto_increment: bool) -> int: """Change port if the specified port is in use and is not explicitly specified as a CLI arg or config arg. - otherwise tell the user the port is in use and exit the app. - - We make an assumption that when port is the default port,then it hasn't been explicitly set since its not straightforward - to know whether a port was explicitly provided by the user unless its any other than the default. + Otherwise tell the user the port is in use and exit the app. Args: service_name: The frontend or backend. port: The provided port. - default_port: The default port number associated with the specified service. + auto_increment: Whether to automatically increment the port. Returns: The port to run the service on. @@ -134,13 +131,15 @@ def handle_port(service_name: str, port: int, default_port: int) -> int: Raises: Exit:when the port is in use. """ - if is_process_on_port(port): - if port == int(default_port): - return change_port(port, service_name) - else: - console.error(f"{service_name.capitalize()} port: {port} is already in use") - raise typer.Exit() - return port + if (process := get_process_on_port(port)) is None: + return port + if auto_increment: + return change_port(port, service_name) + else: + console.error( + f"{service_name.capitalize()} port: {port} is already in use by PID: {process.pid}." + ) + raise typer.Exit() def new_process( From d79366d8b29047bb1f45ff05c9f99ecfe71fbfca Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 12 Feb 2025 14:51:58 -0800 Subject: [PATCH 120/144] benchmark experimentation (#4811) * benchmark experimentation * do the same for test_evaluate_page * import templates beforehands * add auto reload * disable extensions --- reflex/compiler/templates.py | 3 +-- tests/benchmarks/fixtures.py | 4 ++-- tests/benchmarks/test_compilation.py | 27 +++++++++++++++++---------- tests/benchmarks/test_evaluate.py | 13 +++++++++---- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/reflex/compiler/templates.py b/reflex/compiler/templates.py index 117b655a9..e85e5fe6d 100644 --- a/reflex/compiler/templates.py +++ b/reflex/compiler/templates.py @@ -48,11 +48,10 @@ class ReflexJinjaEnvironment(Environment): def __init__(self) -> None: """Set default environment.""" - extensions = ["jinja2.ext.debug"] super().__init__( - extensions=extensions, trim_blocks=True, lstrip_blocks=True, + auto_reload=False, ) self.filters["json_dumps"] = json_dumps self.filters["react_setter"] = lambda state: f"set{state.capitalize()}" diff --git a/tests/benchmarks/fixtures.py b/tests/benchmarks/fixtures.py index 16233100a..334d48282 100644 --- a/tests/benchmarks/fixtures.py +++ b/tests/benchmarks/fixtures.py @@ -374,10 +374,10 @@ def _stateful_page(): @pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page]) -def unevaluated_page(request): +def unevaluated_page(request: pytest.FixtureRequest): return request.param @pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page]) -def evaluated_page(request): +def evaluated_page(request: pytest.FixtureRequest): return request.param() diff --git a/tests/benchmarks/test_compilation.py b/tests/benchmarks/test_compilation.py index 0a20ed521..dbea81023 100644 --- a/tests/benchmarks/test_compilation.py +++ b/tests/benchmarks/test_compilation.py @@ -1,18 +1,25 @@ -import pytest +from pytest_codspeed import BenchmarkFixture from reflex.compiler.compiler import _compile_page, _compile_stateful_components +from reflex.components.component import Component -@pytest.mark.benchmark -def test_compile_page(evaluated_page): - _compile_page(evaluated_page, None) +def import_templates(): + # Importing the templates module to avoid the import time in the benchmark + import reflex.compiler.templates # noqa: F401 -@pytest.mark.benchmark -def test_compile_stateful(evaluated_page): - _compile_stateful_components([evaluated_page]) +def test_compile_page(evaluated_page: Component, benchmark: BenchmarkFixture): + import_templates() + + benchmark(lambda: _compile_page(evaluated_page, None)) -@pytest.mark.benchmark -def test_get_all_imports(evaluated_page): - evaluated_page._get_all_imports() +def test_compile_stateful(evaluated_page: Component, benchmark: BenchmarkFixture): + import_templates() + + benchmark(lambda: _compile_stateful_components([evaluated_page])) + + +def test_get_all_imports(evaluated_page: Component, benchmark: BenchmarkFixture): + benchmark(lambda: evaluated_page._get_all_imports()) diff --git a/tests/benchmarks/test_evaluate.py b/tests/benchmarks/test_evaluate.py index fbc75dea7..7fd75fc6c 100644 --- a/tests/benchmarks/test_evaluate.py +++ b/tests/benchmarks/test_evaluate.py @@ -1,6 +1,11 @@ -import pytest +from typing import Callable + +from pytest_codspeed import BenchmarkFixture + +from reflex.components.component import Component -@pytest.mark.benchmark -def test_evaluate_page(unevaluated_page): - unevaluated_page() +def test_evaluate_page( + unevaluated_page: Callable[[], Component], benchmark: BenchmarkFixture +): + benchmark(unevaluated_page) From 2ba73f7ff930a1cc3363851faad2cb9d7119c4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Thu, 13 Feb 2025 19:19:33 +0100 Subject: [PATCH 121/144] bump ruff to 0.9.6 (#4817) --- .pre-commit-config.yaml | 2 +- poetry.lock | 40 ++++++++++++++++++++-------------------- pyproject.toml | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0bad7b996..743f5f31a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ fail_fast: true repos: - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.9.3 + rev: v0.9.6 hooks: - id: ruff-format args: [reflex, tests] diff --git a/poetry.lock b/poetry.lock index b96749316..032bd2d4a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2415,31 +2415,31 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.9.3" +version = "0.9.6" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "ruff-0.9.3-py3-none-linux_armv6l.whl", hash = "sha256:7f39b879064c7d9670197d91124a75d118d00b0990586549949aae80cdc16624"}, - {file = "ruff-0.9.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a187171e7c09efa4b4cc30ee5d0d55a8d6c5311b3e1b74ac5cb96cc89bafc43c"}, - {file = "ruff-0.9.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c59ab92f8e92d6725b7ded9d4a31be3ef42688a115c6d3da9457a5bda140e2b4"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dc153c25e715be41bb228bc651c1e9b1a88d5c6e5ed0194fa0dfea02b026439"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:646909a1e25e0dc28fbc529eab8eb7bb583079628e8cbe738192853dbbe43af5"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a5a46e09355695fbdbb30ed9889d6cf1c61b77b700a9fafc21b41f097bfbba4"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c4bb09d2bbb394e3730d0918c00276e79b2de70ec2a5231cd4ebb51a57df9ba1"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96a87ec31dc1044d8c2da2ebbed1c456d9b561e7d087734336518181b26b3aa5"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb7554aca6f842645022fe2d301c264e6925baa708b392867b7a62645304df4"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cabc332b7075a914ecea912cd1f3d4370489c8018f2c945a30bcc934e3bc06a6"}, - {file = "ruff-0.9.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:33866c3cc2a575cbd546f2cd02bdd466fed65118e4365ee538a3deffd6fcb730"}, - {file = "ruff-0.9.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:006e5de2621304c8810bcd2ee101587712fa93b4f955ed0985907a36c427e0c2"}, - {file = "ruff-0.9.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ba6eea4459dbd6b1be4e6bfc766079fb9b8dd2e5a35aff6baee4d9b1514ea519"}, - {file = "ruff-0.9.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:90230a6b8055ad47d3325e9ee8f8a9ae7e273078a66401ac66df68943ced029b"}, - {file = "ruff-0.9.3-py3-none-win32.whl", hash = "sha256:eabe5eb2c19a42f4808c03b82bd313fc84d4e395133fb3fc1b1516170a31213c"}, - {file = "ruff-0.9.3-py3-none-win_amd64.whl", hash = "sha256:040ceb7f20791dfa0e78b4230ee9dce23da3b64dd5848e40e3bf3ab76468dcf4"}, - {file = "ruff-0.9.3-py3-none-win_arm64.whl", hash = "sha256:800d773f6d4d33b0a3c60e2c6ae8f4c202ea2de056365acfa519aa48acf28e0b"}, - {file = "ruff-0.9.3.tar.gz", hash = "sha256:8293f89985a090ebc3ed1064df31f3b4b56320cdfcec8b60d3295bddb955c22a"}, + {file = "ruff-0.9.6-py3-none-linux_armv6l.whl", hash = "sha256:2f218f356dd2d995839f1941322ff021c72a492c470f0b26a34f844c29cdf5ba"}, + {file = "ruff-0.9.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b908ff4df65dad7b251c9968a2e4560836d8f5487c2f0cc238321ed951ea0504"}, + {file = "ruff-0.9.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b109c0ad2ececf42e75fa99dc4043ff72a357436bb171900714a9ea581ddef83"}, + {file = "ruff-0.9.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1de4367cca3dac99bcbd15c161404e849bb0bfd543664db39232648dc00112dc"}, + {file = "ruff-0.9.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac3ee4d7c2c92ddfdaedf0bf31b2b176fa7aa8950efc454628d477394d35638b"}, + {file = "ruff-0.9.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5dc1edd1775270e6aa2386119aea692039781429f0be1e0949ea5884e011aa8e"}, + {file = "ruff-0.9.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:4a091729086dffa4bd070aa5dab7e39cc6b9d62eb2bef8f3d91172d30d599666"}, + {file = "ruff-0.9.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d1bbc6808bf7b15796cef0815e1dfb796fbd383e7dbd4334709642649625e7c5"}, + {file = "ruff-0.9.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:589d1d9f25b5754ff230dce914a174a7c951a85a4e9270613a2b74231fdac2f5"}, + {file = "ruff-0.9.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc61dd5131742e21103fbbdcad683a8813be0e3c204472d520d9a5021ca8b217"}, + {file = "ruff-0.9.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5e2d9126161d0357e5c8f30b0bd6168d2c3872372f14481136d13de9937f79b6"}, + {file = "ruff-0.9.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:68660eab1a8e65babb5229a1f97b46e3120923757a68b5413d8561f8a85d4897"}, + {file = "ruff-0.9.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c4cae6c4cc7b9b4017c71114115db0445b00a16de3bcde0946273e8392856f08"}, + {file = "ruff-0.9.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:19f505b643228b417c1111a2a536424ddde0db4ef9023b9e04a46ed8a1cb4656"}, + {file = "ruff-0.9.6-py3-none-win32.whl", hash = "sha256:194d8402bceef1b31164909540a597e0d913c0e4952015a5b40e28c146121b5d"}, + {file = "ruff-0.9.6-py3-none-win_amd64.whl", hash = "sha256:03482d5c09d90d4ee3f40d97578423698ad895c87314c4de39ed2af945633caa"}, + {file = "ruff-0.9.6-py3-none-win_arm64.whl", hash = "sha256:0e2bb706a2be7ddfea4a4af918562fdc1bcb16df255e5fa595bbd800ce322a5a"}, + {file = "ruff-0.9.6.tar.gz", hash = "sha256:81761592f72b620ec8fa1068a6fd00e98a5ebee342a3642efd84454f3031dca9"}, ] [[package]] @@ -3188,4 +3188,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.10, <4.0" -content-hash = "3b7e6e6e872c68f951f191d85a7d76fe1dd86caf32e2143a53a3152a3686fc7f" +content-hash = "7ae644e1c5b910f4fd0d8ab0b530818077a96e5d329b2be1269e967c6b0b3d25" diff --git a/pyproject.toml b/pyproject.toml index c192a1139..67611a867 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ dill = ">=0.3.8" toml = ">=0.10.2,<1.0" pytest-asyncio = ">=0.24.0" pytest-cov = ">=4.0.0,<7.0" -ruff = "0.9.3" +ruff = "0.9.6" pandas = ">=2.1.1,<3.0" pillow = ">=10.0.0,<12.0" plotly = ">=5.13.0,<6.0" From 10c45b185c597d1c7828715d9360a5e92a8b7fd2 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 12:44:27 -0800 Subject: [PATCH 122/144] adjust setter to include type annotation (#4726) * adjust setter to include type annotation * apparently this discovered some bugs * remove some pyright ignores * add str to int/float conversion * dang it darglint --- benchmarks/test_benchmark_compile_pages.py | 32 ++++++++++++++++------ reflex/state.py | 20 ++++++++++++-- reflex/vars/base.py | 4 ++- tests/integration/test_background_task.py | 10 +++++-- 4 files changed, 52 insertions(+), 14 deletions(-) diff --git a/benchmarks/test_benchmark_compile_pages.py b/benchmarks/test_benchmark_compile_pages.py index 149fc6130..6cf39f60c 100644 --- a/benchmarks/test_benchmark_compile_pages.py +++ b/benchmarks/test_benchmark_compile_pages.py @@ -46,10 +46,26 @@ def render_multiple_pages(app, num: int): class State(rx.State): """The app state.""" - position: str - college: str - age: Tuple[int, int] = (18, 50) - salary: Tuple[int, int] = (0, 25000000) + position: rx.Field[str] + college: rx.Field[str] + age: rx.Field[Tuple[int, int]] = rx.field((18, 50)) + salary: rx.Field[Tuple[int, int]] = rx.field((0, 25000000)) + + @rx.event + def set_position(self, value: str): + self.position = value + + @rx.event + def set_college(self, value: str): + self.college = value + + @rx.event + def set_age(self, value: list[int]): + self.age = (value[0], value[1]) + + @rx.event + def set_salary(self, value: list[int]): + self.salary = (value[0], value[1]) comp1 = rx.center( rx.theme_panel(), @@ -74,13 +90,13 @@ def render_multiple_pages(app, num: int): rx.select( ["C", "PF", "SF", "PG", "SG"], placeholder="Select a position. (All)", - on_change=State.set_position, # pyright: ignore [reportAttributeAccessIssue] + on_change=State.set_position, size="3", ), rx.select( college, placeholder="Select a college. (All)", - on_change=State.set_college, # pyright: ignore [reportAttributeAccessIssue] + on_change=State.set_college, size="3", ), ), @@ -95,7 +111,7 @@ def render_multiple_pages(app, num: int): default_value=[18, 50], min=18, max=50, - on_value_commit=State.set_age, # pyright: ignore [reportAttributeAccessIssue] + on_value_commit=State.set_age, ), align_items="left", width="100%", @@ -110,7 +126,7 @@ def render_multiple_pages(app, num: int): default_value=[0, 25000000], min=0, max=25000000, - on_value_commit=State.set_salary, # pyright: ignore [reportAttributeAccessIssue] + on_value_commit=State.set_salary, ), align_items="left", width="100%", diff --git a/reflex/state.py b/reflex/state.py index 92aaa4710..dceba7e3b 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -1742,6 +1742,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): Yields: StateUpdate object + + Raises: + ValueError: If a string value is received for an int or float type and cannot be converted. """ from reflex.utils import telemetry @@ -1779,12 +1782,25 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): hinted_args, (Base, BaseModelV1, BaseModelV2) ): payload[arg] = hinted_args(**value) - if isinstance(value, list) and (hinted_args is set or hinted_args is Set): + elif isinstance(value, list) and (hinted_args is set or hinted_args is Set): payload[arg] = set(value) - if isinstance(value, list) and ( + elif isinstance(value, list) and ( hinted_args is tuple or hinted_args is Tuple ): payload[arg] = tuple(value) + elif isinstance(value, str) and ( + hinted_args is int or hinted_args is float + ): + try: + payload[arg] = hinted_args(value) + except ValueError: + raise ValueError( + f"Received a string value ({value}) for {arg} but expected a {hinted_args}" + ) from None + else: + console.warn( + f"Received a string value ({value}) for {arg} but expected a {hinted_args}. A simple conversion was successful." + ) # Wrap the function in a try/except block. try: diff --git a/reflex/vars/base.py b/reflex/vars/base.py index a24db4010..593c60f3e 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -951,7 +951,7 @@ class Var(Generic[VAR_TYPE]): """ actual_name = self._var_field_name - def setter(state: BaseState, value: Any): + def setter(state: Any, value: Any): """Get the setter for the var. Args: @@ -969,6 +969,8 @@ class Var(Generic[VAR_TYPE]): else: setattr(state, actual_name, value) + setter.__annotations__["value"] = self._var_type + setter.__qualname__ = self._get_setter_name() return setter diff --git a/tests/integration/test_background_task.py b/tests/integration/test_background_task.py index f312f8122..91a1b5ae1 100644 --- a/tests/integration/test_background_task.py +++ b/tests/integration/test_background_task.py @@ -20,7 +20,11 @@ def BackgroundTask(): class State(rx.State): counter: int = 0 _task_id: int = 0 - iterations: int = 10 + iterations: rx.Field[int] = rx.field(10) + + @rx.event + def set_iterations(self, value: str): + self.iterations = int(value) @rx.event(background=True) async def handle_event(self): @@ -125,8 +129,8 @@ def BackgroundTask(): rx.input( id="iterations", placeholder="Iterations", - value=State.iterations.to_string(), # pyright: ignore [reportAttributeAccessIssue] - on_change=State.set_iterations, # pyright: ignore [reportAttributeAccessIssue] + value=State.iterations.to_string(), + on_change=State.set_iterations, ), rx.button( "Delayed Increment", From c6fb4e238d93c4383f1774055fcdc096f5f0fec6 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 12:44:42 -0800 Subject: [PATCH 123/144] improve into component conversion (#4754) * improve into component conversion * correct the order of .State --- reflex/app.py | 4 ++- reflex/compiler/compiler.py | 55 +++++++++++++++++++++++++++++-------- reflex/state.py | 3 ++ 3 files changed, 50 insertions(+), 12 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index d290b8f49..67d4f5b91 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -591,7 +591,9 @@ class App(MiddlewareMixin, LifespanMixin): Returns: The generated component. """ - return component if isinstance(component, Component) else component() + from reflex.compiler.compiler import into_component + + return into_component(component) def add_page( self, diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 7cd87fb71..667a477e8 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -4,7 +4,7 @@ from __future__ import annotations from datetime import datetime from pathlib import Path -from typing import TYPE_CHECKING, Dict, Iterable, Optional, Tuple, Type, Union +from typing import TYPE_CHECKING, Dict, Iterable, Optional, Sequence, Tuple, Type, Union from reflex import constants from reflex.compiler import templates, utils @@ -545,7 +545,47 @@ def purge_web_pages_dir(): if TYPE_CHECKING: - from reflex.app import UnevaluatedPage + from reflex.app import ComponentCallable, UnevaluatedPage + + +def _into_component_once(component: Component | ComponentCallable) -> Component | None: + """Convert a component to a Component. + + Args: + component: The component to convert. + + Returns: + The converted component. + """ + if isinstance(component, Component): + return component + if isinstance(component, (Var, int, float, str)): + return Fragment.create(component) + if isinstance(component, Sequence): + return Fragment.create(*component) + return None + + +def into_component(component: Component | ComponentCallable) -> Component: + """Convert a component to a Component. + + Args: + component: The component to convert. + + Returns: + The converted component. + + Raises: + TypeError: If the component is not a Component. + """ + if (converted := _into_component_once(component)) is not None: + return converted + if ( + callable(component) + and (converted := _into_component_once(component())) is not None + ): + return converted + raise TypeError(f"Expected a Component, got {type(component)}") def compile_unevaluated_page( @@ -568,12 +608,7 @@ def compile_unevaluated_page( The compiled component and whether state should be enabled. """ # Generate the component if it is a callable. - component = page.component - component = component if isinstance(component, Component) else component() - - # unpack components that return tuples in an rx.fragment. - if isinstance(component, tuple): - component = Fragment.create(*component) + component = into_component(page.component) component._add_style_recursive(style or {}, theme) @@ -678,10 +713,8 @@ class ExecutorSafeFunctions: The route, compiled component, and compiled page. """ component, enable_state = compile_unevaluated_page( - route, cls.UNCOMPILED_PAGES[route] + route, cls.UNCOMPILED_PAGES[route], cls.STATE, style, theme ) - component = component if isinstance(component, Component) else component() - component._add_style_recursive(style, theme) return route, component, compile_page(route, component, cls.STATE) @classmethod diff --git a/reflex/state.py b/reflex/state.py index dceba7e3b..77c352cfa 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -2475,6 +2475,8 @@ class ComponentState(State, mixin=True): Returns: A new instance of the Component with an independent copy of the State. """ + from reflex.compiler.compiler import into_component + cls._per_component_state_instance_count += 1 state_cls_name = f"{cls.__name__}_n{cls._per_component_state_instance_count}" component_state = type( @@ -2486,6 +2488,7 @@ class ComponentState(State, mixin=True): # Save a reference to the dynamic state for pickle/unpickle. setattr(reflex.istate.dynamic, state_cls_name, component_state) component = component_state.get_component(*children, **props) + component = into_component(component) component.State = component_state return component From 40294a7c9e68f2355bc71e2ccb9be1473c11b533 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 13:36:59 -0800 Subject: [PATCH 124/144] standarize filename from upload (#4734) * standarize filename from upload * all my friends hate fast api upload file * make deprecated filename private * lstrip the "/" Co-authored-by: Masen Furer --------- Co-authored-by: Masen Furer --- reflex/app.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 67d4f5b91..2c8e889fc 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -22,6 +22,7 @@ from typing import ( TYPE_CHECKING, Any, AsyncIterator, + BinaryIO, Callable, Coroutine, Dict, @@ -35,12 +36,15 @@ from typing import ( get_type_hints, ) -from fastapi import FastAPI, HTTPException, Request, UploadFile +from fastapi import FastAPI, HTTPException, Request +from fastapi import UploadFile as FastAPIUploadFile from fastapi.middleware import cors from fastapi.responses import JSONResponse, StreamingResponse from fastapi.staticfiles import StaticFiles from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn from socketio import ASGIApp, AsyncNamespace, AsyncServer +from starlette.datastructures import Headers +from starlette.datastructures import UploadFile as StarletteUploadFile from starlette_admin.contrib.sqla.admin import Admin from starlette_admin.contrib.sqla.view import ModelView @@ -231,6 +235,53 @@ class OverlayFragment(Fragment): pass +@dataclasses.dataclass(frozen=True) +class UploadFile(StarletteUploadFile): + """A file uploaded to the server. + + Args: + file: The standard Python file object (non-async). + filename: The original file name. + size: The size of the file in bytes. + headers: The headers of the request. + """ + + file: BinaryIO + + path: Optional[Path] = dataclasses.field(default=None) + + _deprecated_filename: Optional[str] = dataclasses.field(default=None) + + size: Optional[int] = dataclasses.field(default=None) + + headers: Headers = dataclasses.field(default_factory=Headers) + + @property + def name(self) -> Optional[str]: + """Get the name of the uploaded file. + + Returns: + The name of the uploaded file. + """ + if self.path: + return self.path.name + + @property + def filename(self) -> Optional[str]: + """Get the filename of the uploaded file. + + Returns: + The filename of the uploaded file. + """ + console.deprecate( + feature_name="UploadFile.filename", + reason="Use UploadFile.name instead.", + deprecation_version="0.7.1", + removal_version="0.8.0", + ) + return self._deprecated_filename + + @dataclasses.dataclass( frozen=True, ) @@ -1585,7 +1636,7 @@ def upload(app: App): The upload function. """ - async def upload_file(request: Request, files: List[UploadFile]): + async def upload_file(request: Request, files: List[FastAPIUploadFile]): """Upload a file. Args: @@ -1661,7 +1712,8 @@ def upload(app: App): file_copies.append( UploadFile( file=content_copy, - filename=file.filename, + path=Path(file.filename.lstrip("/")) if file.filename else None, + _deprecated_filename=file.filename, size=file.size, headers=file.headers, ) From 6fb491471bc845ec8a556cb82509cf8bb084cbd3 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 13:44:02 -0800 Subject: [PATCH 125/144] cache get_type_hints for environment (#4820) --- reflex/config.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/reflex/config.py b/reflex/config.py index 233087938..33009b3bc 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -10,6 +10,7 @@ import os import sys import threading import urllib.parse +from functools import lru_cache from importlib.util import find_spec from pathlib import Path from types import ModuleType @@ -408,6 +409,19 @@ class EnvVar(Generic[T]): os.environ[self.name] = str_value +@lru_cache() +def get_type_hints_environment(cls: type) -> dict[str, Any]: + """Get the type hints for the environment variables. + + Args: + cls: The class. + + Returns: + The type hints. + """ + return get_type_hints(cls) + + class env_var: # noqa: N801 # pyright: ignore [reportRedeclaration] """Descriptor for environment variables.""" @@ -434,7 +448,9 @@ class env_var: # noqa: N801 # pyright: ignore [reportRedeclaration] """ self.name = name - def __get__(self, instance: Any, owner: Any): + def __get__( + self, instance: EnvironmentVariables, owner: type[EnvironmentVariables] + ): """Get the EnvVar instance. Args: @@ -444,7 +460,7 @@ class env_var: # noqa: N801 # pyright: ignore [reportRedeclaration] Returns: The EnvVar instance. """ - type_ = get_args(get_type_hints(owner)[self.name])[0] + type_ = get_args(get_type_hints_environment(owner)[self.name])[0] env_name = self.name if self.internal: env_name = f"__{env_name}" From aac61c69c2c2fdcb37f3cc67cab92623386c239f Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 15:40:01 -0800 Subject: [PATCH 126/144] actually get rid of callable var fr fr (#4821) --- reflex/components/core/upload.py | 4 +- reflex/components/core/upload.pyi | 4 +- reflex/components/radix/themes/color_mode.py | 2 +- reflex/style.py | 3 +- reflex/vars/base.py | 55 ------------------- tests/integration/test_upload.py | 2 +- .../tests_playwright/test_appearance.py | 2 +- 7 files changed, 6 insertions(+), 66 deletions(-) diff --git a/reflex/components/core/upload.py b/reflex/components/core/upload.py index 897b89608..6c86d3c44 100644 --- a/reflex/components/core/upload.py +++ b/reflex/components/core/upload.py @@ -29,7 +29,7 @@ from reflex.event import ( from reflex.utils import format from reflex.utils.imports import ImportVar from reflex.vars import VarData -from reflex.vars.base import CallableVar, Var, get_unique_variable_name +from reflex.vars.base import Var, get_unique_variable_name from reflex.vars.sequence import LiteralStringVar DEFAULT_UPLOAD_ID: str = "default" @@ -45,7 +45,6 @@ upload_files_context_var_data: VarData = VarData( ) -@CallableVar def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> Var: """Get the file upload drop trigger. @@ -75,7 +74,6 @@ def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> Var: ) -@CallableVar def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> Var: """Get the list of selected files. diff --git a/reflex/components/core/upload.pyi b/reflex/components/core/upload.pyi index 6ed96a15e..d1ddceb4d 100644 --- a/reflex/components/core/upload.pyi +++ b/reflex/components/core/upload.pyi @@ -13,14 +13,12 @@ from reflex.event import CallableEventSpec, EventSpec, EventType from reflex.style import Style from reflex.utils.imports import ImportVar from reflex.vars import VarData -from reflex.vars.base import CallableVar, Var +from reflex.vars.base import Var DEFAULT_UPLOAD_ID: str upload_files_context_var_data: VarData -@CallableVar def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> Var: ... -@CallableVar def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> Var: ... @CallableEventSpec def clear_selected_files(id_: str = DEFAULT_UPLOAD_ID) -> EventSpec: ... diff --git a/reflex/components/radix/themes/color_mode.py b/reflex/components/radix/themes/color_mode.py index d9b7c0b02..0718aaac9 100644 --- a/reflex/components/radix/themes/color_mode.py +++ b/reflex/components/radix/themes/color_mode.py @@ -144,7 +144,7 @@ class ColorModeIconButton(IconButton): if allow_system: - def color_mode_item(_color_mode: str): + def color_mode_item(_color_mode: Literal["light", "dark", "system"]): return dropdown_menu.item( _color_mode.title(), on_click=set_color_mode(_color_mode) ) diff --git a/reflex/style.py b/reflex/style.py index 192835ca3..1d818ed06 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -12,7 +12,7 @@ from reflex.utils.exceptions import ReflexError from reflex.utils.imports import ImportVar from reflex.utils.types import get_origin from reflex.vars import VarData -from reflex.vars.base import CallableVar, LiteralVar, Var +from reflex.vars.base import LiteralVar, Var from reflex.vars.function import FunctionVar from reflex.vars.object import ObjectVar @@ -48,7 +48,6 @@ def _color_mode_var(_js_expr: str, _var_type: Type = str) -> Var: ).guess_type() -@CallableVar def set_color_mode( new_color_mode: LiteralColorMode | Var[LiteralColorMode] | None = None, ) -> Var[EventChain]: diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 593c60f3e..a6786b18a 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -1903,61 +1903,6 @@ def _or_operation(a: Var, b: Var): ) -@dataclasses.dataclass( - eq=False, - frozen=True, - slots=True, -) -class CallableVar(Var): - """Decorate a Var-returning function to act as both a Var and a function. - - This is used as a compatibility shim for replacing Var objects in the - API with functions that return a family of Var. - """ - - fn: Callable[..., Var] = dataclasses.field( - default_factory=lambda: lambda: Var(_js_expr="undefined") - ) - original_var: Var = dataclasses.field( - default_factory=lambda: Var(_js_expr="undefined") - ) - - def __init__(self, fn: Callable[..., Var]): - """Initialize a CallableVar. - - Args: - fn: The function to decorate (must return Var) - """ - original_var = fn() - super(CallableVar, self).__init__( - _js_expr=original_var._js_expr, - _var_type=original_var._var_type, - _var_data=VarData.merge(original_var._get_all_var_data()), - ) - object.__setattr__(self, "fn", fn) - object.__setattr__(self, "original_var", original_var) - - def __call__(self, *args: Any, **kwargs: Any) -> Var: - """Call the decorated function. - - Args: - *args: The args to pass to the function. - **kwargs: The kwargs to pass to the function. - - Returns: - The Var returned from calling the function. - """ - return self.fn(*args, **kwargs) - - def __hash__(self) -> int: - """Calculate the hash of the object. - - Returns: - The hash of the object. - """ - return hash((type(self).__name__, self.original_var)) - - RETURN_TYPE = TypeVar("RETURN_TYPE") DICT_KEY = TypeVar("DICT_KEY") diff --git a/tests/integration/test_upload.py b/tests/integration/test_upload.py index e20b1cd6d..471382570 100644 --- a/tests/integration/test_upload.py +++ b/tests/integration/test_upload.py @@ -87,7 +87,7 @@ def UploadFile(): ), rx.box( rx.foreach( - rx.selected_files, + rx.selected_files(), lambda f: rx.text(f, as_="p"), ), id="selected_files", diff --git a/tests/integration/tests_playwright/test_appearance.py b/tests/integration/tests_playwright/test_appearance.py index d325b183f..0b1440ed1 100644 --- a/tests/integration/tests_playwright/test_appearance.py +++ b/tests/integration/tests_playwright/test_appearance.py @@ -61,7 +61,7 @@ def ColorToggleApp(): rx.icon(tag="moon", size=20), value="dark", ), - on_change=set_color_mode, + on_change=set_color_mode(), variant="classic", radius="large", value=color_mode, From b44bbc81a0a707ded71c9f0d0a9d4afb0c308bdd Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 15:54:10 -0800 Subject: [PATCH 127/144] import var perf improvements (#4813) * import var perf improvements * use tuples over iterator * the only thing that matters * maybe tuple map is faster than tuple list comprehension * do it in one list comprehension --- reflex/components/component.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index d27bddf78..005f7791d 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -51,13 +51,7 @@ from reflex.event import ( ) from reflex.style import Style, format_as_emotion from reflex.utils import format, imports, types -from reflex.utils.imports import ( - ImmutableParsedImportDict, - ImportDict, - ImportVar, - ParsedImportDict, - parse_imports, -) +from reflex.utils.imports import ImportDict, ImportVar, ParsedImportDict, parse_imports from reflex.vars import VarData from reflex.vars.base import ( CachedVarOperation, @@ -1208,7 +1202,7 @@ class Component(BaseComponent, ABC): Returns: True if the dependency should be transpiled. """ - return ( + return bool(self.transpile_packages) and ( dep in self.transpile_packages or format.format_library_name(dep or "") in self.transpile_packages ) @@ -1291,9 +1285,10 @@ class Component(BaseComponent, ABC): event_imports = Imports.EVENTS if self.event_triggers else {} # Collect imports from Vars used directly by this component. - var_datas = [var._get_all_var_data() for var in self._get_vars()] - var_imports: List[ImmutableParsedImportDict] = [ - var_data.imports for var_data in var_datas if var_data is not None + var_imports = [ + var_data.imports + for var in self._get_vars() + if (var_data := var._get_all_var_data()) is not None ] added_import_dicts: list[ParsedImportDict] = [] From 8e579efe47e4e1a7ba6e61c00166a55ed36eff5f Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 16:17:06 -0800 Subject: [PATCH 128/144] remove some benchmarks from CI (#4812) --- .github/workflows/benchmarks.yml | 50 -- .github/workflows/integration_tests.yml | 32 - .../test_benchmark_compile_components.py | 376 ----------- benchmarks/test_benchmark_compile_pages.py | 595 ------------------ 4 files changed, 1053 deletions(-) delete mode 100644 benchmarks/test_benchmark_compile_components.py delete mode 100644 benchmarks/test_benchmark_compile_pages.py diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 6da40ef6f..b794106e1 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -70,56 +70,6 @@ jobs: env: GITHUB_SHA: ${{ github.sha }} - simple-apps-benchmarks: # This app tests the compile times of various compoonents and pages - if: github.event.pull_request.merged == true - env: - OUTPUT_FILE: benchmarks.json - timeout-minutes: 50 - strategy: - # Prioritize getting more information out of the workflow (even if something fails) - fail-fast: false - matrix: - # Show OS combos first in GUI - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.10.16", "3.11.11", "3.12.8"] - exclude: - - os: windows-latest - python-version: "3.10.16" - - os: windows-latest - python-version: "3.11.11" - # keep only one python version for MacOS - - os: macos-latest - python-version: "3.10.16" - - os: macos-latest - python-version: "3.11.11" - include: - - os: windows-latest - python-version: "3.10.11" - - os: windows-latest - python-version: "3.11.9" - - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup_build_env - with: - python-version: ${{ matrix.python-version }} - run-poetry-install: true - create-venv-at-path: .venv - - name: Run benchmark tests - env: - APP_HARNESS_HEADLESS: 1 - PYTHONUNBUFFERED: 1 - run: | - poetry run pytest -v benchmarks/ --benchmark-json=${{ env.OUTPUT_FILE }} -s - - name: Upload benchmark results - # Only run if the database creds are available in this context. - run: - poetry run python benchmarks/benchmark_compile_times.py --os "${{ matrix.os }}" - --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" - --benchmark-json "${{ env.OUTPUT_FILE }}" --branch-name "${{ github.head_ref || github.ref_name }}" - --event-type "${{ github.event_name }}" --pr-id "${{ github.event.pull_request.id }}" - reflex-dist-size: # This job is used to calculate the size of the Reflex distribution (wheel file) if: github.event.pull_request.merged == true timeout-minutes: 30 diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index b02604fd6..dc5a14d88 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -94,26 +94,6 @@ jobs: # Check that npm is home npm -v poetry run bash scripts/integration.sh ./reflex-examples/counter dev - - name: Measure and upload .web size - run: - poetry run python benchmarks/benchmark_web_size.py --os "${{ matrix.os }}" - --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" - --pr-id "${{ github.event.pull_request.id }}" - --branch-name "${{ github.head_ref || github.ref_name }}" - --path ./reflex-examples/counter/.web - --app-name "counter" - - name: Install hyperfine - run: cargo install hyperfine - - name: Benchmark imports - working-directory: ./reflex-examples/counter - run: hyperfine --warmup 3 "export POETRY_VIRTUALENVS_PATH=../../.venv; poetry run python counter/counter.py" --show-output --export-json "${{ env.OUTPUT_FILE }}" --shell bash - - name: Upload Benchmarks - run: - poetry run python benchmarks/benchmark_imports.py --os "${{ matrix.os }}" - --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" - --benchmark-json "./reflex-examples/counter/${{ env.OUTPUT_FILE }}" - --branch-name "${{ github.head_ref || github.ref_name }}" --pr-id "${{ github.event.pull_request.id }}" - --app-name "counter" - name: Install requirements for nba proxy example working-directory: ./reflex-examples/nba-proxy run: | @@ -174,12 +154,6 @@ jobs: # Check that npm is home npm -v poetry run bash scripts/integration.sh ./reflex-web prod - - name: Measure and upload .web size - run: - poetry run python benchmarks/benchmark_web_size.py --os "${{ matrix.os }}" - --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" - --pr-id "${{ github.event.pull_request.id }}" --branch-name "${{ github.head_ref || github.ref_name }}" - --app-name "reflex-web" --path ./reflex-web/.web rx-shout-from-template: strategy: @@ -243,9 +217,3 @@ jobs: # Check that npm is home npm -v poetry run bash scripts/integration.sh ./reflex-web prod - - name: Measure and upload .web size - run: - poetry run python benchmarks/benchmark_web_size.py --os "${{ matrix.os }}" - --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" - --pr-id "${{ github.event.pull_request.id }}" --branch-name "${{ github.head_ref || github.ref_name }}" - --app-name "reflex-web" --path ./reflex-web/.web diff --git a/benchmarks/test_benchmark_compile_components.py b/benchmarks/test_benchmark_compile_components.py deleted file mode 100644 index 9bcfbf85b..000000000 --- a/benchmarks/test_benchmark_compile_components.py +++ /dev/null @@ -1,376 +0,0 @@ -"""Benchmark tests for apps with varying component numbers.""" - -from __future__ import annotations - -import functools -import time -from typing import Generator - -import pytest - -from benchmarks import WINDOWS_SKIP_REASON -from reflex import constants -from reflex.compiler import utils -from reflex.testing import AppHarness, chdir -from reflex.utils import build -from reflex.utils.prerequisites import get_web_dir - -web_pages = get_web_dir() / constants.Dirs.PAGES - - -def render_component(num: int): - """Generate a number of components based on num. - - Args: - num: number of components to produce. - - Returns: - The rendered number of components. - """ - import reflex as rx - - return [ - rx.fragment( - rx.box( - rx.accordion.root( - rx.accordion.item( - header="Full Ingredients", - content="Yes. It's built with accessibility in mind.", - font_size="3em", - ), - rx.accordion.item( - header="Applications", - content="Yes. It's unstyled by default, giving you freedom over the look and feel.", - ), - collapsible=True, - variant="ghost", - width="25rem", - ), - padding_top="20px", - ), - rx.box( - rx.drawer.root( - rx.drawer.trigger( - rx.button("Open Drawer with snap points"), as_child=True - ), - rx.drawer.overlay(), - rx.drawer.portal( - rx.drawer.content( - rx.flex( - rx.drawer.title("Drawer Content"), - rx.drawer.description("Drawer description"), - rx.drawer.close( - rx.button("Close Button"), - as_child=True, - ), - direction="column", - margin="5em", - align_items="center", - ), - top="auto", - height="100%", - flex_direction="column", - background_color="var(--green-3)", - ), - ), - snap_points=["148px", "355px", 1], - ), - ), - rx.box( - rx.callout( - "You will need admin privileges to install and access this application.", - icon="info", - size="3", - ), - ), - rx.box( - rx.table.root( - rx.table.header( - rx.table.row( - rx.table.column_header_cell("Full name"), - rx.table.column_header_cell("Email"), - rx.table.column_header_cell("Group"), - ), - ), - rx.table.body( - rx.table.row( - rx.table.row_header_cell("Danilo Sousa"), - rx.table.cell("danilo@example.com"), - rx.table.cell("Developer"), - ), - rx.table.row( - rx.table.row_header_cell("Zahra Ambessa"), - rx.table.cell("zahra@example.com"), - rx.table.cell("Admin"), - ), - rx.table.row( - rx.table.row_header_cell("Jasper Eriksson"), - rx.table.cell("jasper@example.com"), - rx.table.cell("Developer"), - ), - ), - ) - ), - ) - ] * num - - -def AppWithTenComponentsOnePage(): - """A reflex app with roughly 10 components on one page.""" - import reflex as rx - - def index() -> rx.Component: - return rx.center(rx.vstack(*render_component(1))) - - app = rx.App(_state=rx.State) - app.add_page(index) - - -def AppWithHundredComponentOnePage(): - """A reflex app with roughly 100 components on one page.""" - import reflex as rx - - def index() -> rx.Component: - return rx.center(rx.vstack(*render_component(100))) - - app = rx.App(_state=rx.State) - app.add_page(index) - - -def AppWithThousandComponentsOnePage(): - """A reflex app with roughly 1000 components on one page.""" - import reflex as rx - - def index() -> rx.Component: - return rx.center(rx.vstack(*render_component(1000))) - - app = rx.App(_state=rx.State) - app.add_page(index) - - -@pytest.fixture(scope="session") -def app_with_10_components( - tmp_path_factory, -) -> Generator[AppHarness, None, None]: - """Start Blank Template app at tmp_path via AppHarness. - - Args: - tmp_path_factory: pytest tmp_path_factory fixture - - Yields: - running AppHarness instance - """ - root = tmp_path_factory.mktemp("app10components") - - yield AppHarness.create( - root=root, - app_source=functools.partial( - AppWithTenComponentsOnePage, - render_component=render_component, # pyright: ignore [reportCallIssue] - ), - ) - - -@pytest.fixture(scope="session") -def app_with_100_components( - tmp_path_factory, -) -> Generator[AppHarness, None, None]: - """Start Blank Template app at tmp_path via AppHarness. - - Args: - tmp_path_factory: pytest tmp_path_factory fixture - - Yields: - running AppHarness instance - """ - root = tmp_path_factory.mktemp("app100components") - - yield AppHarness.create( - root=root, - app_source=functools.partial( - AppWithHundredComponentOnePage, - render_component=render_component, # pyright: ignore [reportCallIssue] - ), - ) - - -@pytest.fixture(scope="session") -def app_with_1000_components( - tmp_path_factory, -) -> Generator[AppHarness, None, None]: - """Create an app with 1000 components at tmp_path via AppHarness. - - Args: - tmp_path_factory: pytest tmp_path_factory fixture - - Yields: - an AppHarness instance - """ - root = tmp_path_factory.mktemp("app1000components") - - yield AppHarness.create( - root=root, - app_source=functools.partial( - AppWithThousandComponentsOnePage, - render_component=render_component, # pyright: ignore [reportCallIssue] - ), - ) - - -@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) -@pytest.mark.benchmark( - group="Compile time of varying component numbers", - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_10_compile_time_cold(benchmark, app_with_10_components): - """Test the compile time on a cold start for an app with roughly 10 components. - - Args: - benchmark: The benchmark fixture. - app_with_10_components: The app harness. - """ - - def setup(): - with chdir(app_with_10_components.app_path): - utils.empty_dir(web_pages, ["_app.js"]) - app_with_10_components._initialize_app() - build.setup_frontend(app_with_10_components.app_path) - - def benchmark_fn(): - with chdir(app_with_10_components.app_path): - app_with_10_components.app_instance._compile() - - benchmark.pedantic(benchmark_fn, setup=setup, rounds=10) - - -@pytest.mark.benchmark( - group="Compile time of varying component numbers", - min_rounds=5, - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_10_compile_time_warm(benchmark, app_with_10_components): - """Test the compile time on a warm start for an app with roughly 10 components. - - Args: - benchmark: The benchmark fixture. - app_with_10_components: The app harness. - """ - with chdir(app_with_10_components.app_path): - app_with_10_components._initialize_app() - build.setup_frontend(app_with_10_components.app_path) - - def benchmark_fn(): - with chdir(app_with_10_components.app_path): - app_with_10_components.app_instance._compile() - - benchmark(benchmark_fn) - - -@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) -@pytest.mark.benchmark( - group="Compile time of varying component numbers", - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_100_compile_time_cold(benchmark, app_with_100_components): - """Test the compile time on a cold start for an app with roughly 100 components. - - Args: - benchmark: The benchmark fixture. - app_with_100_components: The app harness. - """ - - def setup(): - with chdir(app_with_100_components.app_path): - utils.empty_dir(web_pages, ["_app.js"]) - app_with_100_components._initialize_app() - build.setup_frontend(app_with_100_components.app_path) - - def benchmark_fn(): - with chdir(app_with_100_components.app_path): - app_with_100_components.app_instance._compile() - - benchmark.pedantic(benchmark_fn, setup=setup, rounds=5) - - -@pytest.mark.benchmark( - group="Compile time of varying component numbers", - min_rounds=5, - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_100_compile_time_warm(benchmark, app_with_100_components): - """Test the compile time on a warm start for an app with roughly 100 components. - - Args: - benchmark: The benchmark fixture. - app_with_100_components: The app harness. - """ - with chdir(app_with_100_components.app_path): - app_with_100_components._initialize_app() - build.setup_frontend(app_with_100_components.app_path) - - def benchmark_fn(): - with chdir(app_with_100_components.app_path): - app_with_100_components.app_instance._compile() - - benchmark(benchmark_fn) - - -@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) -@pytest.mark.benchmark( - group="Compile time of varying component numbers", - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_1000_compile_time_cold(benchmark, app_with_1000_components): - """Test the compile time on a cold start for an app with roughly 1000 components. - - Args: - benchmark: The benchmark fixture. - app_with_1000_components: The app harness. - """ - - def setup(): - with chdir(app_with_1000_components.app_path): - utils.empty_dir(web_pages, keep_files=["_app.js"]) - app_with_1000_components._initialize_app() - build.setup_frontend(app_with_1000_components.app_path) - - def benchmark_fn(): - with chdir(app_with_1000_components.app_path): - app_with_1000_components.app_instance._compile() - - benchmark.pedantic(benchmark_fn, setup=setup, rounds=5) - - -@pytest.mark.benchmark( - group="Compile time of varying component numbers", - min_rounds=5, - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_1000_compile_time_warm(benchmark, app_with_1000_components): - """Test the compile time on a warm start for an app with roughly 1000 components. - - Args: - benchmark: The benchmark fixture. - app_with_1000_components: The app harness. - """ - with chdir(app_with_1000_components.app_path): - app_with_1000_components._initialize_app() - build.setup_frontend(app_with_1000_components.app_path) - - def benchmark_fn(): - with chdir(app_with_1000_components.app_path): - app_with_1000_components.app_instance._compile() - - benchmark(benchmark_fn) diff --git a/benchmarks/test_benchmark_compile_pages.py b/benchmarks/test_benchmark_compile_pages.py deleted file mode 100644 index 6cf39f60c..000000000 --- a/benchmarks/test_benchmark_compile_pages.py +++ /dev/null @@ -1,595 +0,0 @@ -"""Benchmark tests for apps with varying page numbers.""" - -from __future__ import annotations - -import functools -import time -from typing import Generator - -import pytest - -from benchmarks import WINDOWS_SKIP_REASON -from reflex import constants -from reflex.compiler import utils -from reflex.testing import AppHarness, chdir -from reflex.utils import build -from reflex.utils.prerequisites import get_web_dir - -web_pages = get_web_dir() / constants.Dirs.PAGES - - -def render_multiple_pages(app, num: int): - """Add multiple pages based on num. - - Args: - app: The App object. - num: number of pages to render. - - """ - from typing import Tuple - - from rxconfig import config # pyright: ignore [reportMissingImports] - - import reflex as rx - - docs_url = "https://reflex.dev/docs/getting-started/introduction/" - filename = f"{config.app_name}/{config.app_name}.py" - college = [ - "Stanford University", - "Arizona", - "Arizona state", - "Baylor", - "Boston College", - "Boston University", - ] - - class State(rx.State): - """The app state.""" - - position: rx.Field[str] - college: rx.Field[str] - age: rx.Field[Tuple[int, int]] = rx.field((18, 50)) - salary: rx.Field[Tuple[int, int]] = rx.field((0, 25000000)) - - @rx.event - def set_position(self, value: str): - self.position = value - - @rx.event - def set_college(self, value: str): - self.college = value - - @rx.event - def set_age(self, value: list[int]): - self.age = (value[0], value[1]) - - @rx.event - def set_salary(self, value: list[int]): - self.salary = (value[0], value[1]) - - comp1 = rx.center( - rx.theme_panel(), - rx.vstack( - rx.heading("Welcome to Reflex!", size="9"), - rx.text("Get started by editing ", rx.code(filename)), - rx.button( - "Check out our docs!", - on_click=lambda: rx.redirect(docs_url), - size="4", - ), - align="center", - spacing="7", - font_size="2em", - ), - height="100vh", - ) - - comp2 = rx.vstack( - rx.hstack( - rx.vstack( - rx.select( - ["C", "PF", "SF", "PG", "SG"], - placeholder="Select a position. (All)", - on_change=State.set_position, - size="3", - ), - rx.select( - college, - placeholder="Select a college. (All)", - on_change=State.set_college, - size="3", - ), - ), - rx.vstack( - rx.vstack( - rx.hstack( - rx.badge("Min Age: ", State.age[0]), - rx.divider(orientation="vertical"), - rx.badge("Max Age: ", State.age[1]), - ), - rx.slider( - default_value=[18, 50], - min=18, - max=50, - on_value_commit=State.set_age, - ), - align_items="left", - width="100%", - ), - rx.vstack( - rx.hstack( - rx.badge("Min Sal: ", State.salary[0] // 1000000, "M"), - rx.divider(orientation="vertical"), - rx.badge("Max Sal: ", State.salary[1] // 1000000, "M"), - ), - rx.slider( - default_value=[0, 25000000], - min=0, - max=25000000, - on_value_commit=State.set_salary, - ), - align_items="left", - width="100%", - ), - ), - spacing="4", - ), - width="100%", - ) - - for i in range(1, num + 1): - if i % 2 == 1: - app.add_page(comp1, route=f"page{i}") - else: - app.add_page(comp2, route=f"page{i}") - - -def AppWithOnePage(): - """A reflex app with one page.""" - from rxconfig import config # pyright: ignore [reportMissingImports] - - import reflex as rx - - docs_url = "https://reflex.dev/docs/getting-started/introduction/" - filename = f"{config.app_name}/{config.app_name}.py" - - class State(rx.State): - """The app state.""" - - pass - - def index() -> rx.Component: - return rx.center( - rx.input( - id="token", value=State.router.session.client_token, is_read_only=True - ), - rx.vstack( - rx.heading("Welcome to Reflex!", size="9"), - rx.text("Get started by editing ", rx.code(filename)), - rx.button( - "Check out our docs!", - on_click=lambda: rx.redirect(docs_url), - size="4", - ), - align="center", - spacing="7", - font_size="2em", - ), - height="100vh", - ) - - app = rx.App(_state=rx.State) - app.add_page(index) - - -def AppWithTenPages(): - """A reflex app with 10 pages.""" - import reflex as rx - - app = rx.App(_state=rx.State) - render_multiple_pages(app, 10) - - -def AppWithHundredPages(): - """A reflex app with 100 pages.""" - import reflex as rx - - app = rx.App(_state=rx.State) - render_multiple_pages(app, 100) - - -def AppWithThousandPages(): - """A reflex app with Thousand pages.""" - import reflex as rx - - app = rx.App(_state=rx.State) - render_multiple_pages(app, 1000) - - -def AppWithTenThousandPages(): - """A reflex app with ten thousand pages.""" - import reflex as rx - - app = rx.App(_state=rx.State) - render_multiple_pages(app, 10000) - - -@pytest.fixture(scope="session") -def app_with_one_page( - tmp_path_factory, -) -> Generator[AppHarness, None, None]: - """Create an app with 10000 pages at tmp_path via AppHarness. - - Args: - tmp_path_factory: pytest tmp_path_factory fixture - - Yields: - an AppHarness instance - """ - root = tmp_path_factory.mktemp("app1") - - yield AppHarness.create(root=root, app_source=AppWithOnePage) - - -@pytest.fixture(scope="session") -def app_with_ten_pages( - tmp_path_factory, -) -> Generator[AppHarness, None, None]: - """Create an app with 10 pages at tmp_path via AppHarness. - - Args: - tmp_path_factory: pytest tmp_path_factory fixture - - Yields: - an AppHarness instance - """ - root = tmp_path_factory.mktemp("app10") - yield AppHarness.create( - root=root, - app_source=functools.partial( - AppWithTenPages, - render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue] - ), - ) - - -@pytest.fixture(scope="session") -def app_with_hundred_pages( - tmp_path_factory, -) -> Generator[AppHarness, None, None]: - """Create an app with 100 pages at tmp_path via AppHarness. - - Args: - tmp_path_factory: pytest tmp_path_factory fixture - - Yields: - an AppHarness instance - """ - root = tmp_path_factory.mktemp("app100") - - yield AppHarness.create( - root=root, - app_source=functools.partial( - AppWithHundredPages, - render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue] - ), - ) - - -@pytest.fixture(scope="session") -def app_with_thousand_pages( - tmp_path_factory, -) -> Generator[AppHarness, None, None]: - """Create an app with 1000 pages at tmp_path via AppHarness. - - Args: - tmp_path_factory: pytest tmp_path_factory fixture - - Yields: - an AppHarness instance - """ - root = tmp_path_factory.mktemp("app1000") - - yield AppHarness.create( - root=root, - app_source=functools.partial( - AppWithThousandPages, - render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue] - ), - ) - - -@pytest.fixture(scope="session") -def app_with_ten_thousand_pages( - tmp_path_factory, -) -> Generator[AppHarness, None, None]: - """Create an app with 10000 pages at tmp_path via AppHarness. - - Args: - tmp_path_factory: pytest tmp_path_factory fixture - - Yields: - running AppHarness instance - """ - root = tmp_path_factory.mktemp("app10000") - - yield AppHarness.create( - root=root, - app_source=functools.partial( - AppWithTenThousandPages, - render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue] - ), - ) - - -@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_1_compile_time_cold(benchmark, app_with_one_page): - """Test the compile time on a cold start for an app with 1 page. - - Args: - benchmark: The benchmark fixture. - app_with_one_page: The app harness. - """ - - def setup(): - with chdir(app_with_one_page.app_path): - utils.empty_dir(web_pages, keep_files=["_app.js"]) - app_with_one_page._initialize_app() - build.setup_frontend(app_with_one_page.app_path) - - def benchmark_fn(): - with chdir(app_with_one_page.app_path): - app_with_one_page.app_instance._compile() - - benchmark.pedantic(benchmark_fn, setup=setup, rounds=5) - app_with_one_page._reload_state_module() - - -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - min_rounds=5, - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_1_compile_time_warm(benchmark, app_with_one_page): - """Test the compile time on a warm start for an app with 1 page. - - Args: - benchmark: The benchmark fixture. - app_with_one_page: The app harness. - """ - with chdir(app_with_one_page.app_path): - app_with_one_page._initialize_app() - build.setup_frontend(app_with_one_page.app_path) - - def benchmark_fn(): - with chdir(app_with_one_page.app_path): - app_with_one_page.app_instance._compile() - - benchmark(benchmark_fn) - app_with_one_page._reload_state_module() - - -@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_10_compile_time_cold(benchmark, app_with_ten_pages): - """Test the compile time on a cold start for an app with 10 page. - - Args: - benchmark: The benchmark fixture. - app_with_ten_pages: The app harness. - """ - - def setup(): - with chdir(app_with_ten_pages.app_path): - utils.empty_dir(web_pages, keep_files=["_app.js"]) - app_with_ten_pages._initialize_app() - build.setup_frontend(app_with_ten_pages.app_path) - - def benchmark_fn(): - with chdir(app_with_ten_pages.app_path): - app_with_ten_pages.app_instance._compile() - - benchmark.pedantic(benchmark_fn, setup=setup, rounds=5) - app_with_ten_pages._reload_state_module() - - -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - min_rounds=5, - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_10_compile_time_warm(benchmark, app_with_ten_pages): - """Test the compile time on a warm start for an app with 10 page. - - Args: - benchmark: The benchmark fixture. - app_with_ten_pages: The app harness. - """ - with chdir(app_with_ten_pages.app_path): - app_with_ten_pages._initialize_app() - build.setup_frontend(app_with_ten_pages.app_path) - - def benchmark_fn(): - with chdir(app_with_ten_pages.app_path): - app_with_ten_pages.app_instance._compile() - - benchmark(benchmark_fn) - app_with_ten_pages._reload_state_module() - - -@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_100_compile_time_cold(benchmark, app_with_hundred_pages): - """Test the compile time on a cold start for an app with 100 page. - - Args: - benchmark: The benchmark fixture. - app_with_hundred_pages: The app harness. - """ - - def setup(): - with chdir(app_with_hundred_pages.app_path): - utils.empty_dir(web_pages, keep_files=["_app.js"]) - app_with_hundred_pages._initialize_app() - build.setup_frontend(app_with_hundred_pages.app_path) - - def benchmark_fn(): - with chdir(app_with_hundred_pages.app_path): - app_with_hundred_pages.app_instance._compile() - - benchmark.pedantic(benchmark_fn, setup=setup, rounds=5) - app_with_hundred_pages._reload_state_module() - - -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - min_rounds=5, - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_100_compile_time_warm(benchmark, app_with_hundred_pages): - """Test the compile time on a warm start for an app with 100 page. - - Args: - benchmark: The benchmark fixture. - app_with_hundred_pages: The app harness. - """ - with chdir(app_with_hundred_pages.app_path): - app_with_hundred_pages._initialize_app() - build.setup_frontend(app_with_hundred_pages.app_path) - - def benchmark_fn(): - with chdir(app_with_hundred_pages.app_path): - app_with_hundred_pages.app_instance._compile() - - benchmark(benchmark_fn) - app_with_hundred_pages._reload_state_module() - - -@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON) -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_1000_compile_time_cold(benchmark, app_with_thousand_pages): - """Test the compile time on a cold start for an app with 1000 page. - - Args: - benchmark: The benchmark fixture. - app_with_thousand_pages: The app harness. - """ - - def setup(): - with chdir(app_with_thousand_pages.app_path): - utils.empty_dir(web_pages, keep_files=["_app.js"]) - app_with_thousand_pages._initialize_app() - build.setup_frontend(app_with_thousand_pages.app_path) - - def benchmark_fn(): - with chdir(app_with_thousand_pages.app_path): - app_with_thousand_pages.app_instance._compile() - - benchmark.pedantic(benchmark_fn, setup=setup, rounds=5) - app_with_thousand_pages._reload_state_module() - - -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - min_rounds=5, - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_1000_compile_time_warm(benchmark, app_with_thousand_pages): - """Test the compile time on a warm start for an app with 1000 page. - - Args: - benchmark: The benchmark fixture. - app_with_thousand_pages: The app harness. - """ - with chdir(app_with_thousand_pages.app_path): - app_with_thousand_pages._initialize_app() - build.setup_frontend(app_with_thousand_pages.app_path) - - def benchmark_fn(): - with chdir(app_with_thousand_pages.app_path): - app_with_thousand_pages.app_instance._compile() - - benchmark(benchmark_fn) - app_with_thousand_pages._reload_state_module() - - -@pytest.mark.skip -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_10000_compile_time_cold(benchmark, app_with_ten_thousand_pages): - """Test the compile time on a cold start for an app with 10000 page. - - Args: - benchmark: The benchmark fixture. - app_with_ten_thousand_pages: The app harness. - """ - - def setup(): - with chdir(app_with_ten_thousand_pages.app_path): - utils.empty_dir(web_pages, keep_files=["_app.js"]) - app_with_ten_thousand_pages._initialize_app() - build.setup_frontend(app_with_ten_thousand_pages.app_path) - - def benchmark_fn(): - with chdir(app_with_ten_thousand_pages.app_path): - app_with_ten_thousand_pages.app_instance._compile() - - benchmark.pedantic(benchmark_fn, setup=setup, rounds=5) - app_with_ten_thousand_pages._reload_state_module() - - -@pytest.mark.skip -@pytest.mark.benchmark( - group="Compile time of varying page numbers", - min_rounds=5, - timer=time.perf_counter, - disable_gc=True, - warmup=False, -) -def test_app_10000_compile_time_warm(benchmark, app_with_ten_thousand_pages): - """Test the compile time on a warm start for an app with 10000 page. - - Args: - benchmark: The benchmark fixture. - app_with_ten_thousand_pages: The app harness. - """ - - def benchmark_fn(): - with chdir(app_with_ten_thousand_pages.app_path): - app_with_ten_thousand_pages.app_instance._compile() - - benchmark(benchmark_fn) - app_with_ten_thousand_pages._reload_state_module() From 7c4257a222bcda6401f834b267948b2a953d1587 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 18:36:30 -0800 Subject: [PATCH 129/144] give option to only use main thread (#4809) * give option to only use main thread * change default to main thread * fix comment * default to None, as 0 would raise a ValueError Co-authored-by: Masen Furer * add warning about passing 0 * move executor to config --------- Co-authored-by: Masen Furer --- reflex/app.py | 62 ++++++++++++------------ reflex/compiler/compiler.py | 2 +- reflex/config.py | 95 +++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 32 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 2c8e889fc..d0ee06ae9 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -11,12 +11,11 @@ import functools import inspect import io import json -import multiprocessing -import platform import sys import traceback from datetime import datetime from pathlib import Path +from timeit import default_timer as timer from types import SimpleNamespace from typing import ( TYPE_CHECKING, @@ -76,7 +75,7 @@ from reflex.components.core.client_side_routing import ( from reflex.components.core.sticky import sticky from reflex.components.core.upload import Upload, get_upload_dir from reflex.components.radix import themes -from reflex.config import environment, get_config +from reflex.config import ExecutorType, environment, get_config from reflex.event import ( _EVENT_FIELDS, Event, @@ -1114,10 +1113,23 @@ class App(MiddlewareMixin, LifespanMixin): app_wrappers[(1, "ToasterProvider")] = toast_provider with console.timing("Evaluate Pages (Frontend)"): + performance_metrics: list[tuple[str, float]] = [] for route in self._unevaluated_pages: console.debug(f"Evaluating page: {route}") + start = timer() self._compile_page(route, save_page=should_compile) + end = timer() + performance_metrics.append((route, end - start)) progress.advance(task) + console.debug( + "Slowest pages:\n" + + "\n".join( + f"{route}: {time * 1000:.1f}ms" + for route, time in sorted( + performance_metrics, key=lambda x: x[1], reverse=True + )[:10] + ) + ) # Add the optional endpoints (_upload) self._add_optional_endpoints() @@ -1130,7 +1142,7 @@ class App(MiddlewareMixin, LifespanMixin): progress.advance(task) # Store the compile results. - compile_results = [] + compile_results: list[tuple[str, str]] = [] progress.advance(task) @@ -1209,33 +1221,19 @@ class App(MiddlewareMixin, LifespanMixin): ), ) - # Use a forking process pool, if possible. Much faster, especially for large sites. - # Fallback to ThreadPoolExecutor as something that will always work. - executor = None - if ( - platform.system() in ("Linux", "Darwin") - and (number_of_processes := environment.REFLEX_COMPILE_PROCESSES.get()) - is not None - ): - executor = concurrent.futures.ProcessPoolExecutor( - max_workers=number_of_processes or None, - mp_context=multiprocessing.get_context("fork"), - ) - else: - executor = concurrent.futures.ThreadPoolExecutor( - max_workers=environment.REFLEX_COMPILE_THREADS.get() or None - ) + executor = ExecutorType.get_executor_from_environment() for route, component in zip(self._pages, page_components, strict=True): ExecutorSafeFunctions.COMPONENTS[route] = component ExecutorSafeFunctions.STATE = self._state - with executor: - result_futures = [] + with console.timing("Compile to Javascript"), executor as executor: + result_futures: list[concurrent.futures.Future[tuple[str, str]]] = [] - def _submit_work(fn: Callable, *args, **kwargs): + def _submit_work(fn: Callable[..., tuple[str, str]], *args, **kwargs): f = executor.submit(fn, *args, **kwargs) + f.add_done_callback(lambda _: progress.advance(task)) result_futures.append(f) # Compile the pre-compiled pages. @@ -1261,10 +1259,10 @@ class App(MiddlewareMixin, LifespanMixin): _submit_work(compiler.remove_tailwind_from_postcss) # Wait for all compilation tasks to complete. - with console.timing("Compile to Javascript"): - for future in concurrent.futures.as_completed(result_futures): - compile_results.append(future.result()) - progress.advance(task) + compile_results.extend( + future.result() + for future in concurrent.futures.as_completed(result_futures) + ) app_root = self._app_root(app_wrappers=app_wrappers) @@ -1289,10 +1287,12 @@ class App(MiddlewareMixin, LifespanMixin): progress.advance(task) # Compile custom components. - *custom_components_result, custom_components_imports = ( - compiler.compile_components(custom_components) - ) - compile_results.append(custom_components_result) + ( + custom_components_output, + custom_components_result, + custom_components_imports, + ) = compiler.compile_components(custom_components) + compile_results.append((custom_components_output, custom_components_result)) all_imports.update(custom_components_imports) progress.advance(task) diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 667a477e8..81de50182 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -508,7 +508,7 @@ def compile_tailwind( The compiled Tailwind config. """ # Get the path for the output file. - output_path = get_web_dir() / constants.Tailwind.CONFIG + output_path = str((get_web_dir() / constants.Tailwind.CONFIG).absolute()) # Compile the config. code = _compile_tailwind(config) diff --git a/reflex/config.py b/reflex/config.py index 33009b3bc..d0829e627 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -2,11 +2,14 @@ from __future__ import annotations +import concurrent.futures import dataclasses import enum import importlib import inspect +import multiprocessing import os +import platform import sys import threading import urllib.parse @@ -17,6 +20,7 @@ from types import ModuleType from typing import ( TYPE_CHECKING, Any, + Callable, Dict, Generic, List, @@ -497,6 +501,95 @@ class PerformanceMode(enum.Enum): OFF = "off" +class ExecutorType(enum.Enum): + """Executor for compiling the frontend.""" + + THREAD = "thread" + PROCESS = "process" + MAIN_THREAD = "main_thread" + + @classmethod + def get_executor_from_environment(cls): + """Get the executor based on the environment variables. + + Returns: + The executor. + """ + executor_type = environment.REFLEX_COMPILE_EXECUTOR.get() + + reflex_compile_processes = environment.REFLEX_COMPILE_PROCESSES.get() + reflex_compile_threads = environment.REFLEX_COMPILE_THREADS.get() + # By default, use the main thread. Unless the user has specified a different executor. + # Using a process pool is much faster, but not supported on all platforms. It's gated behind a flag. + if executor_type is None: + if ( + platform.system() not in ("Linux", "Darwin") + and reflex_compile_processes is not None + ): + console.warn("Multiprocessing is only supported on Linux and MacOS.") + + if ( + platform.system() in ("Linux", "Darwin") + and reflex_compile_processes is not None + ): + if reflex_compile_processes == 0: + console.warn( + "Number of processes must be greater than 0. If you want to use the default number of processes, set REFLEX_COMPILE_EXECUTOR to 'process'. Defaulting to None." + ) + reflex_compile_processes = None + elif reflex_compile_processes < 0: + console.warn( + "Number of processes must be greater than 0. Defaulting to None." + ) + reflex_compile_processes = None + executor_type = ExecutorType.PROCESS + elif reflex_compile_threads is not None: + if reflex_compile_threads == 0: + console.warn( + "Number of threads must be greater than 0. If you want to use the default number of threads, set REFLEX_COMPILE_EXECUTOR to 'thread'. Defaulting to None." + ) + reflex_compile_threads = None + elif reflex_compile_threads < 0: + console.warn( + "Number of threads must be greater than 0. Defaulting to None." + ) + reflex_compile_threads = None + executor_type = ExecutorType.THREAD + else: + executor_type = ExecutorType.MAIN_THREAD + + match executor_type: + case ExecutorType.PROCESS: + executor = concurrent.futures.ProcessPoolExecutor( + max_workers=reflex_compile_processes, + mp_context=multiprocessing.get_context("fork"), + ) + case ExecutorType.THREAD: + executor = concurrent.futures.ThreadPoolExecutor( + max_workers=reflex_compile_threads + ) + case ExecutorType.MAIN_THREAD: + FUTURE_RESULT_TYPE = TypeVar("FUTURE_RESULT_TYPE") + + class MainThreadExecutor: + def __enter__(self): + return self + + def __exit__(self, *args): + pass + + def submit( + self, fn: Callable[..., FUTURE_RESULT_TYPE], *args, **kwargs + ) -> concurrent.futures.Future[FUTURE_RESULT_TYPE]: + future_job = concurrent.futures.Future() + future_job.set_result(fn(*args, **kwargs)) + return future_job + + executor = MainThreadExecutor() + + return executor + + class EnvironmentVariables: """Environment variables class to instantiate environment variables.""" @@ -538,6 +631,8 @@ class EnvironmentVariables: Path(constants.Dirs.UPLOADED_FILES) ) + REFLEX_COMPILE_EXECUTOR: EnvVar[Optional[ExecutorType]] = env_var(None) + # Whether to use separate processes to compile the frontend and how many. If not set, defaults to thread executor. REFLEX_COMPILE_PROCESSES: EnvVar[Optional[int]] = env_var(None) From 10bae9577c0f898f7ae9b2d540336058bda53837 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 22:49:27 -0800 Subject: [PATCH 130/144] only write if file changed (#4822) * only write if file changed * preface it on it existing --- reflex/compiler/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 91ee18b86..c66dfe304 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -523,6 +523,8 @@ def write_page(path: str | Path, code: str): """ path = Path(path) path_ops.mkdir(path.parent) + if path.exists() and path.read_text(encoding="utf-8") == code: + return path.write_text(code, encoding="utf-8") From 6848915883b3d6f58c205900261c277f0a224cdf Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 14 Feb 2025 17:10:01 -0800 Subject: [PATCH 131/144] Update rx.get_upload_url signature to accept Var[str] (#4826) * Update rx.get_upload_url signature to accept Var[str] * Add py.typed Fix #4806 --- reflex/components/core/upload.py | 4 ++-- reflex/components/core/upload.pyi | 2 +- reflex/py.typed | 0 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 reflex/py.typed diff --git a/reflex/components/core/upload.py b/reflex/components/core/upload.py index 6c86d3c44..682fd45a9 100644 --- a/reflex/components/core/upload.py +++ b/reflex/components/core/upload.py @@ -147,7 +147,7 @@ uploaded_files_url_prefix = Var( ).to(str) -def get_upload_url(file_path: str) -> Var[str]: +def get_upload_url(file_path: str | Var[str]) -> Var[str]: """Get the URL of an uploaded file. Args: @@ -158,7 +158,7 @@ def get_upload_url(file_path: str) -> Var[str]: """ Upload.is_used = True - return uploaded_files_url_prefix + "/" + file_path + return Var.create(f"{uploaded_files_url_prefix}/{file_path}") def _on_drop_spec(files: Var) -> Tuple[Var[Any]]: diff --git a/reflex/components/core/upload.pyi b/reflex/components/core/upload.pyi index d1ddceb4d..7c918bee8 100644 --- a/reflex/components/core/upload.pyi +++ b/reflex/components/core/upload.pyi @@ -35,7 +35,7 @@ uploaded_files_url_prefix = Var( ), ).to(str) -def get_upload_url(file_path: str) -> Var[str]: ... +def get_upload_url(file_path: str | Var[str]) -> Var[str]: ... class UploadFilesProvider(Component): @overload diff --git a/reflex/py.typed b/reflex/py.typed new file mode 100644 index 000000000..e69de29bb From f4165c9812985506863dc2a3fbba75ad36696610 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 18 Feb 2025 10:20:22 -0800 Subject: [PATCH 132/144] fix types for html elements (#4768) --- reflex/components/core/banner.pyi | 434 +- reflex/components/core/html.pyi | 219 +- reflex/components/core/sticky.pyi | 964 ++- reflex/components/el/elements/base.py | 112 +- reflex/components/el/elements/base.pyi | 297 +- reflex/components/el/elements/forms.py | 226 +- reflex/components/el/elements/forms.pyi | 3118 ++++++++- reflex/components/el/elements/inline.py | 39 +- reflex/components/el/elements/inline.pyi | 6145 +++++++++++++++-- reflex/components/el/elements/media.py | 174 +- reflex/components/el/elements/media.pyi | 5684 +++++++++++++-- reflex/components/el/elements/metadata.py | 36 +- reflex/components/el/elements/metadata.pyi | 930 ++- reflex/components/el/elements/other.py | 8 +- reflex/components/el/elements/other.pyi | 1527 +++- reflex/components/el/elements/scripts.py | 23 +- reflex/components/el/elements/scripts.pyi | 699 +- reflex/components/el/elements/sectioning.pyi | 3257 ++++++++- reflex/components/el/elements/tables.py | 49 +- reflex/components/el/elements/tables.pyi | 2227 +++++- reflex/components/el/elements/typography.py | 23 +- reflex/components/el/elements/typography.pyi | 3281 ++++++++- reflex/components/radix/primitives/form.pyi | 717 +- reflex/components/radix/themes/color_mode.pyi | 244 +- .../radix/themes/components/alert_dialog.pyi | 217 +- .../radix/themes/components/badge.pyi | 217 +- .../radix/themes/components/button.pyi | 244 +- .../radix/themes/components/callout.pyi | 1085 ++- .../radix/themes/components/card.pyi | 217 +- .../radix/themes/components/dialog.pyi | 217 +- .../radix/themes/components/hover_card.pyi | 217 +- .../radix/themes/components/icon_button.pyi | 244 +- .../radix/themes/components/inset.pyi | 217 +- .../radix/themes/components/popover.pyi | 217 +- .../radix/themes/components/table.pyi | 1577 ++++- .../radix/themes/components/text_area.py | 4 +- .../radix/themes/components/text_area.pyi | 221 +- .../radix/themes/components/text_field.py | 2 +- .../radix/themes/components/text_field.pyi | 532 +- reflex/components/radix/themes/layout/box.pyi | 219 +- .../components/radix/themes/layout/center.pyi | 217 +- .../radix/themes/layout/container.pyi | 217 +- .../components/radix/themes/layout/flex.pyi | 217 +- .../components/radix/themes/layout/grid.pyi | 217 +- .../components/radix/themes/layout/list.pyi | 661 +- .../radix/themes/layout/section.pyi | 217 +- .../components/radix/themes/layout/spacer.pyi | 217 +- .../components/radix/themes/layout/stack.pyi | 651 +- .../radix/themes/typography/blockquote.pyi | 219 +- .../radix/themes/typography/code.pyi | 217 +- .../radix/themes/typography/heading.pyi | 217 +- .../radix/themes/typography/link.pyi | 266 +- .../radix/themes/typography/text.pyi | 1521 +++- reflex/experimental/layout.pyi | 651 +- 54 files changed, 37695 insertions(+), 4090 deletions(-) diff --git a/reflex/components/core/banner.pyi b/reflex/components/core/banner.pyi index 707076310..ce299f443 100644 --- a/reflex/components/core/banner.pyi +++ b/reflex/components/core/banner.pyi @@ -271,30 +271,211 @@ class ConnectionPulser(Div): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -356,30 +537,211 @@ class BackendDisabled(Div): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/core/html.pyi b/reflex/components/core/html.pyi index 9fb80fb42..ab94e7397 100644 --- a/reflex/components/core/html.pyi +++ b/reflex/components/core/html.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.el.elements.typography import Div from reflex.event import EventType @@ -19,30 +19,211 @@ class Html(Div): dangerouslySetInnerHTML: Optional[ Union[Dict[str, str], Var[Dict[str, str]]] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/core/sticky.pyi b/reflex/components/core/sticky.pyi index 40d58ae84..237044a62 100644 --- a/reflex/components/core/sticky.pyi +++ b/reflex/components/core/sticky.pyi @@ -23,30 +23,211 @@ class StickyLogo(Svg): width: Optional[Union[Var[Union[int, str]], int, str]] = None, height: Optional[Union[Var[Union[int, str]], int, str]] = None, xmlns: Optional[Union[Var[str], str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -245,30 +426,211 @@ class StickyLabel(Text): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -307,41 +669,252 @@ class StickyBadge(A): def create( # type: ignore cls, *children, - download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + download: Optional[Union[Var[Union[bool, str]], bool, str]] = None, + href: Optional[Union[Var[str], str]] = None, + href_lang: Optional[Union[Var[str], str]] = None, + media: Optional[Union[Var[str], str]] = None, + ping: Optional[Union[Var[str], str]] = None, referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] ] = None, - rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + rel: Optional[Union[Var[str], str]] = None, + target: Optional[ + Union[ + Literal["_blank", "_parent", "_self", "_top"], + Var[Union[Literal["_blank", "_parent", "_self", "_top"], str]], + str, + ] + ] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -381,41 +954,252 @@ class StickyNamespace(ComponentNamespace): @staticmethod def __call__( *children, - download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + download: Optional[Union[Var[Union[bool, str]], bool, str]] = None, + href: Optional[Union[Var[str], str]] = None, + href_lang: Optional[Union[Var[str], str]] = None, + media: Optional[Union[Var[str], str]] = None, + ping: Optional[Union[Var[str], str]] = None, referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] ] = None, - rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + rel: Optional[Union[Var[str], str]] = None, + target: Optional[ + Union[ + Literal["_blank", "_parent", "_self", "_top"], + Var[Union[Literal["_blank", "_parent", "_self", "_top"], str]], + str, + ] + ] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/el/elements/base.py b/reflex/components/el/elements/base.py index f6e191f68..e7883ed5a 100644 --- a/reflex/components/el/elements/base.py +++ b/reflex/components/el/elements/base.py @@ -1,58 +1,136 @@ """Base classes.""" -from typing import Union +from typing import Literal from reflex.components.el.element import Element from reflex.vars.base import Var +AutoCapitalize = Literal["off", "none", "on", "sentences", "words", "characters"] +ContentEditable = Literal[True, False, "inherit", "plaintext-only"] +EnterKeyHint = Literal["enter", "done", "go", "next", "previous", "search", "send"] +InputMode = Literal[ + "none", "text", "tel", "url", "email", "numeric", "decimal", "search", "search" +] +AriaRole = Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", +] + class BaseHTML(Element): """Base class for common attributes.""" # Provides a hint for generating a keyboard shortcut for the current element. - access_key: Var[Union[str, int, bool]] + access_key: Var[str] # Controls whether and how text input is automatically capitalized as it is entered/edited by the user. - auto_capitalize: Var[Union[str, int, bool]] + auto_capitalize: Var[AutoCapitalize] # Indicates whether the element's content is editable. - content_editable: Var[Union[str, int, bool]] + content_editable: Var[ContentEditable] # Defines the ID of a element which will serve as the element's context menu. - context_menu: Var[Union[str, int, bool]] + context_menu: Var[str] # Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) - dir: Var[Union[str, int, bool]] + dir: Var[str] # Defines whether the element can be dragged. - draggable: Var[Union[str, int, bool]] + draggable: Var[bool] # Hints what media types the media element is able to play. - enter_key_hint: Var[Union[str, int, bool]] + enter_key_hint: Var[EnterKeyHint] # Defines whether the element is hidden. - hidden: Var[Union[str, int, bool]] + hidden: Var[bool] # Defines the type of the element. - input_mode: Var[Union[str, int, bool]] + input_mode: Var[InputMode] # Defines the name of the element for metadata purposes. - item_prop: Var[Union[str, int, bool]] + item_prop: Var[str] # Defines the language used in the element. - lang: Var[Union[str, int, bool]] + lang: Var[str] # Defines the role of the element. - role: Var[Union[str, int, bool]] + role: Var[AriaRole] # Assigns a slot in a shadow DOM shadow tree to an element. - slot: Var[Union[str, int, bool]] + slot: Var[str] # Defines whether the element may be checked for spelling errors. - spell_check: Var[Union[str, int, bool]] + spell_check: Var[bool] # Defines the position of the current element in the tabbing order. - tab_index: Var[Union[str, int, bool]] + tab_index: Var[int] # Defines a tooltip for the element. - title: Var[Union[str, int, bool]] + title: Var[str] diff --git a/reflex/components/el/elements/base.pyi b/reflex/components/el/elements/base.pyi index a1b29d5f5..2964e8094 100644 --- a/reflex/components/el/elements/base.pyi +++ b/reflex/components/el/elements/base.pyi @@ -3,43 +3,302 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.el.element import Element from reflex.event import EventType from reflex.style import Style from reflex.vars.base import Var +AutoCapitalize = Literal["off", "none", "on", "sentences", "words", "characters"] +ContentEditable = Literal[True, False, "inherit", "plaintext-only"] +EnterKeyHint = Literal["enter", "done", "go", "next", "previous", "search", "send"] +InputMode = Literal[ + "none", "text", "tel", "url", "email", "numeric", "decimal", "search", "search" +] +AriaRole = Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", +] + class BaseHTML(Element): @overload @classmethod def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/el/elements/forms.py b/reflex/components/el/elements/forms.py index 51ad201b2..7e7ab84ff 100644 --- a/reflex/components/el/elements/forms.py +++ b/reflex/components/el/elements/forms.py @@ -3,7 +3,7 @@ from __future__ import annotations from hashlib import md5 -from typing import Any, Dict, Iterator, Set, Tuple, Union +from typing import Any, Dict, Iterator, Literal, Set, Tuple, Union from jinja2 import Environment @@ -41,6 +41,8 @@ HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string( """ ) +ButtonType = Literal["submit", "reset", "button"] + class Button(BaseHTML): """Display the button element.""" @@ -48,37 +50,37 @@ class Button(BaseHTML): tag = "button" # Automatically focuses the button when the page loads - auto_focus: Var[Union[str, int, bool]] + auto_focus: Var[bool] # Disables the button disabled: Var[bool] # Associates the button with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # URL to send the form data to (for type="submit" buttons) - form_action: Var[Union[str, int, bool]] + form_action: Var[str] # How the form data should be encoded when submitting to the server (for type="submit" buttons) - form_enc_type: Var[Union[str, int, bool]] + form_enc_type: Var[str] # HTTP method to use for sending form data (for type="submit" buttons) - form_method: Var[Union[str, int, bool]] + form_method: Var[str] # Bypasses form validation when submitting (for type="submit" buttons) - form_no_validate: Var[Union[str, int, bool]] + form_no_validate: Var[bool] # Specifies where to display the response after submitting the form (for type="submit" buttons) - form_target: Var[Union[str, int, bool]] + form_target: Var[str] # Name of the button, used when sending form data - name: Var[Union[str, int, bool]] + name: Var[str] # Type of the button (submit, reset, or button) - type: Var[Union[str, int, bool]] + type: Var[ButtonType] # Value of the button, used when sending form data - value: Var[Union[str, int, bool]] + value: Var[Union[str, int, float]] class Datalist(BaseHTML): @@ -93,13 +95,13 @@ class Fieldset(Element): tag = "fieldset" # Disables all the form control descendants of the fieldset - disabled: Var[Union[str, int, bool]] + disabled: Var[bool] # Associates the fieldset with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # Name of the fieldset, used for scripting - name: Var[Union[str, int, bool]] + name: Var[str] def on_submit_event_spec() -> Tuple[Var[dict[str, Any]]]: @@ -126,31 +128,31 @@ class Form(BaseHTML): tag = "form" # MIME types the server accepts for file upload - accept: Var[Union[str, int, bool]] + accept: Var[str] # Character encodings to be used for form submission - accept_charset: Var[Union[str, int, bool]] + accept_charset: Var[str] # URL where the form's data should be submitted - action: Var[Union[str, int, bool]] + action: Var[str] # Whether the form should have autocomplete enabled - auto_complete: Var[Union[str, int, bool]] + auto_complete: Var[str] # Encoding type for the form data when submitted - enc_type: Var[Union[str, int, bool]] + enc_type: Var[str] # HTTP method to use for form submission - method: Var[Union[str, int, bool]] + method: Var[str] # Name of the form - name: Var[Union[str, int, bool]] + name: Var[str] # Indicates that the form should not be validated on submit - no_validate: Var[Union[str, int, bool]] + no_validate: Var[bool] # Where to display the response after submitting the form - target: Var[Union[str, int, bool]] + target: Var[str] # If true, the form will be cleared after submit. reset_on_submit: Var[bool] = Var.create(False) @@ -266,106 +268,126 @@ class Form(BaseHTML): ] +HTMLInputTypeAttribute = Literal[ + "button", + "checkbox", + "color", + "date", + "datetime-local", + "email", + "file", + "hidden", + "image", + "month", + "number", + "password", + "radio", + "range", + "reset", + "search", + "submit", + "tel", + "text", + "time", + "url", + "week", +] + + class Input(BaseHTML): """Display the input element.""" tag = "input" # Accepted types of files when the input is file type - accept: Var[Union[str, int, bool]] + accept: Var[str] # Alternate text for input type="image" - alt: Var[Union[str, int, bool]] + alt: Var[str] # Whether the input should have autocomplete enabled - auto_complete: Var[Union[str, int, bool]] + auto_complete: Var[str] # Automatically focuses the input when the page loads - auto_focus: Var[Union[str, int, bool]] + auto_focus: Var[bool] # Captures media from the user (camera or microphone) - capture: Var[Union[str, int, bool]] + capture: Var[Literal[True, False, "user", "environment"]] # Indicates whether the input is checked (for checkboxes and radio buttons) - checked: Var[Union[str, int, bool]] + checked: Var[bool] # The initial value (for checkboxes and radio buttons) default_checked: Var[bool] # The initial value for a text field - default_value: Var[str] - - # Name part of the input to submit in 'dir' and 'name' pair when form is submitted - dirname: Var[Union[str, int, bool]] + default_value: Var[Union[str, int, float]] # Disables the input - disabled: Var[Union[str, int, bool]] + disabled: Var[bool] # Associates the input with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # URL to send the form data to (for type="submit" buttons) - form_action: Var[Union[str, int, bool]] + form_action: Var[str] # How the form data should be encoded when submitting to the server (for type="submit" buttons) - form_enc_type: Var[Union[str, int, bool]] + form_enc_type: Var[str] # HTTP method to use for sending form data (for type="submit" buttons) - form_method: Var[Union[str, int, bool]] + form_method: Var[str] # Bypasses form validation when submitting (for type="submit" buttons) - form_no_validate: Var[Union[str, int, bool]] + form_no_validate: Var[bool] # Specifies where to display the response after submitting the form (for type="submit" buttons) - form_target: Var[Union[str, int, bool]] + form_target: Var[str] # References a datalist for suggested options - list: Var[Union[str, int, bool]] + list: Var[str] # Specifies the maximum value for the input - max: Var[Union[str, int, bool]] + max: Var[Union[str, int, float]] # Specifies the maximum number of characters allowed in the input - max_length: Var[Union[str, int, bool]] + max_length: Var[Union[int, float]] # Specifies the minimum number of characters required in the input - min_length: Var[Union[str, int, bool]] + min_length: Var[Union[int, float]] # Specifies the minimum value for the input - min: Var[Union[str, int, bool]] + min: Var[Union[str, int, float]] # Indicates whether multiple values can be entered in an input of the type email or file - multiple: Var[Union[str, int, bool]] + multiple: Var[bool] # Name of the input, used when sending form data - name: Var[Union[str, int, bool]] + name: Var[str] # Regex pattern the input's value must match to be valid - pattern: Var[Union[str, int, bool]] + pattern: Var[str] # Placeholder text in the input - placeholder: Var[Union[str, int, bool]] + placeholder: Var[str] # Indicates whether the input is read-only - read_only: Var[Union[str, int, bool]] + read_only: Var[bool] # Indicates that the input is required - required: Var[Union[str, int, bool]] + required: Var[bool] # Specifies the visible width of a text control - size: Var[Union[str, int, bool]] + size: Var[Union[int, float]] # URL for image inputs - src: Var[Union[str, int, bool]] + src: Var[str] # Specifies the legal number intervals for an input - step: Var[Union[str, int, bool]] + step: Var[Union[str, int, float]] # Specifies the type of input - type: Var[Union[str, int, bool]] - - # Name of the image map used with the input - use_map: Var[Union[str, int, bool]] + type: Var[HTMLInputTypeAttribute] # Value of the input value: Var[Union[str, int, float]] @@ -419,10 +441,10 @@ class Label(BaseHTML): tag = "label" # ID of a form control with which the label is associated - html_for: Var[Union[str, int, bool]] + html_for: Var[str] # Associates the label with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] class Legend(BaseHTML): @@ -437,25 +459,25 @@ class Meter(BaseHTML): tag = "meter" # Associates the meter with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # High limit of range (above this is considered high value) - high: Var[Union[str, int, bool]] + high: Var[Union[int, float]] # Low limit of range (below this is considered low value) - low: Var[Union[str, int, bool]] + low: Var[Union[int, float]] # Maximum value of the range - max: Var[Union[str, int, bool]] + max: Var[Union[int, float]] # Minimum value of the range - min: Var[Union[str, int, bool]] + min: Var[Union[int, float]] # Optimum value in the range - optimum: Var[Union[str, int, bool]] + optimum: Var[Union[int, float]] # Current value of the meter - value: Var[Union[str, int, bool]] + value: Var[Union[int, float]] class Optgroup(BaseHTML): @@ -464,10 +486,10 @@ class Optgroup(BaseHTML): tag = "optgroup" # Disables the optgroup - disabled: Var[Union[str, int, bool]] + disabled: Var[bool] # Label for the optgroup - label: Var[Union[str, int, bool]] + label: Var[str] class Option(BaseHTML): @@ -476,16 +498,16 @@ class Option(BaseHTML): tag = "option" # Disables the option - disabled: Var[Union[str, int, bool]] + disabled: Var[bool] # Label for the option, if the text is not the label - label: Var[Union[str, int, bool]] + label: Var[str] # Indicates that the option is initially selected - selected: Var[Union[str, int, bool]] + selected: Var[bool] # Value to be sent as form data - value: Var[Union[str, int, bool]] + value: Var[Union[str, int, float]] class Output(BaseHTML): @@ -494,13 +516,13 @@ class Output(BaseHTML): tag = "output" # Associates the output with one or more elements (by their IDs) - html_for: Var[Union[str, int, bool]] + html_for: Var[str] # Associates the output with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # Name of the output element for form submission - name: Var[Union[str, int, bool]] + name: Var[str] class Progress(BaseHTML): @@ -509,13 +531,13 @@ class Progress(BaseHTML): tag = "progress" # Associates the progress element with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # Maximum value of the progress indicator - max: Var[Union[str, int, bool]] + max: Var[Union[str, int, float]] # Current value of the progress indicator - value: Var[Union[str, int, bool]] + value: Var[Union[str, int, float]] class Select(BaseHTML): @@ -524,28 +546,28 @@ class Select(BaseHTML): tag = "select" # Whether the form control should have autocomplete enabled - auto_complete: Var[Union[str, int, bool]] + auto_complete: Var[str] # Automatically focuses the select when the page loads - auto_focus: Var[Union[str, int, bool]] + auto_focus: Var[bool] # Disables the select control - disabled: Var[Union[str, int, bool]] + disabled: Var[bool] # Associates the select with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # Indicates that multiple options can be selected - multiple: Var[Union[str, int, bool]] + multiple: Var[bool] # Name of the select, used when submitting the form - name: Var[Union[str, int, bool]] + name: Var[str] # Indicates that the select control must have a selected option - required: Var[Union[str, int, bool]] + required: Var[bool] # Number of visible options in a drop-down list - size: Var[Union[str, int, bool]] + size: Var[int] # Fired when the select value changes on_change: EventHandler[input_event] @@ -587,58 +609,58 @@ class Textarea(BaseHTML): tag = "textarea" # Whether the form control should have autocomplete enabled - auto_complete: Var[Union[str, int, bool]] + auto_complete: Var[str] # Automatically focuses the textarea when the page loads - auto_focus: Var[Union[str, int, bool]] + auto_focus: Var[bool] # Automatically fit the content height to the text (use min-height with this prop) auto_height: Var[bool] # Visible width of the text control, in average character widths - cols: Var[Union[str, int, bool]] + cols: Var[int] # The default value of the textarea when initially rendered default_value: Var[str] # Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted - dirname: Var[Union[str, int, bool]] + dirname: Var[str] # Disables the textarea - disabled: Var[Union[str, int, bool]] + disabled: Var[bool] # Enter key submits form (shift-enter adds new line) enter_key_submit: Var[bool] # Associates the textarea with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # Maximum number of characters allowed in the textarea - max_length: Var[Union[str, int, bool]] + max_length: Var[int] # Minimum number of characters required in the textarea - min_length: Var[Union[str, int, bool]] + min_length: Var[int] # Name of the textarea, used when submitting the form - name: Var[Union[str, int, bool]] + name: Var[str] # Placeholder text in the textarea - placeholder: Var[Union[str, int, bool]] + placeholder: Var[str] # Indicates whether the textarea is read-only - read_only: Var[Union[str, int, bool]] + read_only: Var[bool] # Indicates that the textarea is required - required: Var[Union[str, int, bool]] + required: Var[bool] # Visible number of lines in the text control - rows: Var[Union[str, int, bool]] + rows: Var[int] # The controlled value of the textarea, read only unless used with on_change - value: Var[Union[str, int, bool]] + value: Var[str] # How the text in the textarea is to be wrapped when submitting the form - wrap: Var[Union[str, int, bool]] + wrap: Var[str] # Fired when the input value changes on_change: EventHandler[input_event] diff --git a/reflex/components/el/elements/forms.pyi b/reflex/components/el/elements/forms.pyi index 762d5772a..bb413c035 100644 --- a/reflex/components/el/elements/forms.pyi +++ b/reflex/components/el/elements/forms.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Tuple, Union, overload +from typing import Any, Dict, Literal, Optional, Tuple, Union, overload from jinja2 import Environment @@ -19,6 +19,7 @@ FORM_DATA = Var(_js_expr="form_data") HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string( "\n const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {\n const $form = ev.target\n ev.preventDefault()\n const {{ form_data }} = {...Object.fromEntries(new FormData($form).entries()), ...{{ field_ref_mapping }}};\n\n ({{ on_submit_event_chain }}());\n\n if ({{ reset_on_submit }}) {\n $form.reset()\n }\n })\n " ) +ButtonType = Literal["submit", "reset", "button"] class Button(BaseHTML): @overload @@ -26,45 +27,227 @@ class Button(BaseHTML): def create( # type: ignore cls, *children, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, disabled: Optional[Union[Var[bool], bool]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_enc_type: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + form: Optional[Union[Var[str], str]] = None, + form_action: Optional[Union[Var[str], str]] = None, + form_enc_type: Optional[Union[Var[str], str]] = None, + form_method: Optional[Union[Var[str], str]] = None, + form_no_validate: Optional[Union[Var[bool], bool]] = None, + form_target: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + type: Optional[ + Union[ + Literal["button", "reset", "submit"], + Var[Literal["button", "reset", "submit"]], + ] ] = None, - form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_no_validate: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -138,30 +321,211 @@ class Datalist(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -224,9 +588,9 @@ class Fieldset(Element): def create( # type: ignore cls, *children, - disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + form: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -279,45 +643,222 @@ class Form(BaseHTML): def create( # type: ignore cls, *children, - accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - accept_charset: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - auto_complete: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + accept: Optional[Union[Var[str], str]] = None, + accept_charset: Optional[Union[Var[str], str]] = None, + action: Optional[Union[Var[str], str]] = None, + auto_complete: Optional[Union[Var[str], str]] = None, + enc_type: Optional[Union[Var[str], str]] = None, + method: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + no_validate: Optional[Union[Var[bool], bool]] = None, + target: Optional[Union[Var[str], str]] = None, reset_on_submit: Optional[Union[Var[bool], bool]] = None, handle_submit_unique_name: Optional[Union[Var[str], str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -395,75 +936,333 @@ class Form(BaseHTML): def add_imports(self) -> ImportDict: ... def add_hooks(self) -> list[str]: ... +HTMLInputTypeAttribute = Literal[ + "button", + "checkbox", + "color", + "date", + "datetime-local", + "email", + "file", + "hidden", + "image", + "month", + "number", + "password", + "radio", + "range", + "reset", + "search", + "submit", + "tel", + "text", + "time", + "url", + "week", +] + class Input(BaseHTML): @overload @classmethod def create( # type: ignore cls, *children, - accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - auto_complete: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + accept: Optional[Union[Var[str], str]] = None, + alt: Optional[Union[Var[str], str]] = None, + auto_complete: Optional[Union[Var[str], str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, + capture: Optional[ + Union[ + Literal["environment", "user", False, True], + Var[Literal["environment", "user", False, True]], + ] ] = None, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + checked: Optional[Union[Var[bool], bool]] = None, default_checked: Optional[Union[Var[bool], bool]] = None, - default_value: Optional[Union[Var[str], str]] = None, - dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_enc_type: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + default_value: Optional[ + Union[Var[Union[float, int, str]], float, int, str] ] = None, - form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_no_validate: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + disabled: Optional[Union[Var[bool], bool]] = None, + form: Optional[Union[Var[str], str]] = None, + form_action: Optional[Union[Var[str], str]] = None, + form_enc_type: Optional[Union[Var[str], str]] = None, + form_method: Optional[Union[Var[str], str]] = None, + form_no_validate: Optional[Union[Var[bool], bool]] = None, + form_target: Optional[Union[Var[str], str]] = None, + list: Optional[Union[Var[str], str]] = None, + max: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + max_length: Optional[Union[Var[Union[float, int]], float, int]] = None, + min_length: Optional[Union[Var[Union[float, int]], float, int]] = None, + min: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + multiple: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + pattern: Optional[Union[Var[str], str]] = None, + placeholder: Optional[Union[Var[str], str]] = None, + read_only: Optional[Union[Var[bool], bool]] = None, + required: Optional[Union[Var[bool], bool]] = None, + size: Optional[Union[Var[Union[float, int]], float, int]] = None, + src: Optional[Union[Var[str], str]] = None, + step: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + type: Optional[ + Union[ + Literal[ + "button", + "checkbox", + "color", + "date", + "datetime-local", + "email", + "file", + "hidden", + "image", + "month", + "number", + "password", + "radio", + "range", + "reset", + "search", + "submit", + "tel", + "text", + "time", + "url", + "week", + ], + Var[ + Literal[ + "button", + "checkbox", + "color", + "date", + "datetime-local", + "email", + "file", + "hidden", + "image", + "month", + "number", + "password", + "radio", + "range", + "reset", + "search", + "submit", + "tel", + "text", + "time", + "url", + "week", + ] + ], + ] ] = None, - form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - max_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - min_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - placeholder: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - read_only: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - size: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -506,7 +1305,6 @@ class Input(BaseHTML): checked: Indicates whether the input is checked (for checkboxes and radio buttons) default_checked: The initial value (for checkboxes and radio buttons) default_value: The initial value for a text field - dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted disabled: Disables the input form: Associates the input with a form (by id) form_action: URL to send the form data to (for type="submit" buttons) @@ -529,7 +1327,6 @@ class Input(BaseHTML): src: URL for image inputs step: Specifies the legal number intervals for an input type: Specifies the type of input - use_map: Name of the image map used with the input value: Value of the input on_change: Fired when the input value changes on_focus: Fired when the input gains focus @@ -571,32 +1368,213 @@ class Label(BaseHTML): def create( # type: ignore cls, *children, - html_for: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + html_for: Optional[Union[Var[str], str]] = None, + form: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -661,30 +1639,211 @@ class Legend(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -747,37 +1906,218 @@ class Meter(BaseHTML): def create( # type: ignore cls, *children, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - high: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - low: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - optimum: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + form: Optional[Union[Var[str], str]] = None, + high: Optional[Union[Var[Union[float, int]], float, int]] = None, + low: Optional[Union[Var[Union[float, int]], float, int]] = None, + max: Optional[Union[Var[Union[float, int]], float, int]] = None, + min: Optional[Union[Var[Union[float, int]], float, int]] = None, + optimum: Optional[Union[Var[Union[float, int]], float, int]] = None, + value: Optional[Union[Var[Union[float, int]], float, int]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -847,32 +2187,213 @@ class Optgroup(BaseHTML): def create( # type: ignore cls, *children, - disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + label: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -937,34 +2458,215 @@ class Option(BaseHTML): def create( # type: ignore cls, *children, - disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - selected: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + label: Optional[Union[Var[str], str]] = None, + selected: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1031,33 +2733,214 @@ class Output(BaseHTML): def create( # type: ignore cls, *children, - html_for: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + html_for: Optional[Union[Var[str], str]] = None, + form: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1123,33 +3006,214 @@ class Progress(BaseHTML): def create( # type: ignore cls, *children, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + form: Optional[Union[Var[str], str]] = None, + max: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1215,40 +3279,219 @@ class Select(BaseHTML): def create( # type: ignore cls, *children, - auto_complete: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - size: 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_complete: Optional[Union[Var[str], str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + form: Optional[Union[Var[str], str]] = None, + multiple: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + size: Optional[Union[Var[int], int]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1324,50 +3567,229 @@ class Textarea(BaseHTML): def create( # type: ignore cls, *children, - auto_complete: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_complete: Optional[Union[Var[str], str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, auto_height: Optional[Union[Var[bool], bool]] = None, - cols: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cols: Optional[Union[Var[int], int]] = None, default_value: Optional[Union[Var[str], str]] = None, - dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + dirname: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, enter_key_submit: Optional[Union[Var[bool], bool]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - max_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - min_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - placeholder: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - read_only: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - rows: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - wrap: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + form: Optional[Union[Var[str], str]] = None, + max_length: Optional[Union[Var[int], int]] = None, + min_length: Optional[Union[Var[int], int]] = None, + name: Optional[Union[Var[str], str]] = None, + placeholder: Optional[Union[Var[str], str]] = None, + read_only: Optional[Union[Var[bool], bool]] = None, + required: Optional[Union[Var[bool], bool]] = None, + rows: Optional[Union[Var[int], int]] = None, + value: Optional[Union[Var[str], str]] = None, + wrap: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/el/elements/inline.py b/reflex/components/el/elements/inline.py index 270eca28e..919b9725d 100644 --- a/reflex/components/el/elements/inline.py +++ b/reflex/components/el/elements/inline.py @@ -1,11 +1,23 @@ """Inline classes.""" -from typing import Union +from typing import Literal, Union from reflex.vars.base import Var from .base import BaseHTML +ReferrerPolicy = Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", +] + class A(BaseHTML): # Inherits common attributes from BaseMeta """Display the 'a' element.""" @@ -13,31 +25,28 @@ class A(BaseHTML): # Inherits common attributes from BaseMeta tag = "a" # Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink. - download: Var[Union[str, int, bool]] + download: Var[Union[str, bool]] # Specifies the URL of the page the link goes to - href: Var[Union[str, int, bool]] + href: Var[str] # Specifies the language of the linked document - href_lang: Var[Union[str, int, bool]] + href_lang: Var[str] # Specifies what media/device the linked document is optimized for - media: Var[Union[str, int, bool]] + media: Var[str] # Specifies which referrer is sent when fetching the resource - ping: Var[Union[str, int, bool]] + ping: Var[str] # Specifies the relationship between the current document and the linked document - referrer_policy: Var[Union[str, int, bool]] + referrer_policy: Var[ReferrerPolicy] # Specifies the relationship between the linked document and the current document - rel: Var[Union[str, int, bool]] - - # Specifies the shape of the area - shape: Var[Union[str, int, bool]] + rel: Var[str] # Specifies where to open the linked document - target: Var[Union[str, int, bool]] + target: Var[Union[str, Literal["_self", "_blank", "_parent", "_top"]]] class Abbr(BaseHTML): @@ -88,7 +97,7 @@ class Data(BaseHTML): tag = "data" # Specifies the machine-readable translation of the data element. - value: Var[Union[str, int, bool]] + value: Var[Union[str, int, float]] class Dfn(BaseHTML): @@ -127,7 +136,7 @@ class Q(BaseHTML): tag = "q" # Specifies the source URL of the quote. - cite: Var[Union[str, int, bool]] + cite: Var[str] class Rp(BaseHTML): @@ -196,7 +205,7 @@ class Time(BaseHTML): tag = "time" # Specifies the date and/or time of the element. - date_time: Var[Union[str, int, bool]] + date_time: Var[str] class U(BaseHTML): diff --git a/reflex/components/el/elements/inline.pyi b/reflex/components/el/elements/inline.pyi index 10258f4c6..6140d4f26 100644 --- a/reflex/components/el/elements/inline.pyi +++ b/reflex/components/el/elements/inline.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.event import EventType from reflex.style import Style @@ -11,47 +11,270 @@ from reflex.vars.base import Var from .base import BaseHTML +ReferrerPolicy = Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", +] + class A(BaseHTML): @overload @classmethod def create( # type: ignore cls, *children, - download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + download: Optional[Union[Var[Union[bool, str]], bool, str]] = None, + href: Optional[Union[Var[str], str]] = None, + href_lang: Optional[Union[Var[str], str]] = None, + media: Optional[Union[Var[str], str]] = None, + ping: Optional[Union[Var[str], str]] = None, referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] ] = None, - rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + rel: Optional[Union[Var[str], str]] = None, + target: Optional[ + Union[ + Literal["_blank", "_parent", "_self", "_top"], + Var[Union[Literal["_blank", "_parent", "_self", "_top"], str]], + str, + ] + ] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -86,7 +309,6 @@ class A(BaseHTML): ping: Specifies which referrer is sent when fetching the resource referrer_policy: Specifies the relationship between the current document and the linked document rel: Specifies the relationship between the linked document and the current document - shape: Specifies the shape of the area target: Specifies where to open the linked document access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -123,30 +345,211 @@ class Abbr(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -209,30 +612,211 @@ class B(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -295,30 +879,211 @@ class Bdi(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -381,30 +1146,211 @@ class Bdo(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -467,30 +1413,211 @@ class Br(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -553,30 +1680,211 @@ class Cite(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -639,30 +1947,211 @@ class Code(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -725,31 +2214,212 @@ class Data(BaseHTML): def create( # type: ignore cls, *children, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -813,30 +2483,211 @@ class Dfn(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -899,30 +2750,211 @@ class Em(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -985,30 +3017,211 @@ class I(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1071,30 +3284,211 @@ class Kbd(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1157,30 +3551,211 @@ class Mark(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1243,31 +3818,212 @@ class Q(BaseHTML): def create( # type: ignore cls, *children, - cite: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cite: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1331,30 +4087,211 @@ class Rp(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1417,30 +4354,211 @@ class Rt(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1503,30 +4621,211 @@ class Ruby(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1589,30 +4888,211 @@ class S(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1675,30 +5155,211 @@ class Samp(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1761,30 +5422,211 @@ class Small(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1847,30 +5689,211 @@ class Span(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1933,30 +5956,211 @@ class Strong(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2019,30 +6223,211 @@ class Sub(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2105,30 +6490,211 @@ class Sup(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2191,31 +6757,212 @@ class Time(BaseHTML): def create( # type: ignore cls, *children, - date_time: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + date_time: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2279,30 +7026,211 @@ class U(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2365,30 +7293,211 @@ class Wbr(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/el/elements/media.py b/reflex/components/el/elements/media.py index 7d2f0e3e9..4d4426810 100644 --- a/reflex/components/el/elements/media.py +++ b/reflex/components/el/elements/media.py @@ -1,8 +1,9 @@ """Media classes.""" -from typing import Any, Union +from typing import Any, Literal, Union from reflex import Component, ComponentNamespace +from reflex.components.el.elements.inline import ReferrerPolicy from reflex.constants.colors import Color from reflex.vars.base import Var @@ -15,37 +16,37 @@ class Area(BaseHTML): tag = "area" # Alternate text for the area, used for accessibility - alt: Var[Union[str, int, bool]] + alt: Var[str] # Coordinates to define the shape of the area - coords: Var[Union[str, int, bool]] + coords: Var[str] # Specifies that the target will be downloaded when clicked - download: Var[Union[str, int, bool]] + download: Var[Union[str, bool]] # Hyperlink reference for the area - href: Var[Union[str, int, bool]] + href: Var[str] # Language of the linked resource - href_lang: Var[Union[str, int, bool]] + href_lang: Var[str] # Specifies what media/device the linked resource is optimized for - media: Var[Union[str, int, bool]] - - # A list of URLs to be notified if the user follows the hyperlink - ping: Var[Union[str, int, bool]] + media: Var[str] # Specifies which referrer information to send with the link - referrer_policy: Var[Union[str, int, bool]] + referrer_policy: Var[ReferrerPolicy] # Specifies the relationship of the target object to the link object - rel: Var[Union[str, int, bool]] + rel: Var[str] # Defines the shape of the area (rectangle, circle, polygon) - shape: Var[Union[str, int, bool]] + shape: Var[str] # Specifies where to open the linked document - target: Var[Union[str, int, bool]] + target: Var[str] + + +CrossOrigin = Literal["anonymous", "use-credentials", ""] class Audio(BaseHTML): @@ -54,28 +55,29 @@ class Audio(BaseHTML): tag = "audio" # Specifies that the audio will start playing as soon as it is ready - auto_play: Var[Union[str, int, bool]] - - # Represents the time range of the buffered media - buffered: Var[Union[str, int, bool]] + auto_play: Var[bool] # Displays the standard audio controls - controls: Var[Union[str, int, bool]] + controls: Var[bool] # Configures the CORS requests for the element - cross_origin: Var[Union[str, int, bool]] + cross_origin: Var[CrossOrigin] # Specifies that the audio will loop - loop: Var[Union[str, int, bool]] + loop: Var[bool] # Indicates whether the audio is muted by default - muted: Var[Union[str, int, bool]] + muted: Var[bool] # Specifies how the audio file should be preloaded - preload: Var[Union[str, int, bool]] + preload: Var[str] # URL of the audio to play - src: Var[Union[str, int, bool]] + src: Var[str] + + +ImageDecoding = Literal["async", "auto", "sync"] +ImageLoading = Literal["eager", "lazy"] class Img(BaseHTML): @@ -83,41 +85,32 @@ class Img(BaseHTML): tag = "img" - # Image alignment with respect to its surrounding elements - align: Var[Union[str, int, bool]] - # Alternative text for the image - alt: Var[Union[str, int, bool]] + alt: Var[str] # Configures the CORS requests for the image - cross_origin: Var[Union[str, int, bool]] + cross_origin: Var[CrossOrigin] # How the image should be decoded - decoding: Var[Union[str, int, bool]] - - # Specifies an intrinsic size for the image - intrinsicsize: Var[Union[str, int, bool]] - - # Whether the image is a server-side image map - ismap: Var[Union[str, int, bool]] + decoding: Var[ImageDecoding] # Specifies the loading behavior of the image - loading: Var[Union[str, int, bool]] + loading: Var[ImageLoading] # Referrer policy for the image - referrer_policy: Var[Union[str, int, bool]] + referrer_policy: Var[ReferrerPolicy] # Sizes of the image for different layouts - sizes: Var[Union[str, int, bool]] + sizes: Var[str] # URL of the image to display src: Var[Any] # A set of source sizes and URLs for responsive images - src_set: Var[Union[str, int, bool]] + src_set: Var[str] # The name of the map to use with the image - use_map: Var[Union[str, int, bool]] + use_map: Var[str] @classmethod def create(cls, *children, **props) -> Component: @@ -143,7 +136,7 @@ class Map(BaseHTML): tag = "map" # Name of the map, referenced by the 'usemap' attribute in 'img' and 'object' elements - name: Var[Union[str, int, bool]] + name: Var[str] class Track(BaseHTML): @@ -152,19 +145,19 @@ class Track(BaseHTML): tag = "track" # Indicates that the track should be enabled unless the user's preferences indicate otherwise - default: Var[Union[str, int, bool]] + default: Var[bool] # Specifies the kind of text track - kind: Var[Union[str, int, bool]] + kind: Var[str] # Title of the text track, used by the browser when listing available text tracks - label: Var[Union[str, int, bool]] + label: Var[str] # URL of the track file - src: Var[Union[str, int, bool]] + src: Var[str] # Language of the track text data - src_lang: Var[Union[str, int, bool]] + src_lang: Var[str] class Video(BaseHTML): @@ -173,34 +166,31 @@ class Video(BaseHTML): tag = "video" # Specifies that the video will start playing as soon as it is ready - auto_play: Var[Union[str, int, bool]] - - # Represents the time range of the buffered media - buffered: Var[Union[str, int, bool]] + auto_play: Var[bool] # Displays the standard video controls - controls: Var[Union[str, int, bool]] + controls: Var[bool] # Configures the CORS requests for the video - cross_origin: Var[Union[str, int, bool]] + cross_origin: Var[CrossOrigin] # Specifies that the video will loop - loop: Var[Union[str, int, bool]] + loop: Var[bool] # Indicates whether the video is muted by default - muted: Var[Union[str, int, bool]] + muted: Var[bool] # Indicates that the video should play 'inline', inside its element's playback area - plays_inline: Var[Union[str, int, bool]] + plays_inline: Var[bool] # URL of an image to show while the video is downloading, or until the user hits the play button - poster: Var[Union[str, int, bool]] + poster: Var[str] # Specifies how the video file should be preloaded - preload: Var[Union[str, int, bool]] + preload: Var[str] # URL of the video to play - src: Var[Union[str, int, bool]] + src: Var[str] class Embed(BaseHTML): @@ -209,10 +199,10 @@ class Embed(BaseHTML): tag = "embed" # URL of the embedded content - src: Var[Union[str, int, bool]] + src: Var[str] # Media type of the embedded content - type: Var[Union[str, int, bool]] + type: Var[str] class Iframe(BaseHTML): @@ -220,32 +210,26 @@ class Iframe(BaseHTML): tag = "iframe" - # Alignment of the iframe within the page or surrounding elements - align: Var[Union[str, int, bool]] - # Permissions policy for the iframe - allow: Var[Union[str, int, bool]] - - # Content Security Policy to apply to the iframe's content - csp: Var[Union[str, int, bool]] + allow: Var[str] # Specifies the loading behavior of the iframe - loading: Var[Union[str, int, bool]] + loading: Var[Literal["eager", "lazy"]] # Name of the iframe, used as a target for hyperlinks and forms - name: Var[Union[str, int, bool]] + name: Var[str] # Referrer policy for the iframe - referrer_policy: Var[Union[str, int, bool]] + referrer_policy: Var[ReferrerPolicy] # Security restrictions for the content in the iframe - sandbox: Var[Union[str, int, bool]] + sandbox: Var[str] # URL of the document to display in the iframe - src: Var[Union[str, int, bool]] + src: Var[str] # HTML content to embed directly within the iframe - src_doc: Var[Union[str, int, bool]] + src_doc: Var[str] class Object(BaseHTML): @@ -254,19 +238,19 @@ class Object(BaseHTML): tag = "object" # URL of the data to be used by the object - data: Var[Union[str, int, bool]] + data: Var[str] # Associates the object with a form element - form: Var[Union[str, int, bool]] + form: Var[str] # Name of the object, used for scripting or as a target for forms and links - name: Var[Union[str, int, bool]] + name: Var[str] # Media type of the data specified in the data attribute - type: Var[Union[str, int, bool]] + type: Var[str] # Name of an image map to use with the object - use_map: Var[Union[str, int, bool]] + use_map: Var[str] class Picture(BaseHTML): @@ -287,19 +271,19 @@ class Source(BaseHTML): tag = "source" # Media query indicating what device the linked resource is optimized for - media: Var[Union[str, int, bool]] + media: Var[str] # Sizes of the source for different layouts - sizes: Var[Union[str, int, bool]] + sizes: Var[str] # URL of the media file or an image for the element to use - src: Var[Union[str, int, bool]] + src: Var[str] # A set of source sizes and URLs for responsive images - src_set: Var[Union[str, int, bool]] + src_set: Var[str] # Media type of the source - type: Var[Union[str, int, bool]] + type: Var[str] class Svg(BaseHTML): @@ -431,16 +415,16 @@ class LinearGradient(BaseHTML): spread_method: Var[Union[str, bool]] # X coordinate of the starting point of the gradient. - x1: Var[Union[str, int, bool]] + x1: Var[Union[str, int, float]] # X coordinate of the ending point of the gradient. - x2: Var[Union[str, int, bool]] + x2: Var[Union[str, int, float]] # Y coordinate of the starting point of the gradient. - y1: Var[Union[str, int, bool]] + y1: Var[Union[str, int, float]] # Y coordinate of the ending point of the gradient. - y2: Var[Union[str, int, bool]] + y2: Var[Union[str, int, float]] class RadialGradient(BaseHTML): @@ -449,19 +433,19 @@ class RadialGradient(BaseHTML): tag = "radialGradient" # The x coordinate of the end circle of the radial gradient. - cx: Var[Union[str, int, bool]] + cx: Var[Union[str, int, float]] # The y coordinate of the end circle of the radial gradient. - cy: Var[Union[str, int, bool]] + cy: Var[Union[str, int, float]] # The radius of the start circle of the radial gradient. - fr: Var[Union[str, int, bool]] + fr: Var[Union[str, int, float]] # The x coordinate of the start circle of the radial gradient. - fx: Var[Union[str, int, bool]] + fx: Var[Union[str, int, float]] # The y coordinate of the start circle of the radial gradient. - fy: Var[Union[str, int, bool]] + fy: Var[Union[str, int, float]] # Units for the gradient. gradient_units: Var[Union[str, bool]] @@ -470,7 +454,7 @@ class RadialGradient(BaseHTML): gradient_transform: Var[Union[str, bool]] # The radius of the end circle of the radial gradient. - r: Var[Union[str, int, bool]] + r: Var[Union[str, int, float]] # Method used to spread the gradient. spread_method: Var[Union[str, bool]] @@ -497,7 +481,7 @@ class Path(BaseHTML): tag = "path" # Defines the shape of the path. - d: Var[Union[str, int, bool]] + d: Var[Union[str, int, float]] class SVG(ComponentNamespace): diff --git a/reflex/components/el/elements/media.pyi b/reflex/components/el/elements/media.pyi index 8b7b63b7b..7f9b93ee9 100644 --- a/reflex/components/el/elements/media.pyi +++ b/reflex/components/el/elements/media.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex import ComponentNamespace from reflex.constants.colors import Color @@ -19,43 +19,248 @@ class Area(BaseHTML): def create( # type: ignore cls, *children, - alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - coords: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + alt: Optional[Union[Var[str], str]] = None, + coords: Optional[Union[Var[str], str]] = None, + download: Optional[Union[Var[Union[bool, str]], bool, str]] = None, + href: Optional[Union[Var[str], str]] = None, + href_lang: Optional[Union[Var[str], str]] = None, + media: Optional[Union[Var[str], str]] = None, referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] ] = None, - rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + rel: Optional[Union[Var[str], str]] = None, + shape: Optional[Union[Var[str], str]] = None, + target: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -89,7 +294,6 @@ class Area(BaseHTML): href: Hyperlink reference for the area href_lang: Language of the linked resource media: Specifies what media/device the linked resource is optimized for - ping: A list of URLs to be notified if the user follows the hyperlink referrer_policy: Specifies which referrer information to send with the link rel: Specifies the relationship of the target object to the link object shape: Defines the shape of the area (rectangle, circle, polygon) @@ -123,46 +327,231 @@ class Area(BaseHTML): """ ... +CrossOrigin = Literal["anonymous", "use-credentials", ""] + class Audio(BaseHTML): @overload @classmethod def create( # type: ignore cls, *children, - auto_play: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - buffered: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - controls: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_play: Optional[Union[Var[bool], bool]] = None, + controls: Optional[Union[Var[bool], bool]] = None, cross_origin: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["", "anonymous", "use-credentials"], + Var[Literal["", "anonymous", "use-credentials"]], + ] ] = None, - loop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - muted: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - preload: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + loop: Optional[Union[Var[bool], bool]] = None, + muted: Optional[Union[Var[bool], bool]] = None, + preload: Optional[Union[Var[str], str]] = None, + src: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -191,7 +580,6 @@ class Audio(BaseHTML): Args: *children: The children of the component. auto_play: Specifies that the audio will start playing as soon as it is ready - buffered: Represents the time range of the buffered media controls: Displays the standard audio controls cross_origin: Configures the CORS requests for the element loop: Specifies that the audio will loop @@ -227,54 +615,267 @@ class Audio(BaseHTML): """ ... +ImageDecoding = Literal["async", "auto", "sync"] +ImageLoading = Literal["eager", "lazy"] + class Img(BaseHTML): @overload @classmethod def create( # type: ignore cls, *children, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + alt: Optional[Union[Var[str], str]] = None, cross_origin: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["", "anonymous", "use-credentials"], + Var[Literal["", "anonymous", "use-credentials"]], + ] ] = None, - decoding: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - intrinsicsize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + decoding: Optional[ + Union[ + Literal["async", "auto", "sync"], Var[Literal["async", "auto", "sync"]] + ] + ] = None, + loading: Optional[ + Union[Literal["eager", "lazy"], Var[Literal["eager", "lazy"]]] ] = None, - ismap: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - loading: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] ] = None, - sizes: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + sizes: Optional[Union[Var[str], str]] = None, src: Optional[Union[Any, Var[Any]]] = None, - src_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + src_set: Optional[Union[Var[str], str]] = None, + use_map: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -302,12 +903,9 @@ class Img(BaseHTML): Args: *children: The children of the component. - align: Image alignment with respect to its surrounding elements alt: Alternative text for the image cross_origin: Configures the CORS requests for the image decoding: How the image should be decoded - intrinsicsize: Specifies an intrinsic size for the image - ismap: Whether the image is a server-side image map loading: Specifies the loading behavior of the image referrer_policy: Referrer policy for the image sizes: Sizes of the image for different layouts @@ -349,31 +947,212 @@ class Map(BaseHTML): def create( # type: ignore cls, *children, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + name: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -437,35 +1216,216 @@ class Track(BaseHTML): def create( # type: ignore cls, *children, - default: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - kind: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + default: Optional[Union[Var[bool], bool]] = None, + kind: Optional[Union[Var[str], str]] = None, + label: Optional[Union[Var[str], str]] = None, + src: Optional[Union[Var[str], str]] = None, + src_lang: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -533,44 +1493,225 @@ class Video(BaseHTML): def create( # type: ignore cls, *children, - auto_play: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - buffered: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - controls: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_play: Optional[Union[Var[bool], bool]] = None, + controls: Optional[Union[Var[bool], bool]] = None, cross_origin: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["", "anonymous", "use-credentials"], + Var[Literal["", "anonymous", "use-credentials"]], + ] ] = None, - loop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - muted: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - plays_inline: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - poster: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - preload: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + loop: Optional[Union[Var[bool], bool]] = None, + muted: Optional[Union[Var[bool], bool]] = None, + plays_inline: Optional[Union[Var[bool], bool]] = None, + poster: Optional[Union[Var[str], str]] = None, + preload: Optional[Union[Var[str], str]] = None, + src: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -599,7 +1740,6 @@ class Video(BaseHTML): Args: *children: The children of the component. auto_play: Specifies that the video will start playing as soon as it is ready - buffered: Represents the time range of the buffered media controls: Displays the standard video controls cross_origin: Configures the CORS requests for the video loop: Specifies that the video will loop @@ -643,32 +1783,213 @@ class Embed(BaseHTML): def create( # type: ignore cls, *children, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + src: Optional[Union[Var[str], str]] = None, + type: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -733,41 +2054,247 @@ class Iframe(BaseHTML): def create( # type: ignore cls, *children, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - allow: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - csp: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - loading: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + allow: Optional[Union[Var[str], str]] = None, + loading: Optional[ + Union[Literal["eager", "lazy"], Var[Literal["eager", "lazy"]]] ] = None, - sandbox: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src_doc: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + name: Optional[Union[Var[str], str]] = None, + referrer_policy: Optional[ + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] + ] = None, + sandbox: Optional[Union[Var[str], str]] = None, + src: Optional[Union[Var[str], str]] = None, + src_doc: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -795,9 +2322,7 @@ class Iframe(BaseHTML): Args: *children: The children of the component. - align: Alignment of the iframe within the page or surrounding elements allow: Permissions policy for the iframe - csp: Content Security Policy to apply to the iframe's content loading: Specifies the loading behavior of the iframe name: Name of the iframe, used as a target for hyperlinks and forms referrer_policy: Referrer policy for the iframe @@ -839,35 +2364,216 @@ class Object(BaseHTML): def create( # type: ignore cls, *children, - data: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + data: Optional[Union[Var[str], str]] = None, + form: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + type: Optional[Union[Var[str], str]] = None, + use_map: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -935,30 +2641,211 @@ class Picture(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1021,30 +2908,211 @@ class Portal(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1107,35 +3175,216 @@ class Source(BaseHTML): def create( # type: ignore cls, *children, - media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - sizes: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + media: Optional[Union[Var[str], str]] = None, + sizes: Optional[Union[Var[str], str]] = None, + src: Optional[Union[Var[str], str]] = None, + src_set: Optional[Union[Var[str], str]] = None, + type: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1206,30 +3455,211 @@ class Svg(BaseHTML): width: Optional[Union[Var[Union[int, str]], int, str]] = None, height: Optional[Union[Var[Union[int, str]], int, str]] = None, xmlns: Optional[Union[Var[str], str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1302,30 +3732,211 @@ class Text(BaseHTML): rotate: Optional[Union[Var[Union[int, str]], int, str]] = None, length_adjust: Optional[Union[Var[str], str]] = None, text_length: Optional[Union[Var[Union[int, str]], int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1400,30 +4011,211 @@ class Line(BaseHTML): y1: Optional[Union[Var[Union[int, str]], int, str]] = None, y2: Optional[Union[Var[Union[int, str]], int, str]] = None, path_length: Optional[Union[Var[int], int]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1495,30 +4287,211 @@ class Circle(BaseHTML): cy: Optional[Union[Var[Union[int, str]], int, str]] = None, r: Optional[Union[Var[Union[int, str]], int, str]] = None, path_length: Optional[Union[Var[int], int]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1590,30 +4563,211 @@ class Ellipse(BaseHTML): rx: Optional[Union[Var[Union[int, str]], int, str]] = None, ry: Optional[Union[Var[Union[int, str]], int, str]] = None, path_length: Optional[Union[Var[int], int]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1688,30 +4842,211 @@ class Rect(BaseHTML): rx: Optional[Union[Var[Union[int, str]], int, str]] = None, ry: Optional[Union[Var[Union[int, str]], int, str]] = None, path_length: Optional[Union[Var[int], int]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1783,30 +5118,211 @@ class Polygon(BaseHTML): *children, points: Optional[Union[Var[str], str]] = None, path_length: Optional[Union[Var[int], int]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1871,30 +5387,211 @@ class Defs(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1960,34 +5657,215 @@ class LinearGradient(BaseHTML): gradient_units: Optional[Union[Var[Union[bool, str]], bool, str]] = None, gradient_transform: Optional[Union[Var[Union[bool, str]], bool, str]] = None, spread_method: Optional[Union[Var[Union[bool, str]], bool, str]] = None, - x1: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - x2: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - y1: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - y2: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + x1: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + x2: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + y1: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + y2: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2057,39 +5935,220 @@ class RadialGradient(BaseHTML): def create( # type: ignore cls, *children, - cx: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - cy: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - fr: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - fx: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - fy: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cx: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + cy: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + fr: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + fx: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + fy: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, gradient_units: Optional[Union[Var[Union[bool, str]], bool, str]] = None, gradient_transform: Optional[Union[Var[Union[bool, str]], bool, str]] = None, - r: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + r: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, spread_method: Optional[Union[Var[Union[bool, str]], bool, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2168,30 +6227,211 @@ class Stop(BaseHTML): stop_opacity: Optional[ Union[Var[Union[bool, float, int, str]], bool, float, int, str] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2257,31 +6497,212 @@ class Path(BaseHTML): def create( # type: ignore cls, *children, - d: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + d: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2358,30 +6779,211 @@ class SVG(ComponentNamespace): width: Optional[Union[Var[Union[int, str]], int, str]] = None, height: Optional[Union[Var[Union[int, str]], int, str]] = None, xmlns: Optional[Union[Var[str], str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/el/elements/metadata.py b/reflex/components/el/elements/metadata.py index 8e0fbcd4d..7f8efb70f 100644 --- a/reflex/components/el/elements/metadata.py +++ b/reflex/components/el/elements/metadata.py @@ -1,8 +1,10 @@ """Metadata classes.""" -from typing import List, Union +from typing import List from reflex.components.el.element import Element +from reflex.components.el.elements.inline import ReferrerPolicy +from reflex.components.el.elements.media import CrossOrigin from reflex.vars.base import Var from .base import BaseHTML @@ -14,8 +16,8 @@ class Base(BaseHTML): tag = "base" tag = "base" - href: Var[Union[str, int, bool]] - target: Var[Union[str, int, bool]] + href: Var[str] + target: Var[str] class Head(BaseHTML): @@ -30,31 +32,31 @@ class Link(BaseHTML): tag = "link" # Specifies the CORS settings for the linked resource - cross_origin: Var[Union[str, int, bool]] + cross_origin: Var[CrossOrigin] # Specifies the URL of the linked document/resource - href: Var[Union[str, int, bool]] + href: Var[str] # Specifies the language of the text in the linked document - href_lang: Var[Union[str, int, bool]] + href_lang: Var[str] # Allows a browser to check the fetched link for integrity - integrity: Var[Union[str, int, bool]] + integrity: Var[str] # Specifies on what device the linked document will be displayed - media: Var[Union[str, int, bool]] + media: Var[str] # Specifies the referrer policy of the linked document - referrer_policy: Var[Union[str, int, bool]] + referrer_policy: Var[ReferrerPolicy] # Specifies the relationship between the current document and the linked one - rel: Var[Union[str, int, bool]] + rel: Var[str] # Specifies the sizes of icons for visual media - sizes: Var[Union[str, int, bool]] + sizes: Var[str] # Specifies the MIME type of the linked document - type: Var[Union[str, int, bool]] + type: Var[str] class Meta(BaseHTML): # Inherits common attributes from BaseHTML @@ -63,16 +65,16 @@ class Meta(BaseHTML): # Inherits common attributes from BaseHTML tag = "meta" # The HTML tag for this element is # Specifies the character encoding for the HTML document - char_set: Var[Union[str, int, bool]] + char_set: Var[str] # Defines the content of the metadata - content: Var[Union[str, int, bool]] + content: Var[str] # Provides an HTTP header for the information/value of the content attribute - http_equiv: Var[Union[str, int, bool]] + http_equiv: Var[str] # Specifies a name for the metadata - name: Var[Union[str, int, bool]] + name: Var[str] class Title(Element): @@ -87,7 +89,7 @@ class StyleEl(Element): tag = "style" - media: Var[Union[str, int, bool]] + media: Var[str] special_props: List[Var] = [Var(_js_expr="suppressHydrationWarning")] diff --git a/reflex/components/el/elements/metadata.pyi b/reflex/components/el/elements/metadata.pyi index 7cc6afa80..81527f872 100644 --- a/reflex/components/el/elements/metadata.pyi +++ b/reflex/components/el/elements/metadata.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.el.element import Element from reflex.event import EventType @@ -18,32 +18,213 @@ class Base(BaseHTML): def create( # type: ignore cls, *children, - href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + href: Optional[Union[Var[str], str]] = None, + target: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -106,30 +287,211 @@ class Head(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -193,42 +555,251 @@ class Link(BaseHTML): cls, *children, cross_origin: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["", "anonymous", "use-credentials"], + Var[Literal["", "anonymous", "use-credentials"]], + ] ] = None, - href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - integrity: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + href: Optional[Union[Var[str], str]] = None, + href_lang: Optional[Union[Var[str], str]] = None, + integrity: Optional[Union[Var[str], str]] = None, + media: Optional[Union[Var[str], str]] = None, referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] ] = None, - rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - sizes: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + rel: Optional[Union[Var[str], str]] = None, + sizes: Optional[Union[Var[str], str]] = None, + type: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -300,34 +871,215 @@ class Meta(BaseHTML): def create( # type: ignore cls, *children, - char_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - content: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - http_equiv: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + char_set: Optional[Union[Var[str], str]] = None, + content: Optional[Union[Var[str], str]] = None, + http_equiv: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -440,7 +1192,7 @@ class StyleEl(Element): def create( # type: ignore cls, *children, - media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + media: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/el/elements/other.py b/reflex/components/el/elements/other.py index 4e7f0f227..cbd30eda8 100644 --- a/reflex/components/el/elements/other.py +++ b/reflex/components/el/elements/other.py @@ -1,7 +1,5 @@ """Other classes.""" -from typing import Union - from reflex.vars.base import Var from .base import BaseHTML @@ -13,7 +11,7 @@ class Details(BaseHTML): tag = "details" # Indicates whether the details will be visible (expanded) to the user - open: Var[Union[str, int, bool]] + open: Var[bool] class Dialog(BaseHTML): @@ -22,7 +20,7 @@ class Dialog(BaseHTML): tag = "dialog" # Indicates whether the dialog is active and can be interacted with - open: Var[Union[str, int, bool]] + open: Var[bool] class Summary(BaseHTML): @@ -67,7 +65,7 @@ class Html(BaseHTML): tag = "html" # Specifies the URL of the document's cache manifest (obsolete in HTML5) - manifest: Var[Union[str, int, bool]] + manifest: Var[str] details = Details.create diff --git a/reflex/components/el/elements/other.pyi b/reflex/components/el/elements/other.pyi index 5e58d29f0..a03bb0dda 100644 --- a/reflex/components/el/elements/other.pyi +++ b/reflex/components/el/elements/other.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.event import EventType from reflex.style import Style @@ -17,31 +17,212 @@ class Details(BaseHTML): def create( # type: ignore cls, *children, - open: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + open: Optional[Union[Var[bool], bool]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -105,31 +286,212 @@ class Dialog(BaseHTML): def create( # type: ignore cls, *children, - open: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + open: Optional[Union[Var[bool], bool]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -193,30 +555,211 @@ class Summary(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -279,30 +822,211 @@ class Slot(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -365,30 +1089,211 @@ class Template(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -451,30 +1356,211 @@ class Math(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -537,31 +1623,212 @@ class Html(BaseHTML): def create( # type: ignore cls, *children, - manifest: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + manifest: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/el/elements/scripts.py b/reflex/components/el/elements/scripts.py index c30931e99..593a23aed 100644 --- a/reflex/components/el/elements/scripts.py +++ b/reflex/components/el/elements/scripts.py @@ -1,7 +1,7 @@ """Scripts classes.""" -from typing import Union - +from reflex.components.el.elements.inline import ReferrerPolicy +from reflex.components.el.elements.media import CrossOrigin from reflex.vars.base import Var from .base import BaseHTML @@ -25,31 +25,28 @@ class Script(BaseHTML): tag = "script" # Indicates that the script should be executed asynchronously - async_: Var[Union[str, int, bool]] + async_: Var[bool] # Character encoding of the external script - char_set: Var[Union[str, int, bool]] + char_set: Var[str] # Configures the CORS requests for the script - cross_origin: Var[Union[str, int, bool]] + cross_origin: Var[CrossOrigin] # Indicates that the script should be executed after the page has finished parsing - defer: Var[Union[str, int, bool]] + defer: Var[bool] # Security feature allowing browsers to verify what they fetch - integrity: Var[Union[str, int, bool]] - - # Specifies the scripting language used in the type attribute - language: Var[Union[str, int, bool]] + integrity: Var[str] # Specifies which referrer information to send when fetching the script - referrer_policy: Var[Union[str, int, bool]] + referrer_policy: Var[ReferrerPolicy] # URL of an external script - src: Var[Union[str, int, bool]] + src: Var[str] # Specifies the MIME type of the script - type: Var[Union[str, int, bool]] + type: Var[str] canvas = Canvas.create diff --git a/reflex/components/el/elements/scripts.pyi b/reflex/components/el/elements/scripts.pyi index 9354a7337..c1a71253b 100644 --- a/reflex/components/el/elements/scripts.pyi +++ b/reflex/components/el/elements/scripts.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.event import EventType from reflex.style import Style @@ -17,30 +17,211 @@ class Canvas(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -103,30 +284,211 @@ class Noscript(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -189,43 +551,251 @@ class Script(BaseHTML): def create( # type: ignore cls, *children, - async_: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - char_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + async_: Optional[Union[Var[bool], bool]] = None, + char_set: Optional[Union[Var[str], str]] = None, cross_origin: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["", "anonymous", "use-credentials"], + Var[Literal["", "anonymous", "use-credentials"]], + ] ] = None, - defer: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - integrity: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - language: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + defer: Optional[Union[Var[bool], bool]] = None, + integrity: Optional[Union[Var[str], str]] = None, referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] ] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + src: Optional[Union[Var[str], str]] = None, + type: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -258,7 +828,6 @@ class Script(BaseHTML): cross_origin: Configures the CORS requests for the script defer: Indicates that the script should be executed after the page has finished parsing integrity: Security feature allowing browsers to verify what they fetch - language: Specifies the scripting language used in the type attribute referrer_policy: Specifies which referrer information to send when fetching the script src: URL of an external script type: Specifies the MIME type of the script diff --git a/reflex/components/el/elements/sectioning.pyi b/reflex/components/el/elements/sectioning.pyi index e179fc779..be22927af 100644 --- a/reflex/components/el/elements/sectioning.pyi +++ b/reflex/components/el/elements/sectioning.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.event import EventType from reflex.style import Style @@ -17,30 +17,211 @@ class Body(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -103,30 +284,211 @@ class Address(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -189,30 +551,211 @@ class Article(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -275,30 +818,211 @@ class Aside(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -361,30 +1085,211 @@ class Footer(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -447,30 +1352,211 @@ class Header(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -533,30 +1619,211 @@ class H1(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -619,30 +1886,211 @@ class H2(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -705,30 +2153,211 @@ class H3(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -791,30 +2420,211 @@ class H4(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -877,30 +2687,211 @@ class H5(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -963,30 +2954,211 @@ class H6(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1049,30 +3221,211 @@ class Main(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1135,30 +3488,211 @@ class Nav(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1221,30 +3755,211 @@ class Section(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/el/elements/tables.py b/reflex/components/el/elements/tables.py index a0c10d829..cf5130ccf 100644 --- a/reflex/components/el/elements/tables.py +++ b/reflex/components/el/elements/tables.py @@ -1,6 +1,6 @@ """Tables classes.""" -from typing import Union +from typing import Literal from reflex.vars.base import Var @@ -12,20 +12,14 @@ class Caption(BaseHTML): tag = "caption" - # Alignment of the caption - align: Var[Union[str, int, bool]] - class Col(BaseHTML): """Display the col element.""" tag = "col" - # Alignment of the content within the column - align: Var[Union[str, int, bool]] - # Number of columns the col element spans - span: Var[Union[str, int, bool]] + span: Var[int] class Colgroup(BaseHTML): @@ -33,11 +27,8 @@ class Colgroup(BaseHTML): tag = "colgroup" - # Alignment of the content within the column group - align: Var[Union[str, int, bool]] - # Number of columns the colgroup element spans - span: Var[Union[str, int, bool]] + span: Var[int] class Table(BaseHTML): @@ -46,10 +37,10 @@ class Table(BaseHTML): tag = "table" # Alignment of the table - align: Var[Union[str, int, bool]] + align: Var[Literal["left", "center", "right"]] # Provides a summary of the table's purpose and structure - summary: Var[Union[str, int, bool]] + summary: Var[str] class Tbody(BaseHTML): @@ -57,9 +48,6 @@ class Tbody(BaseHTML): tag = "tbody" - # Alignment of the content within the table body - align: Var[Union[str, int, bool]] - class Td(BaseHTML): """Display the td element.""" @@ -67,16 +55,16 @@ class Td(BaseHTML): tag = "td" # Alignment of the content within the table cell - align: Var[Union[str, int, bool]] + align: Var[Literal["left", "center", "right", "justify", "char"]] # Number of columns a cell should span - col_span: Var[Union[str, int, bool]] + col_span: Var[int] # IDs of the headers associated with this cell - headers: Var[Union[str, int, bool]] + headers: Var[str] # Number of rows a cell should span - row_span: Var[Union[str, int, bool]] + row_span: Var[int] class Tfoot(BaseHTML): @@ -84,9 +72,6 @@ class Tfoot(BaseHTML): tag = "tfoot" - # Alignment of the content within the table footer - align: Var[Union[str, int, bool]] - class Th(BaseHTML): """Display the th element.""" @@ -94,19 +79,19 @@ class Th(BaseHTML): tag = "th" # Alignment of the content within the table header cell - align: Var[Union[str, int, bool]] + align: Var[Literal["left", "center", "right", "justify", "char"]] # Number of columns a header cell should span - col_span: Var[Union[str, int, bool]] + col_span: Var[int] # IDs of the headers associated with this header cell - headers: Var[Union[str, int, bool]] + headers: Var[str] # Number of rows a header cell should span - row_span: Var[Union[str, int, bool]] + row_span: Var[int] # Scope of the header cell (row, col, rowgroup, colgroup) - scope: Var[Union[str, int, bool]] + scope: Var[str] class Thead(BaseHTML): @@ -114,18 +99,12 @@ class Thead(BaseHTML): tag = "thead" - # Alignment of the content within the table header - align: Var[Union[str, int, bool]] - class Tr(BaseHTML): """Display the tr element.""" tag = "tr" - # Alignment of the content within the table row - align: Var[Union[str, int, bool]] - caption = Caption.create col = Col.create diff --git a/reflex/components/el/elements/tables.pyi b/reflex/components/el/elements/tables.pyi index 06904eacc..7f5d29ac5 100644 --- a/reflex/components/el/elements/tables.pyi +++ b/reflex/components/el/elements/tables.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.event import EventType from reflex.style import Style @@ -17,31 +17,211 @@ class Caption(BaseHTML): def create( # type: ignore cls, *children, - align: 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[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -69,7 +249,6 @@ class Caption(BaseHTML): Args: *children: The children of the component. - align: Alignment of the caption access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -105,32 +284,212 @@ class Col(BaseHTML): def create( # type: ignore cls, *children, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + span: Optional[Union[Var[int], int]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -158,7 +517,6 @@ class Col(BaseHTML): Args: *children: The children of the component. - align: Alignment of the content within the column span: Number of columns the col element spans access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -195,32 +553,212 @@ class Colgroup(BaseHTML): def create( # type: ignore cls, *children, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + span: Optional[Union[Var[int], int]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -248,7 +786,6 @@ class Colgroup(BaseHTML): Args: *children: The children of the component. - align: Alignment of the content within the column group span: Number of columns the colgroup element spans access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -285,32 +822,218 @@ class Table(BaseHTML): def create( # type: ignore cls, *children, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - summary: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + align: Optional[ + Union[ + Literal["center", "left", "right"], + Var[Literal["center", "left", "right"]], + ] + ] = None, + summary: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -375,31 +1098,211 @@ class Tbody(BaseHTML): def create( # type: ignore cls, *children, - align: 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[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -427,7 +1330,6 @@ class Tbody(BaseHTML): Args: *children: The children of the component. - align: Alignment of the content within the table body access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -463,34 +1365,220 @@ class Td(BaseHTML): def create( # type: ignore cls, *children, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - col_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - headers: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - row_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + align: Optional[ + Union[ + Literal["center", "char", "justify", "left", "right"], + Var[Literal["center", "char", "justify", "left", "right"]], + ] + ] = None, + col_span: Optional[Union[Var[int], int]] = None, + headers: Optional[Union[Var[str], str]] = None, + row_span: Optional[Union[Var[int], int]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -557,31 +1645,211 @@ class Tfoot(BaseHTML): def create( # type: ignore cls, *children, - align: 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[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -609,7 +1877,6 @@ class Tfoot(BaseHTML): Args: *children: The children of the component. - align: Alignment of the content within the table footer access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -645,35 +1912,221 @@ class Th(BaseHTML): def create( # type: ignore cls, *children, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - col_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - headers: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - row_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - scope: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + align: Optional[ + Union[ + Literal["center", "char", "justify", "left", "right"], + Var[Literal["center", "char", "justify", "left", "right"]], + ] + ] = None, + col_span: Optional[Union[Var[int], int]] = None, + headers: Optional[Union[Var[str], str]] = None, + row_span: Optional[Union[Var[int], int]] = None, + scope: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -741,31 +2194,211 @@ class Thead(BaseHTML): def create( # type: ignore cls, *children, - align: 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[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -793,7 +2426,6 @@ class Thead(BaseHTML): Args: *children: The children of the component. - align: Alignment of the content within the table header access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -829,31 +2461,211 @@ class Tr(BaseHTML): def create( # type: ignore cls, *children, - align: 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[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -881,7 +2693,6 @@ class Tr(BaseHTML): Args: *children: The children of the component. - align: Alignment of the content within the table row access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/el/elements/typography.py b/reflex/components/el/elements/typography.py index 9fa5c3a02..871af426b 100644 --- a/reflex/components/el/elements/typography.py +++ b/reflex/components/el/elements/typography.py @@ -1,6 +1,6 @@ """Typography classes.""" -from typing import Union +from typing import Literal from reflex.vars.base import Var @@ -13,7 +13,7 @@ class Blockquote(BaseHTML): tag = "blockquote" # Define the title of a work. - cite: Var[Union[str, int, bool]] + cite: Var[str] class Dd(BaseHTML): @@ -51,9 +51,6 @@ class Hr(BaseHTML): tag = "hr" - # Used to specify the alignment of text content of The Element. this attribute is used in all elements. - align: Var[Union[str, int, bool]] - class Li(BaseHTML): """Display the li element.""" @@ -67,7 +64,7 @@ class Menu(BaseHTML): tag = "menu" # Specifies that the menu element is a context menu. - type: Var[Union[str, int, bool]] + type: Var[str] class Ol(BaseHTML): @@ -76,13 +73,13 @@ class Ol(BaseHTML): tag = "ol" # Reverses the order of the list. - reversed: Var[Union[str, int, bool]] + reversed: Var[bool] # Specifies the start value of the first list item in an ordered list. - start: Var[Union[str, int, bool]] + start: Var[int] # Specifies the kind of marker to use in the list (letters or numbers). - type: Var[Union[str, int, bool]] + type: Var[Literal["1", "a", "A", "i", "I"]] class P(BaseHTML): @@ -109,10 +106,10 @@ class Ins(BaseHTML): tag = "ins" # Specifies the URL of the document that explains the reason why the text was inserted/changed. - cite: Var[Union[str, int, bool]] + cite: Var[str] # Specifies the date and time of when the text was inserted/changed. - date_time: Var[Union[str, int, bool]] + date_time: Var[str] class Del(BaseHTML): @@ -121,10 +118,10 @@ class Del(BaseHTML): tag = "del" # Specifies the URL of the document that explains the reason why the text was deleted. - cite: Var[Union[str, int, bool]] + cite: Var[str] # Specifies the date and time of when the text was deleted. - date_time: Var[Union[str, int, bool]] + date_time: Var[str] blockquote = Blockquote.create diff --git a/reflex/components/el/elements/typography.pyi b/reflex/components/el/elements/typography.pyi index a51bdcf08..acb925409 100644 --- a/reflex/components/el/elements/typography.pyi +++ b/reflex/components/el/elements/typography.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.event import EventType from reflex.style import Style @@ -17,31 +17,212 @@ class Blockquote(BaseHTML): def create( # type: ignore cls, *children, - cite: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cite: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -105,30 +286,211 @@ class Dd(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -191,30 +553,211 @@ class Div(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -277,30 +820,211 @@ class Dl(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -363,30 +1087,211 @@ class Dt(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -449,30 +1354,211 @@ class Figcaption(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -535,31 +1621,211 @@ class Hr(BaseHTML): def create( # type: ignore cls, *children, - align: 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[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -587,7 +1853,6 @@ class Hr(BaseHTML): Args: *children: The children of the component. - align: Used to specify the alignment of text content of The Element. this attribute is used in all elements. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -623,30 +1888,211 @@ class Li(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -709,31 +2155,212 @@ class Menu(BaseHTML): def create( # type: ignore cls, *children, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + type: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -797,33 +2424,218 @@ class Ol(BaseHTML): def create( # type: ignore cls, *children, - reversed: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - start: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + reversed: Optional[Union[Var[bool], bool]] = None, + start: Optional[Union[Var[int], int]] = None, + type: Optional[ + Union[ + Literal["1", "A", "I", "a", "i"], Var[Literal["1", "A", "I", "a", "i"]] + ] + ] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -889,30 +2701,211 @@ class P(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -975,30 +2968,211 @@ class Pre(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1061,30 +3235,211 @@ class Ul(BaseHTML): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1147,32 +3502,213 @@ class Ins(BaseHTML): def create( # type: ignore cls, *children, - cite: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - date_time: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cite: Optional[Union[Var[str], str]] = None, + date_time: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1237,32 +3773,213 @@ class Del(BaseHTML): def create( # type: ignore cls, *children, - cite: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - date_time: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cite: Optional[Union[Var[str], str]] = None, + date_time: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index c839e3a18..2e17bd3c3 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -69,45 +69,222 @@ class FormRoot(FormComponent, HTMLForm): cls, *children, as_child: Optional[Union[Var[bool], bool]] = None, - accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - accept_charset: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - auto_complete: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + accept: Optional[Union[Var[str], str]] = None, + accept_charset: Optional[Union[Var[str], str]] = None, + action: Optional[Union[Var[str], str]] = None, + auto_complete: Optional[Union[Var[str], str]] = None, + enc_type: Optional[Union[Var[str], str]] = None, + method: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + no_validate: Optional[Union[Var[bool], bool]] = None, + target: Optional[Union[Var[str], str]] = None, reset_on_submit: Optional[Union[Var[bool], bool]] = None, handle_submit_unique_name: Optional[Union[Var[str], str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -541,45 +718,222 @@ class Form(FormRoot): cls, *children, as_child: Optional[Union[Var[bool], bool]] = None, - accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - accept_charset: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - auto_complete: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + accept: Optional[Union[Var[str], str]] = None, + accept_charset: Optional[Union[Var[str], str]] = None, + action: Optional[Union[Var[str], str]] = None, + auto_complete: Optional[Union[Var[str], str]] = None, + enc_type: Optional[Union[Var[str], str]] = None, + method: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + no_validate: Optional[Union[Var[bool], bool]] = None, + target: Optional[Union[Var[str], str]] = None, reset_on_submit: Optional[Union[Var[bool], bool]] = None, handle_submit_unique_name: Optional[Union[Var[str], str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -670,45 +1024,222 @@ class FormNamespace(ComponentNamespace): def __call__( *children, as_child: Optional[Union[Var[bool], bool]] = None, - accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - accept_charset: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - auto_complete: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + accept: Optional[Union[Var[str], str]] = None, + accept_charset: Optional[Union[Var[str], str]] = None, + action: Optional[Union[Var[str], str]] = None, + auto_complete: Optional[Union[Var[str], str]] = None, + enc_type: Optional[Union[Var[str], str]] = None, + method: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + no_validate: Optional[Union[Var[bool], bool]] = None, + target: Optional[Union[Var[str], str]] = None, reset_on_submit: Optional[Union[Var[bool], bool]] = None, handle_submit_unique_name: Optional[Union[Var[str], str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi index 3b92b752d..deb2dd5f2 100644 --- a/reflex/components/radix/themes/color_mode.pyi +++ b/reflex/components/radix/themes/color_mode.pyi @@ -172,45 +172,227 @@ class ColorModeIconButton(IconButton): Var[Literal["full", "large", "medium", "none", "small"]], ] ] = None, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, disabled: Optional[Union[Var[bool], bool]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_enc_type: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + form: Optional[Union[Var[str], str]] = None, + form_action: Optional[Union[Var[str], str]] = None, + form_enc_type: Optional[Union[Var[str], str]] = None, + form_method: Optional[Union[Var[str], str]] = None, + form_no_validate: Optional[Union[Var[bool], bool]] = None, + form_target: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + type: Optional[ + Union[ + Literal["button", "reset", "submit"], + Var[Literal["button", "reset", "submit"]], + ] ] = None, - form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_no_validate: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, loading: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/alert_dialog.pyi b/reflex/components/radix/themes/components/alert_dialog.pyi index 80a12c7a6..8c5d7df23 100644 --- a/reflex/components/radix/themes/components/alert_dialog.pyi +++ b/reflex/components/radix/themes/components/alert_dialog.pyi @@ -130,30 +130,211 @@ class AlertDialogContent(elements.Div, RadixThemesComponent): ] ] = None, force_mount: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index 5d66e480c..ae086100e 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -105,30 +105,211 @@ class Badge(elements.Span, RadixThemesComponent): Var[Literal["full", "large", "medium", "none", "small"]], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index 7ce055485..1178ee1c4 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -109,45 +109,227 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent): Var[Literal["full", "large", "medium", "none", "small"]], ] ] = None, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, disabled: Optional[Union[Var[bool], bool]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_enc_type: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + form: Optional[Union[Var[str], str]] = None, + form_action: Optional[Union[Var[str], str]] = None, + form_enc_type: Optional[Union[Var[str], str]] = None, + form_method: Optional[Union[Var[str], str]] = None, + form_no_validate: Optional[Union[Var[bool], bool]] = None, + form_target: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + type: Optional[ + Union[ + Literal["button", "reset", "submit"], + Var[Literal["button", "reset", "submit"]], + ] ] = None, - form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_no_validate: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, loading: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index 5aa6a72d0..e09d1ded8 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -103,30 +103,211 @@ class CalloutRoot(elements.Div, RadixThemesComponent): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -197,30 +378,211 @@ class CalloutIcon(elements.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -286,30 +648,211 @@ class CalloutText(elements.P, RadixThemesComponent): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -458,30 +1001,211 @@ class Callout(CalloutRoot): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -636,30 +1360,211 @@ class CalloutNamespace(ComponentNamespace): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index 9b528eada..a52900f57 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -38,30 +38,211 @@ class Card(elements.Div, RadixThemesComponent): Var[Literal["classic", "ghost", "surface"]], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index 1f713a093..d987ada0b 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -176,30 +176,211 @@ class DialogContent(elements.Div, RadixThemesComponent): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/hover_card.pyi b/reflex/components/radix/themes/components/hover_card.pyi index d68977061..f35b67b4a 100644 --- a/reflex/components/radix/themes/components/hover_card.pyi +++ b/reflex/components/radix/themes/components/hover_card.pyi @@ -163,30 +163,211 @@ class HoverCardContent(elements.Div, RadixThemesComponent): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/icon_button.pyi b/reflex/components/radix/themes/components/icon_button.pyi index 4810936b6..0b8d98de6 100644 --- a/reflex/components/radix/themes/components/icon_button.pyi +++ b/reflex/components/radix/themes/components/icon_button.pyi @@ -110,45 +110,227 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent): Var[Literal["full", "large", "medium", "none", "small"]], ] ] = None, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, disabled: Optional[Union[Var[bool], bool]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_enc_type: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + form: Optional[Union[Var[str], str]] = None, + form_action: Optional[Union[Var[str], str]] = None, + form_enc_type: Optional[Union[Var[str], str]] = None, + form_method: Optional[Union[Var[str], str]] = None, + form_no_validate: Optional[Union[Var[bool], bool]] = None, + form_target: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + type: Optional[ + Union[ + Literal["button", "reset", "submit"], + Var[Literal["button", "reset", "submit"]], + ] ] = None, - form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_no_validate: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, loading: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index 90621fa33..ef9fbd9ad 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -103,30 +103,211 @@ class Inset(elements.Div, RadixThemesComponent): str, ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index 6f5d32c1e..edaf11e7c 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -156,30 +156,211 @@ class PopoverContent(elements.Div, RadixThemesComponent): Union[Literal["always", "partial"], Var[Literal["always", "partial"]]] ] = None, hide_when_detached: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index fb926d3f5..ac0488244 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -34,32 +34,218 @@ class TableRoot(elements.Table, RadixThemesComponent): variant: Optional[ Union[Literal["ghost", "surface"], Var[Literal["ghost", "surface"]]] ] = None, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - summary: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + align: Optional[ + Union[ + Literal["center", "left", "right"], + Var[Literal["center", "left", "right"]], + ] + ] = None, + summary: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -129,31 +315,211 @@ class TableHeader(elements.Thead, RadixThemesComponent): def create( # type: ignore cls, *children, - align: 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[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -184,7 +550,6 @@ class TableHeader(elements.Thead, RadixThemesComponent): Args: *children: Child components. - align: Alignment of the content within the table header access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -226,30 +591,211 @@ class TableRow(elements.Tr, RadixThemesComponent): Var[Literal["baseline", "center", "end", "start"]], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -280,7 +826,7 @@ class TableRow(elements.Tr, RadixThemesComponent): Args: *children: Child components. - align: Alignment of the content within the table row + align: The alignment of the row access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -328,35 +874,221 @@ class TableColumnHeaderCell(elements.Th, RadixThemesComponent): max_width: Optional[ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str] ] = None, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - col_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - headers: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - row_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - scope: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + align: Optional[ + Union[ + Literal["center", "char", "justify", "left", "right"], + Var[Literal["center", "char", "justify", "left", "right"]], + ] + ] = None, + col_span: Optional[Union[Var[int], int]] = None, + headers: Optional[Union[Var[str], str]] = None, + row_span: Optional[Union[Var[int], int]] = None, + scope: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -430,31 +1162,211 @@ class TableBody(elements.Tbody, RadixThemesComponent): def create( # type: ignore cls, *children, - align: 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[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -485,7 +1397,6 @@ class TableBody(elements.Tbody, RadixThemesComponent): Args: *children: Child components. - align: Alignment of the content within the table body access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -533,34 +1444,220 @@ class TableCell(elements.Td, CommonPaddingProps, RadixThemesComponent): max_width: Optional[ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str] ] = None, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - col_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - headers: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - row_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + align: Optional[ + Union[ + Literal["center", "char", "justify", "left", "right"], + Var[Literal["center", "char", "justify", "left", "right"]], + ] + ] = None, + col_span: Optional[Union[Var[int], int]] = None, + headers: Optional[Union[Var[str], str]] = None, + row_span: Optional[Union[Var[int], int]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, p: Optional[ Union[ Breakpoints[ @@ -771,35 +1868,221 @@ class TableRowHeaderCell(elements.Th, CommonPaddingProps, RadixThemesComponent): max_width: Optional[ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str] ] = None, - align: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - col_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - headers: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - row_span: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - scope: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + align: Optional[ + Union[ + Literal["center", "char", "justify", "left", "right"], + Var[Literal["center", "char", "justify", "left", "right"]], + ] + ] = None, + col_span: Optional[Union[Var[int], int]] = None, + headers: Optional[Union[Var[str], str]] = None, + row_span: Optional[Union[Var[int], int]] = None, + scope: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, p: Optional[ Union[ Breakpoints[ diff --git a/reflex/components/radix/themes/components/text_area.py b/reflex/components/radix/themes/components/text_area.py index caf98eb2d..0cab7459d 100644 --- a/reflex/components/radix/themes/components/text_area.py +++ b/reflex/components/radix/themes/components/text_area.py @@ -1,6 +1,6 @@ """Interactive components provided by @radix-ui/themes.""" -from typing import Literal, Union +from typing import Literal from reflex.components.component import Component from reflex.components.core.breakpoints import Responsive @@ -51,7 +51,7 @@ class TextArea(RadixThemesComponent, elements.Textarea): disabled: Var[bool] # Associates the textarea with a form (by id) - form: Var[Union[str, int, bool]] + form: Var[str] # Maximum number of characters allowed in the textarea max_length: Var[int] diff --git a/reflex/components/radix/themes/components/text_area.pyi b/reflex/components/radix/themes/components/text_area.pyi index 096ec2de6..5ff258e8e 100644 --- a/reflex/components/radix/themes/components/text_area.pyi +++ b/reflex/components/radix/themes/components/text_area.pyi @@ -126,7 +126,7 @@ class TextArea(RadixThemesComponent, elements.Textarea): default_value: Optional[Union[Var[str], str]] = None, dirname: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + form: Optional[Union[Var[str], str]] = None, max_length: Optional[Union[Var[int], int]] = None, min_length: Optional[Union[Var[int], int]] = None, name: Optional[Union[Var[str], str]] = None, @@ -137,32 +137,213 @@ class TextArea(RadixThemesComponent, elements.Textarea): value: Optional[Union[Var[str], str]] = None, wrap: Optional[Union[Var[str], str]] = None, auto_height: Optional[Union[Var[bool], bool]] = None, - cols: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cols: Optional[Union[Var[int], int]] = None, enter_key_submit: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/components/text_field.py b/reflex/components/radix/themes/components/text_field.py index 130fb7aed..ae42aff47 100644 --- a/reflex/components/radix/themes/components/text_field.py +++ b/reflex/components/radix/themes/components/text_field.py @@ -70,7 +70,7 @@ class TextFieldRoot(elements.Input, RadixThemesComponent): value: Var[Union[str, int, float]] # References a datalist for suggested options - list: Var[Union[str, int, bool]] + list: Var[str] # Fired when the value of the textarea changes. on_change: EventHandler[input_event] diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi index 1cc9f5303..0f71e736b 100644 --- a/reflex/components/radix/themes/components/text_field.pyi +++ b/reflex/components/radix/themes/components/text_field.pyi @@ -119,55 +119,235 @@ class TextFieldRoot(elements.Input, RadixThemesComponent): required: Optional[Union[Var[bool], bool]] = None, type: Optional[Union[Var[str], 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, - accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + list: Optional[Union[Var[str], str]] = None, + accept: Optional[Union[Var[str], str]] = None, + alt: Optional[Union[Var[str], str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, + capture: Optional[ + Union[ + Literal["environment", "user", False, True], + Var[Literal["environment", "user", False, True]], + ] + ] = None, + checked: Optional[Union[Var[bool], bool]] = None, default_checked: Optional[Union[Var[bool], bool]] = None, - dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_enc_type: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_no_validate: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + form: Optional[Union[Var[str], str]] = None, + form_action: Optional[Union[Var[str], str]] = None, + form_enc_type: Optional[Union[Var[str], str]] = None, + form_method: Optional[Union[Var[str], str]] = None, + form_no_validate: Optional[Union[Var[bool], bool]] = None, + form_target: Optional[Union[Var[str], str]] = None, + max: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + min: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + multiple: Optional[Union[Var[bool], bool]] = None, + pattern: Optional[Union[Var[str], str]] = None, + src: Optional[Union[Var[str], str]] = None, + step: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -229,7 +409,6 @@ class TextFieldRoot(elements.Input, RadixThemesComponent): capture: Captures media from the user (camera or microphone) checked: Indicates whether the input is checked (for checkboxes and radio buttons) default_checked: The initial value (for checkboxes and radio buttons) - dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted form: Associates the input with a form (by id) form_action: URL to send the form data to (for type="submit" buttons) form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons) @@ -242,7 +421,6 @@ class TextFieldRoot(elements.Input, RadixThemesComponent): pattern: Regex pattern the input's value must match to be valid src: URL for image inputs step: Specifies the legal number intervals for an input - use_map: Name of the image map used with the input access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -486,55 +664,235 @@ class TextField(ComponentNamespace): required: Optional[Union[Var[bool], bool]] = None, type: Optional[Union[Var[str], 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, - accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + list: Optional[Union[Var[str], str]] = None, + accept: Optional[Union[Var[str], str]] = None, + alt: Optional[Union[Var[str], str]] = None, + auto_focus: Optional[Union[Var[bool], bool]] = None, + capture: Optional[ + Union[ + Literal["environment", "user", False, True], + Var[Literal["environment", "user", False, True]], + ] + ] = None, + checked: Optional[Union[Var[bool], bool]] = None, default_checked: Optional[Union[Var[bool], bool]] = None, - dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_enc_type: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - form_no_validate: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + form: Optional[Union[Var[str], str]] = None, + form_action: Optional[Union[Var[str], str]] = None, + form_enc_type: Optional[Union[Var[str], str]] = None, + form_method: Optional[Union[Var[str], str]] = None, + form_no_validate: Optional[Union[Var[bool], bool]] = None, + form_target: Optional[Union[Var[str], str]] = None, + max: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + min: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + multiple: Optional[Union[Var[bool], bool]] = None, + pattern: Optional[Union[Var[str], str]] = None, + src: Optional[Union[Var[str], str]] = None, + step: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -596,7 +954,6 @@ class TextField(ComponentNamespace): capture: Captures media from the user (camera or microphone) checked: Indicates whether the input is checked (for checkboxes and radio buttons) default_checked: The initial value (for checkboxes and radio buttons) - dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted form: Associates the input with a form (by id) form_action: URL to send the form data to (for type="submit" buttons) form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons) @@ -609,7 +966,6 @@ class TextField(ComponentNamespace): pattern: Regex pattern the input's value must match to be valid src: URL for image inputs step: Specifies the legal number intervals for an input - use_map: Name of the image map used with the input access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi index 58003e505..955ba4a68 100644 --- a/reflex/components/radix/themes/layout/box.pyi +++ b/reflex/components/radix/themes/layout/box.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.el import elements from reflex.event import EventType @@ -18,30 +18,211 @@ class Box(elements.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index f95f7e1e7..a05b98cce 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -95,30 +95,211 @@ class Center(Flex): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi index 69a1e7ed4..50c40e2b7 100644 --- a/reflex/components/radix/themes/layout/container.pyi +++ b/reflex/components/radix/themes/layout/container.pyi @@ -35,30 +35,211 @@ class Container(elements.Div, RadixThemesComponent): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index cb15d476a..79c4f9aa6 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -98,30 +98,211 @@ class Flex(elements.Div, RadixThemesComponent): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index 60f4ea1b4..3aff16f14 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -127,30 +127,211 @@ class Grid(elements.Div, RadixThemesComponent): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index 96fcd0895..2dd73419b 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -172,30 +172,211 @@ class UnorderedList(BaseList, Ul): ] ] = None, items: Optional[Union[Iterable, Var[Iterable]]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -303,33 +484,218 @@ class OrderedList(BaseList, Ol): ] ] = None, items: Optional[Union[Iterable, Var[Iterable]]] = None, - reversed: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - start: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + reversed: Optional[Union[Var[bool], bool]] = None, + start: Optional[Union[Var[int], int]] = None, + type: Optional[ + Union[ + Literal["1", "A", "I", "a", "i"], Var[Literal["1", "A", "I", "a", "i"]] + ] + ] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -397,30 +763,211 @@ class ListItem(Li, MarkdownComponentMap): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi index 9cca9d144..9e678d252 100644 --- a/reflex/components/radix/themes/layout/section.pyi +++ b/reflex/components/radix/themes/layout/section.pyi @@ -32,30 +32,211 @@ class Section(elements.Section, RadixThemesComponent): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index a45fbe69a..52f80d6b3 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -95,30 +95,211 @@ class Spacer(Flex): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index e1286ea4f..eebe0823c 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -72,30 +72,211 @@ class Stack(Flex): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -207,30 +388,211 @@ class VStack(Stack): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -342,30 +704,211 @@ class HStack(Stack): ], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi index fb5cc1fc3..10352c6e5 100644 --- a/reflex/components/radix/themes/typography/blockquote.pyi +++ b/reflex/components/radix/themes/typography/blockquote.pyi @@ -108,31 +108,212 @@ class Blockquote(elements.Blockquote, RadixThemesComponent): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - cite: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cite: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi index 027630ee2..4f80330a1 100644 --- a/reflex/components/radix/themes/typography/code.pyi +++ b/reflex/components/radix/themes/typography/code.pyi @@ -115,30 +115,211 @@ class Code(elements.Code, RadixThemesComponent, MarkdownComponentMap): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi index d2e9cc5fa..a7f463e12 100644 --- a/reflex/components/radix/themes/typography/heading.pyi +++ b/reflex/components/radix/themes/typography/heading.pyi @@ -135,30 +135,211 @@ class Heading(elements.H1, RadixThemesComponent, MarkdownComponentMap): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/components/radix/themes/typography/link.pyi b/reflex/components/radix/themes/typography/link.pyi index 712c8b9ea..0d7aa8b63 100644 --- a/reflex/components/radix/themes/typography/link.pyi +++ b/reflex/components/radix/themes/typography/link.pyi @@ -136,41 +136,252 @@ class Link(RadixThemesComponent, A, MemoizationLeaf, MarkdownComponentMap): ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, is_external: Optional[Union[Var[bool], bool]] = None, - download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + download: Optional[Union[Var[Union[bool, str]], bool, str]] = None, + href: Optional[Union[Var[str], str]] = None, + href_lang: Optional[Union[Var[str], str]] = None, + media: Optional[Union[Var[str], str]] = None, + ping: Optional[Union[Var[str], str]] = None, referrer_policy: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ], + Var[ + Literal[ + "", + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + ] + ], + ] ] = None, - rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + rel: Optional[Union[Var[str], str]] = None, + target: Optional[ + Union[ + Literal["_blank", "_parent", "_self", "_top"], + Var[Union[Literal["_blank", "_parent", "_self", "_top"], str]], + str, + ] + ] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -213,7 +424,6 @@ class Link(RadixThemesComponent, A, MemoizationLeaf, MarkdownComponentMap): ping: Specifies which referrer is sent when fetching the resource referrer_policy: Specifies the relationship between the current document and the linked document rel: Specifies the relationship between the linked document and the current document - shape: Specifies the shape of the area target: Specifies where to open the linked document access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index 43d1309e2..7bf697449 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -202,30 +202,211 @@ class Text(elements.Span, RadixThemesComponent, MarkdownComponentMap): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -459,30 +640,211 @@ class Span(Text): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -556,30 +918,211 @@ class Em(elements.Em, RadixThemesComponent): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -651,30 +1194,211 @@ class Kbd(elements.Kbd, RadixThemesComponent): Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], ] ] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -741,31 +1465,212 @@ class Quote(elements.Q, RadixThemesComponent): def create( # type: ignore cls, *children, - cite: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + cite: Optional[Union[Var[str], str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -832,30 +1737,211 @@ class Strong(elements.Strong, RadixThemesComponent): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1085,30 +2171,211 @@ class TextNamespace(ComponentNamespace): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/experimental/layout.pyi b/reflex/experimental/layout.pyi index 81097c21a..33a12b82c 100644 --- a/reflex/experimental/layout.pyi +++ b/reflex/experimental/layout.pyi @@ -21,30 +21,211 @@ class Sidebar(Box, MemoizationLeaf): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -204,30 +385,211 @@ class Layout(Box): cls, *children, sidebar: Optional[Component] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -272,30 +634,211 @@ class LayoutNamespace(ComponentNamespace): def __call__( *children, sidebar: Optional[Component] = None, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, From 3129ddab47b5146f67e2f749263c1bba2ff24617 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 18 Feb 2025 11:52:39 -0800 Subject: [PATCH 133/144] Add auto scroll (#4790) * add auto_scroll * add auto_scroll * add auto_scroll to global * use random id for maximum safety --- reflex/__init__.py | 1 + reflex/__init__.pyi | 1 + reflex/components/core/__init__.py | 1 + reflex/components/core/__init__.pyi | 1 + reflex/components/core/auto_scroll.py | 111 +++++++++++++++++++++++++ reflex/components/core/auto_scroll.pyi | 103 +++++++++++++++++++++++ 6 files changed, 218 insertions(+) create mode 100644 reflex/components/core/auto_scroll.py create mode 100644 reflex/components/core/auto_scroll.pyi diff --git a/reflex/__init__.py b/reflex/__init__.py index 3209b505e..7ee6f7e73 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -248,6 +248,7 @@ COMPONENTS_CORE_MAPPING: dict = { "selected_files", "upload", ], + "components.core.auto_scroll": ["auto_scroll"], } COMPONENTS_BASE_MAPPING: dict = { diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 5c80269ad..1de63db6e 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -34,6 +34,7 @@ from .components.component import Component as Component from .components.component import ComponentNamespace as ComponentNamespace from .components.component import NoSSRComponent as NoSSRComponent from .components.component import memo as memo +from .components.core.auto_scroll import auto_scroll as auto_scroll from .components.core.banner import connection_banner as connection_banner from .components.core.banner import connection_modal as connection_modal from .components.core.breakpoints import breakpoints as breakpoints diff --git a/reflex/components/core/__init__.py b/reflex/components/core/__init__.py index fbe0bdc84..d1f822e67 100644 --- a/reflex/components/core/__init__.py +++ b/reflex/components/core/__init__.py @@ -48,6 +48,7 @@ _SUBMOD_ATTRS: dict[str, list[str]] = { "get_upload_url", "selected_files", ], + "auto_scroll": ["auto_scroll"], } __getattr__, __dir__, __all__ = lazy_loader.attach( diff --git a/reflex/components/core/__init__.pyi b/reflex/components/core/__init__.pyi index ea9275334..e94b4982e 100644 --- a/reflex/components/core/__init__.pyi +++ b/reflex/components/core/__init__.pyi @@ -4,6 +4,7 @@ # ------------------------------------------------------ from . import layout as layout +from .auto_scroll import auto_scroll as auto_scroll from .banner import ConnectionBanner as ConnectionBanner from .banner import ConnectionModal as ConnectionModal from .banner import ConnectionPulser as ConnectionPulser diff --git a/reflex/components/core/auto_scroll.py b/reflex/components/core/auto_scroll.py new file mode 100644 index 000000000..d24bd9a13 --- /dev/null +++ b/reflex/components/core/auto_scroll.py @@ -0,0 +1,111 @@ +"""A component that automatically scrolls to the bottom when new content is added.""" + +from __future__ import annotations + +from reflex.components.el.elements.typography import Div +from reflex.constants.compiler import MemoizationDisposition, MemoizationMode +from reflex.utils.imports import ImportDict +from reflex.vars.base import Var, get_unique_variable_name + + +class AutoScroll(Div): + """A div that automatically scrolls to the bottom when new content is added.""" + + _memoization_mode = MemoizationMode(disposition=MemoizationDisposition.ALWAYS) + + @classmethod + def create(cls, *children, **props): + """Create an AutoScroll component. + + Args: + *children: The children of the component. + **props: The props of the component. + + Returns: + An AutoScroll component. + """ + props.setdefault("overflow", "auto") + props.setdefault("id", get_unique_variable_name()) + return super().create(*children, **props) + + def add_imports(self) -> ImportDict | list[ImportDict]: + """Add imports required for the component. + + Returns: + The imports required for the component. + """ + return {"react": ["useEffect", "useRef"]} + + def add_hooks(self) -> list[str | Var]: + """Add hooks required for the component. + + Returns: + The hooks required for the component. + """ + ref_name = self.get_ref() + return [ + "const containerRef = useRef(null);", + "const wasNearBottom = useRef(false);", + "const hadScrollbar = useRef(false);", + f""" +const checkIfNearBottom = () => {{ + if (!{ref_name}.current) return; + + const container = {ref_name}.current; + const nearBottomThreshold = 50; // pixels from bottom to trigger auto-scroll + + const distanceFromBottom = container.scrollHeight - container.scrollTop - container.clientHeight; + + wasNearBottom.current = distanceFromBottom <= nearBottomThreshold; + + // Track if container had a scrollbar + hadScrollbar.current = container.scrollHeight > container.clientHeight; +}}; +""", + f""" +const scrollToBottomIfNeeded = () => {{ + if (!{ref_name}.current) return; + + const container = {ref_name}.current; + const hasScrollbarNow = container.scrollHeight > container.clientHeight; + + // Scroll if: + // 1. User was near bottom, OR + // 2. Container didn't have scrollbar before but does now + if (wasNearBottom.current || (!hadScrollbar.current && hasScrollbarNow)) {{ + container.scrollTop = container.scrollHeight; + }} + + // Update scrollbar state for next check + hadScrollbar.current = hasScrollbarNow; +}}; +""", + f""" +useEffect(() => {{ + const container = {ref_name}.current; + if (!container) return; + + // Create ResizeObserver to detect height changes + const resizeObserver = new ResizeObserver(() => {{ + scrollToBottomIfNeeded(); + }}); + + // Track scroll position before height changes + container.addEventListener('scroll', checkIfNearBottom); + + // Initial check + checkIfNearBottom(); + + // Observe container for size changes + resizeObserver.observe(container); + + return () => {{ + container.removeEventListener('scroll', checkIfNearBottom); + resizeObserver.disconnect(); + }}; +}}); +""", + ] + + +auto_scroll = AutoScroll.create diff --git a/reflex/components/core/auto_scroll.pyi b/reflex/components/core/auto_scroll.pyi new file mode 100644 index 000000000..690b11e57 --- /dev/null +++ b/reflex/components/core/auto_scroll.pyi @@ -0,0 +1,103 @@ +"""Stub file for reflex/components/core/auto_scroll.py""" + +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `reflex/utils/pyi_generator.py`! +# ------------------------------------------------------ +from typing import Any, Dict, Optional, Union, overload + +from reflex.components.el.elements.typography import Div +from reflex.event import EventType +from reflex.style import Style +from reflex.utils.imports import ImportDict +from reflex.vars.base import Var + +class AutoScroll(Div): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + auto_capitalize: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + content_editable: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + context_menu: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + enter_key_hint: Optional[ + Union[Var[Union[bool, int, str]], bool, int, str] + ] = None, + hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "AutoScroll": + """Create an AutoScroll component. + + Args: + *children: The children of the component. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The props of the component. + + Returns: + An AutoScroll component. + """ + ... + + def add_imports(self) -> ImportDict | list[ImportDict]: ... + def add_hooks(self) -> list[str | Var]: ... + +auto_scroll = AutoScroll.create From 18990df41ff1cef19c6d0b714d262be3328173d9 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 18 Feb 2025 12:45:43 -0800 Subject: [PATCH 134/144] add capitalize and title var operations (#4840) --- reflex/components/core/auto_scroll.pyi | 219 ++++++++++++++++++++++--- reflex/vars/sequence.py | 48 ++++++ 2 files changed, 248 insertions(+), 19 deletions(-) diff --git a/reflex/components/core/auto_scroll.pyi b/reflex/components/core/auto_scroll.pyi index 690b11e57..c34ed32d6 100644 --- a/reflex/components/core/auto_scroll.pyi +++ b/reflex/components/core/auto_scroll.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload +from typing import Any, Dict, Literal, Optional, Union, overload from reflex.components.el.elements.typography import Div from reflex.event import EventType @@ -17,30 +17,211 @@ class AutoScroll(Div): def create( # type: ignore cls, *children, - access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + access_key: Optional[Union[Var[str], str]] = None, auto_capitalize: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["characters", "none", "off", "on", "sentences", "words"], + Var[Literal["characters", "none", "off", "on", "sentences", "words"]], + ] ] = None, content_editable: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["inherit", "plaintext-only", False, True], + Var[Literal["inherit", "plaintext-only", False, True]], + ] ] = None, - context_menu: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] - ] = None, - dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + context_menu: Optional[Union[Var[str], str]] = None, + dir: Optional[Union[Var[str], str]] = None, + draggable: Optional[Union[Var[bool], bool]] = None, enter_key_hint: Optional[ - Union[Var[Union[bool, int, str]], bool, int, str] + Union[ + Literal["done", "enter", "go", "next", "previous", "search", "send"], + Var[ + Literal["done", "enter", "go", "next", "previous", "search", "send"] + ], + ] ] = None, - hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, - title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, + hidden: Optional[Union[Var[bool], bool]] = None, + input_mode: Optional[ + Union[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ], + Var[ + Literal[ + "decimal", + "email", + "none", + "numeric", + "search", + "tel", + "text", + "url", + ] + ], + ] + ] = None, + item_prop: Optional[Union[Var[str], str]] = None, + lang: Optional[Union[Var[str], str]] = None, + role: Optional[ + Union[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ], + Var[ + Literal[ + "alert", + "alertdialog", + "application", + "article", + "banner", + "button", + "cell", + "checkbox", + "columnheader", + "combobox", + "complementary", + "contentinfo", + "definition", + "dialog", + "directory", + "document", + "feed", + "figure", + "form", + "grid", + "gridcell", + "group", + "heading", + "img", + "link", + "list", + "listbox", + "listitem", + "log", + "main", + "marquee", + "math", + "menu", + "menubar", + "menuitem", + "menuitemcheckbox", + "menuitemradio", + "navigation", + "none", + "note", + "option", + "presentation", + "progressbar", + "radio", + "radiogroup", + "region", + "row", + "rowgroup", + "rowheader", + "scrollbar", + "search", + "searchbox", + "separator", + "slider", + "spinbutton", + "status", + "switch", + "tab", + "table", + "tablist", + "tabpanel", + "term", + "textbox", + "timer", + "toolbar", + "tooltip", + "tree", + "treegrid", + "treeitem", + ] + ], + ] + ] = None, + slot: Optional[Union[Var[str], str]] = None, + spell_check: Optional[Union[Var[bool], bool]] = None, + tab_index: Optional[Union[Var[int], int]] = None, + title: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index 0e7b082f9..137ce965f 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -191,6 +191,22 @@ class StringVar(Var[STRING_TYPE], python_types=str): """ return string_upper_operation(self) + def title(self) -> StringVar: + """Convert the string to title case. + + Returns: + The string title operation. + """ + return string_title_operation(self) + + def capitalize(self) -> StringVar: + """Capitalize the string. + + Returns: + The string capitalize operation. + """ + return string_capitalize_operation(self) + def strip(self) -> StringVar: """Strip the string. @@ -482,6 +498,38 @@ def string_upper_operation(string: StringVar[Any]): return var_operation_return(js_expression=f"{string}.toUpperCase()", var_type=str) +@var_operation +def string_title_operation(string: StringVar[Any]): + """Convert a string to title case. + + Args: + string: The string to convert. + + Returns: + The title case string. + """ + return var_operation_return( + js_expression=f"{string}.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ')", + var_type=str, + ) + + +@var_operation +def string_capitalize_operation(string: StringVar[Any]): + """Capitalize a string. + + Args: + string: The string to capitalize. + + Returns: + The capitalized string. + """ + return var_operation_return( + js_expression=f"(((s) => s.charAt(0).toUpperCase() + s.slice(1).toLowerCase())({string}))", + var_type=str, + ) + + @var_operation def string_strip_operation(string: StringVar[Any]): """Strip a string. From 946b7bc25ab6c0f5c6ae28c4e424dd8f8ae982e1 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 18 Feb 2025 13:56:58 -0800 Subject: [PATCH 135/144] upgrade deps as per python 3.10 (#4842) * upgrade deps as per python 3.10 * no need for that guy --- poetry.lock | 173 +++++++++--------- pyproject.toml | 44 ++++- reflex/base.py | 14 +- reflex/compiler/utils.py | 14 +- reflex/components/core/breakpoints.py | 2 +- reflex/components/datadisplay/dataeditor.py | 4 +- reflex/components/datadisplay/dataeditor.pyi | 4 +- reflex/components/plotly/plotly.py | 4 +- reflex/components/plotly/plotly.pyi | 4 +- .../components/react_player/react_player.py | 2 +- .../components/react_player/react_player.pyi | 4 +- reflex/config.py | 10 +- reflex/constants/utils.py | 4 +- reflex/event.py | 23 +-- reflex/reflex.py | 7 +- reflex/state.py | 64 +++---- reflex/utils/serializers.py | 71 +++---- reflex/utils/telemetry.py | 19 +- reflex/utils/types.py | 60 +----- reflex/vars/base.py | 5 +- reflex/vars/function.py | 22 ++- reflex/vars/sequence.py | 5 +- tests/units/components/test_props.py | 6 +- 23 files changed, 234 insertions(+), 331 deletions(-) diff --git a/poetry.lock b/poetry.lock index 032bd2d4a..139ef29e0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -112,7 +112,7 @@ description = "Backport of CPython tarfile module" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and python_version <= \"3.11\"" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "backports.tarfile-1.2.0-py3-none-any.whl", hash = "sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34"}, {file = "backports_tarfile-1.2.0.tar.gz", hash = "sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991"}, @@ -251,7 +251,7 @@ files = [ {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, ] -markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} +markers = {main = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\"", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} [package.dependencies] pycparser = "*" @@ -399,7 +399,7 @@ files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -markers = {main = "(platform_system == \"Windows\" or os_name == \"nt\") and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "(python_version <= \"3.11\" or python_version >= \"3.12\") and sys_platform == \"win32\""} +markers = {main = "python_version <= \"3.11\" and platform_system == \"Windows\" or python_version <= \"3.11\" and os_name == \"nt\" or python_version >= \"3.12\" and platform_system == \"Windows\" or python_version >= \"3.12\" and os_name == \"nt\"", dev = "python_version <= \"3.11\" and sys_platform == \"win32\" or python_version >= \"3.12\" and sys_platform == \"win32\""} [[package]] name = "coverage" @@ -488,7 +488,7 @@ description = "cryptography is a package which provides cryptographic recipes an optional = false python-versions = "!=3.9.0,!=3.9.1,>=3.7" groups = ["main"] -markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\"" files = [ {file = "cryptography-44.0.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf688f615c29bfe9dfc44312ca470989279f0e94bb9f631f85e3459af8efc009"}, {file = "cryptography-44.0.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd7c7e2d71d908dc0f8d2027e1604102140d84b155e658c20e8ad1304317691f"}, @@ -586,7 +586,7 @@ description = "Distro - an OS platform information API" optional = false python-versions = ">=3.6" groups = ["main"] -markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and sys_platform == \"linux\"" +markers = "python_version <= \"3.11\" and sys_platform == \"linux\" or python_version >= \"3.12\" and sys_platform == \"linux\"" files = [ {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, @@ -743,7 +743,7 @@ files = [ {file = "greenlet-3.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:3319aa75e0e0639bc15ff54ca327e8dc7a6fe404003496e3c6925cd3142e0e22"}, {file = "greenlet-3.1.1.tar.gz", hash = "sha256:4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467"}, ] -markers = {main = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\") and python_version < \"3.14\"", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} +markers = {main = "python_version <= \"3.11\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\") or python_version >= \"3.12\" and python_version < \"3.14\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} [package.extras] docs = ["Sphinx", "furo"] @@ -894,7 +894,7 @@ description = "Read metadata from Python packages" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and python_version <= \"3.11\" or python_full_version < \"3.10.2\"" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") or python_full_version < \"3.10.2\"" files = [ {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, @@ -932,7 +932,7 @@ description = "Utility functions for Python class constructs" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "jaraco.classes-3.4.0-py3-none-any.whl", hash = "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790"}, {file = "jaraco.classes-3.4.0.tar.gz", hash = "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd"}, @@ -952,7 +952,7 @@ description = "Useful decorators and context managers" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "jaraco.context-6.0.1-py3-none-any.whl", hash = "sha256:f797fc481b490edb305122c9181830a3a5b76d84ef6d1aef2fb9b47ab956f9e4"}, {file = "jaraco_context-6.0.1.tar.gz", hash = "sha256:9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3"}, @@ -972,7 +972,7 @@ description = "Functools like those found in stdlib" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "jaraco.functools-4.1.0-py3-none-any.whl", hash = "sha256:ad159f13428bc4acbf5541ad6dec511f91573b90fba04df61dafa2a1231cf649"}, {file = "jaraco_functools-4.1.0.tar.gz", hash = "sha256:70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d"}, @@ -996,7 +996,7 @@ description = "Low-level, pure Python DBus protocol wrapper." optional = false python-versions = ">=3.7" groups = ["main"] -markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\"" files = [ {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, @@ -1032,7 +1032,7 @@ description = "Store and access your passwords safely." optional = false python-versions = ">=3.9" groups = ["main"] -markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "keyring-25.6.0-py3-none-any.whl", hash = "sha256:552a3f7af126ece7ed5c89753650eec89c7eaae8617d0aa4d9ad2b75111266bd"}, {file = "keyring-25.6.0.tar.gz", hash = "sha256:0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66"}, @@ -1216,7 +1216,7 @@ description = "More routines for operating on iterables, beyond itertools" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "(python_version <= \"3.11\" or python_version >= \"3.12\") and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\")" files = [ {file = "more-itertools-10.6.0.tar.gz", hash = "sha256:2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b"}, {file = "more_itertools-10.6.0-py3-none-any.whl", hash = "sha256:6eb054cb4b6db1473f6e15fcc676a08e4732548acd47c708f0e179c2c7c01e89"}, @@ -1272,68 +1272,68 @@ files = [ [[package]] name = "numpy" -version = "2.2.2" +version = "2.2.3" description = "Fundamental package for array computing in Python" optional = false python-versions = ">=3.10" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "numpy-2.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7079129b64cb78bdc8d611d1fd7e8002c0a2565da6a47c4df8062349fee90e3e"}, - {file = "numpy-2.2.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2ec6c689c61df613b783aeb21f945c4cbe6c51c28cb70aae8430577ab39f163e"}, - {file = "numpy-2.2.2-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:40c7ff5da22cd391944a28c6a9c638a5eef77fcf71d6e3a79e1d9d9e82752715"}, - {file = "numpy-2.2.2-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:995f9e8181723852ca458e22de5d9b7d3ba4da3f11cc1cb113f093b271d7965a"}, - {file = "numpy-2.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b78ea78450fd96a498f50ee096f69c75379af5138f7881a51355ab0e11286c97"}, - {file = "numpy-2.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3fbe72d347fbc59f94124125e73fc4976a06927ebc503ec5afbfb35f193cd957"}, - {file = "numpy-2.2.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8e6da5cffbbe571f93588f562ed130ea63ee206d12851b60819512dd3e1ba50d"}, - {file = "numpy-2.2.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:09d6a2032faf25e8d0cadde7fd6145118ac55d2740132c1d845f98721b5ebcfd"}, - {file = "numpy-2.2.2-cp310-cp310-win32.whl", hash = "sha256:159ff6ee4c4a36a23fe01b7c3d07bd8c14cc433d9720f977fcd52c13c0098160"}, - {file = "numpy-2.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:64bd6e1762cd7f0986a740fee4dff927b9ec2c5e4d9a28d056eb17d332158014"}, - {file = "numpy-2.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:642199e98af1bd2b6aeb8ecf726972d238c9877b0f6e8221ee5ab945ec8a2189"}, - {file = "numpy-2.2.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6d9fc9d812c81e6168b6d405bf00b8d6739a7f72ef22a9214c4241e0dc70b323"}, - {file = "numpy-2.2.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:c7d1fd447e33ee20c1f33f2c8e6634211124a9aabde3c617687d8b739aa69eac"}, - {file = "numpy-2.2.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:451e854cfae0febe723077bd0cf0a4302a5d84ff25f0bfece8f29206c7bed02e"}, - {file = "numpy-2.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd249bc894af67cbd8bad2c22e7cbcd46cf87ddfca1f1289d1e7e54868cc785c"}, - {file = "numpy-2.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02935e2c3c0c6cbe9c7955a8efa8908dd4221d7755644c59d1bba28b94fd334f"}, - {file = "numpy-2.2.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a972cec723e0563aa0823ee2ab1df0cb196ed0778f173b381c871a03719d4826"}, - {file = "numpy-2.2.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d6d6a0910c3b4368d89dde073e630882cdb266755565155bc33520283b2d9df8"}, - {file = "numpy-2.2.2-cp311-cp311-win32.whl", hash = "sha256:860fd59990c37c3ef913c3ae390b3929d005243acca1a86facb0773e2d8d9e50"}, - {file = "numpy-2.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:da1eeb460ecce8d5b8608826595c777728cdf28ce7b5a5a8c8ac8d949beadcf2"}, - {file = "numpy-2.2.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ac9bea18d6d58a995fac1b2cb4488e17eceeac413af014b1dd26170b766d8467"}, - {file = "numpy-2.2.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:23ae9f0c2d889b7b2d88a3791f6c09e2ef827c2446f1c4a3e3e76328ee4afd9a"}, - {file = "numpy-2.2.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:3074634ea4d6df66be04f6728ee1d173cfded75d002c75fac79503a880bf3825"}, - {file = "numpy-2.2.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:8ec0636d3f7d68520afc6ac2dc4b8341ddb725039de042faf0e311599f54eb37"}, - {file = "numpy-2.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ffbb1acd69fdf8e89dd60ef6182ca90a743620957afb7066385a7bbe88dc748"}, - {file = "numpy-2.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0349b025e15ea9d05c3d63f9657707a4e1d471128a3b1d876c095f328f8ff7f0"}, - {file = "numpy-2.2.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:463247edcee4a5537841d5350bc87fe8e92d7dd0e8c71c995d2c6eecb8208278"}, - {file = "numpy-2.2.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9dd47ff0cb2a656ad69c38da850df3454da88ee9a6fde0ba79acceee0e79daba"}, - {file = "numpy-2.2.2-cp312-cp312-win32.whl", hash = "sha256:4525b88c11906d5ab1b0ec1f290996c0020dd318af8b49acaa46f198b1ffc283"}, - {file = "numpy-2.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:5acea83b801e98541619af398cc0109ff48016955cc0818f478ee9ef1c5c3dcb"}, - {file = "numpy-2.2.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b208cfd4f5fe34e1535c08983a1a6803fdbc7a1e86cf13dd0c61de0b51a0aadc"}, - {file = "numpy-2.2.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d0bbe7dd86dca64854f4b6ce2ea5c60b51e36dfd597300057cf473d3615f2369"}, - {file = "numpy-2.2.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:22ea3bb552ade325530e72a0c557cdf2dea8914d3a5e1fecf58fa5dbcc6f43cd"}, - {file = "numpy-2.2.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:128c41c085cab8a85dc29e66ed88c05613dccf6bc28b3866cd16050a2f5448be"}, - {file = "numpy-2.2.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:250c16b277e3b809ac20d1f590716597481061b514223c7badb7a0f9993c7f84"}, - {file = "numpy-2.2.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0c8854b09bc4de7b041148d8550d3bd712b5c21ff6a8ed308085f190235d7ff"}, - {file = "numpy-2.2.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b6fb9c32a91ec32a689ec6410def76443e3c750e7cfc3fb2206b985ffb2b85f0"}, - {file = "numpy-2.2.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:57b4012e04cc12b78590a334907e01b3a85efb2107df2b8733ff1ed05fce71de"}, - {file = "numpy-2.2.2-cp313-cp313-win32.whl", hash = "sha256:4dbd80e453bd34bd003b16bd802fac70ad76bd463f81f0c518d1245b1c55e3d9"}, - {file = "numpy-2.2.2-cp313-cp313-win_amd64.whl", hash = "sha256:5a8c863ceacae696aff37d1fd636121f1a512117652e5dfb86031c8d84836369"}, - {file = "numpy-2.2.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:b3482cb7b3325faa5f6bc179649406058253d91ceda359c104dac0ad320e1391"}, - {file = "numpy-2.2.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:9491100aba630910489c1d0158034e1c9a6546f0b1340f716d522dc103788e39"}, - {file = "numpy-2.2.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:41184c416143defa34cc8eb9d070b0a5ba4f13a0fa96a709e20584638254b317"}, - {file = "numpy-2.2.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:7dca87ca328f5ea7dafc907c5ec100d187911f94825f8700caac0b3f4c384b49"}, - {file = "numpy-2.2.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bc61b307655d1a7f9f4b043628b9f2b721e80839914ede634e3d485913e1fb2"}, - {file = "numpy-2.2.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fad446ad0bc886855ddf5909cbf8cb5d0faa637aaa6277fb4b19ade134ab3c7"}, - {file = "numpy-2.2.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:149d1113ac15005652e8d0d3f6fd599360e1a708a4f98e43c9c77834a28238cb"}, - {file = "numpy-2.2.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:106397dbbb1896f99e044efc90360d098b3335060375c26aa89c0d8a97c5f648"}, - {file = "numpy-2.2.2-cp313-cp313t-win32.whl", hash = "sha256:0eec19f8af947a61e968d5429f0bd92fec46d92b0008d0a6685b40d6adf8a4f4"}, - {file = "numpy-2.2.2-cp313-cp313t-win_amd64.whl", hash = "sha256:97b974d3ba0fb4612b77ed35d7627490e8e3dff56ab41454d9e8b23448940576"}, - {file = "numpy-2.2.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:b0531f0b0e07643eb089df4c509d30d72c9ef40defa53e41363eca8a8cc61495"}, - {file = "numpy-2.2.2-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:e9e82dcb3f2ebbc8cb5ce1102d5f1c5ed236bf8a11730fb45ba82e2841ec21df"}, - {file = "numpy-2.2.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0d4142eb40ca6f94539e4db929410f2a46052a0fe7a2c1c59f6179c39938d2a"}, - {file = "numpy-2.2.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:356ca982c188acbfa6af0d694284d8cf20e95b1c3d0aefa8929376fea9146f60"}, - {file = "numpy-2.2.2.tar.gz", hash = "sha256:ed6906f61834d687738d25988ae117683705636936cc605be0bb208b23df4d8f"}, + {file = "numpy-2.2.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:cbc6472e01952d3d1b2772b720428f8b90e2deea8344e854df22b0618e9cce71"}, + {file = "numpy-2.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdfe0c22692a30cd830c0755746473ae66c4a8f2e7bd508b35fb3b6a0813d787"}, + {file = "numpy-2.2.3-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:e37242f5324ffd9f7ba5acf96d774f9276aa62a966c0bad8dae692deebec7716"}, + {file = "numpy-2.2.3-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:95172a21038c9b423e68be78fd0be6e1b97674cde269b76fe269a5dfa6fadf0b"}, + {file = "numpy-2.2.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5b47c440210c5d1d67e1cf434124e0b5c395eee1f5806fdd89b553ed1acd0a3"}, + {file = "numpy-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0391ea3622f5c51a2e29708877d56e3d276827ac5447d7f45e9bc4ade8923c52"}, + {file = "numpy-2.2.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f6b3dfc7661f8842babd8ea07e9897fe3d9b69a1d7e5fbb743e4160f9387833b"}, + {file = "numpy-2.2.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1ad78ce7f18ce4e7df1b2ea4019b5817a2f6a8a16e34ff2775f646adce0a5027"}, + {file = "numpy-2.2.3-cp310-cp310-win32.whl", hash = "sha256:5ebeb7ef54a7be11044c33a17b2624abe4307a75893c001a4800857956b41094"}, + {file = "numpy-2.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:596140185c7fa113563c67c2e894eabe0daea18cf8e33851738c19f70ce86aeb"}, + {file = "numpy-2.2.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:16372619ee728ed67a2a606a614f56d3eabc5b86f8b615c79d01957062826ca8"}, + {file = "numpy-2.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5521a06a3148686d9269c53b09f7d399a5725c47bbb5b35747e1cb76326b714b"}, + {file = "numpy-2.2.3-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:7c8dde0ca2f77828815fd1aedfdf52e59071a5bae30dac3b4da2a335c672149a"}, + {file = "numpy-2.2.3-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:77974aba6c1bc26e3c205c2214f0d5b4305bdc719268b93e768ddb17e3fdd636"}, + {file = "numpy-2.2.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d42f9c36d06440e34226e8bd65ff065ca0963aeecada587b937011efa02cdc9d"}, + {file = "numpy-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2712c5179f40af9ddc8f6727f2bd910ea0eb50206daea75f58ddd9fa3f715bb"}, + {file = "numpy-2.2.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c8b0451d2ec95010d1db8ca733afc41f659f425b7f608af569711097fd6014e2"}, + {file = "numpy-2.2.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9b4a8148c57ecac25a16b0e11798cbe88edf5237b0df99973687dd866f05e1b"}, + {file = "numpy-2.2.3-cp311-cp311-win32.whl", hash = "sha256:1f45315b2dc58d8a3e7754fe4e38b6fce132dab284a92851e41b2b344f6441c5"}, + {file = "numpy-2.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f48ba6f6c13e5e49f3d3efb1b51c8193215c42ac82610a04624906a9270be6f"}, + {file = "numpy-2.2.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:12c045f43b1d2915eca6b880a7f4a256f59d62df4f044788c8ba67709412128d"}, + {file = "numpy-2.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:87eed225fd415bbae787f93a457af7f5990b92a334e346f72070bf569b9c9c95"}, + {file = "numpy-2.2.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:712a64103d97c404e87d4d7c47fb0c7ff9acccc625ca2002848e0d53288b90ea"}, + {file = "numpy-2.2.3-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:a5ae282abe60a2db0fd407072aff4599c279bcd6e9a2475500fc35b00a57c532"}, + {file = "numpy-2.2.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5266de33d4c3420973cf9ae3b98b54a2a6d53a559310e3236c4b2b06b9c07d4e"}, + {file = "numpy-2.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b787adbf04b0db1967798dba8da1af07e387908ed1553a0d6e74c084d1ceafe"}, + {file = "numpy-2.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:34c1b7e83f94f3b564b35f480f5652a47007dd91f7c839f404d03279cc8dd021"}, + {file = "numpy-2.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4d8335b5f1b6e2bce120d55fb17064b0262ff29b459e8493d1785c18ae2553b8"}, + {file = "numpy-2.2.3-cp312-cp312-win32.whl", hash = "sha256:4d9828d25fb246bedd31e04c9e75714a4087211ac348cb39c8c5f99dbb6683fe"}, + {file = "numpy-2.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:83807d445817326b4bcdaaaf8e8e9f1753da04341eceec705c001ff342002e5d"}, + {file = "numpy-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7bfdb06b395385ea9b91bf55c1adf1b297c9fdb531552845ff1d3ea6e40d5aba"}, + {file = "numpy-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:23c9f4edbf4c065fddb10a4f6e8b6a244342d95966a48820c614891e5059bb50"}, + {file = "numpy-2.2.3-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:a0c03b6be48aaf92525cccf393265e02773be8fd9551a2f9adbe7db1fa2b60f1"}, + {file = "numpy-2.2.3-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:2376e317111daa0a6739e50f7ee2a6353f768489102308b0d98fcf4a04f7f3b5"}, + {file = "numpy-2.2.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8fb62fe3d206d72fe1cfe31c4a1106ad2b136fcc1606093aeab314f02930fdf2"}, + {file = "numpy-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52659ad2534427dffcc36aac76bebdd02b67e3b7a619ac67543bc9bfe6b7cdb1"}, + {file = "numpy-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1b416af7d0ed3271cad0f0a0d0bee0911ed7eba23e66f8424d9f3dfcdcae1304"}, + {file = "numpy-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1402da8e0f435991983d0a9708b779f95a8c98c6b18a171b9f1be09005e64d9d"}, + {file = "numpy-2.2.3-cp313-cp313-win32.whl", hash = "sha256:136553f123ee2951bfcfbc264acd34a2fc2f29d7cdf610ce7daf672b6fbaa693"}, + {file = "numpy-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:5b732c8beef1d7bc2d9e476dbba20aaff6167bf205ad9aa8d30913859e82884b"}, + {file = "numpy-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:435e7a933b9fda8126130b046975a968cc2d833b505475e588339e09f7672890"}, + {file = "numpy-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:7678556eeb0152cbd1522b684dcd215250885993dd00adb93679ec3c0e6e091c"}, + {file = "numpy-2.2.3-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:2e8da03bd561504d9b20e7a12340870dfc206c64ea59b4cfee9fceb95070ee94"}, + {file = "numpy-2.2.3-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:c9aa4496fd0e17e3843399f533d62857cef5900facf93e735ef65aa4bbc90ef0"}, + {file = "numpy-2.2.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4ca91d61a4bf61b0f2228f24bbfa6a9facd5f8af03759fe2a655c50ae2c6610"}, + {file = "numpy-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:deaa09cd492e24fd9b15296844c0ad1b3c976da7907e1c1ed3a0ad21dded6f76"}, + {file = "numpy-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:246535e2f7496b7ac85deffe932896a3577be7af8fb7eebe7146444680297e9a"}, + {file = "numpy-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:daf43a3d1ea699402c5a850e5313680ac355b4adc9770cd5cfc2940e7861f1bf"}, + {file = "numpy-2.2.3-cp313-cp313t-win32.whl", hash = "sha256:cf802eef1f0134afb81fef94020351be4fe1d6681aadf9c5e862af6602af64ef"}, + {file = "numpy-2.2.3-cp313-cp313t-win_amd64.whl", hash = "sha256:aee2512827ceb6d7f517c8b85aa5d3923afe8fc7a57d028cffcd522f1c6fd082"}, + {file = "numpy-2.2.3-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:3c2ec8a0f51d60f1e9c0c5ab116b7fc104b165ada3f6c58abf881cb2eb16044d"}, + {file = "numpy-2.2.3-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:ed2cf9ed4e8ebc3b754d398cba12f24359f018b416c380f577bbae112ca52fc9"}, + {file = "numpy-2.2.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39261798d208c3095ae4f7bc8eaeb3481ea8c6e03dc48028057d3cbdbdb8937e"}, + {file = "numpy-2.2.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:783145835458e60fa97afac25d511d00a1eca94d4a8f3ace9fe2043003c678e4"}, + {file = "numpy-2.2.3.tar.gz", hash = "sha256:dbdc15f0c81611925f382dfa97b3bd0bc2c1ce19d4fe50482cb0ddc12ba30020"}, ] [[package]] @@ -1420,9 +1420,9 @@ files = [ [package.dependencies] numpy = [ + {version = ">=1.22.4", markers = "python_version < \"3.11\""}, {version = ">=1.23.2", markers = "python_version == \"3.11\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, - {version = ">=1.22.4", markers = "python_version < \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -1693,7 +1693,7 @@ files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] -markers = {main = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" and (python_version <= \"3.11\" or python_version >= \"3.12\")", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} +markers = {main = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and platform_python_implementation != \"PyPy\"", dev = "python_version <= \"3.11\" or python_version >= \"3.12\""} [[package]] name = "pydantic" @@ -1881,15 +1881,15 @@ files = [ [[package]] name = "pyright" -version = "1.1.393" +version = "1.1.394" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pyright-1.1.393-py3-none-any.whl", hash = "sha256:8320629bb7a44ca90944ba599390162bf59307f3d9fb6e27da3b7011b8c17ae5"}, - {file = "pyright-1.1.393.tar.gz", hash = "sha256:aeeb7ff4e0364775ef416a80111613f91a05c8e01e58ecfefc370ca0db7aed9c"}, + {file = "pyright-1.1.394-py3-none-any.whl", hash = "sha256:5f74cce0a795a295fb768759bbeeec62561215dea657edcaab48a932b031ddbb"}, + {file = "pyright-1.1.394.tar.gz", hash = "sha256:56f2a3ab88c5214a451eb71d8f2792b7700434f841ea219119ade7f42ca93608"}, ] [package.dependencies] @@ -2203,7 +2203,7 @@ description = "A (partial) reimplementation of pywin32 using ctypes/cffi" optional = false python-versions = ">=3.6" groups = ["main"] -markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"win32\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"win32\" or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"win32\"" files = [ {file = "pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755"}, {file = "pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"}, @@ -2449,7 +2449,7 @@ description = "Python bindings to FreeDesktop.org Secret Service API" optional = false python-versions = ">=3.6" groups = ["main"] -markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" and (python_version <= \"3.11\" or python_version >= \"3.12\")" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\" or python_version >= \"3.12\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and sys_platform == \"linux\"" files = [ {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, @@ -2798,7 +2798,6 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.8" groups = ["main", "dev"] -markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -2833,6 +2832,7 @@ files = [ {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, ] +markers = {main = "python_version < \"3.11\"", dev = "python_full_version <= \"3.11.0a6\""} [[package]] name = "tomlkit" @@ -2849,15 +2849,15 @@ files = [ [[package]] name = "trio" -version = "0.28.0" +version = "0.29.0" description = "A friendly Python library for async concurrency and I/O" optional = false python-versions = ">=3.9" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "trio-0.28.0-py3-none-any.whl", hash = "sha256:56d58977acc1635735a96581ec70513cc781b8b6decd299c487d3be2a721cd94"}, - {file = "trio-0.28.0.tar.gz", hash = "sha256:4e547896fe9e8a5658e54e4c7c5fa1db748cbbbaa7c965e7d40505b928c73c05"}, + {file = "trio-0.29.0-py3-none-any.whl", hash = "sha256:d8c463f1a9cc776ff63e331aba44c125f423a5a13c684307e828d930e625ba66"}, + {file = "trio-0.29.0.tar.gz", hash = "sha256:ea0d3967159fc130acb6939a0be0e558e364fee26b5deeecc893a6b08c361bdf"}, ] [package.dependencies] @@ -2871,19 +2871,20 @@ sortedcontainers = "*" [[package]] name = "trio-websocket" -version = "0.11.1" +version = "0.12.1" description = "WebSocket library for Trio" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["dev"] markers = "python_version <= \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "trio-websocket-0.11.1.tar.gz", hash = "sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f"}, - {file = "trio_websocket-0.11.1-py3-none-any.whl", hash = "sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638"}, + {file = "trio_websocket-0.12.1-py3-none-any.whl", hash = "sha256:608ec746bb287e5d5a66baf483e41194193c5cf05ffaad6240e7d1fcd80d1e6f"}, + {file = "trio_websocket-0.12.1.tar.gz", hash = "sha256:d55ccd4d3eae27c494f3fdae14823317839bdcb8214d1173eacc4d42c69fc91b"}, ] [package.dependencies] exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} +outcome = ">=1.2.0" trio = ">=0.11" wsproto = ">=0.14" @@ -3171,7 +3172,7 @@ description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "(platform_machine != \"ppc64le\" and platform_machine != \"s390x\") and python_version <= \"3.11\" or python_full_version < \"3.10.2\"" +markers = "python_version <= \"3.11\" and (platform_machine != \"ppc64le\" and platform_machine != \"s390x\") or python_full_version < \"3.10.2\"" files = [ {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, @@ -3188,4 +3189,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.10, <4.0" -content-hash = "7ae644e1c5b910f4fd0d8ab0b530818077a96e5d329b2be1269e967c6b0b3d25" +content-hash = "36de501672441a558232190e75c187dd92682b56a99fcd84dc2dc6ab78f7dfc8" diff --git a/pyproject.toml b/pyproject.toml index 67611a867..b3c63b7aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,23 +23,20 @@ fastapi = ">=0.96.0,!=0.111.0,!=0.111.1" gunicorn = ">=20.1.0,<24.0" jinja2 = ">=3.1.2,<4.0" psutil = ">=5.9.4,<7.0" -pydantic = ">=1.10.2,<3.0" +pydantic = ">=1.10.21,<3.0" python-multipart = ">=0.0.5,<0.1" python-socketio = ">=5.7.0,<6.0" redis = ">=4.3.5,<6.0" rich = ">=13.0.0,<14.0" sqlmodel = ">=0.0.14,<0.1" -typer = ">=0.4.2,<1.0" +typer = ">=0.15.1,<1.0" uvicorn = ">=0.20.0" starlette-admin = ">=0.11.0,<1.0" alembic = ">=1.11.1,<2.0" platformdirs = ">=3.10.0,<5.0" distro = { version = ">=1.8.0,<2.0", platform = "linux" } python-engineio = "!=4.6.0" -wrapt = [ - { version = ">=1.14.0,<2.0", python = ">=3.11" }, - { version = ">=1.11.0,<2.0", python = "<3.11" }, -] +wrapt = ">=1.17.0,<2.0" packaging = ">=23.1,<25.0" reflex-hosting-cli = ">=0.1.29" charset-normalizer = ">=3.3.2,<4.0" @@ -55,7 +52,7 @@ typing_extensions = ">=4.6.0" [tool.poetry.group.dev.dependencies] pytest = ">=7.1.2,<9.0" pytest-mock = ">=3.10.0,<4.0" -pyright = ">=1.1.392, <1.2" +pyright = ">=1.1.394, <1.2" darglint = ">=1.8.1,<2.0" dill = ">=0.3.8" toml = ">=0.10.2,<1.0" @@ -87,8 +84,37 @@ reportIncompatibleMethodOverride = false target-version = "py310" output-format = "concise" lint.isort.split-on-trailing-comma = false -lint.select = ["ANN001","B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PGH", "PTH", "RUF", "SIM", "T", "TRY", "W"] -lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF008", "RUF012", "TRY0"] +lint.select = [ + "ANN001", + "B", + "C4", + "D", + "E", + "ERA", + "F", + "FURB", + "I", + "N", + "PERF", + "PGH", + "PTH", + "RUF", + "SIM", + "T", + "TRY", + "W", +] +lint.ignore = [ + "B008", + "D205", + "E501", + "F403", + "SIM115", + "RUF006", + "RUF008", + "RUF012", + "TRY0", +] lint.pydocstyle.convention = "google" [tool.ruff.lint.per-file-ignores] diff --git a/reflex/base.py b/reflex/base.py index f6bbb8ce4..c900f0039 100644 --- a/reflex/base.py +++ b/reflex/base.py @@ -5,15 +5,9 @@ from __future__ import annotations import os from typing import TYPE_CHECKING, Any, List, Type -try: - import pydantic.v1.main as pydantic_main - from pydantic.v1 import BaseModel - from pydantic.v1.fields import ModelField -except ModuleNotFoundError: - if not TYPE_CHECKING: - import pydantic.main as pydantic_main - from pydantic import BaseModel - from pydantic.fields import ModelField +import pydantic.v1.main as pydantic_main +from pydantic.v1 import BaseModel +from pydantic.v1.fields import ModelField def validate_field_name(bases: List[Type["BaseModel"]], field_name: str) -> None: @@ -50,7 +44,7 @@ if TYPE_CHECKING: from reflex.vars import Var -class Base(BaseModel): # pyright: ignore [reportPossiblyUnboundVariable] +class Base(BaseModel): """The base class subclassed by all Reflex classes. This class wraps Pydantic and provides common methods such as diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index c66dfe304..cd6997e22 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -10,16 +10,7 @@ from pathlib import Path from typing import Any, Callable, Dict, Optional, Type, Union from urllib.parse import urlparse -from reflex.utils.exec import is_in_app_harness -from reflex.utils.prerequisites import get_web_dir -from reflex.vars.base import Var - -try: - from pydantic.v1.fields import ModelField -except ModuleNotFoundError: - from pydantic.fields import ( - ModelField, # pyright: ignore [reportAttributeAccessIssue] - ) +from pydantic.v1.fields import ModelField from reflex import constants from reflex.components.base import ( @@ -39,7 +30,10 @@ from reflex.istate.storage import Cookie, LocalStorage, SessionStorage from reflex.state import BaseState, _resolve_delta from reflex.style import Style from reflex.utils import console, format, imports, path_ops +from reflex.utils.exec import is_in_app_harness from reflex.utils.imports import ImportVar, ParsedImportDict +from reflex.utils.prerequisites import get_web_dir +from reflex.vars.base import Var # To re-export this function. merge_imports = imports.merge_imports diff --git a/reflex/components/core/breakpoints.py b/reflex/components/core/breakpoints.py index 9a8ef1556..a2ca16be2 100644 --- a/reflex/components/core/breakpoints.py +++ b/reflex/components/core/breakpoints.py @@ -18,7 +18,7 @@ def set_breakpoints(values: Tuple[str, str, str, str, str]): breakpoints_values.extend(values) -K = TypeVar("K") +K = TypeVar("K", bound=str) V = TypeVar("V") diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index dfac0452a..8179e15aa 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -3,9 +3,7 @@ from __future__ import annotations from enum import Enum -from typing import Any, Dict, List, Literal, Optional, Tuple, Union - -from typing_extensions import TypedDict +from typing import Any, Dict, List, Literal, Optional, Tuple, TypedDict, Union from reflex.base import Base from reflex.components.component import Component, NoSSRComponent diff --git a/reflex/components/datadisplay/dataeditor.pyi b/reflex/components/datadisplay/dataeditor.pyi index f99f37117..770178f55 100644 --- a/reflex/components/datadisplay/dataeditor.pyi +++ b/reflex/components/datadisplay/dataeditor.pyi @@ -4,9 +4,7 @@ # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ from enum import Enum -from typing import Any, Dict, List, Literal, Optional, Union, overload - -from typing_extensions import TypedDict +from typing import Any, Dict, List, Literal, Optional, TypedDict, Union, overload from reflex.base import Base from reflex.components.component import NoSSRComponent diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py index 2ddaad8d7..5c41cf3e4 100644 --- a/reflex/components/plotly/plotly.py +++ b/reflex/components/plotly/plotly.py @@ -2,9 +2,7 @@ from __future__ import annotations -from typing import Any, Dict, List, Tuple, Union - -from typing_extensions import TypedDict, TypeVar +from typing import Any, Dict, List, Tuple, TypedDict, TypeVar, Union from reflex.components.component import Component, NoSSRComponent from reflex.components.core.cond import color_mode_cond diff --git a/reflex/components/plotly/plotly.pyi b/reflex/components/plotly/plotly.pyi index c4d8bf64a..2a26b42c6 100644 --- a/reflex/components/plotly/plotly.pyi +++ b/reflex/components/plotly/plotly.pyi @@ -3,9 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, List, Optional, Union, overload - -from typing_extensions import TypedDict, TypeVar +from typing import Any, Dict, List, Optional, TypedDict, TypeVar, Union, overload from reflex.components.component import NoSSRComponent from reflex.event import EventType diff --git a/reflex/components/react_player/react_player.py b/reflex/components/react_player/react_player.py index 7b7bb34e3..44a11d26d 100644 --- a/reflex/components/react_player/react_player.py +++ b/reflex/components/react_player/react_player.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import TypedDict from reflex.components.component import NoSSRComponent from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec diff --git a/reflex/components/react_player/react_player.pyi b/reflex/components/react_player/react_player.pyi index e5345defb..70f6cb0ee 100644 --- a/reflex/components/react_player/react_player.pyi +++ b/reflex/components/react_player/react_player.pyi @@ -3,9 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Optional, Union, overload - -from typing_extensions import TypedDict +from typing import Any, Dict, Optional, TypedDict, Union, overload from reflex.components.component import NoSSRComponent from reflex.event import EventType diff --git a/reflex/config.py b/reflex/config.py index d0829e627..0d48057d7 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -19,6 +19,7 @@ from pathlib import Path from types import ModuleType from typing import ( TYPE_CHECKING, + Annotated, Any, Callable, Dict, @@ -29,10 +30,11 @@ from typing import ( TypeVar, get_args, get_origin, + get_type_hints, ) +import pydantic.v1 as pydantic from reflex_cli.constants.hosting import Hosting -from typing_extensions import Annotated, get_type_hints from reflex import constants from reflex.base import Base @@ -40,12 +42,6 @@ from reflex.utils import console from reflex.utils.exceptions import ConfigError, EnvironmentVarValueError from reflex.utils.types import GenericType, is_union, value_inside_optional -try: - import pydantic.v1 as pydantic -except ModuleNotFoundError: - import pydantic - - try: from dotenv import load_dotenv # pyright: ignore [reportMissingImports] except ImportError: diff --git a/reflex/constants/utils.py b/reflex/constants/utils.py index 48797afbf..696534b2e 100644 --- a/reflex/constants/utils.py +++ b/reflex/constants/utils.py @@ -1,8 +1,6 @@ """Utility functions for constants.""" -from typing import Any, Callable, Generic, Type - -from typing_extensions import TypeVar +from typing import Any, Callable, Generic, Type, TypeVar T = TypeVar("T") V = TypeVar("V") diff --git a/reflex/event.py b/reflex/event.py index c2eb8db3a..6552eb079 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -10,31 +10,27 @@ from base64 import b64encode from functools import partial from typing import ( TYPE_CHECKING, + Annotated, Any, Callable, Dict, Generic, List, Optional, + Protocol, Sequence, Tuple, Type, + TypedDict, + TypeVar, Union, + get_args, + get_origin, get_type_hints, overload, ) -from typing_extensions import ( - Protocol, - Self, - TypeAliasType, - TypedDict, - TypeVar, - TypeVarTuple, - Unpack, - get_args, - get_origin, -) +from typing_extensions import Self, TypeAliasType, TypeVarTuple, Unpack from reflex import constants from reflex.constants.compiler import CompileVars, Hooks, Imports @@ -59,11 +55,6 @@ from reflex.vars.function import ( ) from reflex.vars.object import ObjectVar -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - @dataclasses.dataclass( init=True, diff --git a/reflex/reflex.py b/reflex/reflex.py index 410485551..9c94a3743 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -20,11 +20,8 @@ from reflex.utils import console, telemetry typer.core.rich = None # pyright: ignore [reportPrivateImportUsage] # Create the app. -try: - cli = typer.Typer(add_completion=False, pretty_exceptions_enable=False) -except TypeError: - # Fallback for older typer versions. - cli = typer.Typer(add_completion=False) +cli = typer.Typer(add_completion=False, pretty_exceptions_enable=False) + SHOW_BUILT_WITH_REFLEX_INFO = "https://reflex.dev/docs/hosting/reflex-branding/" diff --git a/reflex/state.py b/reflex/state.py index 77c352cfa..2689ba910 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -40,50 +40,22 @@ from typing import ( get_type_hints, ) +import pydantic.v1 as pydantic +import wrapt +from pydantic import BaseModel as BaseModelV2 +from pydantic.v1 import BaseModel as BaseModelV1 +from pydantic.v1 import validator +from pydantic.v1.fields import ModelField +from redis.asyncio import Redis from redis.asyncio.client import PubSub +from redis.exceptions import ResponseError from sqlalchemy.orm import DeclarativeBase from typing_extensions import Self -from reflex import event -from reflex.config import PerformanceMode, get_config -from reflex.istate.data import RouterData -from reflex.istate.storage import ClientStorageBase -from reflex.model import Model -from reflex.vars.base import ( - ComputedVar, - DynamicRouteVar, - Var, - computed_var, - dispatch, - get_unique_variable_name, - is_computed_var, -) - -try: - import pydantic.v1 as pydantic -except ModuleNotFoundError: - import pydantic - -from pydantic import BaseModel as BaseModelV2 - -try: - from pydantic.v1 import BaseModel as BaseModelV1 -except ModuleNotFoundError: - BaseModelV1 = BaseModelV2 - -try: - from pydantic.v1 import validator -except ModuleNotFoundError: - from pydantic import validator - -import wrapt -from redis.asyncio import Redis -from redis.exceptions import ResponseError - import reflex.istate.dynamic -from reflex import constants +from reflex import constants, event from reflex.base import Base -from reflex.config import environment +from reflex.config import PerformanceMode, environment, get_config from reflex.event import ( BACKGROUND_TASK_MARKER, Event, @@ -91,6 +63,9 @@ from reflex.event import ( EventSpec, fix_events, ) +from reflex.istate.data import RouterData +from reflex.istate.storage import ClientStorageBase +from reflex.model import Model from reflex.utils import console, format, path_ops, prerequisites, types from reflex.utils.exceptions import ( ComputedVarShadowsBaseVarsError, @@ -121,6 +96,15 @@ from reflex.utils.types import ( value_inside_optional, ) from reflex.vars import VarData +from reflex.vars.base import ( + ComputedVar, + DynamicRouteVar, + Var, + computed_var, + dispatch, + get_unique_variable_name, + is_computed_var, +) if TYPE_CHECKING: from reflex.components.component import Component @@ -289,10 +273,6 @@ class EventHandlerSetVar(EventHandler): return super().__call__(*args) -if TYPE_CHECKING: - from pydantic.v1.fields import ModelField - - def _unwrap_field_type(type_: Type) -> Type: """Unwrap rx.Field type annotations. diff --git a/reflex/utils/serializers.py b/reflex/utils/serializers.py index f78438522..f8ddaf31c 100644 --- a/reflex/utils/serializers.py +++ b/reflex/utils/serializers.py @@ -2,6 +2,7 @@ from __future__ import annotations +import contextlib import dataclasses import functools import json @@ -24,6 +25,9 @@ from typing import ( overload, ) +from pydantic import BaseModel as BaseModelV2 +from pydantic.v1 import BaseModel as BaseModelV1 + from reflex.base import Base from reflex.constants.colors import Color, format_color from reflex.utils import types @@ -270,12 +274,24 @@ def serialize_base(value: Base) -> dict: } -try: - from pydantic.v1 import BaseModel as BaseModelV1 +@serializer(to=dict) +def serialize_base_model_v1(model: BaseModelV1) -> dict: + """Serialize a pydantic v1 BaseModel instance. + + Args: + model: The BaseModel to serialize. + + Returns: + The serialized BaseModel. + """ + return model.dict() + + +if BaseModelV1 is not BaseModelV2: @serializer(to=dict) - def serialize_base_model_v1(model: BaseModelV1) -> dict: - """Serialize a pydantic v1 BaseModel instance. + def serialize_base_model_v2(model: BaseModelV2) -> dict: + """Serialize a pydantic v2 BaseModel instance. Args: model: The BaseModel to serialize. @@ -283,38 +299,7 @@ try: Returns: The serialized BaseModel. """ - return model.dict() - - from pydantic import BaseModel as BaseModelV2 - - if BaseModelV1 is not BaseModelV2: - - @serializer(to=dict) - def serialize_base_model_v2(model: BaseModelV2) -> dict: - """Serialize a pydantic v2 BaseModel instance. - - Args: - model: The BaseModel to serialize. - - Returns: - The serialized BaseModel. - """ - return model.model_dump() -except ImportError: - # Older pydantic v1 import - from pydantic import BaseModel as BaseModelV1 - - @serializer(to=dict) - def serialize_base_model_v1(model: BaseModelV1) -> dict: - """Serialize a pydantic v1 BaseModel instance. - - Args: - model: The BaseModel to serialize. - - Returns: - The serialized BaseModel. - """ - return model.dict() + return model.model_dump() @serializer @@ -382,7 +367,7 @@ def serialize_color(color: Color) -> str: return format_color(color.color, color.shade, color.alpha) -try: +with contextlib.suppress(ImportError): from pandas import DataFrame def format_dataframe_values(df: DataFrame) -> List[List[Any]]: @@ -414,10 +399,8 @@ try: "data": format_dataframe_values(df), } -except ImportError: - pass -try: +with contextlib.suppress(ImportError): from plotly.graph_objects import Figure, layout from plotly.io import to_json @@ -448,11 +431,8 @@ try: "layout": json.loads(str(to_json(template.layout))), } -except ImportError: - pass - -try: +with contextlib.suppress(ImportError): import base64 import io @@ -489,6 +469,3 @@ try: mime_type = "image/png" return f"data:{mime_type};base64,{base64_image}" - -except ImportError: - pass diff --git a/reflex/utils/telemetry.py b/reflex/utils/telemetry.py index ecfd52428..47a5c12b5 100644 --- a/reflex/utils/telemetry.py +++ b/reflex/utils/telemetry.py @@ -8,23 +8,17 @@ import multiprocessing import platform import warnings from contextlib import suppress - -from reflex.config import environment - -try: - from datetime import UTC, datetime -except ImportError: - from datetime import datetime - - UTC = None +from datetime import datetime, timezone import httpx import psutil from reflex import constants +from reflex.config import environment from reflex.utils import console from reflex.utils.prerequisites import ensure_reflex_installation_id, get_project_hash +UTC = timezone.utc POSTHOG_API_URL: str = "https://app.posthog.com/capture/" @@ -121,12 +115,7 @@ def _prepare_event(event: str, **kwargs) -> dict: ) return {} - if UTC is None: - # for python 3.10 - stamp = datetime.utcnow().isoformat() - else: - # for python 3.11 & 3.12 - stamp = datetime.now(UTC).isoformat() + stamp = datetime.now(UTC).isoformat() cpuinfo = get_cpu_info() diff --git a/reflex/utils/types.py b/reflex/utils/types.py index b432319e0..516b70986 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -2,12 +2,12 @@ from __future__ import annotations -import contextlib import dataclasses import inspect import sys import types from functools import cached_property, lru_cache, wraps +from types import GenericAlias from typing import ( TYPE_CHECKING, Any, @@ -25,66 +25,29 @@ from typing import ( Type, Union, _GenericAlias, # pyright: ignore [reportAttributeAccessIssue] + _SpecialGenericAlias, # pyright: ignore [reportAttributeAccessIssue] get_args, get_type_hints, ) from typing import get_origin as get_origin_og import sqlalchemy -from typing_extensions import is_typeddict - -import reflex -from reflex.components.core.breakpoints import Breakpoints - -try: - from pydantic.v1.fields import ModelField -except ModuleNotFoundError: - from pydantic.fields import ( - ModelField, # pyright: ignore [reportAttributeAccessIssue] - ) - +from pydantic.v1.fields import ModelField from sqlalchemy.ext.associationproxy import AssociationProxyInstance from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import DeclarativeBase, Mapped, QueryableAttribute, Relationship +from typing_extensions import Self as Self +from typing_extensions import is_typeddict +from typing_extensions import override as override +import reflex from reflex import constants from reflex.base import Base +from reflex.components.core.breakpoints import Breakpoints from reflex.utils import console -if sys.version_info >= (3, 12): - from typing import override as override -else: - - def override(func: Callable) -> Callable: - """Fallback for @override decorator. - - Args: - func: The function to decorate. - - Returns: - The unmodified function. - """ - return func - - # Potential GenericAlias types for isinstance checks. -GenericAliasTypes = [_GenericAlias] - -with contextlib.suppress(ImportError): - # For newer versions of Python. - from types import GenericAlias - - GenericAliasTypes.append(GenericAlias) - -with contextlib.suppress(ImportError): - # For older versions of Python. - from typing import ( - _SpecialGenericAlias, # pyright: ignore [reportAttributeAccessIssue] - ) - - GenericAliasTypes.append(_SpecialGenericAlias) - -GenericAliasTypes = tuple(GenericAliasTypes) +GenericAliasTypes = (_GenericAlias, GenericAlias, _SpecialGenericAlias) # Potential Union types for isinstance checks (UnionType added in py3.10). UnionTypes = (Union, types.UnionType) if hasattr(types, "UnionType") else (Union,) @@ -128,11 +91,6 @@ RESERVED_BACKEND_VAR_NAMES = { "_was_touched", } -if sys.version_info >= (3, 11): - from typing import Self as Self -else: - from typing_extensions import Self as Self - class Unset: """A class to represent an unset value. diff --git a/reflex/vars/base.py b/reflex/vars/base.py index a6786b18a..89bc86fce 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -29,19 +29,22 @@ from typing import ( Mapping, NoReturn, Optional, + ParamSpec, Sequence, Set, Tuple, Type, + TypeGuard, TypeVar, Union, cast, get_args, + get_type_hints, overload, ) from sqlalchemy.orm import DeclarativeBase -from typing_extensions import ParamSpec, TypeGuard, deprecated, get_type_hints, override +from typing_extensions import deprecated, override from reflex import constants from reflex.base import Base diff --git a/reflex/vars/function.py b/reflex/vars/function.py index 505a69b4c..54f1d08e7 100644 --- a/reflex/vars/function.py +++ b/reflex/vars/function.py @@ -4,9 +4,21 @@ from __future__ import annotations import dataclasses import sys -from typing import Any, Callable, Optional, Sequence, Tuple, Type, Union, overload - -from typing_extensions import Concatenate, Generic, ParamSpec, Protocol, TypeVar +from typing import ( + Any, + Callable, + Concatenate, + Generic, + Optional, + ParamSpec, + Protocol, + Sequence, + Tuple, + Type, + TypeVar, + Union, + overload, +) from reflex.utils import format from reflex.utils.types import GenericType @@ -29,9 +41,9 @@ class ReflexCallable(Protocol[P, R]): __call__: Callable[P, R] -CALLABLE_TYPE = TypeVar("CALLABLE_TYPE", bound=ReflexCallable, infer_variance=True) +CALLABLE_TYPE = TypeVar("CALLABLE_TYPE", bound=ReflexCallable, covariant=True) OTHER_CALLABLE_TYPE = TypeVar( - "OTHER_CALLABLE_TYPE", bound=ReflexCallable, infer_variance=True + "OTHER_CALLABLE_TYPE", bound=ReflexCallable, covariant=True ) diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index 137ce965f..b8b66d627 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -17,11 +17,12 @@ from typing import ( Sequence, Tuple, Type, + TypeVar, Union, overload, ) -from typing_extensions import TypeVar +from typing_extensions import TypeVar as TypingExtensionsTypeVar from reflex import constants from reflex.constants.base import REFLEX_VAR_OPENING_TAG @@ -58,7 +59,7 @@ if TYPE_CHECKING: from .object import ObjectVar -STRING_TYPE = TypeVar("STRING_TYPE", default=str) +STRING_TYPE = TypingExtensionsTypeVar("STRING_TYPE", default=str) class StringVar(Var[STRING_TYPE], python_types=str): diff --git a/tests/units/components/test_props.py b/tests/units/components/test_props.py index 8ab07f135..8ed49d58a 100644 --- a/tests/units/components/test_props.py +++ b/tests/units/components/test_props.py @@ -1,13 +1,9 @@ import pytest +from pydantic.v1 import ValidationError from reflex.components.props import NoExtrasAllowedProps from reflex.utils.exceptions import InvalidPropValueError -try: - from pydantic.v1 import ValidationError -except ModuleNotFoundError: - from pydantic import ValidationError - class PropA(NoExtrasAllowedProps): """Base prop class.""" From 0a33cc3b8a0d46a90fce2c4863316e5cfcd73769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 19 Feb 2025 18:29:11 +0100 Subject: [PATCH 136/144] auto hide badge for pro+ users for cloud deployments (#4819) * auto hide badge for pro+ users for cloud deployments * update integrations tests * fix integrations for real --- reflex/app.py | 19 ++++++++-- reflex/config.py | 9 ++++- reflex/constants/__init__.py | 2 + reflex/constants/compiler.py | 9 +++++ reflex/reflex.py | 12 ++++-- reflex/utils/exec.py | 9 +++++ reflex/utils/prerequisites.py | 26 ++++++++++--- tests/integration/test_connection_banner.py | 42 ++++++++++----------- 8 files changed, 92 insertions(+), 36 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index d0ee06ae9..03382751a 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -111,7 +111,7 @@ from reflex.utils import ( prerequisites, types, ) -from reflex.utils.exec import is_prod_mode, is_testing_env +from reflex.utils.exec import get_compile_context, is_prod_mode, is_testing_env from reflex.utils.imports import ImportVar if TYPE_CHECKING: @@ -201,14 +201,17 @@ def default_overlay_component() -> Component: Returns: The default overlay_component, which is a connection_modal. """ - config = get_config() from reflex.components.component import memo def default_overlay_components(): return Fragment.create( connection_pulser(), connection_toaster(), - *([backend_disabled()] if config.is_reflex_cloud else []), + *( + [backend_disabled()] + if get_compile_context() == constants.CompileContext.DEPLOY + else [] + ), *codespaces.codespaces_auto_redirect(), ) @@ -1136,6 +1139,16 @@ class App(MiddlewareMixin, LifespanMixin): self._validate_var_dependencies() self._setup_overlay_component() + + if config.show_built_with_reflex is None: + if ( + get_compile_context() == constants.CompileContext.DEPLOY + and prerequisites.get_user_tier() in ["pro", "team", "enterprise"] + ): + config.show_built_with_reflex = False + else: + config.show_built_with_reflex = True + if is_prod_mode() and config.show_built_with_reflex: self._setup_sticky_badge() diff --git a/reflex/config.py b/reflex/config.py index 0d48057d7..296b01805 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -589,6 +589,11 @@ class ExecutorType(enum.Enum): class EnvironmentVariables: """Environment variables class to instantiate environment variables.""" + # Indicate the current command that was invoked in the reflex CLI. + REFLEX_COMPILE_CONTEXT: EnvVar[constants.CompileContext] = env_var( + constants.CompileContext.UNDEFINED, internal=True + ) + # Whether to use npm over bun to install frontend packages. REFLEX_USE_NPM: EnvVar[bool] = env_var(False) @@ -636,7 +641,7 @@ class EnvironmentVariables: REFLEX_COMPILE_THREADS: EnvVar[Optional[int]] = env_var(None) # The directory to store reflex dependencies. - REFLEX_DIR: EnvVar[Path] = env_var(Path(constants.Reflex.DIR)) + REFLEX_DIR: EnvVar[Path] = env_var(constants.Reflex.DIR) # Whether to print the SQL queries if the log level is INFO or lower. SQLALCHEMY_ECHO: EnvVar[bool] = env_var(False) @@ -844,7 +849,7 @@ class Config(Base): env_file: Optional[str] = None # Whether to display the sticky "Built with Reflex" badge on all pages. - show_built_with_reflex: bool = True + show_built_with_reflex: Optional[bool] = None # Whether the app is running in the reflex cloud environment. is_reflex_cloud: bool = False diff --git a/reflex/constants/__init__.py b/reflex/constants/__init__.py index f5946bf5e..5a918338d 100644 --- a/reflex/constants/__init__.py +++ b/reflex/constants/__init__.py @@ -25,6 +25,7 @@ from .base import ( from .compiler import ( NOCOMPILE_FILE, SETTER_PREFIX, + CompileContext, CompileVars, ComponentName, Ext, @@ -65,6 +66,7 @@ __ALL__ = [ ColorMode, Config, COOKIES, + CompileContext, ComponentName, CustomComponents, DefaultPage, diff --git a/reflex/constants/compiler.py b/reflex/constants/compiler.py index 9bc9978dc..40134c15b 100644 --- a/reflex/constants/compiler.py +++ b/reflex/constants/compiler.py @@ -111,6 +111,15 @@ class ComponentName(Enum): return self.value.lower() + Ext.ZIP +class CompileContext(str, Enum): + """The context in which the compiler is running.""" + + RUN = "run" + EXPORT = "export" + DEPLOY = "deploy" + UNDEFINED = "undefined" + + class Imports(SimpleNamespace): """Common sets of import vars.""" diff --git a/reflex/reflex.py b/reflex/reflex.py index 9c94a3743..43f7b6184 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -193,7 +193,7 @@ def _run( prerequisites.check_latest_package_version(constants.Reflex.MODULE_NAME) if frontend: - if not config.show_built_with_reflex: + if config.show_built_with_reflex is False: # The sticky badge may be disabled at runtime for team/enterprise tiers. prerequisites.check_config_option_in_tier( option_name="show_built_with_reflex", @@ -303,6 +303,8 @@ def run( if frontend and backend: console.error("Cannot use both --frontend-only and --backend-only options.") raise typer.Exit(1) + + environment.REFLEX_COMPILE_CONTEXT.set(constants.CompileContext.RUN) environment.REFLEX_BACKEND_ONLY.set(backend) environment.REFLEX_FRONTEND_ONLY.set(frontend) @@ -349,17 +351,19 @@ def export( from reflex.utils import export as export_utils from reflex.utils import prerequisites + environment.REFLEX_COMPILE_CONTEXT.set(constants.CompileContext.EXPORT) + frontend, backend = prerequisites.check_running_mode(frontend, backend) if prerequisites.needs_reinit(frontend=frontend or not backend): _init(name=config.app_name, loglevel=loglevel) - if frontend and not config.show_built_with_reflex: + if frontend and config.show_built_with_reflex is False: # The sticky badge may be disabled on export for team/enterprise tiers. prerequisites.check_config_option_in_tier( option_name="show_built_with_reflex", allowed_tiers=["team", "enterprise"], - fallback_value=False, + fallback_value=True, help_link=SHOW_BUILT_WITH_REFLEX_INFO, ) @@ -557,6 +561,8 @@ def deploy( check_version() + environment.REFLEX_COMPILE_CONTEXT.set(constants.CompileContext.DEPLOY) + if not config.show_built_with_reflex: # The sticky badge may be disabled on deploy for pro/team/enterprise tiers. prerequisites.check_config_option_in_tier( diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index b16aaea1c..5474ae82a 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -584,3 +584,12 @@ def is_prod_mode() -> bool: """ current_mode = environment.REFLEX_ENV_MODE.get() return current_mode == constants.Env.PROD + + +def get_compile_context() -> constants.CompileContext: + """Check if the app is compiled for deploy. + + Returns: + Whether the app is being compiled for deploy. + """ + return environment.REFLEX_COMPILE_CONTEXT.get() diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 3cd65a7eb..145b5324c 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -2001,6 +2001,22 @@ def is_generation_hash(template: str) -> bool: return re.match(r"^[0-9a-f]{32,}$", template) is not None +def get_user_tier(): + """Get the current user's tier. + + Returns: + The current user's tier. + """ + from reflex_cli.v2.utils import hosting + + authenticated_token = hosting.authenticated_token() + return ( + authenticated_token[1].get("tier", "").lower() + if authenticated_token[0] + else "anonymous" + ) + + def check_config_option_in_tier( option_name: str, allowed_tiers: list[str], @@ -2015,23 +2031,21 @@ def check_config_option_in_tier( fallback_value: The fallback value if the option is not allowed. help_link: The help link to show to a user that is authenticated. """ - from reflex_cli.v2.utils import hosting - config = get_config() - authenticated_token = hosting.authenticated_token() - if not authenticated_token[0]: + current_tier = get_user_tier() + + if current_tier == "anonymous": the_remedy = ( "You are currently logged out. Run `reflex login` to access this option." ) - current_tier = "anonymous" else: - current_tier = authenticated_token[1].get("tier", "").lower() the_remedy = ( f"Your current subscription tier is `{current_tier}`. " f"Please upgrade to {allowed_tiers} to access this option. " ) if help_link: the_remedy += f"See {help_link} for more information." + if current_tier not in allowed_tiers: console.warn(f"Config option `{option_name}` is restricted. {the_remedy}") setattr(config, option_name, fallback_value) diff --git a/tests/integration/test_connection_banner.py b/tests/integration/test_connection_banner.py index bfc9ea0ae..f7fd7365c 100644 --- a/tests/integration/test_connection_banner.py +++ b/tests/integration/test_connection_banner.py @@ -7,24 +7,19 @@ import pytest from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.by import By +from reflex import constants +from reflex.config import environment from reflex.testing import AppHarness, WebDriver from .utils import SessionStorage -def ConnectionBanner(is_reflex_cloud: bool = False): - """App with a connection banner. - - Args: - is_reflex_cloud: The value for config.is_reflex_cloud. - """ +def ConnectionBanner(): + """App with a connection banner.""" import asyncio import reflex as rx - # Simulate reflex cloud deploy - rx.config.get_config().is_reflex_cloud = is_reflex_cloud - class State(rx.State): foo: int = 0 @@ -49,16 +44,17 @@ def ConnectionBanner(is_reflex_cloud: bool = False): @pytest.fixture( - params=[False, True], ids=["reflex_cloud_disabled", "reflex_cloud_enabled"] + params=[constants.CompileContext.RUN, constants.CompileContext.DEPLOY], + ids=["compile_context_run", "compile_context_deploy"], ) -def simulate_is_reflex_cloud(request) -> bool: +def simulate_compile_context(request) -> constants.CompileContext: """Fixture to simulate reflex cloud deployment. Args: request: pytest request fixture. Returns: - True if reflex cloud is enabled, False otherwise. + The context to run the app with. """ return request.param @@ -66,25 +62,27 @@ def simulate_is_reflex_cloud(request) -> bool: @pytest.fixture() def connection_banner( tmp_path, - simulate_is_reflex_cloud: bool, + simulate_compile_context: constants.CompileContext, ) -> Generator[AppHarness, None, None]: """Start ConnectionBanner app at tmp_path via AppHarness. Args: tmp_path: pytest tmp_path fixture - simulate_is_reflex_cloud: Whether is_reflex_cloud is set for the app. + simulate_compile_context: Which context to run the app with. Yields: running AppHarness instance """ + environment.REFLEX_COMPILE_CONTEXT.set(simulate_compile_context) + with AppHarness.create( root=tmp_path, - app_source=functools.partial( - ConnectionBanner, is_reflex_cloud=simulate_is_reflex_cloud + app_source=functools.partial(ConnectionBanner), + app_name=( + "connection_banner_reflex_cloud" + if simulate_compile_context == constants.CompileContext.DEPLOY + else "connection_banner" ), - app_name="connection_banner_reflex_cloud" - if simulate_is_reflex_cloud - else "connection_banner", ) as harness: yield harness @@ -194,13 +192,13 @@ async def test_connection_banner(connection_banner: AppHarness): @pytest.mark.asyncio async def test_cloud_banner( - connection_banner: AppHarness, simulate_is_reflex_cloud: bool + connection_banner: AppHarness, simulate_compile_context: constants.CompileContext ): """Test that the connection banner is displayed when the websocket drops. Args: connection_banner: AppHarness instance. - simulate_is_reflex_cloud: Whether is_reflex_cloud is set for the app. + simulate_compile_context: Which context to set for the app. """ assert connection_banner.app_instance is not None assert connection_banner.backend is not None @@ -213,7 +211,7 @@ async def test_cloud_banner( driver.add_cookie({"name": "backend-enabled", "value": "false"}) driver.refresh() - if simulate_is_reflex_cloud: + if simulate_compile_context == constants.CompileContext.DEPLOY: assert connection_banner._poll_for(lambda: has_cloud_banner(driver)) else: _assert_token(connection_banner, driver) From 405872aaf0346719577b049f63272fc781201553 Mon Sep 17 00:00:00 2001 From: Sumanth <86840115+slackroo@users.noreply.github.com> Date: Thu, 20 Feb 2025 00:29:46 +0530 Subject: [PATCH 137/144] Wrapping extra components inside of the Context Menu Component (#4831) * Wrapping extra components inside of the Context Menu Component (partial fix for #4262) label, group, radio, radio_group * removed unwanted changes * removed codespell ignores and pyright type checking ignores * remove misc changes --------- Co-authored-by: Khaleel Al-Adhami --- .../radix/themes/components/context_menu.py | 80 ++++- .../radix/themes/components/context_menu.pyi | 321 +++++++++++++++++- 2 files changed, 399 insertions(+), 2 deletions(-) diff --git a/reflex/components/radix/themes/components/context_menu.py b/reflex/components/radix/themes/components/context_menu.py index 60d23db1a..49f22bdfa 100644 --- a/reflex/components/radix/themes/components/context_menu.py +++ b/reflex/components/radix/themes/components/context_menu.py @@ -10,6 +10,7 @@ from reflex.vars.base import Var from ..base import LiteralAccentColor, RadixThemesComponent from .checkbox import Checkbox +from .radio_group import HighLevelRadioGroup LiteralDirType = Literal["ltr", "rtl"] @@ -226,7 +227,11 @@ class ContextMenuItem(RadixThemesComponent): # Optional text used for typeahead purposes. By default the typeahead behavior will use the content of the item. Use this when the content is complex, or you have non-textual content inside. text_value: Var[str] - _valid_parents: List[str] = ["ContextMenuContent", "ContextMenuSubContent"] + _valid_parents: List[str] = [ + "ContextMenuContent", + "ContextMenuSubContent", + "ContextMenuGroup", + ] # Fired when the item is selected. on_select: EventHandler[no_args_event_spec] @@ -247,6 +252,75 @@ class ContextMenuCheckbox(Checkbox): shortcut: Var[str] +class ContextMenuLabel(RadixThemesComponent): + """The component that contains the label.""" + + tag = "ContextMenu.Label" + + # Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + as_child: Var[bool] + + +class ContextMenuGroup(RadixThemesComponent): + """The component that contains the group.""" + + tag = "ContextMenu.Group" + + # Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + as_child: Var[bool] + + _valid_parents: List[str] = ["ContextMenuContent", "ContextMenuSubContent"] + + +class ContextMenuRadioGroup(RadixThemesComponent): + """The component that contains context menu radio items.""" + + tag = "ContextMenu.RadioGroup" + + # Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + as_child: Var[bool] + + # The value of the selected item in the group. + value: Var[str] + + # Props to rename + _rename_props = {"onChange": "onValueChange"} + + # Fired when the value of the radio group changes. + on_change: EventHandler[passthrough_event_spec(str)] + + _valid_parents: List[str] = [ + "ContextMenuRadioItem", + "ContextMenuSubContent", + "ContextMenuContent", + "ContextMenuSub", + ] + + +class ContextMenuRadioItem(HighLevelRadioGroup): + """The component that contains context menu radio items.""" + + tag = "ContextMenu.RadioItem" + + # Override theme color for Dropdown Menu Content + color_scheme: Var[LiteralAccentColor] + + # Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + as_child: Var[bool] + + # The unique value of the item. + value: Var[str] + + # When true, prevents the user from interacting with the item. + disabled: Var[bool] + + # Event handler called when the user selects an item (via mouse or keyboard). Calling event.preventDefault in this handler will prevent the context menu from closing when selecting that item. + on_select: EventHandler[no_args_event_spec] + + # Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside. + text_value: Var[str] + + class ContextMenu(ComponentNamespace): """Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press.""" @@ -259,6 +333,10 @@ class ContextMenu(ComponentNamespace): item = staticmethod(ContextMenuItem.create) separator = staticmethod(ContextMenuSeparator.create) checkbox = staticmethod(ContextMenuCheckbox.create) + label = staticmethod(ContextMenuLabel.create) + group = staticmethod(ContextMenuGroup.create) + radio_group = staticmethod(ContextMenuRadioGroup.create) + radio = staticmethod(ContextMenuRadioItem.create) context_menu = ContextMenu() diff --git a/reflex/components/radix/themes/components/context_menu.pyi b/reflex/components/radix/themes/components/context_menu.pyi index 81ccb125b..34aa36f45 100644 --- a/reflex/components/radix/themes/components/context_menu.pyi +++ b/reflex/components/radix/themes/components/context_menu.pyi @@ -3,7 +3,7 @@ # ------------------- DO NOT EDIT ---------------------- # This file was generated by `reflex/utils/pyi_generator.py`! # ------------------------------------------------------ -from typing import Any, Dict, Literal, Optional, Union, overload +from typing import Any, Dict, List, Literal, Optional, Union, overload from reflex.components.component import ComponentNamespace from reflex.components.core.breakpoints import Breakpoints @@ -13,6 +13,7 @@ from reflex.vars.base import Var from ..base import RadixThemesComponent from .checkbox import Checkbox +from .radio_group import HighLevelRadioGroup LiteralDirType = Literal["ltr", "rtl"] LiteralSizeType = Literal["1", "2"] @@ -820,6 +821,320 @@ class ContextMenuCheckbox(Checkbox): """ ... +class ContextMenuLabel(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + as_child: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "ContextMenuLabel": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuGroup(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + as_child: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "ContextMenuGroup": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuRadioGroup(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + as_child: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[()]] = None, + on_change: Optional[Union[EventType[()], EventType[str]]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "ContextMenuRadioGroup": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + value: The value of the selected item in the group. + on_change: Fired when the value of the radio group changes. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuRadioItem(HighLevelRadioGroup): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color_scheme: Optional[ + Union[ + Literal[ + "amber", + "blue", + "bronze", + "brown", + "crimson", + "cyan", + "gold", + "grass", + "gray", + "green", + "indigo", + "iris", + "jade", + "lime", + "mint", + "orange", + "pink", + "plum", + "purple", + "red", + "ruby", + "sky", + "teal", + "tomato", + "violet", + "yellow", + ], + Var[ + Literal[ + "amber", + "blue", + "bronze", + "brown", + "crimson", + "cyan", + "gold", + "grass", + "gray", + "green", + "indigo", + "iris", + "jade", + "lime", + "mint", + "orange", + "pink", + "plum", + "purple", + "red", + "ruby", + "sky", + "teal", + "tomato", + "violet", + "yellow", + ] + ], + ] + ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + text_value: Optional[Union[Var[str], str]] = None, + items: Optional[Union[List[str], Var[List[str]]]] = None, + direction: Optional[ + Union[ + Literal["column", "column-reverse", "row", "row-reverse"], + Var[Literal["column", "column-reverse", "row", "row-reverse"]], + ] + ] = None, + spacing: Optional[ + Union[ + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + ] + ] = None, + size: Optional[ + Union[Literal["1", "2", "3"], Var[Literal["1", "2", "3"]]] + ] = None, + variant: Optional[ + Union[ + Literal["classic", "soft", "surface"], + Var[Literal["classic", "soft", "surface"]], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + default_value: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None, + on_blur: Optional[EventType[()]] = None, + on_click: Optional[EventType[()]] = None, + on_context_menu: Optional[EventType[()]] = None, + on_double_click: Optional[EventType[()]] = None, + on_focus: Optional[EventType[()]] = None, + on_mount: Optional[EventType[()]] = None, + on_mouse_down: Optional[EventType[()]] = None, + on_mouse_enter: Optional[EventType[()]] = None, + on_mouse_leave: Optional[EventType[()]] = None, + on_mouse_move: Optional[EventType[()]] = None, + on_mouse_out: Optional[EventType[()]] = None, + on_mouse_over: Optional[EventType[()]] = None, + on_mouse_up: Optional[EventType[()]] = None, + on_scroll: Optional[EventType[()]] = None, + on_select: Optional[EventType[()]] = None, + on_unmount: Optional[EventType[()]] = None, + **props, + ) -> "ContextMenuRadioItem": + """Create a radio group component. + + Args: + items: The items of the radio group. + color_scheme: The color of the radio group + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + value: The controlled value of the radio item to check. Should be used in conjunction with on_change. + disabled: Whether the radio group is disabled + on_select: Event handler called when the user selects an item (via mouse or keyboard). Calling event.preventDefault in this handler will prevent the context menu from closing when selecting that item. + text_value: Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside. + items: The items of the radio group. + direction: The direction of the radio group. + spacing: The gap between the items of the radio group. + size: The size of the radio group. + variant: The variant of the radio group + high_contrast: Whether to render the radio group with higher contrast color against background + default_value: The initial value of checked radio item. Should be used in conjunction with on_change. + name: The name of the group. Submitted with its owning form as part of a name/value pair. + required: Whether the radio group is required + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Additional properties to apply to the accordion item. + + Returns: + The created radio group component. + + Raises: + TypeError: If the type of items is invalid. + """ + ... + class ContextMenu(ComponentNamespace): root = staticmethod(ContextMenuRoot.create) trigger = staticmethod(ContextMenuTrigger.create) @@ -830,5 +1145,9 @@ class ContextMenu(ComponentNamespace): item = staticmethod(ContextMenuItem.create) separator = staticmethod(ContextMenuSeparator.create) checkbox = staticmethod(ContextMenuCheckbox.create) + label = staticmethod(ContextMenuLabel.create) + group = staticmethod(ContextMenuGroup.create) + radio_group = staticmethod(ContextMenuRadioGroup.create) + radio = staticmethod(ContextMenuRadioItem.create) context_menu = ContextMenu() From 762d975a879d8da5a67d4fe78a86e76bfbec7949 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 19 Feb 2025 11:03:54 -0800 Subject: [PATCH 138/144] Allow any user to set `show_built_with_reflex=False` in any mode (#4847) --- reflex/reflex.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/reflex/reflex.py b/reflex/reflex.py index 43f7b6184..878b32d76 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -23,8 +23,6 @@ typer.core.rich = None # pyright: ignore [reportPrivateImportUsage] cli = typer.Typer(add_completion=False, pretty_exceptions_enable=False) -SHOW_BUILT_WITH_REFLEX_INFO = "https://reflex.dev/docs/hosting/reflex-branding/" - # Get the config. config = get_config() @@ -193,15 +191,6 @@ def _run( prerequisites.check_latest_package_version(constants.Reflex.MODULE_NAME) if frontend: - if config.show_built_with_reflex is False: - # The sticky badge may be disabled at runtime for team/enterprise tiers. - prerequisites.check_config_option_in_tier( - option_name="show_built_with_reflex", - allowed_tiers=["team", "enterprise"], - fallback_value=True, - help_link=SHOW_BUILT_WITH_REFLEX_INFO, - ) - # Get the app module. prerequisites.get_compiled_app() @@ -358,15 +347,6 @@ def export( if prerequisites.needs_reinit(frontend=frontend or not backend): _init(name=config.app_name, loglevel=loglevel) - if frontend and config.show_built_with_reflex is False: - # The sticky badge may be disabled on export for team/enterprise tiers. - prerequisites.check_config_option_in_tier( - option_name="show_built_with_reflex", - allowed_tiers=["team", "enterprise"], - fallback_value=True, - help_link=SHOW_BUILT_WITH_REFLEX_INFO, - ) - export_utils.export( zipping=zipping, frontend=frontend, @@ -563,15 +543,6 @@ def deploy( environment.REFLEX_COMPILE_CONTEXT.set(constants.CompileContext.DEPLOY) - if not config.show_built_with_reflex: - # The sticky badge may be disabled on deploy for pro/team/enterprise tiers. - prerequisites.check_config_option_in_tier( - option_name="show_built_with_reflex", - allowed_tiers=["pro", "team", "enterprise"], - fallback_value=True, - help_link=SHOW_BUILT_WITH_REFLEX_INFO, - ) - # Set the log level. console.set_log_level(loglevel) From abab18e1656fbf4eaf69bfb6df7103b1866b99af Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 19 Feb 2025 11:27:33 -0800 Subject: [PATCH 139/144] components deserve to be first class props (#4827) * components deserve to be first class props * default back to {} * smarter yield * how much does caching help? * only hit the slower path on _are_fields_known * remove the cache thingy * cache the inner _get_component_prop_names * oops * dang it darglint * refactor things a bit * fix events --- reflex/components/base/bare.py | 85 +++++-- reflex/components/component.py | 270 ++++++++++++++--------- reflex/components/core/cond.py | 8 - reflex/vars/base.py | 31 ++- tests/units/components/test_component.py | 2 +- 5 files changed, 259 insertions(+), 137 deletions(-) diff --git a/reflex/components/base/bare.py b/reflex/components/base/bare.py index 73b0680d3..5d4020ffd 100644 --- a/reflex/components/base/bare.py +++ b/reflex/components/base/bare.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import Any, Iterator +from typing import Any, Iterator, Sequence -from reflex.components.component import Component, LiteralComponentVar +from reflex.components.component import BaseComponent, Component, ComponentStyle from reflex.components.tags import Tag from reflex.components.tags.tagless import Tagless from reflex.config import PerformanceMode, environment @@ -12,7 +12,7 @@ from reflex.utils import console from reflex.utils.decorator import once from reflex.utils.imports import ParsedImportDict from reflex.vars import BooleanVar, ObjectVar, Var -from reflex.vars.base import VarData +from reflex.vars.base import GLOBAL_CACHE, VarData from reflex.vars.sequence import LiteralStringVar @@ -47,6 +47,11 @@ def validate_str(value: str): ) +def _components_from_var(var: Var) -> Sequence[BaseComponent]: + var_data = var._get_all_var_data() + return var_data.components if var_data else () + + class Bare(Component): """A component with no tag.""" @@ -80,8 +85,9 @@ class Bare(Component): The hooks for the component. """ hooks = super()._get_all_hooks_internal() - if isinstance(self.contents, LiteralComponentVar): - hooks |= self.contents._var_value._get_all_hooks_internal() + if isinstance(self.contents, Var): + for component in _components_from_var(self.contents): + hooks |= component._get_all_hooks_internal() return hooks def _get_all_hooks(self) -> dict[str, VarData | None]: @@ -91,18 +97,22 @@ class Bare(Component): The hooks for the component. """ hooks = super()._get_all_hooks() - if isinstance(self.contents, LiteralComponentVar): - hooks |= self.contents._var_value._get_all_hooks() + if isinstance(self.contents, Var): + for component in _components_from_var(self.contents): + hooks |= component._get_all_hooks() return hooks - def _get_all_imports(self) -> ParsedImportDict: + def _get_all_imports(self, collapse: bool = False) -> ParsedImportDict: """Include the imports for the component. + Args: + collapse: Whether to collapse the imports. + Returns: The imports for the component. """ - imports = super()._get_all_imports() - if isinstance(self.contents, LiteralComponentVar): + imports = super()._get_all_imports(collapse=collapse) + if isinstance(self.contents, Var): var_data = self.contents._get_all_var_data() if var_data: imports |= {k: list(v) for k, v in var_data.imports} @@ -115,8 +125,9 @@ class Bare(Component): The dynamic imports. """ dynamic_imports = super()._get_all_dynamic_imports() - if isinstance(self.contents, LiteralComponentVar): - dynamic_imports |= self.contents._var_value._get_all_dynamic_imports() + if isinstance(self.contents, Var): + for component in _components_from_var(self.contents): + dynamic_imports |= component._get_all_dynamic_imports() return dynamic_imports def _get_all_custom_code(self) -> set[str]: @@ -126,10 +137,24 @@ class Bare(Component): The custom code. """ custom_code = super()._get_all_custom_code() - if isinstance(self.contents, LiteralComponentVar): - custom_code |= self.contents._var_value._get_all_custom_code() + if isinstance(self.contents, Var): + for component in _components_from_var(self.contents): + custom_code |= component._get_all_custom_code() return custom_code + def _get_all_app_wrap_components(self) -> dict[tuple[int, str], Component]: + """Get the components that should be wrapped in the app. + + Returns: + The components that should be wrapped in the app. + """ + app_wrap_components = super()._get_all_app_wrap_components() + if isinstance(self.contents, Var): + for component in _components_from_var(self.contents): + if isinstance(component, Component): + app_wrap_components |= component._get_all_app_wrap_components() + return app_wrap_components + def _get_all_refs(self) -> set[str]: """Get the refs for the children of the component. @@ -137,8 +162,9 @@ class Bare(Component): The refs for the children. """ refs = super()._get_all_refs() - if isinstance(self.contents, LiteralComponentVar): - refs |= self.contents._var_value._get_all_refs() + if isinstance(self.contents, Var): + for component in _components_from_var(self.contents): + refs |= component._get_all_refs() return refs def _render(self) -> Tag: @@ -148,6 +174,33 @@ class Bare(Component): return Tagless(contents=f"{{{self.contents!s}}}") return Tagless(contents=str(self.contents)) + def _add_style_recursive( + self, style: ComponentStyle, theme: Component | None = None + ) -> Component: + """Add style to the component and its children. + + Args: + style: The style to add. + theme: The theme to add. + + Returns: + The component with the style added. + """ + new_self = super()._add_style_recursive(style, theme) + + are_components_touched = False + + if isinstance(self.contents, Var): + for component in _components_from_var(self.contents): + if isinstance(component, Component): + component._add_style_recursive(style, theme) + are_components_touched = True + + if are_components_touched: + GLOBAL_CACHE.clear() + + return new_self + def _get_vars( self, include_children: bool = False, ignore_ids: set[int] | None = None ) -> Iterator[Var]: diff --git a/reflex/components/component.py b/reflex/components/component.py index 005f7791d..af9da1b4e 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -4,6 +4,7 @@ from __future__ import annotations import copy import dataclasses +import inspect import typing from abc import ABC, abstractmethod from functools import lru_cache, wraps @@ -21,6 +22,8 @@ from typing import ( Set, Type, Union, + get_args, + get_origin, ) from typing_extensions import Self @@ -43,6 +46,7 @@ from reflex.constants import ( from reflex.constants.compiler import SpecialAttributes from reflex.constants.state import FRONTEND_EVENT_STATE from reflex.event import ( + EventActionsMixin, EventCallback, EventChain, EventHandler, @@ -191,6 +195,25 @@ def satisfies_type_hint(obj: Any, type_hint: Any) -> bool: return types._isinstance(obj, type_hint, nested=1) +def _components_from( + component_or_var: Union[BaseComponent, Var], +) -> tuple[BaseComponent, ...]: + """Get the components from a component or Var. + + Args: + component_or_var: The component or Var to get the components from. + + Returns: + The components. + """ + if isinstance(component_or_var, Var): + var_data = component_or_var._get_all_var_data() + return var_data.components if var_data else () + if isinstance(component_or_var, BaseComponent): + return (component_or_var,) + return () + + class Component(BaseComponent, ABC): """A component with style, event trigger and other props.""" @@ -489,7 +512,7 @@ class Component(BaseComponent, ABC): # Remove any keys that were added as events. for key in kwargs["event_triggers"]: - del kwargs[key] + kwargs.pop(key, None) # Place data_ and aria_ attributes into custom_attrs special_attributes = tuple( @@ -666,12 +689,21 @@ class Component(BaseComponent, ABC): return set() @classmethod - @lru_cache(maxsize=None) - def get_component_props(cls) -> set[str]: - """Get the props that expected a component as value. + def _are_fields_known(cls) -> bool: + """Check if all fields are known at compile time. True for most components. Returns: - The components props. + Whether all fields are known at compile time. + """ + return True + + @classmethod + @lru_cache(maxsize=None) + def _get_component_prop_names(cls) -> Set[str]: + """Get the names of the component props. NOTE: This assumes all fields are known. + + Returns: + The names of the component props. """ return { name @@ -680,6 +712,26 @@ class Component(BaseComponent, ABC): and types._issubclass(field.outer_type_, Component) } + def _get_components_in_props(self) -> Sequence[BaseComponent]: + """Get the components in the props. + + Returns: + The components in the props + """ + if self._are_fields_known(): + return [ + component + for name in self._get_component_prop_names() + for component in _components_from(getattr(self, name)) + ] + return [ + component + for prop in self.get_props() + if (value := getattr(self, prop)) is not None + and isinstance(value, (BaseComponent, Var)) + for component in _components_from(value) + ] + @classmethod def create(cls, *children, **props) -> Self: """Create the component. @@ -1136,6 +1188,9 @@ class Component(BaseComponent, ABC): if custom_code is not None: code.add(custom_code) + for component in self._get_components_in_props(): + code |= component._get_all_custom_code() + # Add the custom code from add_custom_code method. for clz in self._iter_parent_classes_with_method("add_custom_code"): for item in clz.add_custom_code(self): @@ -1163,7 +1218,7 @@ class Component(BaseComponent, ABC): The dynamic imports. """ # Store the import in a set to avoid duplicates. - dynamic_imports = set() + dynamic_imports: set[str] = set() # Get dynamic import for this component. dynamic_import = self._get_dynamic_imports() @@ -1174,25 +1229,12 @@ class Component(BaseComponent, ABC): for child in self.children: dynamic_imports |= child._get_all_dynamic_imports() - for prop in self.get_component_props(): - if getattr(self, prop) is not None: - dynamic_imports |= getattr(self, prop)._get_all_dynamic_imports() + for component in self._get_components_in_props(): + dynamic_imports |= component._get_all_dynamic_imports() # Return the dynamic imports return dynamic_imports - def _get_props_imports(self) -> List[ParsedImportDict]: - """Get the imports needed for components props. - - Returns: - The imports for the components props of the component. - """ - return [ - getattr(self, prop)._get_all_imports() - for prop in self.get_component_props() - if getattr(self, prop) is not None - ] - def _should_transpile(self, dep: str | None) -> bool: """Check if a dependency should be transpiled. @@ -1303,7 +1345,6 @@ class Component(BaseComponent, ABC): ) return imports.merge_imports( - *self._get_props_imports(), self._get_dependencies_imports(), self._get_hooks_imports(), _imports, @@ -1380,6 +1421,8 @@ class Component(BaseComponent, ABC): for k in var_data.hooks } ) + for component in var_data.components: + vars_hooks.update(component._get_all_hooks()) return vars_hooks def _get_events_hooks(self) -> dict[str, VarData | None]: @@ -1528,6 +1571,9 @@ class Component(BaseComponent, ABC): refs.add(ref) for child in self.children: refs |= child._get_all_refs() + for component in self._get_components_in_props(): + refs |= component._get_all_refs() + return refs def _get_all_custom_components( @@ -1551,6 +1597,9 @@ class Component(BaseComponent, ABC): if not isinstance(child, Component): continue custom_components |= child._get_all_custom_components(seen=seen) + for component in self._get_components_in_props(): + if isinstance(component, Component) and component.tag is not None: + custom_components |= component._get_all_custom_components(seen=seen) return custom_components @property @@ -1614,17 +1663,65 @@ class CustomComponent(Component): # The props of the component. props: Dict[str, Any] = {} - # Props that reference other components. - component_props: Dict[str, Component] = {} - - def __init__(self, *args, **kwargs): + def __init__(self, **kwargs): """Initialize the custom component. Args: - *args: The args to pass to the component. **kwargs: The kwargs to pass to the component. """ - super().__init__(*args, **kwargs) + component_fn = kwargs.get("component_fn") + + # Set the props. + props_types = typing.get_type_hints(component_fn) if component_fn else {} + props = {key: value for key, value in kwargs.items() if key in props_types} + kwargs = {key: value for key, value in kwargs.items() if key not in props_types} + + event_types = { + key + for key in props + if ( + (get_origin((annotation := props_types.get(key))) or annotation) + == EventHandler + ) + } + + def get_args_spec(key: str) -> types.ArgsSpec | Sequence[types.ArgsSpec]: + type_ = props_types[key] + + return ( + args[0] + if (args := get_args(type_)) + else ( + annotation_args[1] + if get_origin( + ( + annotation := inspect.getfullargspec( + component_fn + ).annotations[key] + ) + ) + is typing.Annotated + and (annotation_args := get_args(annotation)) + else no_args_event_spec + ) + ) + + super().__init__( + event_triggers={ + key: EventChain.create( + value=props[key], + args_spec=get_args_spec(key), + key=key, + ) + for key in event_types + }, + **kwargs, + ) + + to_camel_cased_props = { + format.to_camel_case(key) for key in props if key not in event_types + } + self.get_props = lambda: to_camel_cased_props # pyright: ignore [reportIncompatibleVariableOverride] # Unset the style. self.style = Style() @@ -1632,51 +1729,36 @@ class CustomComponent(Component): # Set the tag to the name of the function. self.tag = format.to_title_case(self.component_fn.__name__) - # Get the event triggers defined in the component declaration. - event_triggers_in_component_declaration = self.get_event_triggers() - - # Set the props. - props = typing.get_type_hints(self.component_fn) - for key, value in kwargs.items(): + for key, value in props.items(): # Skip kwargs that are not props. - if key not in props: + if key not in props_types: continue + camel_cased_key = format.to_camel_case(key) + # Get the type based on the annotation. - type_ = props[key] + type_ = props_types[key] # Handle event chains. - if types._issubclass(type_, EventChain): - value = EventChain.create( - value=value, - args_spec=event_triggers_in_component_declaration.get( - key, no_args_event_spec - ), - key=key, + if types._issubclass(type_, EventActionsMixin): + inspect.getfullargspec(component_fn).annotations[key] + self.props[camel_cased_key] = EventChain.create( + value=value, args_spec=get_args_spec(key), key=key ) - self.props[format.to_camel_case(key)] = value continue - # Handle subclasses of Base. - if isinstance(value, Base): - base_value = LiteralVar.create(value) + value = LiteralVar.create(value) + self.props[camel_cased_key] = value + setattr(self, camel_cased_key, value) - # Track hooks and imports associated with Component instances. - if base_value is not None and isinstance(value, Component): - self.component_props[key] = value - value = base_value._replace( - merge_var_data=VarData( - imports=value._get_all_imports(), - hooks=value._get_all_hooks(), - ) - ) - else: - value = base_value - else: - value = LiteralVar.create(value) + @classmethod + def _are_fields_known(cls) -> bool: + """Check if the fields are known. - # Set the prop. - self.props[format.to_camel_case(key)] = value + Returns: + Whether the fields are known. + """ + return False def __eq__(self, other: Any) -> bool: """Check if the component is equal to another. @@ -1698,7 +1780,7 @@ class CustomComponent(Component): return hash(self.tag) @classmethod - def get_props(cls) -> Set[str]: # pyright: ignore [reportIncompatibleVariableOverride] + def get_props(cls) -> Set[str]: """Get the props for the component. Returns: @@ -1735,27 +1817,8 @@ class CustomComponent(Component): seen=seen ) - # Fetch custom components from props as well. - for child_component in self.component_props.values(): - if child_component.tag is None: - continue - if child_component.tag not in seen: - seen.add(child_component.tag) - if isinstance(child_component, CustomComponent): - custom_components |= {child_component} - custom_components |= child_component._get_all_custom_components( - seen=seen - ) return custom_components - def _render(self) -> Tag: - """Define how to render the component in React. - - Returns: - The tag to render. - """ - return super()._render(props=self.props) - def get_prop_vars(self) -> List[Var]: """Get the prop vars. @@ -1765,29 +1828,19 @@ class CustomComponent(Component): return [ Var( _js_expr=name, - _var_type=(prop._var_type if isinstance(prop, Var) else type(prop)), + _var_type=( + prop._var_type + if isinstance(prop, Var) + else ( + type(prop) + if not isinstance(prop, EventActionsMixin) + else EventChain + ) + ), ).guess_type() for name, prop in self.props.items() ] - def _get_vars( - self, include_children: bool = False, ignore_ids: set[int] | None = None - ) -> Iterator[Var]: - """Walk all Vars used in this component. - - Args: - include_children: Whether to include Vars from children. - ignore_ids: The ids to ignore. - - Yields: - Each var referenced by the component (props, styles, event handlers). - """ - ignore_ids = ignore_ids or set() - yield from super()._get_vars( - include_children=include_children, ignore_ids=ignore_ids - ) - yield from filter(lambda prop: isinstance(prop, Var), self.props.values()) - @lru_cache(maxsize=None) # noqa: B019 def get_component(self) -> Component: """Render the component. @@ -2475,6 +2528,7 @@ class LiteralComponentVar(CachedVarOperation, LiteralVar, ComponentVar): The VarData for the var. """ return VarData.merge( + self._var_data, VarData( imports={ "@emotion/react": [ @@ -2517,9 +2571,21 @@ class LiteralComponentVar(CachedVarOperation, LiteralVar, ComponentVar): Returns: The var. """ + var_datas = [ + var_data + for var in value._get_vars(include_children=True) + if (var_data := var._get_all_var_data()) + ] + return LiteralComponentVar( _js_expr="", _var_type=type(value), - _var_data=_var_data, + _var_data=VarData.merge( + _var_data, + *var_datas, + VarData( + components=(value,), + ), + ), _var_value=value, ) diff --git a/reflex/components/core/cond.py b/reflex/components/core/cond.py index 6f9110a16..a76a8b800 100644 --- a/reflex/components/core/cond.py +++ b/reflex/components/core/cond.py @@ -61,14 +61,6 @@ class Cond(MemoizationLeaf): ) ) - def _get_props_imports(self): - """Get the imports needed for component's props. - - Returns: - The imports for the component's props of the component. - """ - return [] - def _render(self) -> Tag: return CondTag( cond=self.cond, diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 89bc86fce..6654c7e22 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -76,6 +76,7 @@ from reflex.utils.types import ( ) if TYPE_CHECKING: + from reflex.components.component import BaseComponent from reflex.state import BaseState from .number import BooleanVar, LiteralBooleanVar, LiteralNumberVar, NumberVar @@ -132,6 +133,9 @@ class VarData: # Position of the hook in the component position: Hooks.HookPosition | None = None + # Components that are part of this var + components: Tuple[BaseComponent, ...] = dataclasses.field(default_factory=tuple) + def __init__( self, state: str = "", @@ -140,6 +144,7 @@ class VarData: hooks: Mapping[str, VarData | None] | Sequence[str] | str | None = None, deps: list[Var] | None = None, position: Hooks.HookPosition | None = None, + components: Iterable[BaseComponent] | None = None, ): """Initialize the var data. @@ -150,6 +155,7 @@ class VarData: hooks: Hooks that need to be present in the component to render this var. deps: Dependencies of the var for useCallback. position: Position of the hook in the component. + components: Components that are part of this var. """ if isinstance(hooks, str): hooks = [hooks] @@ -164,6 +170,7 @@ class VarData: object.__setattr__(self, "hooks", tuple(hooks or {})) object.__setattr__(self, "deps", tuple(deps or [])) object.__setattr__(self, "position", position or None) + object.__setattr__(self, "components", tuple(components or [])) if hooks and any(hooks.values()): merged_var_data = VarData.merge(self, *hooks.values()) @@ -174,6 +181,7 @@ class VarData: object.__setattr__(self, "hooks", merged_var_data.hooks) object.__setattr__(self, "deps", merged_var_data.deps) object.__setattr__(self, "position", merged_var_data.position) + object.__setattr__(self, "components", merged_var_data.components) def old_school_imports(self) -> ImportDict: """Return the imports as a mutable dict. @@ -242,17 +250,19 @@ class VarData: else: position = None - if state or _imports or hooks or field_name or deps or position: - return VarData( - state=state, - field_name=field_name, - imports=_imports, - hooks=hooks, - deps=deps, - position=position, - ) + components = tuple( + component for var_data in all_var_datas for component in var_data.components + ) - return None + return VarData( + state=state, + field_name=field_name, + imports=_imports, + hooks=hooks, + deps=deps, + position=position, + components=components, + ) def __bool__(self) -> bool: """Check if the var data is non-empty. @@ -267,6 +277,7 @@ class VarData: or self.field_name or self.deps or self.position + or self.components ) @classmethod diff --git a/tests/units/components/test_component.py b/tests/units/components/test_component.py index 8cffa6e0e..377f98f97 100644 --- a/tests/units/components/test_component.py +++ b/tests/units/components/test_component.py @@ -871,7 +871,7 @@ def test_create_custom_component(my_component): """ component = CustomComponent(component_fn=my_component, prop1="test", prop2=1) assert component.tag == "MyComponent" - assert component.get_props() == set() + assert component.get_props() == {"prop1", "prop2"} assert component._get_all_custom_components() == {component} From 7a6c7123bde75c6015a14029f1d68923117bc160 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 19 Feb 2025 12:33:03 -0800 Subject: [PATCH 140/144] treat hyphen as underscore in keys of styles (#4810) * treat hyphen as underscore in keys of styles * fix tests * more nuanced conversions --- reflex/components/tags/tag.py | 2 +- reflex/style.py | 7 +++++-- reflex/utils/format.py | 11 +++++------ tests/units/components/markdown/test_markdown.py | 2 +- tests/units/components/test_component.py | 2 +- tests/units/utils/test_format.py | 10 +++++----- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/reflex/components/tags/tag.py b/reflex/components/tags/tag.py index 515d9e05f..7f7a8c74d 100644 --- a/reflex/components/tags/tag.py +++ b/reflex/components/tags/tag.py @@ -101,7 +101,7 @@ class Tag: """ self.props.update( { - format.to_camel_case(name, allow_hyphens=True): ( + format.to_camel_case(name, treat_hyphens_as_underscores=False): ( prop if types._isinstance(prop, (EventChain, Mapping)) else LiteralVar.create(prop) diff --git a/reflex/style.py b/reflex/style.py index 1d818ed06..00dc16839 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -190,11 +190,12 @@ def convert( for key, value in style_dict.items(): keys = ( format_style_key(key) - if not isinstance(value, (dict, ObjectVar)) + if not isinstance(value, (dict, ObjectVar, list)) or ( isinstance(value, Breakpoints) and all(not isinstance(v, dict) for v in value.values()) ) + or (isinstance(value, list) and all(not isinstance(v, dict) for v in value)) or ( isinstance(value, ObjectVar) and not issubclass(get_origin(value._var_type) or value._var_type, dict) @@ -236,7 +237,9 @@ def format_style_key(key: str) -> Tuple[str, ...]: Returns: Tuple of css style names corresponding to the key provided. """ - key = format.to_camel_case(key, allow_hyphens=True) + if key.startswith("--"): + return (key,) + key = format.to_camel_case(key) return STYLE_PROP_SHORTHAND_MAPPING.get(key, (key,)) diff --git a/reflex/utils/format.py b/reflex/utils/format.py index 214c845f8..14ef8fb46 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -168,7 +168,7 @@ def to_snake_case(text: str) -> str: return re.sub("([a-z0-9])([A-Z])", r"\1_\2", s1).lower().replace("-", "_") -def to_camel_case(text: str, allow_hyphens: bool = False) -> str: +def to_camel_case(text: str, treat_hyphens_as_underscores: bool = True) -> str: """Convert a string to camel case. The first word in the text is converted to lowercase and @@ -176,17 +176,16 @@ def to_camel_case(text: str, allow_hyphens: bool = False) -> str: Args: text: The string to convert. - allow_hyphens: Whether to allow hyphens in the string. + treat_hyphens_as_underscores: Whether to allow hyphens in the string. Returns: The camel case string. """ - char = "_" if allow_hyphens else "-_" - words = re.split(f"[{char}]", text.lstrip(char)) - leading_underscores_or_hyphens = "".join(re.findall(rf"^[{char}]+", text)) + char = "_" if not treat_hyphens_as_underscores else "-_" + words = re.split(f"[{char}]", text) # Capitalize the first letter of each word except the first one converted_word = words[0] + "".join(x.capitalize() for x in words[1:]) - return leading_underscores_or_hyphens + converted_word + return converted_word def to_title_case(text: str, sep: str = "") -> str: diff --git a/tests/units/components/markdown/test_markdown.py b/tests/units/components/markdown/test_markdown.py index c6d395eb1..15d662ef6 100644 --- a/tests/units/components/markdown/test_markdown.py +++ b/tests/units/components/markdown/test_markdown.py @@ -157,7 +157,7 @@ def test_create_map_fn_var_subclass(cls, fn_body, fn_args, explicit_return, expe value, **props ) }, - r"""(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); let _language = match ? match[1] : ''; ; return inline ? ( {children} ) : ( ); })""", + r"""(({node, inline, className, children, ...props}) => { const match = (className || '').match(/language-(?.*)/); let _language = match ? match[1] : ''; ; return inline ? ( {children} ) : ( ); })""", ), ( "h1", diff --git a/tests/units/components/test_component.py b/tests/units/components/test_component.py index 377f98f97..d333a45b4 100644 --- a/tests/units/components/test_component.py +++ b/tests/units/components/test_component.py @@ -651,7 +651,7 @@ def test_create_filters_none_props(test_component): # Assert that the style prop is present in the component's props assert str(component.style["color"]) == '"white"' - assert str(component.style["text-align"]) == '"center"' + assert str(component.style["textAlign"]) == '"center"' @pytest.mark.parametrize( diff --git a/tests/units/utils/test_format.py b/tests/units/utils/test_format.py index 89197a03e..053d5a3ae 100644 --- a/tests/units/utils/test_format.py +++ b/tests/units/utils/test_format.py @@ -189,11 +189,11 @@ def test_to_snake_case(input: str, output: str): ("kebab-case", "kebabCase"), ("kebab-case-two", "kebabCaseTwo"), ("snake_kebab-case", "snakeKebabCase"), - ("_hover", "_hover"), - ("-starts-with-hyphen", "-startsWithHyphen"), - ("--starts-with-double-hyphen", "--startsWithDoubleHyphen"), - ("_starts_with_underscore", "_startsWithUnderscore"), - ("__starts_with_double_underscore", "__startsWithDoubleUnderscore"), + ("_hover", "Hover"), + ("-starts-with-hyphen", "StartsWithHyphen"), + ("--starts-with-double-hyphen", "StartsWithDoubleHyphen"), + ("_starts_with_underscore", "StartsWithUnderscore"), + ("__starts_with_double_underscore", "StartsWithDoubleUnderscore"), (":start-with-colon", ":startWithColon"), (":-start-with-colon-dash", ":StartWithColonDash"), ], From deb1f4f702e3207d3ebe32b3637759cef26e9b35 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 19 Feb 2025 12:43:20 -0800 Subject: [PATCH 141/144] [ENG-4713] Cache pages which add states when evaluating (#4788) * cache order of imports that create BaseState subclasses * Track which pages create State subclasses during evaluation These need to be replayed on the backend to ensure state alignment. * Clean up: use constants, remove unused code Handle closing files with contextmanager * Expose app.add_all_routes_endpoint for flexgen * Include .web/backend directory in backend.zip when exporting --- reflex/app.py | 54 +++++++++++++++++++++++++++++++++-- reflex/config.py | 3 ++ reflex/constants/base.py | 6 ++++ reflex/constants/event.py | 1 + reflex/state.py | 6 ++++ reflex/utils/build.py | 12 ++++++++ reflex/utils/prerequisites.py | 9 ++++++ 7 files changed, 89 insertions(+), 2 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 03382751a..65cb5bfdf 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -100,6 +100,7 @@ from reflex.state import ( StateManager, StateUpdate, _substate_key, + all_base_state_classes, code_uses_state_contexts, ) from reflex.utils import ( @@ -117,6 +118,7 @@ from reflex.utils.imports import ImportVar if TYPE_CHECKING: from reflex.vars import Var + # Define custom types. ComponentCallable = Callable[[], Component] Reducer = Callable[[Event], Coroutine[Any, Any, StateUpdate]] @@ -375,6 +377,9 @@ class App(MiddlewareMixin, LifespanMixin): # A map from a page route to the component to render. Users should use `add_page`. _pages: Dict[str, Component] = dataclasses.field(default_factory=dict) + # A mapping of pages which created states as they were being evaluated. + _stateful_pages: Dict[str, None] = dataclasses.field(default_factory=dict) + # The backend API object. _api: FastAPI | None = None @@ -592,8 +597,10 @@ class App(MiddlewareMixin, LifespanMixin): """Add optional api endpoints (_upload).""" if not self.api: return - - if Upload.is_used: + upload_is_used_marker = ( + prerequisites.get_backend_dir() / constants.Dirs.UPLOAD_IS_USED + ) + if Upload.is_used or upload_is_used_marker.exists(): # To upload files. self.api.post(str(constants.Endpoint.UPLOAD))(upload(self)) @@ -603,10 +610,15 @@ class App(MiddlewareMixin, LifespanMixin): StaticFiles(directory=get_upload_dir()), name="uploaded_files", ) + + upload_is_used_marker.parent.mkdir(parents=True, exist_ok=True) + upload_is_used_marker.touch() if codespaces.is_running_in_codespaces(): self.api.get(str(constants.Endpoint.AUTH_CODESPACE))( codespaces.auth_codespace ) + if environment.REFLEX_ADD_ALL_ROUTES_ENDPOINT.get(): + self.add_all_routes_endpoint() def _add_cors(self): """Add CORS middleware to the app.""" @@ -747,13 +759,19 @@ class App(MiddlewareMixin, LifespanMixin): route: The route of the page to compile. save_page: If True, the compiled page is saved to self._pages. """ + n_states_before = len(all_base_state_classes) component, enable_state = compiler.compile_unevaluated_page( route, self._unevaluated_pages[route], self._state, self.style, self.theme ) + # Indicate that the app should use state. if enable_state: self._enable_state() + # Indicate that evaluating this page creates one or more state classes. + if len(all_base_state_classes) > n_states_before: + self._stateful_pages[route] = None + # Add the page. self._check_routes_conflict(route) if save_page: @@ -1042,6 +1060,20 @@ class App(MiddlewareMixin, LifespanMixin): def get_compilation_time() -> str: return str(datetime.now().time()).split(".")[0] + should_compile = self._should_compile() + backend_dir = prerequisites.get_backend_dir() + if not should_compile and backend_dir.exists(): + stateful_pages_marker = backend_dir / constants.Dirs.STATEFUL_PAGES + if stateful_pages_marker.exists(): + with stateful_pages_marker.open("r") as f: + stateful_pages = json.load(f) + for route in stateful_pages: + console.info(f"BE Evaluating stateful page: {route}") + self._compile_page(route, save_page=False) + self._enable_state() + self._add_optional_endpoints() + return + # Render a default 404 page if the user didn't supply one if constants.Page404.SLUG not in self._unevaluated_pages: self.add_page(route=constants.Page404.SLUG) @@ -1343,6 +1375,24 @@ class App(MiddlewareMixin, LifespanMixin): for output_path, code in compile_results: compiler_utils.write_page(output_path, code) + # Write list of routes that create dynamic states for backend to use. + if self._state is not None: + stateful_pages_marker = ( + prerequisites.get_backend_dir() / constants.Dirs.STATEFUL_PAGES + ) + stateful_pages_marker.parent.mkdir(parents=True, exist_ok=True) + with stateful_pages_marker.open("w") as f: + json.dump(list(self._stateful_pages), f) + + def add_all_routes_endpoint(self): + """Add an endpoint to the app that returns all the routes.""" + if not self.api: + return + + @self.api.get(str(constants.Endpoint.ALL_ROUTES)) + async def all_routes(): + return list(self._unevaluated_pages.keys()) + @contextlib.asynccontextmanager async def modify_state(self, token: str) -> AsyncIterator[BaseState]: """Modify the state out of band. diff --git a/reflex/config.py b/reflex/config.py index 296b01805..590b57f46 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -713,6 +713,9 @@ class EnvironmentVariables: # Paths to exclude from the hot reload. Takes precedence over include paths. Separated by a colon. REFLEX_HOT_RELOAD_EXCLUDE_PATHS: EnvVar[List[Path]] = env_var([]) + # Used by flexgen to enumerate the pages. + REFLEX_ADD_ALL_ROUTES_ENDPOINT: EnvVar[bool] = env_var(False) + environment = EnvironmentVariables() diff --git a/reflex/constants/base.py b/reflex/constants/base.py index 7fbcdf18a..0611c7d4c 100644 --- a/reflex/constants/base.py +++ b/reflex/constants/base.py @@ -53,6 +53,12 @@ class Dirs(SimpleNamespace): POSTCSS_JS = "postcss.config.js" # The name of the states directory. STATES = ".states" + # Where compilation artifacts for the backend are stored. + BACKEND = "backend" + # JSON-encoded list of page routes that need to be evaluated on the backend. + STATEFUL_PAGES = "stateful_pages.json" + # Marker file indicating that upload component was used in the frontend. + UPLOAD_IS_USED = "upload_is_used" class Reflex(SimpleNamespace): diff --git a/reflex/constants/event.py b/reflex/constants/event.py index d454e6ea8..7b58c99cf 100644 --- a/reflex/constants/event.py +++ b/reflex/constants/event.py @@ -12,6 +12,7 @@ class Endpoint(Enum): UPLOAD = "_upload" AUTH_CODESPACE = "auth-codespace" HEALTH = "_health" + ALL_ROUTES = "_all_routes" def __str__(self) -> str: """Get the string representation of the endpoint. diff --git a/reflex/state.py b/reflex/state.py index 2689ba910..0f0ba97f9 100644 --- a/reflex/state.py +++ b/reflex/state.py @@ -327,6 +327,9 @@ async def _resolve_delta(delta: Delta) -> Delta: return delta +all_base_state_classes: dict[str, None] = {} + + class BaseState(Base, ABC, extra=pydantic.Extra.allow): """The state of the app.""" @@ -624,6 +627,8 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow): cls._var_dependencies = {} cls._init_var_dependency_dicts() + all_base_state_classes[cls.get_full_name()] = None + @staticmethod def _copy_fn(fn: Callable) -> Callable: """Copy a function. Used to copy ComputedVars and EventHandlers from mixins. @@ -4087,6 +4092,7 @@ def reload_state_module( for subclass in tuple(state.class_subclasses): reload_state_module(module=module, state=subclass) if subclass.__module__ == module and module is not None: + all_base_state_classes.pop(subclass.get_full_name(), None) state.class_subclasses.remove(subclass) state._always_dirty_substates.discard(subclass.get_name()) state._var_dependencies = {} diff --git a/reflex/utils/build.py b/reflex/utils/build.py index 9e35ab984..c02a30c7b 100644 --- a/reflex/utils/build.py +++ b/reflex/utils/build.py @@ -60,6 +60,7 @@ def _zip( dirs_to_exclude: set[str] | None = None, files_to_exclude: set[str] | None = None, top_level_dirs_to_exclude: set[str] | None = None, + globs_to_include: list[str] | None = None, ) -> None: """Zip utility function. @@ -72,6 +73,7 @@ def _zip( dirs_to_exclude: The directories to exclude. files_to_exclude: The files to exclude. top_level_dirs_to_exclude: The top level directory names immediately under root_dir to exclude. Do not exclude folders by these names further in the sub-directories. + globs_to_include: Apply these globs from the root_dir and always include them in the zip. """ target = Path(target) @@ -103,6 +105,13 @@ def _zip( files_to_zip += [ str(root / file) for file in files if file not in files_to_exclude ] + if globs_to_include: + for glob in globs_to_include: + files_to_zip += [ + str(file) + for file in root_dir.glob(glob) + if file.name not in files_to_exclude + ] # Create a progress bar for zipping the component. progress = Progress( @@ -160,6 +169,9 @@ def zip_app( top_level_dirs_to_exclude={"assets"}, exclude_venv_dirs=True, upload_db_file=upload_db_file, + globs_to_include=[ + str(Path(constants.Dirs.WEB) / constants.Dirs.BACKEND / "*") + ], ) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 145b5324c..b5987f4e8 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -99,6 +99,15 @@ def get_states_dir() -> Path: return environment.REFLEX_STATES_WORKDIR.get() +def get_backend_dir() -> Path: + """Get the working directory for the backend. + + Returns: + The working directory. + """ + return get_web_dir() / constants.Dirs.BACKEND + + def check_latest_package_version(package_name: str): """Check if the latest version of the package is installed. From 6e4522c15c40522c61ef12b9e96dbbd796851528 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 19 Feb 2025 14:46:53 -0800 Subject: [PATCH 142/144] react 19 time (#4848) * react 19 time * idk why * better default for resolvedColorMode * remove prints --- .../reflex/radix_themes_color_mode_provider.js | 4 +++- reflex/constants/installer.py | 9 ++++----- tests/integration/test_event_chain.py | 11 ----------- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js b/reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js index 823eeea99..1f7157551 100644 --- a/reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +++ b/reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js @@ -10,7 +10,9 @@ import { export default function RadixThemesColorModeProvider({ children }) { const { theme, resolvedTheme, setTheme } = useTheme(); const [rawColorMode, setRawColorMode] = useState(defaultColorMode); - const [resolvedColorMode, setResolvedColorMode] = useState("dark"); + const [resolvedColorMode, setResolvedColorMode] = useState( + defaultColorMode === "dark" ? "dark" : "light" + ); useEffect(() => { if (isDevMode) { diff --git a/reflex/constants/installer.py b/reflex/constants/installer.py index 0a89240b3..ace83c59f 100644 --- a/reflex/constants/installer.py +++ b/reflex/constants/installer.py @@ -178,16 +178,15 @@ class PackageJson(SimpleNamespace): PATH = "package.json" DEPENDENCIES = { - "@babel/standalone": "7.26.6", "@emotion/react": "11.14.0", "axios": "1.7.9", "json5": "2.2.3", - "next": "15.1.6", + "next": "15.1.7", "next-sitemap": "4.2.3", "next-themes": "0.4.4", - "react": "18.3.1", - "react-dom": "18.3.1", - "react-focus-lock": "2.13.5", + "react": "19.0.0", + "react-dom": "19.0.0", + "react-focus-lock": "2.13.6", "socket.io-client": "4.8.1", "universal-cookie": "7.2.2", } diff --git a/tests/integration/test_event_chain.py b/tests/integration/test_event_chain.py index df571e884..98a80b7d4 100644 --- a/tests/integration/test_event_chain.py +++ b/tests/integration/test_event_chain.py @@ -493,11 +493,6 @@ async def test_event_chain_on_load( "/on-mount-return-chain", [ "on_load_return_chain", - "event_arg:unmount", - "on_load_return_chain", - "event_arg:1", - "event_arg:2", - "event_arg:3", "event_arg:1", "event_arg:2", "event_arg:3", @@ -509,12 +504,6 @@ async def test_event_chain_on_load( [ "on_load_yield_chain", "event_arg:mount", - "event_no_args", - "on_load_yield_chain", - "event_arg:mount", - "event_arg:4", - "event_arg:5", - "event_arg:6", "event_arg:4", "event_arg:5", "event_arg:6", From 96086bcb0cd9e2870dfef5932b963e61db115c3f Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 19 Feb 2025 15:09:13 -0800 Subject: [PATCH 143/144] change error connecting to backend when backend is cold started (#4814) * change error connecting to backend when backend is cold started * do as simon wanted * prefix with REFLEX --- reflex/components/core/banner.py | 40 ++++++++++++++++++++++++++++---- reflex/config.py | 6 +++++ 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/reflex/components/core/banner.py b/reflex/components/core/banner.py index d96f1655a..1fc631616 100644 --- a/reflex/components/core/banner.py +++ b/reflex/components/core/banner.py @@ -17,6 +17,7 @@ from reflex.components.radix.themes.components.dialog import ( from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.components.sonner.toast import Toaster, ToastProps +from reflex.config import environment from reflex.constants import Dirs, Hooks, Imports from reflex.constants.compiler import CompileVars from reflex.utils.imports import ImportVar @@ -109,9 +110,41 @@ class ConnectionToaster(Toaster): id=toast_id, ) # pyright: ignore [reportCallIssue] + if environment.REFLEX_DOES_BACKEND_COLD_START.get(): + loading_message = Var.create("Backend is starting.") + backend_is_loading_toast_var = Var( + f"toast.loading({loading_message!s}, {{...toast_props, description: '', closeButton: false, onDismiss: () => setUserDismissed(true)}},)" + ) + backend_is_not_responding = Var.create("Backend is not responding.") + backend_is_down_toast_var = Var( + f"toast.error({backend_is_not_responding!s}, {{...toast_props, description: '', onDismiss: () => setUserDismissed(true)}},)" + ) + toast_var = Var( + f""" +if (waitedForBackend) {{ + {backend_is_down_toast_var!s} +}} else {{ + {backend_is_loading_toast_var!s}; +}} +setTimeout(() => {{ + if ({has_too_many_connection_errors!s}) {{ + setWaitedForBackend(true); + }} +}}, {environment.REFLEX_BACKEND_COLD_START_TIMEOUT.get() * 1000}); +""" + ) + else: + loading_message = Var.create( + f"Cannot connect to server: {connection_error}." + ) + toast_var = Var( + f"toast.error({loading_message!s}, {{...toast_props, onDismiss: () => setUserDismissed(true)}},)" + ) + individual_hooks = [ f"const toast_props = {LiteralVar.create(props)!s};", "const [userDismissed, setUserDismissed] = useState(false);", + "const [waitedForBackend, setWaitedForBackend] = useState(false);", FunctionStringVar( "useEffect", _var_data=VarData( @@ -127,10 +160,7 @@ class ConnectionToaster(Toaster): () => {{ if ({has_too_many_connection_errors!s}) {{ if (!userDismissed) {{ - toast.error( - `Cannot connect to server: ${{{connection_error}}}.`, - {{...toast_props, onDismiss: () => setUserDismissed(true)}}, - ) + {toast_var!s} }} }} else {{ toast.dismiss("{toast_id}"); @@ -139,7 +169,7 @@ class ConnectionToaster(Toaster): }} """ ), - LiteralArrayVar.create([connect_errors]), + LiteralArrayVar.create([connect_errors, Var("waitedForBackend")]), ), ] diff --git a/reflex/config.py b/reflex/config.py index 590b57f46..85f3827c1 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -713,6 +713,12 @@ class EnvironmentVariables: # Paths to exclude from the hot reload. Takes precedence over include paths. Separated by a colon. REFLEX_HOT_RELOAD_EXCLUDE_PATHS: EnvVar[List[Path]] = env_var([]) + # Enables different behavior for when the backend would do a cold start if it was inactive. + REFLEX_DOES_BACKEND_COLD_START: EnvVar[bool] = env_var(False) + + # The timeout for the backend to do a cold start in seconds. + REFLEX_BACKEND_COLD_START_TIMEOUT: EnvVar[int] = env_var(10) + # Used by flexgen to enumerate the pages. REFLEX_ADD_ALL_ROUTES_ENDPOINT: EnvVar[bool] = env_var(False) From c2917d46d535d87635aed842d10cc67d3943c531 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 19 Feb 2025 22:06:13 -0800 Subject: [PATCH 144/144] simplify and fix set_color_mode (#4852) * simplify and fix set_color_mode * woops --- reflex/style.py | 27 +++++++------------ .../tests_playwright/test_appearance.py | 2 +- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/reflex/style.py b/reflex/style.py index 00dc16839..a3058521c 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -6,7 +6,7 @@ from typing import Any, Literal, Tuple, Type from reflex import constants from reflex.components.core.breakpoints import Breakpoints, breakpoints_values -from reflex.event import EventChain, EventHandler +from reflex.event import EventChain, EventHandler, EventSpec, run_script from reflex.utils import format from reflex.utils.exceptions import ReflexError from reflex.utils.imports import ImportVar @@ -49,9 +49,9 @@ def _color_mode_var(_js_expr: str, _var_type: Type = str) -> Var: def set_color_mode( - new_color_mode: LiteralColorMode | Var[LiteralColorMode] | None = None, -) -> Var[EventChain]: - """Create an EventChain Var that sets the color mode to a specific value. + new_color_mode: LiteralColorMode | Var[LiteralColorMode], +) -> EventSpec: + """Create an EventSpec Var that sets the color mode to a specific value. Note: `set_color_mode` is not a real event and cannot be triggered from a backend event handler. @@ -60,24 +60,15 @@ def set_color_mode( new_color_mode: The color mode to set. Returns: - The EventChain Var that can be passed to an event trigger. + The EventSpec Var that can be passed to an event trigger. """ base_setter = _color_mode_var( _js_expr=constants.ColorMode.SET, - _var_type=EventChain, + ).to(FunctionVar) + + return run_script( + base_setter.call(new_color_mode), ) - if new_color_mode is None: - return base_setter - - if not isinstance(new_color_mode, Var): - new_color_mode = LiteralVar.create(new_color_mode) - - return Var( - f"() => {base_setter!s}({new_color_mode!s})", - _var_data=VarData.merge( - base_setter._get_all_var_data(), new_color_mode._get_all_var_data() - ), - ).to(FunctionVar, EventChain) # Var resolves to the current color mode for the app ("light", "dark" or "system") diff --git a/tests/integration/tests_playwright/test_appearance.py b/tests/integration/tests_playwright/test_appearance.py index 0b1440ed1..a6a882c25 100644 --- a/tests/integration/tests_playwright/test_appearance.py +++ b/tests/integration/tests_playwright/test_appearance.py @@ -61,7 +61,7 @@ def ColorToggleApp(): rx.icon(tag="moon", size=20), value="dark", ), - on_change=set_color_mode(), + on_change=set_color_mode, # pyright: ignore[reportArgumentType] variant="classic", radius="large", value=color_mode,