* 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
* 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
* 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
* 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
* 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
* 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 <khaleel.aladhami@gmail.com>
* use position in vardata to mark internal hooks
* update all render to use position
* use macros for rendering
* reduce number of iterations over hooks during rendering
* cleanup code and add typing
* add __future__
* use new macros to render component maps in markdown
* remove calls to _get_all_hooks_internal
* fix typo
* forgot to replace this
* unnecessary expand in utils.py
The ability to convert `EventType` arguments into `EventChain` is crucial for
wrapping JS libraries that need to pass event handlers via hooks or
other non-component centric interfaces.
Improve typing such that wrapped components accepting `EventType` arguments can
be directly converted to `EventChain` / `EventChainVar` to be rendered as JS
code.
* fix memoized event trigger order
* allow to declare deps in event signature for memoized event triggers
* clean up the code to pass tests
* handle position of hooks
* clean up code
* revert test changes
* add future annotations
* remove non-necessary stuff
* reuse data_callback name if already set during first call to add_hooks
* remove HookVar and use Var with VarData instead
* remove test change
* readd removed line
* fix order of stmt for cleaner code
* fix typing
* something broke during the merge I guess
* remove hack and pass proper const for position
* oops, bad syntax in jinja
* use "hook_position" instead of "hook_positions"
match the name of the enum
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* add eradicate rules for commented out code
* remove output change
* fix pyi messed up indent
* fix pyi again
* fix layout docstring
* fix pyi_generator to remove commented out props from docs
* fix pyi_generator and regenerate some pyi
* fix double strip
* update all pyi
* try to fix stuff in pyi_gen
* whatever
* remove that maybe? i don't know
* fix that shit?
* fix more shit, idk
* better not see you ever again, extra line
* type check for event handler if spec arg are typed
* fix the typecheck logic
* rearrange logic pieces
* add try except
* add try except around compare
* change form and improve type checking
* print key instead
* dang it darglint
* change wording
* add basic test to cover it
* add a slightly more complicated test
* challenge it a bit by doing small capital list
* add multiple argspec
* fix slider event order
* i hate 3.9
* add note for UnionType
* move function to types
* add a test for type hint is subclass
* make on submit dict str any
* add testing for dict cases
* add check against any
* accept dict str str
* bruh i used i twice
* escape strings and print actual error message
* disable the error and print deprecation warning instead
* disable tests
* fix doc message
---------
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* component as literal vars
* fix pyi
* use render
* fix pyi
* only render once
* add type ignore
* fix upload default value
* remove testcases if you don't pass them
* improve behavior
* fix render
* that's not how icon buttons work
* upgrade to next js 15 and remove babel and enable turbo
* upload is a silly guy
* woops
* how did this work before
* set env variable
* lower it even more
* lower it even more
* lower it even more
* only do literals as component vars
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.
* 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
* 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 🙄
* allow classname to be state vars
* simplify join with all literal string vars
* add test case and avoid concat var operation if it's not necessary
* remove silly print statement
* simplify case where there's no var
* don't automatically do class name str to literal var