aptechka 0.1.19 → 0.2.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/ElementConstructor-1bvPqYNa.js +313 -0
- package/lib/ElementConstructor-CdUaQS-S.cjs +1 -0
- package/lib/abstract-elements/index.cjs +1 -1
- package/lib/abstract-elements/index.js +1 -1
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +9 -11
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/{createStylesheet-DTOK6fTn.cjs → createStylesheet-B5Nhxdpo.cjs} +1 -1
- package/lib/{createStylesheet-Zqf3lXhM.js → createStylesheet-DpGvTRP3.js} +1 -1
- package/lib/{createTheme-B_W5dUY9.cjs → createTheme-CLqJF9Pw.cjs} +1 -1
- package/lib/{createTheme-D0IoYkYN.js → createTheme-WJyOPh-q.js} +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/getComponentElement-B0Qb2RbZ.js +145 -0
- package/lib/getComponentElement-BcreYwFe.cjs +1 -0
- package/lib/{index-B-ZmkQyB.cjs → index-BNZNGmrW.cjs} +1 -1
- package/lib/{index-Dizn7btU.js → index-DMIfOO2r.js} +2 -2
- package/lib/jsx/ComponentElement.d.ts +27 -0
- package/lib/jsx/getComponentElement.d.ts +2 -0
- package/lib/jsx/h.d.ts +3 -0
- package/lib/jsx/hooks/useConnect.d.ts +2 -0
- package/lib/jsx/hooks/useContext.d.ts +3 -0
- package/lib/jsx/hooks/useCreate.d.ts +2 -0
- package/lib/jsx/hooks/useDisconnect.d.ts +2 -0
- package/lib/jsx/hooks/useInternals.d.ts +1 -0
- package/lib/jsx/hooks/useShadow.d.ts +1 -0
- package/lib/jsx/hooks/useStore.d.ts +6 -0
- package/lib/jsx/hooks/useStylesheet.d.ts +2 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +12 -0
- package/lib/jsx/index.js +99 -0
- package/lib/jsx/render.d.ts +1 -0
- package/lib/jsx/type.d.ts +184 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/router/Route.d.ts +1 -1
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +80 -78
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +2 -2
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +111 -48
- package/lib/string-Cgp_uJvP.cjs +1 -0
- package/lib/string-DCGBU6em.js +134 -0
- package/lib/studio/index.cjs +1 -1
- package/lib/studio/index.js +14 -14
- package/lib/tags-D0k7-iVY.js +485 -0
- package/lib/tags-DGIuh1Hi.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/utils/dom.d.ts +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +27 -28
- package/package.json +15 -6
- package/lib/Composed-ClTo1f0b.js +0 -79
- package/lib/Composed-Mdr4ZFbI.cjs +0 -1
- package/lib/component/Component.d.ts +0 -26
- package/lib/component/hooks/animation.d.ts +0 -9
- package/lib/component/hooks/attributes.d.ts +0 -2
- package/lib/component/hooks/custom-element.d.ts +0 -2
- package/lib/component/hooks/intersection.d.ts +0 -4
- package/lib/component/hooks/resize.d.ts +0 -6
- package/lib/component/hooks/stores.d.ts +0 -6
- package/lib/component/hooks/style.d.ts +0 -2
- package/lib/component/index.cjs +0 -1
- package/lib/component/index.d.ts +0 -8
- package/lib/component/index.js +0 -219
- package/lib/object-BZELAoVj.cjs +0 -1
- package/lib/object-R34VLqhp.js +0 -85
- package/lib/string-3lAkpJJP.js +0 -51
- package/lib/string-vBu90jhV.cjs +0 -1
- package/lib/tags-75InVOh4.cjs +0 -1
- package/lib/tags-DgRVzazL.js +0 -795
|
@@ -1,124 +1,125 @@
|
|
|
1
|
-
import { E as e
|
|
2
|
-
import { c as
|
|
3
|
-
import { c as
|
|
1
|
+
import { E as e } from "../ElementConstructor-1bvPqYNa.js";
|
|
2
|
+
import { a as r, b as o, c as i, d as l, f as d, g as m, h as p, i as c, j as n, k as u, l as b, m as h, n as f, o as g, p as y, q as k, r as x, s as v, t as q, u as E, v as j, aZ as w, w as C, x as S, y as T, z as V, A as z, B as A, C as B, D, E as F, F as G, e as H, G as I, H as J, aY as K, I as L, J as M, K as N, L as O, M as P, aX as Q, N as R, O as U, P as W, Q as X, R as Y, S as Z, T as _, U as $, V as aa, W as sa, X as ea, aU as ta, Y as ra, Z as oa, _ as ia, $ as la, a0 as da, a1 as ma, a2 as pa, a3 as ca, a4 as na, a5 as ua, a6 as ba, a7 as ha, a8 as fa, a9 as ga, aa as ya, ab as ka, ac as xa, ad as va, ae as qa, af as Ea, ag as ja, ah as wa, ai as Ca, aj as Sa, ak as Ta, al as Va, am as za, an as Aa, ao as Ba, ap as Da, aq as Fa, ar as Ga, as as Ha, at as Ia, au as Ja, av as Ka, aw as La, ax as Ma, ay as Na, az as Oa, aA as Pa, aB as Qa, aC as Ra, aD as Ua, aE as Wa, aF as Xa, aG as Ya, aH as Za, aI as _a, aJ as $a, aK as as, aL as ss, aM as es, aN as ts, aO as rs, aP as os, aQ as is, aR as ls, aS as ds, aT as ms, aV as ps, aW as cs } from "../tags-D0k7-iVY.js";
|
|
3
|
+
import { c as us } from "../createStylesheet-DpGvTRP3.js";
|
|
4
|
+
import { c as hs } from "../createTheme-WJyOPh-q.js";
|
|
4
5
|
export {
|
|
5
6
|
e as ElementConstructor,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
r as a,
|
|
8
|
+
o as abbr,
|
|
9
|
+
i as address,
|
|
10
|
+
l as area,
|
|
11
|
+
d as article,
|
|
12
|
+
m as aside,
|
|
13
|
+
p as audio,
|
|
14
|
+
c as b,
|
|
15
|
+
n as base,
|
|
16
|
+
u as bdi,
|
|
17
|
+
b as bdo,
|
|
18
|
+
h as blockquote,
|
|
19
|
+
f as body,
|
|
20
|
+
g as br,
|
|
21
|
+
y as button,
|
|
22
|
+
k as canvas,
|
|
23
|
+
x as caption,
|
|
23
24
|
v as cite,
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
q as code,
|
|
26
|
+
E as col,
|
|
26
27
|
j as colgroup,
|
|
27
28
|
w as contents,
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
us as createStylesheet,
|
|
30
|
+
hs as createTheme,
|
|
30
31
|
C as data,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
32
|
+
S as datalist,
|
|
33
|
+
T as dd,
|
|
34
|
+
V as del,
|
|
35
|
+
z as details,
|
|
36
|
+
A as dfn,
|
|
37
|
+
B as dialog,
|
|
38
|
+
D as div,
|
|
39
|
+
F as dl,
|
|
40
|
+
G as dt,
|
|
41
|
+
H as element,
|
|
42
|
+
I as em,
|
|
43
|
+
J as embed,
|
|
44
|
+
K as empty,
|
|
45
|
+
L as fieldset,
|
|
46
|
+
M as figcaption,
|
|
47
|
+
N as figure,
|
|
48
|
+
O as footer,
|
|
49
|
+
P as form,
|
|
50
|
+
Q as fragment,
|
|
51
|
+
R as h1,
|
|
52
|
+
U as h2,
|
|
53
|
+
W as h3,
|
|
54
|
+
X as h4,
|
|
55
|
+
Y as h5,
|
|
56
|
+
Z as h6,
|
|
57
|
+
_ as head,
|
|
58
|
+
$ as header,
|
|
59
|
+
aa as hgroup,
|
|
60
|
+
sa as hr,
|
|
61
|
+
ea as html,
|
|
62
|
+
ta as htmlVar,
|
|
63
|
+
ra as i,
|
|
64
|
+
oa as iframe,
|
|
65
|
+
ia as img,
|
|
66
|
+
la as input,
|
|
67
|
+
da as ins,
|
|
68
|
+
ma as kbd,
|
|
69
|
+
pa as label,
|
|
70
|
+
ca as legend,
|
|
71
|
+
na as li,
|
|
72
|
+
ua as link,
|
|
73
|
+
ba as main,
|
|
74
|
+
ha as map,
|
|
75
|
+
fa as mark,
|
|
76
|
+
ga as menu,
|
|
77
|
+
ya as meta,
|
|
78
|
+
ka as meter,
|
|
79
|
+
xa as nav,
|
|
79
80
|
va as noscript,
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
qa as object,
|
|
82
|
+
Ea as ol,
|
|
82
83
|
ja as optgroup,
|
|
83
84
|
wa as option,
|
|
84
85
|
Ca as output,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
86
|
+
Sa as p,
|
|
87
|
+
Ta as picture,
|
|
88
|
+
Va as pre,
|
|
89
|
+
za as progress,
|
|
90
|
+
Aa as q,
|
|
91
|
+
Ba as rp,
|
|
92
|
+
Da as rt,
|
|
93
|
+
Fa as ruby,
|
|
94
|
+
Ga as s,
|
|
95
|
+
Ha as samp,
|
|
96
|
+
Ia as script,
|
|
97
|
+
Ja as search,
|
|
98
|
+
Ka as section,
|
|
99
|
+
La as select,
|
|
100
|
+
Ma as slot,
|
|
101
|
+
Na as small,
|
|
102
|
+
Oa as source,
|
|
103
|
+
Pa as span,
|
|
104
|
+
Qa as strong,
|
|
105
|
+
Ra as style,
|
|
106
|
+
Ua as sub,
|
|
107
|
+
Wa as summary,
|
|
108
|
+
Xa as sup,
|
|
109
|
+
Ya as table,
|
|
110
|
+
Za as tbody,
|
|
111
|
+
_a as td,
|
|
112
|
+
$a as template,
|
|
113
|
+
as as textarea,
|
|
114
|
+
ss as tfoot,
|
|
115
|
+
es as th,
|
|
116
|
+
ts as thead,
|
|
117
|
+
rs as time,
|
|
118
|
+
os as title,
|
|
119
|
+
is as tr,
|
|
120
|
+
ls as track,
|
|
121
|
+
ds as u,
|
|
122
|
+
ms as ul,
|
|
123
|
+
ps as video,
|
|
124
|
+
cs as wbr
|
|
124
125
|
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
var S = Object.defineProperty, F = Object.defineProperties;
|
|
2
|
+
var D = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var k = Object.getOwnPropertySymbols;
|
|
4
|
+
var M = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var g = (n, e, t) => e in n ? S(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, i = (n, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
M.call(e, t) && g(n, t, e[t]);
|
|
8
|
+
if (k)
|
|
9
|
+
for (var t of k(e))
|
|
10
|
+
R.call(e, t) && g(n, t, e[t]);
|
|
11
|
+
return n;
|
|
12
|
+
}, C = (n, e) => F(n, D(e));
|
|
13
|
+
var y = (n, e, t) => {
|
|
14
|
+
if (!e.has(n))
|
|
15
|
+
throw TypeError("Cannot " + t);
|
|
16
|
+
};
|
|
17
|
+
var c = (n, e, t) => (y(n, e, "read from private field"), t ? t.call(n) : e.get(n)), a = (n, e, t) => {
|
|
18
|
+
if (e.has(n))
|
|
19
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
+
e instanceof WeakSet ? e.add(n) : e.set(n, t);
|
|
21
|
+
};
|
|
22
|
+
var p = (n, e, t) => (y(n, e, "access private method"), t);
|
|
23
|
+
import { c as T, i as H } from "./string-DCGBU6em.js";
|
|
24
|
+
import { E as w } from "./ElementConstructor-1bvPqYNa.js";
|
|
25
|
+
let A = null;
|
|
26
|
+
const x = {
|
|
27
|
+
value: null
|
|
28
|
+
};
|
|
29
|
+
var u, l, f, d, b;
|
|
30
|
+
class K extends HTMLElement {
|
|
31
|
+
constructor(t) {
|
|
32
|
+
super();
|
|
33
|
+
a(this, d);
|
|
34
|
+
a(this, u, /* @__PURE__ */ new Set());
|
|
35
|
+
a(this, l, /* @__PURE__ */ new Set());
|
|
36
|
+
a(this, f, /* @__PURE__ */ new Map());
|
|
37
|
+
A = this;
|
|
38
|
+
const o = t.tag(C(i({}, t.attributes), {
|
|
39
|
+
children: t.children
|
|
40
|
+
}));
|
|
41
|
+
new w(this, i({
|
|
42
|
+
children: o
|
|
43
|
+
}, x.value)), A = null, x.value = null;
|
|
44
|
+
}
|
|
45
|
+
addConnectCallback(t) {
|
|
46
|
+
c(this, u).add(t);
|
|
47
|
+
}
|
|
48
|
+
addDisconnectCallback(t) {
|
|
49
|
+
c(this, l).add(t);
|
|
50
|
+
}
|
|
51
|
+
createContext(t, o) {
|
|
52
|
+
c(this, f).set(t, o);
|
|
53
|
+
}
|
|
54
|
+
getContext(t) {
|
|
55
|
+
return c(this, f).get(t);
|
|
56
|
+
}
|
|
57
|
+
findContext(t) {
|
|
58
|
+
return p(this, d, b).call(this, t);
|
|
59
|
+
}
|
|
60
|
+
connectedCallback() {
|
|
61
|
+
c(this, u).forEach((t) => {
|
|
62
|
+
const o = t(this);
|
|
63
|
+
o && c(this, l).add(o);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
c(this, l).forEach((t) => {
|
|
68
|
+
t(this);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
u = new WeakMap(), l = new WeakMap(), f = new WeakMap(), d = new WeakSet(), b = function(t, o = this) {
|
|
73
|
+
if (!o)
|
|
74
|
+
return null;
|
|
75
|
+
if (o && "findContext" in o) {
|
|
76
|
+
const r = o.getContext(t);
|
|
77
|
+
if (r)
|
|
78
|
+
return r;
|
|
79
|
+
}
|
|
80
|
+
let s = null;
|
|
81
|
+
if (o.parentElement)
|
|
82
|
+
s = o.parentElement;
|
|
83
|
+
else {
|
|
84
|
+
const r = o.getRootNode();
|
|
85
|
+
r instanceof ShadowRoot && (s = r.host);
|
|
86
|
+
}
|
|
87
|
+
return s ? p(this, d, b).call(this, t, s) : null;
|
|
88
|
+
};
|
|
89
|
+
function v(n) {
|
|
90
|
+
const e = Array.isArray(n) ? n : [n];
|
|
91
|
+
let t = [];
|
|
92
|
+
return e.forEach((o) => {
|
|
93
|
+
if (typeof o == "function") {
|
|
94
|
+
const s = new o(C(i({}, o.attributes), {
|
|
95
|
+
children: o.children
|
|
96
|
+
}));
|
|
97
|
+
t = [...t, ...v(s)];
|
|
98
|
+
} else
|
|
99
|
+
t.push(o);
|
|
100
|
+
}), t;
|
|
101
|
+
}
|
|
102
|
+
function L(n, e, ...t) {
|
|
103
|
+
var r;
|
|
104
|
+
if (typeof n == "function") {
|
|
105
|
+
if (n === E)
|
|
106
|
+
return E(t);
|
|
107
|
+
const h = `e-${T(n.name)}`;
|
|
108
|
+
let m = customElements.get(h);
|
|
109
|
+
return m || (m = (r = class extends K {
|
|
110
|
+
constructor() {
|
|
111
|
+
super({
|
|
112
|
+
tag: n,
|
|
113
|
+
attributes: e,
|
|
114
|
+
children: t
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}, r.formAssociated = n.formAssociated, r), customElements.define(h, m)), m;
|
|
118
|
+
}
|
|
119
|
+
const o = t.map((h) => v(h)).flat();
|
|
120
|
+
let s = null;
|
|
121
|
+
return n === "component" ? (s = E(o), x.value = e) : s = new w(n, C(i({}, e), {
|
|
122
|
+
children: o
|
|
123
|
+
})), s.node;
|
|
124
|
+
}
|
|
125
|
+
function E(n) {
|
|
126
|
+
return new w(document.createDocumentFragment(), {
|
|
127
|
+
children: n
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function j(n, e = null, ...t) {
|
|
131
|
+
let o = null;
|
|
132
|
+
if (H(n))
|
|
133
|
+
o = new n();
|
|
134
|
+
else {
|
|
135
|
+
const s = L(n, e, ...t);
|
|
136
|
+
o = new s();
|
|
137
|
+
}
|
|
138
|
+
return o;
|
|
139
|
+
}
|
|
140
|
+
export {
|
|
141
|
+
E as F,
|
|
142
|
+
A as c,
|
|
143
|
+
j as g,
|
|
144
|
+
L as h
|
|
145
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var F=Object.defineProperty,q=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var k=(t,e,n)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i=(t,e)=>{for(var n in e||(e={}))M.call(e,n)&&k(t,n,e[n]);if(g)for(var n of g(e))R.call(e,n)&&k(t,n,e[n]);return t},h=(t,e)=>q(t,D(e));var y=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var c=(t,e,n)=>(y(t,e,"read from private field"),n?n.call(t):e.get(t)),u=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};var p=(t,e,n)=>(y(t,e,"access private method"),n);const A=require("./string-Cgp_uJvP.cjs"),x=require("./ElementConstructor-CdUaQS-S.cjs");exports.currentComponentElement=null;const b={value:null};var a,l,d,f,w;class T extends HTMLElement{constructor(n){super();u(this,f);u(this,a,new Set);u(this,l,new Set);u(this,d,new Map);exports.currentComponentElement=this;const o=n.tag(h(i({},n.attributes),{children:n.children}));new x.ElementConstructor(this,i({children:o},b.value)),exports.currentComponentElement=null,b.value=null}addConnectCallback(n){c(this,a).add(n)}addDisconnectCallback(n){c(this,l).add(n)}createContext(n,o){c(this,d).set(n,o)}getContext(n){return c(this,d).get(n)}findContext(n){return p(this,f,w).call(this,n)}connectedCallback(){c(this,a).forEach(n=>{const o=n(this);o&&c(this,l).add(o)})}disconnectedCallback(){c(this,l).forEach(n=>{n(this)})}}a=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakSet,w=function(n,o=this){if(!o)return null;if(o&&"findContext"in o){const s=o.getContext(n);if(s)return s}let r=null;if(o.parentElement)r=o.parentElement;else{const s=o.getRootNode();s instanceof ShadowRoot&&(r=s.host)}return r?p(this,f,w).call(this,n,r):null};function v(t){const e=Array.isArray(t)?t:[t];let n=[];return e.forEach(o=>{if(typeof o=="function"){const r=new o(h(i({},o.attributes),{children:o.children}));n=[...n,...v(r)]}else n.push(o)}),n}function S(t,e,...n){var s;if(typeof t=="function"){if(t===E)return E(n);const m=`e-${A.camelToKebab(t.name)}`;let C=customElements.get(m);return C||(C=(s=class extends T{constructor(){super({tag:t,attributes:e,children:n})}},s.formAssociated=t.formAssociated,s),customElements.define(m,C)),C}const o=n.map(m=>v(m)).flat();let r=null;return t==="component"?(r=E(o),b.value=e):r=new x.ElementConstructor(t,h(i({},e),{children:o})),r.node}function E(t){return new x.ElementConstructor(document.createDocumentFragment(),{children:t})}function H(t,e=null,...n){let o=null;if(A.isESClass(t))o=new t;else{const r=S(t,e,...n);o=new r}return o}exports.Fragment=E;exports.getComponentElement=H;exports.h=S;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var I=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var z=(t,e,s)=>(I(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},H=(t,e,s,i)=>(I(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s);const E=require("./custom-element/index.cjs");require("./Store-D0_rDIsE.cjs");const M=require("./browser-CpzFX2xg.cjs"),N=require("./events-Crwi8fz6.cjs"),Y=require("./style-At6aDoqG.cjs"),a=require("./tags-
|
|
1
|
+
"use strict";var I=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var z=(t,e,s)=>(I(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},H=(t,e,s,i)=>(I(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s);const E=require("./custom-element/index.cjs");require("./Store-D0_rDIsE.cjs");const M=require("./browser-CpzFX2xg.cjs"),N=require("./events-Crwi8fz6.cjs"),Y=require("./style-At6aDoqG.cjs"),a=require("./tags-DGIuh1Hi.cjs"),P=require("./createStylesheet-B5Nhxdpo.cjs"),w=require("./theme/index.cjs");var Z=Object.defineProperty,J=Object.getOwnPropertyDescriptor,Q=(t,e,s,i)=>{for(var n=i>1?void 0:i?J(e,s):e,l=t.length-1,h;l>=0;l--)(h=t[l])&&(n=(i?h(e,s,n):h(n))||n);return i&&n&&Z(e,s,n),n},q=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(q(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},d=(t,e,s,i)=>(q(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),B=(t,e,s)=>(q(t,e,"access private method"),s),y,S,o,v,u,f,L,C,W;const V=P.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:`var(--duration, ${w.aptechkaTheme.durationShort.var})`,transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});exports.SelectElement=class extends E.CustomElement{constructor(){super(),c(this,C),c(this,y,null),c(this,S,""),c(this,o,null),c(this,v,!1),c(this,u,void 0),c(this,f,null),c(this,L,()=>{N.dispatchSizeChangeEvent(this)}),M.isBrowser&&(this.openShadow(V),d(this,y,this.attachInternals()),d(this,f,new ResizeObserver(r(this,L))),a.element(this,{children:[a.button({class:"head",children:a.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),a.div({class:"body",style:{height:"0px"},children:a.div({class:"body-inner",children:a.slot()}),ref:e=>{d(this,o,e)}})]}))}get value(){return r(this,S)}set value(e){d(this,S,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}get internals(){return r(this,y)}get opened(){return r(this,v)}open(){clearTimeout(r(this,u)),d(this,v,!0),r(this,o).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),r(this,o).style.height=r(this,o).scrollHeight+"px",B(this,C,W).call(this)},0)}close(){d(this,v,!1),r(this,o).style.height="0px",this.classList.remove("opened"),B(this,C,W).call(this),d(this,u,setTimeout(()=>{this.classList.remove("triggered"),r(this,o).style.display="none"},Y.getElementTransitionDurationMS(r(this,o))))}connectedCallback(){r(this,f).observe(r(this,o))}disconnectedCallback(){clearTimeout(r(this,u)),r(this,f).disconnect()}};y=new WeakMap;S=new WeakMap;o=new WeakMap;v=new WeakMap;u=new WeakMap;f=new WeakMap;L=new WeakMap;C=new WeakSet;W=function(){this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:r(this,v)}}))};exports.SelectElement.formAssociated=!0;exports.SelectElement=Q([E.define("e-select")],exports.SelectElement);var _;class D extends E.CustomElement{constructor(){super(...arguments);A(this,_,null)}get selectElement(){return z(this,_)}connectedCallback(){var i,n;const s=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;s?H(this,_,s):console.log(this,"e-select not found")}}_=new WeakMap;var X=Object.defineProperty,j=Object.getOwnPropertyDescriptor,ee=(t,e,s,i)=>{for(var n=i>1?void 0:i?j(e,s):e,l=t.length-1,h;l>=0;l--)(h=t[l])&&(n=(i?h(e,s,n):h(n))||n);return i&&n&&X(e,s,n),n},U=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},O=(t,e,s)=>(U(t,e,"read from private field"),s?s.call(t):e.get(t)),G=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},R=(t,e,s)=>(U(t,e,"access private method"),s),m,T,b;const te=P.createStylesheet({":host":{width:"100%",height:w.aptechkaTheme.heightInput.var,display:"inline-flex",alignItems:"center"}});exports.SelectOptionElement=class extends D{constructor(){super(),G(this,T),G(this,m,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""}),M.isBrowser&&(this.openShadow(te),a.element(this,{tabIndex:"0",onClick:()=>{R(this,T,b).call(this)},onKeydown:e=>{e.code==="Space"&&R(this,T,b).call(this)},children:[a.slot()]}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",O(this,m)),setTimeout(()=>{O(this,m).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",O(this,m))}};m=new WeakMap;T=new WeakSet;b=function(){this.selectElement.value=this.value,this.selectElement.close()};exports.SelectOptionElement=ee([E.define("e-select-option")],exports.SelectOptionElement);const F=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -12,8 +12,8 @@ import "./Store-JOKrNVEr.js";
|
|
|
12
12
|
import { i as D } from "./browser-0zX67oeU.js";
|
|
13
13
|
import { d as V } from "./events-_C2CztxR.js";
|
|
14
14
|
import { g as X } from "./style-j2TwriJ_.js";
|
|
15
|
-
import { e as x, p as j,
|
|
16
|
-
import { c as z } from "./createStylesheet-
|
|
15
|
+
import { e as x, p as j, ax as _, D as q } from "./tags-D0k7-iVY.js";
|
|
16
|
+
import { c as z } from "./createStylesheet-DpGvTRP3.js";
|
|
17
17
|
import { aptechkaTheme as m } from "./theme/index.js";
|
|
18
18
|
var ee = Object.defineProperty, te = Object.getOwnPropertyDescriptor, se = (e, t, s, i) => {
|
|
19
19
|
for (var a = i > 1 ? void 0 : i ? te(t, s) : t, r = e.length - 1, l; r >= 0; r--)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ComponentElementParameters {
|
|
2
|
+
tag: Function;
|
|
3
|
+
attributes: null | {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
children: any[];
|
|
7
|
+
}
|
|
8
|
+
export type ComponentCreateCallback<T = void> = (e: ComponentElement) => T;
|
|
9
|
+
export type ComponentConnectCallback = (e: ComponentElement) => void | (() => void);
|
|
10
|
+
export type ComponentDisconnectCallback = (e: ComponentElement) => void;
|
|
11
|
+
export declare let currentComponentElement: ComponentElement;
|
|
12
|
+
export declare const nextComponentAttributes: {
|
|
13
|
+
value: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
} | null;
|
|
16
|
+
};
|
|
17
|
+
export declare class ComponentElement extends HTMLElement {
|
|
18
|
+
#private;
|
|
19
|
+
constructor(parameters: ComponentElementParameters);
|
|
20
|
+
addConnectCallback(callback: ComponentConnectCallback): void;
|
|
21
|
+
addDisconnectCallback(callback: ComponentConnectCallback): void;
|
|
22
|
+
createContext(name: string, value: any): void;
|
|
23
|
+
getContext(name: string): any;
|
|
24
|
+
findContext(name: string): any;
|
|
25
|
+
protected connectedCallback(): void;
|
|
26
|
+
protected disconnectedCallback(): void;
|
|
27
|
+
}
|
package/lib/jsx/h.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ElementConstructor } from '../element-constructor';
|
|
2
|
+
export declare function h(tag: string | JSX.Component, attributes: null | JSX.AllAttributes, ...children: JSX.ComponentChildren): any;
|
|
3
|
+
export declare function Fragment(children: any): ElementConstructor<DocumentFragment, Node>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useInternals(): ElementInternals;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useShadow(init?: ShadowRootInit): ShadowRoot;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StoreManagerType, StoreEntry, Store, Derived, DerivedArray, Composed, Resource } from '../../store';
|
|
2
|
+
export declare function useStore<StoreType = unknown, StoreManager extends StoreManagerType = StoreManagerType, Entry extends StoreEntry<StoreType> = StoreEntry<StoreType>>(...parameters: ConstructorParameters<typeof Store<StoreType, StoreManager, Entry>>): Store<StoreType, StoreManager, StoreEntry<StoreType>>;
|
|
3
|
+
export declare function useDerived<DerivedType, StoreType>(...parameters: ConstructorParameters<typeof Derived<DerivedType, StoreType>>): Derived<DerivedType, StoreType>;
|
|
4
|
+
export declare function useDerivedArray<DerivedType, StoreType extends Array<any> = Array<any>>(...parameters: ConstructorParameters<typeof DerivedArray<DerivedType, StoreType>>): DerivedArray<DerivedType, StoreType>;
|
|
5
|
+
export declare function useComposed<ComposedType>(...parameters: ConstructorParameters<typeof Composed<ComposedType>>): Composed<ComposedType>;
|
|
6
|
+
export declare function useResource<StoreType>(...parameters: ConstructorParameters<typeof Resource<StoreType>>): Resource<StoreType>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var y=Object.defineProperty;var d=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var i=(t,e,n)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,f=(t,e)=>{for(var n in e||(e={}))p.call(e,n)&&i(t,n,e[n]);if(d)for(var n of d(e))w.call(e,n)&&i(t,n,e[n]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../getComponentElement-BcreYwFe.cjs"),m=require("../Store-D0_rDIsE.cjs"),g=require("../tags-DGIuh1Hi.cjs"),h=require("../createStylesheet-B5Nhxdpo.cjs");function x(t,e=document.body){e.appendChild(r.getComponentElement(t))}function s(t){return t(r.currentComponentElement)}function a(t){s(e=>{e.addConnectCallback(t)})}function R(t){const e=new m.Store(null);return a(n=>{const o=n.findContext(t);return o?e.current=o:console.warn(n,`Context "${t}" not found`),()=>{e.close()}}),e}function T(t,e){s(n=>{n.createContext(t,e)})}function C(t){s(e=>{e.addDisconnectCallback(t)})}function E(){return s(t=>t.attachInternals())}function q(t){return s(e=>e.attachShadow(f({mode:"open"},t)))}function b(...t){const e=new m.Store(...t);return C(e.close),e}function A(t){s(e=>{e.shadowRoot&&e.shadowRoot.adoptedStyleSheets.push(h.createStylesheet(t))}),a(e=>{if(e.shadowRoot)return;const n=e.getRootNode();if(n===document){const o=g.style(t).node;if(![...document.head.querySelectorAll("style")].find(c=>c.outerHTML===o.outerHTML))return document.head.appendChild(o),()=>{o.remove()}}else if(n instanceof ShadowRoot){const o=h.createStylesheet(t);n.adoptedStyleSheets.filter(u=>{const c=Array.from(u.cssRules);Array.from(o.cssRules).filter(l=>!c.find(S=>S.cssText===l.cssText)).forEach(l=>{u.insertRule(l.cssText)})})}})}exports.Fragment=r.Fragment;exports.getComponentElement=r.getComponentElement;exports.h=r.h;exports.createContext=T;exports.render=x;exports.useConnect=a;exports.useContext=R;exports.useCreate=s;exports.useDisconnect=C;exports.useInternals=E;exports.useShadow=q;exports.useStore=b;exports.useStylesheet=A;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './type';
|
|
2
|
+
export { h, Fragment } from './h';
|
|
3
|
+
export { render } from './render';
|
|
4
|
+
export { getComponentElement } from './getComponentElement';
|
|
5
|
+
export { useConnect } from './hooks/useConnect';
|
|
6
|
+
export { useContext, createContext } from './hooks/useContext';
|
|
7
|
+
export { useCreate } from './hooks/useCreate';
|
|
8
|
+
export { useDisconnect } from './hooks/useDisconnect';
|
|
9
|
+
export { useInternals } from './hooks/useInternals';
|
|
10
|
+
export { useShadow } from './hooks/useShadow';
|
|
11
|
+
export { useStore } from './hooks/useStore';
|
|
12
|
+
export { useStylesheet } from './hooks/useStylesheet';
|
package/lib/jsx/index.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var a = Object.getOwnPropertySymbols;
|
|
3
|
+
var C = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var l = (t, e, n) => e in t ? p(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, d = (t, e) => {
|
|
5
|
+
for (var n in e || (e = {}))
|
|
6
|
+
C.call(e, n) && l(t, n, e[n]);
|
|
7
|
+
if (a)
|
|
8
|
+
for (var n of a(e))
|
|
9
|
+
y.call(e, n) && l(t, n, e[n]);
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { g as S, c as w } from "../getComponentElement-B0Qb2RbZ.js";
|
|
13
|
+
import { F as $, h as z } from "../getComponentElement-B0Qb2RbZ.js";
|
|
14
|
+
import { S as i } from "../Store-JOKrNVEr.js";
|
|
15
|
+
import { aC as x } from "../tags-D0k7-iVY.js";
|
|
16
|
+
import { c as f } from "../createStylesheet-DpGvTRP3.js";
|
|
17
|
+
function F(t, e = document.body) {
|
|
18
|
+
e.appendChild(S(t));
|
|
19
|
+
}
|
|
20
|
+
function r(t) {
|
|
21
|
+
return t(w);
|
|
22
|
+
}
|
|
23
|
+
function m(t) {
|
|
24
|
+
r((e) => {
|
|
25
|
+
e.addConnectCallback(t);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function H(t) {
|
|
29
|
+
const e = new i(null);
|
|
30
|
+
return m((n) => {
|
|
31
|
+
const o = n.findContext(t);
|
|
32
|
+
return o ? e.current = o : console.warn(n, `Context "${t}" not found`), () => {
|
|
33
|
+
e.close();
|
|
34
|
+
};
|
|
35
|
+
}), e;
|
|
36
|
+
}
|
|
37
|
+
function I(t, e) {
|
|
38
|
+
r((n) => {
|
|
39
|
+
n.createContext(t, e);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function R(t) {
|
|
43
|
+
r((e) => {
|
|
44
|
+
e.addDisconnectCallback(t);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function L() {
|
|
48
|
+
return r((t) => t.attachInternals());
|
|
49
|
+
}
|
|
50
|
+
function M(t) {
|
|
51
|
+
return r((e) => e.attachShadow(d({ mode: "open" }, t)));
|
|
52
|
+
}
|
|
53
|
+
function N(...t) {
|
|
54
|
+
const e = new i(...t);
|
|
55
|
+
return R(e.close), e;
|
|
56
|
+
}
|
|
57
|
+
function b(t) {
|
|
58
|
+
r((e) => {
|
|
59
|
+
e.shadowRoot && e.shadowRoot.adoptedStyleSheets.push(f(t));
|
|
60
|
+
}), m((e) => {
|
|
61
|
+
if (e.shadowRoot)
|
|
62
|
+
return;
|
|
63
|
+
const n = e.getRootNode();
|
|
64
|
+
if (n === document) {
|
|
65
|
+
const o = x(t).node;
|
|
66
|
+
if (![...document.head.querySelectorAll("style")].find((c) => c.outerHTML === o.outerHTML))
|
|
67
|
+
return document.head.appendChild(o), () => {
|
|
68
|
+
o.remove();
|
|
69
|
+
};
|
|
70
|
+
} else if (n instanceof ShadowRoot) {
|
|
71
|
+
const o = f(t);
|
|
72
|
+
n.adoptedStyleSheets.filter((s) => {
|
|
73
|
+
const c = Array.from(s.cssRules);
|
|
74
|
+
Array.from(o.cssRules).filter(
|
|
75
|
+
(u) => !c.find(
|
|
76
|
+
(h) => h.cssText === u.cssText
|
|
77
|
+
)
|
|
78
|
+
).forEach((u) => {
|
|
79
|
+
s.insertRule(u.cssText);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
$ as Fragment,
|
|
87
|
+
I as createContext,
|
|
88
|
+
S as getComponentElement,
|
|
89
|
+
z as h,
|
|
90
|
+
F as render,
|
|
91
|
+
m as useConnect,
|
|
92
|
+
H as useContext,
|
|
93
|
+
r as useCreate,
|
|
94
|
+
R as useDisconnect,
|
|
95
|
+
L as useInternals,
|
|
96
|
+
M as useShadow,
|
|
97
|
+
N as useStore,
|
|
98
|
+
b as useStylesheet
|
|
99
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function render(Component: any, containerElement?: HTMLElement): void;
|