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
445fd1c89a
Renamed NodeAttachEffect to ObjectAttachEffect.
...
Made `ObjectAttachEffect` work on all types such that `AsRef<Object>`.
2024-02-06 13:35:30 +00:00
554b4f6429
Added fmt::Debug impl for WeakEffect.
2024-02-06 13:34:59 +00:00
7c2ad3d2da
All effects attached by dynatos are bundled in the same array variable.
2024-02-06 13:33:56 +00:00
f32ec1d4ec
Improved dyn child handling of duplicate nodes.
...
Previously it panicked, due to it's invariants being messed with.
However, now, it simply refuses to insert a duplicate node.
If someone else messes with the invariants by removing the existing node, we also recover.
2024-02-06 09:51:54 +00:00
9ab1115f78
Replaced ObjectDefineProperty with ObjectSet.
2024-02-06 09:15:50 +00:00
e3c520afb0
Refactored all wasm_bindgen effect types in dynatos.
2024-02-06 08:34:48 +00:00
e9c4c9ad8b
Added Effect::try_new.
2024-02-06 08:32:51 +00:00
785d782ea9
Added TryOrReturn helper.
2024-02-06 08:30:25 +00:00
3adb2c67aa
Added wrapper for WeakRef.
2024-02-06 08:04:52 +00:00
c563754171
Fixed that .dyn_child would lose the position if the closure returned None.
2024-02-06 07:44:24 +00:00
f319161336
Fixed possible bug with NodeDynChild.
2024-02-05 22:41:53 +00:00
4f63e55653
Added initial support for Signal<impl ?Sized>.
2024-02-05 22:36:08 +00:00
c19c2ecddc
Reduced size of Signal.
...
With the previous commit, it doubled, since it had to store 2 `Rc`s, but now it stores just one.
2024-02-05 19:55:55 +00:00