aptechka 0.4.7 → 0.4.9
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/DragControls-CuGSxr1d.js +137 -0
- package/lib/DragControls-Dfbbq8Wb.cjs +1 -0
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +2 -2
- package/lib/controls/Controls.d.ts +1 -1
- package/lib/controls/DragControls.d.ts +16 -0
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.d.ts +1 -0
- package/lib/controls/index.js +10 -9
- package/lib/{createStylesheet-DrkbCUJk.js → createStylesheet-D6C3BPkl.js} +1 -1
- package/lib/{createStylesheet-u1ZQ2BI5.cjs → createStylesheet-W0b965g0.cjs} +1 -1
- package/lib/{createTheme-D0IoYkYN.js → createTheme-CHnsCgAr.js} +1 -1
- package/lib/{createTheme-B_W5dUY9.cjs → createTheme-Cfaw9UmV.cjs} +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +3 -3
- package/lib/en3/index.cjs +2 -2
- package/lib/en3/index.js +3 -1
- package/lib/index-C_qv6rk4.cjs +9 -0
- package/lib/{index-BigQay-N.js → index-ilQWX_BM.js} +68 -68
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +2 -1
- package/lib/order/index.js +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +4 -2
- package/lib/scroll/ScrollSegmentElement.d.ts +68 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.d.ts +2 -1
- package/lib/scroll/index.js +715 -340
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +2 -2
- package/lib/scroll-entries/index.js +27 -36
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/slicer/index.cjs +1 -1
- package/lib/slicer/index.js +1 -1
- package/lib/string-DhgS_iFl.cjs +1 -0
- package/lib/{string-3lAkpJJP.js → string-f0Dnk0L1.js} +9 -5
- package/lib/tags-CK7mk_EP.cjs +1 -0
- package/lib/{tags-CAxO5Rs3.js → tags-D0zt3vue.js} +38 -36
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +3 -3
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +43 -42
- package/lib/utils/string.d.ts +1 -0
- package/package.json +9 -11
- package/lib/WheelControls-0zNcnAB3.cjs +0 -1
- package/lib/WheelControls-BAyRKpRZ.js +0 -97
- package/lib/index-DTrWxWOM.cjs +0 -9
- package/lib/string-vBu90jhV.cjs +0 -1
- package/lib/tags-Dz_Yisj_.cjs +0 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
var k = (h, r, e) => {
|
|
2
|
+
if (!r.has(h))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
|
+
};
|
|
5
|
+
var t = (h, r, e) => (k(h, r, "read from private field"), e ? e.call(h) : r.get(h)), d = (h, r, e) => {
|
|
6
|
+
if (r.has(h))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
r instanceof WeakSet ? r.add(h) : r.set(h, e);
|
|
9
|
+
}, s = (h, r, e, a) => (k(h, r, "write to private field"), a ? a.call(h, e) : r.set(h, e), e);
|
|
10
|
+
import { i as f } from "./browser-0zX67oeU.js";
|
|
11
|
+
import { g as v } from "./dom-0S_WDL4g.js";
|
|
12
|
+
import { s as H } from "./gestures-D2Fdra_G.js";
|
|
13
|
+
import { p as W } from "./number-Bo5RdrA1.js";
|
|
14
|
+
import { Notifier as X } from "./notifier/index.js";
|
|
15
|
+
import { ticker as D } from "./ticker/index.js";
|
|
16
|
+
import { TICK_ORDER as Y } from "./order/index.js";
|
|
17
|
+
var M;
|
|
18
|
+
class C {
|
|
19
|
+
constructor() {
|
|
20
|
+
d(this, M, new X());
|
|
21
|
+
}
|
|
22
|
+
get changeEvent() {
|
|
23
|
+
return t(this, M);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
M = new WeakMap();
|
|
27
|
+
var m, n, c, x;
|
|
28
|
+
class S extends C {
|
|
29
|
+
constructor(e) {
|
|
30
|
+
super();
|
|
31
|
+
d(this, m, null);
|
|
32
|
+
d(this, n, null);
|
|
33
|
+
d(this, c, "offsetHeight");
|
|
34
|
+
d(this, x, (e) => {
|
|
35
|
+
const a = e.shiftKey ? -1 : 1;
|
|
36
|
+
let i;
|
|
37
|
+
e.code === "Space" ? i = a * t(this, n)[t(this, c)] * 0.4 : e.code === "ArrowLeft" ? i = -1 * t(this, n)[t(this, c)] * 0.2 : e.code === "ArrowRight" ? i = 1 * t(this, n)[t(this, c)] * 0.2 : e.code === "ArrowUp" ? i = -1 * t(this, n)[t(this, c)] * 0.2 : e.code === "ArrowDown" ? i = 1 * t(this, n)[t(this, c)] * 0.2 : e.code === "PageUp" ? i = -1 * t(this, n)[t(this, c)] : e.code === "PageDown" ? i = 1 * t(this, n)[t(this, c)] : e.code === "Home" ? i = 0 : e.code === "End" && (i = t(this, c) === "offsetWidth" ? t(this, n).scrollWidth : t(this, n).scrollHeight), i && (e.stopPropagation(), this.changeEvent.notify("keyboard", i));
|
|
38
|
+
});
|
|
39
|
+
f && (s(this, m, e != null && e.element && v(e.element) || window), s(this, n, t(this, m) instanceof HTMLElement ? t(this, m) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
|
|
40
|
+
}
|
|
41
|
+
set dimension(e) {
|
|
42
|
+
s(this, c, e === "width" ? "offsetWidth" : "offsetHeight");
|
|
43
|
+
}
|
|
44
|
+
connect() {
|
|
45
|
+
f && t(this, m).addEventListener(
|
|
46
|
+
"keydown",
|
|
47
|
+
t(this, x)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
disconnect() {
|
|
51
|
+
f && t(this, m).removeEventListener(
|
|
52
|
+
"keydown",
|
|
53
|
+
t(this, x)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
m = new WeakMap(), n = new WeakMap(), c = new WeakMap(), x = new WeakMap();
|
|
58
|
+
var g, u, b, y;
|
|
59
|
+
class U extends C {
|
|
60
|
+
constructor(e) {
|
|
61
|
+
super();
|
|
62
|
+
d(this, g, null);
|
|
63
|
+
d(this, u, void 0);
|
|
64
|
+
d(this, b, void 0);
|
|
65
|
+
d(this, y, (e) => {
|
|
66
|
+
let a = 0;
|
|
67
|
+
if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY)))
|
|
68
|
+
if (a = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), e.preventDefault(), this.debounce) {
|
|
69
|
+
const i = Date.now();
|
|
70
|
+
if (i - t(this, b) > 40 && (a = 100 * Math.sign(a)), s(this, b, i), Math.abs(a) < 100 || t(this, u))
|
|
71
|
+
return;
|
|
72
|
+
this.changeEvent.notify("wheel", a), s(this, u, setTimeout(() => {
|
|
73
|
+
s(this, u, void 0);
|
|
74
|
+
}, 80));
|
|
75
|
+
} else
|
|
76
|
+
this.changeEvent.notify("wheel", a);
|
|
77
|
+
});
|
|
78
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, s(this, b, Date.now()), f && s(this, g, e != null && e.element && v(e.element) || window);
|
|
79
|
+
}
|
|
80
|
+
connect() {
|
|
81
|
+
f && t(this, g).addEventListener(
|
|
82
|
+
"wheel",
|
|
83
|
+
t(this, y),
|
|
84
|
+
{
|
|
85
|
+
passive: !1
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
disconnect() {
|
|
90
|
+
f && (t(this, g).removeEventListener(
|
|
91
|
+
"wheel",
|
|
92
|
+
t(this, y)
|
|
93
|
+
), clearTimeout(t(this, u)));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
g = new WeakMap(), u = new WeakMap(), b = new WeakMap(), y = new WeakMap();
|
|
97
|
+
var o, E, l, L, w;
|
|
98
|
+
class B extends C {
|
|
99
|
+
constructor(e) {
|
|
100
|
+
super();
|
|
101
|
+
d(this, o, null);
|
|
102
|
+
d(this, E, !1);
|
|
103
|
+
d(this, l, 0);
|
|
104
|
+
d(this, L, (e) => {
|
|
105
|
+
this.swipe || D.unsubscribe(t(this, w));
|
|
106
|
+
let a = e;
|
|
107
|
+
s(this, l, 0), H(
|
|
108
|
+
(i) => {
|
|
109
|
+
t(this, E) || (this.swipe && s(this, E, !0), this.axis === "x" ? s(this, l, a.x - i.x) : s(this, l, a.y - i.y), a = i, this.changeEvent.notify("drag", t(this, l)));
|
|
110
|
+
},
|
|
111
|
+
() => {
|
|
112
|
+
s(this, l, t(this, l) * 3), this.swipe || D.subscribe(t(this, w), { order: Y.SCROLL - 1 }), s(this, E, !1);
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
d(this, w, () => {
|
|
117
|
+
t(this, l) || D.unsubscribe(t(this, w)), s(this, l, t(this, l) * 0.95), s(this, l, W(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l));
|
|
118
|
+
});
|
|
119
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, f && s(this, o, e != null && e.element && v(e.element) || document.documentElement);
|
|
120
|
+
}
|
|
121
|
+
connect() {
|
|
122
|
+
f && t(this, o).addEventListener("pointerdown", t(this, L));
|
|
123
|
+
}
|
|
124
|
+
disconnect() {
|
|
125
|
+
f && (t(this, o).removeEventListener(
|
|
126
|
+
"pointerdown",
|
|
127
|
+
t(this, L)
|
|
128
|
+
), D.unsubscribe(t(this, w)));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
o = new WeakMap(), E = new WeakMap(), l = new WeakMap(), L = new WeakMap(), w = new WeakMap();
|
|
132
|
+
export {
|
|
133
|
+
C,
|
|
134
|
+
B as D,
|
|
135
|
+
S as K,
|
|
136
|
+
U as W
|
|
137
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var M=(r,h,e)=>{if(!h.has(r))throw TypeError("Cannot "+e)};var t=(r,h,e)=>(M(r,h,"read from private field"),e?e.call(r):h.get(r)),l=(r,h,e)=>{if(h.has(r))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(r):h.set(r,e)},i=(r,h,e,n)=>(M(r,h,"write to private field"),n?n.call(r,e):h.set(r,e),e);const f=require("./browser-CpzFX2xg.cjs"),B=require("./dom-JBOkFLTh.cjs"),v=require("./gestures-DHLrn6Q8.cjs"),q=require("./number-yVpzMdbQ.cjs"),H=require("./notifier/index.cjs"),k=require("./ticker/index.cjs"),W=require("./order/index.cjs");var C;class D{constructor(){l(this,C,new H.Notifier)}get changeEvent(){return t(this,C)}}C=new WeakMap;var u,a,c,x;class X extends D{constructor(e){super();l(this,u,null);l(this,a,null);l(this,c,"offsetHeight");l(this,x,e=>{const n=e.shiftKey?-1:1;let s;e.code==="Space"?s=n*t(this,a)[t(this,c)]*.4:e.code==="ArrowLeft"?s=-1*t(this,a)[t(this,c)]*.2:e.code==="ArrowRight"?s=1*t(this,a)[t(this,c)]*.2:e.code==="ArrowUp"?s=-1*t(this,a)[t(this,c)]*.2:e.code==="ArrowDown"?s=1*t(this,a)[t(this,c)]*.2:e.code==="PageUp"?s=-1*t(this,a)[t(this,c)]:e.code==="PageDown"?s=1*t(this,a)[t(this,c)]:e.code==="Home"?s=0:e.code==="End"&&(s=t(this,c)==="offsetWidth"?t(this,a).scrollWidth:t(this,a).scrollHeight),s&&(e.stopPropagation(),this.changeEvent.notify("keyboard",s))});f.isBrowser&&(i(this,u,e!=null&&e.element&&B.getElement(e.element)||window),i(this,a,t(this,u)instanceof HTMLElement?t(this,u):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,c,e==="width"?"offsetWidth":"offsetHeight")}connect(){f.isBrowser&&t(this,u).addEventListener("keydown",t(this,x))}disconnect(){f.isBrowser&&t(this,u).removeEventListener("keydown",t(this,x))}}u=new WeakMap,a=new WeakMap,c=new WeakMap,x=new WeakMap;var o,w,g,y;class Y extends D{constructor(e){super();l(this,o,null);l(this,w,void 0);l(this,g,void 0);l(this,y,e=>{let n=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)))if(n=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),e.preventDefault(),this.debounce){const s=Date.now();if(s-t(this,g)>40&&(n=100*Math.sign(n)),i(this,g,s),Math.abs(n)<100||t(this,w))return;this.changeEvent.notify("wheel",n),i(this,w,setTimeout(()=>{i(this,w,void 0)},80))}else this.changeEvent.notify("wheel",n)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,g,Date.now()),f.isBrowser&&i(this,o,e!=null&&e.element&&B.getElement(e.element)||window)}connect(){f.isBrowser&&t(this,o).addEventListener("wheel",t(this,y),{passive:!1})}disconnect(){f.isBrowser&&(t(this,o).removeEventListener("wheel",t(this,y)),clearTimeout(t(this,w)))}}o=new WeakMap,w=new WeakMap,g=new WeakMap,y=new WeakMap;var b,E,d,L,m;class A extends D{constructor(e){super();l(this,b,null);l(this,E,!1);l(this,d,0);l(this,L,e=>{this.swipe||k.ticker.unsubscribe(t(this,m));let n=e;i(this,d,0),v.setupDrag(s=>{t(this,E)||(this.swipe&&i(this,E,!0),this.axis==="x"?i(this,d,n.x-s.x):i(this,d,n.y-s.y),n=s,this.changeEvent.notify("drag",t(this,d)))},()=>{i(this,d,t(this,d)*3),this.swipe||k.ticker.subscribe(t(this,m),{order:W.TICK_ORDER.SCROLL-1}),i(this,E,!1)})});l(this,m,()=>{t(this,d)||k.ticker.unsubscribe(t(this,m)),i(this,d,t(this,d)*.95),i(this,d,q.preciseNumber(t(this,d),3)),this.changeEvent.notify("drag",t(this,d))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,f.isBrowser&&i(this,b,e!=null&&e.element&&B.getElement(e.element)||document.documentElement)}connect(){f.isBrowser&&t(this,b).addEventListener("pointerdown",t(this,L))}disconnect(){f.isBrowser&&(t(this,b).removeEventListener("pointerdown",t(this,L)),k.ticker.unsubscribe(t(this,m)))}}b=new WeakMap,E=new WeakMap,d=new WeakMap,L=new WeakMap,m=new WeakMap;exports.Controls=D;exports.DragControls=A;exports.KeyboardControls=X;exports.WheelControls=Y;
|
package/lib/canvas/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const S=require("../math-GDWEqu7y.cjs"),E=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const S=require("../math-GDWEqu7y.cjs"),E=require("../tags-CK7mk_EP.cjs"),b=require("../createStylesheet-W0b965g0.cjs"),k=require("../element-resizer/index.cjs"),C=require("../ticker/index.cjs");var y=Object.defineProperty,q=Object.getOwnPropertyDescriptor,P=(i,e,s,h)=>{for(var r=h>1?void 0:h?q(e,s):e,f=i.length-1,g;f>=0;f--)(g=i[f])&&(r=(h?g(e,s,r):g(r))||r);return h&&r&&y(e,s,r),r},R=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(R(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},c=(i,e,s,h)=>(R(i,e,"write to private field"),h?h.call(i,s):e.set(i,s),s),M=(i,e,s)=>(R(i,e,"access private method"),s),n,p,l,o,d,u,v,_,m,w,x;const O=b.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends W.CustomElement{constructor(){super(),a(this,w),a(this,n,null),a(this,p,null),a(this,l,0),a(this,o,0),a(this,d,1),a(this,u,0),a(this,v,1),a(this,_,e=>{c(this,d,S.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,o,e.contentRect.height),t(this,n).width=t(this,l)*this.pixelRatio,t(this,n).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),M(this,w,x).call(this)}),a(this,m,e=>{c(this,u,e.timestamp),c(this,v,e.elapsed),M(this,w,x).call(this)}),this.openShadow(O),E.element(this,{children:E.canvas({ref:e=>{c(this,n,e),c(this,p,e.getContext("2d"))}})})}get canvasElement(){return t(this,n)}get context(){return t(this,p)}get pixelRatio(){return t(this,d)}get width(){return t(this,l)}get height(){return t(this,o)}get detail(){return{width:t(this,l),height:t(this,o),element:this,canvasElement:t(this,n),pixelRatio:t(this,d),context:t(this,p),timestamp:t(this,u),elapsed:t(this,v)}}connectedCallback(){k.elementResizer.subscribe(this,t(this,_)),this.hasAttribute("static")||C.ticker.subscribe(t(this,m),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){k.elementResizer.unsubscribe(t(this,_)),C.ticker.unsubscribe(t(this,m)),t(this,n).remove()}};n=new WeakMap;p=new WeakMap;l=new WeakMap;o=new WeakMap;d=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;m=new WeakMap;w=new WeakSet;x=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))};exports.CanvasElement=P([W.define("e-canvas")],exports.CanvasElement);
|
package/lib/canvas/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CustomElement as M, define as b } from "../custom-element/index.js";
|
|
2
2
|
import "../Store-BQXXikps.js";
|
|
3
3
|
import { c as P } from "../math-BOBiC4TN.js";
|
|
4
|
-
import { e as S, q as y } from "../tags-
|
|
5
|
-
import { c as A } from "../createStylesheet-
|
|
4
|
+
import { e as S, q as y } from "../tags-D0zt3vue.js";
|
|
5
|
+
import { c as A } from "../createStylesheet-D6C3BPkl.js";
|
|
6
6
|
import { elementResizer as k } from "../element-resizer/index.js";
|
|
7
7
|
import { ticker as E } from "../ticker/index.js";
|
|
8
8
|
var O = Object.defineProperty, z = Object.getOwnPropertyDescriptor, D = (t, i, s, r) => {
|
package/lib/checkbox/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const r=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const r=require("../tags-CK7mk_EP.cjs"),_=require("../createStylesheet-W0b965g0.cjs"),l=require("../theme/index.cjs"),w='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>';var x=Object.defineProperty,b=Object.getOwnPropertyDescriptor,y=(t,e,a,i)=>{for(var h=i>1?void 0:i?b(e,a):e,p=t.length-1,v;p>=0;p--)(v=t[p])&&(h=(i?v(e,a,h):v(h))||h);return i&&h&&x(e,a,h),h},k=(t,e,a)=>{if(!e.has(t))throw TypeError("Cannot "+a)},n=(t,e,a)=>(k(t,e,"read from private field"),a?a.call(t):e.get(t)),f=(t,e,a)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,a)},g=(t,e,a,i)=>(k(t,e,"write to private field"),i?i.call(t,a):e.set(t,a),a),u=(t,e,a)=>(k(t,e,"access private method"),a),s,d,c,o;const C=_.createStylesheet({":host":{position:"relative",display:"inline-block",width:l.aptechkaTheme.heightInput.var,height:l.aptechkaTheme.heightInput.var,borderRadius:l.aptechkaTheme.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:l.aptechkaTheme.colorDarkAux.var},".default svg":{width:"60%",height:"60%",fill:l.aptechkaTheme.colorLight.var,opacity:0,transition:l.aptechkaTheme.durationShort.var},":host(.checked) .default svg":{opacity:1}});exports.CheckboxElement=class extends m.CustomElement{constructor(){super(),f(this,c),f(this,s,null),f(this,d,void 0),this.openShadow(C),g(this,d,this.attachInternals()),r.element(this,{children:r.label({children:[r.span({class:"fake",children:r.slot({children:[r.span({class:"default",children:[w]})]})}),r.input({ref:e=>{g(this,s,e),e.required=this.hasAttribute("required"),e.value=this.getAttribute("value")||"",e.checked=this.hasAttribute("checked"),e.name=this.getAttribute("name")||"",u(this,c,o).call(this)},class:"real",type:"checkbox",onChange:()=>{u(this,c,o).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return n(this,s).checked}set checked(e){n(this,s).checked=e,u(this,c,o).call(this)}get value(){return n(this,s).value}set value(e){n(this,s).value=e,u(this,c,o).call(this)}};s=new WeakMap;d=new WeakMap;c=new WeakSet;o=function(){this.checked?n(this,d).setFormValue(this.value):n(this,d).setFormValue(null),this.classList.toggle("checked",this.checked)};exports.CheckboxElement.formAssociated=!0;exports.CheckboxElement=y([m.define("e-checkbox")],exports.CheckboxElement);
|
package/lib/checkbox/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomElement as w, define as _ } from "../custom-element/index.js";
|
|
2
2
|
import "../Store-BQXXikps.js";
|
|
3
|
-
import { e as y, a3 as x, aB as m, ay as b, a0 as C } from "../tags-
|
|
4
|
-
import { c as A } from "../createStylesheet-
|
|
3
|
+
import { e as y, a3 as x, aB as m, ay as b, a0 as C } from "../tags-D0zt3vue.js";
|
|
4
|
+
import { c as A } from "../createStylesheet-D6C3BPkl.js";
|
|
5
5
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
6
6
|
const E = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>';
|
|
7
7
|
var S = Object.defineProperty, I = Object.getOwnPropertyDescriptor, F = (e, t, a, i) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Notifier } from '../notifier';
|
|
2
2
|
|
|
3
|
-
export type ControlsCallback = (value: number) => void;
|
|
3
|
+
export type ControlsCallback = (type: string, value: number) => void;
|
|
4
4
|
export declare abstract class Controls {
|
|
5
5
|
#private;
|
|
6
6
|
get changeEvent(): Notifier<ControlsCallback>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Controls } from './Controls';
|
|
2
|
+
import { Axes2D } from '../utils';
|
|
3
|
+
|
|
4
|
+
export interface DragControlsOptions {
|
|
5
|
+
element?: HTMLElement;
|
|
6
|
+
axis?: Axes2D;
|
|
7
|
+
swipe?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class DragControls extends Controls {
|
|
10
|
+
#private;
|
|
11
|
+
axis: Axes2D;
|
|
12
|
+
swipe: boolean;
|
|
13
|
+
constructor(options?: DragControlsOptions);
|
|
14
|
+
connect(): void;
|
|
15
|
+
disconnect(): void;
|
|
16
|
+
}
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var n=(r,t,e)=>(a(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-Dfbbq8Wb.cjs"),i=require("../ticker/index.cjs");var s;class c extends o.Controls{constructor(e){super();l(this,s,e=>{this.changeEvent.notify("linear",e.elapsed*this.speed)});this.speed=(e==null?void 0:e.speed)||1}connect(){i.ticker.subscribe(n(this,s))}disconnect(){i.ticker.unsubscribe(n(this,s))}}s=new WeakMap;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.LinearControls=c;
|
package/lib/controls/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { Controls } from './Controls';
|
|
|
2
2
|
export { KeyboardControls } from './KeyboardControls';
|
|
3
3
|
export { LinearControls, type LinearControlsOptions } from './LinearControls';
|
|
4
4
|
export { WheelControls, type WheelControlsOptions } from './WheelControls';
|
|
5
|
+
export { DragControls, type DragControlsOptions } from './DragControls';
|
package/lib/controls/index.js
CHANGED
|
@@ -2,34 +2,35 @@ var c = (s, r, e) => {
|
|
|
2
2
|
if (!r.has(s))
|
|
3
3
|
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
5
|
+
var a = (s, r, e) => (c(s, r, "read from private field"), e ? e.call(s) : r.get(s)), o = (s, r, e) => {
|
|
6
6
|
if (r.has(s))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
r instanceof WeakSet ? r.add(s) : r.set(s, e);
|
|
9
9
|
};
|
|
10
|
-
import { C as i } from "../
|
|
11
|
-
import {
|
|
10
|
+
import { C as i } from "../DragControls-CuGSxr1d.js";
|
|
11
|
+
import { D as p, K as u, W as f } from "../DragControls-CuGSxr1d.js";
|
|
12
12
|
import { ticker as n } from "../ticker/index.js";
|
|
13
13
|
var t;
|
|
14
14
|
class m extends i {
|
|
15
15
|
constructor(e) {
|
|
16
16
|
super();
|
|
17
|
-
|
|
18
|
-
this.changeEvent.notify(e.elapsed * this.speed);
|
|
17
|
+
o(this, t, (e) => {
|
|
18
|
+
this.changeEvent.notify("linear", e.elapsed * this.speed);
|
|
19
19
|
});
|
|
20
20
|
this.speed = (e == null ? void 0 : e.speed) || 1;
|
|
21
21
|
}
|
|
22
22
|
connect() {
|
|
23
|
-
n.subscribe(
|
|
23
|
+
n.subscribe(a(this, t));
|
|
24
24
|
}
|
|
25
25
|
disconnect() {
|
|
26
|
-
n.unsubscribe(
|
|
26
|
+
n.unsubscribe(a(this, t));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
t = new WeakMap();
|
|
30
30
|
export {
|
|
31
31
|
i as Controls,
|
|
32
|
-
p as
|
|
32
|
+
p as DragControls,
|
|
33
|
+
u as KeyboardControls,
|
|
33
34
|
m as LinearControls,
|
|
34
|
-
|
|
35
|
+
f as WheelControls
|
|
35
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./tags-
|
|
1
|
+
"use strict";const n=require("./tags-CK7mk_EP.cjs");function r(t){const e=new CSSStyleSheet;return e.replaceSync(n.style(t).node.innerHTML),e}exports.createStylesheet=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./string-
|
|
1
|
+
"use strict";const l=require("./string-DhgS_iFl.cjs");function s(r,a){const t=(a==null?void 0:a.prefix)||"",c={style:{}};for(const e in r)c[e]={var:`var(--${t}${l.camelToKebab(e)})`,value:r[e]},c.style[`--${t}${l.camelToKebab(e)}`]=r[e];return c}exports.createTheme=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tags-CK7mk_EP.cjs"),t=require("../createStylesheet-W0b965g0.cjs"),a=require("../createTheme-Cfaw9UmV.cjs");exports.ElementConstructor=e.ElementConstructor;exports.a=e.a;exports.abbr=e.abbr;exports.address=e.address;exports.area=e.area;exports.article=e.article;exports.aside=e.aside;exports.audio=e.audio;exports.b=e.b;exports.base=e.base;exports.bdi=e.bdi;exports.bdo=e.bdo;exports.blockquote=e.blockquote;exports.body=e.body;exports.br=e.br;exports.button=e.button;exports.canvas=e.canvas;exports.caption=e.caption;exports.cite=e.cite;exports.code=e.code;exports.col=e.col;exports.colgroup=e.colgroup;exports.contents=e.contents;exports.data=e.data;exports.datalist=e.datalist;exports.dd=e.dd;exports.del=e.del;exports.details=e.details;exports.dfn=e.dfn;exports.dialog=e.dialog;exports.div=e.div;exports.dl=e.dl;exports.dt=e.dt;exports.element=e.element;exports.em=e.em;exports.embed=e.embed;exports.empty=e.empty;exports.fieldset=e.fieldset;exports.figcaption=e.figcaption;exports.figure=e.figure;exports.footer=e.footer;exports.form=e.form;exports.fragment=e.fragment;exports.h1=e.h1;exports.h2=e.h2;exports.h3=e.h3;exports.h4=e.h4;exports.h5=e.h5;exports.h6=e.h6;exports.head=e.head;exports.header=e.header;exports.hgroup=e.hgroup;exports.hr=e.hr;exports.html=e.html;exports.htmlVar=e.htmlVar;exports.i=e.i;exports.iframe=e.iframe;exports.img=e.img;exports.input=e.input;exports.ins=e.ins;exports.kbd=e.kbd;exports.label=e.label;exports.legend=e.legend;exports.li=e.li;exports.link=e.link;exports.main=e.main;exports.map=e.map;exports.mark=e.mark;exports.menu=e.menu;exports.meta=e.meta;exports.meter=e.meter;exports.nav=e.nav;exports.noscript=e.noscript;exports.object=e.object;exports.ol=e.ol;exports.optgroup=e.optgroup;exports.option=e.option;exports.output=e.output;exports.p=e.p;exports.picture=e.picture;exports.pre=e.pre;exports.progress=e.progress;exports.q=e.q;exports.rp=e.rp;exports.rt=e.rt;exports.ruby=e.ruby;exports.s=e.s;exports.samp=e.samp;exports.script=e.script;exports.search=e.search;exports.section=e.section;exports.select=e.select;exports.slot=e.slot;exports.small=e.small;exports.source=e.source;exports.span=e.span;exports.strong=e.strong;exports.style=e.style;exports.sub=e.sub;exports.summary=e.summary;exports.sup=e.sup;exports.table=e.table;exports.tbody=e.tbody;exports.td=e.td;exports.template=e.template;exports.textarea=e.textarea;exports.tfoot=e.tfoot;exports.th=e.th;exports.thead=e.thead;exports.time=e.time;exports.title=e.title;exports.tr=e.tr;exports.track=e.track;exports.u=e.u;exports.ul=e.ul;exports.video=e.video;exports.wbr=e.wbr;exports.createStylesheet=t.createStylesheet;exports.createTheme=a.createTheme;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as e, a as t, b as r, c as o, d as i, f as l, g as d, h as m, i as p, j as c, k as n, l as u, m as b, n as h, o as f, p as g, q as y, r as k, s as v, t as x, u as q, v as j, a_ as w, w as C, x as E, y as S, z as T, A as V, B as z, C as A, D as B, F as D, G as F, e as G, H, I, aZ as J, J as K, K as L, L as M, M as N, N as O, aY as P, O as Q, P as R, Q as U, R as W, S as X, T as Y, U as Z, V as _, W as $, X as aa, Y as sa, aV as ea, Z as ta, _ as ra, $ as oa, a0 as ia, a1 as la, a2 as da, a3 as ma, a4 as pa, a5 as ca, a6 as na, a7 as ua, a8 as ba, a9 as ha, aa as fa, ab as ga, ac as ya, ad as ka, ae as va, af as xa, ag as qa, ah as ja, ai as wa, aj as Ca, ak as Ea, al as Sa, am as Ta, an as Va, ao as za, ap as Aa, aq as Ba, ar as Da, as as Fa, at as Ga, au as Ha, av as Ia, aw as Ja, ax as Ka, ay as La, az as Ma, aA as Na, aB as Oa, aC as Pa, aD as Qa, aE as Ra, aF as Ua, aG as Wa, aH as Xa, aI as Ya, aJ as Za, aK as _a, aL as $a, aM as as, aN as ss, aO as es, aP as ts, aQ as rs, aR as os, aS as is, aT as ls, aU as ds, aW as ms, aX as ps } from "../tags-
|
|
2
|
-
import { c as ns } from "../createStylesheet-
|
|
3
|
-
import { c as bs } from "../createTheme-
|
|
1
|
+
import { E as e, a as t, b as r, c as o, d as i, f as l, g as d, h as m, i as p, j as c, k as n, l as u, m as b, n as h, o as f, p as g, q as y, r as k, s as v, t as x, u as q, v as j, a_ as w, w as C, x as E, y as S, z as T, A as V, B as z, C as A, D as B, F as D, G as F, e as G, H, I, aZ as J, J as K, K as L, L as M, M as N, N as O, aY as P, O as Q, P as R, Q as U, R as W, S as X, T as Y, U as Z, V as _, W as $, X as aa, Y as sa, aV as ea, Z as ta, _ as ra, $ as oa, a0 as ia, a1 as la, a2 as da, a3 as ma, a4 as pa, a5 as ca, a6 as na, a7 as ua, a8 as ba, a9 as ha, aa as fa, ab as ga, ac as ya, ad as ka, ae as va, af as xa, ag as qa, ah as ja, ai as wa, aj as Ca, ak as Ea, al as Sa, am as Ta, an as Va, ao as za, ap as Aa, aq as Ba, ar as Da, as as Fa, at as Ga, au as Ha, av as Ia, aw as Ja, ax as Ka, ay as La, az as Ma, aA as Na, aB as Oa, aC as Pa, aD as Qa, aE as Ra, aF as Ua, aG as Wa, aH as Xa, aI as Ya, aJ as Za, aK as _a, aL as $a, aM as as, aN as ss, aO as es, aP as ts, aQ as rs, aR as os, aS as is, aT as ls, aU as ds, aW as ms, aX as ps } from "../tags-D0zt3vue.js";
|
|
2
|
+
import { c as ns } from "../createStylesheet-D6C3BPkl.js";
|
|
3
|
+
import { c as bs } from "../createTheme-CHnsCgAr.js";
|
|
4
4
|
export {
|
|
5
5
|
e as ElementConstructor,
|
|
6
6
|
t as a,
|