3561 Commits

Author SHA1 Message Date
d1777b7a9e feat: Add a setter for TextBoxComponent.boxConfig and add a convenience method to skip per-char buildup (#3490)
This PR addresses the concerns in
https://github.com/flame-engine/flame/issues/3488
For convenience, here is the relevant text.

> It is a fairly common feature for a game to "type out" dialogue within
a TextBoxComponent (as the behavior would be if timePerChar > 0, but
also allow the user to skip that type-out effect, and display the
dialogue in its entirety (as the behavior would be if timePerChar == 0).

This PR implements a setter for TextBoxComponent.boxConfig, allowing for
the TextBoxConfig to be changed after TextBoxComponent is instantiated.
The `_boxConfig` has been made non-final to allow this field to be
modifiable.

Additionally, a `skip` method is implemented which more explicitly
provides the intended skipping behavior.

---------

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2025-02-13 11:13:07 +00:00
d6c83fab6c fix: Use correct matrix indices in BodyComponent (#3491)
Previously it looked at the wrong matrix indices for whether it should
recalculate the BodyComponent's matrix or not.

Closes: #3489
2025-02-13 10:52:13 +00:00
9f54a698d2 chore: Fix Flutter 3.29.0 analyzer issues (#3492)
Fixes the analyze issues that the new flutter version triggered on.
2025-02-13 10:40:14 +00:00
bac68dcbb9 fix: Remove forced location of the atlas file. (#3481)
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2025-02-10 15:49:48 +00:00
a0ebaef748 style: Standardize order of initializers on Transform3D (#3487)
This standardizes the order of initializers on `Transform3D`.
2025-02-10 10:11:03 -05:00
9345c870d4 feat: Add helper methods to create matrix4 with sensible defaults (#3486)
Add helper methods to create matrix4 with sensible defaults.

The provided `compose` function from `Matrix4` has two issues IMO:
* no sensible defaults, so all 3 parameters must be specified
* no named parameters, which can cause confusion when used

These new helpers make it much easier to create simpler matrixes,
especially for a single or couple of operations (but not all 3).
2025-02-10 08:29:37 -05:00
762e0ad842 feat(audio): Set audio context AudioContextConfigFocus.mixWithOthers by default (#3483)
# Description

AudioPlayers used to mix their sounds with other audio on the device,
which is not the proposed experience on Mobile devices. So this behavior
was changed in AudioPlayers, but it wasn't enforced due to a bug.
Obviously this behavior is not wanted for Games as multiple sounds
should play simultaneously, so this recovers the old functionality
again.

## Checklist
<!--
Before you create this PR confirm that it meets all requirements listed
below by checking the
relevant checkboxes with `[x]`. If some checkbox is not applicable, mark
it as `[-]`.
-->

- [x] I have followed the [Contributor Guide] when preparing my PR.
- [ ] I have updated/added tests for ALL new/updated/fixed
functionality.
- [ ] I have updated/added relevant documentation in `docs` and added
dartdoc comments with `///`.
- [x] I have updated/added relevant examples in `examples` or `docs`.

Not sure, if I can test this properly, as it's on a system level. I
could ensure the values are set though (?)

## Breaking Change?
I'm actually not sure, if this is breaking, I think it's not, as
`audioplayers` used to work like `mixWithOthers` due to a bug, but is
not anymore.

- [ ] Yes, this PR is a breaking change.
- [x] No, this PR is not a breaking change.

<!--
### Migration instructions

If the PR is breaking, uncomment this header and add instructions for
how to migrate from the
currently released version in-between the two following tags:
-->
<!-- End of exclude from commit message -->

---------

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2025-02-10 08:46:54 +00:00
1dbb4433ca feat: Add setFromMatrix4 to Transform3D (#3484)
Add setFromMatrix4 to Transform3D.
Also add some tests for Transform3D.
2025-02-09 10:59:20 -08:00
c332c9651a feat: Add Line3D mesh component [flame_3d] (#3412)
Add Line3D mesh component
2025-02-09 07:35:04 -08:00
57e5851409 feat: Implement closeToVector4 and closeToQuaternion by extracing a generic CloseToVector base (#3480)
This creates a generic `CloseToVector` class to be used to power the
existing `closeToVector2` and `closeToVector3` and brand-new
`closeToVector4` and `closeToQuaternion` matchers. This base class is
not exposed (for now; but we could reconsider if demand arises).
2025-02-09 06:24:28 -08:00
8db2476e8c feat: Add closeToMatrix4 test matcher (#3478)
Add closeToMatrix4 test matcher
2025-02-08 14:23:58 -05:00
aad50208db style: Simplify and unify syntax used for exports on flame_test (#3479)
Simplify and unify syntax used for exports on flame_test.

The file in question only has one public class, which is exported.
This brings it in line with all other exports on the file - the only
exception being `test_golden.dart` which does indeed declare other
auxiliary public types.
2025-02-08 13:40:10 -05:00
51d7fbc06d docs: Remove AI assist badges (#3477)
# Description
CommandDash is shutting down and the AI Code assist isn't operational
anymore. This PR requests its removal from the all Readme.

We're thankful for being able to serve the community and apologise for
the interruption.

## Checklist

- [X] I have followed the [Contributor Guide] when preparing my PR.
- [X] I have updated/added tests for ALL new/updated/fixed
functionality.
- [X] I have updated/added relevant documentation in `docs` and added
dartdoc comments with `///`.
- [x] I have updated/added relevant examples in `examples` or `docs`.
2025-02-08 09:53:54 +00:00
32e08b42ab chore: Melos config for linking changelog entries to PRs (#3476)
The links were missing from the last release, this should add them back
for the next release.
2025-02-05 17:23:44 +00:00
208d5d9ede chore(release): Release flame 1.24.0 (#3475)
```
Package Name           Current Version   Updated Version   Update Reason
flame_fire_atlas       1.7.1             1.8.0             manual versioning
flame                  1.23.0            1.24.0            updated with minor changes
flame_3d               0.1.0-dev.4       0.1.0-dev.5       updated with major changes
flame_test             1.17.4            1.17.5            updated with patch changes
flame_tiled            1.21.2            2.0.0             updated with major changes
flame_behavior_tree    0.1.3+4           0.1.3+5           dependency was updated
flame_oxygen           0.2.3+4           0.2.3+5           dependency was updated
flame_isolate          0.6.2+4           0.6.2+5           dependency was updated
flame_texturepacker    4.1.4             4.1.5             dependency was updated
flame_sprite_fusion    0.1.3+4           0.1.3+5           dependency was updated
flame_audio            2.10.7            2.10.8            dependency was updated
flame_spine            0.2.2+4           0.2.2+5           dependency was updated
flame_bloc             1.12.5            1.12.6            dependency was updated
flame_kenney_xml       0.1.1+4           0.1.1+5           dependency was updated
flame_lottie           0.4.2+4           0.4.2+5           dependency was updated
flame_markdown         0.2.3             0.2.3+1           dependency was updated
flame_console          0.1.2             0.1.2+1           dependency was updated
flame_rive             1.10.7            1.10.8            dependency was updated
flame_forge2d          0.18.2+4          0.18.2+5          dependency was updated
flame_noise            0.3.2+4           0.3.2+5           dependency was updated
flame_riverpod         5.4.7             5.4.8             dependency was updated
flame_svg              1.11.4            1.11.5            dependency was updated
flame_network_assets   0.3.3+4           0.3.3+5           dependency was updated
```
1.24.0 flame_svg-v1.11.5 flame_test-v1.17.5 flame_spine-v0.2.2+5 flame_noise-v0.3.2+5 flame_riverpod-v5.4.8 flame_console-v0.1.2+1 flame_forge2d-v0.18.2+5 flame_isolate-v0.6.2+5 flame_bloc-v1.12.6 flame_network_assets-v0.3.3+5 flame_oxygen-v0.2.3+5 flame_kenney_xml-v0.1.1+5 flame_3d-v0.1.0-dev.5 flame_rive-v1.10.8 flame_behavior_tree-v0.1.3+5 flame_tiled-v2.0.0 flame_markdown-v0.2.3+1 flame_fire_atlas-v1.8.0 flame_texturepacker-v4.1.5 flame_audio-v2.10.8 v1.24.0 flame_sprite_fusion-v0.1.3+5 flame_lottie-v0.4.2+5 flame-v1.24.0
2025-02-05 14:42:49 +00:00
f41f1c2201 fix!: Bump tiled to 0.11.0 and add ColorData extension (#3473)
This moves to the slightly breaking tiled 0.11.0 version (it moves away
from `Color` and uses its own `ColorData` class instead).


### Migration instructions

Use `colorData.toColor()` if you need a `Color` object from tiled.
2025-02-05 14:16:26 +00:00
9891f4eae9 perf: Switch from forEach to regular for-loops for about 30% improvement in raw update performance (#3472)
Replaces uses of `.forEach()` with regular `for` loops. This has
significant impact on performance in hot paths such as
`Component.updateTree()` and `Component.renderTree()`.

![Updating
Components](https://github.com/user-attachments/assets/e183ce4c-5b37-45d9-ad81-a0a35719e0dd)

In the graph above, you see 50 runs of
`benchmark/update_components_benchmark.dart`. The forEach results are
blue, the for-loop results are green. I could see this effect after just
replacing the `forEach` calls in `component.dart`. Data
[here](https://docs.google.com/spreadsheets/d/e/2PACX-1vRk_yGmLN6o0oqSUWDBh7ODx7B8EIToeahZcZBS3VKHX8AbEnmrgmEqDt98cZLoBjIKQX3MlOc0XwsP/pubhtml).

> Aside for posterity: `for i in {1..50}; do flutter test
benchmark/main.dart --no-pub -r silent 2>/dev/null >>
benchmarks_for_loop.txt; done`, then get the data from the text file.

I went ahead and replaced additional `forEach` calls elsewhere in the
engine codebase, but there was no additional effect on the benchmark.
Still, I kept those changes in. I only replaced `forEach` in places that
seemed relatively hot (e.g. `ComponentSet.reorder()`). There are more
`forEach` calls in the codebase but those seem fine to me as they aren't
likely to be called too often.

It should be noted that I needed to update the benchmark to add children
to the components. Every `_BenchmarkComponent` now has 10 children. This
feels a bit more realistic use of the framework than having a flat array
of components with no children. By changing the benchmark code in this
way, I made it a bit slower, so I'm not sure if the effect will be seen
in the CI/CD.

I also tried whether the change will have effect on my game's benchmark
(which is a lot more involved and uses `flutter driver` to test the
whole game in AOT mode). For the game, the effect is negligible but that
was kind of expected since my game spends a significant amount of its
CPU time on AI, raycasting, smoke simulation and drawVertices, none of
which really depend on the speed of the engine `update()` mechanism.

---------

Co-authored-by: Erick <erickzanardoo@gmail.com>
2025-02-05 14:01:37 +00:00
c3f99258f1 docs: Update links to flame-tiled to point to monorepo (#3469)
Update some broken links for flame_tiled, which is now in the monorepo.
2025-02-03 07:33:48 +01:00
57920e7946 docs: Re-write sentence about WorldRoute (#3468)
Fixes #3466
2025-02-02 21:46:52 +00:00
e6ce24ee20 docs: Clarify long tap config (#3467)
The sentence about the `MultiTapDispatcher` just confuses the user, and
its more of an implementation detail, so that part was removed.
2025-02-02 13:35:54 -08:00
c038dea873 feat!: Make resource creation be on demand to enable testing (#3411)
Make resource creation be on demand to enable testing.

Basically changes how the `Resource` class work:

* resources are lazily loaded
* the Resource class is responsible for re-creating resources when
needed
* children just provide the recreateResource boolean
2025-01-31 21:23:31 +00:00
8d8be05b32 fix: SpawnComponent.periodRange should change range each iteration (#3464)
The `SpawnComponent` accidentally didn't update the range each iteration
due to that the `minPeriod` variable wasn't set.
2025-01-28 20:46:32 +00:00
d1340add1e feat: NineTileBoxComponent with HasPaint to enable effects (#3459)
This adds a possibility to override the paint in the `NineTileBox` class
which enables `NineTileBoxComponent` to have `HasPaint`, so that opacity
and color effects can be used on it.

Fixes: #3430
2025-01-27 17:46:24 -03:00
Alp
a5467235d3 docs: Fix the link to the gamepads plugin's Github repository (#3462)
Fix the link to the gamepads plugin's Github repository.

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2025-01-27 14:23:01 +00:00
Alp
9e16ef053b docs: Fix type of the event parameter for onTapUp() (#3460)
On https://docs.flame-engine.org/latest/ towards the bottom it says
`void onTapUp(TapUpInfo info)`

However, this causes the following error on the latest version of Flame
(1.23.0):
```
'Player.onTapUp' ('void Function(TapUpInfo)') isn't a valid override of 'TapCallbacks.onTapUp' ('void Function(TapUpEvent)').dartinvalid_override
tap_callbacks.dart(16, 8): The member being overridden.
```

Changing TapUpInfo to TapUpEvent fixes it.
2025-01-27 15:05:29 +01:00
13bb7cf44b docs: Use built-in camera in example (#3458)
This uses the built-in camera in the example, so that people don't
create new default cameras accidentally.
2025-01-26 14:07:09 -03:00
324ac2bfc2 fix: Don't use a future when assets for SpriteButton is already loaded (#3456)
When both images are already loaded and we're using a future it will go
into loading for one tick, with this PR we avoid that.
2025-01-26 16:47:48 +01:00
82ec072057 docs: Fix a typo in pointer_events.md (#3455)
docs: Fix a typo
2025-01-22 15:13:06 +00:00
2d76592b9d chore(deps): Upgrade bloc dependencies (#3450)
Bloc has recently a major version update which doesn't change much. I
ran pub upgrade --major-versions.

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2025-01-22 13:58:35 +00:00
9238f7fe73 chore: Update dart-benchmark-action to v0.1.14 (#3452)
Update dart-benchmark-action to v0.1.14
2025-01-21 07:36:53 +01:00
1ff11e904f feat: Devtools overlay navigation (#3449)
This PR adds a debug navigation to the flame `devtools` extension,
allowing developers to quickly switch between `overlays`.


https://github.com/user-attachments/assets/00d5e2f8-d78b-4ba4-92cb-b0c295d76ba6

### Changes
1. added getter for `registeredOverlays` to `OverlayManager`
2. created `OverlayNavigationConnector` exposing `getOverlays` and
`navigateToOverlay` to the devtools
3. added `getOverlays` and `navigateToOverlay` to `Repository`
4. created `OverlayNavigation` holding a list of all
`registeredOverlays` which when an item is tapped shows this `overlay`

If you have any ideas/remarks/suggestions please let me know 🚀

---------

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2025-01-19 21:27:00 +00:00
b34f632d56 fix: Fix melos/workspace scripts to be able to lint monorepo locally (#3447)
Fix melos/workspace scripts to be able to lint monorepo locally

---------

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2025-01-19 11:02:26 +01:00
f85263f271 fix: Darkness increases with higher values (#3448)
Previously, .darken(.98) would darken the image by 98%, now it darkens
by the inverse by 2%. This restores the original functionality.
2025-01-18 21:38:57 -05:00
74763573c0 feat: Add direction and length getters and constructor to LineSegment (#3446)
feat: Add direction and length getters and constructor to LineSegment
2025-01-15 10:31:57 -05:00
f28726ea22 chore: Move to melos 7.0.0-dev.3 (#3444) 2025-01-10 22:03:51 +01:00
600572b423 docs: Add some documentation for the multiFactory in the SpawnComponent (#3443)
The PR add some explanation for the new multiFactory feature in the
SpawnComponent

Co-authored-by: Patrick Cornelißen <patrick.cornelissen@ars.de>
2025-01-10 10:59:30 +00:00
1c898ef489 feat: Add multiFactory to SpawnComponent (#3440)
add multiFactory to SpawnComponent to be able to create a list of
components for each spawn tick. For backwards compatibility the single
component factory is still supported and wrapped internally.


This PR enhances the SpawnComponent to accept a multiFactory which adds
a list of components per tick instead of just one.

---------

Co-authored-by: Patrick Cornelißen <patrick.cornelissen@ars.de>
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2025-01-09 23:35:08 +00:00
2d4ececbdf test: Ensure correct permissions for any author on dart_benchmark_action config (#3442)
Ensure correct permissions for any author on dart_benchmark_action
config.
2025-01-09 21:39:38 +00:00
3c8a19b674 chore: Add root flutter section to pubspec (#3441)
Currently we need to have a flutter section in the root pubspec.
Tracking it here: https://github.com/dart-lang/pub/issues/4486
2025-01-09 21:27:07 +00:00
6ea5389da9 test: Enhance tests for flame_markdown to ensure nested styles are propagated (#3439)
Enhance tests for flame_markdown to ensure nested styles are propagated.

Specifically adds a second section to each test to assert the element
tree (after having asserted the node tree).

And then uses that to add a nested inline style test making sure the
"CSS" is propagated and merged correctly.
2025-01-09 16:08:59 -05:00
0cf57681a0 test: Add a basic component rendering benchmark (#3436)
Add a basic component rendering benchmark.
2025-01-09 08:55:36 -05:00
f4a75d5f18 chore: Release flame_console v0.1.2 (#3435)
Initial release of flame_console.
flame_console-v0.1.2
2025-01-07 22:33:43 +01:00
67fc1ae71d chore(deps): Bump jinja2 from 3.1.4 to 3.1.5 in /doc/_sphinx (#3434)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pallets/jinja/releases">jinja2's
releases</a>.</em></p>
<blockquote>
<h2>3.1.5</h2>
<p>This is the Jinja 3.1.5 security fix release, which fixes security
issues and bugs but does not otherwise change behavior and should not
result in breaking changes compared to the latest feature release.</p>
<p>PyPI: <a
href="https://pypi.org/project/Jinja2/3.1.5/">https://pypi.org/project/Jinja2/3.1.5/</a>
Changes: <a
href="https://jinja.palletsprojects.com/changes/#version-3-1-5">https://jinja.palletsprojects.com/changes/#version-3-1-5</a>
Milestone: <a
href="https://github.com/pallets/jinja/milestone/16?closed=1">https://github.com/pallets/jinja/milestone/16?closed=1</a></p>
<ul>
<li>The sandboxed environment handles indirect calls to
<code>str.format</code>, such as by passing a stored reference to a
filter that calls its argument. <a
href="https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h">GHSA-q2x7-8rv6-6q7h</a></li>
<li>Escape template name before formatting it into error messages, to
avoid issues with names that contain f-string syntax. <a
href="https://redirect.github.com/pallets/jinja/issues/1792">#1792</a>,
<a
href="https://github.com/pallets/jinja/security/advisories/GHSA-gmj6-6f8f-6699">GHSA-gmj6-6f8f-6699</a></li>
<li>Sandbox does not allow <code>clear</code> and <code>pop</code> on
known mutable sequence types. <a
href="https://redirect.github.com/pallets/jinja/issues/2032">#2032</a></li>
<li>Calling sync <code>render</code> for an async template uses
<code>asyncio.run</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1952">#1952</a></li>
<li>Avoid unclosed <code>auto_aiter</code> warnings. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Return an <code>aclose</code>-able <code>AsyncGenerator</code> from
<code>Template.generate_async</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Avoid leaving <code>root_render_func()</code> unclosed in
<code>Template.generate_async</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Avoid leaving async generators unclosed in blocks, includes and
extends. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>The runtime uses the correct <code>concat</code> function for the
current environment when calling block references. <a
href="https://redirect.github.com/pallets/jinja/issues/1701">#1701</a></li>
<li>Make <code>|unique</code> async-aware, allowing it to be used after
another async-aware filter. <a
href="https://redirect.github.com/pallets/jinja/issues/1781">#1781</a></li>
<li><code>|int</code> filter handles <code>OverflowError</code> from
scientific notation. <a
href="https://redirect.github.com/pallets/jinja/issues/1921">#1921</a></li>
<li>Make compiling deterministic for tuple unpacking in a <code>{% set
... %}</code> call. <a
href="https://redirect.github.com/pallets/jinja/issues/2021">#2021</a></li>
<li>Fix dunder protocol (<code>copy</code>/<code>pickle</code>/etc)
interaction with <code>Undefined</code> objects. <a
href="https://redirect.github.com/pallets/jinja/issues/2025">#2025</a></li>
<li>Fix <code>copy</code>/<code>pickle</code> support for the internal
<code>missing</code> object. <a
href="https://redirect.github.com/pallets/jinja/issues/2027">#2027</a></li>
<li><code>Environment.overlay(enable_async)</code> is applied correctly.
<a
href="https://redirect.github.com/pallets/jinja/issues/2061">#2061</a></li>
<li>The error message from <code>FileSystemLoader</code> includes the
paths that were searched. <a
href="https://redirect.github.com/pallets/jinja/issues/1661">#1661</a></li>
<li><code>PackageLoader</code> shows a clearer error message when the
package does not contain the templates directory. <a
href="https://redirect.github.com/pallets/jinja/issues/1705">#1705</a></li>
<li>Improve annotations for methods returning copies. <a
href="https://redirect.github.com/pallets/jinja/issues/1880">#1880</a></li>
<li><code>urlize</code> does not add <code>mailto:</code> to values like
<code>@a@b</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1870">#1870</a></li>
<li>Tests decorated with <code>@pass_context</code> can be used with the
<code>|select</code> filter. <a
href="https://redirect.github.com/pallets/jinja/issues/1624">#1624</a></li>
<li>Using <code>set</code> for multiple assignment (<code>a, b = 1,
2</code>) does not fail when the target is a namespace attribute. <a
href="https://redirect.github.com/pallets/jinja/issues/1413">#1413</a></li>
<li>Using <code>set</code> in all branches of <code>{% if %}{% elif %}{%
else %}</code> blocks does not cause the variable to be considered
initially undefined. <a
href="https://redirect.github.com/pallets/jinja/issues/1253">#1253</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pallets/jinja/blob/main/CHANGES.rst">jinja2's
changelog</a>.</em></p>
<blockquote>
<h2>Version 3.1.5</h2>
<p>Released 2024-12-21</p>
<ul>
<li>The sandboxed environment handles indirect calls to
<code>str.format</code>, such as
by passing a stored reference to a filter that calls its argument.
:ghsa:<code>q2x7-8rv6-6q7h</code></li>
<li>Escape template name before formatting it into error messages, to
avoid
issues with names that contain f-string syntax.
:issue:<code>1792</code>, :ghsa:<code>gmj6-6f8f-6699</code></li>
<li>Sandbox does not allow <code>clear</code> and <code>pop</code> on
known mutable sequence
types. :issue:<code>2032</code></li>
<li>Calling sync <code>render</code> for an async template uses
<code>asyncio.run</code>.
:pr:<code>1952</code></li>
<li>Avoid unclosed <code>auto_aiter</code> warnings.
:pr:<code>1960</code></li>
<li>Return an <code>aclose</code>-able <code>AsyncGenerator</code> from
<code>Template.generate_async</code>. :pr:<code>1960</code></li>
<li>Avoid leaving <code>root_render_func()</code> unclosed in
<code>Template.generate_async</code>. :pr:<code>1960</code></li>
<li>Avoid leaving async generators unclosed in blocks, includes and
extends.
:pr:<code>1960</code></li>
<li>The runtime uses the correct <code>concat</code> function for the
current environment
when calling block references. :issue:<code>1701</code></li>
<li>Make <code>|unique</code> async-aware, allowing it to be used after
another
async-aware filter. :issue:<code>1781</code></li>
<li><code>|int</code> filter handles <code>OverflowError</code> from
scientific notation.
:issue:<code>1921</code></li>
<li>Make compiling deterministic for tuple unpacking in a <code>{% set
... %}</code>
call. :issue:<code>2021</code></li>
<li>Fix dunder protocol (<code>copy</code>/<code>pickle</code>/etc)
interaction with <code>Undefined</code>
objects. :issue:<code>2025</code></li>
<li>Fix <code>copy</code>/<code>pickle</code> support for the internal
<code>missing</code> object.
:issue:<code>2027</code></li>
<li><code>Environment.overlay(enable_async)</code> is applied correctly.
:pr:<code>2061</code></li>
<li>The error message from <code>FileSystemLoader</code> includes the
paths that were
searched. :issue:<code>1661</code></li>
<li><code>PackageLoader</code> shows a clearer error message when the
package does not
contain the templates directory. :issue:<code>1705</code></li>
<li>Improve annotations for methods returning copies.
:pr:<code>1880</code></li>
<li><code>urlize</code> does not add <code>mailto:</code> to values like
<code>@a@b</code>. :pr:<code>1870</code></li>
<li>Tests decorated with <code>@pass_context`` can be used with the
``|select`` filter. :issue:</code>1624`</li>
<li>Using <code>set</code> for multiple assignment (<code>a, b = 1,
2</code>) does not fail when the
target is a namespace attribute. :issue:<code>1413</code></li>
<li>Using <code>set</code> in all branches of <code>{% if %}{% elif %}{%
else %}</code> blocks
does not cause the variable to be considered initially undefined.
:issue:<code>1253</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="877f6e51be"><code>877f6e5</code></a>
release version 3.1.5</li>
<li><a
href="8d58859265"><code>8d58859</code></a>
remove test pypi</li>
<li><a
href="eda8fe86fd"><code>eda8fe8</code></a>
update dev dependencies</li>
<li><a
href="c8fdce1e03"><code>c8fdce1</code></a>
Fix bug involving calling set on a template parameter within all
branches of ...</li>
<li><a
href="66587ce989"><code>66587ce</code></a>
Fix bug where set would sometimes fail within if</li>
<li><a
href="fbc3a696c7"><code>fbc3a69</code></a>
Add support for namespaces in tuple parsing (<a
href="https://redirect.github.com/pallets/jinja/issues/1664">#1664</a>)</li>
<li><a
href="b8f4831d41"><code>b8f4831</code></a>
more comments about nsref assignment</li>
<li><a
href="ee832194cd"><code>ee83219</code></a>
Add support for namespaces in tuple assignment</li>
<li><a
href="1d55cddbb2"><code>1d55cdd</code></a>
Triple quotes in docs (<a
href="https://redirect.github.com/pallets/jinja/issues/2064">#2064</a>)</li>
<li><a
href="8a8eafc6b9"><code>8a8eafc</code></a>
edit block assignment section</li>
<li>Additional commits viewable in <a
href="https://github.com/pallets/jinja/compare/3.1.4...3.1.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jinja2&package-manager=pip&previous-version=3.1.4&new-version=3.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/flame-engine/flame/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2025-01-07 21:19:52 +00:00
9bcef051db ci: Use melos v7.0.0-dev.1 (#3433)
This makes the monorepo make use of `Melos v7.0.0-dev.1` so that we can
use the pub workspaces feature.
2025-01-07 22:11:40 +01:00
4af202faf5 test: Add very basic benchmark infrastructure (#3431)
Add very basic benchmark infrastructure, using the `examples` app as a
centralized benchmark playground and with first ever benchmark file just
testing some components and updates (more to come).

This also sets up the `dart-benchmark-action` to run, starting on this
very PR!
2025-01-07 08:00:03 +01:00
09fc0f2b21 test: Add coverage in flame_texturepacker (#3432)
Add additional tests to flame_texturepacker
2025-01-06 17:28:26 +01:00
8ca31a3176 chore(release): Publish packages (#3429)
```
Package Name           Current Version   Updated Version   Update Reason
flame                  1.22.0            1.23.0            updated with minor changes
flame_3d               0.1.0-dev.3       0.1.0-dev.4       updated with major changes
flame_console          0.1.1             0.1.2             updated with minor changes
flame_forge2d          0.18.2+3          0.18.2+4          updated with patch changes
flame_isolate          0.6.2+3           0.6.2+4           updated with patch changes
flame_markdown         0.2.2+3           0.2.3             updated with minor changes
flame_oxygen           0.2.3+3           0.2.3+4           updated with patch changes
flame_sprite_fusion    0.1.3+3           0.1.3+4           updated with patch changes
flame_svg              1.11.3            1.11.4            updated with patch changes
flame_test             1.17.3            1.17.4            updated with patch changes
flame_tiled            1.21.1            1.21.2            updated with patch changes
flame_behavior_tree    0.1.3+3           0.1.3+4           dependency was updated
flame_texturepacker    4.1.3             4.1.4             dependency was updated
flame_fire_atlas       1.7.0             1.7.1             dependency was updated
flame_audio            2.10.6            2.10.7            dependency was updated
flame_spine            0.2.2+3           0.2.2+4           dependency was updated
flame_bloc             1.12.4            1.12.5            dependency was updated
flame_kenney_xml       0.1.1+3           0.1.1+4           dependency was updated
flame_lottie           0.4.2+3           0.4.2+4           dependency was updated
flame_rive             1.10.6            1.10.7            dependency was updated
flame_noise            0.3.2+3           0.3.2+4           dependency was updated
flame_riverpod         5.4.6             5.4.7             dependency was updated
flame_network_assets   0.3.3+3           0.3.3+4           dependency was updated
```
v1.23.0 flame_3d-v0.1.0-dev.4 flame_sprite_fusion-v0.1.3+4 flame_audio-v2.10.7 flame-v1.23.0 flame_markdown-v0.2.3 flame_fire_atlas-v1.7.1 flame_texturepacker-v4.1.4 flame_tiled-v1.21.2 flame_behavior_tree-v0.1.3+4 flame_rive-v1.10.7 flame_svg-v1.11.4 flame_lottie-v0.4.2+4 flame_network_assets-v0.3.3+4 1.23.0 flame_bloc-v1.12.5 flame_kenney_xml-v0.1.1+4 flame_noise-v0.3.2+4 flame_forge2d-v0.18.2+4 flame_riverpod-v5.4.7 flame_isolate-v0.6.2+4 flame_oxygen-v0.2.3+4 flame_spine-v0.2.2+4 flame_test-v1.17.4
2025-01-03 13:37:47 +01:00
9a5c54bea8 fix: Take into consideration when child is added to parent that is removed in the same tick (#3428)
Currently we end up in a bad state if a child is added to a parent that
is removed in the same tick, this PR fixes that by adding the child
after the parent has been unmounted.

Closes: #3416
2024-12-31 00:42:00 +01:00
1f9b0ea9f3 feat: Add support for strike-through text for flame_markdown (#3426)
Add support for strike-through text for flame_markdown, if enabled by
the user.

Basically parses the `del` HTMl tag and maps it to a new inline text
renderer in Flame's text rendering pipeline.

The style can be controlled with a new property if desired.

In order to parse `~~`-wrapped text into the new node element, the
underlying markdown parser must have the strikethrough option enabled
(or an equivalent custom option), which can be controlled by the user if
providing their own document.
2024-12-29 07:52:53 -08:00
3067da94fb fix: Do not encode HTML by default when parsing markdown [flame_markdown] (#3425)
Do not encode HTML by default when parsing markdown [flame_markdown].

The Flame text rendering pipeline is not configured to accept HTML
encoded sequences, therefore the default behaviour of Flame Markdown
doesn't lead to a good result:


![image](https://github.com/user-attachments/assets/b8463c88-1b2c-475e-ab23-9eb56864d518)

With this change:


![image](https://github.com/user-attachments/assets/85c94c0c-019f-4b55-b713-a995ccef1361)

Of the user can still override it as before.
2024-12-27 01:37:36 -05:00