hyperscript-rxjs 1.3.23 → 1.3.25

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.
@@ -6,21 +6,21 @@ import { Subscription } from 'rxjs';
6
6
 
7
7
  export declare function a(props: {
8
8
  [_: string]: any;
9
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLAnchorElement>;
9
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLAnchorElement>;
10
10
 
11
- export declare function a(...childNodes: any[]): HyperscriptExtensions<HTMLAnchorElement>;
11
+ export declare function a(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLAnchorElement>;
12
12
 
13
13
  export declare function abbr(props: {
14
14
  [_: string]: any;
15
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
15
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
16
16
 
17
- export declare function abbr(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
17
+ export declare function abbr(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
18
18
 
19
19
  export declare function address(props: {
20
20
  [_: string]: any;
21
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
21
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
22
22
 
23
- export declare function address(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
23
+ export declare function address(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
24
24
 
25
25
  /**
26
26
  * @template T
@@ -32,9 +32,7 @@ export declare function advance<T>(array: Array<T>, n: number): [Array<T>, Array
32
32
 
33
33
  export declare function area(props: {
34
34
  [_: string]: any;
35
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLAreaElement>;
36
-
37
- export declare function area(...childNodes: any[]): HyperscriptExtensions<HTMLAreaElement>;
35
+ }): HyperscriptExtensions<HTMLAreaElement>;
38
36
 
39
37
  /**
40
38
  * insert a element at position in place.
@@ -55,15 +53,15 @@ export declare function arrayRemove<T>(array: T[], index?: number): void;
55
53
 
56
54
  export declare function article(props: {
57
55
  [_: string]: any;
58
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
56
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
59
57
 
60
- export declare function article(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
58
+ export declare function article(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
61
59
 
62
60
  export declare function aside(props: {
63
61
  [_: string]: any;
64
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
62
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
65
63
 
66
- export declare function aside(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
64
+ export declare function aside(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
67
65
 
68
66
  export declare function attachSubscriptionToNode(elem: Node & {
69
67
  subscription?: Subscription;
@@ -71,27 +69,27 @@ export declare function attachSubscriptionToNode(elem: Node & {
71
69
 
72
70
  export declare function audio(props: {
73
71
  [_: string]: any;
74
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLAudioElement>;
72
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLAudioElement>;
75
73
 
76
- export declare function audio(...childNodes: any[]): HyperscriptExtensions<HTMLAudioElement>;
74
+ export declare function audio(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLAudioElement>;
77
75
 
78
76
  export declare function b(props: {
79
77
  [_: string]: any;
80
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
78
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
81
79
 
82
- export declare function b(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
80
+ export declare function b(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
83
81
 
84
82
  export declare function bdi(props: {
85
83
  [_: string]: any;
86
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
84
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
87
85
 
88
- export declare function bdi(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
86
+ export declare function bdi(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
89
87
 
90
88
  export declare function bdo(props: {
91
89
  [_: string]: any;
92
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
90
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
93
91
 
94
- export declare function bdo(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
92
+ export declare function bdo(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
95
93
 
96
94
  /**
97
95
  * 绑定选项卡的激活状态到 `tabIndex`。
@@ -125,27 +123,23 @@ export declare const blockLevelFamily: Set<string>;
125
123
 
126
124
  export declare function blockquote(props: {
127
125
  [_: string]: any;
128
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
129
-
130
- export declare function blockquote(...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
126
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLQuoteElement>;
131
127
 
132
- export declare function br(props: {
133
- [_: string]: any;
134
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLBRElement>;
128
+ export declare function blockquote(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLQuoteElement>;
135
129
 
136
- export declare function br(...childNodes: any[]): HyperscriptExtensions<HTMLBRElement>;
130
+ export declare function br(): HyperscriptExtensions<HTMLBRElement>;
137
131
 
138
132
  export declare function button(props: {
139
133
  [_: string]: any;
140
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLButtonElement>;
134
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLButtonElement>;
141
135
 
142
- export declare function button(...childNodes: any[]): HyperscriptExtensions<HTMLButtonElement>;
136
+ export declare function button(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLButtonElement>;
143
137
 
144
138
  export declare function caption(props: {
145
139
  [_: string]: any;
146
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
140
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
147
141
 
148
- export declare function caption(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
142
+ export declare function caption(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
149
143
 
150
144
  /**
151
145
  * 创建一个支持 RxJS 的复选框组件。
@@ -170,27 +164,25 @@ possibilities: Record<string, HTMLElement | HTMLElement[]>
170
164
 
171
165
  export declare function cite(props: {
172
166
  [_: string]: any;
173
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
167
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
174
168
 
175
- export declare function cite(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
169
+ export declare function cite(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
176
170
 
177
171
  export declare function code(props: {
178
172
  [_: string]: any;
179
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
173
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
180
174
 
181
- export declare function code(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
175
+ export declare function code(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
182
176
 
183
177
  export declare function col(props: {
184
178
  [_: string]: any;
185
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
186
-
187
- export declare function col(...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
179
+ }): HyperscriptExtensions<HTMLTableColElement>;
188
180
 
189
181
  export declare function colgroup(props: {
190
182
  [_: string]: any;
191
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
183
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableColElement>;
192
184
 
193
- export declare function colgroup(...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
185
+ export declare function colgroup(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableColElement>;
194
186
 
195
187
  /**
196
188
  * 显示或隐藏包含的元素。
@@ -198,13 +190,16 @@ export declare function colgroup(...childNodes: any[]): HyperscriptExtensions<HT
198
190
  * `collapse` 函数通过绑定 `hidden` 属性,实现一组 HTML 元素的动态显示或隐藏。
199
191
  *
200
192
  * @param {Observable<boolean>} hidden$ - 一个可观察对象(如 BehaviorSubject),用于控制元素的 `hidden` 属性。
201
- * @param {...HTMLElement|HTMLElement[]} elements - 一个或多个 HTML 元素,或者包含 HTML 元素的数组。
193
+ * @param {...HTMLElement} elements - 一个或多个 HTML 元素,或者包含 HTML 元素的数组。
202
194
  * @returns {HTMLElement[]} - 处理后的元素数组。
203
195
  *
204
196
  * @throws {Error} 如果 `elements` 中包含非元素节点(如 TextNode)。
205
197
  *
206
198
  */
207
- export declare function collapse(hidden$: Observable<boolean>, ...elements: (HTMLElement | HTMLElement[])[]): HTMLElement[];
199
+ export declare function collapse(
200
+ hidden$: Observable<boolean>,
201
+ ...elements: HTMLElement[]
202
+ ): HTMLElement[];
208
203
 
209
204
  /**
210
205
  * 比较两个日期对象的大小。
@@ -349,27 +344,23 @@ export declare class Comparer<T> {
349
344
  isSuperset(array1: T[], array2: T[]): boolean;
350
345
  }
351
346
 
352
- export declare function compose(...fns: ((arg: any) => any)[]): (arg: any) => any;
353
-
354
- export declare function cond(branches: Array<Function | [Function, Function]>): (...args: any[]) => any;
355
-
356
347
  export declare function data(props: {
357
348
  [_: string]: any;
358
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLDataElement>;
349
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDataElement>;
359
350
 
360
- export declare function data(...childNodes: any[]): HyperscriptExtensions<HTMLDataElement>;
351
+ export declare function data(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDataElement>;
361
352
 
362
353
  export declare function datalist(props: {
363
354
  [_: string]: any;
364
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLDataListElement>;
355
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDataListElement>;
365
356
 
366
- export declare function datalist(...childNodes: any[]): HyperscriptExtensions<HTMLDataListElement>;
357
+ export declare function datalist(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDataListElement>;
367
358
 
368
359
  export declare function dd(props: {
369
360
  [_: string]: any;
370
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
361
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
371
362
 
372
- export declare function dd(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
363
+ export declare function dd(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
373
364
 
374
365
  /**
375
366
  * 深度(嵌套)数据结构类,用于处理按键路径排序的键值对集合。
@@ -542,51 +533,51 @@ export declare const defaultComparer: Comparer<any>;
542
533
 
543
534
  export declare function del(props: {
544
535
  [_: string]: any;
545
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
536
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLModElement>;
546
537
 
547
- export declare function del(...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
538
+ export declare function del(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLModElement>;
548
539
 
549
540
  export declare function details(props: {
550
541
  [_: string]: any;
551
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLDetailsElement>;
542
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDetailsElement>;
552
543
 
553
- export declare function details(...childNodes: any[]): HyperscriptExtensions<HTMLDetailsElement>;
544
+ export declare function details(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDetailsElement>;
554
545
 
555
546
  export declare function dfn(props: {
556
547
  [_: string]: any;
557
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
548
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
558
549
 
559
- export declare function dfn(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
550
+ export declare function dfn(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
560
551
 
561
552
  export declare function dialog(props: {
562
553
  [_: string]: any;
563
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLDialogElement>;
554
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDialogElement>;
564
555
 
565
- export declare function dialog(...childNodes: any[]): HyperscriptExtensions<HTMLDialogElement>;
556
+ export declare function dialog(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDialogElement>;
566
557
 
567
558
  export declare function div(props: {
568
559
  [_: string]: any;
569
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLDivElement>;
560
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDivElement>;
570
561
 
571
- export declare function div(...childNodes: any[]): HyperscriptExtensions<HTMLDivElement>;
562
+ export declare function div(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDivElement>;
572
563
 
573
564
  export declare function dl(props: {
574
565
  [_: string]: any;
575
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLDListElement>;
566
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDListElement>;
576
567
 
577
- export declare function dl(...childNodes: any[]): HyperscriptExtensions<HTMLDListElement>;
568
+ export declare function dl(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLDListElement>;
578
569
 
579
570
  export declare function dt(props: {
580
571
  [_: string]: any;
581
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
572
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
582
573
 
583
- export declare function dt(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
574
+ export declare function dt(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
584
575
 
585
576
  export declare function em(props: {
586
577
  [_: string]: any;
587
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
578
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
588
579
 
589
- export declare function em(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
580
+ export declare function em(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
590
581
 
591
582
  export declare const entryComparer: Comparer<[(string | number)[], any]>;
592
583
 
@@ -601,21 +592,21 @@ export declare function erectObject(entries: [(string | number)[], any][]): obje
601
592
 
602
593
  export declare function fieldset(props: {
603
594
  [_: string]: any;
604
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLFieldSetElement>;
595
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLFieldSetElement>;
605
596
 
606
- export declare function fieldset(...childNodes: any[]): HyperscriptExtensions<HTMLFieldSetElement>;
597
+ export declare function fieldset(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLFieldSetElement>;
607
598
 
608
599
  export declare function figcaption(props: {
609
600
  [_: string]: any;
610
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
601
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
611
602
 
612
- export declare function figcaption(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
603
+ export declare function figcaption(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
613
604
 
614
605
  export declare function figure(props: {
615
606
  [_: string]: any;
616
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
607
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
617
608
 
618
- export declare function figure(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
609
+ export declare function figure(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
619
610
 
620
611
  /**
621
612
  * 查找数组中最后一个满足条件的元素索引。
@@ -646,38 +637,26 @@ export declare function flat(data: any, isLeaf?: (value: any, key: string | numb
646
637
  */
647
638
  export declare function flip(yinHidden$: Observable<boolean>, yin: HTMLElement | HTMLElement[], yang: HTMLElement | HTMLElement[]): HTMLElement[];
648
639
 
649
- /**
650
- * 通用折叠(递归归约)函数。
651
- *
652
- * @public
653
- * @param {(this:any, acc: any, seed: any) => [*, *]|[any]|[]|null|undefined} fn - 处理函数,返回 [新acc, 新seed] 或 [新acc]
654
- * @param {*} acc - 初始累加值
655
- * @param {*} seed - 初始种子
656
- * @returns {*} 折叠后的结果
657
- * @this *
658
- */
659
- export declare function fold(this: any, fn: (this: any, acc: any, seed: any) => [any, any] | [any] | [] | null | undefined, acc: any, seed: any): any;
660
-
661
640
  export declare function footer(props: {
662
641
  [_: string]: any;
663
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
642
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
664
643
 
665
- export declare function footer(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
644
+ export declare function footer(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
666
645
 
667
646
  export declare function form(props: {
668
647
  [_: string]: any;
669
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLFormElement>;
648
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLFormElement>;
670
649
 
671
- export declare function form(...childNodes: any[]): HyperscriptExtensions<HTMLFormElement>;
650
+ export declare function form(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLFormElement>;
672
651
 
673
652
  /**
674
653
  * 用途:插入一组元素,不必使用循环语句,fragment 用后即弃。
675
654
  *
676
- * @param {...Node|Node[]} childNodes - 要插入的子节点,可以是单个节点、多个节点或节点数组。
655
+ * @param {...Node} childNodes - 要插入的子节点,可以是单个节点、多个节点或节点数组。
677
656
  * @returns {DocumentFragment} - 返回包含所有子节点的 DocumentFragment。
678
657
  * @throws {Error} 如果传入的子节点不是有效的 DOM 节点。
679
658
  */
680
- export declare function fragment(...childNodes: (Node | Node[])[]): DocumentFragment;
659
+ export declare function fragment(...childNodes: Node[]): DocumentFragment;
681
660
 
682
661
  /**
683
662
  * 获取 HTML 元素的默认 CSS `display` 值。
@@ -730,67 +709,121 @@ export declare function groupByFirstLevelKey(flatEntries: [(string | number)[],
730
709
 
731
710
  export declare function h1(props: {
732
711
  [_: string]: any;
733
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
712
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
734
713
 
735
- export declare function h1(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
714
+ export declare function h1(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
736
715
 
737
716
  export declare function h2(props: {
738
717
  [_: string]: any;
739
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
718
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
740
719
 
741
- export declare function h2(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
720
+ export declare function h2(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
742
721
 
743
722
  export declare function h3(props: {
744
723
  [_: string]: any;
745
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
724
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
746
725
 
747
- export declare function h3(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
726
+ export declare function h3(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
748
727
 
749
728
  export declare function h4(props: {
750
729
  [_: string]: any;
751
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
730
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
752
731
 
753
- export declare function h4(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
732
+ export declare function h4(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
754
733
 
755
734
  export declare function h5(props: {
756
735
  [_: string]: any;
757
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
736
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
758
737
 
759
- export declare function h5(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
738
+ export declare function h5(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
760
739
 
761
740
  export declare function h6(props: {
762
741
  [_: string]: any;
763
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
742
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
764
743
 
765
- export declare function h6(...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
744
+ export declare function h6(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLHeadingElement>;
766
745
 
767
746
  export declare function header(props: {
768
747
  [_: string]: any;
769
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
748
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
770
749
 
771
- export declare function header(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
750
+ export declare function header(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
772
751
 
773
752
  export declare function hgroup(props: {
774
753
  [_: string]: any;
775
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
754
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
776
755
 
777
- export declare function hgroup(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
756
+ export declare function hgroup(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
778
757
 
779
- export declare function hr(props: {
780
- [_: string]: any;
781
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLHRElement>;
758
+ export declare function hr(): HyperscriptExtensions<HTMLHRElement>;
759
+
760
+ export declare type HtmlTagName =
761
+ // 主根元素
762
+ | "html"
782
763
 
783
- export declare function hr(...childNodes: any[]): HyperscriptExtensions<HTMLHRElement>;
764
+ // 文档元数据
765
+ | "head" | "title" | "base" | "link" | "meta" | "style"
766
+
767
+ // 脚本
768
+ | "script" | "noscript" | "template"
769
+
770
+ // 分区根
771
+ | "body"
772
+
773
+ // 内容分区
774
+ | "article" | "aside" | "footer" | "header" | "h1" | "h2" | "h3"
775
+ | "h4" | "h5" | "h6" | "main" | "nav" | "section"
776
+
777
+ // 文本内容
778
+ | "blockquote" | "dd" | "div" | "dl" | "dt" | "figcaption"
779
+ | "figure" | "hr" | "li" | "ol" | "p" | "pre" | "ul"
780
+
781
+ // 内联文本语义
782
+ | "a" | "abbr" | "b" | "bdi" | "bdo" | "br" | "cite" | "code"
783
+ | "data" | "dfn" | "em" | "i" | "kbd" | "mark" | "q"
784
+ | "rp" | "rt" | "ruby" | "s" | "samp" | "small" | "span"
785
+ | "strong" | "sub" | "sup" | "time" | "u" | "var" | "wbr"
786
+
787
+ // 图片和多媒体
788
+ | "area" | "audio" | "img" | "map" | "track" | "video"
789
+
790
+ // 嵌入式内容
791
+ | "embed" | "iframe" | "object" | "param" | "picture" | "portal" | "source"
792
+
793
+ // SVG 和 MathML
794
+ | "svg" | "math"
795
+
796
+ // 表单
797
+ | "button" | "datalist" | "fieldset" | "form" | "input" | "label"
798
+ | "legend" | "meter" | "optgroup" | "option" | "output" | "progress"
799
+ | "select" | "textarea"
800
+
801
+ // 交互元素
802
+ | "details" | "dialog" | "menu" | "summary"
803
+
804
+ // Web Components
805
+ | "slot" | "canvas"
806
+
807
+ // 过时元素 (可选是否包含)
808
+ | "acronym" | "applet" | "basefont" | "big" | "blink" | "center"
809
+ | "content" | "dir" | "font" | "frame" | "frameset" | "isindex"
810
+ | "keygen" | "marquee" | "menuitem" | "nobr" | "noembed"
811
+ | "noframes" | "plaintext" | "rb" | "rtc" | "shadow" | "spacer"
812
+ | "strike" | "tt" | "xmp"
813
+
814
+ // 我添加的
815
+ | 'address' | 'caption' | 'col' | 'colgroup' | 'del'
816
+ | 'hgroup' | 'ins' | 'table' | 'tbody' | 'td' | 'tfoot' | 'th' | 'thead' | 'tr'
784
817
 
785
818
  /**
786
819
  * Creates an HTML element with extended event handling capabilities
787
820
  * @public
788
- * @param {string} elemName - The HTML element tag name
821
+ * @param {HtmlTagName} elemName - The HTML element tag name
789
822
  * @param {...any} args - Optional properties and child nodes
790
823
  * @returns {HyperscriptElement} The created element with extended methods
791
824
  * @throws {Error} If elemName is not a valid HTML element tag name
792
825
  */
793
- export declare function hyperscript(elemName: string, ...args: any[]): HyperscriptElement;
826
+ export declare function hyperscript(elemName: HtmlTagName, ...args: any[]): HyperscriptElement;
794
827
 
795
828
  export declare type HyperscriptElement = HyperscriptExtensions<HTMLElement>;
796
829
 
@@ -821,15 +854,13 @@ export declare type HyperscriptTextAreaElement = HyperscriptExtensions<HTMLTextA
821
854
 
822
855
  export declare function i(props: {
823
856
  [_: string]: any;
824
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
857
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
825
858
 
826
- export declare function i(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
859
+ export declare function i(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
827
860
 
828
861
  export declare function img(props: {
829
862
  [_: string]: any;
830
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLImageElement>;
831
-
832
- export declare function img(...childNodes: any[]): HyperscriptExtensions<HTMLImageElement>;
863
+ }): HyperscriptExtensions<HTMLImageElement>;
833
864
 
834
865
  /**
835
866
  * 一个包含所有 HTML 内联元素标签名称的集合。
@@ -849,24 +880,22 @@ export declare const inlineFamily: Set<string>;
849
880
 
850
881
  export declare function input(props: {
851
882
  [_: string]: any;
852
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLInputElement>;
853
-
854
- export declare function input(...childNodes: any[]): HyperscriptExtensions<HTMLInputElement>;
883
+ }): HyperscriptExtensions<HTMLInputElement>;
855
884
 
856
885
  export declare function ins(props: {
857
886
  [_: string]: any;
858
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
887
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLModElement>;
859
888
 
860
- export declare function ins(...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
889
+ export declare function ins(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLModElement>;
861
890
 
862
891
  /**
863
892
  * Creates an object composed of the picked object properties.
864
893
  * @param {Record<string,any>} obj - Source object
865
- * @param {string[]} keys - Array of property keys to pick
894
+ * @param {Iterable<string>} keys - Iterable of property keys to pick
866
895
  * @returns {Record<string,any>} New object with picked properties
867
896
  * @throws {TypeError} If obj is not an object or keys is not an array
868
897
  */
869
- export declare function intersectObject(obj: Record<string, any>, keys: string[]): Record<string, any>;
898
+ export declare function intersectObject(obj: Record<string, any>, keys: Iterable<string>): Record<string, any>;
870
899
 
871
900
  export declare function isEmptyObject(obj: unknown): obj is Record<never, never>;
872
901
 
@@ -899,9 +928,9 @@ export declare function isRxType(obj: any): boolean;
899
928
 
900
929
  export declare function kbd(props: {
901
930
  [_: string]: any;
902
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
931
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
903
932
 
904
- export declare function kbd(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
933
+ export declare function kbd(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
905
934
 
906
935
  export declare const keyComparer: Comparer<string | number>;
907
936
 
@@ -909,65 +938,66 @@ export declare const keyPathComparer: Comparer<(string | number)[]>;
909
938
 
910
939
  export declare function label(props: {
911
940
  [_: string]: any;
912
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLLabelElement>;
941
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLLabelElement>;
913
942
 
914
- export declare function label(...childNodes: any[]): HyperscriptExtensions<HTMLLabelElement>;
943
+ export declare function label(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLLabelElement>;
915
944
 
916
945
  export declare function legend(props: {
917
946
  [_: string]: any;
918
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLLegendElement>;
947
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLLegendElement>;
919
948
 
920
- export declare function legend(...childNodes: any[]): HyperscriptExtensions<HTMLLegendElement>;
949
+ export declare function legend(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLLegendElement>;
921
950
 
922
951
  export declare function li(props: {
923
952
  [_: string]: any;
924
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLLIElement>;
953
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLLIElement>;
925
954
 
926
- export declare function li(...childNodes: any[]): HyperscriptExtensions<HTMLLIElement>;
955
+ export declare function li(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLLIElement>;
927
956
 
928
957
  export declare function main(props: {
929
958
  [_: string]: any;
930
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
959
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
931
960
 
932
- export declare function main(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
961
+ export declare function main(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
933
962
 
934
963
  export declare function mark(props: {
935
964
  [_: string]: any;
936
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
965
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
937
966
 
938
- export declare function mark(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
967
+ export declare function mark(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
939
968
 
940
969
  export declare function menu(props: {
941
970
  [_: string]: any;
942
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLMenuElement>;
971
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLMenuElement>;
943
972
 
944
- export declare function menu(...childNodes: any[]): HyperscriptExtensions<HTMLMenuElement>;
973
+ export declare function menu(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLMenuElement>;
945
974
 
946
975
  export declare function menuitem(props: {
947
976
  [_: string]: any;
948
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
977
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
949
978
 
950
- export declare function menuitem(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
979
+ export declare function menuitem(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
951
980
 
952
981
  export declare function meter(props: {
953
982
  [_: string]: any;
954
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLMeterElement>;
983
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLMeterElement>;
955
984
 
956
- export declare function meter(...childNodes: any[]): HyperscriptExtensions<HTMLMeterElement>;
985
+ export declare function meter(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLMeterElement>;
957
986
 
958
987
  /**
959
988
  * 创建一个支持多选功能的 <select> 元素,并绑定选项的选中状态。必须手动添加控件更新BehaviorSubject的事件。
960
989
  *
961
990
  * @param {MultiselectProps} props - 配置对象,包含 <select> 元素的属性。
962
- * @param {...HTMLOptionElement[]} options - 一个或多个 <option> 元素,必须是 HTMLOptionElement 类型。
991
+ * @param {...HTMLOptionElement} options - 一个或多个 <option> 元素,必须是 HTMLOptionElement 类型。
963
992
  * 每个选项需要包含一个 `selected` 属性,该属性是一个 BehaviorSubject ,用于绑定选中状态。
964
993
  * @returns {HyperscriptSelectElement} - 创建的 <select> 元素。
965
994
  * @throws {Error} 如果 `props` 不是对象,或者 `options` 中的选项未正确定义 `selected` 属性。
966
995
  *
967
996
  */
968
- export declare function multiselect(props: MultiselectProps, ...options: HTMLOptionElement[]): HyperscriptSelectElement;
969
-
970
- export declare function multiselect(props: MultiselectProps, options: HTMLOptionElement[]): HyperscriptSelectElement;
997
+ export declare function multiselect(
998
+ props: MultiselectProps,
999
+ ...options: HTMLOptionElement[]
1000
+ ): HyperscriptSelectElement;
971
1001
 
972
1002
  export declare type MultiselectProps = {
973
1003
  oninput?: (e: Event) => void;
@@ -977,9 +1007,9 @@ export declare type MultiselectProps = {
977
1007
 
978
1008
  export declare function nav(props: {
979
1009
  [_: string]: any;
980
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1010
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
981
1011
 
982
- export declare function nav(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1012
+ export declare function nav(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
983
1013
 
984
1014
  /**
985
1015
  *
@@ -995,13 +1025,25 @@ export declare function nestedCombineLatest(model: Record<string | number, any>)
995
1025
  */
996
1026
  export declare function nestedMerge(model: Record<string | number, any>): Observable<[(string | number)[], any]>;
997
1027
 
1028
+ export declare type NestedObject<T> =
1029
+ | T
1030
+ | NestedObject<T>[]
1031
+ | { [_: string]: NestedObject<T> }
1032
+
1033
+ /**
1034
+ * 表示一个可以无限嵌套的字符串结构
1035
+ */
1036
+ export declare type NestedStringArray = string | NestedStringArray[]
1037
+
1038
+ export declare type NodeInput = Node | string | number | boolean | null | undefined
1039
+
998
1040
  /**
999
1041
  * 规范化子节点,将非节点转换为文本节点。
1000
1042
  *
1001
- * @param {any[]} childNodes - 子节点数组。
1043
+ * @param {NodeInput[]} childNodes - 子节点数组。
1002
1044
  * @returns {Node[]} - 返回规范化后的节点数组。
1003
1045
  */
1004
- export declare function normalizeChildNodes(childNodes: any[]): Node[];
1046
+ export declare function normalizeChildNodes(childNodes: NodeInput[]): Node[];
1005
1047
 
1006
1048
  /**
1007
1049
  * 创建一个支持双向绑定的数字输入框。
@@ -1085,33 +1127,33 @@ export declare type Observer<T> = Observer_2<T>;
1085
1127
 
1086
1128
  export declare function ol(props: {
1087
1129
  [_: string]: any;
1088
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLOListElement>;
1130
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLOListElement>;
1089
1131
 
1090
- export declare function ol(...childNodes: any[]): HyperscriptExtensions<HTMLOListElement>;
1132
+ export declare function ol(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLOListElement>;
1091
1133
 
1092
1134
  export declare function optgroup(props: {
1093
1135
  [_: string]: any;
1094
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLOptGroupElement>;
1136
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLOptGroupElement>;
1095
1137
 
1096
- export declare function optgroup(...childNodes: any[]): HyperscriptExtensions<HTMLOptGroupElement>;
1138
+ export declare function optgroup(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLOptGroupElement>;
1097
1139
 
1098
1140
  export declare function option(props: {
1099
1141
  [_: string]: any;
1100
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLOptionElement>;
1142
+ }, ...childNodes: (Text | string)[]): HyperscriptExtensions<HTMLOptionElement>;
1101
1143
 
1102
- export declare function option(...childNodes: any[]): HyperscriptExtensions<HTMLOptionElement>;
1144
+ export declare function option(...childNodes: (Text | string)[]): HyperscriptExtensions<HTMLOptionElement>;
1103
1145
 
1104
1146
  export declare function output(props: {
1105
1147
  [_: string]: any;
1106
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLOutputElement>;
1148
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLOutputElement>;
1107
1149
 
1108
- export declare function output(...childNodes: any[]): HyperscriptExtensions<HTMLOutputElement>;
1150
+ export declare function output(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLOutputElement>;
1109
1151
 
1110
1152
  export declare function p(props: {
1111
1153
  [_: string]: any;
1112
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLParagraphElement>;
1154
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLParagraphElement>;
1113
1155
 
1114
- export declare function p(...childNodes: any[]): HyperscriptExtensions<HTMLParagraphElement>;
1156
+ export declare function p(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLParagraphElement>;
1115
1157
 
1116
1158
  /**
1117
1159
  * 解析 hyperscript 风格的参数,返回 props 和 childNodes。
@@ -1136,18 +1178,24 @@ export declare function parseHyperscriptArgs(args: any[]): {
1136
1178
  export declare function parsePropName(props: string, obj: Record<string, any>): [Record<string, any>, string];
1137
1179
 
1138
1180
  /**
1139
- *
1181
+ *
1140
1182
  * 拾取对象中的BehaviorSubject值,作爲葉子節點,忽略其他值。
1141
- *
1142
- * @param {Record<string|number,any> & { pickeys?: () => string [] }} model - 输入的数据结构,可以是对象、数组或BehaviorSubject
1143
- * @returns {Record<string|number,any>} - 返回只包含BehaviorSubject当前值的结构
1183
+ * @public
1184
+ * @template T
1185
+ * @param {{[_:string]:NestedObject<T>} & { pickeys?:( () => string []) }} source - 输入的数据结构,可以是对象、数组或BehaviorSubject
1186
+ * @param {NestedStringArray[]} [paths]
1187
+ * @returns {{[_:string]:NestedObject<T>}}
1144
1188
  * @throws {Error} 当输入不包含任何BehaviorSubject或结构不符合预期时抛出错误
1145
1189
  */
1146
- export declare function pickBehaviorSubject(model: Record<string | number, any> & {
1147
- pickeys?: () => string[];
1148
- }): Record<string | number, any>;
1149
-
1150
- export declare function pipe(initialValue: any, ...fns: ((arg: any) => any)[]): any;
1190
+ export declare function pickBehaviorSubject<T>(
1191
+ source: {
1192
+ [_: string]: NestedObject<T>;
1193
+ } & {
1194
+ pickeys?: () => NestedStringArray[];
1195
+ }, paths?: NestedStringArray[]
1196
+ ): {
1197
+ [_: string]: NestedObject<T>;
1198
+ };
1151
1199
 
1152
1200
  /**
1153
1201
  * 为指定的 DOM 元素订阅事件流,并通过 pipe 对事件流进行处理。
@@ -1169,21 +1217,21 @@ export declare function pluckProperty(obj: Record<string | number, any>, keyPath
1169
1217
 
1170
1218
  export declare function pre(props: {
1171
1219
  [_: string]: any;
1172
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLPreElement>;
1220
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLPreElement>;
1173
1221
 
1174
- export declare function pre(...childNodes: any[]): HyperscriptExtensions<HTMLPreElement>;
1222
+ export declare function pre(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLPreElement>;
1175
1223
 
1176
1224
  export declare function progress(props: {
1177
1225
  [_: string]: any;
1178
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLProgressElement>;
1226
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLProgressElement>;
1179
1227
 
1180
- export declare function progress(...childNodes: any[]): HyperscriptExtensions<HTMLProgressElement>;
1228
+ export declare function progress(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLProgressElement>;
1181
1229
 
1182
1230
  export declare function q(props: {
1183
1231
  [_: string]: any;
1184
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
1232
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLQuoteElement>;
1185
1233
 
1186
- export declare function q(...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
1234
+ export declare function q(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLQuoteElement>;
1187
1235
 
1188
1236
  /**
1189
1237
  * 将对象序列化为 URL 查询字符串(支持嵌套对象和多类型字段)。
@@ -1216,9 +1264,9 @@ export declare function rangeArray(length: number): number[];
1216
1264
 
1217
1265
  export declare function rb(props: {
1218
1266
  [_: string]: any;
1219
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1267
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1220
1268
 
1221
- export declare function rb(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1269
+ export declare function rb(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1222
1270
 
1223
1271
  /**
1224
1272
  * Updates a reactive model with new values from a source object.
@@ -1232,58 +1280,56 @@ export declare function restore(model: Record<string | number, any>, src: Record
1232
1280
 
1233
1281
  export declare function rp(props: {
1234
1282
  [_: string]: any;
1235
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1283
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1236
1284
 
1237
- export declare function rp(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1285
+ export declare function rp(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1238
1286
 
1239
1287
  export declare function rt(props: {
1240
1288
  [_: string]: any;
1241
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1289
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1242
1290
 
1243
- export declare function rt(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1291
+ export declare function rt(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1244
1292
 
1245
1293
  export declare function rtc(props: {
1246
1294
  [_: string]: any;
1247
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1295
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1248
1296
 
1249
- export declare function rtc(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1297
+ export declare function rtc(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1250
1298
 
1251
1299
  export declare function ruby(props: {
1252
1300
  [_: string]: any;
1253
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1301
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1254
1302
 
1255
- export declare function ruby(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1303
+ export declare function ruby(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1256
1304
 
1257
1305
  export declare function s(props: {
1258
1306
  [_: string]: any;
1259
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1307
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1260
1308
 
1261
- export declare function s(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1309
+ export declare function s(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1262
1310
 
1263
1311
  export declare function samp(props: {
1264
1312
  [_: string]: any;
1265
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1313
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1266
1314
 
1267
- export declare function samp(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1315
+ export declare function samp(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1268
1316
 
1269
1317
  export declare function section(props: {
1270
1318
  [_: string]: any;
1271
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1319
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1272
1320
 
1273
- export declare function section(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1321
+ export declare function section(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1274
1322
 
1275
1323
  /**
1276
1324
  * 创建一个支持 RxJS 数据绑定的 <select> 元素。仅单选选择框。
1277
1325
  *
1278
1326
  * @param { SelectProps } props - 配置对象,包含 <select> 元素的属性。
1279
- * @param {...HTMLOptionElement []} options - 一个或多个 <option> 元素,必须是 HTMLOptionElement 类型。
1327
+ * @param {...HTMLOptionElement} options - 一个或多个 <option> 元素,必须是 HTMLOptionElement 类型。
1280
1328
  * @returns {HyperscriptSelectElement} - 创建的 <select> 元素。
1281
1329
  * @throws {Error} 如果 `props` 不是对象,或者 `selectedIndex` 或 `value` 不是 BehaviorSubject。
1282
1330
  */
1283
1331
  export declare function select(props: SelectProps, ...options: HTMLOptionElement[]): HyperscriptSelectElement;
1284
1332
 
1285
- export declare function select(props: SelectProps, options: HTMLOptionElement[]): HyperscriptSelectElement;
1286
-
1287
1333
  export declare type SelectProps = {
1288
1334
  selectedIndex?: BehaviorSubject<number>;
1289
1335
  value?: BehaviorSubject<string>;
@@ -1315,15 +1361,15 @@ export declare function setProps(element: HTMLElement, props: Object): HTMLEleme
1315
1361
 
1316
1362
  export declare function small(props: {
1317
1363
  [_: string]: any;
1318
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1364
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1319
1365
 
1320
- export declare function small(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1366
+ export declare function small(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1321
1367
 
1322
1368
  export declare function span(props: {
1323
1369
  [_: string]: any;
1324
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLSpanElement>;
1370
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLSpanElement>;
1325
1371
 
1326
- export declare function span(...childNodes: any[]): HyperscriptExtensions<HTMLSpanElement>;
1372
+ export declare function span(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLSpanElement>;
1327
1373
 
1328
1374
  /**
1329
1375
  * 将对象属性按类型分为两部分:可观察对象(Observable)与普通值(非 Observable)。
@@ -1336,15 +1382,15 @@ export declare function splitObjectByObservable(obj: Record<string, any>): [Reco
1336
1382
 
1337
1383
  export declare function strong(props: {
1338
1384
  [_: string]: any;
1339
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1385
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1340
1386
 
1341
- export declare function strong(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1387
+ export declare function strong(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1342
1388
 
1343
1389
  export declare function sub(props: {
1344
1390
  [_: string]: any;
1345
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1391
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1346
1392
 
1347
- export declare function sub(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1393
+ export declare function sub(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1348
1394
 
1349
1395
  /**
1350
1396
  * @template T
@@ -1375,15 +1421,15 @@ export declare function subscribeProp<T>(element: HTMLElement, key: string, valu
1375
1421
 
1376
1422
  export declare function summary(props: {
1377
1423
  [_: string]: any;
1378
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1424
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1379
1425
 
1380
- export declare function summary(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1426
+ export declare function summary(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1381
1427
 
1382
1428
  export declare function sup(props: {
1383
1429
  [_: string]: any;
1384
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1430
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1385
1431
 
1386
- export declare function sup(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1432
+ export declare function sup(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1387
1433
 
1388
1434
  /**
1389
1435
  * 创建静态选项卡组件。
@@ -1407,9 +1453,9 @@ panels: Array<string | HTMLElement>
1407
1453
 
1408
1454
  export declare function table(props: {
1409
1455
  [_: string]: any;
1410
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableElement>;
1456
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableElement>;
1411
1457
 
1412
- export declare function table(...childNodes: any[]): HyperscriptExtensions<HTMLTableElement>;
1458
+ export declare function table(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableElement>;
1413
1459
 
1414
1460
  /**
1415
1461
  * 选项卡的导航按钮。
@@ -1447,15 +1493,15 @@ export declare function tabRoot(props: Object): HTMLElement;
1447
1493
 
1448
1494
  export declare function tbody(props: {
1449
1495
  [_: string]: any;
1450
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1496
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableSectionElement>;
1451
1497
 
1452
- export declare function tbody(...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1498
+ export declare function tbody(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableSectionElement>;
1453
1499
 
1454
1500
  export declare function td(props: {
1455
1501
  [_: string]: any;
1456
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
1502
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableCellElement>;
1457
1503
 
1458
- export declare function td(...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
1504
+ export declare function td(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableCellElement>;
1459
1505
 
1460
1506
  /**
1461
1507
  * 创建一个支持 RxJS 数据绑定的 <textarea> 元素。
@@ -1482,8 +1528,9 @@ export declare function textbox(props: {
1482
1528
  }): HyperscriptInputElement;
1483
1529
 
1484
1530
  /**
1485
- * @typedef {Text & {subscription?: Subscription, unsubscribe?: ()=>void}} ObservableTextNode
1531
+ * @typedef {Text & {subscription?: Subscription, unsubscribe?: () => void}} ObservableTextNode
1486
1532
  */
1533
+
1487
1534
  /**
1488
1535
  * 创建一个文本节点。
1489
1536
  * 支持静态文本和动态更新的文本(通过 RxJS Observable)。
@@ -1492,35 +1539,35 @@ export declare function textbox(props: {
1492
1539
  * - 如果传入的是 RxJS Observable,则创建一个动态文本节点,并根据 Observable 的值实时更新文本内容。
1493
1540
  * - 动态文本节点支持通过 `unsubscribe` 方法取消订阅。
1494
1541
  *
1495
- * @param {any} text (Observable<any> | any) 任何类型数据都会被转换成string
1542
+ * @param {Observable<T>|T} text 任何类型数据都会被转换成string
1496
1543
  * @returns {ObservableTextNode}
1497
1544
  *
1498
1545
  */
1499
- export declare function textNode(text: any): ObservableTextNode;
1546
+ export declare function textNode<T>(text: Observable<T>|T): ObservableTextNode;
1500
1547
 
1501
1548
  export declare function tfoot(props: {
1502
1549
  [_: string]: any;
1503
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1550
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableSectionElement>;
1504
1551
 
1505
- export declare function tfoot(...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1552
+ export declare function tfoot(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableSectionElement>;
1506
1553
 
1507
1554
  export declare function th(props: {
1508
1555
  [_: string]: any;
1509
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
1556
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableCellElement>;
1510
1557
 
1511
- export declare function th(...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
1558
+ export declare function th(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableCellElement>;
1512
1559
 
1513
1560
  export declare function thead(props: {
1514
1561
  [_: string]: any;
1515
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1562
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableSectionElement>;
1516
1563
 
1517
- export declare function thead(...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1564
+ export declare function thead(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableSectionElement>;
1518
1565
 
1519
1566
  export declare function time(props: {
1520
1567
  [_: string]: any;
1521
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTimeElement>;
1568
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTimeElement>;
1522
1569
 
1523
- export declare function time(...childNodes: any[]): HyperscriptExtensions<HTMLTimeElement>;
1570
+ export declare function time(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTimeElement>;
1524
1571
 
1525
1572
  /**
1526
1573
  * 将扁平化的键值对数组转换为嵌套的 JavaScript 对象或数组。
@@ -1534,47 +1581,33 @@ export declare function tojs(flatEntries: [(string | number)[], any][]): Record<
1534
1581
 
1535
1582
  export declare function tr(props: {
1536
1583
  [_: string]: any;
1537
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableRowElement>;
1584
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableRowElement>;
1538
1585
 
1539
- export declare function tr(...childNodes: any[]): HyperscriptExtensions<HTMLTableRowElement>;
1586
+ export declare function tr(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableRowElement>;
1540
1587
 
1541
1588
  export declare function track(props: {
1542
1589
  [_: string]: any;
1543
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLTrackElement>;
1544
-
1545
- export declare function track(...childNodes: any[]): HyperscriptExtensions<HTMLTrackElement>;
1590
+ }): HyperscriptExtensions<HTMLTrackElement>;
1546
1591
 
1547
1592
  export declare function tt(props: {
1548
1593
  [_: string]: any;
1549
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1594
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1550
1595
 
1551
- export declare function tt(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1596
+ export declare function tt(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1552
1597
 
1553
1598
  export declare const types: string[];
1554
1599
 
1555
1600
  export declare function u(props: {
1556
1601
  [_: string]: any;
1557
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1602
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1558
1603
 
1559
- export declare function u(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1604
+ export declare function u(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
1560
1605
 
1561
1606
  export declare function ul(props: {
1562
1607
  [_: string]: any;
1563
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLUListElement>;
1608
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLUListElement>;
1564
1609
 
1565
- export declare function ul(...childNodes: any[]): HyperscriptExtensions<HTMLUListElement>;
1566
-
1567
- /**
1568
- * 通过不断调用 fn 生成值,直到 fn 返回 falsy。
1569
- *
1570
- * @public
1571
- * @template T, S
1572
- * @param {(seed: S) => [T, S] | false | null | undefined} fn - 生成函数,接收当前 seed,返回 [value, nextSeed] 或 falsy。
1573
- * @param {S} seed - 初始种子值。
1574
- * @returns {Array<T>} 由 fn 生成的所有 value 组成的数组。
1575
- * @this *
1576
- */
1577
- export declare function unfold<T, S>(this: any, fn: (seed: S) => [T, S] | false | null | undefined, seed: S): Array<T>;
1610
+ export declare function ul(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLUListElement>;
1578
1611
 
1579
1612
  /**
1580
1613
  * 将任意 JS 值序列化为“无引号 JSON”字符串(仅对键名和部分字符串值去引号)。
@@ -1585,26 +1618,13 @@ export declare function unfold<T, S>(this: any, fn: (seed: S) => [T, S] | false
1585
1618
  */
1586
1619
  export declare function unquotedJsonStringify(value: any): string;
1587
1620
 
1588
- /**
1589
- * 简易unwrap参数数组。如果子节点是单个数组,则解构为子节点,否则返回原数组。
1590
- *
1591
- * @template T
1592
- * @param {(T|T[])[]} args - 子节点数组。
1593
- * @returns {T[]} - 解构后的子节点数组。
1594
- */
1595
- export declare function unwrapArgs<T>(args: (T | T[])[]): T[];
1596
-
1597
1621
  export declare function video(props: {
1598
1622
  [_: string]: any;
1599
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLVideoElement>;
1600
-
1601
- export declare function video(...childNodes: any[]): HyperscriptExtensions<HTMLVideoElement>;
1623
+ }, ...childNodes: NodeInput[]): HyperscriptExtensions<HTMLVideoElement>;
1602
1624
 
1603
- export declare function wbr(props: {
1604
- [_: string]: any;
1605
- }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1625
+ export declare function video(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLVideoElement>;
1606
1626
 
1607
- export declare function wbr(...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1627
+ export declare function wbr(): HyperscriptExtensions<HTMLElement>;
1608
1628
 
1609
1629
  /**
1610
1630
  * 合并两个数组为一个元组数组。