* add existing path subclass for env checks
* use the power of dataclasses
* use metaclass
* fake the class name
* use annotated
* use flag instead of dict
* dang it darglint
* cleanups
These props are NOT event triggers themselves, but rather they are props that
expect a list or dict of event handlers.
Additional fix for calling an `@rx.event` decorated event handler with no
arguments.
* [ENG-3970] When normal pickle fails, try dill
If dill is not installed, suggest that the user `pip install` it.
Fix#4147
* re-lock depenedencies
* Include original pickle error message for better debugging
When the pickling throws a warning and dill is not installed, include the
original pickle error.
Add a test case for an object that even dill cannot pickle to ensure error path
is hit as expected.
* py3.9 compatibility
* test for stateless apps
* add playwright to dev dependencies
* fix docstring
* fix install of playwright in CI
* fix install again
* add allowed license
* add retry on running integrations step
* another attempt to fix licensing issue
* update timeout duration for retry
* fix timeout workflows
* remove dep changes
* remove outdated diff
* fix scope in new test and workflow for appharness
* run playwright tests last
* use $ syntax
* missing test case change
* try being a little smart
* improve merge imports logic
* add public as well
* oops missed that one
* last one there
* debounce: handle custom code from child component
Include _get_all_hooks when rendering the child element, instead of just
internal hooks.
* textarea: handle special behaviors during `create`
Move special behavior handling to `create` classmethod to allow carrying of
added props when wrapped in debounce, which does not call `_render` on the
child component.
* fix and test bug in config env loading
* streamline env var interpretation with @adhami3310
* improve error messages, fix invalid value for TELEMETRY_ENABLED
* just a small hint
* ruffing
* fix typo from review
If a non-root state was serialized, but its substates were not, then these
would not be populated when reloading the pickled state, because only substates
from the root were being populated with fresh versions.
Now, capture the substates from all fresh states and apply them to the
deserialized state for each substate to ensure that the entire state tree has
all substates instantiated after deserializing, even substates that were never
serialized originally.
* add on progress typing to react player
* fix pyi file
* have the pyi here as well
* more pyi changes
* fix imports
* run pyi
* for some reason it want event on three lines no clue why
* simplify case for when type is in the same module
* run pyi
* remove last missing type for datadisplay
* Shiki Code block Experimental
* refactor
* update code
* remove console.log
* add transformers to namespace
* some validations
* fix components paths
* fix ruff
* add a high-level component
* fix mapping
* fix mapping
* python 3.9+
* see if this fixes the tests
* fix pyi and annotations
* minimal update of theme and language map
* add hack for reflex-web/flexdown
* unit test file commit
* [ENG-3895] [ENG-3896] Update styling for shiki code block
* strip transformer triggers
* minor refactor
* linter
* fix pyright
* pyi fix
* add unit tests
* sneaky pyright ignore
* the transformer trigger regex should remove the language comment character
* minor refactor
* fix silly mistake
* component mapping in markdown should use the first child for codeblock
* use ternary operator in numbers.py, move code block args to class for docs discoverability
* precommit
* pyright fix
* remove id on copy button animation
* pyright fix for real
* pyi fix
* pyi fix fr
* check if svg exists
* copy event chain
* do a concatenation instead of first child
* added comment
---------
Co-authored-by: Carlos <cutillascarlos@gmail.com>
* 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
* 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
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.
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.
* [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.
* 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
* 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>
* Support aria and data props
* Fix busted docstring
* Ignore special_attributes logic for defined props
* simplify special attribute checking logic
avoid special cases in the special case handling code 🙄
* add type hinting to events
* fix pyi
* make it a list
* add on change
* dang it darglintz
* add future annotations
* add try except becuse i hate this
* add check for class
* aaaa
* sometimes you need to make hard decisions
* ono
* i hate unions
* add rx event
* move stuff around
* maybe
* special case osmething
* i don't need no test
* remove stray print
Co-authored-by: Masen Furer <m_github@0x26.net>
* remove another stray print
Co-authored-by: Masen Furer <m_github@0x26.net>
* add rx event
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* unionize base var fields types
* add tests
* fix union types for vars (#4152)
* remove 3.11 special casing
* special case on version
* fix old versions of python
---------
Co-authored-by: Masen Furer <m_github@0x26.net>