ziko 0.48.1 → 0.49.0
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/dist/ziko.cjs +187 -157
- package/dist/ziko.js +187 -157
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +152 -122
- package/package.json +8 -8
- package/src/__ziko__/__signature__.js +0 -0
- package/src/app/spa.js +7 -7
- package/src/app/ziko-app.js +1 -1
- package/src/data/converter/svg.js +1 -1
- package/src/math/complex/index.js +6 -17
- package/src/time/animation/index.js +2 -2
- package/src/time/ease/index.js +115 -74
- package/src/ui/__methods__/dom.js +5 -5
- package/src/ui/constructors/UIElement.js +3 -3
- package/src/ui/constructors/UIElementCore.js +3 -3
- package/src/ui/constructors/_m.js.txt +5 -5
- package/src/ui/flex/index.js +1 -1
- package/src/ui/grid/index.js +1 -1
- package/src/ui/logic/switch/index.js +1 -1
- package/src/ui/suspense/index.js +1 -1
- package/src/ui/web-component/index.js +4 -4
- package/types/index.d.ts +2 -0
- package/types/math/complex/index.d.ts +52 -0
- package/types/math/index.d.ts +2 -0
- package/types/math/utils/index.d.ts +1 -0
- package/types/math/utils/mapfun.d.ts +43 -0
- package/types/time/ease/index.d.ts +103 -0
- package/types/time/index.d.ts +1 -0
package/dist/ziko.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*
|
|
3
3
|
Project: ziko.js
|
|
4
4
|
Author: Zakaria Elalaoui
|
|
5
|
-
Date :
|
|
5
|
+
Date : Sat Nov 22 2025 13:34:29 GMT+0100 (UTC+01:00)
|
|
6
6
|
Git-Repo : https://github.com/zakarialaoui10/ziko.js
|
|
7
7
|
Git-Wiki : https://github.com/zakarialaoui10/ziko.js/wiki
|
|
8
8
|
Released under MIT License
|
|
@@ -1344,7 +1344,7 @@
|
|
|
1344
1344
|
// // UI.append(...items);
|
|
1345
1345
|
// // }
|
|
1346
1346
|
// // else UI.element=this.element.cloneNode(true);
|
|
1347
|
-
// // return UI.
|
|
1347
|
+
// // return UI.mount(render);
|
|
1348
1348
|
// }
|
|
1349
1349
|
|
|
1350
1350
|
// freeze(freeze){
|
|
@@ -1354,9 +1354,9 @@
|
|
|
1354
1354
|
// setTarget(tg) {
|
|
1355
1355
|
// if(this.isBody) return ;
|
|
1356
1356
|
// if (tg?.isUIElement) tg = tg.element;
|
|
1357
|
-
// this.
|
|
1357
|
+
// this.unmount();
|
|
1358
1358
|
// this.target = tg;
|
|
1359
|
-
// this.
|
|
1359
|
+
// this.mount();
|
|
1360
1360
|
// return this;
|
|
1361
1361
|
// }
|
|
1362
1362
|
// describe(label){
|
|
@@ -1662,18 +1662,18 @@
|
|
|
1662
1662
|
return this;
|
|
1663
1663
|
}
|
|
1664
1664
|
function clear(){
|
|
1665
|
-
this?.items?.forEach(n=>n.
|
|
1665
|
+
this?.items?.forEach(n=>n.unmount());
|
|
1666
1666
|
this.element.innerHTML = "";
|
|
1667
1667
|
return this;
|
|
1668
1668
|
}
|
|
1669
|
-
function
|
|
1669
|
+
function mount(target = this.target) {
|
|
1670
1670
|
if(this.isBody)return ;
|
|
1671
1671
|
if(target?.isUIElement)target=target.element;
|
|
1672
1672
|
this.target=target;
|
|
1673
1673
|
this.target?.appendChild(this.element);
|
|
1674
1674
|
return this;
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function unmount(){
|
|
1677
1677
|
if(this.cache.parent)this.cache.parent.remove(this);
|
|
1678
1678
|
else if(this.target?.children?.length && [...this.target?.children].includes(this.element)) this.target.removeChild(this.element);
|
|
1679
1679
|
return this;
|
|
@@ -1686,11 +1686,11 @@
|
|
|
1686
1686
|
return this
|
|
1687
1687
|
}
|
|
1688
1688
|
function renderAfter(t = 1) {
|
|
1689
|
-
setTimeout(() => this.
|
|
1689
|
+
setTimeout(() => this.mount(), t);
|
|
1690
1690
|
return this;
|
|
1691
1691
|
}
|
|
1692
1692
|
function unrenderAfter(t = 1) {
|
|
1693
|
-
setTimeout(() => this.
|
|
1693
|
+
setTimeout(() => this.unmount(), t);
|
|
1694
1694
|
return this;
|
|
1695
1695
|
}
|
|
1696
1696
|
function after(ui){
|
|
@@ -1711,12 +1711,12 @@
|
|
|
1711
1711
|
before: before,
|
|
1712
1712
|
clear: clear,
|
|
1713
1713
|
insertAt: insertAt,
|
|
1714
|
+
mount: mount,
|
|
1714
1715
|
prepend: prepend,
|
|
1715
1716
|
remove: remove,
|
|
1716
|
-
render: render,
|
|
1717
1717
|
renderAfter: renderAfter,
|
|
1718
1718
|
replaceElementWith: replaceElementWith,
|
|
1719
|
-
|
|
1719
|
+
unmount: unmount,
|
|
1720
1720
|
unrenderAfter: unrenderAfter
|
|
1721
1721
|
});
|
|
1722
1722
|
|
|
@@ -2421,7 +2421,7 @@
|
|
|
2421
2421
|
// // UI.append(...items);
|
|
2422
2422
|
// // }
|
|
2423
2423
|
// // else UI.element=this.element.cloneNode(true);
|
|
2424
|
-
// // return UI.
|
|
2424
|
+
// // return UI.mount(render);
|
|
2425
2425
|
// }
|
|
2426
2426
|
// [Symbol.iterator]() {
|
|
2427
2427
|
// return this.items[Symbol.iterator]();
|
|
@@ -2443,9 +2443,9 @@
|
|
|
2443
2443
|
// setTarget(tg) {
|
|
2444
2444
|
// if(this.isBody) return ;
|
|
2445
2445
|
// if (tg?.isUIElement) tg = tg.element;
|
|
2446
|
-
// this.
|
|
2446
|
+
// this.unmount();
|
|
2447
2447
|
// this.target = tg;
|
|
2448
|
-
// this.
|
|
2448
|
+
// this.mount();
|
|
2449
2449
|
// return this;
|
|
2450
2450
|
// }
|
|
2451
2451
|
// describe(label){
|
|
@@ -2708,7 +2708,7 @@
|
|
|
2708
2708
|
if (typeof h == "number") h += "%";
|
|
2709
2709
|
this.style({ width: w, height: h });
|
|
2710
2710
|
this.style({ display: "flex" });
|
|
2711
|
-
// this.
|
|
2711
|
+
// this.mount();
|
|
2712
2712
|
}
|
|
2713
2713
|
get isFlex(){
|
|
2714
2714
|
return true;
|
|
@@ -2816,7 +2816,7 @@
|
|
|
2816
2816
|
(async ()=>{
|
|
2817
2817
|
try{
|
|
2818
2818
|
const ui = await callback();
|
|
2819
|
-
fallback_ui.
|
|
2819
|
+
fallback_ui.unmount();
|
|
2820
2820
|
this.append(ui);
|
|
2821
2821
|
// console.log(content)
|
|
2822
2822
|
}
|
|
@@ -2918,19 +2918,19 @@
|
|
|
2918
2918
|
}
|
|
2919
2919
|
|
|
2920
2920
|
connectedCallback() {
|
|
2921
|
-
this.
|
|
2921
|
+
this.mount();
|
|
2922
2922
|
}
|
|
2923
2923
|
|
|
2924
|
-
|
|
2924
|
+
mount() {
|
|
2925
2925
|
this.shadowRoot.innerHTML = '';
|
|
2926
|
-
this.UIElement = UIElement(this.props).
|
|
2926
|
+
this.UIElement = UIElement(this.props).mount(this.shadowRoot);
|
|
2927
2927
|
}
|
|
2928
2928
|
|
|
2929
2929
|
attributeChangedCallback(name, _, newValue) {
|
|
2930
2930
|
Object.assign(this.props, {
|
|
2931
2931
|
[name]: this.mask[name].type(newValue)
|
|
2932
2932
|
});
|
|
2933
|
-
this.
|
|
2933
|
+
this.mount();
|
|
2934
2934
|
}
|
|
2935
2935
|
}
|
|
2936
2936
|
);
|
|
@@ -2944,7 +2944,7 @@
|
|
|
2944
2944
|
this.init();
|
|
2945
2945
|
}
|
|
2946
2946
|
init(){
|
|
2947
|
-
Object.values(this.cases).filter(n=>n != this.current).forEach(n=>n.
|
|
2947
|
+
Object.values(this.cases).filter(n=>n != this.current).forEach(n=>n.unmount());
|
|
2948
2948
|
super.init(this.current.element);
|
|
2949
2949
|
}
|
|
2950
2950
|
get current(){
|
|
@@ -2971,7 +2971,7 @@
|
|
|
2971
2971
|
const svg2str=svg=>(new XMLSerializer()).serializeToString(svg);
|
|
2972
2972
|
const svg2ascii=svg=>btoa(svg2str(svg));
|
|
2973
2973
|
const svg2imgUrl=svg=>'data:image/svg+xml;base64,'+svg2ascii(svg);
|
|
2974
|
-
const svg2img=(svg,render=true)=>tags.img(svg2imgUrl(svg)).
|
|
2974
|
+
const svg2img=(svg,render=true)=>tags.img(svg2imgUrl(svg)).mount(render);
|
|
2975
2975
|
|
|
2976
2976
|
// const obj2str=(object)=>{
|
|
2977
2977
|
// const recursiveToString = (obj) => {
|
|
@@ -3787,27 +3787,27 @@
|
|
|
3787
3787
|
this.b=a.b;
|
|
3788
3788
|
}
|
|
3789
3789
|
else if(typeof(a)==="object"){
|
|
3790
|
-
if(("a" in
|
|
3790
|
+
if(("a" in a && "b" in a)){
|
|
3791
3791
|
this.a=a.a;
|
|
3792
3792
|
this.b=a.b;
|
|
3793
3793
|
}
|
|
3794
|
-
else if(("a" in
|
|
3794
|
+
else if(("a" in a && "z" in a)){
|
|
3795
3795
|
this.a=a.a;
|
|
3796
3796
|
this.b=sqrt$2((a.z**2)-(a.a**2));
|
|
3797
3797
|
}
|
|
3798
|
-
else if(("a" in
|
|
3798
|
+
else if(("a" in a && "phi" in a)){
|
|
3799
3799
|
this.a=a.a;
|
|
3800
3800
|
this.b=a.a*tan(a.phi);
|
|
3801
3801
|
}
|
|
3802
|
-
else if(("b" in
|
|
3802
|
+
else if(("b" in a && "z" in a)){
|
|
3803
3803
|
this.b=a.b;
|
|
3804
3804
|
this.a=sqrt$2((a.z**2)-(a.b**2));
|
|
3805
3805
|
}
|
|
3806
|
-
else if(("b" in
|
|
3806
|
+
else if(("b" in a && "phi" in a)){
|
|
3807
3807
|
this.b=b;
|
|
3808
3808
|
this.a=a.b/tan(a.phi);
|
|
3809
3809
|
}
|
|
3810
|
-
else if(("z" in
|
|
3810
|
+
else if(("z" in a && "phi" in a)){
|
|
3811
3811
|
this.a=a.z*cos$2(a.phi);
|
|
3812
3812
|
this.a=a.z*sin$2(a.phi);
|
|
3813
3813
|
}
|
|
@@ -3946,17 +3946,6 @@
|
|
|
3946
3946
|
const de=cos$2(this.a*2)+cosh$1(this.b*2);
|
|
3947
3947
|
return complex(sin$2(2*this.a)/de,sinh$1(2*this.b)/de);
|
|
3948
3948
|
}
|
|
3949
|
-
printInConsole() {
|
|
3950
|
-
let string = this.a + " + " + this.b + " * i";
|
|
3951
|
-
console.log(string);
|
|
3952
|
-
return string;
|
|
3953
|
-
}
|
|
3954
|
-
print() {
|
|
3955
|
-
//return text(this.a + " + i * " + this.b);
|
|
3956
|
-
}
|
|
3957
|
-
UI() {
|
|
3958
|
-
return "<span>" + this.a + " + i * " + this.b + "</span>";
|
|
3959
|
-
}
|
|
3960
3949
|
}
|
|
3961
3950
|
const complex=(a,b)=>{
|
|
3962
3951
|
if((a instanceof Array||ArrayBuffer.isView(a)) && (b instanceof Array||ArrayBuffer.isView(a)))return a.map((n,i)=>complex(a[i],b[i]));
|
|
@@ -4084,86 +4073,127 @@
|
|
|
4084
4073
|
)
|
|
4085
4074
|
};
|
|
4086
4075
|
|
|
4087
|
-
const {PI, sqrt: sqrt$1, cos: cos$1, sin: sin$1, acos, pow} = Math;
|
|
4088
|
-
|
|
4089
|
-
const
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
const
|
|
4093
|
-
|
|
4094
|
-
const
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
const
|
|
4099
|
-
const
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
const
|
|
4104
|
-
const
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
const
|
|
4111
|
-
const
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
const
|
|
4116
|
-
const
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
const
|
|
4123
|
-
const
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
const
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
const
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
const
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4076
|
+
const { PI, sqrt: sqrt$1, cos: cos$1, sin: sin$1, acos, pow } = Math;
|
|
4077
|
+
|
|
4078
|
+
const linear = t => t;
|
|
4079
|
+
|
|
4080
|
+
// --- Sin ---
|
|
4081
|
+
const in_sin = t => 1 - cos$1((t * PI) / 2);
|
|
4082
|
+
const out_sin = t => sin$1((t * PI) / 2);
|
|
4083
|
+
const in_out_sin = t => -(cos$1(PI * t) - 1) / 2;
|
|
4084
|
+
|
|
4085
|
+
// --- Quad ---
|
|
4086
|
+
const in_quad = t => t ** 2;
|
|
4087
|
+
const out_quad = t => 1 - (1 - t) ** 2;
|
|
4088
|
+
const in_out_quad = t =>
|
|
4089
|
+
t < 0.5 ? 2 * (t ** 2) : 1 - (-2 * t + 2) ** 2 / 2;
|
|
4090
|
+
|
|
4091
|
+
// --- Cubic ---
|
|
4092
|
+
const in_cubic = t => t ** 3;
|
|
4093
|
+
const out_cubic = t => 1 - (1 - t) ** 3;
|
|
4094
|
+
const in_out_cubic = t =>
|
|
4095
|
+
t < 0.5 ? 4 * (t ** 3) : 1 - (-2 * t + 2) ** 3 / 2;
|
|
4096
|
+
|
|
4097
|
+
// --- Quart ---
|
|
4098
|
+
const in_quart = t => t ** 4;
|
|
4099
|
+
const out_quart = t => 1 - (1 - t) ** 4;
|
|
4100
|
+
const in_out_quart = t =>
|
|
4101
|
+
t < 0.5 ? 8 * (t ** 4) : 1 - (-2 * t + 2) ** 4 / 2;
|
|
4102
|
+
|
|
4103
|
+
// --- Quint ---
|
|
4104
|
+
const in_quint = t => t ** 5;
|
|
4105
|
+
const out_quint = t => 1 - (1 - t) ** 5;
|
|
4106
|
+
const in_out_quint = t =>
|
|
4107
|
+
t < 0.5 ? 16 * (t ** 5) : 1 - (-2 * t + 2) ** 5 / 2;
|
|
4108
|
+
|
|
4109
|
+
// --- Expo ---
|
|
4110
|
+
const in_expo = t => (t === 0 ? 0 : 2 ** (10 * t - 10));
|
|
4111
|
+
const out_expo = t => (t === 1 ? 1 : 1 - 2 ** (-10 * t));
|
|
4112
|
+
const in_out_expo = t =>
|
|
4113
|
+
t === 0
|
|
4114
|
+
? 0
|
|
4115
|
+
: t === 1
|
|
4116
|
+
? 1
|
|
4117
|
+
: t < 0.5
|
|
4118
|
+
? 2 ** (20 * t - 10) / 2
|
|
4119
|
+
: (2 - 2 ** (-20 * t + 10)) / 2;
|
|
4120
|
+
|
|
4121
|
+
// --- Circ ---
|
|
4122
|
+
const in_circ = t => 1 - sqrt$1(1 - t ** 2);
|
|
4123
|
+
const out_circ = t => sqrt$1(1 - (t - 1) ** 2);
|
|
4124
|
+
const in_out_circ = t =>
|
|
4125
|
+
t < 0.5
|
|
4126
|
+
? (1 - sqrt$1(1 - (2 * t) ** 2)) / 2
|
|
4127
|
+
: (sqrt$1(1 - (-2 * t + 2) ** 2) + 1) / 2;
|
|
4128
|
+
|
|
4129
|
+
// --- Arc ---
|
|
4130
|
+
const arc = t => 1 - sin$1(acos(t));
|
|
4131
|
+
|
|
4132
|
+
// --- Back ---
|
|
4133
|
+
const back = (t, x = 1) => (t ** 2) * ((x + 1) * t - x);
|
|
4134
|
+
|
|
4135
|
+
// --- Elastic ---
|
|
4136
|
+
const elastic = t =>
|
|
4137
|
+
-2 * pow(2, 10 * (t - 1)) * cos$1((20 * PI * t) / 3 * t);
|
|
4138
|
+
|
|
4139
|
+
// --- Back variations ---
|
|
4140
|
+
const in_back = (t, c1 = 1.70158, c3 = c1 + 1) =>
|
|
4141
|
+
c3 * pow(t, 3) - c1 * (t ** 2);
|
|
4142
|
+
|
|
4143
|
+
const out_back = (t, c1 = 1.70158, c3 = c1 + 1) =>
|
|
4144
|
+
1 + c3 * pow(t - 1, 3) + c1 * pow(t - 1, 2);
|
|
4145
|
+
|
|
4146
|
+
const in_out_back = (t, c1 = 1.70158, c2 = c1 * 1.525) =>
|
|
4147
|
+
t < 0.5
|
|
4148
|
+
? (pow(2 * t, 2) * ((c2 + 1) * 2 * t - c2)) / 2
|
|
4149
|
+
: (pow(2 * t - 2, 2) * ((c2 + 1) * (t * 2 - 2) + c2) + 2) / 2;
|
|
4150
|
+
|
|
4151
|
+
// --- Elastic variations ---
|
|
4152
|
+
const in_elastic = (t, c4 = (2 * PI) / 3) =>
|
|
4153
|
+
t === 0
|
|
4154
|
+
? 0
|
|
4155
|
+
: t === 1
|
|
4156
|
+
? 1
|
|
4157
|
+
: -pow(2, 10 * t - 10) * sin$1((t * 10 - 10.75) * c4);
|
|
4158
|
+
|
|
4159
|
+
const out_elastic = (t, c4 = (2 * PI) / 3) =>
|
|
4160
|
+
t === 0
|
|
4161
|
+
? 0
|
|
4162
|
+
: t === 1
|
|
4163
|
+
? 1
|
|
4164
|
+
: pow(2, -10 * t) * sin$1((t * 10 - 0.75) * c4) + 1;
|
|
4165
|
+
|
|
4166
|
+
const in_out_elastic = (t, c5 = (2 * PI) / 4.5) =>
|
|
4167
|
+
t === 0
|
|
4168
|
+
? 0
|
|
4169
|
+
: t === 1
|
|
4170
|
+
? 1
|
|
4171
|
+
: t < 0.5
|
|
4172
|
+
? -(pow(2, 20 * t - 10) * sin$1((20 * t - 11.125) * c5)) / 2
|
|
4173
|
+
: (pow(2, -20 * t + 10) * sin$1((20 * t - 11.125) * c5)) / 2 + 1;
|
|
4174
|
+
|
|
4175
|
+
// --- Bounce ---
|
|
4176
|
+
const in_bounce = (t, n1 = 7.5625, d1 = 2.75) =>
|
|
4177
|
+
1 - out_bounce(1 - t, n1, d1);
|
|
4178
|
+
|
|
4179
|
+
const out_bounce = (t, n1 = 7.5625, d1 = 2.75) => {
|
|
4180
|
+
if (t < 1 / d1) return n1 * t * t;
|
|
4181
|
+
if (t < 2 / d1) return n1 * (t -= 1.5 / d1) * t + 0.75;
|
|
4182
|
+
if (t < 2.5 / d1) return n1 * (t -= 2.25 / d1) * t + 0.9375;
|
|
4156
4183
|
return n1 * (t -= 2.625 / d1) * t + 0.984375;
|
|
4157
4184
|
};
|
|
4158
4185
|
|
|
4159
|
-
const
|
|
4160
|
-
|
|
4186
|
+
const in_out_bounce = (t, n1 = 7.5625, d1 = 2.75) =>
|
|
4187
|
+
t < 0.5
|
|
4188
|
+
? out_bounce(1 - 2 * t, n1, d1) / 2
|
|
4189
|
+
: out_bounce(2 * t - 1, n1, d1) / 2;
|
|
4161
4190
|
|
|
4162
|
-
|
|
4163
|
-
const
|
|
4191
|
+
// --- Step / Discrete ---
|
|
4192
|
+
const step = (t, steps = 5) => Math.floor(t * steps) / steps;
|
|
4193
|
+
const discret = (t, segments = 5) => Math.ceil(t * segments) / segments;
|
|
4164
4194
|
|
|
4165
4195
|
class TimeAnimation {
|
|
4166
|
-
constructor(callback, { ease =
|
|
4196
|
+
constructor(callback, { ease = linear, step = 50, t0 = 0, start = true, duration = 3000 } = {}) {
|
|
4167
4197
|
this.callback = callback;
|
|
4168
4198
|
this.state = {
|
|
4169
4199
|
isRunning: false,
|
|
@@ -4831,7 +4861,7 @@
|
|
|
4831
4861
|
this.head && this.setHead(this.head);
|
|
4832
4862
|
this.wrapper && this.setWrapper(this.wrapper);
|
|
4833
4863
|
this.target && this.setTarget(this.target);
|
|
4834
|
-
if(this.wrapper && this.target)this.wrapper.
|
|
4864
|
+
if(this.wrapper && this.target)this.wrapper.mount(this.target);
|
|
4835
4865
|
}
|
|
4836
4866
|
setTarget(target){
|
|
4837
4867
|
if(target instanceof HTMLElement) this.target = target;
|
|
@@ -4907,16 +4937,16 @@
|
|
|
4907
4937
|
...Object.entries(routes)
|
|
4908
4938
|
]);
|
|
4909
4939
|
this.clear();
|
|
4910
|
-
globalThis.onpopstate = this.
|
|
4940
|
+
globalThis.onpopstate = this.mount(location.pathname);
|
|
4911
4941
|
}
|
|
4912
4942
|
clear(){
|
|
4913
4943
|
[...this.routes].forEach(n=>{
|
|
4914
|
-
!isDynamic(n[0]) && n[1]?.isUIElement && n[1].
|
|
4944
|
+
!isDynamic(n[0]) && n[1]?.isUIElement && n[1].unmount();
|
|
4915
4945
|
});
|
|
4916
4946
|
// this.wrapper.clear();
|
|
4917
4947
|
return this;
|
|
4918
4948
|
}
|
|
4919
|
-
|
|
4949
|
+
mount(path){
|
|
4920
4950
|
const [mask, callback] = [...this.routes].find(route=>routesMatcher(route[0],path));
|
|
4921
4951
|
let element ;
|
|
4922
4952
|
if(isDynamic(mask)){
|
|
@@ -4924,13 +4954,13 @@
|
|
|
4924
4954
|
element = callback.call(this,params);
|
|
4925
4955
|
}
|
|
4926
4956
|
else {
|
|
4927
|
-
callback?.isUIElement && callback.
|
|
4957
|
+
callback?.isUIElement && callback.mount(this.wrapper);
|
|
4928
4958
|
if(typeof callback === "function") element = callback();
|
|
4929
4959
|
}
|
|
4930
|
-
if(element?.isUIElement) element.
|
|
4931
|
-
// if(element?.isZikoApp) element.
|
|
4960
|
+
if(element?.isUIElement) element.mount(this.wrapper);
|
|
4961
|
+
// if(element?.isZikoApp) element.mount(this.wrapper);
|
|
4932
4962
|
if(element instanceof Promise){
|
|
4933
|
-
element.then(e=>e.
|
|
4963
|
+
element.then(e=>e.mount(this.wrapper));
|
|
4934
4964
|
}
|
|
4935
4965
|
globalThis.history.pushState({}, "", path);
|
|
4936
4966
|
return this;
|
|
@@ -5366,59 +5396,23 @@
|
|
|
5366
5396
|
}
|
|
5367
5397
|
|
|
5368
5398
|
exports.App = App;
|
|
5369
|
-
exports.Arc = Arc;
|
|
5370
|
-
exports.Back = Back;
|
|
5371
5399
|
exports.Base = Base;
|
|
5372
5400
|
exports.Clock = Clock;
|
|
5373
5401
|
exports.Combinaison = Combinaison;
|
|
5374
5402
|
exports.Complex = Complex;
|
|
5375
|
-
exports.Discret = Discret;
|
|
5376
5403
|
exports.E = E;
|
|
5377
5404
|
exports.EPSILON = EPSILON;
|
|
5378
|
-
exports.Elastic = Elastic;
|
|
5379
5405
|
exports.FileBasedRouting = FileBasedRouting;
|
|
5380
5406
|
exports.Flex = Flex;
|
|
5381
5407
|
exports.HTMLWrapper = HTMLWrapper;
|
|
5382
|
-
exports.InBack = InBack;
|
|
5383
|
-
exports.InBounce = InBounce;
|
|
5384
|
-
exports.InCirc = InCirc;
|
|
5385
|
-
exports.InCubic = InCubic;
|
|
5386
|
-
exports.InElastic = InElastic;
|
|
5387
|
-
exports.InExpo = InExpo;
|
|
5388
|
-
exports.InOutBack = InOutBack;
|
|
5389
|
-
exports.InOutBounce = InOutBounce;
|
|
5390
|
-
exports.InOutCirc = InOutCirc;
|
|
5391
|
-
exports.InOutCubic = InOutCubic;
|
|
5392
|
-
exports.InOutElastic = InOutElastic;
|
|
5393
|
-
exports.InOutExpo = InOutExpo;
|
|
5394
|
-
exports.InOutQuad = InOutQuad;
|
|
5395
|
-
exports.InOutQuart = InOutQuart;
|
|
5396
|
-
exports.InOutQuint = InOutQuint;
|
|
5397
|
-
exports.InOutSin = InOutSin;
|
|
5398
|
-
exports.InQuad = InQuad;
|
|
5399
|
-
exports.InQuart = InQuart;
|
|
5400
|
-
exports.InQuint = InQuint;
|
|
5401
|
-
exports.InSin = InSin;
|
|
5402
|
-
exports.Linear = Linear;
|
|
5403
5408
|
exports.Logic = Logic$1;
|
|
5404
5409
|
exports.Matrix = Matrix;
|
|
5405
|
-
exports.OutBack = OutBack;
|
|
5406
|
-
exports.OutBounce = OutBounce;
|
|
5407
|
-
exports.OutCirc = OutCirc;
|
|
5408
|
-
exports.OutCubic = OutCubic;
|
|
5409
|
-
exports.OutElastic = OutElastic;
|
|
5410
|
-
exports.OutExpo = OutExpo;
|
|
5411
|
-
exports.OutQuad = OutQuad;
|
|
5412
|
-
exports.OutQuart = OutQuart;
|
|
5413
|
-
exports.OutQuint = OutQuint;
|
|
5414
|
-
exports.OutSin = OutSin;
|
|
5415
5410
|
exports.PI = PI$2;
|
|
5416
5411
|
exports.Permutation = Permutation;
|
|
5417
5412
|
exports.Random = Random;
|
|
5418
5413
|
exports.SPA = SPA;
|
|
5419
5414
|
exports.SVGWrapper = SVGWrapper;
|
|
5420
5415
|
exports.Scheduler = Scheduler;
|
|
5421
|
-
exports.Step = Step;
|
|
5422
5416
|
exports.Suspense = Suspense;
|
|
5423
5417
|
exports.Switch = Switch;
|
|
5424
5418
|
exports.Tick = Tick;
|
|
@@ -5459,12 +5453,14 @@
|
|
|
5459
5453
|
exports.add = add;
|
|
5460
5454
|
exports.animation = animation;
|
|
5461
5455
|
exports.arange = arange;
|
|
5456
|
+
exports.arc = arc;
|
|
5462
5457
|
exports.arr2str = arr2str;
|
|
5463
5458
|
exports.asin = asin;
|
|
5464
5459
|
exports.asinh = asinh;
|
|
5465
5460
|
exports.atan = atan;
|
|
5466
5461
|
exports.atan2 = atan2;
|
|
5467
5462
|
exports.atanh = atanh;
|
|
5463
|
+
exports.back = back;
|
|
5468
5464
|
exports.bindCustomEvent = bindCustomEvent;
|
|
5469
5465
|
exports.bindHashEvent = bindHashEvent;
|
|
5470
5466
|
exports.bindTouchEvent = bindTouchEvent;
|
|
@@ -5496,14 +5492,36 @@
|
|
|
5496
5492
|
exports.defineParamsGetter = defineParamsGetter;
|
|
5497
5493
|
exports.define_wc = define_wc;
|
|
5498
5494
|
exports.deg2rad = deg2rad;
|
|
5495
|
+
exports.discret = discret;
|
|
5499
5496
|
exports.div = div;
|
|
5500
5497
|
exports.e = e;
|
|
5498
|
+
exports.elastic = elastic;
|
|
5501
5499
|
exports.fact = fact;
|
|
5502
5500
|
exports.floor = floor;
|
|
5503
5501
|
exports.geomspace = geomspace;
|
|
5504
5502
|
exports.getEvent = getEvent;
|
|
5505
5503
|
exports.hypot = hypot;
|
|
5506
5504
|
exports.inRange = inRange;
|
|
5505
|
+
exports.in_back = in_back;
|
|
5506
|
+
exports.in_bounce = in_bounce;
|
|
5507
|
+
exports.in_circ = in_circ;
|
|
5508
|
+
exports.in_cubic = in_cubic;
|
|
5509
|
+
exports.in_elastic = in_elastic;
|
|
5510
|
+
exports.in_expo = in_expo;
|
|
5511
|
+
exports.in_out_back = in_out_back;
|
|
5512
|
+
exports.in_out_bounce = in_out_bounce;
|
|
5513
|
+
exports.in_out_circ = in_out_circ;
|
|
5514
|
+
exports.in_out_cubic = in_out_cubic;
|
|
5515
|
+
exports.in_out_elastic = in_out_elastic;
|
|
5516
|
+
exports.in_out_expo = in_out_expo;
|
|
5517
|
+
exports.in_out_quad = in_out_quad;
|
|
5518
|
+
exports.in_out_quart = in_out_quart;
|
|
5519
|
+
exports.in_out_quint = in_out_quint;
|
|
5520
|
+
exports.in_out_sin = in_out_sin;
|
|
5521
|
+
exports.in_quad = in_quad;
|
|
5522
|
+
exports.in_quart = in_quart;
|
|
5523
|
+
exports.in_quint = in_quint;
|
|
5524
|
+
exports.in_sin = in_sin;
|
|
5507
5525
|
exports.isApproximatlyEqual = isApproximatlyEqual;
|
|
5508
5526
|
exports.isStateGetter = isStateGetter;
|
|
5509
5527
|
exports.json2arr = json2arr;
|
|
@@ -5515,6 +5533,7 @@
|
|
|
5515
5533
|
exports.json2yml = json2yml;
|
|
5516
5534
|
exports.json2ymlFile = json2ymlFile;
|
|
5517
5535
|
exports.lerp = lerp;
|
|
5536
|
+
exports.linear = linear;
|
|
5518
5537
|
exports.linspace = linspace;
|
|
5519
5538
|
exports.ln = ln;
|
|
5520
5539
|
exports.logspace = logspace;
|
|
@@ -5533,6 +5552,16 @@
|
|
|
5533
5552
|
exports.nums = nums;
|
|
5534
5553
|
exports.obj2str = obj2str;
|
|
5535
5554
|
exports.ones = ones;
|
|
5555
|
+
exports.out_back = out_back;
|
|
5556
|
+
exports.out_bounce = out_bounce;
|
|
5557
|
+
exports.out_circ = out_circ;
|
|
5558
|
+
exports.out_cubic = out_cubic;
|
|
5559
|
+
exports.out_elastic = out_elastic;
|
|
5560
|
+
exports.out_expo = out_expo;
|
|
5561
|
+
exports.out_quad = out_quad;
|
|
5562
|
+
exports.out_quart = out_quart;
|
|
5563
|
+
exports.out_quint = out_quint;
|
|
5564
|
+
exports.out_sin = out_sin;
|
|
5536
5565
|
exports.pgcd = pgcd;
|
|
5537
5566
|
exports.pow = pow$1;
|
|
5538
5567
|
exports.powerSet = powerSet;
|
|
@@ -5550,6 +5579,7 @@
|
|
|
5550
5579
|
exports.sleep = sleep;
|
|
5551
5580
|
exports.sqrt = sqrt$2;
|
|
5552
5581
|
exports.sqrtn = sqrtn;
|
|
5582
|
+
exports.step = step;
|
|
5553
5583
|
exports.step_fps = step_fps;
|
|
5554
5584
|
exports.sub = sub;
|
|
5555
5585
|
exports.subSet = subSet;
|