aptechka 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/attribute/index.js +12 -12
- package/lib/canvas/index.cjs +7 -1
- package/lib/canvas/index.js +54 -58
- package/lib/controls/index.js +1 -1
- package/lib/{createStylesheet-COAZH1Mw.js → createStylesheet-C68ja-RS.js} +3 -3
- package/lib/css-property/index.js +4 -4
- package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +133 -122
- package/lib/element-resizer/index.js +8 -8
- package/lib/en3/helpers/index.js +2 -2
- package/lib/en3/index.js +1 -1
- package/lib/en3/loaders/index.js +1 -1
- package/lib/en3/utils/index.js +2 -2
- package/lib/{en3-x-Ki30MY.js → en3-sK9Z-fp2.js} +1 -1
- package/lib/file-BEr-o55N.js +31 -0
- package/lib/file-C9BbxzVU.cjs +1 -0
- package/lib/intersector/index.js +7 -7
- package/lib/layout-box/index.js +14 -14
- package/lib/need_redo_tweaker/index.cjs +18 -0
- package/lib/need_redo_tweaker/index.js +1343 -0
- package/lib/pointer/index.js +1 -1
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +60 -62
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +104 -105
- package/lib/scroll-entries/index.js +15 -15
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +55 -86
- package/lib/{tags-BL3kQp9o.js → tags-zft1DGBz.js} +92 -92
- package/lib/ticker/index.js +1 -1
- package/lib/{traverseMaterials-mGC2_FkG.js → traverseMaterials-BlZbRhgW.js} +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +56 -57
- package/package.json +7 -47
- package/lib/accordion/index.cjs +0 -1
- package/lib/accordion/index.js +0 -167
- package/lib/checkbox/index.cjs +0 -1
- package/lib/checkbox/index.js +0 -112
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/events-BGwqaxVW.cjs +0 -1
- package/lib/events-CJTUMSLU.js +0 -20
- package/lib/file-EevnUtRj.cjs +0 -1
- package/lib/file-lxi_oXJf.js +0 -13
- package/lib/index-BuAuBz2_.cjs +0 -9
- package/lib/index-CenF0JbH.js +0 -261
- package/lib/modal/index.cjs +0 -1
- package/lib/modal/index.js +0 -133
- package/lib/select/index.cjs +0 -1
- package/lib/select/index.js +0 -7
- package/lib/theme/index.cjs +0 -1
- package/lib/theme/index.js +0 -25
- package/lib/tweaker/index.cjs +0 -10
- package/lib/tweaker/index.js +0 -989
package/lib/index-CenF0JbH.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
var I = (s) => {
|
|
2
|
-
throw TypeError(s);
|
|
3
|
-
};
|
|
4
|
-
var T = (s, i, t) => i.has(s) || I("Cannot " + t);
|
|
5
|
-
var e = (s, i, t) => (T(s, i, "read from private field"), t ? t.call(s) : i.get(s)), n = (s, i, t) => i.has(s) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), a = (s, i, t, o) => (T(s, i, "write to private field"), o ? o.call(s, t) : i.set(s, t), t), g = (s, i, t) => (T(s, i, "access private method"), t);
|
|
6
|
-
import "./Store-C46i0nvr.js";
|
|
7
|
-
import { i as H } from "./browser-0zX67oeU.js";
|
|
8
|
-
import { a as D, d as B } from "./events-CJTUMSLU.js";
|
|
9
|
-
import { g as R } from "./style-j2TwriJ_.js";
|
|
10
|
-
import "./ticker/index.js";
|
|
11
|
-
import { e as S, p as q, ay as v, D as O } from "./tags-BL3kQp9o.js";
|
|
12
|
-
import { c as M } from "./createStylesheet-COAZH1Mw.js";
|
|
13
|
-
import { aptechkaTheme as F } from "./theme/index.js";
|
|
14
|
-
const P = M({
|
|
15
|
-
":host": {
|
|
16
|
-
position: "relative"
|
|
17
|
-
},
|
|
18
|
-
".head": {
|
|
19
|
-
width: "100%",
|
|
20
|
-
cursor: "default",
|
|
21
|
-
background: "none",
|
|
22
|
-
border: "none",
|
|
23
|
-
color: "inherit",
|
|
24
|
-
fontFamily: "inherit",
|
|
25
|
-
fontSize: "inherit",
|
|
26
|
-
fontWeight: "inherit",
|
|
27
|
-
textAlign: "start",
|
|
28
|
-
padding: "0",
|
|
29
|
-
margin: "0"
|
|
30
|
-
},
|
|
31
|
-
".body": {
|
|
32
|
-
boxSizing: "border-box",
|
|
33
|
-
position: "var(--position, unset)",
|
|
34
|
-
top: "100%",
|
|
35
|
-
left: "0",
|
|
36
|
-
width: "100%",
|
|
37
|
-
overflow: "hidden",
|
|
38
|
-
transitionDuration: "var(--duration, var(--duration-short))",
|
|
39
|
-
transitionProperty: "height",
|
|
40
|
-
cursor: "default"
|
|
41
|
-
},
|
|
42
|
-
".body-inner": {
|
|
43
|
-
display: "grid",
|
|
44
|
-
gap: "var(--gap, 0px)",
|
|
45
|
-
width: "100%",
|
|
46
|
-
paddingTop: "var(--gap, 0px)"
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
var r, c, l, h, d, u, L, f, k;
|
|
50
|
-
const A = class A extends HTMLElement {
|
|
51
|
-
constructor() {
|
|
52
|
-
super();
|
|
53
|
-
n(this, f);
|
|
54
|
-
n(this, r, null);
|
|
55
|
-
n(this, c, "");
|
|
56
|
-
n(this, l, null);
|
|
57
|
-
n(this, h, !1);
|
|
58
|
-
n(this, d);
|
|
59
|
-
n(this, u, null);
|
|
60
|
-
n(this, L, () => {
|
|
61
|
-
D(this);
|
|
62
|
-
});
|
|
63
|
-
H && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(P), a(this, r, this.attachInternals()), a(this, u, new ResizeObserver(e(this, L))), S(this, {
|
|
64
|
-
children: [
|
|
65
|
-
q({
|
|
66
|
-
class: "head",
|
|
67
|
-
children: v({ name: "head" }),
|
|
68
|
-
onClick: () => {
|
|
69
|
-
this.opened ? this.close() : this.open();
|
|
70
|
-
}
|
|
71
|
-
}),
|
|
72
|
-
O({
|
|
73
|
-
class: "body",
|
|
74
|
-
style: {
|
|
75
|
-
height: "0px"
|
|
76
|
-
},
|
|
77
|
-
children: O({
|
|
78
|
-
class: "body-inner",
|
|
79
|
-
children: v()
|
|
80
|
-
}),
|
|
81
|
-
ref: (o) => {
|
|
82
|
-
a(this, l, o);
|
|
83
|
-
}
|
|
84
|
-
})
|
|
85
|
-
]
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
get value() {
|
|
89
|
-
return e(this, c);
|
|
90
|
-
}
|
|
91
|
-
set value(t) {
|
|
92
|
-
a(this, c, t), this.dispatchEvent(
|
|
93
|
-
new Event("change", {
|
|
94
|
-
bubbles: !0,
|
|
95
|
-
composed: !0
|
|
96
|
-
})
|
|
97
|
-
), e(this, r).setFormValue(e(this, c));
|
|
98
|
-
}
|
|
99
|
-
get internals() {
|
|
100
|
-
return e(this, r);
|
|
101
|
-
}
|
|
102
|
-
get opened() {
|
|
103
|
-
return e(this, h);
|
|
104
|
-
}
|
|
105
|
-
open() {
|
|
106
|
-
clearTimeout(e(this, d)), a(this, h, !0), e(this, l).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
|
|
107
|
-
this.classList.add("opened"), e(this, l).style.height = e(this, l).scrollHeight + "px", g(this, f, k).call(this);
|
|
108
|
-
}, 0);
|
|
109
|
-
}
|
|
110
|
-
close() {
|
|
111
|
-
a(this, h, !1), e(this, l).style.height = "0px", this.classList.remove("opened"), g(this, f, k).call(this), a(this, d, setTimeout(() => {
|
|
112
|
-
this.classList.remove("triggered"), e(this, l).style.display = "none";
|
|
113
|
-
}, R(e(this, l))));
|
|
114
|
-
}
|
|
115
|
-
connectedCallback() {
|
|
116
|
-
e(this, u).observe(e(this, l));
|
|
117
|
-
}
|
|
118
|
-
disconnectedCallback() {
|
|
119
|
-
clearTimeout(e(this, d)), e(this, u).disconnect();
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
r = new WeakMap(), c = new WeakMap(), l = new WeakMap(), h = new WeakMap(), d = new WeakMap(), u = new WeakMap(), L = new WeakMap(), f = new WeakSet(), k = function() {
|
|
123
|
-
B(this), this.dispatchEvent(
|
|
124
|
-
new CustomEvent("selectToggle", {
|
|
125
|
-
bubbles: !0,
|
|
126
|
-
composed: !0,
|
|
127
|
-
detail: {
|
|
128
|
-
opened: e(this, h)
|
|
129
|
-
}
|
|
130
|
-
})
|
|
131
|
-
);
|
|
132
|
-
}, A.formAssociated = !0;
|
|
133
|
-
let C = A;
|
|
134
|
-
customElements.get("e-select") || customElements.define("e-select", C);
|
|
135
|
-
var E;
|
|
136
|
-
class $ extends HTMLElement {
|
|
137
|
-
constructor() {
|
|
138
|
-
super(...arguments);
|
|
139
|
-
n(this, E, null);
|
|
140
|
-
}
|
|
141
|
-
get selectElement() {
|
|
142
|
-
return e(this, E);
|
|
143
|
-
}
|
|
144
|
-
connectedCallback() {
|
|
145
|
-
var o, x;
|
|
146
|
-
const t = (x = (o = this.assignedSlot) == null ? void 0 : o.getRootNode()) == null ? void 0 : x.host;
|
|
147
|
-
t ? a(this, E, t) : console.log(this, "e-select not found");
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
E = new WeakMap();
|
|
151
|
-
const j = M({
|
|
152
|
-
":host": {
|
|
153
|
-
width: "100%",
|
|
154
|
-
height: "40px",
|
|
155
|
-
display: "inline-flex",
|
|
156
|
-
alignItems: "center"
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
var m, b, z;
|
|
160
|
-
class K extends $ {
|
|
161
|
-
constructor() {
|
|
162
|
-
super();
|
|
163
|
-
n(this, b);
|
|
164
|
-
n(this, m, () => {
|
|
165
|
-
this.selectElement.value === this.value ? this.style.display = "none" : this.style.display = "";
|
|
166
|
-
});
|
|
167
|
-
H && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(j), S(this, {
|
|
168
|
-
tabindex: 0,
|
|
169
|
-
onClick: () => {
|
|
170
|
-
g(this, b, z).call(this);
|
|
171
|
-
},
|
|
172
|
-
onKeydown: (o) => {
|
|
173
|
-
o.code === "Space" && g(this, b, z).call(this);
|
|
174
|
-
},
|
|
175
|
-
children: v()
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
get value() {
|
|
179
|
-
return (this.hasAttribute("value") ? this.getAttribute("value") : this.innerText) || "";
|
|
180
|
-
}
|
|
181
|
-
connectedCallback() {
|
|
182
|
-
super.connectedCallback(), this.hasAttribute("default") && (this.selectElement.value || (this.selectElement.value = this.value)), this.selectElement.addEventListener("change", e(this, m)), setTimeout(() => {
|
|
183
|
-
e(this, m).call(this);
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
disconnectedCallback() {
|
|
187
|
-
this.selectElement.removeEventListener("change", e(this, m));
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
m = new WeakMap(), b = new WeakSet(), z = function() {
|
|
191
|
-
this.selectElement.value = this.value, this.selectElement.close();
|
|
192
|
-
};
|
|
193
|
-
customElements.get("e-select-option") || customElements.define("e-select-option", K);
|
|
194
|
-
const N = `<svg
|
|
195
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
196
|
-
width="32"
|
|
197
|
-
height="32"
|
|
198
|
-
viewBox="0 0 24 24"
|
|
199
|
-
>
|
|
200
|
-
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
201
|
-
</svg>
|
|
202
|
-
`, U = M({
|
|
203
|
-
":host": {
|
|
204
|
-
width: "100%",
|
|
205
|
-
height: "40px",
|
|
206
|
-
display: "inline-flex",
|
|
207
|
-
alignItems: "center",
|
|
208
|
-
justifyContent: "space-between"
|
|
209
|
-
},
|
|
210
|
-
".default-arrow": {
|
|
211
|
-
flexShrink: "0",
|
|
212
|
-
width: "var(--arrow-size, 1em)",
|
|
213
|
-
height: "var(--arrow-size, 1em)",
|
|
214
|
-
fill: `var(--arrow-color, ${F.colorMain.var})`,
|
|
215
|
-
transitionProperty: "transform",
|
|
216
|
-
transitionDuration: "var(--duration, var(--duration-short))"
|
|
217
|
-
},
|
|
218
|
-
":host(.opened) .default-arrow": {
|
|
219
|
-
transform: "scaleY(-1)"
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
var w, p, y;
|
|
223
|
-
class V extends $ {
|
|
224
|
-
constructor() {
|
|
225
|
-
super();
|
|
226
|
-
n(this, w, null);
|
|
227
|
-
n(this, p, () => {
|
|
228
|
-
const o = this.selectElement.shadowRoot.querySelector(
|
|
229
|
-
".body slot"
|
|
230
|
-
).assignedElements().find((x) => x.value === this.selectElement.value);
|
|
231
|
-
o && (e(this, w).innerHTML = o.innerHTML);
|
|
232
|
-
});
|
|
233
|
-
n(this, y, () => {
|
|
234
|
-
this.classList.toggle("opened", this.selectElement.opened);
|
|
235
|
-
});
|
|
236
|
-
H && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(U), S(this, {
|
|
237
|
-
children: [
|
|
238
|
-
v(),
|
|
239
|
-
v({
|
|
240
|
-
name: "arrow",
|
|
241
|
-
children: S(N, { class: "default-arrow" })
|
|
242
|
-
})
|
|
243
|
-
]
|
|
244
|
-
}), this.slot = "head");
|
|
245
|
-
}
|
|
246
|
-
connectedCallback() {
|
|
247
|
-
super.connectedCallback(), a(this, w, this.querySelector("[data-value-holder]") || this), this.selectElement.addEventListener("change", e(this, p)), e(this, p).call(this), this.selectElement.addEventListener("selectToggle", e(this, y));
|
|
248
|
-
}
|
|
249
|
-
disconnectedCallback() {
|
|
250
|
-
this.selectElement.removeEventListener("change", e(this, p)), this.selectElement.removeEventListener("selectToggle", e(this, y));
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
w = new WeakMap(), p = new WeakMap(), y = new WeakMap();
|
|
254
|
-
customElements.get("e-select-head") || customElements.define("e-select-head", V);
|
|
255
|
-
export {
|
|
256
|
-
C as S,
|
|
257
|
-
N as a,
|
|
258
|
-
$ as b,
|
|
259
|
-
K as c,
|
|
260
|
-
V as d
|
|
261
|
-
};
|
package/lib/modal/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var d=e=>{throw TypeError(e)};var u=(e,t,o)=>t.has(e)||d("Cannot "+o);var i=(e,t,o)=>(u(e,t,"read from private field"),o?o.call(e):t.get(e)),a=(e,t,o)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),c=(e,t,o,l)=>(u(e,t,"write to private field"),l?l.call(e,o):t.set(e,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-npaZHvX4.cjs");const b=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const n=require("../tags-6_ETuR75.cjs"),f=require("../createStylesheet-Csfmh-MH.cjs"),m=require("../popover/index.cjs"),p=require("../theme/index.cjs"),v=f.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:"var(--transition-duration)"},":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",zIndex:"1",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:"var(--transition-duration)",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, ${p.aptechkaTheme.colorMain.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});var s,r;class h extends m.PopoverElement{constructor(){super();a(this,s,null);a(this,r,null);b.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(v),n.element(this,{children:n.div({class:"inner",outside:!0,children:n.div({class:"content",children:[n.element("e-popover-button",{type:"close",target:"parent",class:"close-button",lightChildren:[n.slot({name:"close-button",children:n.span({class:"close-button-default"})})]}),n.slot()]}),ref:l=>c(this,r,l)})}),c(this,s,new ResizeObserver(()=>{i(this,r).scrollHeight>i(this,r).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),i(this,s).observe(this)}disconnectedCallback(){super.disconnectedCallback(),i(this,s).disconnect()}}s=new WeakMap,r=new WeakMap;customElements.get("e-modal")||customElements.define("e-modal",h);exports.ModalElement=h;
|
package/lib/modal/index.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
var c = (t) => {
|
|
2
|
-
throw TypeError(t);
|
|
3
|
-
};
|
|
4
|
-
var d = (t, e, o) => e.has(t) || c("Cannot " + o);
|
|
5
|
-
var r = (t, e, o) => (d(t, e, "read from private field"), o ? o.call(t) : e.get(t)), a = (t, e, o) => e.has(t) ? c("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, o), l = (t, e, o, i) => (d(t, e, "write to private field"), i ? i.call(t, o) : e.set(t, o), o);
|
|
6
|
-
import "../Store-C46i0nvr.js";
|
|
7
|
-
import { i as m } from "../browser-0zX67oeU.js";
|
|
8
|
-
import "../ticker/index.js";
|
|
9
|
-
import { e as h, D as u, ay as f, aB as b } from "../tags-BL3kQp9o.js";
|
|
10
|
-
import { c as p } from "../createStylesheet-COAZH1Mw.js";
|
|
11
|
-
import { PopoverElement as v } from "../popover/index.js";
|
|
12
|
-
import { aptechkaTheme as g } from "../theme/index.js";
|
|
13
|
-
const w = p({
|
|
14
|
-
":host": {
|
|
15
|
-
position: "fixed",
|
|
16
|
-
top: "0",
|
|
17
|
-
left: "0",
|
|
18
|
-
zIndex: "1",
|
|
19
|
-
width: "100%",
|
|
20
|
-
height: "100%",
|
|
21
|
-
transitionProperty: "opacity",
|
|
22
|
-
transitionDuration: "var(--transition-duration)"
|
|
23
|
-
},
|
|
24
|
-
":host::before": {
|
|
25
|
-
content: '""',
|
|
26
|
-
position: "fixed",
|
|
27
|
-
top: "0",
|
|
28
|
-
left: "0",
|
|
29
|
-
zIndex: "-1",
|
|
30
|
-
width: "100%",
|
|
31
|
-
height: "100%",
|
|
32
|
-
backgroundColor: "var(--backdrop, rgba(0, 0, 0, 0.8))"
|
|
33
|
-
},
|
|
34
|
-
".inner": {
|
|
35
|
-
width: "100%",
|
|
36
|
-
height: "100%",
|
|
37
|
-
display: "flex",
|
|
38
|
-
alignItems: "center",
|
|
39
|
-
justifyContent: "center",
|
|
40
|
-
overflow: "hidden auto"
|
|
41
|
-
},
|
|
42
|
-
".overflow .inner": {
|
|
43
|
-
alignItems: "flex-start"
|
|
44
|
-
},
|
|
45
|
-
".content": {
|
|
46
|
-
position: "relative"
|
|
47
|
-
},
|
|
48
|
-
".close-button": {
|
|
49
|
-
position: "absolute",
|
|
50
|
-
zIndex: "1",
|
|
51
|
-
top: "var(--close-button-top, 0.5em)",
|
|
52
|
-
right: "var(--close-button-right, 0.5em)",
|
|
53
|
-
background: "none",
|
|
54
|
-
border: "none",
|
|
55
|
-
fontFamily: "inherit",
|
|
56
|
-
fontSize: "inherit",
|
|
57
|
-
fontWeight: "inherit"
|
|
58
|
-
},
|
|
59
|
-
".close-button-default": {
|
|
60
|
-
width: "var(--close-button-size, 1.5em)",
|
|
61
|
-
height: "var(--close-button-size, 1.5em)",
|
|
62
|
-
display: "flex",
|
|
63
|
-
alignItems: "center",
|
|
64
|
-
justifyContent: "center",
|
|
65
|
-
transitionProperty: "transform",
|
|
66
|
-
transitionDuration: "var(--transition-duration)",
|
|
67
|
-
willChange: "transform"
|
|
68
|
-
},
|
|
69
|
-
".close-button:hover .close-button-default": {
|
|
70
|
-
transform: "scale(0.9)"
|
|
71
|
-
},
|
|
72
|
-
".close-button:active .close-button-default": {
|
|
73
|
-
transform: "scale(0.7)"
|
|
74
|
-
},
|
|
75
|
-
".close-button-default::before, .close-button-default::after": {
|
|
76
|
-
content: '""',
|
|
77
|
-
position: "absolute",
|
|
78
|
-
width: "var(--close-button-thickness, 0.1em)",
|
|
79
|
-
height: "100%",
|
|
80
|
-
backgroundColor: `var(--close-button-color, ${g.colorMain.var})`
|
|
81
|
-
},
|
|
82
|
-
".close-button-default::before": {
|
|
83
|
-
transform: "rotate(-45deg)"
|
|
84
|
-
},
|
|
85
|
-
".close-button-default::after": {
|
|
86
|
-
transform: "rotate(45deg)"
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
var n, s;
|
|
90
|
-
class y extends v {
|
|
91
|
-
constructor() {
|
|
92
|
-
super();
|
|
93
|
-
a(this, n, null);
|
|
94
|
-
a(this, s, null);
|
|
95
|
-
m && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(w), h(this, {
|
|
96
|
-
children: u({
|
|
97
|
-
class: "inner",
|
|
98
|
-
outside: !0,
|
|
99
|
-
children: u({
|
|
100
|
-
class: "content",
|
|
101
|
-
children: [
|
|
102
|
-
h("e-popover-button", {
|
|
103
|
-
type: "close",
|
|
104
|
-
target: "parent",
|
|
105
|
-
class: "close-button",
|
|
106
|
-
lightChildren: [
|
|
107
|
-
f({
|
|
108
|
-
name: "close-button",
|
|
109
|
-
children: b({ class: "close-button-default" })
|
|
110
|
-
})
|
|
111
|
-
]
|
|
112
|
-
}),
|
|
113
|
-
f()
|
|
114
|
-
]
|
|
115
|
-
}),
|
|
116
|
-
ref: (i) => l(this, s, i)
|
|
117
|
-
})
|
|
118
|
-
}), l(this, n, new ResizeObserver(() => {
|
|
119
|
-
r(this, s).scrollHeight > r(this, s).clientHeight ? this.classList.add("overflow") : this.classList.remove("overflow");
|
|
120
|
-
})));
|
|
121
|
-
}
|
|
122
|
-
connectedCallback() {
|
|
123
|
-
super.connectedCallback(), r(this, n).observe(this);
|
|
124
|
-
}
|
|
125
|
-
disconnectedCallback() {
|
|
126
|
-
super.disconnectedCallback(), r(this, n).disconnect();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
n = new WeakMap(), s = new WeakMap();
|
|
130
|
-
customElements.get("e-modal") || customElements.define("e-modal", y);
|
|
131
|
-
export {
|
|
132
|
-
y as ModalElement
|
|
133
|
-
};
|
package/lib/select/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BuAuBz2_.cjs");exports.SelectElement=e.SelectElement;exports.SelectHeadElement=e.SelectHeadElement;exports.SelectOptionElement=e.SelectOptionElement;exports.SelectUserElement=e.SelectUserElement;
|
package/lib/select/index.js
DELETED
package/lib/theme/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-npaZHvX4.cjs");const t=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const o=require("../tags-6_ETuR75.cjs"),a=require("../createTheme-Cfaw9UmV.cjs"),r=a.createTheme({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(t.isBrowser){const e=o.style({":root":r.style}).node;e.setAttribute("data-permanent",""),document.head.appendChild(e)}exports.aptechkaTheme=r;
|
package/lib/theme/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import "../Store-C46i0nvr.js";
|
|
2
|
-
import { i as e } from "../browser-0zX67oeU.js";
|
|
3
|
-
import "../ticker/index.js";
|
|
4
|
-
import { aD as r } from "../tags-BL3kQp9o.js";
|
|
5
|
-
import { c as t } from "../createTheme-CHnsCgAr.js";
|
|
6
|
-
const a = t(
|
|
7
|
-
{
|
|
8
|
-
colorMain: "#1c1c1c",
|
|
9
|
-
colorMainAux: "#282828",
|
|
10
|
-
colorFont: "#ffffff",
|
|
11
|
-
colorActive: "#00E5B0",
|
|
12
|
-
borderRadius: "12px",
|
|
13
|
-
borderRadiusSmall: "4px"
|
|
14
|
-
},
|
|
15
|
-
{ prefix: "aptechka-" }
|
|
16
|
-
);
|
|
17
|
-
if (e) {
|
|
18
|
-
const o = r({
|
|
19
|
-
":root": a.style
|
|
20
|
-
}).node;
|
|
21
|
-
o.setAttribute("data-permanent", ""), document.head.appendChild(o);
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
a as aptechkaTheme
|
|
25
|
-
};
|
package/lib/tweaker/index.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";var ve=h=>{throw TypeError(h)};var ue=(h,i,e)=>i.has(h)||ve("Cannot "+e);var t=(h,i,e)=>(ue(h,i,"read from private field"),e?e.call(h):i.get(h)),a=(h,i,e)=>i.has(h)?ve("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(h):i.set(h,e),o=(h,i,e,s)=>(ue(h,i,"write to private field"),s?s.call(h,e):i.set(h,e),e),f=(h,i,e)=>(ue(h,i,"access private method"),e);const Ne=require("../browser-CpzFX2xg.cjs"),g=require("../Store-npaZHvX4.cjs"),De=require("../file-EevnUtRj.cjs"),He=require("../function-MthRj-GJ.cjs"),ye=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const n=require("../tags-6_ETuR75.cjs"),C=require("../createStylesheet-Csfmh-MH.cjs"),Ke=require("../Viewport-Cv4TRGiv.cjs"),c=require("../theme/index.cjs"),Oe=require("../index-BuAuBz2_.cjs"),Ze=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const Je=require("../math-GDWEqu7y.cjs"),pe=require("../polyfills-CM4SCDTt.cjs"),ke=require("../element-resizer/index.cjs"),Se='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',xe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',We='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',_e='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var L,b,x;class je{constructor(){a(this,L);a(this,b);a(this,x);this.scrollValue=0,o(this,L,""),o(this,b,[]),o(this,x,{}),o(this,L,g.storeRegistry.name+"-tweaker")}openPanel(i){t(this,b).includes(i)||t(this,b).push(i)}closePanel(i){o(this,b,t(this,b).filter(e=>e!==i))}isPanelOpened(i){return t(this,b).includes(i)}changedSizes(i){return t(this,x)[i]}changeSize(i,e){e?t(this,x)[i]=e:delete t(this,x)[i]}save(){const i={openedPanels:t(this,b),changedSizes:t(this,x),scrollValue:this.scrollValue};localStorage.setItem(t(this,L),JSON.stringify(i)),g.storeRegistry.saveState()}load(){g.storeRegistry.loadState();const i=localStorage.getItem(t(this,L));if(i)try{const e=JSON.parse(i);e.openedPanels&&o(this,b,e.openedPanels),e.changedSizes&&o(this,x,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}L=new WeakMap,b=new WeakMap,x=new WeakMap;const w=new je;var R;class K extends HTMLElement{constructor(...e){super();a(this,R);o(this,R,e)}addStore(e){t(this,R).push(e)}get firstStore(){return t(this,R)[0]}get stores(){return t(this,R)}updateStores(e){t(this,R).forEach(s=>{s.current=e})}}R=new WeakMap;const Be=C.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:c.aptechkaTheme.borderRadiusSmall.var}});class Ee extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Be),n.element(this,{children:[n.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(r=>{s.checked=r.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",Ee);const Xe=C.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ce extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Xe),n.element(this,{children:[n.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ce);const Ye=C.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class ze extends K{constructor(...i){var s,r;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ye),console.log(this.firstStore),n.element(this,{children:[n.a({href:this.firstStore,target:(r=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",ze);const Ge=C.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var P,q,$,E,F,Z,J,S,I,W,_,u,V,ge,me,ne,j;class Te extends K{constructor(...e){var r,l,d,p,y,M,O,we;super(...e);a(this,u);a(this,P,[]);a(this,q,[]);a(this,$);a(this,E);a(this,F);a(this,Z);a(this,J);a(this,S);a(this,I,!1);a(this,W,e=>{const s=f(this,u,V).call(this,e);return s.map((r,l)=>{const d=typeof r=="string"?parseFloat(r)||t(this,E):r,p=Je.clamp(d,t(this,E),t(this,F)),y=pe.toStep(p,t(this,$));s[l]=y}),t(this,J)==="number"?s[0]:s});a(this,_,()=>{f(this,u,V).call(this).map((e,s)=>{const r=t(this,P)[s];r&&(r.value=(e||0).toString())}),f(this,u,ge).call(this)});a(this,j,()=>{f(this,u,ge).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ge),o(this,E,pe.nullishCoalescing((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.min,-1/0)),o(this,F,pe.nullishCoalescing((p=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:p.max,1/0)),o(this,$,((M=(y=this.firstStore.passport)==null?void 0:y.manager)==null?void 0:M.step)||.01),o(this,Z,((we=(O=this.firstStore.passport)==null?void 0:O.manager)==null?void 0:we.ease)||1),o(this,J,Array.isArray(this.firstStore.current)?"array":"number"),o(this,S,isFinite(t(this,F))&&isFinite(t(this,E))),n.element(this,{class:t(this,S)?"":"infinite",children:f(this,u,V).call(this).map((Le,ie)=>n.div({class:"inputs-wrapper",children:[n.input({type:"number",step:t(this,$),min:t(this,E),max:t(this,F),ref:z=>t(this,P).push(z),value:Le,onChange:()=>{this.updateStores(t(this,P).map(z=>parseFloat(z.value)))}}),n.div({class:"drag",children:[n.div({class:"drag-knob",ref:z=>t(this,q).push(z),onPointerdown:z=>{z.preventDefault(),o(this,I,!0);const he=f(this,u,V).call(this),Pe=he[ie],T=t(this,q)[ie],Ie=t(this,P)[ie];if(T&&Ie){const ce=T.parentElement,Ve=f(this,u,me).call(this);ce.classList.add("grabbing"),ye.setupDrag(de=>{const be=de.x-z.x,qe=t(this,S)?ce.offsetWidth/(Ve||1):1,$e=Pe+be/qe*t(this,Z);if(he[ie]=$e,!t(this,S)){const Ae=f(this,u,ne).call(this,T,0);T.style.transform=`translateX(${Ae+be}px)`}this.updateStores([...he])},()=>{if(o(this,I,!1),!t(this,S)){const de=f(this,u,ne).call(this,T,0);T.style.transition="transform 0.1s",T.style.transform=`translateX(${de}px)`,ce.classList.remove("grabbing"),setTimeout(()=>{T.style.transition=""},100)}})}},children:n.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,W)),this.firstStore.subscribe(t(this,_)),ke.elementResizer.subscribe(this,t(this,j))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,W)),this.firstStore.unsubscribe(t(this,_)),ke.elementResizer.unsubscribe(t(this,j))}}P=new WeakMap,q=new WeakMap,$=new WeakMap,E=new WeakMap,F=new WeakMap,Z=new WeakMap,J=new WeakMap,S=new WeakMap,I=new WeakMap,W=new WeakMap,_=new WeakMap,u=new WeakSet,V=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},ge=function(){f(this,u,V).call(this).map((e,s)=>{const r=t(this,q)[s];if(r&&(!t(this,I)||t(this,I)&&t(this,S))){const l=f(this,u,ne).call(this,r,e);r.style.transform=`translateX(${l}px)`}})},me=function(){return t(this,S)?t(this,F)-t(this,E):0},ne=function(e,s){const r=e.parentElement,l=f(this,u,me).call(this),d=l?s/l:.5;return(r.offsetWidth-e.offsetWidth)*d},j=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Te);const Qe=C.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Re extends K{constructor(...i){var r,l;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Qe);const s=((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.variants)||[];n.element(this,{children:n.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[n.element("e-select-head",{lightChildren:[n.span({"data-value-holder":""})]}),...s.map((d,p)=>n.element("e-select-option",{lightChildren:d,default:p===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Re);const Ue=C.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var}});class Fe extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ue),n.element(this,{children:[n.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Fe);const et={boolean:Ee,color:Ce,link:ze,number:Te,select:Re,string:Fe},tt=C.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var v,A,N,D,H,B,X;class fe extends HTMLElement{constructor(e){var l,d,p,y;super();a(this,v,[]);a(this,A);a(this,N);a(this,D,!1);a(this,H);a(this,B,()=>{g.activeStores.current.find(e=>t(this,v).includes(e))||this.remove()});a(this,X,e=>{t(this,D)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,v)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,v).forEach(s=>{s.reset()}),e.preventDefault()))});o(this,v,[e.store]),o(this,A,e.store.passport.name),o(this,N,t(this,A).split(".").slice(-1).toString());const s=((d=(l=e.store.passport)==null?void 0:l.manager)==null?void 0:d.type)||"string";o(this,H,new et[s](t(this,v)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(tt),n.element(this,{class:{disabled:((y=(p=e.store.passport)==null?void 0:p.manager)==null?void 0:y.disabled)||!1},onPointerleave:()=>{o(this,D,!1)},onPointerenter:()=>{o(this,D,!0)},children:[n.div({class:"head",children:[n.div({class:"name",children:t(this,N)+":"}),n.div({class:"head-buttons",children:[n.button({class:"head-button",children:xe,onClick:()=>{navigator.clipboard.writeText(t(this,v)[0].current)}}),n.button({class:"head-button",children:Se,onClick:()=>{t(this,v).forEach(M=>{M.reset()})}})]})]}),t(this,H)]})}get key(){return t(this,A)}get name(){return t(this,N)}get stores(){return t(this,v)}addStore(e){t(this,H).addStore(e)}connectedCallback(){g.activeStores.subscribe(t(this,B)),addEventListener("keydown",t(this,X)),Ze.dispatchSizeChangeEvent(this)}disconnectedCallback(){g.activeStores.unsubscribe(t(this,B)),removeEventListener("keydown",t(this,X))}}v=new WeakMap,A=new WeakMap,N=new WeakMap,D=new WeakMap,H=new WeakMap,B=new WeakMap,X=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",fe);const st=C.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var k,Y,m,G,Q,U,ee,oe;const le=class le extends HTMLElement{constructor(e){super();a(this,k);a(this,Y,new g.Store(null));a(this,m,new g.Store([]));a(this,G);a(this,Q,null);a(this,U,null);a(this,ee,null);a(this,oe,e=>{let s=[],r=[];e.forEach(l=>{s=[...s,...l.removedNodes],r=[...r,...l.addedNodes]}),t(this,m).current=t(this,m).current.filter(l=>!s.includes(l)),t(this,k)&&!t(this,m).current.length&&!r.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(st),o(this,k,e.key),o(this,G,new MutationObserver(t(this,oe))),n.element(this,{children:[n.div({class:"wrapper",children:[n.div({class:"head",onClick:r=>{this.classList.toggle("opened"),this.classList.contains("opened")?w.openPanel(t(this,k)):w.closePanel(t(this,k))},children:[t(this,k)?n.div({class:"name",children:[t(this,k).split(".").slice(-1).toString()]}):null,t(this,Y),n.element(Oe.arrowIcon,{class:"arrow"})]}),n.div({class:"body",ref:r=>{o(this,Q,r)},children:n.div({class:"body-content",children:t(this,m),ref:r=>{o(this,U,r),o(this,ee,r.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,k)}get head(){return t(this,Y)}get content(){return t(this,m)}get bodyElement(){return t(this,Q)}get contentElement(){return t(this,U)}connectedCallback(){w.isPanelOpened(t(this,k))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,G).observe(t(this,ee),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const r=e.store.passport.name.split("."),l=r.slice(0,r.length-e.remainingFolders.length).join("."),d=t(this,m).current.find(p=>p.key===l);d instanceof le?d.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,m).current=[...t(this,m).current,new le({key:l,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const s=t(this,m).current.find(r=>r.key===e.store.passport.name);s instanceof fe?s.addStore(e.store):t(this,m).current=[...t(this,m).current,new fe({store:e.store})]}}};k=new WeakMap,Y=new WeakMap,m=new WeakMap,G=new WeakMap,Q=new WeakMap,U=new WeakMap,ee=new WeakMap,oe=new WeakMap;let ae=le;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",ae);const rt=C.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
2
|
-
100dvh -
|
|
3
|
-
(
|
|
4
|
-
var(--tweaker-offset) * 2 +
|
|
5
|
-
var(--tweaker-folder-height)
|
|
6
|
-
)
|
|
7
|
-
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Ke.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
8
|
-
100dvh -
|
|
9
|
-
var(--tweaker-folder-height)
|
|
10
|
-
)`}}});var te,se,re;class Me extends ae{constructor(){super({key:""});a(this,te,!1);a(this,se,()=>{w.save()});a(this,re,He.debounce(()=>{g.activeStores.current.forEach(e=>{var s;if(e.passport&&!((s=e.passport.manager)!=null&&s.invisible)){const r=e.passport.name.split(".");this.handleStore({store:e,remainingFolders:r.length>1?r.slice(0,-1):[]})}}),t(this,te)||(o(this,te,!0),this.contentElement.scroll({top:w.scrollValue}),this.contentElement.addEventListener("scroll",()=>{w.scrollValue=this.contentElement.scrollTop}))},10));w.load(),this.shadowRoot.adoptedStyleSheets.push(rt),this.head.current=[n.div({class:"tweaker-buttons",onClick:e=>{e.stopPropagation()},children:[n.button({class:"tweaker-button",children:Se,onClick:()=>{g.storeRegistry.resetState()}}),n.button({class:["tweaker-button"],children:[xe],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(g.storeRegistry.getState()))}}),n.button({class:"tweaker-button",children:We,onClick:()=>{De.createJSONAndSave(g.storeRegistry.name,g.storeRegistry.getState())}}),n.label({class:"tweaker-button",children:[_e,n.input({type:"file",style:{display:"none"},onChange:e=>{var l;const r=(l=e.currentTarget.files)==null?void 0:l[0];if(r){const d=new FileReader;d.onload=p=>{var M,O;const y=(O=(M=p.target)==null?void 0:M.result)==null?void 0:O.toString();y&&g.storeRegistry.loadState(y)},d.readAsText(r)}}})]})]})],n.element(this.bodyElement,{children:[n.div({class:"resize",onPointerdown:e=>{e.preventDefault();const s=this.getBoundingClientRect(),r=this.contentElement.scrollTop;ye.setupDrag(l=>{const d=e.x-l.x,p=Math.max(400,s.width+d);this.style.width=p+"px",w.changeSize("tweaker",p)},()=>{setTimeout(()=>{this.contentElement.scroll({top:r})},10)})},onDblclick:()=>{this.style.width="",w.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",t(this,se)),g.activeStores.subscribe(t(this,re)),w.changedSizes("tweaker")&&(this.style.width=w.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",t(this,se)),w.save(),g.activeStores.unsubscribe(t(this,re))}}te=new WeakMap,se=new WeakMap,re=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Me);Ne.isBrowser&&document.body.appendChild(new Me);
|