jaxs 0.7.1 → 0.7.3
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 +718 -726
- package/dist/jaxs.js +1087 -777
- package/dist/jaxs.umd.cjs +1222 -1
- package/package.json +5 -3
package/dist/jaxs.d.ts
CHANGED
|
@@ -1,726 +1,718 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
declare
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
declare
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
declare
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
declare
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
declare
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
declare
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
declare
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
declare
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
declare
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
declare
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
export * as JaxsTypes from "types";
|
|
720
|
-
export * as navigation from "navigation/index";
|
|
721
|
-
export * as appBuilding from "app/index";
|
|
722
|
-
export * as messageBus from "bus/index";
|
|
723
|
-
export * as state from "state/index";
|
|
724
|
-
export * as routing from "app/routing";
|
|
725
|
-
export { routedView } from "app/routed-view";
|
|
726
|
-
}
|
|
1
|
+
export declare class App {
|
|
2
|
+
window: Window
|
|
3
|
+
document: Document
|
|
4
|
+
publish: PublishFunction
|
|
5
|
+
subscribe: Subscribe
|
|
6
|
+
bus: JaxsBus
|
|
7
|
+
state: State
|
|
8
|
+
renderKit: RenderKit
|
|
9
|
+
roots: Root[]
|
|
10
|
+
constructor({
|
|
11
|
+
window,
|
|
12
|
+
document,
|
|
13
|
+
publish,
|
|
14
|
+
subscribe,
|
|
15
|
+
bus,
|
|
16
|
+
state,
|
|
17
|
+
renderKit,
|
|
18
|
+
}: {
|
|
19
|
+
window: any
|
|
20
|
+
document: any
|
|
21
|
+
publish: any
|
|
22
|
+
subscribe: any
|
|
23
|
+
bus: any
|
|
24
|
+
state: any
|
|
25
|
+
renderKit: any
|
|
26
|
+
})
|
|
27
|
+
render(template: Renderable, selector: string): Root
|
|
28
|
+
startNavigation(): void
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare type AppAdditionListenerOptions = {
|
|
32
|
+
state: State
|
|
33
|
+
document: Document
|
|
34
|
+
window: Window
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export declare namespace appBuilding {
|
|
38
|
+
export { App }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare type AttributeInstructionData = {
|
|
42
|
+
name: string
|
|
43
|
+
value: string
|
|
44
|
+
isSvg?: boolean
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare type AttributesWithChildren<T> = Props<T> & {
|
|
48
|
+
children?: JsxCollection
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export declare const bind: <ATTRIBUTES, STATE_MAP>({
|
|
52
|
+
Template,
|
|
53
|
+
viewModel,
|
|
54
|
+
subscriptions,
|
|
55
|
+
}: BindParams<ATTRIBUTES, STATE_MAP>) => (
|
|
56
|
+
attributes: Partial<Props<ATTRIBUTES>>,
|
|
57
|
+
) => Bound<unknown, unknown>
|
|
58
|
+
|
|
59
|
+
declare type BindParams<T, U> = {
|
|
60
|
+
Template: Template<T>
|
|
61
|
+
viewModel?: ViewModel<T, U>
|
|
62
|
+
subscriptions?: BindSubscriptionList
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare type BindSubscriptionList = string[]
|
|
66
|
+
|
|
67
|
+
declare class Bound<ATTRIBUTES, STATE_MAP> {
|
|
68
|
+
Template: Template<ATTRIBUTES>
|
|
69
|
+
viewModel: ViewModel<ATTRIBUTES, STATE_MAP>
|
|
70
|
+
attributes: Partial<Props<ATTRIBUTES>>
|
|
71
|
+
subscriptions: BindSubscriptionList
|
|
72
|
+
dom: JaxsNode[]
|
|
73
|
+
parentElement: JaxsElement | null
|
|
74
|
+
renderKit?: RenderKit
|
|
75
|
+
constructor({
|
|
76
|
+
Template,
|
|
77
|
+
subscriptions,
|
|
78
|
+
attributes,
|
|
79
|
+
viewModel,
|
|
80
|
+
}: {
|
|
81
|
+
Template: any
|
|
82
|
+
subscriptions: any
|
|
83
|
+
attributes: any
|
|
84
|
+
viewModel: any
|
|
85
|
+
})
|
|
86
|
+
render(renderKit: RenderKit): JaxsNode[]
|
|
87
|
+
generateDom(renderKit: RenderKit): JaxsNode[]
|
|
88
|
+
rerender(): void
|
|
89
|
+
subscribeForRerender(): void
|
|
90
|
+
eventName(storeName: string): string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare const buildRouter: (
|
|
94
|
+
pages: RenderedRoute[],
|
|
95
|
+
) => ({ route }: { route: any }) => StaticTemplate
|
|
96
|
+
|
|
97
|
+
declare type BusEventMatcher = string | RegExp
|
|
98
|
+
|
|
99
|
+
export declare type BusListener<T> = (
|
|
100
|
+
payload: T,
|
|
101
|
+
listenerKit: ListenerKit,
|
|
102
|
+
) => void
|
|
103
|
+
|
|
104
|
+
declare const catchAll: RouteMatcher
|
|
105
|
+
|
|
106
|
+
declare type ChangeInstruction = {
|
|
107
|
+
source: JaxsNode
|
|
108
|
+
target: JaxsNode
|
|
109
|
+
type: ChangeInstructionTypes
|
|
110
|
+
data: InstructionData
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare type ChangeInstructions = Array<ChangeInstruction>
|
|
114
|
+
|
|
115
|
+
declare enum ChangeInstructionTypes {
|
|
116
|
+
removeNode = 0,
|
|
117
|
+
insertNode = 1, // can be to move an existing element in the dom, or to add one
|
|
118
|
+
replaceNode = 2,
|
|
119
|
+
removeAttribute = 3,
|
|
120
|
+
addAttribute = 4,
|
|
121
|
+
updateAttribute = 5,
|
|
122
|
+
removeEvent = 6,
|
|
123
|
+
addEvent = 7,
|
|
124
|
+
updateEvent = 8,
|
|
125
|
+
changeValue = 9,
|
|
126
|
+
changeText = 10,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare class Children implements Renderable {
|
|
130
|
+
collection: Renderable[]
|
|
131
|
+
parentElement?: JaxsElement
|
|
132
|
+
constructor(jsxChildren: JsxCollection)
|
|
133
|
+
render(renderKit: RenderKit, parentElement?: JaxsElement): JaxsNode[]
|
|
134
|
+
generateDom(renderKit: RenderKit): JaxsNode[]
|
|
135
|
+
attachToParent(dom: JaxsNodes): void
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare type CompileChildren = (
|
|
139
|
+
sourceList: JaxsNodes,
|
|
140
|
+
targetList: JaxsNodes,
|
|
141
|
+
parent: JaxsElement,
|
|
142
|
+
) => ChangeInstructions
|
|
143
|
+
|
|
144
|
+
export declare const createApp: (
|
|
145
|
+
domEnvironment?: CreateAppBuilderArguments,
|
|
146
|
+
) => App
|
|
147
|
+
|
|
148
|
+
declare type CreateAppBuilderArguments = {
|
|
149
|
+
window?: Window
|
|
150
|
+
document?: Document
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare const createBus: () => {
|
|
154
|
+
bus: JaxsBus
|
|
155
|
+
publish: (event: string, payload: any) => void
|
|
156
|
+
subscribe: (
|
|
157
|
+
matcher: BusEventMatcher,
|
|
158
|
+
listener: BusListener<any>,
|
|
159
|
+
) => Unsubscribe
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
declare const createRouteState: (state: State) => void
|
|
163
|
+
|
|
164
|
+
declare const createState: (publisher: StatePublisher) => State
|
|
165
|
+
|
|
166
|
+
declare type CustomPeriodicOptions = {
|
|
167
|
+
timer: PeriodicTimerFunction
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare type CustomPeriodicPublisherOptions = RequiredPeriodicPublisherOptions &
|
|
171
|
+
CustomPeriodicOptions
|
|
172
|
+
|
|
173
|
+
declare type DefaultBusListenerOptions = {
|
|
174
|
+
publish: PublishFunction
|
|
175
|
+
eventName: string
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
declare type DiffPair = {
|
|
179
|
+
source: JaxsNode
|
|
180
|
+
target: JaxsNode
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare type DomPublish = (eventName: string, domEvent: Event) => void
|
|
184
|
+
|
|
185
|
+
declare type EventInstructionData = {
|
|
186
|
+
name: string
|
|
187
|
+
value: EventListener
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
declare type EventMap = {
|
|
191
|
+
domEvent: string
|
|
192
|
+
busEvent: string
|
|
193
|
+
listener: EventListener
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
declare type EventMaps = Record<string, EventMap>
|
|
197
|
+
|
|
198
|
+
declare const eventName = 'state'
|
|
199
|
+
|
|
200
|
+
declare namespace events {
|
|
201
|
+
export {
|
|
202
|
+
linkNavigationEvent,
|
|
203
|
+
navigationEvent,
|
|
204
|
+
locationChangeEvent,
|
|
205
|
+
routeChangeEvent,
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare const exactPathMatch: (exactPath: string) => RouteMatcher
|
|
210
|
+
|
|
211
|
+
declare type ExactSubscriptionData<T> = {
|
|
212
|
+
listener: BusListener<T>
|
|
213
|
+
index: number
|
|
214
|
+
matcher: string
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare class ExactSubscriptions {
|
|
218
|
+
lookup: Record<string, ExactSubscriptionData<any>[]>
|
|
219
|
+
constructor()
|
|
220
|
+
add<T>(matcher: string, listener: BusListener<T>, index: number): Unsubscribe
|
|
221
|
+
remove<T>(subscription: ExactSubscriptionData<T>): void
|
|
222
|
+
matches(event: string): ExactSubscriptionData<any>[]
|
|
223
|
+
ensureArrayFor(matcher: string): void
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare const extractQueryParams: (queryString: string) => {}
|
|
227
|
+
|
|
228
|
+
declare const findHref: (node: HTMLElement) => string
|
|
229
|
+
|
|
230
|
+
declare type FuzzySubscriptionData<T> = {
|
|
231
|
+
listener: BusListener<T>
|
|
232
|
+
index: number
|
|
233
|
+
matcher: RegExp
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
declare class FuzzySubscriptions {
|
|
237
|
+
lookup: FuzzySubscriptionData<any>[]
|
|
238
|
+
constructor()
|
|
239
|
+
add<T>(matcher: RegExp, listener: BusListener<T>, index: number): Unsubscribe
|
|
240
|
+
remove<T>(subscription: FuzzySubscriptionData<T>): void
|
|
241
|
+
matches(event: string): FuzzySubscriptionData<any>[]
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
declare type GeneralPeriodicOptions = {
|
|
245
|
+
period: number
|
|
246
|
+
offset?: number
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
declare type GeneralPeriodicPublisherOptions =
|
|
250
|
+
RequiredPeriodicPublisherOptions & GeneralPeriodicOptions
|
|
251
|
+
|
|
252
|
+
declare type InsertNodeData = {
|
|
253
|
+
parent: JaxsElement
|
|
254
|
+
index: number
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare type InstructionData =
|
|
258
|
+
| RemoveInstructionData
|
|
259
|
+
| AttributeInstructionData
|
|
260
|
+
| EventInstructionData
|
|
261
|
+
| UpdateEventInstructionData
|
|
262
|
+
| InsertNodeData
|
|
263
|
+
| NullInstructionData
|
|
264
|
+
|
|
265
|
+
declare type InstructionsUpdater = (instruction: ChangeInstruction) => void
|
|
266
|
+
|
|
267
|
+
declare class JaxsBus {
|
|
268
|
+
options?: AppAdditionListenerOptions
|
|
269
|
+
exactSubscriptions: ExactSubscriptions
|
|
270
|
+
fuzzySubscriptions: FuzzySubscriptions
|
|
271
|
+
currentIndex: number
|
|
272
|
+
constructor()
|
|
273
|
+
subscribe<T>(matcher: BusEventMatcher, listener: BusListener<T>): Unsubscribe
|
|
274
|
+
publish<T>(event: string, payload: T): void
|
|
275
|
+
addListenerOptions(options: AppAdditionListenerOptions): void
|
|
276
|
+
listenerOptions(event: string): ListenerKit
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
declare type JaxsElement = Element & JsxIded & JsxEventMapped
|
|
280
|
+
|
|
281
|
+
declare type JaxsInput = HTMLInputElement & JsxIded & JsxEventMapped
|
|
282
|
+
|
|
283
|
+
declare type JaxsNode = JaxsElement | JaxsText | JaxsSvgElement
|
|
284
|
+
|
|
285
|
+
declare type JaxsNodes = JaxsNode[] | NodeListOf<JaxsNode>
|
|
286
|
+
|
|
287
|
+
declare type JaxsSvgElement = SVGElement & JsxIded
|
|
288
|
+
|
|
289
|
+
declare type JaxsText = Text & JsxIded
|
|
290
|
+
|
|
291
|
+
export declare namespace JaxsTypes {
|
|
292
|
+
export {
|
|
293
|
+
App,
|
|
294
|
+
State,
|
|
295
|
+
Store,
|
|
296
|
+
StoreUpdaterBase,
|
|
297
|
+
StoreUpdaterBoolean,
|
|
298
|
+
StoreUpdaterList,
|
|
299
|
+
StoreUpdaterObject,
|
|
300
|
+
StoreUpdater,
|
|
301
|
+
TextValue,
|
|
302
|
+
JsxIded,
|
|
303
|
+
JsxChangeId,
|
|
304
|
+
EventMap,
|
|
305
|
+
EventMaps,
|
|
306
|
+
JaxsElement,
|
|
307
|
+
JaxsText,
|
|
308
|
+
JaxsSvgElement,
|
|
309
|
+
JaxsNode,
|
|
310
|
+
JaxsNodes,
|
|
311
|
+
JaxsInput,
|
|
312
|
+
ReactSourceObject,
|
|
313
|
+
Props,
|
|
314
|
+
PropValue,
|
|
315
|
+
TagAttributes,
|
|
316
|
+
TagEventAttributes,
|
|
317
|
+
TagAttributesAndEvents,
|
|
318
|
+
DomPublish,
|
|
319
|
+
Subscribe,
|
|
320
|
+
RenderKit,
|
|
321
|
+
Renderable,
|
|
322
|
+
StaticTemplate,
|
|
323
|
+
TypedTemplate,
|
|
324
|
+
Template,
|
|
325
|
+
JsxCollection,
|
|
326
|
+
ChangeInstructionTypes,
|
|
327
|
+
RemoveInstructionData,
|
|
328
|
+
AttributeInstructionData,
|
|
329
|
+
EventInstructionData,
|
|
330
|
+
UpdateEventInstructionData,
|
|
331
|
+
InsertNodeData,
|
|
332
|
+
InstructionData,
|
|
333
|
+
ChangeInstruction,
|
|
334
|
+
ChangeInstructions,
|
|
335
|
+
InstructionsUpdater,
|
|
336
|
+
StoreMap,
|
|
337
|
+
ViewModel,
|
|
338
|
+
BindSubscriptionList,
|
|
339
|
+
BindParams,
|
|
340
|
+
AppAdditionListenerOptions,
|
|
341
|
+
DefaultBusListenerOptions,
|
|
342
|
+
ListenerKit,
|
|
343
|
+
PublishFunction,
|
|
344
|
+
BusListener,
|
|
345
|
+
BusEventMatcher,
|
|
346
|
+
ExactSubscriptionData,
|
|
347
|
+
FuzzySubscriptionData,
|
|
348
|
+
Unsubscribe,
|
|
349
|
+
CreateAppBuilderArguments,
|
|
350
|
+
RouteState,
|
|
351
|
+
AttributesWithChildren,
|
|
352
|
+
DiffPair,
|
|
353
|
+
CompileChildren,
|
|
354
|
+
StatePublisher,
|
|
355
|
+
StateTransactionUpdater,
|
|
356
|
+
StoresCollection,
|
|
357
|
+
StoreInitializationOptions,
|
|
358
|
+
StoreDataUpdater,
|
|
359
|
+
UpdaterValue,
|
|
360
|
+
StoreUpdaterOrValue,
|
|
361
|
+
StoreListSorterFunction,
|
|
362
|
+
RouteMatcher,
|
|
363
|
+
RenderedRoute,
|
|
364
|
+
PeriodicPublisher,
|
|
365
|
+
RequiredPeriodicPublisherOptions,
|
|
366
|
+
GeneralPeriodicOptions,
|
|
367
|
+
CustomPeriodicOptions,
|
|
368
|
+
GeneralPeriodicPublisherOptions,
|
|
369
|
+
CustomPeriodicPublisherOptions,
|
|
370
|
+
PublishPeriodicallyOptions,
|
|
371
|
+
PeriodicTimerFunctionOptions,
|
|
372
|
+
PeriodicTimerFunction,
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export declare const jsx: {
|
|
377
|
+
<T>(
|
|
378
|
+
type: string | Template<T>,
|
|
379
|
+
attributes: Props<T>,
|
|
380
|
+
...children: JsxCollection
|
|
381
|
+
): Renderable
|
|
382
|
+
fragment<T>(attributes: Props<T>, maybeChildren: JsxCollection): Children
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
declare type JsxChangeId = {
|
|
386
|
+
element: JaxsNode
|
|
387
|
+
index: number
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
declare type JsxCollection = (Renderable | TextValue)[]
|
|
391
|
+
|
|
392
|
+
declare interface JsxEventMapped {
|
|
393
|
+
eventMaps: EventMaps
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
declare interface JsxIded {
|
|
397
|
+
__jsx?: string
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
declare const linkNavigationEvent = 'go-to-href'
|
|
401
|
+
|
|
402
|
+
declare type ListenerKit = AppAdditionListenerOptions &
|
|
403
|
+
DefaultBusListenerOptions
|
|
404
|
+
|
|
405
|
+
declare const locationChangeEvent = 'navigation:location-change'
|
|
406
|
+
|
|
407
|
+
export declare namespace messageBus {
|
|
408
|
+
export {
|
|
409
|
+
createBus,
|
|
410
|
+
JaxsBus,
|
|
411
|
+
ExactSubscriptions,
|
|
412
|
+
FuzzySubscriptions,
|
|
413
|
+
publishPeriodically,
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
declare const navigate: (path: string, { publish, window }: ListenerKit) => void
|
|
418
|
+
|
|
419
|
+
export declare namespace navigation {
|
|
420
|
+
export {
|
|
421
|
+
events,
|
|
422
|
+
extractQueryParams,
|
|
423
|
+
findHref,
|
|
424
|
+
navigate,
|
|
425
|
+
onLinkClick,
|
|
426
|
+
onLocationChange,
|
|
427
|
+
createRouteState,
|
|
428
|
+
start,
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
declare const navigationEvent = 'go-to'
|
|
433
|
+
|
|
434
|
+
declare type NullInstructionData = Record<string, never>
|
|
435
|
+
|
|
436
|
+
declare type NullValues = null | undefined
|
|
437
|
+
|
|
438
|
+
declare const onLinkClick: (domEvent: MouseEvent, options: ListenerKit) => void
|
|
439
|
+
|
|
440
|
+
declare const onLocationChange: (_: null, listenerOptions: ListenerKit) => void
|
|
441
|
+
|
|
442
|
+
declare interface PeriodicPublisher {
|
|
443
|
+
event: string
|
|
444
|
+
publish: PublishFunction
|
|
445
|
+
payload?: any
|
|
446
|
+
start: () => void
|
|
447
|
+
stop: () => void
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
declare type PeriodicTimerFunction = (
|
|
451
|
+
options: PeriodicTimerFunctionOptions,
|
|
452
|
+
) => number
|
|
453
|
+
|
|
454
|
+
declare type PeriodicTimerFunctionOptions = {
|
|
455
|
+
timeDiff: number
|
|
456
|
+
callCount: number
|
|
457
|
+
stop: () => void
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export declare type Props<T> = Partial<{
|
|
461
|
+
__source: ReactSourceObject
|
|
462
|
+
children: JsxCollection
|
|
463
|
+
}> &
|
|
464
|
+
T
|
|
465
|
+
|
|
466
|
+
declare type PropValue =
|
|
467
|
+
| TextValue
|
|
468
|
+
| NullValues
|
|
469
|
+
| boolean
|
|
470
|
+
| ReactSourceObject
|
|
471
|
+
| JsxCollection
|
|
472
|
+
|
|
473
|
+
export declare type PublishFunction = (event: string, payload: any) => void
|
|
474
|
+
|
|
475
|
+
declare const publishLocation: (app: App) => void
|
|
476
|
+
|
|
477
|
+
declare const publishPeriodically: (
|
|
478
|
+
options: PublishPeriodicallyOptions,
|
|
479
|
+
) => () => void
|
|
480
|
+
|
|
481
|
+
declare type PublishPeriodicallyOptions =
|
|
482
|
+
| GeneralPeriodicPublisherOptions
|
|
483
|
+
| CustomPeriodicPublisherOptions
|
|
484
|
+
|
|
485
|
+
declare type ReactSourceObject = {
|
|
486
|
+
fileName: string
|
|
487
|
+
lineNumber: string
|
|
488
|
+
columnNumber: string
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
declare type RemoveInstructionData = {
|
|
492
|
+
name: string
|
|
493
|
+
isSvg?: boolean
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export declare interface Renderable {
|
|
497
|
+
render: (renderKit: RenderKit, parentElement?: JaxsElement) => JaxsNode[]
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export declare type RenderedRoute = {
|
|
501
|
+
Partial: StaticTemplate
|
|
502
|
+
match: RouteMatcher
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
declare type RenderKit = {
|
|
506
|
+
document: Document
|
|
507
|
+
window: Window
|
|
508
|
+
publish: DomPublish
|
|
509
|
+
subscribe: Subscribe
|
|
510
|
+
state: State
|
|
511
|
+
parent?: JaxsNode | null
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
declare type RequiredPeriodicPublisherOptions = {
|
|
515
|
+
event: string
|
|
516
|
+
publish: PublishFunction
|
|
517
|
+
payload?: any
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
declare class Root {
|
|
521
|
+
template: Renderable
|
|
522
|
+
selector: string
|
|
523
|
+
renderKit: RenderKit
|
|
524
|
+
dom: JaxsNodes
|
|
525
|
+
parentElement?: JaxsElement | null
|
|
526
|
+
constructor(template: Renderable, selector: string, renderKit: RenderKit)
|
|
527
|
+
renderAndAttach(renderKit: RenderKit): void
|
|
528
|
+
render(renderKit: RenderKit): JaxsNode[]
|
|
529
|
+
attach(): void
|
|
530
|
+
getParentElement(): Element
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare const routeChangeEvent = 'navigation:route-change'
|
|
534
|
+
|
|
535
|
+
export declare const routedView: (routes: RenderedRoute[]) => (
|
|
536
|
+
attributes: Partial<
|
|
537
|
+
Props<{
|
|
538
|
+
route: RouteState
|
|
539
|
+
}>
|
|
540
|
+
>,
|
|
541
|
+
) => Bound<unknown, unknown>
|
|
542
|
+
|
|
543
|
+
export declare type RouteMatcher = (routeState: RouteState) => boolean
|
|
544
|
+
|
|
545
|
+
export declare type RouteState = {
|
|
546
|
+
host: string
|
|
547
|
+
path: string
|
|
548
|
+
query: Record<string, string>
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export declare namespace routing {
|
|
552
|
+
export { exactPathMatch, catchAll, buildRouter }
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
declare interface SourceMap {
|
|
556
|
+
__source?: ReactSourceObject
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
declare namespace start {
|
|
560
|
+
export {
|
|
561
|
+
subscribeToNavigation,
|
|
562
|
+
subscribeToHistoryChange,
|
|
563
|
+
publishLocation,
|
|
564
|
+
startNavigation,
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
declare const startNavigation: (app: App) => void
|
|
569
|
+
|
|
570
|
+
export declare class State {
|
|
571
|
+
publisher: StatePublisher
|
|
572
|
+
stores: StoresCollection
|
|
573
|
+
eventNamePrefix: string
|
|
574
|
+
notifications: Set<string>
|
|
575
|
+
inTransaction: boolean
|
|
576
|
+
constructor(publisher: StatePublisher)
|
|
577
|
+
create<T>(name: string, initialState: T): Store<T>
|
|
578
|
+
store<T>(name: string): Store<T>
|
|
579
|
+
get<T>(name: string): T
|
|
580
|
+
getAll(names: string[]): {}
|
|
581
|
+
notify(name: string): void
|
|
582
|
+
update(name: string, newValue: any): void
|
|
583
|
+
transaction(updater: StateTransactionUpdater): void
|
|
584
|
+
publishAll(): void
|
|
585
|
+
publish(name: string): void
|
|
586
|
+
event(name: string): string
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export declare namespace state {
|
|
590
|
+
export { eventName, State, createState, Store, updaters }
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
declare type StatePublisher = (event: string, payload: any) => void
|
|
594
|
+
|
|
595
|
+
declare type StateTransactionUpdater = (collection: StoresCollection) => void
|
|
596
|
+
|
|
597
|
+
export declare type StaticTemplate = () => Renderable
|
|
598
|
+
|
|
599
|
+
export declare class Store<T> {
|
|
600
|
+
parent: State
|
|
601
|
+
name: string
|
|
602
|
+
updater: StoreUpdater<T>
|
|
603
|
+
_value: T
|
|
604
|
+
initialValue: T
|
|
605
|
+
constructor(options: StoreInitializationOptions<T>)
|
|
606
|
+
get ['value'](): T
|
|
607
|
+
set ['value'](value: T)
|
|
608
|
+
reset(): void
|
|
609
|
+
update(updater: StoreUpdaterOrValue<T>): void
|
|
610
|
+
private updateValue
|
|
611
|
+
private getUpdatedValue
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare type StoreDataUpdater<T> = (originalValue: T) => T
|
|
615
|
+
|
|
616
|
+
declare type StoreInitializationOptions<T> = {
|
|
617
|
+
name: string
|
|
618
|
+
parent: State
|
|
619
|
+
value: T
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
declare type StoreListSorterFunction<T> = (left: T, right: T) => number
|
|
623
|
+
|
|
624
|
+
declare type StoreMap = {
|
|
625
|
+
[key: string]: any
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
declare type StoresCollection = Record<string, Store<any>>
|
|
629
|
+
|
|
630
|
+
export declare type StoreUpdater<T> =
|
|
631
|
+
| StoreUpdaterBase<T>
|
|
632
|
+
| StoreUpdaterObject<T extends object ? T : never>
|
|
633
|
+
| StoreUpdaterBoolean
|
|
634
|
+
| StoreUpdaterList<T>
|
|
635
|
+
|
|
636
|
+
export declare class StoreUpdaterBase<T> {
|
|
637
|
+
store: Store<T>
|
|
638
|
+
constructor(store: Store<T>)
|
|
639
|
+
update(updater: StoreUpdaterOrValue<T>): void
|
|
640
|
+
reset(): void
|
|
641
|
+
get value(): T
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export declare class StoreUpdaterBoolean extends StoreUpdaterBase<boolean> {
|
|
645
|
+
toggle(): void
|
|
646
|
+
setTrue(): void
|
|
647
|
+
setFalse(): void
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export declare class StoreUpdaterList<T> extends StoreUpdaterBase<T[]> {
|
|
651
|
+
push(element: T): void
|
|
652
|
+
pop(): T
|
|
653
|
+
unshift(element: T): void
|
|
654
|
+
shift(): T
|
|
655
|
+
addSorter(name: string, sorter: StoreListSorterFunction<T>): void
|
|
656
|
+
sortBy(sorter: StoreListSorterFunction<T>): void
|
|
657
|
+
insertAt(index: number, item: T): void
|
|
658
|
+
remove(value: T): void
|
|
659
|
+
removeBy(matcherFunction: (value: T) => boolean): void
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export declare class StoreUpdaterObject<
|
|
663
|
+
T extends object,
|
|
664
|
+
> extends StoreUpdaterBase<T> {
|
|
665
|
+
updateAttribute(name: keyof T, value: T[keyof T]): void
|
|
666
|
+
updateDynamicAttribute(name: string, value: any): void
|
|
667
|
+
isKey(key: string): boolean
|
|
668
|
+
isValueType(key: keyof T, value: any): boolean
|
|
669
|
+
resetAttribute(name: keyof T): void
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
declare type StoreUpdaterOrValue<T> = UpdaterValue<T> | StoreDataUpdater<T>
|
|
673
|
+
|
|
674
|
+
export declare type Subscribe = (
|
|
675
|
+
matcher: BusEventMatcher,
|
|
676
|
+
listener: BusListener<any>,
|
|
677
|
+
) => void
|
|
678
|
+
|
|
679
|
+
declare const subscribeToHistoryChange: (app: App) => void
|
|
680
|
+
|
|
681
|
+
declare const subscribeToNavigation: (app: App) => void
|
|
682
|
+
|
|
683
|
+
declare type TagAttributes = SourceMap & Record<string, string>
|
|
684
|
+
|
|
685
|
+
declare type TagAttributesAndEvents = {
|
|
686
|
+
attributes: TagAttributes
|
|
687
|
+
events: TagEventAttributes
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
declare type TagEventAttributes = Record<string, string>
|
|
691
|
+
|
|
692
|
+
export declare type Template<T> = StaticTemplate | TypedTemplate<T>
|
|
693
|
+
|
|
694
|
+
declare type TextValue = string | number
|
|
695
|
+
|
|
696
|
+
export declare type TypedTemplate<T> = (props: Props<T>) => Renderable
|
|
697
|
+
|
|
698
|
+
declare type Unsubscribe = () => void
|
|
699
|
+
|
|
700
|
+
declare type UpdateEventInstructionData = {
|
|
701
|
+
name: string
|
|
702
|
+
sourceValue: EventListener
|
|
703
|
+
targetValue: EventListener
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
declare const updaters: {
|
|
707
|
+
object: <T extends Object>(store: Store<T>) => StoreUpdaterObject<T>
|
|
708
|
+
list: <T>(store: Store<T[]>) => StoreUpdaterList<T>
|
|
709
|
+
boolean: (store: Store<boolean>) => StoreUpdaterBoolean
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
declare type UpdaterValue<T> = boolean | T | T[]
|
|
713
|
+
|
|
714
|
+
declare type ViewModel<ATTRIBUTES, STORE_MAP> = (
|
|
715
|
+
storeMap: STORE_MAP,
|
|
716
|
+
) => Partial<ATTRIBUTES>
|
|
717
|
+
|
|
718
|
+
export {}
|