* Temporarily downpin @radix-ui/themes <3.1.5
A visual/style regression was introduced in @radix-ui/themes 3.1.5
as described in radix-ui/themes#627 which reflex needs to avoid.
* Get expected radix library version from component
* Codeblock cleanup in markdown
* Initial approach to getting this working with rx.memo and reflex web
* abstract the map var logic
* the tests are not valid + pyright fix
* darglint fix
* Add unit tests plus mix components
* pyi run
* rebase on main
* fix darglint
* testing different OS
* revert
* This should fix it. Right?
* Fix tests
* minor fn signature fix
* use ArgsFunctionOperation
* use destructured args and pass the tests
* fix remaining unit tests
* fix pyi files
* rebase on main
* move language regex on codeblock to markdown
* fix tests
---------
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* allow for event handlers to ignore args
* use a constant
* dang it darglint
* forgor
* keep the tests but move them to valid place
* add metainfo to keyevent
* format code
* fix pyi files
* generate all prefixes of event types
* change format rule
* 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
* refactor - ruff broke the imports..
* cleanup imports
* more
* add internal and enum env var support
* ruff cleanup
* more global imports
* revert telemetry, it lives in rx.Config
* minor fixes/cleanup
* i missed some refs
* fix darglint
* reload config is internal
* fix EnvVar name
* add test for EnvVar + minor typing improvement
* bool tests
* was this broken?
* retain old behavior
* migrate APP_HARNESS_HEADLESS to new env var system
* migrate more APP_HARNESS env vars to new config system
* migrate SCREENSHOT_DIR to new env var system
* refactor EnvVar.get to be a method
* readd deleted functions and deprecate them
* improve EnvVar api, cleanup RELOAD_CONFIG question
* move is_prod_mode back to where it was
* improve object var symantics
* add case for serializers
* check against serializer with to = dict
* add tests
* fix typing issues
* remove default value
* older version of python doesn't have assert type
* add base to rx field cases
* get it from typing_extension
* Refactor initialize_gitignore to support list type for files_to_ignore and improve current ignore handling. Dont sort the gitignore file.
* more consistent list comprehension var
* raise error when get package manager is not found
* add escape hatch
* handle installing frontend packages more gracefully
* fix no return
* dang it darglint
* [ENG-1104] patch `json.dumps` to handle `__wrapped__` objects
Unwrap proxied objects if the default serializer doesn't work.
* pre-commit fixup
* Skip default fallback logic when `cls` is specified
`cls` will provide its own default serialization mechanism, passing a `cls`
Encoder class is now also a way to opt-out of our patching shenanigans and just
use your own code.
This will work, provided the library doing the JSON encoding isn't also using
their own custom class.
* Override JSONEncoder.default instead of json.dumps
Many libraries (like httpx, used by openai), will use `from json import dumps`,
and if they do that before `reflex.state` gets imported, then they will get the
original dumps function instead of our patched one.
To workaround this, monkeypatch the `JSONEncoder.default` function instead.
This is also nicer behavior for custom subclasses of JSONEncoder; if someone
wants to opt-out of our monkeypatching, they can simply not call
`super().default(o)` in their subclass, which by default only raises a
TypeError.
---------
Co-authored-by: Nikhil Rao <nikhil@reflex.dev>