Commit Graph

1892 Commits

Author SHA1 Message Date
Elijah
4b35680409 minor refactor 2024-10-22 15:04:31 +00:00
Elijah
89b3891be8 the transformer trigger regex should remove the language comment character 2024-10-22 15:04:31 +00:00
Elijah
4ba277cea5 sneaky pyright ignore 2024-10-22 15:04:31 +00:00
Elijah
f20b32b129 add unit tests 2024-10-22 15:04:31 +00:00
Elijah
fa9b192b41 pyi fix 2024-10-22 15:04:31 +00:00
Elijah
d1cd68d16d fix pyright 2024-10-22 15:04:31 +00:00
Elijah
8e0044d856 linter 2024-10-22 15:04:31 +00:00
Elijah
38f396677d minor refactor 2024-10-22 15:04:31 +00:00
Elijah
860449f814 strip transformer triggers 2024-10-22 15:04:31 +00:00
Carlos
e6cb4185b2 [ENG-3895] [ENG-3896] Update styling for shiki code block 2024-10-22 15:04:31 +00:00
Elijah
e3cbe79c53 unit test file commit 2024-10-22 15:04:31 +00:00
Elijah
10e144ddce add hack for reflex-web/flexdown 2024-10-22 15:04:31 +00:00
Elijah
f6495a6448 minimal update of theme and language map 2024-10-22 15:04:31 +00:00
Elijah
3c892f842d fix pyi and annotations 2024-10-22 15:04:31 +00:00
Elijah
801ed8419f see if this fixes the tests 2024-10-22 15:04:31 +00:00
Elijah
46c8096645 python 3.9+ 2024-10-22 15:04:31 +00:00
Elijah
b0f6e9f626 fix mapping 2024-10-22 15:04:31 +00:00
Elijah
fd16a49aa2 fix mapping 2024-10-22 15:04:31 +00:00
Elijah
a896a2f340 add a high-level component 2024-10-22 15:04:31 +00:00
Elijah
03158b6241 fix ruff 2024-10-22 15:04:31 +00:00
Elijah
e5d9a560d8 fix components paths 2024-10-22 15:04:31 +00:00
Elijah
1443c67206 some validations 2024-10-22 15:04:31 +00:00
Elijah
5ffa09fb8d add transformers to namespace 2024-10-22 15:04:31 +00:00
Elijah
48609783ed remove console.log 2024-10-22 15:04:31 +00:00
Elijah
d1e2d7c5f1 update code 2024-10-22 15:04:30 +00:00
Elijah
955c53add3 refactor 2024-10-22 15:04:30 +00:00
Elijah
9025d72dad Shiki Code block Experimental 2024-10-22 15:04:30 +00:00
Khaleel Al-Adhami
c103ab5e28
Add type hinting to dataeditor events (#4210) 2024-10-21 18:53:51 -07:00
Khaleel Al-Adhami
3ab750fecd
add event types to suneditor (#4209) 2024-10-21 18:17:27 -07:00
Khaleel Al-Adhami
45959881ac
add type hinting to error boundary (#4182)
* add type hinting to error boundary

* remove logFrontendError

* fix other calls to handle_frontend_exception
2024-10-21 18:17:06 -07:00
Khaleel Al-Adhami
54ad9f0f4b
make var system expandable (#4175)
* make var system expandable

* use old syntax

* remove newer features

* that's a weird error

* remove unnecessary error message

* remove hacky getattr as it's no longer necessary

* improve color handling

* get it right pyright

* dang it darglint

* fix prototype to string

* don't try twice

* adjust test case

* add test for var alpha

* change place of type ignore

* fix json

* add name to custom var operation

* don't delete that you silly

* change logic

* remove extra word
2024-10-21 17:05:13 -07:00
Khaleel Al-Adhami
f39e8c9667
move all environment variables to the same place (#4192)
* move all environment variables to the same place

* reorder things around

* move more variables to environment

* remove cyclical imports

* forgot default value for field

* for some reason type hints aren't being interpreted

* put the field type *before* not after

* make it get

* move a bit more

* add more fields

* move reflex dir

* add return

* put things somewhere else

* add custom error
2024-10-21 13:28:55 -07:00
Masen Furer
c05da488f9
Raise TypeError when ComputedVar.__init__ gets bad kwargs (#4199)
It's easy to mis-spell `rx.var(cached=True)` instead of `rx.var(cache=True)`,
and in 0.6.3, this doesn't actual raise an error... the bad value is silently
discarded and the var is NOT marked as being cached.
2024-10-21 12:56:56 -07:00
Thomas Brandého
7168b42bab
versions bump before 0.6.4 (#4208) 2024-10-21 12:56:36 -07:00
benedikt-bartscher
7560bf6429
allow setting run mode via env, add helpers to determine it (#4168) 2024-10-21 12:26:09 -07:00
Khaleel Al-Adhami
fcc97b0402
upgrade node to latest lts (#4191) 2024-10-21 12:11:00 -07:00
Masen Furer
6cb87a812f
Fix runtime error on python 3.11.0 (#4197)
All generic types present in a Union must be parametrized on 3.11.0 if any
other generic types in the union are parametrized.

This appears to be a bug in 3.11.0, as the behavior is not observed in 3.11.1
or 3.10; fixing here as this is technically more correct anyway and avoids a
crash.
2024-10-17 19:21:43 -07:00
Masen Furer
330c280c78
When REDIS_URL is set, use redis, regardless of config preference. (#4196)
We might change this down the road, but we don't want to introduce a breaking
change at this time.
2024-10-17 16:54:36 -07:00
Masen Furer
e14c79d57d
[ENG-3954] Treat ArrayVar.foreach index as int (#4193)
* [ENG-3954] Treat ArrayVar.foreach index as int

* foreach: convert return value to a Var

When the value returned from the foreach is not hashable (mutable type), then
it will raise an exception if it is not first converted to a LiteralVar.
2024-10-17 16:16:24 -07:00
Khaleel Al-Adhami
101fb1b540
check for none before returning which (#4187) 2024-10-16 15:21:47 -07:00
Khaleel Al-Adhami
35810fe1bd
use larger or equal for node version check (#4189) 2024-10-16 15:20:51 -07:00
Khaleel Al-Adhami
d8ea2fc795
fix pyi for untyped event handlers (#4186)
* fix pyi for untyped event handlers

* no more empty lambdas
2024-10-16 13:39:49 -07:00
Alek Petuskey
13c9094343
Remove demo command (#4176)
* Remove demo command

* Format

---------

Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
2024-10-16 11:35:56 -07:00
Masen Furer
da9d7eabdd
Arbitrary arg access two levels deep for untyped handler (#4180)
* Arbitrary arg access two levels deep for untyped handler

Provide drop-in compatibility with existing component wrapping code
that was accessing attributes on the default handler arg type.

* py3.9 compat
2024-10-16 11:35:27 -07:00
Masen Furer
4422515f4b
LiteralEventChainVar becomes an ArgsFunctionOperation (#4174)
* LiteralEventChainVar becomes an ArgsFunctionOperation

Instead of using the ArgsFunctionOperation to create the string representation
of the _js_expr, make the identity of the var an ArgsFunctionOperation so the
_args_names and _return_expr remain accessible.

Rely on the default behavior of ArgsFunctionOperation to create the
_cached_var_name / _js_expr value.

This allows the compat shim in `format_event_chain` to remain functional, as it
does special handling for ArgsFunctionOperation to retain the previous behavior
of that function (this was a regression introduced in 0.6.2).

* _var_type is EventChain; fix parent class order

* Re-fix LiteralEventChainVar inheritence list w/ comment

* [ENG-3942] LiteralEventVar becomes VarCallOperation

instead of using `.call` when constructing the `_js_expr`, have the identity of
a LiteralEventVar as a VarCallOperation to take advantage of the _var_data
carrying.

* add event overlords

* EventCallback descriptor always returns EventSpec from class

Relax actual `__get__` definition to support the multitude of overloads

* test case for event related vars carrying _var_data

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-10-16 11:35:09 -07:00
Khaleel Al-Adhami
7565ae15ef
disk is memory is disk (#4185) 2024-10-16 11:31:05 -07:00
Khaleel Al-Adhami
2018be8e08
only treat dict object vars as key value mapping (#4177) 2024-10-15 12:21:03 -07:00
Masen Furer
5b802c2c9e
bump version to 0.6.4dev1 for further development (#4178) 2024-10-15 10:54:14 -07:00
Masen Furer
3a14025999
pin AppHarness tests to ubuntu-22.04 runner (#4173) 2024-10-14 15:36:30 -07:00
Manoj Bhat
d6797a1f1d
Change the defalut direction of radio group (#4070). (#4146)
- The default direction of radio groups is column.
- Since most use cases are horizontal, change the default direction from
  column to row.
2024-10-14 08:47:38 -07:00