@breadstone/mosaik-elements-angular 0.0.94 → 0.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/fesm2022/mosaik-elements-angular.mjs +41 -16
- package/fesm2022/mosaik-elements-angular.mjs.map +1 -1
- package/index.d.ts +14 -6
- package/index.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 0.0.96 (2025-08-10)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- improve type safety for animation properties in AnimateDirective ([adb64bffce](https://github.com/RueDeRennes/mosaik/commit/adb64bffce))
|
|
6
|
+
- update @types/node to version 24.2.1 across multiple packages ([1d3b606f14](https://github.com/RueDeRennes/mosaik/commit/1d3b606f14))
|
|
7
|
+
- update release version to 0.0.95 in package.json ([c1d12c2301](https://github.com/RueDeRennes/mosaik/commit/c1d12c2301))
|
|
8
|
+
|
|
9
|
+
## 0.0.95 (2025-08-09)
|
|
10
|
+
|
|
11
|
+
### 🩹 Fixes
|
|
12
|
+
|
|
13
|
+
- refactor animation properties in AnimateDirective and Animation to improve type safety ([c59fd6dd7f](https://github.com/RueDeRennes/mosaik/commit/c59fd6dd7f))
|
|
14
|
+
- update import path for FileCache and increment release version to 0.0.94 ([54601adcea](https://github.com/RueDeRennes/mosaik/commit/54601adcea))
|
|
15
|
+
|
|
1
16
|
## 0.0.94 (2025-08-09)
|
|
2
17
|
|
|
3
18
|
### 🩹 Fixes
|
|
@@ -56768,6 +56768,7 @@ class AnimationRegistry {
|
|
|
56768
56768
|
* @public
|
|
56769
56769
|
*/
|
|
56770
56770
|
constructor() {
|
|
56771
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
56771
56772
|
this._animations = {};
|
|
56772
56773
|
}
|
|
56773
56774
|
// #endregion
|
|
@@ -56791,8 +56792,8 @@ class AnimationRegistry {
|
|
|
56791
56792
|
* @param animation - The animation options to register.
|
|
56792
56793
|
*/
|
|
56793
56794
|
register(name, animation) {
|
|
56794
|
-
if (
|
|
56795
|
-
throw new Error('Animation name
|
|
56795
|
+
if (name.trim() === '') {
|
|
56796
|
+
throw new Error('Animation name must be provided.');
|
|
56796
56797
|
}
|
|
56797
56798
|
this._animations[name] = animation;
|
|
56798
56799
|
}
|
|
@@ -56804,9 +56805,10 @@ class AnimationRegistry {
|
|
|
56804
56805
|
* @returns The animation options if found, otherwise undefined.
|
|
56805
56806
|
*/
|
|
56806
56807
|
unregister(name) {
|
|
56807
|
-
if (
|
|
56808
|
+
if (name.trim() === '') {
|
|
56808
56809
|
throw new Error('Animation name must be provided.');
|
|
56809
56810
|
}
|
|
56811
|
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
56810
56812
|
delete this._animations[name];
|
|
56811
56813
|
}
|
|
56812
56814
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AnimationRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -56858,6 +56860,7 @@ class AnimateDirective {
|
|
|
56858
56860
|
_animationPlayer;
|
|
56859
56861
|
_renderer;
|
|
56860
56862
|
_wasTriggered;
|
|
56863
|
+
_animate;
|
|
56861
56864
|
_options;
|
|
56862
56865
|
// #endregion
|
|
56863
56866
|
// #region Ctor
|
|
@@ -56872,10 +56875,22 @@ class AnimateDirective {
|
|
|
56872
56875
|
this._animationPlayer = inject(AnimationPlayer2);
|
|
56873
56876
|
this._renderer = inject(Renderer2);
|
|
56874
56877
|
this._wasTriggered = false;
|
|
56878
|
+
this._animate = undefined;
|
|
56875
56879
|
this._options = undefined;
|
|
56876
56880
|
}
|
|
56877
56881
|
// #endregion
|
|
56878
56882
|
// #region Properties
|
|
56883
|
+
/**
|
|
56884
|
+
* Gets or sets the `options` property.
|
|
56885
|
+
*
|
|
56886
|
+
* @public
|
|
56887
|
+
*/
|
|
56888
|
+
get animate() {
|
|
56889
|
+
return this._animate;
|
|
56890
|
+
}
|
|
56891
|
+
set animate(value) {
|
|
56892
|
+
this._animate = value;
|
|
56893
|
+
}
|
|
56879
56894
|
/**
|
|
56880
56895
|
* Gets or sets the `options` property.
|
|
56881
56896
|
*
|
|
@@ -56904,36 +56919,40 @@ class AnimateDirective {
|
|
|
56904
56919
|
}
|
|
56905
56920
|
let hasName = false;
|
|
56906
56921
|
let name = undefined;
|
|
56907
|
-
if (typeof this.
|
|
56922
|
+
if (typeof this._animate === 'string') {
|
|
56908
56923
|
hasName = true;
|
|
56909
|
-
name = this.
|
|
56924
|
+
name = this._animate;
|
|
56910
56925
|
}
|
|
56911
|
-
else if (this.
|
|
56926
|
+
else if (this._animate && 'name' in this._animate && this._animate.name) {
|
|
56912
56927
|
hasName = true;
|
|
56913
|
-
name = this.
|
|
56928
|
+
name = this._animate.name;
|
|
56914
56929
|
}
|
|
56915
56930
|
if (hasName && name) {
|
|
56916
|
-
this.
|
|
56917
|
-
if (!this.
|
|
56931
|
+
this._animate = this._animationRegistry.animations[name];
|
|
56932
|
+
if (!this._animate) {
|
|
56918
56933
|
console.warn(`[AnimateDirective]: The animation with "${name}" was not found.`);
|
|
56919
56934
|
return;
|
|
56920
56935
|
}
|
|
56921
56936
|
}
|
|
56937
|
+
this._animate.options = {
|
|
56938
|
+
...this._animate.options,
|
|
56939
|
+
...this._options
|
|
56940
|
+
};
|
|
56922
56941
|
this._wasTriggered = true;
|
|
56923
56942
|
const from = {
|
|
56924
|
-
...this.
|
|
56925
|
-
...this.
|
|
56943
|
+
...this._animate.from,
|
|
56944
|
+
...this._animate.initial
|
|
56926
56945
|
};
|
|
56927
56946
|
for (const [k, v] of Object.entries(from)) {
|
|
56928
56947
|
if (k in this._element.nativeElement.style) {
|
|
56929
56948
|
this._renderer.setStyle(this._element.nativeElement, k, v);
|
|
56930
56949
|
}
|
|
56931
56950
|
}
|
|
56932
|
-
if (this.
|
|
56933
|
-
this.
|
|
56951
|
+
if (this._animate && 'trigger' in this._animate) {
|
|
56952
|
+
this._animate.trigger(() => this.play(this._animate));
|
|
56934
56953
|
}
|
|
56935
56954
|
else {
|
|
56936
|
-
this.play(this.
|
|
56955
|
+
this.play(this._animate);
|
|
56937
56956
|
}
|
|
56938
56957
|
}
|
|
56939
56958
|
/**
|
|
@@ -56953,7 +56972,7 @@ class AnimateDirective {
|
|
|
56953
56972
|
});
|
|
56954
56973
|
}
|
|
56955
56974
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AnimateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
56956
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.6", type: AnimateDirective, isStandalone: true, selector: "[mosaikAnimate]", inputs: {
|
|
56975
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.6", type: AnimateDirective, isStandalone: true, selector: "[mosaikAnimate]", inputs: { animate: ["mosaikAnimate", "animate"], options: ["mosaikAnimateOptions", "options"] }, ngImport: i0 });
|
|
56957
56976
|
}
|
|
56958
56977
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AnimateDirective, decorators: [{
|
|
56959
56978
|
type: Directive,
|
|
@@ -56961,12 +56980,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
56961
56980
|
selector: '[mosaikAnimate]',
|
|
56962
56981
|
standalone: true
|
|
56963
56982
|
}]
|
|
56964
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
56983
|
+
}], ctorParameters: () => [], propDecorators: { animate: [{
|
|
56965
56984
|
type: Input,
|
|
56966
56985
|
args: [{
|
|
56967
56986
|
alias: 'mosaikAnimate',
|
|
56968
56987
|
required: true
|
|
56969
56988
|
}]
|
|
56989
|
+
}], options: [{
|
|
56990
|
+
type: Input,
|
|
56991
|
+
args: [{
|
|
56992
|
+
alias: 'mosaikAnimateOptions',
|
|
56993
|
+
required: false
|
|
56994
|
+
}]
|
|
56970
56995
|
}] } });
|
|
56971
56996
|
|
|
56972
56997
|
// #region Imports
|