Commit Graph

116 Commits

Author SHA1 Message Date
89feb380c5 Simplified bounds on EventTargetAddListener.
This allows removing explicit type annotations for event handlers, which was required before, sometimes.
2024-02-20 03:10:06 +00:00
c3c32f7de5 Added ElementAddListener to be able to easily use an element's type on event listeners. 2024-02-19 08:53:55 +00:00
e26d261069 Improved bounds on EventTargetAddListener. 2024-02-19 08:42:51 +00:00
9751c74501 Added the ability for custom element types in dynatos_html::html. 2024-02-19 08:39:11 +00:00
5240c097a8 ObjectDynProp now receives anything that implements ToDynProp. 2024-02-19 08:30:18 +00:00
7f98f4c927 Removed ObjectDynProp::add_dyn_prop. 2024-02-19 08:23:44 +00:00
dd4a74a2dd Added remaining headers <h2> through <h6> to dynatos_html::html. 2024-02-19 06:54:53 +00:00
4ce1529107 Fixed ObjectDynProp::add_dyn_prop not behaving properly with multiple keys. 2024-02-19 04:48:39 +00:00
c26348426a Extracted ObjectDynProp::with_* to a new trait. 2024-02-19 04:35:35 +00:00
c4d52a8023 Extracted NodeDynText::with_dyn_text to a new trait. 2024-02-19 04:31:59 +00:00
eeecefa35d Extracted NodeDynChild::with_dyn_child to a new trait. 2024-02-19 04:30:49 +00:00
a89ef03182 Extracted ElementDynAttr::with_* to a new trait. 2024-02-19 04:29:35 +00:00
6fc5984344 Extracted ObjectAttachEffect::with_effect to a new trait. 2024-02-19 04:26:39 +00:00
9ca824015f Added dynatos::ObjectAttachContext. 2024-02-19 04:22:39 +00:00
38cb0ca46c Added dynatos_context::OpaqueHandle. 2024-02-19 04:22:17 +00:00
9077404cf0 Fixed effects map being called an array in some places. 2024-02-19 04:07:19 +00:00
2740552a53 Removed dynatos-logger. 2024-02-18 01:32:55 +00:00
5e82c61b3a Updated to rustc 1.78.0-nightly (bccb9bbb4 2024-02-16). 2024-02-18 01:28:16 +00:00
3a23c58b9a Removed dynatos::dyn_element.
It was a bad approach to a problem, and had edge cases relating to what happened to the returned node if modified.
In the end, the only correct way to do it was to append it as a child and not touch it anymore, although `with_dyn_child` exists for that.
2024-02-16 20:14:25 +00:00
d333a5e1e7 Added some prefixes to uncommon extension function in dynatos. 2024-02-16 20:12:29 +00:00
421e13c7ac Generalized WithDynText for Option<impl WithDynText>. 2024-02-16 20:00:13 +00:00
e81d60c6eb Replaced AsOptNode and AsDynNode with ToDynNode.
The clone would be necessary anyway inside of `dyn_child`.
2024-02-16 19:58:15 +00:00
2dd47c60d5 Separated items in dynatos into their own modules. 2024-02-16 19:45:51 +00:00
f33dcffb67 WithDynText now supports Signal and Derived. 2024-02-16 19:31:19 +00:00
b6223f0681 Replaced AsOptText and AsDynText with WithDynText. 2024-02-16 19:26:42 +00:00
8fd25d7d0f dyn_text now receives anything that implements AsDynText. 2024-02-16 19:19:45 +00:00
2e175babd1 Added SignalCloned. 2024-02-16 19:02:47 +00:00
2596868670 Removed function argument from with_event_listener.
Separated `with_event_listener` to it's own trait.
2024-02-16 17:15:44 +00:00
0cac908b61 Renamed with_text_content to with_text. 2024-02-16 17:11:10 +00:00
eab0e669c3 Added dynatos-title to manage the document title. 2024-02-16 16:44:48 +00:00
ede516500a Fixed wrong term being used in with_effect. 2024-02-16 16:32:13 +00:00
8167e43365 Separated ObjectSetProp::with_prop to it's own trait, so it can be implemented on any type that is an object. 2024-02-16 16:29:52 +00:00
d661629ee8 Added ObjectDynProp. 2024-02-16 16:02:26 +00:00
f010fa0401 Added ObjectRemoveProp. 2024-02-16 15:22:11 +00:00
62b391d318 Renamed ObjectSet to `ObjectSetProp 2024-02-16 15:12:19 +00:00
38bbd90ac2 dyn_child now receives anything that implements AsDynNode. 2024-02-16 15:04:16 +00:00
b958d581c2 NodeWithChildren now supports &[C] and Vec<C>. 2024-02-16 13:54:35 +00:00
e4f0efbbf5 Fixed with_dyn_child being more restrictive than dyn_child. 2024-02-16 13:04:48 +00:00
033355dad4 Added all current html tags to dynatos_html::html.
Tags in `dynatos_html::html` now use `createElementNS` with the html namespace.
2024-02-16 12:53:31 +00:00
da19e1c801 Improved dynatos_html::html::decl_elements macro. 2024-02-16 12:41:05 +00:00
8b504329a4 Added dynatos_reactive::Derived. 2024-02-16 12:31:48 +00:00
6612e831c9 Added Input event to dynatos_util::EventTargetAddListener. 2024-02-15 22:21:37 +00:00
6cfe0a1ec0 Improved some backtrace locations for panics in dynatos-context. 2024-02-15 21:35:13 +00:00
a49c8f45f0 Added dynatos::dyn_element. 2024-02-15 20:47:10 +00:00
fdce90882b Added warnings when adding an existing child to a node when using NodeWithChildren. 2024-02-15 20:45:09 +00:00
d052afe309 The effect stack now only stores WeakEffect.
This is to avoid cloning effects as much, so that we can debug reactivity issues.
It doesn't help with correctness, since effects should always be pushed and popped within a small scope, so no lifetime issues exist.
2024-02-06 18:35:55 +00:00
a5822b96e1 ObjectAttachEffect now de-duplicates the effects, to avoid blow up. 2024-02-06 15:05:25 +00:00
1e85e99aa0 Added Effect::inner_ptr. 2024-02-06 15:04:45 +00:00
07f249b1aa Effect now implements {PartialEq, Eq, Hash}. 2024-02-06 15:01:42 +00:00
58b235f55f Added dynatos_util::hash_of 2024-02-06 15:01:18 +00:00