hyperscript-rxjs 1.3.19 → 1.3.21
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/hyperscript-rxjs.d.ts +291 -98
- package/dist/hyperscript-rxjs.js +34 -34
- package/package.json +1 -1
@@ -4,18 +4,24 @@ import { Observer as Observer_2 } from 'rxjs';
|
|
4
4
|
import { Subject } from 'rxjs';
|
5
5
|
import { Subscription } from 'rxjs';
|
6
6
|
|
7
|
-
export declare function a(props
|
7
|
+
export declare function a(props: {
|
8
8
|
[_: string]: any;
|
9
9
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLAnchorElement>;
|
10
10
|
|
11
|
-
export declare function
|
11
|
+
export declare function a(...childNodes: any[]): HyperscriptExtensions<HTMLAnchorElement>;
|
12
|
+
|
13
|
+
export declare function abbr(props: {
|
12
14
|
[_: string]: any;
|
13
15
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
14
16
|
|
15
|
-
export declare function
|
17
|
+
export declare function abbr(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
18
|
+
|
19
|
+
export declare function address(props: {
|
16
20
|
[_: string]: any;
|
17
21
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
18
22
|
|
23
|
+
export declare function address(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
24
|
+
|
19
25
|
/**
|
20
26
|
* @template T
|
21
27
|
* @param {Array<T>} array - 要处理的原数组
|
@@ -24,10 +30,12 @@ export declare function address(props?: {
|
|
24
30
|
*/
|
25
31
|
export declare function advance<T>(array: Array<T>, n: number): [Array<T>, Array<T>];
|
26
32
|
|
27
|
-
export declare function area(props
|
33
|
+
export declare function area(props: {
|
28
34
|
[_: string]: any;
|
29
35
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLAreaElement>;
|
30
36
|
|
37
|
+
export declare function area(...childNodes: any[]): HyperscriptExtensions<HTMLAreaElement>;
|
38
|
+
|
31
39
|
/**
|
32
40
|
* insert a element at position in place.
|
33
41
|
* @param {any} array
|
@@ -45,34 +53,46 @@ export declare function arrayInsert(array: any, item: any, index?: any): void;
|
|
45
53
|
*/
|
46
54
|
export declare function arrayRemove<T>(array: T[], index?: number): void;
|
47
55
|
|
48
|
-
export declare function article(props
|
56
|
+
export declare function article(props: {
|
49
57
|
[_: string]: any;
|
50
58
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
51
59
|
|
52
|
-
export declare function
|
60
|
+
export declare function article(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
61
|
+
|
62
|
+
export declare function aside(props: {
|
53
63
|
[_: string]: any;
|
54
64
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
55
65
|
|
66
|
+
export declare function aside(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
67
|
+
|
56
68
|
export declare function attachSubscriptionToNode(elem: Node & {
|
57
69
|
subscription?: Subscription;
|
58
70
|
}, subscription: Subscription): void;
|
59
71
|
|
60
|
-
export declare function audio(props
|
72
|
+
export declare function audio(props: {
|
61
73
|
[_: string]: any;
|
62
74
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLAudioElement>;
|
63
75
|
|
64
|
-
export declare function
|
76
|
+
export declare function audio(...childNodes: any[]): HyperscriptExtensions<HTMLAudioElement>;
|
77
|
+
|
78
|
+
export declare function b(props: {
|
65
79
|
[_: string]: any;
|
66
80
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
67
81
|
|
68
|
-
export declare function
|
82
|
+
export declare function b(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
83
|
+
|
84
|
+
export declare function bdi(props: {
|
69
85
|
[_: string]: any;
|
70
86
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
71
87
|
|
72
|
-
export declare function
|
88
|
+
export declare function bdi(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
89
|
+
|
90
|
+
export declare function bdo(props: {
|
73
91
|
[_: string]: any;
|
74
92
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
75
93
|
|
94
|
+
export declare function bdo(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
95
|
+
|
76
96
|
/**
|
77
97
|
* 绑定选项卡的激活状态到 `tabIndex`。
|
78
98
|
*
|
@@ -103,22 +123,30 @@ export declare function bindTabIndex(tabRoot: HTMLElement, tabIndex$: BehaviorSu
|
|
103
123
|
*/
|
104
124
|
export declare const blockLevelFamily: Set<string>;
|
105
125
|
|
106
|
-
export declare function blockquote(props
|
126
|
+
export declare function blockquote(props: {
|
107
127
|
[_: string]: any;
|
108
128
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
|
109
129
|
|
110
|
-
export declare function
|
130
|
+
export declare function blockquote(...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
|
131
|
+
|
132
|
+
export declare function br(props: {
|
111
133
|
[_: string]: any;
|
112
134
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLBRElement>;
|
113
135
|
|
114
|
-
export declare function
|
136
|
+
export declare function br(...childNodes: any[]): HyperscriptExtensions<HTMLBRElement>;
|
137
|
+
|
138
|
+
export declare function button(props: {
|
115
139
|
[_: string]: any;
|
116
140
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLButtonElement>;
|
117
141
|
|
118
|
-
export declare function
|
142
|
+
export declare function button(...childNodes: any[]): HyperscriptExtensions<HTMLButtonElement>;
|
143
|
+
|
144
|
+
export declare function caption(props: {
|
119
145
|
[_: string]: any;
|
120
146
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
121
147
|
|
148
|
+
export declare function caption(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
149
|
+
|
122
150
|
/**
|
123
151
|
* 创建一个支持 RxJS 的复选框组件。
|
124
152
|
*
|
@@ -135,24 +163,35 @@ export declare function checkbox(props: {
|
|
135
163
|
* @param {Record<string, HTMLElement | HTMLElement[]>} possibilities
|
136
164
|
* @returns {HTMLElement[]}
|
137
165
|
*/
|
138
|
-
export declare function choice(
|
166
|
+
export declare function choice(
|
167
|
+
chosen$: Observable<string>,
|
168
|
+
possibilities: Record<string, HTMLElement | HTMLElement[]>
|
169
|
+
): HTMLElement[];
|
139
170
|
|
140
|
-
export declare function cite(props
|
171
|
+
export declare function cite(props: {
|
141
172
|
[_: string]: any;
|
142
173
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
143
174
|
|
144
|
-
export declare function
|
175
|
+
export declare function cite(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
176
|
+
|
177
|
+
export declare function code(props: {
|
145
178
|
[_: string]: any;
|
146
179
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
147
180
|
|
148
|
-
export declare function
|
181
|
+
export declare function code(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
182
|
+
|
183
|
+
export declare function col(props: {
|
149
184
|
[_: string]: any;
|
150
185
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
|
151
186
|
|
152
|
-
export declare function
|
187
|
+
export declare function col(...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
|
188
|
+
|
189
|
+
export declare function colgroup(props: {
|
153
190
|
[_: string]: any;
|
154
191
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
|
155
192
|
|
193
|
+
export declare function colgroup(...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
|
194
|
+
|
156
195
|
/**
|
157
196
|
* 显示或隐藏包含的元素。
|
158
197
|
*
|
@@ -314,18 +353,24 @@ export declare function compose(...fns: ((arg: any) => any)[]): (arg: any) => an
|
|
314
353
|
|
315
354
|
export declare function cond(branches: Array<Function | [Function, Function]>): (...args: any[]) => any;
|
316
355
|
|
317
|
-
export declare function data(props
|
356
|
+
export declare function data(props: {
|
318
357
|
[_: string]: any;
|
319
358
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLDataElement>;
|
320
359
|
|
321
|
-
export declare function
|
360
|
+
export declare function data(...childNodes: any[]): HyperscriptExtensions<HTMLDataElement>;
|
361
|
+
|
362
|
+
export declare function datalist(props: {
|
322
363
|
[_: string]: any;
|
323
364
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLDataListElement>;
|
324
365
|
|
325
|
-
export declare function
|
366
|
+
export declare function datalist(...childNodes: any[]): HyperscriptExtensions<HTMLDataListElement>;
|
367
|
+
|
368
|
+
export declare function dd(props: {
|
326
369
|
[_: string]: any;
|
327
370
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
328
371
|
|
372
|
+
export declare function dd(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
373
|
+
|
329
374
|
/**
|
330
375
|
* 深度(嵌套)数据结构类,用于处理按键路径排序的键值对集合。
|
331
376
|
* 提供了多种操作方法,包括集合操作、序列操作和数据转换。
|
@@ -495,38 +540,54 @@ export declare function defaultCompare<T>(a: T, b: T): number;
|
|
495
540
|
|
496
541
|
export declare const defaultComparer: Comparer<any>;
|
497
542
|
|
498
|
-
export declare function del(props
|
543
|
+
export declare function del(props: {
|
499
544
|
[_: string]: any;
|
500
545
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
|
501
546
|
|
502
|
-
export declare function
|
547
|
+
export declare function del(...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
|
548
|
+
|
549
|
+
export declare function details(props: {
|
503
550
|
[_: string]: any;
|
504
551
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLDetailsElement>;
|
505
552
|
|
506
|
-
export declare function
|
553
|
+
export declare function details(...childNodes: any[]): HyperscriptExtensions<HTMLDetailsElement>;
|
554
|
+
|
555
|
+
export declare function dfn(props: {
|
507
556
|
[_: string]: any;
|
508
557
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
509
558
|
|
510
|
-
export declare function
|
559
|
+
export declare function dfn(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
560
|
+
|
561
|
+
export declare function dialog(props: {
|
511
562
|
[_: string]: any;
|
512
563
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLDialogElement>;
|
513
564
|
|
514
|
-
export declare function
|
565
|
+
export declare function dialog(...childNodes: any[]): HyperscriptExtensions<HTMLDialogElement>;
|
566
|
+
|
567
|
+
export declare function div(props: {
|
515
568
|
[_: string]: any;
|
516
569
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLDivElement>;
|
517
570
|
|
518
|
-
export declare function
|
571
|
+
export declare function div(...childNodes: any[]): HyperscriptExtensions<HTMLDivElement>;
|
572
|
+
|
573
|
+
export declare function dl(props: {
|
519
574
|
[_: string]: any;
|
520
575
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLDListElement>;
|
521
576
|
|
522
|
-
export declare function
|
577
|
+
export declare function dl(...childNodes: any[]): HyperscriptExtensions<HTMLDListElement>;
|
578
|
+
|
579
|
+
export declare function dt(props: {
|
523
580
|
[_: string]: any;
|
524
581
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
525
582
|
|
526
|
-
export declare function
|
583
|
+
export declare function dt(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
584
|
+
|
585
|
+
export declare function em(props: {
|
527
586
|
[_: string]: any;
|
528
587
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
529
588
|
|
589
|
+
export declare function em(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
590
|
+
|
530
591
|
export declare const entryComparer: Comparer<[(string | number)[], any]>;
|
531
592
|
|
532
593
|
/**
|
@@ -538,18 +599,24 @@ export declare const entryComparer: Comparer<[(string | number)[], any]>;
|
|
538
599
|
*/
|
539
600
|
export declare function erectObject(entries: [(string | number)[], any][]): object | any[];
|
540
601
|
|
541
|
-
export declare function fieldset(props
|
602
|
+
export declare function fieldset(props: {
|
542
603
|
[_: string]: any;
|
543
604
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLFieldSetElement>;
|
544
605
|
|
545
|
-
export declare function
|
606
|
+
export declare function fieldset(...childNodes: any[]): HyperscriptExtensions<HTMLFieldSetElement>;
|
607
|
+
|
608
|
+
export declare function figcaption(props: {
|
546
609
|
[_: string]: any;
|
547
610
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
548
611
|
|
549
|
-
export declare function
|
612
|
+
export declare function figcaption(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
613
|
+
|
614
|
+
export declare function figure(props: {
|
550
615
|
[_: string]: any;
|
551
616
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
552
617
|
|
618
|
+
export declare function figure(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
619
|
+
|
553
620
|
/**
|
554
621
|
* 查找数组中最后一个满足条件的元素索引。
|
555
622
|
*
|
@@ -591,14 +658,18 @@ export declare function flip(yinHidden$: Observable<boolean>, yin: HTMLElement |
|
|
591
658
|
*/
|
592
659
|
export declare function fold(this: any, fn: (this: any, acc: any, seed: any) => [any, any] | [any] | [] | null | undefined, acc: any, seed: any): any;
|
593
660
|
|
594
|
-
export declare function footer(props
|
661
|
+
export declare function footer(props: {
|
595
662
|
[_: string]: any;
|
596
663
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
597
664
|
|
598
|
-
export declare function
|
665
|
+
export declare function footer(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
666
|
+
|
667
|
+
export declare function form(props: {
|
599
668
|
[_: string]: any;
|
600
669
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLFormElement>;
|
601
670
|
|
671
|
+
export declare function form(...childNodes: any[]): HyperscriptExtensions<HTMLFormElement>;
|
672
|
+
|
602
673
|
/**
|
603
674
|
* 用途:插入一组元素,不必使用循环语句,fragment 用后即弃。
|
604
675
|
*
|
@@ -657,42 +728,60 @@ export declare function getNestedProperty(obj: Record<string | number, any>, key
|
|
657
728
|
*/
|
658
729
|
export declare function groupByFirstLevelKey(flatEntries: [(string | number)[], any][]): [string | number, [(string | number)[], any][]][];
|
659
730
|
|
660
|
-
export declare function h1(props
|
731
|
+
export declare function h1(props: {
|
661
732
|
[_: string]: any;
|
662
733
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
663
734
|
|
664
|
-
export declare function
|
735
|
+
export declare function h1(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
736
|
+
|
737
|
+
export declare function h2(props: {
|
665
738
|
[_: string]: any;
|
666
739
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
667
740
|
|
668
|
-
export declare function
|
741
|
+
export declare function h2(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
742
|
+
|
743
|
+
export declare function h3(props: {
|
669
744
|
[_: string]: any;
|
670
745
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
671
746
|
|
672
|
-
export declare function
|
747
|
+
export declare function h3(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
748
|
+
|
749
|
+
export declare function h4(props: {
|
673
750
|
[_: string]: any;
|
674
751
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
675
752
|
|
676
|
-
export declare function
|
753
|
+
export declare function h4(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
754
|
+
|
755
|
+
export declare function h5(props: {
|
677
756
|
[_: string]: any;
|
678
757
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
679
758
|
|
680
|
-
export declare function
|
759
|
+
export declare function h5(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
760
|
+
|
761
|
+
export declare function h6(props: {
|
681
762
|
[_: string]: any;
|
682
763
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
683
764
|
|
684
|
-
export declare function
|
765
|
+
export declare function h6(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
|
766
|
+
|
767
|
+
export declare function header(props: {
|
685
768
|
[_: string]: any;
|
686
769
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
687
770
|
|
688
|
-
export declare function
|
771
|
+
export declare function header(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
772
|
+
|
773
|
+
export declare function hgroup(props: {
|
689
774
|
[_: string]: any;
|
690
775
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
691
776
|
|
692
|
-
export declare function
|
777
|
+
export declare function hgroup(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
778
|
+
|
779
|
+
export declare function hr(props: {
|
693
780
|
[_: string]: any;
|
694
781
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLHRElement>;
|
695
782
|
|
783
|
+
export declare function hr(...childNodes: any[]): HyperscriptExtensions<HTMLHRElement>;
|
784
|
+
|
696
785
|
/**
|
697
786
|
* Creates an HTML element with extended event handling capabilities
|
698
787
|
* @public
|
@@ -730,14 +819,18 @@ export declare type HyperscriptSelectElement = HyperscriptExtensions<HTMLSelectE
|
|
730
819
|
|
731
820
|
export declare type HyperscriptTextAreaElement = HyperscriptExtensions<HTMLTextAreaElement>;
|
732
821
|
|
733
|
-
export declare function i(props
|
822
|
+
export declare function i(props: {
|
734
823
|
[_: string]: any;
|
735
824
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
736
825
|
|
737
|
-
export declare function
|
826
|
+
export declare function i(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
827
|
+
|
828
|
+
export declare function img(props: {
|
738
829
|
[_: string]: any;
|
739
830
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLImageElement>;
|
740
831
|
|
832
|
+
export declare function img(...childNodes: any[]): HyperscriptExtensions<HTMLImageElement>;
|
833
|
+
|
741
834
|
/**
|
742
835
|
* 一个包含所有 HTML 内联元素标签名称的集合。
|
743
836
|
*
|
@@ -754,14 +847,18 @@ export declare function img(props?: {
|
|
754
847
|
*/
|
755
848
|
export declare const inlineFamily: Set<string>;
|
756
849
|
|
757
|
-
export declare function input(props
|
850
|
+
export declare function input(props: {
|
758
851
|
[_: string]: any;
|
759
852
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLInputElement>;
|
760
853
|
|
761
|
-
export declare function
|
854
|
+
export declare function input(...childNodes: any[]): HyperscriptExtensions<HTMLInputElement>;
|
855
|
+
|
856
|
+
export declare function ins(props: {
|
762
857
|
[_: string]: any;
|
763
858
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
|
764
859
|
|
860
|
+
export declare function ins(...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
|
861
|
+
|
765
862
|
/**
|
766
863
|
* Creates an object composed of the picked object properties.
|
767
864
|
* @param {Record<string,any>} obj - Source object
|
@@ -800,46 +897,64 @@ export declare function isRange(keys: string[]): boolean;
|
|
800
897
|
*/
|
801
898
|
export declare function isRxType(obj: any): boolean;
|
802
899
|
|
803
|
-
export declare function kbd(props
|
900
|
+
export declare function kbd(props: {
|
804
901
|
[_: string]: any;
|
805
902
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
806
903
|
|
904
|
+
export declare function kbd(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
905
|
+
|
807
906
|
export declare const keyComparer: Comparer<string | number>;
|
808
907
|
|
809
908
|
export declare const keyPathComparer: Comparer<(string | number)[]>;
|
810
909
|
|
811
|
-
export declare function label(props
|
910
|
+
export declare function label(props: {
|
812
911
|
[_: string]: any;
|
813
912
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLLabelElement>;
|
814
913
|
|
815
|
-
export declare function
|
914
|
+
export declare function label(...childNodes: any[]): HyperscriptExtensions<HTMLLabelElement>;
|
915
|
+
|
916
|
+
export declare function legend(props: {
|
816
917
|
[_: string]: any;
|
817
918
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLLegendElement>;
|
818
919
|
|
819
|
-
export declare function
|
920
|
+
export declare function legend(...childNodes: any[]): HyperscriptExtensions<HTMLLegendElement>;
|
921
|
+
|
922
|
+
export declare function li(props: {
|
820
923
|
[_: string]: any;
|
821
924
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLLIElement>;
|
822
925
|
|
823
|
-
export declare function
|
926
|
+
export declare function li(...childNodes: any[]): HyperscriptExtensions<HTMLLIElement>;
|
927
|
+
|
928
|
+
export declare function main(props: {
|
824
929
|
[_: string]: any;
|
825
930
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
826
931
|
|
827
|
-
export declare function
|
932
|
+
export declare function main(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
933
|
+
|
934
|
+
export declare function mark(props: {
|
828
935
|
[_: string]: any;
|
829
936
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
830
937
|
|
831
|
-
export declare function
|
938
|
+
export declare function mark(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
939
|
+
|
940
|
+
export declare function menu(props: {
|
832
941
|
[_: string]: any;
|
833
942
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLMenuElement>;
|
834
943
|
|
835
|
-
export declare function
|
944
|
+
export declare function menu(...childNodes: any[]): HyperscriptExtensions<HTMLMenuElement>;
|
945
|
+
|
946
|
+
export declare function menuitem(props: {
|
836
947
|
[_: string]: any;
|
837
948
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
838
949
|
|
839
|
-
export declare function
|
950
|
+
export declare function menuitem(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
951
|
+
|
952
|
+
export declare function meter(props: {
|
840
953
|
[_: string]: any;
|
841
954
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLMeterElement>;
|
842
955
|
|
956
|
+
export declare function meter(...childNodes: any[]): HyperscriptExtensions<HTMLMeterElement>;
|
957
|
+
|
843
958
|
/**
|
844
959
|
* 创建一个支持多选功能的 <select> 元素,并绑定选项的选中状态。必须手动添加控件更新BehaviorSubject的事件。
|
845
960
|
*
|
@@ -856,10 +971,12 @@ export declare function multiselect(props: {
|
|
856
971
|
[key: string]: any;
|
857
972
|
}, ...options: HTMLOptionElement[]): HyperscriptSelectElement;
|
858
973
|
|
859
|
-
export declare function nav(props
|
974
|
+
export declare function nav(props: {
|
860
975
|
[_: string]: any;
|
861
976
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
862
977
|
|
978
|
+
export declare function nav(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
979
|
+
|
863
980
|
/**
|
864
981
|
*
|
865
982
|
* @param {Record<string|number, any>} model
|
@@ -962,26 +1079,36 @@ export declare type ObservableTextNode = Text & {
|
|
962
1079
|
|
963
1080
|
export declare type Observer<T> = Observer_2<T>;
|
964
1081
|
|
965
|
-
export declare function ol(props
|
1082
|
+
export declare function ol(props: {
|
966
1083
|
[_: string]: any;
|
967
1084
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLOListElement>;
|
968
1085
|
|
969
|
-
export declare function
|
1086
|
+
export declare function ol(...childNodes: any[]): HyperscriptExtensions<HTMLOListElement>;
|
1087
|
+
|
1088
|
+
export declare function optgroup(props: {
|
970
1089
|
[_: string]: any;
|
971
1090
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLOptGroupElement>;
|
972
1091
|
|
973
|
-
export declare function
|
1092
|
+
export declare function optgroup(...childNodes: any[]): HyperscriptExtensions<HTMLOptGroupElement>;
|
1093
|
+
|
1094
|
+
export declare function option(props: {
|
974
1095
|
[_: string]: any;
|
975
1096
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLOptionElement>;
|
976
1097
|
|
977
|
-
export declare function
|
1098
|
+
export declare function option(...childNodes: any[]): HyperscriptExtensions<HTMLOptionElement>;
|
1099
|
+
|
1100
|
+
export declare function output(props: {
|
978
1101
|
[_: string]: any;
|
979
1102
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLOutputElement>;
|
980
1103
|
|
981
|
-
export declare function
|
1104
|
+
export declare function output(...childNodes: any[]): HyperscriptExtensions<HTMLOutputElement>;
|
1105
|
+
|
1106
|
+
export declare function p(props: {
|
982
1107
|
[_: string]: any;
|
983
1108
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLParagraphElement>;
|
984
1109
|
|
1110
|
+
export declare function p(...childNodes: any[]): HyperscriptExtensions<HTMLParagraphElement>;
|
1111
|
+
|
985
1112
|
/**
|
986
1113
|
* 解析 hyperscript 风格的参数,返回 props 和 childNodes。
|
987
1114
|
*
|
@@ -1008,7 +1135,7 @@ export declare function parsePropName(props: string, obj: Record<string, any>):
|
|
1008
1135
|
*
|
1009
1136
|
* 拾取对象中的BehaviorSubject值,作爲葉子節點,忽略其他值。
|
1010
1137
|
*
|
1011
|
-
* @param {Record<string|number,any> & { pickeys?: string [] }} model - 输入的数据结构,可以是对象、数组或BehaviorSubject
|
1138
|
+
* @param {Record<string|number,any> & { pickeys?: () => string [] }} model - 输入的数据结构,可以是对象、数组或BehaviorSubject
|
1012
1139
|
* @returns {Record<string|number,any>} - 返回只包含BehaviorSubject当前值的结构
|
1013
1140
|
* @throws {Error} 当输入不包含任何BehaviorSubject或结构不符合预期时抛出错误
|
1014
1141
|
*/
|
@@ -1036,18 +1163,24 @@ export declare function pipeEvent(elem: HTMLElement): (e: string, s: (event$: Ob
|
|
1036
1163
|
*/
|
1037
1164
|
export declare function pluckProperty(obj: Record<string | number, any>, keyPath: (string | number)[]): any;
|
1038
1165
|
|
1039
|
-
export declare function pre(props
|
1166
|
+
export declare function pre(props: {
|
1040
1167
|
[_: string]: any;
|
1041
1168
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLPreElement>;
|
1042
1169
|
|
1043
|
-
export declare function
|
1170
|
+
export declare function pre(...childNodes: any[]): HyperscriptExtensions<HTMLPreElement>;
|
1171
|
+
|
1172
|
+
export declare function progress(props: {
|
1044
1173
|
[_: string]: any;
|
1045
1174
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLProgressElement>;
|
1046
1175
|
|
1047
|
-
export declare function
|
1176
|
+
export declare function progress(...childNodes: any[]): HyperscriptExtensions<HTMLProgressElement>;
|
1177
|
+
|
1178
|
+
export declare function q(props: {
|
1048
1179
|
[_: string]: any;
|
1049
1180
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
|
1050
1181
|
|
1182
|
+
export declare function q(...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
|
1183
|
+
|
1051
1184
|
/**
|
1052
1185
|
* 将对象序列化为 URL 查询字符串(支持嵌套对象和多类型字段)。
|
1053
1186
|
*
|
@@ -1077,10 +1210,12 @@ export declare function radio(props: {
|
|
1077
1210
|
*/
|
1078
1211
|
export declare function rangeArray(length: number): number[];
|
1079
1212
|
|
1080
|
-
export declare function rb(props
|
1213
|
+
export declare function rb(props: {
|
1081
1214
|
[_: string]: any;
|
1082
1215
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1083
1216
|
|
1217
|
+
export declare function rb(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1218
|
+
|
1084
1219
|
/**
|
1085
1220
|
* Updates a reactive model with new values from a source object.
|
1086
1221
|
* Recursively synchronizes BehaviorSubject, ObservableArray, array and object contents.
|
@@ -1091,34 +1226,48 @@ export declare function rb(props?: {
|
|
1091
1226
|
*/
|
1092
1227
|
export declare function restore(model: Record<string | number, any>, src: Record<string | number, any>): void;
|
1093
1228
|
|
1094
|
-
export declare function rp(props
|
1229
|
+
export declare function rp(props: {
|
1095
1230
|
[_: string]: any;
|
1096
1231
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1097
1232
|
|
1098
|
-
export declare function
|
1233
|
+
export declare function rp(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1234
|
+
|
1235
|
+
export declare function rt(props: {
|
1099
1236
|
[_: string]: any;
|
1100
1237
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1101
1238
|
|
1102
|
-
export declare function
|
1239
|
+
export declare function rt(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1240
|
+
|
1241
|
+
export declare function rtc(props: {
|
1103
1242
|
[_: string]: any;
|
1104
1243
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1105
1244
|
|
1106
|
-
export declare function
|
1245
|
+
export declare function rtc(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1246
|
+
|
1247
|
+
export declare function ruby(props: {
|
1107
1248
|
[_: string]: any;
|
1108
1249
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1109
1250
|
|
1110
|
-
export declare function
|
1251
|
+
export declare function ruby(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1252
|
+
|
1253
|
+
export declare function s(props: {
|
1111
1254
|
[_: string]: any;
|
1112
1255
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1113
1256
|
|
1114
|
-
export declare function
|
1257
|
+
export declare function s(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1258
|
+
|
1259
|
+
export declare function samp(props: {
|
1115
1260
|
[_: string]: any;
|
1116
1261
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1117
1262
|
|
1118
|
-
export declare function
|
1263
|
+
export declare function samp(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1264
|
+
|
1265
|
+
export declare function section(props: {
|
1119
1266
|
[_: string]: any;
|
1120
1267
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1121
1268
|
|
1269
|
+
export declare function section(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1270
|
+
|
1122
1271
|
/**
|
1123
1272
|
* 创建一个支持 RxJS 数据绑定的 <select> 元素。仅单选选择框。
|
1124
1273
|
*
|
@@ -1156,14 +1305,18 @@ export declare function setProp(root: HTMLElement, key: string, value: any): HTM
|
|
1156
1305
|
*/
|
1157
1306
|
export declare function setProps(element: HTMLElement, props: Object): HTMLElement;
|
1158
1307
|
|
1159
|
-
export declare function small(props
|
1308
|
+
export declare function small(props: {
|
1160
1309
|
[_: string]: any;
|
1161
1310
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1162
1311
|
|
1163
|
-
export declare function
|
1312
|
+
export declare function small(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1313
|
+
|
1314
|
+
export declare function span(props: {
|
1164
1315
|
[_: string]: any;
|
1165
1316
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLSpanElement>;
|
1166
1317
|
|
1318
|
+
export declare function span(...childNodes: any[]): HyperscriptExtensions<HTMLSpanElement>;
|
1319
|
+
|
1167
1320
|
/**
|
1168
1321
|
* 将对象属性按类型分为两部分:可观察对象(Observable)与普通值(非 Observable)。
|
1169
1322
|
*
|
@@ -1173,14 +1326,18 @@ export declare function span(props?: {
|
|
1173
1326
|
*/
|
1174
1327
|
export declare function splitObjectByObservable(obj: Record<string, any>): [Record<string, Observable<any>>, Record<string, any>];
|
1175
1328
|
|
1176
|
-
export declare function strong(props
|
1329
|
+
export declare function strong(props: {
|
1177
1330
|
[_: string]: any;
|
1178
1331
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1179
1332
|
|
1180
|
-
export declare function
|
1333
|
+
export declare function strong(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1334
|
+
|
1335
|
+
export declare function sub(props: {
|
1181
1336
|
[_: string]: any;
|
1182
1337
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1183
1338
|
|
1339
|
+
export declare function sub(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1340
|
+
|
1184
1341
|
/**
|
1185
1342
|
* @template T
|
1186
1343
|
* @typedef { import('rxjs').Observer<T> } Observer
|
@@ -1208,14 +1365,18 @@ export declare function subscribeEvent(elem: HTMLElement): (e: string, o: ((valu
|
|
1208
1365
|
*/
|
1209
1366
|
export declare function subscribeProp<T>(element: HTMLElement, key: string, value$: Observable<T>): HTMLElement;
|
1210
1367
|
|
1211
|
-
export declare function summary(props
|
1368
|
+
export declare function summary(props: {
|
1212
1369
|
[_: string]: any;
|
1213
1370
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1214
1371
|
|
1215
|
-
export declare function
|
1372
|
+
export declare function summary(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1373
|
+
|
1374
|
+
export declare function sup(props: {
|
1216
1375
|
[_: string]: any;
|
1217
1376
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1218
1377
|
|
1378
|
+
export declare function sup(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1379
|
+
|
1219
1380
|
/**
|
1220
1381
|
* 创建静态选项卡组件。
|
1221
1382
|
*
|
@@ -1227,15 +1388,21 @@ export declare function sup(props?: {
|
|
1227
1388
|
* @param {Array<string|HTMLElement>} panels - 内容面板的内容数组,可以是字符串或 HTML 元素。
|
1228
1389
|
* @returns {HTMLElement} - 返回一个包含导航栏和内容面板的选项卡组件。
|
1229
1390
|
*/
|
1230
|
-
export declare function tabControl(
|
1391
|
+
export declare function tabControl(
|
1392
|
+
props: {
|
1231
1393
|
tabIndex: BehaviorSubject<number>;
|
1232
1394
|
[key: string]: any;
|
1233
|
-
},
|
1395
|
+
},
|
1396
|
+
tabs: Array<string | HTMLElement>,
|
1397
|
+
panels: Array<string | HTMLElement>
|
1398
|
+
): HTMLElement;
|
1234
1399
|
|
1235
|
-
export declare function table(props
|
1400
|
+
export declare function table(props: {
|
1236
1401
|
[_: string]: any;
|
1237
1402
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableElement>;
|
1238
1403
|
|
1404
|
+
export declare function table(...childNodes: any[]): HyperscriptExtensions<HTMLTableElement>;
|
1405
|
+
|
1239
1406
|
/**
|
1240
1407
|
* 选项卡的导航按钮。
|
1241
1408
|
*
|
@@ -1270,14 +1437,18 @@ export declare function tabPanel(...source: (string | HTMLElement)[]): HTMLEleme
|
|
1270
1437
|
*/
|
1271
1438
|
export declare function tabRoot(props: Object): HTMLElement;
|
1272
1439
|
|
1273
|
-
export declare function tbody(props
|
1440
|
+
export declare function tbody(props: {
|
1274
1441
|
[_: string]: any;
|
1275
1442
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
|
1276
1443
|
|
1277
|
-
export declare function
|
1444
|
+
export declare function tbody(...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
|
1445
|
+
|
1446
|
+
export declare function td(props: {
|
1278
1447
|
[_: string]: any;
|
1279
1448
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
|
1280
1449
|
|
1450
|
+
export declare function td(...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
|
1451
|
+
|
1281
1452
|
/**
|
1282
1453
|
* 创建一个支持 RxJS 数据绑定的 <textarea> 元素。
|
1283
1454
|
*
|
@@ -1313,28 +1484,36 @@ export declare function textbox(props: {
|
|
1313
1484
|
* - 如果传入的是 RxJS Observable,则创建一个动态文本节点,并根据 Observable 的值实时更新文本内容。
|
1314
1485
|
* - 动态文本节点支持通过 `unsubscribe` 方法取消订阅。
|
1315
1486
|
*
|
1316
|
-
* @param {any} text Observable<any> | any
|
1487
|
+
* @param {any} text (Observable<any> | any) 任何类型数据都会被转换成string
|
1317
1488
|
* @returns {ObservableTextNode}
|
1318
1489
|
*
|
1319
1490
|
*/
|
1320
1491
|
export declare function textNode(text: any): ObservableTextNode;
|
1321
1492
|
|
1322
|
-
export declare function tfoot(props
|
1493
|
+
export declare function tfoot(props: {
|
1323
1494
|
[_: string]: any;
|
1324
1495
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
|
1325
1496
|
|
1326
|
-
export declare function
|
1497
|
+
export declare function tfoot(...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
|
1498
|
+
|
1499
|
+
export declare function th(props: {
|
1327
1500
|
[_: string]: any;
|
1328
1501
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
|
1329
1502
|
|
1330
|
-
export declare function
|
1503
|
+
export declare function th(...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
|
1504
|
+
|
1505
|
+
export declare function thead(props: {
|
1331
1506
|
[_: string]: any;
|
1332
1507
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
|
1333
1508
|
|
1334
|
-
export declare function
|
1509
|
+
export declare function thead(...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
|
1510
|
+
|
1511
|
+
export declare function time(props: {
|
1335
1512
|
[_: string]: any;
|
1336
1513
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTimeElement>;
|
1337
1514
|
|
1515
|
+
export declare function time(...childNodes: any[]): HyperscriptExtensions<HTMLTimeElement>;
|
1516
|
+
|
1338
1517
|
/**
|
1339
1518
|
* 将扁平化的键值对数组转换为嵌套的 JavaScript 对象或数组。
|
1340
1519
|
*
|
@@ -1345,28 +1524,38 @@ export declare function time(props?: {
|
|
1345
1524
|
*/
|
1346
1525
|
export declare function tojs(flatEntries: [(string | number)[], any][]): Record<string | number, any>;
|
1347
1526
|
|
1348
|
-
export declare function tr(props
|
1527
|
+
export declare function tr(props: {
|
1349
1528
|
[_: string]: any;
|
1350
1529
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTableRowElement>;
|
1351
1530
|
|
1352
|
-
export declare function
|
1531
|
+
export declare function tr(...childNodes: any[]): HyperscriptExtensions<HTMLTableRowElement>;
|
1532
|
+
|
1533
|
+
export declare function track(props: {
|
1353
1534
|
[_: string]: any;
|
1354
1535
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLTrackElement>;
|
1355
1536
|
|
1356
|
-
export declare function
|
1537
|
+
export declare function track(...childNodes: any[]): HyperscriptExtensions<HTMLTrackElement>;
|
1538
|
+
|
1539
|
+
export declare function tt(props: {
|
1357
1540
|
[_: string]: any;
|
1358
1541
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1359
1542
|
|
1543
|
+
export declare function tt(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1544
|
+
|
1360
1545
|
export declare const types: string[];
|
1361
1546
|
|
1362
|
-
export declare function u(props
|
1547
|
+
export declare function u(props: {
|
1363
1548
|
[_: string]: any;
|
1364
1549
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1365
1550
|
|
1366
|
-
export declare function
|
1551
|
+
export declare function u(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1552
|
+
|
1553
|
+
export declare function ul(props: {
|
1367
1554
|
[_: string]: any;
|
1368
1555
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLUListElement>;
|
1369
1556
|
|
1557
|
+
export declare function ul(...childNodes: any[]): HyperscriptExtensions<HTMLUListElement>;
|
1558
|
+
|
1370
1559
|
/**
|
1371
1560
|
* 通过不断调用 fn 生成值,直到 fn 返回 falsy。
|
1372
1561
|
*
|
@@ -1397,14 +1586,18 @@ export declare function unquotedJsonStringify(value: any): string;
|
|
1397
1586
|
*/
|
1398
1587
|
export declare function unwrapArgs<T>(args: (T | T[])[]): T[];
|
1399
1588
|
|
1400
|
-
export declare function video(props
|
1589
|
+
export declare function video(props: {
|
1401
1590
|
[_: string]: any;
|
1402
1591
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLVideoElement>;
|
1403
1592
|
|
1404
|
-
export declare function
|
1593
|
+
export declare function video(...childNodes: any[]): HyperscriptExtensions<HTMLVideoElement>;
|
1594
|
+
|
1595
|
+
export declare function wbr(props: {
|
1405
1596
|
[_: string]: any;
|
1406
1597
|
}, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1407
1598
|
|
1599
|
+
export declare function wbr(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
|
1600
|
+
|
1408
1601
|
/**
|
1409
1602
|
* 合并两个数组为一个元组数组。
|
1410
1603
|
*
|
package/dist/hyperscript-rxjs.js
CHANGED
@@ -6,23 +6,23 @@
|
|
6
6
|
else if(typeof exports === 'object')
|
7
7
|
exports["hyperscriptRxjs"] = factory(require("rxjs"), require("rxjs/operators"));
|
8
8
|
else
|
9
|
-
root["hyperscriptRxjs"] = factory(root[
|
10
|
-
})(self, (
|
9
|
+
root["hyperscriptRxjs"] = factory(root["rxjs"], root["rxjs"]);
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__968__, __WEBPACK_EXTERNAL_MODULE__506__) => {
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
12
12
|
/******/ "use strict";
|
13
13
|
/******/ var __webpack_modules__ = ({
|
14
14
|
|
15
|
-
/***/
|
15
|
+
/***/ 506:
|
16
16
|
/***/ ((module) => {
|
17
17
|
|
18
|
-
module.exports =
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__506__;
|
19
19
|
|
20
20
|
/***/ }),
|
21
21
|
|
22
|
-
/***/
|
22
|
+
/***/ 968:
|
23
23
|
/***/ ((module) => {
|
24
24
|
|
25
|
-
module.exports =
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__968__;
|
26
26
|
|
27
27
|
/***/ })
|
28
28
|
|
@@ -1042,8 +1042,8 @@ const types = ["undefined",
|
|
1042
1042
|
|
1043
1043
|
|
1044
1044
|
|
1045
|
-
// EXTERNAL MODULE: external {"commonjs":"rxjs","commonjs2":"rxjs","amd":"rxjs"}
|
1046
|
-
var
|
1045
|
+
// EXTERNAL MODULE: external {"commonjs":"rxjs","commonjs2":"rxjs","amd":"rxjs","root":"rxjs"}
|
1046
|
+
var external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_ = __webpack_require__(968);
|
1047
1047
|
// EXTERNAL MODULE: external {"commonjs":"rxjs/operators","commonjs2":"rxjs/operators","amd":"rxjs/operators","root":"rxjs"}
|
1048
1048
|
var operators_root_rxjs_ = __webpack_require__(506);
|
1049
1049
|
;// ./src/object/pluckProperty.js
|
@@ -1439,7 +1439,7 @@ class Deep {
|
|
1439
1439
|
*/
|
1440
1440
|
combineLatest() {
|
1441
1441
|
let values = this.getValues();
|
1442
|
-
return (0,
|
1442
|
+
return (0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.combineLatest)(values).pipe((0,operators_root_rxjs_.map)(values => this.replaceValue(values)));
|
1443
1443
|
}
|
1444
1444
|
|
1445
1445
|
/**
|
@@ -1449,7 +1449,7 @@ class Deep {
|
|
1449
1449
|
* @returns {Observable<[(string|number)[], U]>}
|
1450
1450
|
*/
|
1451
1451
|
merge() {
|
1452
|
-
return (0,
|
1452
|
+
return (0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.from)(this.entries).pipe((0,operators_root_rxjs_.mergeMap)(([keyPath, value$]) => value$.pipe((0,operators_root_rxjs_.map)(
|
1453
1453
|
/**
|
1454
1454
|
* @returns {[(string|number)[], U]}
|
1455
1455
|
*/
|
@@ -1476,7 +1476,7 @@ class Deep {
|
|
1476
1476
|
* @returns {Deep<BehaviorSubject<T>>}
|
1477
1477
|
*/
|
1478
1478
|
static fromBehaviorSubject(obj) {
|
1479
|
-
return Deep.fromObject(obj, v => (0,
|
1479
|
+
return Deep.fromObject(obj, v => (0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.isObservable)(v) || v instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.Subscription).filter(([k, v]) => v instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject);
|
1480
1480
|
}
|
1481
1481
|
|
1482
1482
|
/**
|
@@ -1485,7 +1485,7 @@ class Deep {
|
|
1485
1485
|
* @returns
|
1486
1486
|
*/
|
1487
1487
|
static fromObservable(obj) {
|
1488
|
-
return Deep.fromObject(obj, v => (0,
|
1488
|
+
return Deep.fromObject(obj, v => (0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.isObservable)(v) || v instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.Subscription).filter(([k, v]) => (0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.isObservable)(v));
|
1489
1489
|
}
|
1490
1490
|
}
|
1491
1491
|
;// ./src/deep/0.js
|
@@ -1503,7 +1503,7 @@ class Deep {
|
|
1503
1503
|
*
|
1504
1504
|
*/
|
1505
1505
|
function isRxType(obj) {
|
1506
|
-
return typeof obj === 'object' && obj && ((0,
|
1506
|
+
return typeof obj === 'object' && obj && ((0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.isObservable)(obj) || obj instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.Subscription);
|
1507
1507
|
}
|
1508
1508
|
;// ./src/deep-rxjs/ObservableArray.js
|
1509
1509
|
|
@@ -1531,7 +1531,7 @@ class ObservableArray extends Array {
|
|
1531
1531
|
* 变化通知的 Subject。
|
1532
1532
|
* @type {Subject<any[]>}
|
1533
1533
|
*/
|
1534
|
-
this.action$ = new
|
1534
|
+
this.action$ = new external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.Subject();
|
1535
1535
|
|
1536
1536
|
/**
|
1537
1537
|
* 插入元素事件流,发出 [item, index]。
|
@@ -1694,7 +1694,7 @@ const attachSubscriptionToNode = (elem, subscription) => {
|
|
1694
1694
|
if (!(elem instanceof Node)) {
|
1695
1695
|
throw new Error('Valid DOM node required');
|
1696
1696
|
}
|
1697
|
-
if (!(subscription instanceof
|
1697
|
+
if (!(subscription instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.Subscription)) {
|
1698
1698
|
throw new Error('Valid RxJS subscription required');
|
1699
1699
|
}
|
1700
1700
|
|
@@ -1737,7 +1737,7 @@ function pipeEvent(elem) {
|
|
1737
1737
|
if (typeof subscriber !== 'function') {
|
1738
1738
|
throw new Error('参数 "subscriber" 必须是一个函数。');
|
1739
1739
|
}
|
1740
|
-
let event$ = (0,
|
1740
|
+
let event$ = (0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.fromEvent)(elem, event); // 创建事件流 Observable
|
1741
1741
|
|
1742
1742
|
try {
|
1743
1743
|
let subscription = subscriber(event$); // 订阅事件流并处理
|
@@ -1790,7 +1790,7 @@ function subscribeEvent(elem) {
|
|
1790
1790
|
}
|
1791
1791
|
|
1792
1792
|
// 创建事件流 Observable
|
1793
|
-
let event$ = (0,
|
1793
|
+
let event$ = (0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.fromEvent)(elem, event);
|
1794
1794
|
|
1795
1795
|
// 订阅事件流
|
1796
1796
|
let subscription;
|
@@ -1919,7 +1919,7 @@ function splitObjectByObservable(obj) {
|
|
1919
1919
|
let value = obj[key];
|
1920
1920
|
|
1921
1921
|
// 根据值的类型分类
|
1922
|
-
if ((0,
|
1922
|
+
if ((0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.isObservable)(value)) {
|
1923
1923
|
observables[key] = value; // 如果是 Observable,存入 observables
|
1924
1924
|
} else {
|
1925
1925
|
scalars[key] = value; // 否则存入 scalars
|
@@ -2064,7 +2064,7 @@ function subscribeProp(element, key, value$) {
|
|
2064
2064
|
if (typeof key !== 'string') {
|
2065
2065
|
throw new Error('参数 "key" 必须是一个字符串。');
|
2066
2066
|
}
|
2067
|
-
if (!(0,
|
2067
|
+
if (!(0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.isObservable)(value$)) {
|
2068
2068
|
throw new Error('参数 "value$" 必须是一个有效的 Observable。');
|
2069
2069
|
}
|
2070
2070
|
|
@@ -2191,7 +2191,7 @@ function hyperscript(elemName, ...args) {
|
|
2191
2191
|
return subscribeEvent(element)(event, observer);
|
2192
2192
|
},
|
2193
2193
|
unsubscribe() {
|
2194
|
-
if ('subscription' in element && element.subscription instanceof
|
2194
|
+
if ('subscription' in element && element.subscription instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.Subscription) {
|
2195
2195
|
element.subscription.unsubscribe(); // 取消订阅
|
2196
2196
|
delete element.subscription; // 删除属性
|
2197
2197
|
}
|
@@ -3140,7 +3140,7 @@ function checkbox_checkbox(props) {
|
|
3140
3140
|
});
|
3141
3141
|
|
3142
3142
|
// 如果传入了 checked 属性
|
3143
|
-
if (
|
3143
|
+
if ('checked' in props && props.checked instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
3144
3144
|
// 监听复选框的 input 事件,并将选中状态推送到 Observable/Subject
|
3145
3145
|
let subscriber =
|
3146
3146
|
/**
|
@@ -3332,7 +3332,7 @@ function numberbox(props) {
|
|
3332
3332
|
...rest,
|
3333
3333
|
type: 'text'
|
3334
3334
|
});
|
3335
|
-
if (number && number instanceof
|
3335
|
+
if (number && number instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
3336
3336
|
let value = number.pipe((0,operators_root_rxjs_.map)(n => String(n)));
|
3337
3337
|
subscribeProp(elem, 'value', value);
|
3338
3338
|
let subscriber =
|
@@ -3392,7 +3392,7 @@ function radio_radio(props) {
|
|
3392
3392
|
...props,
|
3393
3393
|
type: 'radio'
|
3394
3394
|
});
|
3395
|
-
if (props.checked && props.checked instanceof
|
3395
|
+
if (props.checked && props.checked instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
3396
3396
|
const subscriber =
|
3397
3397
|
/**
|
3398
3398
|
*
|
@@ -3450,10 +3450,10 @@ function select_select(props, ...options) {
|
|
3450
3450
|
} = props;
|
3451
3451
|
|
3452
3452
|
// 确保至少有一个是 BehaviorSubject
|
3453
|
-
if (elem.options.length > 0 && !(selectedIndex instanceof
|
3453
|
+
if (elem.options.length > 0 && !(selectedIndex instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) && !(value instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject)) {
|
3454
3454
|
throw new Error('`select` requires at least one of `selectedIndex` or `value` to be a BehaviorSubject.');
|
3455
3455
|
}
|
3456
|
-
if (selectedIndex && selectedIndex instanceof
|
3456
|
+
if (selectedIndex && selectedIndex instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
3457
3457
|
selectedIndex.subscribe(i => {
|
3458
3458
|
/** @type {HTMLOptionElement} */
|
3459
3459
|
elem[i].selected = true;
|
@@ -3469,7 +3469,7 @@ function select_select(props, ...options) {
|
|
3469
3469
|
// let subscription = subscriber(event$);
|
3470
3470
|
// attachSubscriptionToNode(elem, subscription);
|
3471
3471
|
}
|
3472
|
-
if (value && value instanceof
|
3472
|
+
if (value && value instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
3473
3473
|
value.subscribe(value => {
|
3474
3474
|
Array.from(elem.getElementsByTagName('option')).filter(opt => opt.value === value).forEach(opt => {
|
3475
3475
|
opt.selected = true;
|
@@ -3513,7 +3513,7 @@ function textarea_textarea(props) {
|
|
3513
3513
|
const {
|
3514
3514
|
value
|
3515
3515
|
} = props;
|
3516
|
-
if (!(value instanceof
|
3516
|
+
if (!(value instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject)) {
|
3517
3517
|
throw new Error('`value` must be an instance of BehaviorSubject.');
|
3518
3518
|
}
|
3519
3519
|
|
@@ -3555,7 +3555,7 @@ function textbox(props) {
|
|
3555
3555
|
const {
|
3556
3556
|
value
|
3557
3557
|
} = props;
|
3558
|
-
if (!(value instanceof
|
3558
|
+
if (!(value instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject)) {
|
3559
3559
|
throw new Error('`value` must be an instance of BehaviorSubject.');
|
3560
3560
|
}
|
3561
3561
|
|
@@ -3591,13 +3591,13 @@ function textbox(props) {
|
|
3591
3591
|
* - 如果传入的是 RxJS Observable,则创建一个动态文本节点,并根据 Observable 的值实时更新文本内容。
|
3592
3592
|
* - 动态文本节点支持通过 `unsubscribe` 方法取消订阅。
|
3593
3593
|
*
|
3594
|
-
* @param {any} text Observable<any> | any
|
3594
|
+
* @param {any} text Observable<any> | any 任何类型数据都会被转换成string
|
3595
3595
|
* @returns {ObservableTextNode}
|
3596
3596
|
*
|
3597
3597
|
*/
|
3598
3598
|
function textNode(text) {
|
3599
3599
|
// 如果传入的是 Observable
|
3600
|
-
if ((0,
|
3600
|
+
if ((0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.isObservable)(text)) {
|
3601
3601
|
const node = document.createTextNode("");
|
3602
3602
|
|
3603
3603
|
// 创建订阅并更新文本节点
|
@@ -3733,8 +3733,8 @@ function nestedMerge(model) {
|
|
3733
3733
|
/**
|
3734
3734
|
*
|
3735
3735
|
* 拾取对象中的BehaviorSubject值,作爲葉子節點,忽略其他值。
|
3736
|
-
*
|
3737
|
-
* @param {Record<string|number,any> & { pickeys?: string [] }} model - 输入的数据结构,可以是对象、数组或BehaviorSubject
|
3736
|
+
* @public
|
3737
|
+
* @param {Record<string|number,any> & { pickeys?: () => string [] }} model - 输入的数据结构,可以是对象、数组或BehaviorSubject
|
3738
3738
|
* @returns {Record<string|number,any>} - 返回只包含BehaviorSubject当前值的结构
|
3739
3739
|
* @throws {Error} 当输入不包含任何BehaviorSubject或结构不符合预期时抛出错误
|
3740
3740
|
*/
|
@@ -3758,7 +3758,7 @@ function pickBehaviorSubject(model) {
|
|
3758
3758
|
* @throws {Error} 当遇到不符合要求的数据结构时抛出错误
|
3759
3759
|
*/
|
3760
3760
|
function loop(value, key, parent) {
|
3761
|
-
if ((0,
|
3761
|
+
if ((0,external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.isObservable)(value) && value instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
3762
3762
|
return [[key, value.value]]; //保存葉節點
|
3763
3763
|
} else if (value === null || typeof value !== 'object' || isRxType(value)) {
|
3764
3764
|
return [];
|
@@ -3826,7 +3826,7 @@ function restore(model, src) {
|
|
3826
3826
|
* @param {any} src - Corresponding source value
|
3827
3827
|
*/
|
3828
3828
|
function restore_loop(o, src) {
|
3829
|
-
if (o instanceof
|
3829
|
+
if (o instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
3830
3830
|
// Input value
|
3831
3831
|
o.next(src);
|
3832
3832
|
} else if (o === null || typeof o !== 'object' || isRxType(o)) {
|
package/package.json
CHANGED