aptechka 0.1.6 → 0.1.7
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/Animated-Bf-gPIQM.cjs +1 -0
- package/lib/{Animated-CJcYqJzq.js → Animated-Br_4OSth.js} +36 -35
- package/lib/Composed-C2Vv1xxR.cjs +1 -0
- package/lib/Composed-DhtYBEmo.js +79 -0
- package/lib/{Damped-AHRBHNEQ.cjs → Damped-BwpMU9Gi.cjs} +1 -1
- package/lib/{Damped-Csj-9_gH.js → Damped-urvryQLo.js} +1 -1
- package/lib/abstract-elements/index.cjs +1 -1
- package/lib/abstract-elements/index.js +2 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +2 -2
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +8 -8
- package/lib/createStylesheet-BSXZrWW6.js +8 -0
- package/lib/createStylesheet-C1rimcGc.cjs +1 -0
- package/lib/element-constructor/ElementConstructor.d.ts +16 -27
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.d.ts +1 -2
- package/lib/element-constructor/index.js +120 -639
- package/lib/element-constructor/knownSvgTags.d.ts +1 -0
- package/lib/element-constructor/tags.d.ts +117 -0
- package/lib/{index-DgtdcBEI.js → index-dBwVZz_v.js} +25 -25
- package/lib/index-vI4hmrI8.cjs +9 -0
- package/lib/jsx/h.d.ts +2 -2
- package/lib/jsx/hooks/animation-frame.d.ts +5 -0
- package/lib/jsx/hooks/animation.d.ts +3 -0
- package/lib/jsx/hooks/basic.d.ts +4 -0
- package/lib/jsx/hooks/element-resize.d.ts +3 -0
- package/lib/jsx/hooks/intersection.d.ts +3 -0
- package/lib/jsx/hooks/store.d.ts +6 -0
- package/lib/jsx/hooks/style.d.ts +2 -0
- package/lib/jsx/hooks/utils.d.ts +4 -0
- package/lib/jsx/hooks/window-resize.d.ts +2 -0
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.d.ts +8 -1
- package/lib/jsx/index.js +164 -87
- package/lib/jsx/type.d.ts +1 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +7 -7
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +21 -22
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/store/Derived.d.ts +1 -1
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +48 -111
- package/lib/studio/index.cjs +3 -3
- package/lib/studio/index.js +41 -41
- package/lib/tags-D-lzPz_v.js +748 -0
- package/lib/tags-DkAbVUQP.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +6 -6
- package/package.json +1 -1
- package/lib/Animated-DyZuTEQE.cjs +0 -1
- package/lib/ElementConstructor-9f-12v7T.cjs +0 -1
- package/lib/ElementConstructor-CoKM2CTK.js +0 -228
- package/lib/createStylesheet-BON7aJYs.js +0 -10
- package/lib/createStylesheet-uicRVW05.cjs +0 -1
- package/lib/element-constructor/htmlTags.d.ts +0 -115
- package/lib/element-constructor/svgTags.d.ts +0 -64
- package/lib/htmlTags-BCNUG7oK.js +0 -683
- package/lib/htmlTags-BSQys9wH.cjs +0 -1
- package/lib/index-i_Ki9M-w.cjs +0 -9
- package/lib/jsx/hooks.d.ts +0 -25
package/lib/jsx/index.js
CHANGED
|
@@ -1,116 +1,193 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
if (!
|
|
15
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var R = Object.defineProperty, T = Object.defineProperties;
|
|
2
|
+
var L = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var y = Object.getOwnPropertySymbols;
|
|
4
|
+
var F = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var w = (t, e, n) => e in t ? R(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, d = (t, e) => {
|
|
6
|
+
for (var n in e || (e = {}))
|
|
7
|
+
F.call(e, n) && w(t, n, e[n]);
|
|
8
|
+
if (y)
|
|
9
|
+
for (var n of y(e))
|
|
10
|
+
x.call(e, n) && w(t, n, e[n]);
|
|
11
|
+
return t;
|
|
12
|
+
}, m = (t, e) => T(t, L(e));
|
|
13
|
+
var u = (t, e, n) => (w(t, typeof e != "symbol" ? e + "" : e, n), n), E = (t, e, n) => {
|
|
14
|
+
if (!e.has(t))
|
|
15
|
+
throw TypeError("Cannot " + n);
|
|
16
16
|
};
|
|
17
|
-
var
|
|
18
|
-
if (
|
|
17
|
+
var k = (t, e, n) => (E(t, e, "read from private field"), n ? n.call(t) : e.get(t)), S = (t, e, n) => {
|
|
18
|
+
if (e.has(t))
|
|
19
19
|
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
-
|
|
21
|
-
}, v = (e, n,
|
|
22
|
-
import { E as
|
|
23
|
-
import { g as
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../intersector/index.js";
|
|
28
|
-
import "../
|
|
29
|
-
import { i as
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
21
|
+
}, v = (t, e, n, s) => (E(t, e, "write to private field"), s ? s.call(t, n) : e.set(t, n), n);
|
|
22
|
+
import { E as h, aD as z } from "../tags-D-lzPz_v.js";
|
|
23
|
+
import { g as A } from "../dom-BY7JhTx5.js";
|
|
24
|
+
import { ticker as H } from "../ticker/index.js";
|
|
25
|
+
import { S as M } from "../Store-JOKrNVEr.js";
|
|
26
|
+
import { elementResizer as j } from "../element-resizer/index.js";
|
|
27
|
+
import { intersector as O } from "../intersector/index.js";
|
|
28
|
+
import { windowResizer as N } from "../window-resizer/index.js";
|
|
29
|
+
import { i as g } from "../browser-0zX67oeU.js";
|
|
30
|
+
import { Tweened as W } from "../animation/index.js";
|
|
31
|
+
import { D as q } from "../Damped-urvryQLo.js";
|
|
32
|
+
import { D as B } from "../Derived-Bc88XJ8J.js";
|
|
33
|
+
import { D as I, R as $, C as G } from "../Composed-DhtYBEmo.js";
|
|
34
|
+
import { c as J } from "../createStylesheet-BSXZrWW6.js";
|
|
35
|
+
let c = null;
|
|
36
|
+
var l;
|
|
37
|
+
class K extends HTMLElement {
|
|
38
|
+
constructor(n) {
|
|
34
39
|
super();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
u(this, "createCallbacks", /* @__PURE__ */ new Set());
|
|
41
|
+
u(this, "connectCallbacks", /* @__PURE__ */ new Set());
|
|
42
|
+
u(this, "disconnectCallbacks", /* @__PURE__ */ new Set());
|
|
43
|
+
u(this, "stores", /* @__PURE__ */ new Set());
|
|
44
|
+
S(this, l, void 0);
|
|
45
|
+
c = this, v(this, l, n(this)), this.createCallbacks.forEach((s) => {
|
|
41
46
|
s(this);
|
|
42
47
|
});
|
|
43
48
|
}
|
|
44
49
|
connectedCallback() {
|
|
45
|
-
this.connectCallbacks.forEach((
|
|
46
|
-
|
|
50
|
+
this.connectCallbacks.forEach((n) => {
|
|
51
|
+
n(this) && this.disconnectCallbacks.add(n);
|
|
47
52
|
});
|
|
48
53
|
}
|
|
49
54
|
disconnectedCallback() {
|
|
50
|
-
this.disconnectCallbacks.forEach((
|
|
51
|
-
|
|
52
|
-
}),
|
|
55
|
+
this.disconnectCallbacks.forEach((n) => {
|
|
56
|
+
n(this);
|
|
57
|
+
}), k(this, l).destroy(), this.disconnectCallbacks.clear(), this.connectCallbacks.clear(), this.stores.forEach((n) => n.close()), this.stores.clear();
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
|
-
|
|
56
|
-
let
|
|
57
|
-
function
|
|
58
|
-
if (typeof
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
61
|
-
const
|
|
62
|
-
let
|
|
63
|
-
|
|
60
|
+
l = new WeakMap();
|
|
61
|
+
let i;
|
|
62
|
+
function P(t, e, ...n) {
|
|
63
|
+
if (typeof t == "function") {
|
|
64
|
+
if (t.isFragment)
|
|
65
|
+
return t(m(d({}, e), { children: n }));
|
|
66
|
+
const r = `component-${t.name.toLowerCase()}`;
|
|
67
|
+
let o = customElements.get(
|
|
68
|
+
r
|
|
64
69
|
);
|
|
65
|
-
return
|
|
66
|
-
constructor(
|
|
67
|
-
super(
|
|
70
|
+
return o || (o = class extends K {
|
|
71
|
+
constructor(a) {
|
|
72
|
+
super(a);
|
|
68
73
|
}
|
|
69
|
-
}, customElements.define(
|
|
70
|
-
const p =
|
|
71
|
-
let
|
|
72
|
-
return !
|
|
74
|
+
}, customElements.define(r, o)), new o((a) => {
|
|
75
|
+
const p = t(m(d({}, e), { children: n }));
|
|
76
|
+
let C = null;
|
|
77
|
+
return !i && p ? C = new h(a, {
|
|
73
78
|
children: p
|
|
74
|
-
}) :
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)),
|
|
79
|
+
}) : i && (i.shadow && a.attachShadow({ mode: "open" }), C = new h(
|
|
80
|
+
a,
|
|
81
|
+
i
|
|
82
|
+
)), i = void 0, C;
|
|
78
83
|
});
|
|
79
84
|
}
|
|
80
85
|
const s = {
|
|
81
|
-
shadowChildren:
|
|
86
|
+
shadowChildren: n
|
|
82
87
|
};
|
|
83
|
-
if (
|
|
84
|
-
for (const
|
|
85
|
-
const
|
|
86
|
-
|
|
88
|
+
if (e)
|
|
89
|
+
for (const r of Object.keys(e)) {
|
|
90
|
+
const o = e[r];
|
|
91
|
+
r.startsWith("on") ? (s.events || (s.events = {}), s.events[r.split("on")[1].toLowerCase()] = o) : r === "class" ? s.class = o : r === "style" ? s.style = o : r === "ref" ? s.ref = o : r === "shadow" ? s.shadow = o !== "false" : r === "forceSvg" ? s.forceSvg = o !== "false" : (s.attributes || (s.attributes = {}), s.attributes[r] = o);
|
|
87
92
|
}
|
|
88
|
-
return
|
|
89
|
-
[e]: s
|
|
90
|
-
});
|
|
93
|
+
return t === "component" ? (i = s, D({ children: n })) : new h(t, s);
|
|
91
94
|
}
|
|
92
|
-
function
|
|
93
|
-
children:
|
|
95
|
+
function D({
|
|
96
|
+
children: t
|
|
94
97
|
}) {
|
|
95
|
-
return new
|
|
96
|
-
children:
|
|
98
|
+
return new h(document.createDocumentFragment(), {
|
|
99
|
+
children: t
|
|
97
100
|
});
|
|
98
101
|
}
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
const
|
|
102
|
-
|
|
102
|
+
D.isFragment = !0;
|
|
103
|
+
function ae(t, e) {
|
|
104
|
+
const n = A(t), s = /* @__PURE__ */ P(e, null);
|
|
105
|
+
n && s instanceof Node && n.appendChild(s);
|
|
106
|
+
}
|
|
107
|
+
function Q(t) {
|
|
108
|
+
c.createCallbacks.add(t);
|
|
109
|
+
}
|
|
110
|
+
function f(t) {
|
|
111
|
+
g && c.connectCallbacks.add(t);
|
|
112
|
+
}
|
|
113
|
+
function ue(t) {
|
|
114
|
+
g && c.disconnectCallbacks.add(t);
|
|
115
|
+
}
|
|
116
|
+
function b(t, e) {
|
|
117
|
+
return e ? typeof e == "string" || e instanceof HTMLElement ? e : e.current : t;
|
|
118
|
+
}
|
|
119
|
+
function le(t, e) {
|
|
120
|
+
f((n) => H.subscribe(t, m(d({}, e), {
|
|
121
|
+
culling: typeof (e == null ? void 0 : e.culling) == "boolean" ? e != null && e.culling ? n : void 0 : b(void 0, e == null ? void 0 : e.culling)
|
|
122
|
+
})));
|
|
123
|
+
}
|
|
124
|
+
function fe(...t) {
|
|
125
|
+
const e = new q(...t);
|
|
126
|
+
return c.stores.add(e), e;
|
|
127
|
+
}
|
|
128
|
+
function de(...t) {
|
|
129
|
+
const e = new W(...t);
|
|
130
|
+
return c.stores.add(e), e;
|
|
131
|
+
}
|
|
132
|
+
function me(t, e) {
|
|
133
|
+
f((n) => j.subscribe(b(n, e), t));
|
|
103
134
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
135
|
+
function he(t, e) {
|
|
136
|
+
f((n) => O.subscribe(b(n, e), t));
|
|
137
|
+
}
|
|
138
|
+
function Ce(...t) {
|
|
139
|
+
const e = new M(...t);
|
|
140
|
+
return c.stores.add(e), e;
|
|
141
|
+
}
|
|
142
|
+
function we(...t) {
|
|
143
|
+
const e = new B(...t);
|
|
144
|
+
return c.stores.add(e), e;
|
|
145
|
+
}
|
|
146
|
+
function be(...t) {
|
|
147
|
+
const e = new I(...t);
|
|
148
|
+
return c.stores.add(e), e;
|
|
149
|
+
}
|
|
150
|
+
function pe(...t) {
|
|
151
|
+
const e = new $(...t);
|
|
152
|
+
return c.stores.add(e), e;
|
|
153
|
+
}
|
|
154
|
+
function ye(...t) {
|
|
155
|
+
const e = new G(...t);
|
|
156
|
+
return c.stores.add(e), e;
|
|
157
|
+
}
|
|
158
|
+
function Ee(t) {
|
|
159
|
+
Q((e) => {
|
|
160
|
+
e.shadowRoot && e.shadowRoot.adoptedStyleSheets.push(J(t));
|
|
161
|
+
}), f((e) => {
|
|
162
|
+
if (!e.shadowRoot) {
|
|
163
|
+
const n = z(t).node;
|
|
164
|
+
if (![...document.head.querySelectorAll("style")].find((r) => r.outerHTML === n.outerHTML))
|
|
165
|
+
return document.head.appendChild(n), () => {
|
|
166
|
+
n.remove();
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
106
170
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
171
|
+
function ke(t, e) {
|
|
172
|
+
f(() => N.subscribe(t, e));
|
|
109
173
|
}
|
|
110
174
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
175
|
+
D as Fragment,
|
|
176
|
+
P as h,
|
|
177
|
+
ae as render,
|
|
178
|
+
le as useAnimationFrame,
|
|
179
|
+
ye as useComposed,
|
|
180
|
+
f as useConnect,
|
|
181
|
+
Q as useCreate,
|
|
182
|
+
fe as useDamped,
|
|
183
|
+
we as useDerived,
|
|
184
|
+
be as useDerivedArray,
|
|
185
|
+
ue as useDisconnect,
|
|
186
|
+
me as useElementResize,
|
|
187
|
+
he as useIntersection,
|
|
188
|
+
pe as useResource,
|
|
189
|
+
Ce as useStore,
|
|
190
|
+
Ee as useStyle,
|
|
191
|
+
de as useTweened,
|
|
192
|
+
ke as useWindowResize
|
|
116
193
|
};
|
package/lib/jsx/type.d.ts
CHANGED
package/lib/modal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-DkAbVUQP.cjs"),m=require("../createStylesheet-C1rimcGc.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",top:"var(---close-button-top, 0.5em)",right:"var(---close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(---close-button-size, 1.5em)",height:"var(---close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(---close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{shadowChildren:s.div({class:"inner",attributes:{outside:!0},children:s.div({class:"content",children:[s.custom("e-popover-button",{attributes:{type:"close",target:this.id},class:"close-button",children:[s.slot({attributes:{name:"close-button"},children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
|
package/lib/modal/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { define as m } from "../custom-element/index.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import "../Store-JOKrNVEr.js";
|
|
3
|
+
import { i as g } from "../browser-0zX67oeU.js";
|
|
4
|
+
import { e as w, D as d, aY as _, ay as f, aB as y } from "../tags-D-lzPz_v.js";
|
|
5
|
+
import { c as C } from "../createStylesheet-BSXZrWW6.js";
|
|
6
6
|
import { PopoverElement as k } from "../popover/index.js";
|
|
7
7
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
8
8
|
var x = Object.defineProperty, z = Object.getOwnPropertyDescriptor, P = (t, e, o, r) => {
|
|
@@ -94,7 +94,7 @@ const S = C({
|
|
|
94
94
|
});
|
|
95
95
|
let v = class extends k {
|
|
96
96
|
constructor() {
|
|
97
|
-
super(), u(this, s, null), u(this, a, null),
|
|
97
|
+
super(), u(this, s, null), u(this, a, null), g && (this.openShadow(S), w(this, {
|
|
98
98
|
shadowChildren: d({
|
|
99
99
|
class: "inner",
|
|
100
100
|
attributes: {
|
|
@@ -103,7 +103,7 @@ let v = class extends k {
|
|
|
103
103
|
children: d({
|
|
104
104
|
class: "content",
|
|
105
105
|
children: [
|
|
106
|
-
|
|
106
|
+
_("e-popover-button", {
|
|
107
107
|
attributes: {
|
|
108
108
|
type: "close",
|
|
109
109
|
target: this.id
|
|
@@ -114,7 +114,7 @@ let v = class extends k {
|
|
|
114
114
|
attributes: {
|
|
115
115
|
name: "close-button"
|
|
116
116
|
},
|
|
117
|
-
children:
|
|
117
|
+
children: y({ class: "close-button-default" })
|
|
118
118
|
})
|
|
119
119
|
]
|
|
120
120
|
}),
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ct=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var h=(i,e,s)=>(Ct(i,e,"read from private field"),s?s.call(i):e.get(i)),$=(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)},O=(i,e,s,n)=>(Ct(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Tt=require("../Store-D0_rDIsE.cjs"),Dt=require("../Derived-SjPdLJiZ.cjs"),At=require("../browser-CpzFX2xg.cjs"),V=require("../layout-8ryRAMGJ.cjs"),zt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Vt=require("../Damped-AHRBHNEQ.cjs"),x=require("../attribute/index.cjs"),Mt=require("../WheelControls-CfDeGCOU.cjs"),wt=require("../custom-element/index.cjs"),xt=require("../order/index.cjs"),pt=require("../window-resizer/index.cjs"),I=require("../scroll-entries/index.cjs"),Lt=require("../ElementConstructor-9f-12v7T.cjs"),B=require("../htmlTags-BSQys9wH.cjs"),Ot=require("../createStylesheet-uicRVW05.cjs"),It=require("../dom-qY2LdCVL.cjs");var Ht=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,Bt=(i,e,s,n)=>{for(var r=n>1?void 0:n?Ft(e,s):e,d=i.length-1,w;d>=0;d--)(w=i[d])&&(r=(n?w(e,s,r):w(r))||r);return n&&r&&Ht(e,s,r),r},yt=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(yt(i,e,"read from private field"),s?s.call(i):e.get(i)),l=(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)},m=(i,e,s,n)=>(yt(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s),f=(i,e,s)=>(yt(i,e,"access private method"),s),a,M,T,q,D,X,y,Y,j,tt,u,dt,c,et,st,_,p,k,H,b,G,R,N,ft,F,U,mt,kt,bt,Wt,it,vt,rt,_t,P,gt,St,Rt,nt,ht,Et,S,g,L,W;class Gt{constructor(e,s){$(this,S,void 0);$(this,g,void 0);$(this,L,0);$(this,W,0);O(this,S,e),O(this,g,s),I.scrollEntries.register(h(this,S))}get size(){return h(this,L)}get position(){return h(this,W)}destroy(){I.scrollEntries.unregister(h(this,S)),h(this,S).style.transform=""}resize(){O(this,L,h(this,g).vertical?h(this,S).offsetHeight:h(this,S).offsetWidth),O(this,W,h(this,g).vertical?V.getCumulativeOffsetTop(h(this,S)):V.getCumulativeOffsetLeft(h(this,S))),O(this,W,h(this,W)-h(this,g).contentPosition)}transform(){let e=0;h(this,g).infiniteAttribute.current&&h(this,g).overscroll&&h(this,W)+h(this,L)<h(this,g).currentScrollValue&&(e=h(this,g).distance*-1),I.scrollEntries.update(h(this,S),h(this,g).axisAttibute.current,e);const s=h(this,g).viewportSize-h(this,L),n=zt.clamp(h(this,g).currentScrollValue+e,h(this,W)-h(this,g).viewportSize-s,h(this,W)+h(this,L)+s);h(this,g).vertical?h(this,S).style.transform=`translate3d(0px, ${n*-1}px, 0px)`:h(this,S).style.transform=`translate3d(${n*-1}px, 0px, 0px)`}}S=new WeakMap,g=new WeakMap,L=new WeakMap,W=new WeakMap;const Kt=Ot.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends wt.CustomElement{constructor(e){if(super(),l(this,N),l(this,F),l(this,mt),l(this,bt),l(this,it),l(this,rt),l(this,St),l(this,ht),l(this,a,null),l(this,M,new x.Attribute(this,"axis","y")),l(this,T,new x.Attribute(this,"pages",0,{validate:s=>Math.max(0,s-1)})),l(this,q,new x.Attribute(this,"split",!1)),l(this,D,new x.Attribute(this,"sectional",!1)),l(this,X,new x.Attribute(this,"wheel-max-delta",!1)),l(this,y,new x.Attribute(this,"infinite",!1)),l(this,Y,new x.Attribute(this,"damping",.03)),l(this,j,new x.Attribute(this,"disabled",!1)),l(this,tt,new x.Attribute(this,"hibernated",!1)),l(this,u,null),l(this,dt,null),l(this,c,[]),l(this,et,0),l(this,st,0),l(this,_,0),l(this,p,0),l(this,k,null),l(this,H,null),l(this,b,new Tt.Store(0)),l(this,G,0),l(this,R,0),l(this,P,()=>{const s=this.currentScrollValue/t(this,p);if(m(this,et,this.vertical?V.getCumulativeOffsetTop(this):V.getCumulativeOffsetLeft(this)),m(this,st,this.vertical?V.getCumulativeOffsetTop(t(this,u)):V.getCumulativeOffsetLeft(t(this,u))),m(this,_,this.vertical?this.offsetHeight:this.offsetWidth),t(this,T).current){m(this,p,t(this,_)*t(this,T).current);const n=t(this,p)+t(this,_);this.vertical?(t(this,u).style.width=n+"px",t(this,u).style.height="100%"):(t(this,u).style.height=n+"px",t(this,u).style.width="100%")}else this.vertical?(t(this,u).style.width="100%",t(this,u).style.height="max-content",m(this,p,t(this,u).offsetHeight-t(this,_))):(t(this,u).style.width="max-content",t(this,u).style.height="100%",m(this,p,t(this,u).offsetWidth-t(this,_)));if(!t(this,y).current){const n=getComputedStyle(this);m(this,p,t(this,p)+(this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd))),t(this,a).max.current=t(this,p)}if(t(this,c).forEach(n=>{n.resize(),n.transform()}),t(this,y).current&&t(this,c).length){const n=t(this,c)[t(this,c).length-1],r=n.position+n.size-t(this,_),d=t(this,p)-r;m(this,R,n.position+n.size+d)}else m(this,R,t(this,p));if(t(this,D).current&&t(this,c).length){const n=t(this,c)[t(this,b).current];t(this,a).set(n.position,!0)}else t(this,a).set(s*t(this,p),!0)}),l(this,gt,()=>{const s=this.currentScrollValue;if(m(this,G,Math.max(0,s-t(this,p))),t(this,c).length){let n=0;for(let r=0;r<t(this,c).length;r++){const d=t(this,c)[r];d.transform(),this.targetScrollValue+this.viewportSize/2>=d.position&&(n=r)}t(this,b).current=n}else this.vertical?t(this,u).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,u).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;I.scrollEntries.update(this,t(this,M).current,s)}),l(this,nt,s=>{if(typeof s=="number")if(t(this,D).current){const n=Math.sign(s);t(this,c).length?this.shiftSections(n):t(this,a).shift(n*t(this,_))}else t(this,a).shift(s);else s==="min"?t(this,a).set(t(this,a).min.current):s==="max"&&t(this,a).set(t(this,a).delta)}),At.isBrowser){let s,n=e||this.getAttribute("name");n&&(s={name:n}),m(this,a,new Vt.Damped({damping:.01,min:0,order:xt.TICK_ORDER.SCROLL,passport:s})),this.openShadow(Kt),Lt.element(this,{attributes:{tabIndex:0},shadowChildren:[B.div({class:"static",children:[B.slot({attributes:{name:"static"}})]}),B.div({class:"content",children:[B.slot({ref:r=>m(this,dt,r)})],style:{flexDirection:new Dt.Derived(t(this,M),r=>r==="x"?"row":"column")},ref:r=>m(this,u,r)})]}),m(this,k,new Mt.WheelControls({element:this})),t(this,k).changeEvent.subscribe(t(this,nt)),m(this,H,new Mt.KeyboardControls({element:this})),t(this,H).changeEvent.subscribe(t(this,nt)),t(this,M).subscribe(({current:r})=>{t(this,u).style.flexDirection=r==="x"?"row":"column",t(this,k).axis=t(this,X).current?"max":r,this.isConnected&&t(this,P).call(this)}),t(this,X).subscribe(r=>{t(this,k).axis=r.current?"max":t(this,M).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,P).call(this)}),t(this,q).subscribe(({current:r})=>{this.isConnected&&(r?f(this,N,ft).call(this):f(this,F,U).call(this))}),t(this,D).subscribe(r=>{t(this,b).current=0,t(this,k).debounce=r.current,t(this,a).reset(),this.isConnected&&(r.current&&!r.previous?f(this,N,ft).call(this):!r.current&&r.previous&&f(this,F,U).call(this))}),t(this,y).subscribe(r=>{r.current?(this.isConnected&&(t(this,c).length||(t(this,q).current=!0)),t(this,c).length&&(t(this,a).max.current=1/0,t(this,a).min.current=-1/0)):(m(this,G,0),t(this,a).max.current=t(this,p),t(this,a).min.current=0)}),t(this,Y).subscribe(r=>{t(this,a).damping=r.current}),t(this,j).subscribe(r=>{r.current&&!r.previous?f(this,mt,kt).call(this):!r.current&&r.previous&&f(this,bt,Wt).call(this)}),t(this,tt).subscribe(r=>{r.current&&!r.previous?f(this,it,vt).call(this):!r.current&&r.previous&&f(this,rt,_t).call(this)})}}get currentScrollValue(){return f(this,ht,Et).call(this,"current")}get targetScrollValue(){return f(this,ht,Et).call(this,"target")}get damped(){return t(this,a)}get dampedAttibute(){return t(this,a)}get axisAttibute(){return t(this,M)}get pagesAttibute(){return t(this,T)}get splitAttibute(){return t(this,q)}get sectionalAttibute(){return t(this,D)}get infiniteAttribute(){return t(this,y)}get dampingAttibute(){return t(this,Y)}get disabledAttibute(){return t(this,j)}get hibernatedAttibute(){return t(this,tt)}get contentElement(){return t(this,u)}get position(){return t(this,et)}get contentPosition(){return t(this,st)}get viewportSize(){return t(this,_)}get scrollSize(){return t(this,p)}get counter(){return t(this,b)}get distance(){return t(this,R)}get overscroll(){return t(this,G)}get vertical(){return t(this,M).current==="y"}get currentProgress(){return this.currentScrollValue/t(this,R)}get targetProgress(){return this.targetScrollValue/t(this,R)}scrollToSection(e,s="smooth"){if(!t(this,c).length)return;const n=t(this,b).current;f(this,St,Rt).call(this,e);const r=t(this,c)[n],d=t(this,c)[t(this,b).current];if(r&&d){let w=0;const Q=t(this,c).length-1;t(this,y).current?t(this,b).current===0&&n===Q?w=t(this,p)+t(this,_)-r.position:t(this,b).current===Q&&n===0?w=d.position-(t(this,p)+t(this,_)):w=d.position-r.position:w=d.position-r.position,t(this,a).shift(w,s==="instant")}}shiftSections(e,s="smooth"){t(this,c).length&&this.scrollToSection(t(this,b).current+e,s)}connectedCallback(){f(this,rt,_t).call(this)}disconnectedCallback(){f(this,it,vt).call(this)}};a=new WeakMap;M=new WeakMap;T=new WeakMap;q=new WeakMap;D=new WeakMap;X=new WeakMap;y=new WeakMap;Y=new WeakMap;j=new WeakMap;tt=new WeakMap;u=new WeakMap;dt=new WeakMap;c=new WeakMap;et=new WeakMap;st=new WeakMap;_=new WeakMap;p=new WeakMap;k=new WeakMap;H=new WeakMap;b=new WeakMap;G=new WeakMap;R=new WeakMap;N=new WeakSet;ft=function(){f(this,F,U).call(this),t(this,dt).assignedElements().forEach(i=>{i instanceof HTMLElement&&t(this,c).push(new Gt(i,this))}),t(this,u).style.transform="",t(this,P).call(this)};F=new WeakSet;U=function(){t(this,c).forEach(i=>{i.destroy()}),m(this,c,[])};mt=new WeakSet;kt=function(){t(this,a).unsubscribe(t(this,gt)),t(this,a).unlistenAnimationFrame(),t(this,k).disconnect(),t(this,H).disconnect()};bt=new WeakSet;Wt=function(){t(this,a).subscribe(t(this,gt)),t(this,k).connect(),t(this,H).connect()};it=new WeakSet;vt=function(){pt.windowResizer.unsubscribe(t(this,P)),t(this,a).reset(),f(this,mt,kt).call(this),t(this,u).style.transform="",t(this,q).current&&f(this,F,U).call(this),I.scrollEntries.unregister(this)};rt=new WeakSet;_t=function(){t(this,q).current&&f(this,N,ft).call(this),I.scrollEntries.register(this),pt.windowResizer.subscribe(t(this,P),xt.RESIZE_ORDER.SCROLL),f(this,bt,Wt).call(this)};P=new WeakMap;gt=new WeakMap;St=new WeakSet;Rt=function(i){t(this,y).current?(t(this,b).current=i%t(this,c).length,t(this,b).current=t(this,b).current<0?t(this,c).length+t(this,b).current:t(this,b).current):t(this,b).current=zt.clamp(i,0,t(this,c).length-1)};nt=new WeakMap;ht=new WeakSet;Et=function(i="current"){if(t(this,y).current&&t(this,c).length){const e=t(this,a)[i]%(t(this,p)+t(this,_));return e<0?t(this,p)+e+t(this,_):e}else return t(this,a)[i]};exports.ScrollElement=Bt([wt.define("e-scroll")],exports.ScrollElement);var J;class Zt extends wt.CustomElement{constructor(){super(...arguments);$(this,J,null)}get scrollElement(){return h(this,J)}connectedCallback(){const s=It.findParentElement(this,exports.ScrollElement);s instanceof exports.ScrollElement?O(this,J,s):console.error(this,"e-scroll not found")}}J=new WeakMap;var Nt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Jt=(i,e,s,n)=>{for(var r=n>1?void 0:n?Ut(e,s):e,d=i.length-1,w;d>=0;d--)(w=i[d])&&(r=(n?w(e,s,r):w(r))||r);return n&&r&&Nt(e,s,r),r},qt=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},o=(i,e,s)=>(qt(i,e,"read from private field"),s?s.call(i):e.get(i)),E=(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,n)=>(qt(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s),lt,v,A,z,K,Z,ot,at,ct,ut;const Qt=Ot.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#efefef"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"#181818",borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Zt{constructor(){super(),E(this,lt,null),E(this,v,null),E(this,A,!1),E(this,z,0),E(this,K,0),E(this,Z,0),E(this,ot,()=>{C(this,A,this.offsetWidth>this.offsetHeight);const e=o(this,A)?this.offsetWidth:this.offsetHeight;C(this,z,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),C(this,z,Math.max(o(this,z),30)),o(this,A)?(o(this,v).style.width=o(this,z)+"px",o(this,v).style.height="100%"):(o(this,v).style.width="100%",o(this,v).style.height=o(this,z)+"px"),C(this,K,e-o(this,z)),this.scrollElement.scrollSize||(this.style.display="none")}),E(this,at,()=>{C(this,Z,this.scrollElement.currentProgress*o(this,K)),o(this,A)?o(this,v).style.transform=`translate3d(${o(this,Z)}px, 0px, 0px)`:o(this,v).style.transform=`translate3d(0px, ${o(this,Z)}px, 0px)`}),E(this,ct,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),E(this,ut,e=>{const s=w=>{const Q=o(this,A)?w.x:w.y,Pt=this.scrollElement.distance/o(this,K),$t=(Q-d)*Pt;this.scrollElement.damped.set(r+$t)},n=()=>{removeEventListener("pointermove",s),removeEventListener("pointerup",n),removeEventListener("touchend",n)};addEventListener("pointermove",s),addEventListener("pointerup",n),addEventListener("touchend",n);const r=this.scrollElement.damped.target,d=o(this,A)?e.x:e.y}),At.isBrowser&&(this.openShadow(Qt),Lt.element(this,{shadowChildren:[B.slot({ref:e=>C(this,lt,e)})]}))}get thumbElement(){return o(this,v)}connectedCallback(){super.connectedCallback();const e=o(this,lt).assignedElements()[0];e instanceof HTMLElement?C(this,v,e):(C(this,v,document.createElement("div")),o(this,v).classList.add("default-thumb"),this.shadowRoot.appendChild(o(this,v))),o(this,v).addEventListener("pointerdown",o(this,ut)),pt.windowResizer.subscribe(o(this,ot),xt.RESIZE_ORDER.SCROLL+1),this.scrollElement.damped.subscribe(o(this,at)),this.scrollElement.axisAttibute.subscribe(o(this,ct))}disconnectedCallback(){o(this,v).removeEventListener("pointerdown",o(this,ut)),pt.windowResizer.unsubscribe(o(this,ot)),this.scrollElement.damped.unsubscribe(o(this,at)),this.scrollElement.axisAttibute.unsubscribe(o(this,ct))}};lt=new WeakMap;v=new WeakMap;A=new WeakMap;z=new WeakMap;K=new WeakMap;Z=new WeakMap;ot=new WeakMap;at=new WeakMap;ct=new WeakMap;ut=new WeakMap;exports.ScrollbarElement=Jt([wt.define("e-scrollbar")],exports.ScrollbarElement);
|
|
1
|
+
"use strict";var Ct=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var h=(i,e,s)=>(Ct(i,e,"read from private field"),s?s.call(i):e.get(i)),D=(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)},O=(i,e,s,n)=>(Ct(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("../Store-D0_rDIsE.cjs"),Dt=require("../Derived-SjPdLJiZ.cjs"),At=require("../browser-CpzFX2xg.cjs"),I=require("../layout-8ryRAMGJ.cjs"),zt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Tt=require("../Damped-BwpMU9Gi.cjs"),x=require("../attribute/index.cjs"),Mt=require("../WheelControls-CfDeGCOU.cjs"),wt=require("../custom-element/index.cjs"),xt=require("../order/index.cjs"),pt=require("../window-resizer/index.cjs"),H=require("../scroll-entries/index.cjs"),P=require("../tags-DkAbVUQP.cjs"),Lt=require("../createStylesheet-C1rimcGc.cjs"),Vt=require("../dom-qY2LdCVL.cjs");var It=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Ft=(i,e,s,n)=>{for(var r=n>1?void 0:n?Ht(e,s):e,d=i.length-1,w;d>=0;d--)(w=i[d])&&(r=(n?w(e,s,r):w(r))||r);return n&&r&&It(e,s,r),r},yt=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(yt(i,e,"read from private field"),s?s.call(i):e.get(i)),l=(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)},m=(i,e,s,n)=>(yt(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s),f=(i,e,s)=>(yt(i,e,"access private method"),s),a,M,T,$,V,X,y,Y,j,tt,u,dt,c,et,st,_,p,k,F,b,G,R,N,ft,B,U,mt,kt,bt,Wt,it,vt,rt,_t,q,gt,St,Ot,nt,ht,Et,S,g,L,W;class Bt{constructor(e,s){D(this,S,void 0);D(this,g,void 0);D(this,L,0);D(this,W,0);O(this,S,e),O(this,g,s),H.scrollEntries.register(h(this,S))}get size(){return h(this,L)}get position(){return h(this,W)}destroy(){H.scrollEntries.unregister(h(this,S)),h(this,S).style.transform=""}resize(){O(this,L,h(this,g).vertical?h(this,S).offsetHeight:h(this,S).offsetWidth),O(this,W,h(this,g).vertical?I.getCumulativeOffsetTop(h(this,S)):I.getCumulativeOffsetLeft(h(this,S))),O(this,W,h(this,W)-h(this,g).contentPosition)}transform(){let e=0;h(this,g).infiniteAttribute.current&&h(this,g).overscroll&&h(this,W)+h(this,L)<h(this,g).currentScrollValue&&(e=h(this,g).distance*-1),H.scrollEntries.update(h(this,S),h(this,g).axisAttibute.current,e);const s=h(this,g).viewportSize-h(this,L),n=zt.clamp(h(this,g).currentScrollValue+e,h(this,W)-h(this,g).viewportSize-s,h(this,W)+h(this,L)+s);h(this,g).vertical?h(this,S).style.transform=`translate3d(0px, ${n*-1}px, 0px)`:h(this,S).style.transform=`translate3d(${n*-1}px, 0px, 0px)`}}S=new WeakMap,g=new WeakMap,L=new WeakMap,W=new WeakMap;const Gt=Lt.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends wt.CustomElement{constructor(e){if(super(),l(this,N),l(this,B),l(this,mt),l(this,bt),l(this,it),l(this,rt),l(this,St),l(this,ht),l(this,a,null),l(this,M,new x.Attribute(this,"axis","y")),l(this,T,new x.Attribute(this,"pages",0,{validate:s=>Math.max(0,s-1)})),l(this,$,new x.Attribute(this,"split",!1)),l(this,V,new x.Attribute(this,"sectional",!1)),l(this,X,new x.Attribute(this,"wheel-max-delta",!1)),l(this,y,new x.Attribute(this,"infinite",!1)),l(this,Y,new x.Attribute(this,"damping",.03)),l(this,j,new x.Attribute(this,"disabled",!1)),l(this,tt,new x.Attribute(this,"hibernated",!1)),l(this,u,null),l(this,dt,null),l(this,c,[]),l(this,et,0),l(this,st,0),l(this,_,0),l(this,p,0),l(this,k,null),l(this,F,null),l(this,b,new qt.Store(0)),l(this,G,0),l(this,R,0),l(this,q,()=>{const s=this.currentScrollValue/t(this,p);if(m(this,et,this.vertical?I.getCumulativeOffsetTop(this):I.getCumulativeOffsetLeft(this)),m(this,st,this.vertical?I.getCumulativeOffsetTop(t(this,u)):I.getCumulativeOffsetLeft(t(this,u))),m(this,_,this.vertical?this.offsetHeight:this.offsetWidth),t(this,T).current){m(this,p,t(this,_)*t(this,T).current);const n=t(this,p)+t(this,_);this.vertical?(t(this,u).style.width=n+"px",t(this,u).style.height="100%"):(t(this,u).style.height=n+"px",t(this,u).style.width="100%")}else this.vertical?(t(this,u).style.width="100%",t(this,u).style.height="max-content",m(this,p,t(this,u).offsetHeight-t(this,_))):(t(this,u).style.width="max-content",t(this,u).style.height="100%",m(this,p,t(this,u).offsetWidth-t(this,_)));if(!t(this,y).current){const n=getComputedStyle(this);m(this,p,t(this,p)+(this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd))),t(this,a).max.current=t(this,p)}if(t(this,c).forEach(n=>{n.resize(),n.transform()}),t(this,y).current&&t(this,c).length){const n=t(this,c)[t(this,c).length-1],r=n.position+n.size-t(this,_),d=t(this,p)-r;m(this,R,n.position+n.size+d)}else m(this,R,t(this,p));if(t(this,V).current&&t(this,c).length){const n=t(this,c)[t(this,b).current];t(this,a).set(n.position,!0)}else t(this,a).set(s*t(this,p),!0)}),l(this,gt,()=>{const s=this.currentScrollValue;if(m(this,G,Math.max(0,s-t(this,p))),t(this,c).length){let n=0;for(let r=0;r<t(this,c).length;r++){const d=t(this,c)[r];d.transform(),this.targetScrollValue+this.viewportSize/2>=d.position&&(n=r)}t(this,b).current=n}else this.vertical?t(this,u).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,u).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;H.scrollEntries.update(this,t(this,M).current,s)}),l(this,nt,s=>{if(typeof s=="number")if(t(this,V).current){const n=Math.sign(s);t(this,c).length?this.shiftSections(n):t(this,a).shift(n*t(this,_))}else t(this,a).shift(s);else s==="min"?t(this,a).set(t(this,a).min.current):s==="max"&&t(this,a).set(t(this,a).delta)}),At.isBrowser){let s,n=e||this.getAttribute("name");n&&(s={name:n}),m(this,a,new Tt.Damped({damping:.01,min:0,order:xt.TICK_ORDER.SCROLL,passport:s})),this.openShadow(Gt),P.element(this,{attributes:{tabIndex:0},shadowChildren:[P.div({class:"static",children:[P.slot({attributes:{name:"static"}})]}),P.div({class:"content",children:[P.slot({ref:r=>m(this,dt,r)})],style:{flexDirection:new Dt.Derived(t(this,M),r=>r==="x"?"row":"column")},ref:r=>m(this,u,r)})]}),m(this,k,new Mt.WheelControls({element:this})),t(this,k).changeEvent.subscribe(t(this,nt)),m(this,F,new Mt.KeyboardControls({element:this})),t(this,F).changeEvent.subscribe(t(this,nt)),t(this,M).subscribe(({current:r})=>{t(this,u).style.flexDirection=r==="x"?"row":"column",t(this,k).axis=t(this,X).current?"max":r,this.isConnected&&t(this,q).call(this)}),t(this,X).subscribe(r=>{t(this,k).axis=r.current?"max":t(this,M).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:r})=>{this.isConnected&&(r?f(this,N,ft).call(this):f(this,B,U).call(this))}),t(this,V).subscribe(r=>{t(this,b).current=0,t(this,k).debounce=r.current,t(this,a).reset(),this.isConnected&&(r.current&&!r.previous?f(this,N,ft).call(this):!r.current&&r.previous&&f(this,B,U).call(this))}),t(this,y).subscribe(r=>{r.current?(this.isConnected&&(t(this,c).length||(t(this,$).current=!0)),t(this,c).length&&(t(this,a).max.current=1/0,t(this,a).min.current=-1/0)):(m(this,G,0),t(this,a).max.current=t(this,p),t(this,a).min.current=0)}),t(this,Y).subscribe(r=>{t(this,a).damping=r.current}),t(this,j).subscribe(r=>{r.current&&!r.previous?f(this,mt,kt).call(this):!r.current&&r.previous&&f(this,bt,Wt).call(this)}),t(this,tt).subscribe(r=>{r.current&&!r.previous?f(this,it,vt).call(this):!r.current&&r.previous&&f(this,rt,_t).call(this)})}}get currentScrollValue(){return f(this,ht,Et).call(this,"current")}get targetScrollValue(){return f(this,ht,Et).call(this,"target")}get damped(){return t(this,a)}get dampedAttibute(){return t(this,a)}get axisAttibute(){return t(this,M)}get pagesAttibute(){return t(this,T)}get splitAttibute(){return t(this,$)}get sectionalAttibute(){return t(this,V)}get infiniteAttribute(){return t(this,y)}get dampingAttibute(){return t(this,Y)}get disabledAttibute(){return t(this,j)}get hibernatedAttibute(){return t(this,tt)}get contentElement(){return t(this,u)}get position(){return t(this,et)}get contentPosition(){return t(this,st)}get viewportSize(){return t(this,_)}get scrollSize(){return t(this,p)}get counter(){return t(this,b)}get distance(){return t(this,R)}get overscroll(){return t(this,G)}get vertical(){return t(this,M).current==="y"}get currentProgress(){return this.currentScrollValue/t(this,R)}get targetProgress(){return this.targetScrollValue/t(this,R)}scrollToSection(e,s="smooth"){if(!t(this,c).length)return;const n=t(this,b).current;f(this,St,Ot).call(this,e);const r=t(this,c)[n],d=t(this,c)[t(this,b).current];if(r&&d){let w=0;const Q=t(this,c).length-1;t(this,y).current?t(this,b).current===0&&n===Q?w=t(this,p)+t(this,_)-r.position:t(this,b).current===Q&&n===0?w=d.position-(t(this,p)+t(this,_)):w=d.position-r.position:w=d.position-r.position,t(this,a).shift(w,s==="instant")}}shiftSections(e,s="smooth"){t(this,c).length&&this.scrollToSection(t(this,b).current+e,s)}connectedCallback(){f(this,rt,_t).call(this)}disconnectedCallback(){f(this,it,vt).call(this)}};a=new WeakMap;M=new WeakMap;T=new WeakMap;$=new WeakMap;V=new WeakMap;X=new WeakMap;y=new WeakMap;Y=new WeakMap;j=new WeakMap;tt=new WeakMap;u=new WeakMap;dt=new WeakMap;c=new WeakMap;et=new WeakMap;st=new WeakMap;_=new WeakMap;p=new WeakMap;k=new WeakMap;F=new WeakMap;b=new WeakMap;G=new WeakMap;R=new WeakMap;N=new WeakSet;ft=function(){f(this,B,U).call(this),t(this,dt).assignedElements().forEach(i=>{i instanceof HTMLElement&&t(this,c).push(new Bt(i,this))}),t(this,u).style.transform="",t(this,q).call(this)};B=new WeakSet;U=function(){t(this,c).forEach(i=>{i.destroy()}),m(this,c,[])};mt=new WeakSet;kt=function(){t(this,a).unsubscribe(t(this,gt)),t(this,a).unlistenAnimationFrame(),t(this,k).disconnect(),t(this,F).disconnect()};bt=new WeakSet;Wt=function(){t(this,a).subscribe(t(this,gt)),t(this,k).connect(),t(this,F).connect()};it=new WeakSet;vt=function(){pt.windowResizer.unsubscribe(t(this,q)),t(this,a).reset(),f(this,mt,kt).call(this),t(this,u).style.transform="",t(this,$).current&&f(this,B,U).call(this),H.scrollEntries.unregister(this)};rt=new WeakSet;_t=function(){t(this,$).current&&f(this,N,ft).call(this),H.scrollEntries.register(this),pt.windowResizer.subscribe(t(this,q),xt.RESIZE_ORDER.SCROLL),f(this,bt,Wt).call(this)};q=new WeakMap;gt=new WeakMap;St=new WeakSet;Ot=function(i){t(this,y).current?(t(this,b).current=i%t(this,c).length,t(this,b).current=t(this,b).current<0?t(this,c).length+t(this,b).current:t(this,b).current):t(this,b).current=zt.clamp(i,0,t(this,c).length-1)};nt=new WeakMap;ht=new WeakSet;Et=function(i="current"){if(t(this,y).current&&t(this,c).length){const e=t(this,a)[i]%(t(this,p)+t(this,_));return e<0?t(this,p)+e+t(this,_):e}else return t(this,a)[i]};exports.ScrollElement=Ft([wt.define("e-scroll")],exports.ScrollElement);var J;class Kt extends wt.CustomElement{constructor(){super(...arguments);D(this,J,null)}get scrollElement(){return h(this,J)}connectedCallback(){const s=Vt.findParentElement(this,exports.ScrollElement);s instanceof exports.ScrollElement?O(this,J,s):console.error(this,"e-scroll not found")}}J=new WeakMap;var Zt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Ut=(i,e,s,n)=>{for(var r=n>1?void 0:n?Nt(e,s):e,d=i.length-1,w;d>=0;d--)(w=i[d])&&(r=(n?w(e,s,r):w(r))||r);return n&&r&&Zt(e,s,r),r},Rt=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},o=(i,e,s)=>(Rt(i,e,"read from private field"),s?s.call(i):e.get(i)),E=(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,n)=>(Rt(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s),lt,v,A,z,K,Z,ot,at,ct,ut;const Jt=Lt.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#efefef"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"#181818",borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Kt{constructor(){super(),E(this,lt,null),E(this,v,null),E(this,A,!1),E(this,z,0),E(this,K,0),E(this,Z,0),E(this,ot,()=>{C(this,A,this.offsetWidth>this.offsetHeight);const e=o(this,A)?this.offsetWidth:this.offsetHeight;C(this,z,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),C(this,z,Math.max(o(this,z),30)),o(this,A)?(o(this,v).style.width=o(this,z)+"px",o(this,v).style.height="100%"):(o(this,v).style.width="100%",o(this,v).style.height=o(this,z)+"px"),C(this,K,e-o(this,z)),this.scrollElement.scrollSize||(this.style.display="none")}),E(this,at,()=>{C(this,Z,this.scrollElement.currentProgress*o(this,K)),o(this,A)?o(this,v).style.transform=`translate3d(${o(this,Z)}px, 0px, 0px)`:o(this,v).style.transform=`translate3d(0px, ${o(this,Z)}px, 0px)`}),E(this,ct,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),E(this,ut,e=>{const s=w=>{const Q=o(this,A)?w.x:w.y,Pt=this.scrollElement.distance/o(this,K),$t=(Q-d)*Pt;this.scrollElement.damped.set(r+$t)},n=()=>{removeEventListener("pointermove",s),removeEventListener("pointerup",n),removeEventListener("touchend",n)};addEventListener("pointermove",s),addEventListener("pointerup",n),addEventListener("touchend",n);const r=this.scrollElement.damped.target,d=o(this,A)?e.x:e.y}),At.isBrowser&&(this.openShadow(Jt),P.element(this,{shadowChildren:[P.slot({ref:e=>C(this,lt,e)})]}))}get thumbElement(){return o(this,v)}connectedCallback(){super.connectedCallback();const e=o(this,lt).assignedElements()[0];e instanceof HTMLElement?C(this,v,e):(C(this,v,document.createElement("div")),o(this,v).classList.add("default-thumb"),this.shadowRoot.appendChild(o(this,v))),o(this,v).addEventListener("pointerdown",o(this,ut)),pt.windowResizer.subscribe(o(this,ot),xt.RESIZE_ORDER.SCROLL+1),this.scrollElement.damped.subscribe(o(this,at)),this.scrollElement.axisAttibute.subscribe(o(this,ct))}disconnectedCallback(){o(this,v).removeEventListener("pointerdown",o(this,ut)),pt.windowResizer.unsubscribe(o(this,ot)),this.scrollElement.damped.unsubscribe(o(this,at)),this.scrollElement.axisAttibute.unsubscribe(o(this,ct))}};lt=new WeakMap;v=new WeakMap;A=new WeakMap;z=new WeakMap;K=new WeakMap;Z=new WeakMap;ot=new WeakMap;at=new WeakMap;ct=new WeakMap;ut=new WeakMap;exports.ScrollbarElement=Ut([wt.define("e-scrollbar")],exports.ScrollbarElement);
|
package/lib/scroll/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var yt = (i, s, e) => {
|
|
|
2
2
|
if (!s.has(i))
|
|
3
3
|
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var n = (i, s, e) => (yt(i, s, "read from private field"), e ? e.call(i) : s.get(i)),
|
|
5
|
+
var n = (i, s, e) => (yt(i, s, "read from private field"), e ? e.call(i) : s.get(i)), V = (i, s, e) => {
|
|
6
6
|
if (s.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
@@ -13,16 +13,15 @@ import { i as At } from "../browser-0zX67oeU.js";
|
|
|
13
13
|
import { a as gt, g as wt } from "../layout-HoBT_Da2.js";
|
|
14
14
|
import { c as zt } from "../math-BOBiC4TN.js";
|
|
15
15
|
import "../ticker/index.js";
|
|
16
|
-
import { D as Bt } from "../Damped-
|
|
16
|
+
import { D as Bt } from "../Damped-urvryQLo.js";
|
|
17
17
|
import { Attribute as E } from "../attribute/index.js";
|
|
18
18
|
import { W as Kt, K as Gt } from "../WheelControls-CX9WUbBC.js";
|
|
19
19
|
import { CustomElement as Lt, define as $t } from "../custom-element/index.js";
|
|
20
20
|
import { TICK_ORDER as Nt, RESIZE_ORDER as Pt } from "../order/index.js";
|
|
21
21
|
import { windowResizer as ot } from "../window-resizer/index.js";
|
|
22
22
|
import { scrollEntries as I } from "../scroll-entries/index.js";
|
|
23
|
-
import { e as Ot } from "../
|
|
24
|
-
import {
|
|
25
|
-
import { c as Vt } from "../createStylesheet-BON7aJYs.js";
|
|
23
|
+
import { e as Ot, D as Mt, ay as bt } from "../tags-D-lzPz_v.js";
|
|
24
|
+
import { c as Dt } from "../createStylesheet-BSXZrWW6.js";
|
|
26
25
|
import { f as Ut } from "../dom-BY7JhTx5.js";
|
|
27
26
|
var Zt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Jt = (i, s, e, r) => {
|
|
28
27
|
for (var a = r > 1 ? void 0 : r ? qt(s, e) : s, g = i.length - 1, x; g >= 0; g--)
|
|
@@ -35,13 +34,13 @@ var Zt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Jt = (i, s
|
|
|
35
34
|
if (s.has(i))
|
|
36
35
|
throw TypeError("Cannot add the same private member more than once");
|
|
37
36
|
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
38
|
-
}, d = (i, s, e, r) => (Et(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e), f = (i, s, e) => (Et(i, s, "access private method"), e), o, C, R, O, T, q, k, J, Q, X, u, ct, c, Y, j, v, p, W, H, m, B, P, N, ut, F, U, pt, kt, ft, Wt, tt, vt, et, _t,
|
|
37
|
+
}, d = (i, s, e, r) => (Et(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e), f = (i, s, e) => (Et(i, s, "access private method"), e), o, C, R, O, T, q, k, J, Q, X, u, ct, c, Y, j, v, p, W, H, m, B, P, N, ut, F, U, pt, kt, ft, Wt, tt, vt, et, _t, D, mt, xt, Vt, st, it, St, _, w, L, y;
|
|
39
38
|
class Qt {
|
|
40
39
|
constructor(s, e) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
V(this, _, void 0);
|
|
41
|
+
V(this, w, void 0);
|
|
42
|
+
V(this, L, 0);
|
|
43
|
+
V(this, y, 0);
|
|
45
44
|
$(this, _, s), $(this, w, e), I.register(n(this, _));
|
|
46
45
|
}
|
|
47
46
|
get size() {
|
|
@@ -72,7 +71,7 @@ class Qt {
|
|
|
72
71
|
}
|
|
73
72
|
}
|
|
74
73
|
_ = new WeakMap(), w = new WeakMap(), L = new WeakMap(), y = new WeakMap();
|
|
75
|
-
const Xt =
|
|
74
|
+
const Xt = Dt({
|
|
76
75
|
":host": {
|
|
77
76
|
position: "relative",
|
|
78
77
|
width: "100%",
|
|
@@ -113,7 +112,7 @@ let dt = class extends Lt {
|
|
|
113
112
|
this,
|
|
114
113
|
"wheel-max-delta",
|
|
115
114
|
!1
|
|
116
|
-
)), h(this, k, new E(this, "infinite", !1)), h(this, J, new E(this, "damping", 0.03)), h(this, Q, new E(this, "disabled", !1)), h(this, X, new E(this, "hibernated", !1)), h(this, u, null), h(this, ct, null), h(this, c, []), h(this, Y, 0), h(this, j, 0), h(this, v, 0), h(this, p, 0), h(this, W, null), h(this, H, null), h(this, m, new Ht(0)), h(this, B, 0), h(this, P, 0), h(this,
|
|
115
|
+
)), h(this, k, new E(this, "infinite", !1)), h(this, J, new E(this, "damping", 0.03)), h(this, Q, new E(this, "disabled", !1)), h(this, X, new E(this, "hibernated", !1)), h(this, u, null), h(this, ct, null), h(this, c, []), h(this, Y, 0), h(this, j, 0), h(this, v, 0), h(this, p, 0), h(this, W, null), h(this, H, null), h(this, m, new Ht(0)), h(this, B, 0), h(this, P, 0), h(this, D, () => {
|
|
117
116
|
const s = this.currentScrollValue / t(this, p);
|
|
118
117
|
if (d(this, Y, this.vertical ? gt(this) : wt(this)), d(this, j, this.vertical ? gt(t(this, u)) : wt(t(this, u))), d(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), t(this, R).current) {
|
|
119
118
|
d(this, p, t(this, v) * t(this, R).current);
|
|
@@ -189,11 +188,11 @@ let dt = class extends Lt {
|
|
|
189
188
|
})
|
|
190
189
|
]
|
|
191
190
|
}), d(this, W, new Kt({ element: this })), t(this, W).changeEvent.subscribe(t(this, st)), d(this, H, new Gt({ element: this })), t(this, H).changeEvent.subscribe(t(this, st)), t(this, C).subscribe(({ current: r }) => {
|
|
192
|
-
t(this, u).style.flexDirection = r === "x" ? "row" : "column", t(this, W).axis = t(this, q).current ? "max" : r, this.isConnected && t(this,
|
|
191
|
+
t(this, u).style.flexDirection = r === "x" ? "row" : "column", t(this, W).axis = t(this, q).current ? "max" : r, this.isConnected && t(this, D).call(this);
|
|
193
192
|
}), t(this, q).subscribe((r) => {
|
|
194
193
|
t(this, W).axis = r.current ? "max" : t(this, C).current;
|
|
195
194
|
}), t(this, R).subscribe(() => {
|
|
196
|
-
this.isConnected && t(this,
|
|
195
|
+
this.isConnected && t(this, D).call(this);
|
|
197
196
|
}), t(this, O).subscribe(({ current: r }) => {
|
|
198
197
|
this.isConnected && (r ? f(this, N, ut).call(this) : f(this, F, U).call(this));
|
|
199
198
|
}), t(this, T).subscribe((r) => {
|
|
@@ -283,7 +282,7 @@ let dt = class extends Lt {
|
|
|
283
282
|
if (!t(this, c).length)
|
|
284
283
|
return;
|
|
285
284
|
const e = t(this, m).current;
|
|
286
|
-
f(this, xt,
|
|
285
|
+
f(this, xt, Vt).call(this, i);
|
|
287
286
|
const r = t(this, c)[e], a = t(this, c)[t(this, m).current];
|
|
288
287
|
if (r && a) {
|
|
289
288
|
let g = 0;
|
|
@@ -327,7 +326,7 @@ N = /* @__PURE__ */ new WeakSet();
|
|
|
327
326
|
ut = function() {
|
|
328
327
|
f(this, F, U).call(this), t(this, ct).assignedElements().forEach((i) => {
|
|
329
328
|
i instanceof HTMLElement && t(this, c).push(new Qt(i, this));
|
|
330
|
-
}), t(this, u).style.transform = "", t(this,
|
|
329
|
+
}), t(this, u).style.transform = "", t(this, D).call(this);
|
|
331
330
|
};
|
|
332
331
|
F = /* @__PURE__ */ new WeakSet();
|
|
333
332
|
U = function() {
|
|
@@ -345,16 +344,16 @@ Wt = function() {
|
|
|
345
344
|
};
|
|
346
345
|
tt = /* @__PURE__ */ new WeakSet();
|
|
347
346
|
vt = function() {
|
|
348
|
-
ot.unsubscribe(t(this,
|
|
347
|
+
ot.unsubscribe(t(this, D)), t(this, o).reset(), f(this, pt, kt).call(this), t(this, u).style.transform = "", t(this, O).current && f(this, F, U).call(this), I.unregister(this);
|
|
349
348
|
};
|
|
350
349
|
et = /* @__PURE__ */ new WeakSet();
|
|
351
350
|
_t = function() {
|
|
352
|
-
t(this, O).current && f(this, N, ut).call(this), I.register(this), ot.subscribe(t(this,
|
|
351
|
+
t(this, O).current && f(this, N, ut).call(this), I.register(this), ot.subscribe(t(this, D), Pt.SCROLL), f(this, ft, Wt).call(this);
|
|
353
352
|
};
|
|
354
|
-
|
|
353
|
+
D = /* @__PURE__ */ new WeakMap();
|
|
355
354
|
mt = /* @__PURE__ */ new WeakMap();
|
|
356
355
|
xt = /* @__PURE__ */ new WeakSet();
|
|
357
|
-
|
|
356
|
+
Vt = function(i) {
|
|
358
357
|
t(this, k).current ? (t(this, m).current = i % t(this, c).length, t(this, m).current = t(this, m).current < 0 ? t(this, c).length + t(this, m).current : t(this, m).current) : t(this, m).current = zt(i, 0, t(this, c).length - 1);
|
|
359
358
|
};
|
|
360
359
|
st = /* @__PURE__ */ new WeakMap();
|
|
@@ -373,7 +372,7 @@ var Z;
|
|
|
373
372
|
class Yt extends Lt {
|
|
374
373
|
constructor() {
|
|
375
374
|
super(...arguments);
|
|
376
|
-
|
|
375
|
+
V(this, Z, null);
|
|
377
376
|
}
|
|
378
377
|
get scrollElement() {
|
|
379
378
|
return n(this, Z);
|
|
@@ -396,7 +395,7 @@ var jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, ee = (i, s
|
|
|
396
395
|
throw TypeError("Cannot add the same private member more than once");
|
|
397
396
|
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
398
397
|
}, M = (i, s, e, r) => (Rt(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e), rt, b, A, z, K, G, nt, ht, lt, at;
|
|
399
|
-
const se =
|
|
398
|
+
const se = Dt({
|
|
400
399
|
":host": {
|
|
401
400
|
display: "inline-block",
|
|
402
401
|
zIndex: "1",
|
package/lib/select/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-vI4hmrI8.cjs");Object.defineProperty(exports,"SelectElement",{enumerable:!0,get:()=>e.SelectElement});Object.defineProperty(exports,"SelectHeadElement",{enumerable:!0,get:()=>e.SelectHeadElement});Object.defineProperty(exports,"SelectOptionElement",{enumerable:!0,get:()=>e.SelectOptionElement});exports.SelectUserElement=e.SelectUserElement;
|
package/lib/select/index.js
CHANGED
package/lib/store/Derived.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { Store, StoreOptions } from './Store';
|
|
|
2
2
|
export type DerivedCallback<StoreType, DerivedType> = (value: StoreType) => DerivedType;
|
|
3
3
|
export declare class Derived<DerivedType, StoreType> extends Store<DerivedType> {
|
|
4
4
|
#private;
|
|
5
|
-
constructor(store: Store<StoreType>, callback: DerivedCallback<StoreType, DerivedType>, parameters?: StoreOptions<DerivedType>);
|
|
5
|
+
constructor(store: Store<StoreType, any, any>, callback: DerivedCallback<StoreType, DerivedType>, parameters?: StoreOptions<DerivedType>);
|
|
6
6
|
close(): void;
|
|
7
7
|
}
|
package/lib/store/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
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-C2Vv1xxR.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;
|