jaxs 0.4.4 → 0.5.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/dist/jaxs.d.ts +50 -16
- package/dist/jaxs.js +210 -172
- package/dist/jaxs.umd.cjs +222 -191
- package/package.json +1 -1
package/dist/jaxs.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const et = (e, t) => t.createElement(e),
|
|
2
|
+
st = (e, t) => {
|
|
3
3
|
for (const s in t) {
|
|
4
4
|
if (s === '__self') continue
|
|
5
5
|
const r = t[s].toString()
|
|
6
|
-
s === 'value'
|
|
6
|
+
if (s === 'value') {
|
|
7
|
+
const n = e
|
|
8
|
+
n.value !== r && (n.value = r)
|
|
9
|
+
} else e.setAttribute(s, r)
|
|
7
10
|
}
|
|
8
11
|
},
|
|
9
|
-
|
|
12
|
+
rt = (e, t, s) => {
|
|
10
13
|
const r = {}
|
|
11
14
|
for (const n in t) {
|
|
12
15
|
const o = t[n],
|
|
@@ -20,12 +23,12 @@ const tt = (e, t) => t.createElement(e),
|
|
|
20
23
|
}
|
|
21
24
|
e.eventMaps = r
|
|
22
25
|
},
|
|
23
|
-
|
|
24
|
-
const n =
|
|
25
|
-
return
|
|
26
|
+
nt = (e, t, s, r) => {
|
|
27
|
+
const n = et(e, r.document)
|
|
28
|
+
return st(n, t), rt(n, s, r.publish), n
|
|
26
29
|
},
|
|
27
30
|
E = 'http://www.w3.org/2000/svg',
|
|
28
|
-
|
|
31
|
+
ot = {
|
|
29
32
|
animate: !0,
|
|
30
33
|
animateMotion: !0,
|
|
31
34
|
animateTransform: !0,
|
|
@@ -89,8 +92,8 @@ const tt = (e, t) => t.createElement(e),
|
|
|
89
92
|
use: !0,
|
|
90
93
|
view: !0,
|
|
91
94
|
},
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
it = (e, t) => !!(ot[e] || (e === 'a' && t === E)),
|
|
96
|
+
ut = (e, t, s) => {
|
|
94
97
|
const r = s.createElementNS(E, e)
|
|
95
98
|
for (const n in t)
|
|
96
99
|
n === '__self' ||
|
|
@@ -98,24 +101,24 @@ const tt = (e, t) => t.createElement(e),
|
|
|
98
101
|
r.setAttributeNS(null, n, t[n].toString())
|
|
99
102
|
return r
|
|
100
103
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
class
|
|
104
|
+
at = (e) => e.namespaceURI === E,
|
|
105
|
+
ct = (e, t) => t.createTextNode(e)
|
|
106
|
+
class ht {
|
|
104
107
|
constructor(t) {
|
|
105
108
|
this.value = t.toString()
|
|
106
109
|
}
|
|
107
110
|
render(t) {
|
|
108
|
-
const s =
|
|
111
|
+
const s = ct(this.value, t.document)
|
|
109
112
|
return (s.__jsx = 'TextNode'), [s]
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
const lt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
116
|
+
dt = (e) => new ht(e),
|
|
117
|
+
pt = (e) => (lt(e) ? dt(e) : e),
|
|
118
|
+
mt = (e) => ft(e).map(pt).flat(),
|
|
119
|
+
ft = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
117
120
|
j = (e, t = {}) => e || t.children || [],
|
|
118
|
-
|
|
121
|
+
bt = (e, t = '') => {
|
|
119
122
|
const s = {},
|
|
120
123
|
r = {}
|
|
121
124
|
for (const n in e) {
|
|
@@ -125,7 +128,7 @@ const ht = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
125
128
|
r[a] = o ? o.toString() : ''
|
|
126
129
|
} else {
|
|
127
130
|
if (o === !1) continue
|
|
128
|
-
n === '__source' ? (s.__source = e.__source) : (s[n] =
|
|
131
|
+
n === '__source' ? (s.__source = e.__source) : (s[n] = vt(n, o, t))
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
134
|
return {
|
|
@@ -133,22 +136,22 @@ const ht = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
133
136
|
events: r,
|
|
134
137
|
}
|
|
135
138
|
},
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
vt = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
140
|
+
gt = (e, t) => {
|
|
138
141
|
const s = e || {},
|
|
139
142
|
r = j(t, s)
|
|
140
143
|
return (s.children = s.children || r), s
|
|
141
144
|
},
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
O = (e, t, s, r = []) => e.reduce(yt(t, s), r).flat(),
|
|
146
|
+
yt = (e, t) => (s, r) =>
|
|
144
147
|
r
|
|
145
148
|
? Array.isArray(r)
|
|
146
|
-
?
|
|
149
|
+
? O(r, e, t, s)
|
|
147
150
|
: (r.render(e, t).forEach((n) => s.push(n)), s)
|
|
148
151
|
: s
|
|
149
|
-
class
|
|
152
|
+
class k {
|
|
150
153
|
constructor(t) {
|
|
151
|
-
this.collection =
|
|
154
|
+
this.collection = mt(t)
|
|
152
155
|
}
|
|
153
156
|
render(t, s) {
|
|
154
157
|
this.parentElement = s
|
|
@@ -156,7 +159,7 @@ class O {
|
|
|
156
159
|
return this.attachToParent(r), r
|
|
157
160
|
}
|
|
158
161
|
generateDom(t) {
|
|
159
|
-
return
|
|
162
|
+
return O(this.collection, t, this.parentElement)
|
|
160
163
|
}
|
|
161
164
|
attachToParent(t) {
|
|
162
165
|
if (this.parentElement === void 0) return
|
|
@@ -164,7 +167,7 @@ class O {
|
|
|
164
167
|
t.forEach((r) => s.appendChild(r))
|
|
165
168
|
}
|
|
166
169
|
}
|
|
167
|
-
class
|
|
170
|
+
class Et {
|
|
168
171
|
constructor(t, s) {
|
|
169
172
|
;(this.type = t), (this.attributes = s)
|
|
170
173
|
}
|
|
@@ -190,14 +193,14 @@ class yt {
|
|
|
190
193
|
return `${this.type}${t}${s}${r}`
|
|
191
194
|
}
|
|
192
195
|
}
|
|
193
|
-
class
|
|
196
|
+
class xt {
|
|
194
197
|
constructor(t, s, r = []) {
|
|
195
198
|
this.type = t
|
|
196
|
-
const { events: n, attributes: o } =
|
|
199
|
+
const { events: n, attributes: o } = bt(s)
|
|
197
200
|
;(this.events = n),
|
|
198
201
|
(this.attributes = o),
|
|
199
|
-
(this.isSvg =
|
|
200
|
-
(this.children = new
|
|
202
|
+
(this.isSvg = it(this.type, this.attributes.xmlns)),
|
|
203
|
+
(this.children = new k(r))
|
|
201
204
|
}
|
|
202
205
|
render(t) {
|
|
203
206
|
const s = this.generateDom(t)
|
|
@@ -207,24 +210,24 @@ class Et {
|
|
|
207
210
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
208
211
|
}
|
|
209
212
|
generateHtmlDom(t) {
|
|
210
|
-
const s =
|
|
213
|
+
const s = nt(this.type, this.attributes, this.events, t)
|
|
211
214
|
return (s.__jsx = this.jsxKey()), s
|
|
212
215
|
}
|
|
213
216
|
generateSvgDom(t) {
|
|
214
|
-
const s =
|
|
217
|
+
const s = ut(this.type, this.attributes, t.document)
|
|
215
218
|
return (s.__jsx = this.jsxKey()), s
|
|
216
219
|
}
|
|
217
220
|
jsxKey() {
|
|
218
|
-
return new
|
|
221
|
+
return new Et(this.type, this.attributes).generate()
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
|
-
const
|
|
222
|
-
typeof e == 'string' ? new
|
|
223
|
-
|
|
224
|
+
const wt = (e, t, ...s) =>
|
|
225
|
+
typeof e == 'string' ? new xt(e, t, s) : e(gt(t, s))
|
|
226
|
+
wt.fragment = (e, t) => {
|
|
224
227
|
const s = j(t, e)
|
|
225
|
-
return new
|
|
228
|
+
return new k(s)
|
|
226
229
|
}
|
|
227
|
-
class
|
|
230
|
+
class At {
|
|
228
231
|
constructor(t, s, r) {
|
|
229
232
|
;(this.template = t),
|
|
230
233
|
(this.selector = s),
|
|
@@ -249,46 +252,46 @@ class wt {
|
|
|
249
252
|
return this.renderKit.document.querySelector(this.selector)
|
|
250
253
|
}
|
|
251
254
|
}
|
|
252
|
-
const
|
|
253
|
-
const r = new
|
|
255
|
+
const _t = (e, t, s) => {
|
|
256
|
+
const r = new At(e, t, s)
|
|
254
257
|
return r.renderAndAttach(s), r
|
|
255
258
|
},
|
|
256
259
|
M = 'go-to-href',
|
|
257
260
|
m = 'navigation:location-change',
|
|
258
|
-
|
|
261
|
+
T = 'navigation:route-change',
|
|
259
262
|
St = /* @__PURE__ */ Object.freeze(
|
|
260
263
|
/* @__PURE__ */ Object.defineProperty(
|
|
261
264
|
{
|
|
262
265
|
__proto__: null,
|
|
263
266
|
linkNavigationEvent: M,
|
|
264
267
|
locationChangeEvent: m,
|
|
265
|
-
routeChangeEvent:
|
|
268
|
+
routeChangeEvent: T,
|
|
266
269
|
},
|
|
267
270
|
Symbol.toStringTag,
|
|
268
271
|
{ value: 'Module' },
|
|
269
272
|
),
|
|
270
273
|
),
|
|
271
|
-
|
|
274
|
+
$ = (e) => {
|
|
272
275
|
e.createRecord('route', {
|
|
273
276
|
host: '',
|
|
274
277
|
path: '',
|
|
275
278
|
query: {},
|
|
276
279
|
})
|
|
277
280
|
},
|
|
278
|
-
|
|
281
|
+
F = (e) => {
|
|
279
282
|
const t = e.closest('[href]')
|
|
280
283
|
return (t && t.getAttribute('href')) || ''
|
|
281
284
|
},
|
|
282
285
|
D = (e, { publish: t, window: s }) => {
|
|
283
286
|
s.history.pushState(null, '', e), t(m, null)
|
|
284
287
|
},
|
|
285
|
-
|
|
288
|
+
P = (e, t) => {
|
|
286
289
|
if (!e || !e.target) return
|
|
287
290
|
e.preventDefault()
|
|
288
|
-
const s =
|
|
291
|
+
const s = F(e.target)
|
|
289
292
|
D(s, t)
|
|
290
293
|
},
|
|
291
|
-
|
|
294
|
+
L = (e) =>
|
|
292
295
|
e
|
|
293
296
|
.replace(/^\?/, '')
|
|
294
297
|
.split('&')
|
|
@@ -297,40 +300,40 @@ const At = (e, t, s) => {
|
|
|
297
300
|
const r = s.split('=')
|
|
298
301
|
return (t[r[0]] = r[1]), t
|
|
299
302
|
}, {}),
|
|
300
|
-
|
|
303
|
+
z = (e, t) => {
|
|
301
304
|
const { state: s, publish: r, window: n } = t,
|
|
302
305
|
{ host: o, pathname: a, search: h } = n.location,
|
|
303
306
|
u = a,
|
|
304
|
-
d =
|
|
307
|
+
d = L(h),
|
|
305
308
|
c = {
|
|
306
309
|
host: o,
|
|
307
310
|
path: u,
|
|
308
311
|
query: d,
|
|
309
312
|
}
|
|
310
|
-
s.store('route').update(c), r(
|
|
313
|
+
s.store('route').update(c), r(T, c)
|
|
311
314
|
},
|
|
312
|
-
|
|
315
|
+
B = (e) => {
|
|
313
316
|
const { subscribe: t } = e
|
|
314
|
-
t(M,
|
|
317
|
+
t(M, P)
|
|
315
318
|
},
|
|
316
|
-
|
|
319
|
+
U = (e) => {
|
|
317
320
|
const { publish: t, subscribe: s, state: r, window: n } = e
|
|
318
|
-
|
|
321
|
+
$(r), n.addEventListener('popstate', () => t(m, null)), s(m, z)
|
|
319
322
|
},
|
|
320
323
|
V = (e) => {
|
|
321
324
|
setTimeout(() => e.publish(m, null), 0)
|
|
322
325
|
},
|
|
323
326
|
K = (e) => {
|
|
324
|
-
|
|
327
|
+
U(e), B(e), V(e)
|
|
325
328
|
},
|
|
326
|
-
|
|
329
|
+
Nt = /* @__PURE__ */ Object.freeze(
|
|
327
330
|
/* @__PURE__ */ Object.defineProperty(
|
|
328
331
|
{
|
|
329
332
|
__proto__: null,
|
|
330
333
|
publishLocation: V,
|
|
331
334
|
startNavigation: K,
|
|
332
|
-
subscribeToHistoryChange:
|
|
333
|
-
subscribeToNavigation:
|
|
335
|
+
subscribeToHistoryChange: U,
|
|
336
|
+
subscribeToNavigation: B,
|
|
334
337
|
},
|
|
335
338
|
Symbol.toStringTag,
|
|
336
339
|
{ value: 'Module' },
|
|
@@ -356,14 +359,14 @@ class R {
|
|
|
356
359
|
(this.roots = [])
|
|
357
360
|
}
|
|
358
361
|
render(t, s) {
|
|
359
|
-
const r =
|
|
362
|
+
const r = _t(t, s, this.renderKit)
|
|
360
363
|
return this.roots.push(r), r
|
|
361
364
|
}
|
|
362
365
|
startNavigation() {
|
|
363
366
|
K(this)
|
|
364
367
|
}
|
|
365
368
|
}
|
|
366
|
-
const
|
|
369
|
+
const _e = /* @__PURE__ */ Object.freeze(
|
|
367
370
|
/* @__PURE__ */ Object.defineProperty(
|
|
368
371
|
{
|
|
369
372
|
__proto__: null,
|
|
@@ -464,7 +467,7 @@ const H = () => {
|
|
|
464
467
|
subscribe: (r, n) => e.subscribe(r, n),
|
|
465
468
|
}
|
|
466
469
|
},
|
|
467
|
-
|
|
470
|
+
Se = /* @__PURE__ */ Object.freeze(
|
|
468
471
|
/* @__PURE__ */ Object.defineProperty(
|
|
469
472
|
{
|
|
470
473
|
__proto__: null,
|
|
@@ -479,24 +482,24 @@ const H = () => {
|
|
|
479
482
|
),
|
|
480
483
|
f = (e) => Array.isArray(e),
|
|
481
484
|
g = (e) => e !== null && !f(e) && typeof e == 'object',
|
|
482
|
-
|
|
483
|
-
|
|
485
|
+
jt = (e, t) => e === t,
|
|
486
|
+
Ot = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
484
487
|
kt = (e, t) =>
|
|
485
|
-
!(g(e) && g(t)) || !
|
|
488
|
+
!(g(e) && g(t)) || !Ot(e, t)
|
|
486
489
|
? !1
|
|
487
490
|
: Object.keys(e).every((s) => {
|
|
488
491
|
const r = e[s],
|
|
489
492
|
n = t[s]
|
|
490
493
|
return x(r, n)
|
|
491
494
|
}),
|
|
492
|
-
|
|
495
|
+
Mt = (e, t) =>
|
|
493
496
|
!(f(e) && f(t)) || e.length !== t.length
|
|
494
497
|
? !1
|
|
495
498
|
: e.every((s, r) => {
|
|
496
499
|
const n = t[r]
|
|
497
500
|
return x(s, n)
|
|
498
501
|
}),
|
|
499
|
-
x = (e, t) => (g(e) ? kt(e, t) : f(e) ?
|
|
502
|
+
x = (e, t) => (g(e) ? kt(e, t) : f(e) ? Mt(e, t) : jt(e, t))
|
|
500
503
|
class b {
|
|
501
504
|
constructor(t) {
|
|
502
505
|
this.store = t
|
|
@@ -699,7 +702,7 @@ class Q {
|
|
|
699
702
|
}
|
|
700
703
|
}
|
|
701
704
|
const W = (e) => new Q(e),
|
|
702
|
-
|
|
705
|
+
Ne = /* @__PURE__ */ Object.freeze(
|
|
703
706
|
/* @__PURE__ */ Object.defineProperty(
|
|
704
707
|
{
|
|
705
708
|
__proto__: null,
|
|
@@ -715,7 +718,7 @@ const W = (e) => new Q(e),
|
|
|
715
718
|
{ value: 'Module' },
|
|
716
719
|
),
|
|
717
720
|
)
|
|
718
|
-
class
|
|
721
|
+
class Tt {
|
|
719
722
|
constructor(t) {
|
|
720
723
|
this.setupDomEnvironment(t)
|
|
721
724
|
}
|
|
@@ -767,8 +770,8 @@ class Mt {
|
|
|
767
770
|
}
|
|
768
771
|
}
|
|
769
772
|
}
|
|
770
|
-
const
|
|
771
|
-
const s = new
|
|
773
|
+
const je = (e = {}) => {
|
|
774
|
+
const s = new Tt(e).setup()
|
|
772
775
|
return s.startNavigation(), s
|
|
773
776
|
}
|
|
774
777
|
var i = /* @__PURE__ */ ((e) => (
|
|
@@ -785,7 +788,7 @@ var i = /* @__PURE__ */ ((e) => (
|
|
|
785
788
|
(e[(e.changeText = 10)] = 'changeText'),
|
|
786
789
|
e
|
|
787
790
|
))(i || {})
|
|
788
|
-
const
|
|
791
|
+
const Oe = /* @__PURE__ */ Object.freeze(
|
|
789
792
|
/* @__PURE__ */ Object.defineProperty(
|
|
790
793
|
{
|
|
791
794
|
__proto__: null,
|
|
@@ -807,13 +810,13 @@ const Ae = /* @__PURE__ */ Object.freeze(
|
|
|
807
810
|
type: i.replaceNode,
|
|
808
811
|
data: {},
|
|
809
812
|
}),
|
|
810
|
-
|
|
813
|
+
Dt = (e, t, s) => ({
|
|
811
814
|
source: e,
|
|
812
815
|
target: t,
|
|
813
816
|
data: s,
|
|
814
817
|
type: i.removeAttribute,
|
|
815
818
|
}),
|
|
816
|
-
|
|
819
|
+
Pt = (e, t, s) => ({
|
|
817
820
|
source: e,
|
|
818
821
|
target: t,
|
|
819
822
|
data: s,
|
|
@@ -825,13 +828,13 @@ const Ae = /* @__PURE__ */ Object.freeze(
|
|
|
825
828
|
data: s,
|
|
826
829
|
type: i.updateAttribute,
|
|
827
830
|
}),
|
|
828
|
-
|
|
831
|
+
zt = (e, t, s) => ({
|
|
829
832
|
source: e,
|
|
830
833
|
target: t,
|
|
831
834
|
data: s,
|
|
832
835
|
type: i.removeEvent,
|
|
833
836
|
}),
|
|
834
|
-
|
|
837
|
+
Bt = (e, t, s) => ({
|
|
835
838
|
source: e,
|
|
836
839
|
target: t,
|
|
837
840
|
data: s,
|
|
@@ -843,7 +846,7 @@ const Ae = /* @__PURE__ */ Object.freeze(
|
|
|
843
846
|
data: s,
|
|
844
847
|
type: i.updateEvent,
|
|
845
848
|
}),
|
|
846
|
-
|
|
849
|
+
_ = (e) => ({
|
|
847
850
|
source: e,
|
|
848
851
|
target: e,
|
|
849
852
|
// for type crap only
|
|
@@ -857,15 +860,15 @@ const Ae = /* @__PURE__ */ Object.freeze(
|
|
|
857
860
|
type: i.insertNode,
|
|
858
861
|
data: t,
|
|
859
862
|
}),
|
|
860
|
-
|
|
863
|
+
Vt = (e, t, s) => ({
|
|
861
864
|
source: e,
|
|
862
865
|
target: t,
|
|
863
866
|
type: i.changeValue,
|
|
864
867
|
data: s,
|
|
865
868
|
}),
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
class
|
|
869
|
+
Kt = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
|
|
870
|
+
S = { index: -1 }
|
|
871
|
+
class Rt {
|
|
869
872
|
constructor() {
|
|
870
873
|
this.map = {}
|
|
871
874
|
}
|
|
@@ -882,7 +885,7 @@ class Kt {
|
|
|
882
885
|
}
|
|
883
886
|
pullMatch(t) {
|
|
884
887
|
const s = t && t.__jsx
|
|
885
|
-
return !s || !(this.map[s] && this.map[s].length) ?
|
|
888
|
+
return !s || !(this.map[s] && this.map[s].length) ? S : this.map[s].shift()
|
|
886
889
|
}
|
|
887
890
|
clear(t) {
|
|
888
891
|
const s = t && t.__jsx
|
|
@@ -899,7 +902,7 @@ class Kt {
|
|
|
899
902
|
}
|
|
900
903
|
}
|
|
901
904
|
const N = (e) => {
|
|
902
|
-
const t = new
|
|
905
|
+
const t = new Rt()
|
|
903
906
|
return t.populate(e), t
|
|
904
907
|
},
|
|
905
908
|
X = (e, t, s = !1) => {
|
|
@@ -929,7 +932,7 @@ const N = (e) => {
|
|
|
929
932
|
isSvg: s,
|
|
930
933
|
}),
|
|
931
934
|
)
|
|
932
|
-
: r.push(
|
|
935
|
+
: r.push(Dt(e, t, { name: l.name, isSvg: s }))
|
|
933
936
|
}
|
|
934
937
|
}
|
|
935
938
|
for (u = 0; u < h; u++) {
|
|
@@ -945,7 +948,7 @@ const N = (e) => {
|
|
|
945
948
|
}
|
|
946
949
|
c ||
|
|
947
950
|
r.push(
|
|
948
|
-
|
|
951
|
+
Pt(e, t, {
|
|
949
952
|
name: l.name,
|
|
950
953
|
value: l.value,
|
|
951
954
|
isSvg: s,
|
|
@@ -955,7 +958,7 @@ const N = (e) => {
|
|
|
955
958
|
}
|
|
956
959
|
return r
|
|
957
960
|
},
|
|
958
|
-
|
|
961
|
+
qt = (e, t) => {
|
|
959
962
|
const s = [],
|
|
960
963
|
r = e.eventMaps,
|
|
961
964
|
n = t.eventMaps,
|
|
@@ -975,7 +978,7 @@ const N = (e) => {
|
|
|
975
978
|
}),
|
|
976
979
|
)
|
|
977
980
|
: s.push(
|
|
978
|
-
|
|
981
|
+
zt(e, t, {
|
|
979
982
|
name: u.domEvent,
|
|
980
983
|
value: u.listener,
|
|
981
984
|
}),
|
|
@@ -986,7 +989,7 @@ const N = (e) => {
|
|
|
986
989
|
d = n[h]
|
|
987
990
|
u ||
|
|
988
991
|
s.push(
|
|
989
|
-
|
|
992
|
+
Bt(e, t, {
|
|
990
993
|
name: d.domEvent,
|
|
991
994
|
value: d.listener,
|
|
992
995
|
}),
|
|
@@ -995,42 +998,42 @@ const N = (e) => {
|
|
|
995
998
|
s
|
|
996
999
|
)
|
|
997
1000
|
},
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
if (
|
|
1001
|
+
It = (e) => e.tagName !== 'INPUT',
|
|
1002
|
+
Jt = (e, t) => e.value === t.value,
|
|
1003
|
+
Ht = (e, t) => {
|
|
1004
|
+
if (It(e) || Jt(e, t)) return []
|
|
1002
1005
|
const s = e,
|
|
1003
1006
|
r = t
|
|
1004
|
-
return [
|
|
1007
|
+
return [Vt(s, r, { name: 'value', value: r.value })]
|
|
1005
1008
|
},
|
|
1006
|
-
|
|
1009
|
+
Gt = (e, t) => {
|
|
1007
1010
|
const s = X(e, t),
|
|
1008
|
-
r =
|
|
1009
|
-
n =
|
|
1011
|
+
r = qt(e, t),
|
|
1012
|
+
n = Ht(e, t)
|
|
1010
1013
|
return s.concat(r).concat(n)
|
|
1011
1014
|
},
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
+
Ct = (e, t) => X(e, t, !0),
|
|
1016
|
+
Qt = (e, t) => (e.textContent !== t.textContent ? [$t(e, t)] : []),
|
|
1017
|
+
Wt = (e, t, s) => {
|
|
1015
1018
|
let r = []
|
|
1016
|
-
if (e.nodeType === 1 &&
|
|
1019
|
+
if (e.nodeType === 1 && at(e)) {
|
|
1017
1020
|
const n = e,
|
|
1018
1021
|
o = t,
|
|
1019
|
-
a =
|
|
1022
|
+
a = Ct(n, o),
|
|
1020
1023
|
h = s(n.childNodes, o.childNodes, n)
|
|
1021
1024
|
r = a.concat(h)
|
|
1022
1025
|
} else if (e.nodeType === 1) {
|
|
1023
1026
|
const n = e,
|
|
1024
1027
|
o = t,
|
|
1025
|
-
a =
|
|
1028
|
+
a = Gt(n, o),
|
|
1026
1029
|
h = s(n.childNodes, o.childNodes, n)
|
|
1027
1030
|
r = a.concat(h)
|
|
1028
|
-
} else e.nodeType === 3 && (r =
|
|
1031
|
+
} else e.nodeType === 3 && (r = Qt(e, t))
|
|
1029
1032
|
return r
|
|
1030
1033
|
},
|
|
1031
1034
|
Y = (e, t, s) => {
|
|
1032
1035
|
const r = [],
|
|
1033
|
-
n =
|
|
1036
|
+
n = Xt(e, t),
|
|
1034
1037
|
o = N(e),
|
|
1035
1038
|
a = N(t),
|
|
1036
1039
|
h = []
|
|
@@ -1058,54 +1061,54 @@ const N = (e) => {
|
|
|
1058
1061
|
? r.push(v(l, { parent: s, index: u }))
|
|
1059
1062
|
: (o.clear(c), r.push(Ft(c, l)))
|
|
1060
1063
|
: r.push(v(l, { parent: s, index: u }))
|
|
1061
|
-
} else c && o.pullMatch(c).element && r.push(
|
|
1064
|
+
} else c && o.pullMatch(c).element && r.push(_(c))
|
|
1062
1065
|
}
|
|
1063
1066
|
o.remaining().forEach(({ element: c }) => {
|
|
1064
|
-
r.push(
|
|
1067
|
+
r.push(_(c))
|
|
1065
1068
|
})
|
|
1066
1069
|
const d = h.reduce(
|
|
1067
|
-
(c, { source: l, target: p }) => c.concat(
|
|
1070
|
+
(c, { source: l, target: p }) => c.concat(Wt(l, p, Y)),
|
|
1068
1071
|
[],
|
|
1069
1072
|
)
|
|
1070
|
-
return r.concat(d).sort(
|
|
1073
|
+
return r.concat(d).sort(Kt)
|
|
1071
1074
|
},
|
|
1072
|
-
|
|
1075
|
+
Xt = (e, t) => {
|
|
1073
1076
|
const s = e.length,
|
|
1074
1077
|
r = t.length
|
|
1075
1078
|
return s > r ? s : r
|
|
1076
1079
|
},
|
|
1077
|
-
|
|
1080
|
+
Yt = (e, t, s) => {
|
|
1078
1081
|
const r = Y(e, t, s)
|
|
1079
1082
|
return (
|
|
1080
1083
|
r.forEach((n) => {
|
|
1081
|
-
|
|
1084
|
+
Zt(n)
|
|
1082
1085
|
}),
|
|
1083
1086
|
r
|
|
1084
1087
|
)
|
|
1085
1088
|
},
|
|
1086
|
-
|
|
1087
|
-
;(
|
|
1089
|
+
Zt = (e) => {
|
|
1090
|
+
;(le[e.type] || te)(e)
|
|
1088
1091
|
},
|
|
1089
|
-
|
|
1090
|
-
|
|
1092
|
+
te = (e) => {},
|
|
1093
|
+
ee = (e) => {
|
|
1091
1094
|
const { source: t, target: s } = e
|
|
1092
1095
|
t.nodeValue = s.textContent
|
|
1093
1096
|
},
|
|
1094
|
-
|
|
1097
|
+
se = (e) => {
|
|
1095
1098
|
const { source: t } = e
|
|
1096
1099
|
t.remove()
|
|
1097
1100
|
},
|
|
1098
|
-
|
|
1101
|
+
re = (e) => {
|
|
1099
1102
|
const { target: t, data: s } = e,
|
|
1100
1103
|
{ parent: r, index: n } = s,
|
|
1101
1104
|
o = r.childNodes[n]
|
|
1102
1105
|
o ? o && o !== t && r.insertBefore(t, o) : r.appendChild(t)
|
|
1103
1106
|
},
|
|
1104
|
-
|
|
1107
|
+
ne = (e) => {
|
|
1105
1108
|
const { source: t, target: s } = e
|
|
1106
1109
|
t.replaceWith(s)
|
|
1107
1110
|
},
|
|
1108
|
-
|
|
1111
|
+
oe = (e) => {
|
|
1109
1112
|
const { source: t, data: s } = e,
|
|
1110
1113
|
{ name: r, isSvg: n } = s
|
|
1111
1114
|
n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
|
|
@@ -1115,81 +1118,81 @@ const N = (e) => {
|
|
|
1115
1118
|
{ name: r, value: n, isSvg: o } = s
|
|
1116
1119
|
o ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
|
|
1117
1120
|
},
|
|
1118
|
-
|
|
1121
|
+
ie = (e) => {
|
|
1119
1122
|
Z(e)
|
|
1120
1123
|
},
|
|
1121
|
-
|
|
1124
|
+
ue = (e) => {
|
|
1122
1125
|
const t = e.data,
|
|
1123
1126
|
s = e.source,
|
|
1124
1127
|
{ name: r, value: n } = t
|
|
1125
1128
|
s.removeEventListener(r, n)
|
|
1126
1129
|
},
|
|
1127
|
-
|
|
1130
|
+
ae = (e) => {
|
|
1128
1131
|
const t = e.data,
|
|
1129
1132
|
s = e.source,
|
|
1130
1133
|
{ name: r, value: n } = t
|
|
1131
1134
|
s.addEventListener(r, n)
|
|
1132
1135
|
},
|
|
1133
|
-
|
|
1136
|
+
ce = (e) => {
|
|
1134
1137
|
const t = e.data,
|
|
1135
1138
|
s = e.source,
|
|
1136
1139
|
{ name: r, sourceValue: n, targetValue: o } = t
|
|
1137
1140
|
s.removeEventListener(r, n), s.addEventListener(r, o)
|
|
1138
1141
|
},
|
|
1139
|
-
|
|
1142
|
+
he = (e) => {
|
|
1140
1143
|
const t = e.data,
|
|
1141
1144
|
s = e.source,
|
|
1142
1145
|
{ value: r } = t
|
|
1143
1146
|
s.value = r
|
|
1144
1147
|
},
|
|
1145
|
-
|
|
1146
|
-
[i.changeText]:
|
|
1147
|
-
[i.removeNode]:
|
|
1148
|
-
[i.insertNode]:
|
|
1149
|
-
[i.replaceNode]:
|
|
1150
|
-
[i.removeAttribute]:
|
|
1148
|
+
le = {
|
|
1149
|
+
[i.changeText]: ee,
|
|
1150
|
+
[i.removeNode]: se,
|
|
1151
|
+
[i.insertNode]: re,
|
|
1152
|
+
[i.replaceNode]: ne,
|
|
1153
|
+
[i.removeAttribute]: oe,
|
|
1151
1154
|
[i.addAttribute]: Z,
|
|
1152
|
-
[i.updateAttribute]:
|
|
1153
|
-
[i.removeEvent]:
|
|
1154
|
-
[i.addEvent]:
|
|
1155
|
-
[i.updateEvent]:
|
|
1156
|
-
[i.changeValue]:
|
|
1155
|
+
[i.updateAttribute]: ie,
|
|
1156
|
+
[i.removeEvent]: ue,
|
|
1157
|
+
[i.addEvent]: ae,
|
|
1158
|
+
[i.updateEvent]: ce,
|
|
1159
|
+
[i.changeValue]: he,
|
|
1157
1160
|
},
|
|
1158
|
-
|
|
1161
|
+
de = (e, t, s) => {
|
|
1159
1162
|
const r = [...t]
|
|
1160
1163
|
return (
|
|
1161
1164
|
e.forEach((n) => {
|
|
1162
|
-
|
|
1165
|
+
pe(n, r, s)
|
|
1163
1166
|
}),
|
|
1164
1167
|
r
|
|
1165
1168
|
)
|
|
1166
1169
|
},
|
|
1167
|
-
|
|
1168
|
-
const r =
|
|
1170
|
+
pe = (e, t, s) => {
|
|
1171
|
+
const r = ve[e.type]
|
|
1169
1172
|
r && r(e, t, s)
|
|
1170
1173
|
},
|
|
1171
|
-
|
|
1174
|
+
me = (e, t) => {
|
|
1172
1175
|
const { source: s } = e,
|
|
1173
1176
|
r = t.indexOf(s)
|
|
1174
1177
|
r >= 0 && t.splice(r, 1)
|
|
1175
1178
|
},
|
|
1176
|
-
|
|
1179
|
+
fe = (e, t, s) => {
|
|
1177
1180
|
const { target: r } = e,
|
|
1178
1181
|
n = e.data,
|
|
1179
1182
|
{ index: o, parent: a } = n
|
|
1180
1183
|
s === a && t.splice(o, 0, r)
|
|
1181
1184
|
},
|
|
1182
|
-
|
|
1185
|
+
be = (e, t) => {
|
|
1183
1186
|
const { target: s, source: r } = e,
|
|
1184
1187
|
n = t.indexOf(r)
|
|
1185
1188
|
n >= 0 && (t[n] = s)
|
|
1186
1189
|
},
|
|
1187
|
-
|
|
1188
|
-
[i.removeNode]:
|
|
1189
|
-
[i.insertNode]:
|
|
1190
|
-
[i.replaceNode]:
|
|
1190
|
+
ve = {
|
|
1191
|
+
[i.removeNode]: me,
|
|
1192
|
+
[i.insertNode]: fe,
|
|
1193
|
+
[i.replaceNode]: be,
|
|
1191
1194
|
}
|
|
1192
|
-
class
|
|
1195
|
+
class ge {
|
|
1193
1196
|
constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
|
|
1194
1197
|
;(this.Template = t),
|
|
1195
1198
|
(this.viewModel = n),
|
|
@@ -1221,8 +1224,8 @@ class ve {
|
|
|
1221
1224
|
this.parentElement = r
|
|
1222
1225
|
}
|
|
1223
1226
|
const t = this.generateDom(this.renderKit),
|
|
1224
|
-
s =
|
|
1225
|
-
this.dom =
|
|
1227
|
+
s = Yt(this.dom, t, this.parentElement)
|
|
1228
|
+
this.dom = de(s, this.dom, this.parentElement)
|
|
1226
1229
|
}
|
|
1227
1230
|
subscribeForRerender() {
|
|
1228
1231
|
const { subscribe: t } = this.renderKit
|
|
@@ -1234,37 +1237,72 @@ class ve {
|
|
|
1234
1237
|
return `${A}:${t}`
|
|
1235
1238
|
}
|
|
1236
1239
|
}
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1240
|
+
const ye = (e) => e,
|
|
1241
|
+
Ee = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1239
1242
|
(s = s || []),
|
|
1240
|
-
(t = t ||
|
|
1243
|
+
(t = t || ye),
|
|
1241
1244
|
(r) =>
|
|
1242
|
-
new
|
|
1245
|
+
new ge({ Template: e, viewModel: t, subscriptions: s, attributes: r })
|
|
1243
1246
|
),
|
|
1244
|
-
|
|
1247
|
+
ke = /* @__PURE__ */ Object.freeze(
|
|
1245
1248
|
/* @__PURE__ */ Object.defineProperty(
|
|
1246
1249
|
{
|
|
1247
1250
|
__proto__: null,
|
|
1248
|
-
createRouteState:
|
|
1251
|
+
createRouteState: $,
|
|
1249
1252
|
events: St,
|
|
1250
|
-
extractQueryParams:
|
|
1251
|
-
findHref:
|
|
1253
|
+
extractQueryParams: L,
|
|
1254
|
+
findHref: F,
|
|
1252
1255
|
navigate: D,
|
|
1253
|
-
onLinkClick:
|
|
1254
|
-
onLocationChange:
|
|
1255
|
-
start:
|
|
1256
|
+
onLinkClick: P,
|
|
1257
|
+
onLocationChange: z,
|
|
1258
|
+
start: Nt,
|
|
1256
1259
|
},
|
|
1257
1260
|
Symbol.toStringTag,
|
|
1258
1261
|
{ value: 'Module' },
|
|
1259
1262
|
),
|
|
1260
|
-
)
|
|
1263
|
+
),
|
|
1264
|
+
xe =
|
|
1265
|
+
(e) =>
|
|
1266
|
+
({ path: t }) =>
|
|
1267
|
+
t === e,
|
|
1268
|
+
we = () => !0,
|
|
1269
|
+
tt =
|
|
1270
|
+
(e) =>
|
|
1271
|
+
({ route: t }) => {
|
|
1272
|
+
const s = e.find((r) => r.match(t))
|
|
1273
|
+
return s && s.Partial
|
|
1274
|
+
},
|
|
1275
|
+
Me = /* @__PURE__ */ Object.freeze(
|
|
1276
|
+
/* @__PURE__ */ Object.defineProperty(
|
|
1277
|
+
{
|
|
1278
|
+
__proto__: null,
|
|
1279
|
+
buildRouter: tt,
|
|
1280
|
+
catchAll: we,
|
|
1281
|
+
exactPathMatch: xe,
|
|
1282
|
+
},
|
|
1283
|
+
Symbol.toStringTag,
|
|
1284
|
+
{ value: 'Module' },
|
|
1285
|
+
),
|
|
1286
|
+
),
|
|
1287
|
+
Ae = () => ({
|
|
1288
|
+
render: (e, t) => [],
|
|
1289
|
+
}),
|
|
1290
|
+
Te = (e) => {
|
|
1291
|
+
const t = tt(e)
|
|
1292
|
+
return Ee({
|
|
1293
|
+
Template: ({ route: r }) => (t({ route: r }) || Ae)(),
|
|
1294
|
+
subscriptions: ['route'],
|
|
1295
|
+
})
|
|
1296
|
+
}
|
|
1261
1297
|
export {
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1298
|
+
Oe as JaxsTypes,
|
|
1299
|
+
_e as appBuilding,
|
|
1300
|
+
Ee as bind,
|
|
1301
|
+
je as createApp,
|
|
1302
|
+
wt as jsx,
|
|
1303
|
+
Se as messageBus,
|
|
1304
|
+
ke as navigation,
|
|
1305
|
+
Te as routedView,
|
|
1306
|
+
Me as routing,
|
|
1307
|
+
Ne as state,
|
|
1270
1308
|
}
|