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.js CHANGED
@@ -1,12 +1,15 @@
1
- const tt = (e, t) => t.createElement(e),
2
- et = (e, t) => {
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' ? (e.value = r) : e.setAttribute(s, r)
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
- st = (e, t, s) => {
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
- rt = (e, t, s, r) => {
24
- const n = tt(e, r.document)
25
- return et(n, t), st(n, s, r.publish), n
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
- nt = {
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
- ot = (e, t) => !!(nt[e] || (e === 'a' && t === E)),
93
- it = (e, t, s) => {
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
- ut = (e) => e.namespaceURI === E,
102
- at = (e, t) => t.createTextNode(e)
103
- class ct {
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 = at(this.value, t.document)
111
+ const s = ct(this.value, t.document)
109
112
  return (s.__jsx = 'TextNode'), [s]
110
113
  }
111
114
  }
112
- const ht = (e) => typeof e == 'string' || typeof e == 'number',
113
- lt = (e) => new ct(e),
114
- dt = (e) => (ht(e) ? lt(e) : e),
115
- pt = (e) => mt(e).map(dt).flat(),
116
- mt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
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
- ft = (e, t = '') => {
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] = bt(n, o, t))
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
- bt = (e, t, s = '') => (t == null ? s : t.toString()),
137
- vt = (e, t) => {
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
- k = (e, t, s, r = []) => e.reduce(gt(t, s), r).flat(),
143
- gt = (e, t) => (s, r) =>
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
- ? k(r, e, t, s)
149
+ ? O(r, e, t, s)
147
150
  : (r.render(e, t).forEach((n) => s.push(n)), s)
148
151
  : s
149
- class O {
152
+ class k {
150
153
  constructor(t) {
151
- this.collection = pt(t)
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 k(this.collection, t, this.parentElement)
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 yt {
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 Et {
196
+ class xt {
194
197
  constructor(t, s, r = []) {
195
198
  this.type = t
196
- const { events: n, attributes: o } = ft(s)
199
+ const { events: n, attributes: o } = bt(s)
197
200
  ;(this.events = n),
198
201
  (this.attributes = o),
199
- (this.isSvg = ot(this.type, this.attributes.xmlns)),
200
- (this.children = new O(r))
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 = rt(this.type, this.attributes, this.events, t)
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 = it(this.type, this.attributes, t.document)
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 yt(this.type, this.attributes).generate()
221
+ return new Et(this.type, this.attributes).generate()
219
222
  }
220
223
  }
221
- const xt = (e, t, ...s) =>
222
- typeof e == 'string' ? new Et(e, t, s) : e(vt(t, s))
223
- xt.fragment = (e, t) => {
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 O(s)
228
+ return new k(s)
226
229
  }
227
- class wt {
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 At = (e, t, s) => {
253
- const r = new wt(e, t, s)
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
- $ = 'navigation:route-change',
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
- F = (e) => {
274
+ $ = (e) => {
272
275
  e.createRecord('route', {
273
276
  host: '',
274
277
  path: '',
275
278
  query: {},
276
279
  })
277
280
  },
278
- T = (e) => {
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
- L = (e, t) => {
288
+ P = (e, t) => {
286
289
  if (!e || !e.target) return
287
290
  e.preventDefault()
288
- const s = T(e.target)
291
+ const s = F(e.target)
289
292
  D(s, t)
290
293
  },
291
- B = (e) =>
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
- P = (e, t) => {
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 = B(h),
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($, c)
313
+ s.store('route').update(c), r(T, c)
311
314
  },
312
- U = (e) => {
315
+ B = (e) => {
313
316
  const { subscribe: t } = e
314
- t(M, L)
317
+ t(M, P)
315
318
  },
316
- z = (e) => {
319
+ U = (e) => {
317
320
  const { publish: t, subscribe: s, state: r, window: n } = e
318
- F(r), n.addEventListener('popstate', () => t(m, null)), s(m, P)
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
- z(e), U(e), V(e)
327
+ U(e), B(e), V(e)
325
328
  },
326
- _t = /* @__PURE__ */ Object.freeze(
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: z,
333
- subscribeToNavigation: U,
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 = At(t, s, this.renderKit)
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 ye = /* @__PURE__ */ Object.freeze(
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
- Ee = /* @__PURE__ */ Object.freeze(
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
- Nt = (e, t) => e === t,
483
- jt = (e, t) => Object.keys(e).length === Object.keys(t).length,
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)) || !jt(e, 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
- Ot = (e, t) =>
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) ? Ot(e, t) : Nt(e, t))
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
- xe = /* @__PURE__ */ Object.freeze(
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 Mt {
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 we = (e = {}) => {
771
- const s = new Mt(e).setup()
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 Ae = /* @__PURE__ */ Object.freeze(
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
- Tt = (e, t, s) => ({
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
- Dt = (e, t, s) => ({
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
- Bt = (e, t, s) => ({
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
- Pt = (e, t, s) => ({
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
- S = (e) => ({
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
- zt = (e, t, s) => ({
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
- Vt = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
867
- _ = { index: -1 }
868
- class Kt {
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) ? _ : this.map[s].shift()
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 Kt()
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(Tt(e, t, { name: l.name, isSvg: s }))
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
- Dt(e, t, {
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
- Rt = (e, t) => {
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
- Bt(e, t, {
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
- Pt(e, t, {
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
- qt = (e) => e.tagName !== 'INPUT',
999
- It = (e, t) => e.value === t.value,
1000
- Jt = (e, t) => {
1001
- if (qt(e) || It(e, t)) return []
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 [zt(s, r, { name: 'value', value: r.value })]
1007
+ return [Vt(s, r, { name: 'value', value: r.value })]
1005
1008
  },
1006
- Ht = (e, t) => {
1009
+ Gt = (e, t) => {
1007
1010
  const s = X(e, t),
1008
- r = Rt(e, t),
1009
- n = Jt(e, t)
1011
+ r = qt(e, t),
1012
+ n = Ht(e, t)
1010
1013
  return s.concat(r).concat(n)
1011
1014
  },
1012
- Gt = (e, t) => X(e, t, !0),
1013
- Ct = (e, t) => (e.textContent !== t.textContent ? [$t(e, t)] : []),
1014
- Qt = (e, t, s) => {
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 && ut(e)) {
1019
+ if (e.nodeType === 1 && at(e)) {
1017
1020
  const n = e,
1018
1021
  o = t,
1019
- a = Gt(n, o),
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 = Ht(n, o),
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 = Ct(e, t))
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 = Wt(e, t),
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(S(c))
1064
+ } else c && o.pullMatch(c).element && r.push(_(c))
1062
1065
  }
1063
1066
  o.remaining().forEach(({ element: c }) => {
1064
- r.push(S(c))
1067
+ r.push(_(c))
1065
1068
  })
1066
1069
  const d = h.reduce(
1067
- (c, { source: l, target: p }) => c.concat(Qt(l, p, Y)),
1070
+ (c, { source: l, target: p }) => c.concat(Wt(l, p, Y)),
1068
1071
  [],
1069
1072
  )
1070
- return r.concat(d).sort(Vt)
1073
+ return r.concat(d).sort(Kt)
1071
1074
  },
1072
- Wt = (e, t) => {
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
- Xt = (e, t, s) => {
1080
+ Yt = (e, t, s) => {
1078
1081
  const r = Y(e, t, s)
1079
1082
  return (
1080
1083
  r.forEach((n) => {
1081
- Yt(n)
1084
+ Zt(n)
1082
1085
  }),
1083
1086
  r
1084
1087
  )
1085
1088
  },
1086
- Yt = (e) => {
1087
- ;(he[e.type] || Zt)(e)
1089
+ Zt = (e) => {
1090
+ ;(le[e.type] || te)(e)
1088
1091
  },
1089
- Zt = (e) => {},
1090
- te = (e) => {
1092
+ te = (e) => {},
1093
+ ee = (e) => {
1091
1094
  const { source: t, target: s } = e
1092
1095
  t.nodeValue = s.textContent
1093
1096
  },
1094
- ee = (e) => {
1097
+ se = (e) => {
1095
1098
  const { source: t } = e
1096
1099
  t.remove()
1097
1100
  },
1098
- se = (e) => {
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
- re = (e) => {
1107
+ ne = (e) => {
1105
1108
  const { source: t, target: s } = e
1106
1109
  t.replaceWith(s)
1107
1110
  },
1108
- ne = (e) => {
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
- oe = (e) => {
1121
+ ie = (e) => {
1119
1122
  Z(e)
1120
1123
  },
1121
- ie = (e) => {
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
- ue = (e) => {
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
- ae = (e) => {
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
- ce = (e) => {
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
- he = {
1146
- [i.changeText]: te,
1147
- [i.removeNode]: ee,
1148
- [i.insertNode]: se,
1149
- [i.replaceNode]: re,
1150
- [i.removeAttribute]: ne,
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]: oe,
1153
- [i.removeEvent]: ie,
1154
- [i.addEvent]: ue,
1155
- [i.updateEvent]: ae,
1156
- [i.changeValue]: ce,
1155
+ [i.updateAttribute]: ie,
1156
+ [i.removeEvent]: ue,
1157
+ [i.addEvent]: ae,
1158
+ [i.updateEvent]: ce,
1159
+ [i.changeValue]: he,
1157
1160
  },
1158
- le = (e, t, s) => {
1161
+ de = (e, t, s) => {
1159
1162
  const r = [...t]
1160
1163
  return (
1161
1164
  e.forEach((n) => {
1162
- de(n, r, s)
1165
+ pe(n, r, s)
1163
1166
  }),
1164
1167
  r
1165
1168
  )
1166
1169
  },
1167
- de = (e, t, s) => {
1168
- const r = be[e.type]
1170
+ pe = (e, t, s) => {
1171
+ const r = ve[e.type]
1169
1172
  r && r(e, t, s)
1170
1173
  },
1171
- pe = (e, t) => {
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
- me = (e, t, s) => {
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
- fe = (e, t) => {
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
- be = {
1188
- [i.removeNode]: pe,
1189
- [i.insertNode]: me,
1190
- [i.replaceNode]: fe,
1190
+ ve = {
1191
+ [i.removeNode]: me,
1192
+ [i.insertNode]: fe,
1193
+ [i.replaceNode]: be,
1191
1194
  }
1192
- class ve {
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 = Xt(this.dom, t, this.parentElement)
1225
- this.dom = le(s, this.dom, this.parentElement)
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 ge = (e) => e,
1238
- Se = ({ Template: e, viewModel: t, subscriptions: s }) => (
1240
+ const ye = (e) => e,
1241
+ Ee = ({ Template: e, viewModel: t, subscriptions: s }) => (
1239
1242
  (s = s || []),
1240
- (t = t || ge),
1243
+ (t = t || ye),
1241
1244
  (r) =>
1242
- new ve({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1245
+ new ge({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1243
1246
  ),
1244
- _e = /* @__PURE__ */ Object.freeze(
1247
+ ke = /* @__PURE__ */ Object.freeze(
1245
1248
  /* @__PURE__ */ Object.defineProperty(
1246
1249
  {
1247
1250
  __proto__: null,
1248
- createRouteState: F,
1251
+ createRouteState: $,
1249
1252
  events: St,
1250
- extractQueryParams: B,
1251
- findHref: T,
1253
+ extractQueryParams: L,
1254
+ findHref: F,
1252
1255
  navigate: D,
1253
- onLinkClick: L,
1254
- onLocationChange: P,
1255
- start: _t,
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
- Ae as JaxsTypes,
1263
- ye as appBuilding,
1264
- Se as bind,
1265
- we as createApp,
1266
- xt as jsx,
1267
- Ee as messageBus,
1268
- _e as navigation,
1269
- xe as state,
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
  }