aptechka 0.1.16 → 0.1.18
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/lib/{Composed-DhtYBEmo.js → Composed-ClTo1f0b.js} +19 -19
- package/lib/Composed-Mdr4ZFbI.cjs +1 -0
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +2 -0
- package/lib/attribute/index.js +43 -34
- package/lib/component/Component.d.ts +1 -5
- package/lib/component/hooks/attributes.d.ts +2 -0
- package/lib/component/index.cjs +1 -1
- package/lib/component/index.d.ts +1 -1
- package/lib/component/index.js +135 -132
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +16 -16
- package/lib/en3/index.cjs +5 -5
- package/lib/en3/index.js +501 -499
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +14 -14
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.d.ts +18 -3
- package/lib/ladder/index.js +124 -68
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +61 -61
- package/lib/store/DerivedArray.d.ts +1 -1
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +2 -2
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +16 -16
- package/package.json +1 -1
- package/lib/Composed-C2Vv1xxR.cjs +0 -1
- package/lib/component/hooks/context.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Store, StoreOptions } from './Store';
|
|
2
|
-
export type DerivedArrayCallback<StoreType, DerivedType> = (value: StoreType) => DerivedType;
|
|
2
|
+
export type DerivedArrayCallback<StoreType, DerivedType> = (value: StoreType, index: number) => DerivedType;
|
|
3
3
|
export declare class DerivedArray<DerivedType, StoreType extends Array<any> = Array<any>> extends Store<DerivedType[]> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(store: Store<StoreType>, callback: DerivedArrayCallback<StoreType[number], DerivedType>, parameters?: StoreOptions<DerivedType[]>);
|
package/lib/store/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var g=(e,r,t)=>{if(!r.has(e))throw TypeError("Cannot "+t)};var u=(e,r,t)=>(g(e,r,"read from private field"),t?t.call(e):r.get(e)),l=(e,r,t)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,t)},v=(e,r,t,s)=>(g(e,r,"write to private field"),s?s.call(e,t):r.set(e,t),t);var S=(e,r,t,s)=>({set _(o){v(e,r,o,t)},get _(){return u(e,r,s)}});var y=(e,r,t)=>new Promise((s,o)=>{var R=i=>{try{p(t.next(i))}catch(m){o(m)}},C=i=>{try{p(t.throw(i))}catch(m){o(m)}},p=i=>i.done?s(i.value):Promise.resolve(i.value).then(R,C);p((t=t.apply(e,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../Store-D0_rDIsE.cjs"),A=require("../Derived-SjPdLJiZ.cjs"),d=require("../Composed-
|
|
1
|
+
"use strict";var g=(e,r,t)=>{if(!r.has(e))throw TypeError("Cannot "+t)};var u=(e,r,t)=>(g(e,r,"read from private field"),t?t.call(e):r.get(e)),l=(e,r,t)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,t)},v=(e,r,t,s)=>(g(e,r,"write to private field"),s?s.call(e,t):r.set(e,t),t);var S=(e,r,t,s)=>({set _(o){v(e,r,o,t)},get _(){return u(e,r,s)}});var y=(e,r,t)=>new Promise((s,o)=>{var R=i=>{try{p(t.next(i))}catch(m){o(m)}},C=i=>{try{p(t.throw(i))}catch(m){o(m)}},p=i=>i.done?s(i.value):Promise.resolve(i.value).then(R,C);p((t=t.apply(e,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../Store-D0_rDIsE.cjs"),A=require("../Derived-SjPdLJiZ.cjs"),d=require("../Composed-Mdr4ZFbI.cjs");var c,a,n;class D extends d.Resource{constructor(t,s,o=100){super(t,s,{manualControl:!0,skipSubscribeNotification:!0});l(this,c,void 0);l(this,a,void 0);l(this,n,0);v(this,a,o)}get step(){return u(this,n)}startAccumulating(){v(this,c,setInterval(()=>y(this,null,function*(){++S(this,n)._,this.refetch()}),u(this,a)))}stopAccumulating(){clearInterval(u(this,c))}close(){super.close(),this.stopAccumulating()}}c=new WeakMap,a=new WeakMap,n=new WeakMap;exports.Store=h.Store;exports.activeStores=h.activeStores;exports.storeRegistry=h.storeRegistry;exports.Derived=A.Derived;exports.Composed=d.Composed;exports.DerivedArray=d.DerivedArray;exports.Resource=d.Resource;exports.CumulativeResource=D;
|
package/lib/store/index.js
CHANGED
|
@@ -33,8 +33,8 @@ var d = (t, s, e) => new Promise((r, a) => {
|
|
|
33
33
|
});
|
|
34
34
|
import { S as I, a as b, s as k } from "../Store-JOKrNVEr.js";
|
|
35
35
|
import { D as j } from "../Derived-Bc88XJ8J.js";
|
|
36
|
-
import { R as A } from "../Composed-
|
|
37
|
-
import { C as w, D as z } from "../Composed-
|
|
36
|
+
import { R as A } from "../Composed-ClTo1f0b.js";
|
|
37
|
+
import { C as w, D as z } from "../Composed-ClTo1f0b.js";
|
|
38
38
|
var c, u, l;
|
|
39
39
|
class R extends A {
|
|
40
40
|
constructor(e, r, a = 100) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var c=(e,i,s)=>{if(!i.has(e))throw TypeError("Cannot "+s)};var n=(e,i,s)=>(c(e,i,"read from private field"),s?s.call(e):i.get(e)),d=(e,i,s)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,s)},w=(e,i,s,o)=>(c(e,i,"write to private field"),o?o.call(e,s):i.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../notifier/index.cjs"),a=require("../browser-CpzFX2xg.cjs"),h=require("../function-MthRj-GJ.cjs"),v=h.debounce(e=>{e?window.dispatchEvent(new CustomEvent("resize",{detail:{cause:e}})):window.dispatchEvent(new Event("resize"))},0);var t,r,u;class z extends b.Notifier{constructor(){super();d(this,t,!1);d(this,r,()=>{n(this,t)||(w(this,t,!0),n(this,u).call(this))});d(this,u,h.debounce(()=>{this.notify(),w(this,t,!1)},0));a.isBrowser&&(window.addEventListener("resize",n(this,r)),n(this,r).call(this))}subscribe(s,o){const f=super.subscribe(s,o);return n(this,t)||s(),f}}t=new WeakMap,r=new WeakMap,u=new WeakMap;const l=new z;exports.WindowResizer=z;exports.dispatchWindowResizeEvent=v;exports.windowResizer=l;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var f = (e,
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var f = (e, i, s) => {
|
|
2
|
+
if (!i.has(e))
|
|
3
|
+
throw TypeError("Cannot " + s);
|
|
4
4
|
};
|
|
5
|
-
var r = (e,
|
|
6
|
-
if (
|
|
5
|
+
var r = (e, i, s) => (f(e, i, "read from private field"), s ? s.call(e) : i.get(e)), d = (e, i, s) => {
|
|
6
|
+
if (i.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
8
|
+
i instanceof WeakSet ? i.add(e) : i.set(e, s);
|
|
9
|
+
}, h = (e, i, s, o) => (f(e, i, "write to private field"), o ? o.call(e, s) : i.set(e, s), s);
|
|
10
10
|
import { Notifier as p } from "../notifier/index.js";
|
|
11
11
|
import { i as z } from "../browser-0zX67oeU.js";
|
|
12
12
|
import { d as u } from "../function-C10DGppn.js";
|
|
@@ -19,25 +19,25 @@ const l = u((e) => {
|
|
|
19
19
|
})
|
|
20
20
|
) : window.dispatchEvent(new Event("resize"));
|
|
21
21
|
}, 0);
|
|
22
|
-
var t, n,
|
|
22
|
+
var t, n, w;
|
|
23
23
|
class a extends p {
|
|
24
24
|
constructor() {
|
|
25
25
|
super();
|
|
26
26
|
d(this, t, !1);
|
|
27
27
|
d(this, n, () => {
|
|
28
|
-
r(this, t) || (
|
|
28
|
+
r(this, t) || (h(this, t, !0), r(this, w).call(this));
|
|
29
29
|
});
|
|
30
|
-
d(this,
|
|
31
|
-
this.notify(),
|
|
30
|
+
d(this, w, u(() => {
|
|
31
|
+
this.notify(), h(this, t, !1);
|
|
32
32
|
}, 0));
|
|
33
|
-
z && (addEventListener("resize", r(this, n)), r(this, n).call(this));
|
|
33
|
+
z && (window.addEventListener("resize", r(this, n)), r(this, n).call(this));
|
|
34
34
|
}
|
|
35
|
-
subscribe(
|
|
36
|
-
const c = super.subscribe(
|
|
37
|
-
return r(this, t) ||
|
|
35
|
+
subscribe(s, o) {
|
|
36
|
+
const c = super.subscribe(s, o);
|
|
37
|
+
return r(this, t) || s(), c;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
t = new WeakMap(), n = new WeakMap(),
|
|
40
|
+
t = new WeakMap(), n = new WeakMap(), w = new WeakMap();
|
|
41
41
|
const R = new a();
|
|
42
42
|
export {
|
|
43
43
|
a as WindowResizer,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=(r,s,e)=>{if(!s.has(r))throw TypeError("Cannot "+e)};var t=(r,s,e)=>(g(r,s,"read from private field"),e?e.call(r):s.get(r)),h=(r,s,e)=>{if(s.has(r))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(r):s.set(r,e)},f=(r,s,e,c)=>(g(r,s,"write to private field"),c?c.call(r,e):s.set(r,e),e);const x=require("./Store-D0_rDIsE.cjs"),v=require("./function-MthRj-GJ.cjs");var a;class C extends x.Store{constructor(e,c,u){super(null,u);h(this,a,void 0);f(this,a,e.subscribe(o=>{const l=[];o.current.forEach((m,p)=>{var S;o.current[p]===((S=o.previous)==null?void 0:S[p])&&this.current[p]?l.push(this.current[p]):l.push(c(m))}),this.current=l}))}close(){super.close(),t(this,a).call(this)}}a=new WeakMap;var d,n,i;class E extends x.Store{constructor(e,c,u){super(e,u);h(this,d,void 0);h(this,n,void 0);h(this,i,0);f(this,n,new x.Store(!1)),f(this,d,c),u!=null&&u.manualControl||this.refetch()}get isPending(){return t(this,n)}refetch(){t(this,n).current=!0,f(this,i,t(this,i)+1);const e=t(this,i);t(this,d).call(this).then(c=>{e===t(this,i)&&(t(this,n).current=!1,this.current=c)})}}d=new WeakMap,n=new WeakMap,i=new WeakMap;var b;class q extends x.Store{constructor(e,c,u){super(null,u);h(this,b,[]);const o=v.debounce(()=>{this.current=c()},0);e.forEach(l=>{t(this,b).push(l.subscribe(()=>{o()}))})}close(){super.close(),t(this,b).forEach(e=>e())}}b=new WeakMap;exports.Composed=q;exports.DerivedArray=C;exports.Resource=E;
|