When exporting an global multiple times under different names, make sure
that they alias in the generated code.
As a consequence, the compiler maintains the original unique name and in
Rust and C++ makes only the exported names public. In the interpreter
the internal name is theoretically still accessible from the outside.
That's the more typical use-case to also deal with name spaces, where
this is done at import time.
The modified test case tries to ensure that this also works.
When trying to reference an instance of a repeated item, for use with
ItemRc or VRef<Item>, the item_index (or id) of the ElementRc is not
directly what we want.
Adjust any element references to the repeater to to the inner instance
after creating them. Also make sure that the enclosing component is
respected in the C++ and Rust generators.
Fixes#422
We should not increase the priority when merging two way binding, only when
inlining.
This fixes the iot-dashboard's devices widget which were sometimes not
transparent as they should have been.
This was not deterministic because the order in which the two way binding are
merged is not deterministic because of hash table, and sometimes one binding
ended up having a higher priority as it should have had.
In Exports::from_node() we use parser::identifier_text to extract the
names, which are normalized (with dashes). We need to do the same in
ImportedName::from_node() in order to allow something like
export Main_Window := ...
and then
import { Main-Window } from "foo.60";
or even just
import { Main_Window } from "foo.60";
(that regressed)
As a result
- The error messages will now show the error with `-` instead of `_`
- The LSP will auto-complete with -
- The interpreter's list of properties will list the property with '-'
(but we made the change so that set_property, get_property, and so on
work also if passed a '-')
Commit 064c39d625 introduced the regression that
if a two-way binding was set on a property that we'd also set a default geometry
on, we'd end up applying that on the two-way binding, causing a binding loop.
set_binding_if_not_set needs to only set the binding if... there's really none yet.
Fixes#385
When an element gets its width and height from the parent through an implicit 100% binding,
those bindings were missing when an animation was pre-defined.
The provided new-type wrapper offers a function to deal with replacing just
binding expression, instead of the
expression *and* the animation.
Fixes#376
The cursor navigation left/right (and subsequently text selection) needs
to respect grapheme boundaries. Since we already depend on the
unicode-segmentation crate through femtovg, we might as well use the
functionality for determining grapheme boundaries from there.
The only place where the cursor navigation is allowed to break that is
when using backspace, as that allows the user to break glyph clusters.
When there is an animaiton but no expression, the binding is
left with an invalid expression.
State was keeping that invalid expression as part of sub expression
this is a regression since commit ba32777cab