Our copy paste is able to merge breakpoints so we can leverage it when
generate new component template. Here instead of passing base breakpoint
id I invoke insertWebstudioFragmentCopy with generated breakpoint which
is merged into project one.
Also switched plugin-embed, plugin-markdown and ai to use the same
insertWebstudioFragmentCopy utility.
We can start using testing utilities for components meta. It will
drastically simplify maintenance of components, already works pretty
well for tests.
Here just replaced @webstudio-is/sdk/testing with
@webstudio-is/template.
Turns our delete does not clear instances when detachable check fails.
Good news: new child constraints were added only to tabs. Bad news: I
think deleting pages kept instances in the build, oops.
Fixed reparent and added checks for delete only where necessary.
How to test
- insert tabs content
- delete second trigger and content
- reposition trigger
- it is duplicated
Replaced legacy utilities with matchers
List item no longer possible to place into list item, thanks to new
parent matcher.
Dnd in navigator and on canvas can be tested
Here added new constraints format which will allow us build more
expressive lookups and matchers for internal logic and components
constraints.
For now added only ancestor, parent and self matchers with $eq, $neq,
$in, $nin operations.
Closes https://github.com/webstudio-is/webstudio/issues/2193 "$in"
operation works like "or".
Here replaced a bunch boilerplaty code with more general
findClosestInsertable. This also reduced amount of explicit instance
selector calls. Prevented inserting list item into body. Refactored
tests with jsx.