hyperscript-rxjs 1.3.15 → 1.3.17

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.
Files changed (278) hide show
  1. package/dist/hyperscript-rxjs.d.ts +1438 -0
  2. package/dist/hyperscript-rxjs.js +4157 -0
  3. package/package.json +21 -12
  4. package/src/array/advance.d.ts +0 -9
  5. package/src/array/advance.js +0 -13
  6. package/src/array/advance.test.js +0 -12
  7. package/src/array/arrayInsert.d.ts +0 -8
  8. package/src/array/arrayInsert.js +0 -13
  9. package/src/array/arrayInsert.test.js +0 -13
  10. package/src/array/arrayRemove.d.ts +0 -7
  11. package/src/array/arrayRemove.js +0 -15
  12. package/src/array/arrayRemove.test.js +0 -13
  13. package/src/array/findLastIndex.d.ts +0 -14
  14. package/src/array/findLastIndex.js +0 -20
  15. package/src/array/findLastIndex.test.js +0 -41
  16. package/src/array/index.d.ts +0 -9
  17. package/src/array/index.js +0 -9
  18. package/src/array/isRange.d.ts +0 -7
  19. package/src/array/isRange.js +0 -15
  20. package/src/array/isRange.test.js +0 -6
  21. package/src/array/rangeArray.d.ts +0 -7
  22. package/src/array/rangeArray.js +0 -10
  23. package/src/array/rangeArray.test.js +0 -11
  24. package/src/array/unwrapArgs.d.ts +0 -10
  25. package/src/array/unwrapArgs.js +0 -15
  26. package/src/array/unwrapArgs.test.js +0 -33
  27. package/src/array/zipArray.d.ts +0 -11
  28. package/src/array/zipArray.js +0 -24
  29. package/src/array/zipArray.test.js +0 -16
  30. package/src/comparers/Comparer.d.ts +0 -101
  31. package/src/comparers/Comparer.js +0 -149
  32. package/src/comparers/comparers.d.ts +0 -21
  33. package/src/comparers/comparers.js +0 -10
  34. package/src/comparers/differenceSet.d.ts +0 -20
  35. package/src/comparers/differenceSet.js +0 -35
  36. package/src/comparers/differenceSet.test.js +0 -11
  37. package/src/comparers/distinctArray.d.ts +0 -13
  38. package/src/comparers/distinctArray.js +0 -30
  39. package/src/comparers/distinctArray.test.js +0 -10
  40. package/src/comparers/findIndexInSet.d.ts +0 -20
  41. package/src/comparers/findIndexInSet.js +0 -27
  42. package/src/comparers/findIndexInSet.test.js +0 -8
  43. package/src/comparers/groupArrayBy.d.ts +0 -19
  44. package/src/comparers/groupArrayBy.js +0 -29
  45. package/src/comparers/groupArrayBy.test.js +0 -38
  46. package/src/comparers/groupSortedEntries.d.ts +0 -17
  47. package/src/comparers/groupSortedEntries.js +0 -38
  48. package/src/comparers/groupSortedEntries.test.js +0 -46
  49. package/src/comparers/index.d.ts +0 -14
  50. package/src/comparers/index.js +0 -14
  51. package/src/comparers/intersectSet.d.ts +0 -19
  52. package/src/comparers/intersectSet.js +0 -35
  53. package/src/comparers/intersectSet.test.js +0 -14
  54. package/src/comparers/isEqualset.d.ts +0 -22
  55. package/src/comparers/isEqualset.js +0 -33
  56. package/src/comparers/isEqualset.test.js +0 -22
  57. package/src/comparers/isSubset.d.ts +0 -21
  58. package/src/comparers/isSubset.js +0 -33
  59. package/src/comparers/isSubset.test.js +0 -21
  60. package/src/comparers/isSuperset.d.ts +0 -21
  61. package/src/comparers/isSuperset.js +0 -13
  62. package/src/comparers/isSuperset.test.js +0 -21
  63. package/src/comparers/sortedArrayToSet.d.ts +0 -20
  64. package/src/comparers/sortedArrayToSet.js +0 -35
  65. package/src/comparers/sortedArrayToSet.test.js +0 -11
  66. package/src/comparers/unionSet.d.ts +0 -21
  67. package/src/comparers/unionSet.js +0 -34
  68. package/src/comparers/unionSet.test.js +0 -11
  69. package/src/comparison/compareDate.d.ts +0 -8
  70. package/src/comparison/compareDate.js +0 -11
  71. package/src/comparison/compareEntries.d.ts +0 -13
  72. package/src/comparison/compareEntries.js +0 -13
  73. package/src/comparison/compareKey.d.ts +0 -11
  74. package/src/comparison/compareKey.js +0 -25
  75. package/src/comparison/compareKey.test.js +0 -21
  76. package/src/comparison/compareKeyPath.d.ts +0 -15
  77. package/src/comparison/compareKeyPath.js +0 -33
  78. package/src/comparison/compareKeyPath.test.js +0 -28
  79. package/src/comparison/compareNumber.d.ts +0 -11
  80. package/src/comparison/compareNumber.js +0 -27
  81. package/src/comparison/compareNumber.test.js +0 -21
  82. package/src/comparison/defaultCompare.d.ts +0 -8
  83. package/src/comparison/defaultCompare.js +0 -12
  84. package/src/comparison/defaultCompare.test.js +0 -24
  85. package/src/comparison/index.d.ts +0 -7
  86. package/src/comparison/index.js +0 -7
  87. package/src/comparison/infinity.test.js +0 -122
  88. package/src/comparison/typeof.test.js +0 -64
  89. package/src/comparison/types.d.ts +0 -5
  90. package/src/comparison/types.js +0 -11
  91. package/src/deep/Deep.d.ts +0 -58
  92. package/src/deep/Deep.js +0 -267
  93. package/src/deep/Deep.test.js +0 -130
  94. package/src/deep/deepCombineLatest.test.js +0 -36
  95. package/src/deep/deepMerge.test.js +0 -34
  96. package/src/deep/differenceDeep.test.js +0 -31
  97. package/src/deep/freshValueDeep.test.js +0 -17
  98. package/src/deep/index.d.ts +0 -1
  99. package/src/deep/index.js +0 -2
  100. package/src/deep/intersectDeep.test.js +0 -25
  101. package/src/deep/intersectEntries.d.ts +0 -13
  102. package/src/deep/intersectEntries.js +0 -37
  103. package/src/deep/intersectEntries.test.js +0 -20
  104. package/src/deep/objectToDeep.test.js +0 -31
  105. package/src/deep/replaceValueDeep.test.js +0 -21
  106. package/src/deep/unionDeep.test.js +0 -30
  107. package/src/deep/zipValueDeep.test.js +0 -21
  108. package/src/deep-rxjs/ObservableArray.d.ts +0 -55
  109. package/src/deep-rxjs/ObservableArray.js +0 -94
  110. package/src/deep-rxjs/ObservableArray.test.js +0 -117
  111. package/src/deep-rxjs/index.d.ts +0 -2
  112. package/src/deep-rxjs/index.js +0 -2
  113. package/src/deep-rxjs/isRxType.d.ts +0 -9
  114. package/src/deep-rxjs/isRxType.js +0 -15
  115. package/src/deep-rxjs/isRxType.test.js +0 -43
  116. package/src/hyperscript-rxjs/HyperscriptExtensions.d.ts +0 -20
  117. package/src/hyperscript-rxjs/checkbox.d.ts +0 -13
  118. package/src/hyperscript-rxjs/checkbox.js +0 -47
  119. package/src/hyperscript-rxjs/checkbox.test.js +0 -68
  120. package/src/hyperscript-rxjs/choice.d.ts +0 -13
  121. package/src/hyperscript-rxjs/choice.js +0 -24
  122. package/src/hyperscript-rxjs/choice.test.js +0 -108
  123. package/src/hyperscript-rxjs/collapse.d.ts +0 -14
  124. package/src/hyperscript-rxjs/collapse.js +0 -32
  125. package/src/hyperscript-rxjs/collapse.test.js +0 -67
  126. package/src/hyperscript-rxjs/displays/blockLevelFamily.d.ts +0 -5
  127. package/src/hyperscript-rxjs/displays/blockLevelFamily.js +0 -51
  128. package/src/hyperscript-rxjs/displays/getDisplay.d.ts +0 -7
  129. package/src/hyperscript-rxjs/displays/getDisplay.js +0 -51
  130. package/src/hyperscript-rxjs/displays/getDisplay.test.js +0 -56
  131. package/src/hyperscript-rxjs/displays/index.d.ts +0 -3
  132. package/src/hyperscript-rxjs/displays/index.js +0 -3
  133. package/src/hyperscript-rxjs/displays/inlineFamily.d.ts +0 -5
  134. package/src/hyperscript-rxjs/displays/inlineFamily.js +0 -73
  135. package/src/hyperscript-rxjs/flip.d.ts +0 -15
  136. package/src/hyperscript-rxjs/flip.js +0 -29
  137. package/src/hyperscript-rxjs/flip.test.js +0 -85
  138. package/src/hyperscript-rxjs/fragment.d.ts +0 -10
  139. package/src/hyperscript-rxjs/fragment.js +0 -22
  140. package/src/hyperscript-rxjs/fragment.test.js +0 -70
  141. package/src/hyperscript-rxjs/hyperscript.d.ts +0 -15
  142. package/src/hyperscript-rxjs/hyperscript.js +0 -170
  143. package/src/hyperscript-rxjs/hyperscript.test.js +0 -75
  144. package/src/hyperscript-rxjs/index.d.ts +0 -19
  145. package/src/hyperscript-rxjs/index.js +0 -19
  146. package/src/hyperscript-rxjs/multiselect.d.ts +0 -18
  147. package/src/hyperscript-rxjs/multiselect.js +0 -41
  148. package/src/hyperscript-rxjs/multiselect.test.js +0 -121
  149. package/src/hyperscript-rxjs/numberbox.d.ts +0 -14
  150. package/src/hyperscript-rxjs/numberbox.js +0 -73
  151. package/src/hyperscript-rxjs/numberbox.test.js +0 -84
  152. package/src/hyperscript-rxjs/radio.d.ts +0 -15
  153. package/src/hyperscript-rxjs/radio.js +0 -53
  154. package/src/hyperscript-rxjs/radio.test.js +0 -59
  155. package/src/hyperscript-rxjs/select.d.ts +0 -28
  156. package/src/hyperscript-rxjs/select.js +0 -88
  157. package/src/hyperscript-rxjs/select.test.js +0 -101
  158. package/src/hyperscript-rxjs/tabControls/bindTabIndex.d.ts +0 -12
  159. package/src/hyperscript-rxjs/tabControls/bindTabIndex.js +0 -59
  160. package/src/hyperscript-rxjs/tabControls/index.d.ts +0 -8
  161. package/src/hyperscript-rxjs/tabControls/index.js +0 -10
  162. package/src/hyperscript-rxjs/tabControls/tabControl.d.ts +0 -19
  163. package/src/hyperscript-rxjs/tabControls/tabControl.js +0 -40
  164. package/src/hyperscript-rxjs/tabControls/tabControl.test.js +0 -98
  165. package/src/hyperscript-rxjs/tabControls/tabNavItem.d.ts +0 -9
  166. package/src/hyperscript-rxjs/tabControls/tabNavItem.js +0 -30
  167. package/src/hyperscript-rxjs/tabControls/tabPanel.d.ts +0 -9
  168. package/src/hyperscript-rxjs/tabControls/tabPanel.js +0 -21
  169. package/src/hyperscript-rxjs/tabControls/tabRoot.d.ts +0 -7
  170. package/src/hyperscript-rxjs/tabControls/tabRoot.js +0 -26
  171. package/src/hyperscript-rxjs/tags.d.ts +0 -193
  172. package/src/hyperscript-rxjs/tags.js +0 -751
  173. package/src/hyperscript-rxjs/tags.test.js +0 -75
  174. package/src/hyperscript-rxjs/textNode.d.ts +0 -11
  175. package/src/hyperscript-rxjs/textNode.js +0 -51
  176. package/src/hyperscript-rxjs/textNode.test.js +0 -56
  177. package/src/hyperscript-rxjs/textarea.d.ts +0 -17
  178. package/src/hyperscript-rxjs/textarea.js +0 -45
  179. package/src/hyperscript-rxjs/textarea.test.js +0 -52
  180. package/src/hyperscript-rxjs/textbox.d.ts +0 -15
  181. package/src/hyperscript-rxjs/textbox.js +0 -42
  182. package/src/hyperscript-rxjs/textbox.test.js +0 -52
  183. package/src/index.d.ts +0 -19
  184. package/src/index.js +0 -19
  185. package/src/nodes/attachSubscriptionToNode.d.ts +0 -13
  186. package/src/nodes/attachSubscriptionToNode.js +0 -25
  187. package/src/nodes/attachSubscriptionToNode.test.js +0 -73
  188. package/src/nodes/index.d.ts +0 -6
  189. package/src/nodes/index.js +0 -6
  190. package/src/nodes/normalizeChildNodes.d.ts +0 -9
  191. package/src/nodes/normalizeChildNodes.js +0 -15
  192. package/src/nodes/normalizeChildNodes.test.js +0 -55
  193. package/src/nodes/parseHyperscriptArgs.d.ts +0 -10
  194. package/src/nodes/parseHyperscriptArgs.js +0 -57
  195. package/src/nodes/parseHyperscriptArgs.test.js +0 -85
  196. package/src/nodes/pipeEvent.d.ts +0 -15
  197. package/src/nodes/pipeEvent.js +0 -49
  198. package/src/nodes/pipeEvent.test.js +0 -97
  199. package/src/nodes/subscribeEvent.d.ts +0 -15
  200. package/src/nodes/subscribeEvent.js +0 -56
  201. package/src/nodes/subscribeEvent.test.js +0 -88
  202. package/src/object/index.d.ts +0 -10
  203. package/src/object/index.js +0 -11
  204. package/src/object/intersectObject.d.ts +0 -12
  205. package/src/object/intersectObject.js +0 -23
  206. package/src/object/intersectObject.test.js +0 -69
  207. package/src/object/isEmptyObject.d.ts +0 -7
  208. package/src/object/isEmptyObject.js +0 -13
  209. package/src/object/isEmptyObject.test.js +0 -33
  210. package/src/object/isPlainObject.d.ts +0 -11
  211. package/src/object/isPlainObject.js +0 -18
  212. package/src/object/nestedCombineLatest.d.ts +0 -11
  213. package/src/object/nestedCombineLatest.js +0 -18
  214. package/src/object/nestedCombineLatest.test.js +0 -25
  215. package/src/object/nestedMerge.d.ts +0 -11
  216. package/src/object/nestedMerge.js +0 -11
  217. package/src/object/nestedMerge.test.js +0 -61
  218. package/src/object/pickBehaviorSubject.d.ts +0 -13
  219. package/src/object/pickBehaviorSubject.js +0 -81
  220. package/src/object/pickBehaviorSubject.test.js +0 -88
  221. package/src/object/pluckProperty.d.ts +0 -13
  222. package/src/object/pluckProperty.js +0 -24
  223. package/src/object/pluckProperty.test.js +0 -37
  224. package/src/object/restore.d.ts +0 -12
  225. package/src/object/restore.js +0 -69
  226. package/src/object/restore.test.js +0 -124
  227. package/src/object/splitObjectByObservable.d.ts +0 -12
  228. package/src/object/splitObjectByObservable.js +0 -41
  229. package/src/object/splitObjectByObservable.test.js +0 -78
  230. package/src/props/getNestedProperty.d.ts +0 -12
  231. package/src/props/getNestedProperty.js +0 -31
  232. package/src/props/getNestedProperty.test.js +0 -72
  233. package/src/props/index.d.ts +0 -7
  234. package/src/props/index.js +0 -7
  235. package/src/props/parsePropName.d.ts +0 -13
  236. package/src/props/parsePropName.js +0 -45
  237. package/src/props/parsePropName.test.js +0 -67
  238. package/src/props/setProp.d.ts +0 -16
  239. package/src/props/setProp.js +0 -42
  240. package/src/props/setProp.test.js +0 -59
  241. package/src/props/setProps.d.ts +0 -14
  242. package/src/props/setProps.js +0 -47
  243. package/src/props/setProps.test.js +0 -97
  244. package/src/props/subscribeProp.d.ts +0 -16
  245. package/src/props/subscribeProp.js +0 -47
  246. package/src/props/subscribeProp.test.js +0 -81
  247. package/src/ramda/compose.d.ts +0 -10
  248. package/src/ramda/compose.js +0 -36
  249. package/src/ramda/compose.test.js +0 -73
  250. package/src/ramda/cond.d.ts +0 -12
  251. package/src/ramda/cond.js +0 -29
  252. package/src/ramda/cond.test.js +0 -88
  253. package/src/ramda/fold.d.ts +0 -13
  254. package/src/ramda/fold.js +0 -20
  255. package/src/ramda/fold.test.js +0 -51
  256. package/src/ramda/index.d.ts +0 -6
  257. package/src/ramda/index.js +0 -6
  258. package/src/ramda/pipe.d.ts +0 -13
  259. package/src/ramda/pipe.js +0 -27
  260. package/src/ramda/pipe.test.js +0 -77
  261. package/src/ramda/unfold.d.ts +0 -11
  262. package/src/ramda/unfold.js +0 -20
  263. package/src/ramda/unfold.test.js +0 -29
  264. package/src/unquoted-json/ajax.test.js +0 -1074
  265. package/src/unquoted-json/index.d.ts +0 -13
  266. package/src/unquoted-json/index.js +0 -12
  267. package/src/unquoted-json/queryStringify.d.ts +0 -8
  268. package/src/unquoted-json/queryStringify.js +0 -70
  269. package/src/unquoted-json/queryStringify.test.js +0 -110
  270. package/src/unquoted-json/stringifyKey.d.ts +0 -7
  271. package/src/unquoted-json/stringifyKey.js +0 -16
  272. package/src/unquoted-json/stringifyKey.test.js +0 -51
  273. package/src/unquoted-json/stringifyStringValue.d.ts +0 -7
  274. package/src/unquoted-json/stringifyStringValue.js +0 -17
  275. package/src/unquoted-json/stringifyStringValue.test.js +0 -52
  276. package/src/unquoted-json/unquotedJsonStringify.d.ts +0 -7
  277. package/src/unquoted-json/unquotedJsonStringify.js +0 -39
  278. package/src/unquoted-json/unquotedJsonStringify.test.js +0 -52
@@ -0,0 +1,1438 @@
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import { HyperscriptExtensions as HyperscriptExtensions_2 } from './HyperscriptExtensions.d.ts';
3
+ import { Observable } from 'rxjs';
4
+ import { Observer as Observer_2 } from 'rxjs';
5
+ import { Subject } from 'rxjs';
6
+ import { Subscription } from 'rxjs';
7
+
8
+ export declare function a(props?: {
9
+ [_: string]: any;
10
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLAnchorElement>;
11
+
12
+ export declare function abbr(props?: {
13
+ [_: string]: any;
14
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
15
+
16
+ export declare function address(props?: {
17
+ [_: string]: any;
18
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
19
+
20
+ /**
21
+ * @template T
22
+ * @param {Array<T>} array - 要处理的原数组
23
+ * @param {number} n - 要取出的元素个数
24
+ * @returns {[Array<T>, Array<T>]} - [已取出的元素数组, 剩余元素数组]
25
+ */
26
+ export declare function advance<T>(array: Array<T>, n: number): [Array<T>, Array<T>];
27
+
28
+ export declare function area(props?: {
29
+ [_: string]: any;
30
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLAreaElement>;
31
+
32
+ /**
33
+ * insert a element at position in place.
34
+ * @param {any} array
35
+ * @param {any} item
36
+ * @param {any} index
37
+ */
38
+ export declare function arrayInsert(array: any, item: any, index?: any): void;
39
+
40
+ /**
41
+ * remove a element in place
42
+ *
43
+ * @template T
44
+ * @param {T[]} array
45
+ * @param {number} index
46
+ */
47
+ export declare function arrayRemove<T>(array: T[], index?: number): void;
48
+
49
+ export declare function article(props?: {
50
+ [_: string]: any;
51
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
52
+
53
+ export declare function aside(props?: {
54
+ [_: string]: any;
55
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
56
+
57
+ export declare function attachSubscriptionToNode(elem: Node & {
58
+ subscription?: Subscription;
59
+ }, subscription: Subscription): void;
60
+
61
+ export declare function audio(props?: {
62
+ [_: string]: any;
63
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLAudioElement>;
64
+
65
+ export declare function b(props?: {
66
+ [_: string]: any;
67
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
68
+
69
+ export declare function bdi(props?: {
70
+ [_: string]: any;
71
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
72
+
73
+ export declare function bdo(props?: {
74
+ [_: string]: any;
75
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
76
+
77
+ /**
78
+ * 绑定选项卡的激活状态到 `tabIndex`。
79
+ *
80
+ * `bindTabIndex` 函数将选项卡的导航按钮和内容面板与 `tabIndex` 绑定,
81
+ * 实现动态切换选项卡的功能。
82
+ *
83
+ * @param {HTMLElement} tabRoot - 选项卡的根容器,包含导航栏和内容面板。
84
+ * @param {BehaviorSubject<number>} tabIndex$ - 表示当前激活选项卡索引的 BehaviorSubject。
85
+ *
86
+ */
87
+ export declare function bindTabIndex(tabRoot: HTMLElement, tabIndex$: BehaviorSubject<number>): void;
88
+
89
+ /**
90
+ * 一个包含所有 HTML 块级元素标签名称的集合。
91
+ *
92
+ * 块级元素是 HTML 中的一类元素,它们通常会独占一行,并且可以包含内联元素或其他块级元素。
93
+ * 该集合中的标签名称均为大写,便于快速判断某个元素是否为块级元素。
94
+ *
95
+ * 常见的块级元素包括:
96
+ * - 文本结构元素:`P`、`H1`-`H6`、`ADDRESS` 等。
97
+ * - 列表元素:`UL`、`OL`、`LI`、`DL`、`DT`、`DD`。
98
+ * - 容器元素:`DIV`、`SECTION`、`ARTICLE`、`ASIDE`、`NAV` 等。
99
+ * - 表单元素:`FORM`、`FIELDSET`。
100
+ * - 表格元素:`TABLE`。
101
+ * - 其他:`BLOCKQUOTE`、`PRE`、`FIGURE` 等。
102
+ *
103
+ * @constant {Set<string>} blockLevelFamily
104
+ */
105
+ export declare const blockLevelFamily: Set<string>;
106
+
107
+ export declare function blockquote(props?: {
108
+ [_: string]: any;
109
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
110
+
111
+ export declare function br(props?: {
112
+ [_: string]: any;
113
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLBRElement>;
114
+
115
+ export declare function button(props?: {
116
+ [_: string]: any;
117
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLButtonElement>;
118
+
119
+ export declare function caption(props?: {
120
+ [_: string]: any;
121
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
122
+
123
+ /**
124
+ * @typedef {import("./HyperscriptExtensions.d.ts").HyperscriptExtensions<HTMLInputElement>} HyperscriptInputElement
125
+ */
126
+ /**
127
+ * 创建一个支持 RxJS 的复选框组件。
128
+ *
129
+ * @param {{checked?:BehaviorSubject<boolean>, [key: string]: any}} props - 复选框的属性对象。
130
+ * @returns {HyperscriptInputElement} - 返回一个复选框元素。
131
+ */
132
+ export declare function checkbox(props: {
133
+ checked?: BehaviorSubject<boolean>;
134
+ [key: string]: any;
135
+ }): HyperscriptInputElement;
136
+
137
+ /**
138
+ * @param {Observable<string>} chosen$
139
+ * @param {Record<string, HTMLElement | HTMLElement[]>} possibilities
140
+ * @returns {HTMLElement[]}
141
+ */
142
+ export declare function choice(chosen$: Observable<string>, possibilities: Record<string, HTMLElement | HTMLElement[]>): HTMLElement[];
143
+
144
+ export declare function cite(props?: {
145
+ [_: string]: any;
146
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
147
+
148
+ export declare function code(props?: {
149
+ [_: string]: any;
150
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
151
+
152
+ export declare function col(props?: {
153
+ [_: string]: any;
154
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
155
+
156
+ export declare function colgroup(props?: {
157
+ [_: string]: any;
158
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableColElement>;
159
+
160
+ /**
161
+ * 显示或隐藏包含的元素。
162
+ *
163
+ * `collapse` 函数通过绑定 `hidden` 属性,实现一组 HTML 元素的动态显示或隐藏。
164
+ *
165
+ * @param {Observable<boolean>} hidden$ - 一个可观察对象(如 BehaviorSubject),用于控制元素的 `hidden` 属性。
166
+ * @param {...HTMLElement|HTMLElement[]} elements - 一个或多个 HTML 元素,或者包含 HTML 元素的数组。
167
+ * @returns {HTMLElement[]} - 处理后的元素数组。
168
+ *
169
+ * @throws {Error} 如果 `elements` 中包含非元素节点(如 TextNode)。
170
+ *
171
+ */
172
+ export declare function collapse(hidden$: Observable<boolean>, ...elements: (HTMLElement | HTMLElement[])[]): HTMLElement[];
173
+
174
+ /**
175
+ * 比较两个日期对象的大小。
176
+ *
177
+ * @public
178
+ * @param {Date} a - 第一个日期
179
+ * @param {Date} b - 第二个日期
180
+ * @returns {number} 如果 a > b 返回正数,a < b 返回负数,相等返回 0
181
+ */
182
+ export declare function compareDate(a: Date, b: Date): number;
183
+
184
+ /**
185
+ * 比较两个 entries(key-value 对)。依据他们的 key path。
186
+ *
187
+ * @public
188
+ * @param {[(number|string)[], any]} entry1 - 第一个 entry,key 为 key path(键路径数组)
189
+ * @param {[(number|string)[], any]} entry2 - 第二个 entry,key 为 key path(键路径数组)
190
+ * @returns {number} 若 entry1 < entry2 返回负数,相等返回 0,大于返回正数
191
+ */
192
+ export declare function compareEntries([keypath1]: [(number | string)[], any], [keypath2]: [(number | string)[], any]): number;
193
+
194
+ /**
195
+ *
196
+ * Compares two values and returns a number indicating their relative order.
197
+ * @param {number|string} a - The first value to compare.
198
+ * @param {number|string} b - The second value to compare.
199
+ * @returns {number} -1 if a < b, 1 if a > b, or 0 if they are equal.
200
+ *
201
+ */
202
+ export declare function compareKey(a: number | string, b: number | string): number;
203
+
204
+ /**
205
+ * 比较两个 key path(键路径数组)。
206
+ *
207
+ * @public
208
+ * @param {(number|string)[]} a - 第一个 key path
209
+ * @param {(number|string)[]} b - 第二个 key path
210
+ * @returns {number} 若 a < b 返回负数,相等返回 0,大于返回正数
211
+ */
212
+ export declare function compareKeyPath(a: (number | string)[], b: (number | string)[]): number;
213
+
214
+ /**
215
+ * 可以比较NaN,Infinity,number,bigint
216
+ * @param {number|bigint} a
217
+ * @param {number|bigint} b
218
+ */
219
+ export declare function compareNumber(a: number | bigint, b: number | bigint): number;
220
+
221
+ /**
222
+ * 用于比较和操作数组及集合的工具类。
223
+ *
224
+ * @public
225
+ * @template T
226
+ */
227
+ export declare class Comparer<T> {
228
+ /**
229
+ * @param {(a: T, b: T) => number} compare - 比较函数
230
+ */
231
+ constructor(compare: (a: T, b: T) => number);
232
+ compare: (a: T, b: T) => number;
233
+ /**
234
+ * 使用实例的比较函数对数组进行排序。
235
+ * @param {T[]} array - 要排序的数组
236
+ * @returns {T[]} 排序后的数组
237
+ */
238
+ sort(array: T[]): T[];
239
+ /**
240
+ * 移除数组中的重复值。
241
+ * @param {T[]} array - 要处理的数组
242
+ * @returns {T[]} 去重后的新数组
243
+ */
244
+ distinct(array: T[]): T[];
245
+ /**
246
+ * 将已排序的数组转为集合(去重)。
247
+ * @param {T[]} array - 已排序的数组
248
+ * @returns {T[]} 唯一元素数组
249
+ */
250
+ sortedArrayToSet(array: T[]): T[];
251
+ /**
252
+ * 根据 getKey 生成的 key 对数组元素分组。
253
+ * @template U
254
+ * @param {U[]} array - 要分组的数组
255
+ * @param {(item:U) => T} getKey - 生成分组 key 的函数
256
+ * @returns {[T, U[]][]} 分组后的对象或数组
257
+ */
258
+ groupBy<U>(array: U[], getKey: (item: U) => T): [T, U[]][];
259
+ /**
260
+ * 对已排序的数组按 key 分组。
261
+ * @template V
262
+ * @param {[T,V][]} array - 已排序的数组
263
+ * @returns {[T, V[]][]} 分组结果
264
+ */
265
+ groupSortedEntries<V>(array: [T, V][]): [T, V[]][];
266
+ /**
267
+ * 计算两个数组的差集。数组元素是升序排列
268
+ * @param {T[]} array1 - 第一个数组
269
+ * @param {T[]} array2 - 第二个数组
270
+ * @returns {T[]} array1 中有而 array2 中没有的元素
271
+ */
272
+ differenceSet(array1: T[], array2: T[]): T[];
273
+ /**
274
+ * 计算两个数组的交集。
275
+ * @param {T[]} array1 - 第一个数组
276
+ * @param {T[]} array2 - 第二个数组
277
+ * @returns {T[]} 同时存在于 array1 和 array2 的元素
278
+ */
279
+ intersectSet(array1: T[], array2: T[]): T[];
280
+ /**
281
+ * 计算两个数组的并集(去重)。
282
+ * @param {T[]} array1 - 第一个数组
283
+ * @param {T[]} array2 - 第二个数组
284
+ * @returns {T[]} 两个数组的唯一元素合集
285
+ */
286
+ unionSet(array1: T[], array2: T[]): T[];
287
+ /**
288
+ * 在集合(数组)中查找元素的索引。
289
+ * @param {T[]} set - 要查找的数组
290
+ * @param {T} element - 要查找的元素
291
+ * @returns {number} 元素在集合中的索引,未找到返回 -1
292
+ */
293
+ findIndexInSet(set: T[], element: T): number;
294
+ /**
295
+ * 判断两个数组作为集合是否相等。
296
+ * @param {T[]} array1 - 第一个数组
297
+ * @param {T[]} array2 - 第二个数组
298
+ * @returns {boolean} 如果集合相等返回 true,否则返回 false
299
+ */
300
+ isEqualset(array1: T[], array2: T[]): boolean;
301
+ /**
302
+ * 判断第一个数组是否为第二个数组的子集。
303
+ * @param {T[]} array1 - 第一个数组
304
+ * @param {T[]} array2 - 第二个数组
305
+ * @returns {boolean} 如果 array1 是 array2 的子集返回 true,否则返回 false
306
+ */
307
+ isSubset(array1: T[], array2: T[]): boolean;
308
+ /**
309
+ * 判断第一个数组是否为第二个数组的超集。
310
+ * @param {T[]} array1 - 第一个数组
311
+ * @param {T[]} array2 - 第二个数组
312
+ * @returns {boolean} 如果 array1 是 array2 的超集返回 true,否则返回 false
313
+ */
314
+ isSuperset(array1: T[], array2: T[]): boolean;
315
+ }
316
+
317
+ export declare function compose(...fns: ((arg: any) => any)[]): (arg: any) => any;
318
+
319
+ export declare function cond(branches: Array<Function | [Function, Function]>): (...args: any[]) => any;
320
+
321
+ export declare function data(props?: {
322
+ [_: string]: any;
323
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLDataElement>;
324
+
325
+ export declare function datalist(props?: {
326
+ [_: string]: any;
327
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLDataListElement>;
328
+
329
+ export declare function dd(props?: {
330
+ [_: string]: any;
331
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
332
+
333
+ /**
334
+ * 深度(嵌套)数据结构类,用于处理按键路径排序的键值对集合。
335
+ * 提供了多种操作方法,包括集合操作、序列操作和数据转换。
336
+ *
337
+ * @template T
338
+ *
339
+ */
340
+ export declare class Deep<T> {
341
+ /**
342
+ *
343
+ * @param {{[_:string|number]:any}} obj
344
+ * @param {(value: any, key: string | number, keyPath: (string | number)[]) => boolean} [filter]
345
+ * @returns
346
+ */
347
+ static fromObject(obj: {
348
+ [_: string | number]: any;
349
+ }, filter?: (value: any, key: string | number, keyPath: (string | number)[]) => boolean): Deep<any>;
350
+ /**
351
+ * @template T
352
+ * @param {{[_:string|number]:any}} obj
353
+ * @returns {Deep<BehaviorSubject<T>>}
354
+ */
355
+ static fromBehaviorSubject<T_1>(obj: {
356
+ [_: string | number]: any;
357
+ }): Deep<BehaviorSubject<T_1>>;
358
+ /**
359
+ * @template T
360
+ * @param {{[_:string|number]:any}} obj
361
+ * @returns
362
+ */
363
+ static fromObservable<T_1>(obj: {
364
+ [_: string | number]: any;
365
+ }): Deep<any>;
366
+ /**
367
+ * 构造函数。
368
+ *
369
+ * @param {[(string|number)[], T][]} entries - 按键路径排序的键值对数组。键值对已经按keypath排序。
370
+ */
371
+ constructor(entries: [(string | number)[], T][]);
372
+ _entries: [(string | number)[], T][];
373
+ _keys: (string | number)[][];
374
+ get entries(): [(string | number)[], T][];
375
+ get keys(): (string | number)[][];
376
+ getValues(): T[];
377
+ /**
378
+ * 将深度数据结构转换为普通对象。
379
+ *
380
+ * @returns {Record<string|number, any>} 转换后的普通对象。
381
+ */
382
+ toObject(): Record<string | number, any>;
383
+ /**
384
+ *
385
+ * @param {(string|number)[]} searchKeyPath
386
+ * @returns
387
+ */
388
+ findIndex(searchKeyPath: (string | number)[]): number;
389
+ /**
390
+ *
391
+ * @param {(string|number)[][]} keys
392
+ * @returns
393
+ */
394
+ structuralEqual(keys: (string | number)[][]): boolean;
395
+ /**
396
+ *
397
+ * @param {(string|number)[][]} keys
398
+ * @returns
399
+ */
400
+ structuralSubset(keys: (string | number)[][]): boolean;
401
+ /**
402
+ *
403
+ * @param {(string|number)[][]} keys
404
+ * @returns
405
+ */
406
+ structuralSuperset(keys: (string | number)[][]): boolean;
407
+ /**
408
+ * @param {(string|number)[][]} keys
409
+ * @this {Deep<T>}
410
+ * @returns {Deep<T>}
411
+ */
412
+ intersect(this: Deep<T>, keys: (string | number)[][]): Deep<T>;
413
+ /**
414
+ *
415
+ * @param {(string|number)[][]} keys
416
+ * @this {Deep<T>}
417
+ * @returns {Deep<T>}
418
+ */
419
+ difference(this: Deep<T>, keys: (string | number)[][]): Deep<T>;
420
+ /**
421
+ * 后来者赢(参数赢)
422
+ * @param {[(string | number)[], T][]} entries
423
+ * @returns
424
+ */
425
+ union(entries: [(string | number)[], T][]): Deep<any>;
426
+ /**
427
+ *
428
+ * @template U
429
+ * @param {(value: [(string | number)[], T], index: number, array: [(string | number)[], T][]) => U} callbackfn 返回的是值,而不是键值对,KeyPath保持不变
430
+ * @param {Deep<T>} [thisArg]
431
+ * @this {Deep<T>}
432
+ * @returns {Deep<U>}
433
+ *
434
+ */
435
+ map<U>(this: Deep<T>, callbackfn: (value: [(string | number)[], T], index: number, array: [(string | number)[], T][]) => U, thisArg?: Deep<T>): Deep<U>;
436
+ /**
437
+ *
438
+ * @param {(value: [(string | number)[], T], index: number, array: [(string | number)[], T][]) => boolean} predicate
439
+ * @param {Deep<T>} [thisArg]
440
+ * @returns
441
+ */
442
+ filter(predicate: (value: [(string | number)[], T], index: number, array: [(string | number)[], T][]) => boolean, thisArg?: Deep<T>): Deep<T>;
443
+ /**
444
+ *
445
+ * @param { (value: [(string | number)[], T], index: number, array: [(string | number)[], T][]) => void} callbackfn
446
+ * @param {Deep<T>} [thisArg]
447
+ * @returns
448
+ */
449
+ forEach(callbackfn: (value: [(string | number)[], T], index: number, array: [(string | number)[], T][]) => void, thisArg?: Deep<T>): void;
450
+ /**
451
+ * 修改部分个别数值
452
+ * @param {Record<string|number,any>} obj
453
+ * @this {Deep<T>}
454
+ * @returns
455
+ */
456
+ freshValue(this: Deep<T>, obj: Record<string | number, any>): Deep<any>;
457
+ /**
458
+ * 按列替换数值
459
+ * @template U
460
+ * @param {U[]} values
461
+ * @this {Deep<T>}
462
+ * @returns {Deep<U>}
463
+ */
464
+ replaceValue<U>(this: Deep<T>, values: U[]): Deep<U>;
465
+ /**
466
+ * 按列替换数值,保留原有数值
467
+ * @template U
468
+ * @param {U[]} values
469
+ * @this {Deep<T>}
470
+ * @returns {Deep<[T,U]>}
471
+ */
472
+ zipValue<U>(this: Deep<T>, values: U[]): Deep<[T, U]>;
473
+ /**
474
+ * 返回Observable of 总体的当前值
475
+ * @template U
476
+ * @this {Deep<Observable<U>>}
477
+ * @returns {Observable<Deep<U>>}
478
+ */
479
+ combineLatest<U>(this: Deep<Observable<U>>): Observable<Deep<U>>;
480
+ /**
481
+ * 返回发射消息的那一个成员的路径以及新值。
482
+ * @template U
483
+ * @this {Deep<Observable<U>>}
484
+ * @returns {Observable<[(string|number)[], U]>}
485
+ */
486
+ merge<U>(this: Deep<Observable<U>>): Observable<[(string | number)[], U]>;
487
+ }
488
+
489
+ /**
490
+ * 默认比较函数,适用于可比较的基本类型。
491
+ *
492
+ * @public
493
+ * @template T
494
+ * @param {T} a - 第一个值
495
+ * @param {T} b - 第二个值
496
+ * @returns {number} 如果 a > b 返回 1,a < b 返回 -1,相等返回 0
497
+ */
498
+ export declare function defaultCompare<T>(a: T, b: T): number;
499
+
500
+ export declare const defaultComparer: Comparer<any>;
501
+
502
+ export declare function del(props?: {
503
+ [_: string]: any;
504
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
505
+
506
+ export declare function details(props?: {
507
+ [_: string]: any;
508
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLDetailsElement>;
509
+
510
+ export declare function dfn(props?: {
511
+ [_: string]: any;
512
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
513
+
514
+ export declare function dialog(props?: {
515
+ [_: string]: any;
516
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLDialogElement>;
517
+
518
+ export declare function div(props?: {
519
+ [_: string]: any;
520
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLDivElement>;
521
+
522
+ export declare function dl(props?: {
523
+ [_: string]: any;
524
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLDListElement>;
525
+
526
+ export declare function dt(props?: {
527
+ [_: string]: any;
528
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
529
+
530
+ export declare function em(props?: {
531
+ [_: string]: any;
532
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
533
+
534
+ export declare const entryComparer: Comparer<[(string | number)[], any]>;
535
+
536
+ /**
537
+ * 从扁平化的数据集构建嵌套的 JavaScript 对象。
538
+ *
539
+ * @param {[ (string | number)[], any ][]} entries - 扁平化的键值对数组。
540
+ * 每个键值对的格式为 `[keyPath, value]`,其中 `keyPath` 是一个表示嵌套路径的数组。
541
+ * @returns {object | any[]} - 返回嵌套的 JavaScript 对象或数组。
542
+ */
543
+ export declare function erectObject(entries: [(string | number)[], any][]): object | any[];
544
+
545
+ export declare function fieldset(props?: {
546
+ [_: string]: any;
547
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLFieldSetElement>;
548
+
549
+ export declare function figcaption(props?: {
550
+ [_: string]: any;
551
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
552
+
553
+ export declare function figure(props?: {
554
+ [_: string]: any;
555
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
556
+
557
+ /**
558
+ * 查找数组中最后一个满足条件的元素索引。
559
+ *
560
+ * @public
561
+ * @template T
562
+ * @param {T[]} array - 要查找的数组
563
+ * @param {(value: T, index: number) => boolean} callbackFn - 判断函数,返回 true 表示找到
564
+ * @param {number} [lastIndex=array.length-1] - 可选,查找的起始索引(从后往前)
565
+ * @returns {number} - 最后一个满足条件的元素索引,未找到返回 -1
566
+ */
567
+ export declare function findLastIndex<T>(array: T[], callbackFn: (value: T, index: number) => boolean, lastIndex?: number): number;
568
+
569
+ export declare function flat(data: any, isLeaf?: (value: any, key: string | number, keyPath: (string | number)[]) => boolean): [(string | number)[], any][];
570
+
571
+ /**
572
+ * 动态切换两个元素或元素数组的显示状态。
573
+ *
574
+ * `flip` 函数根据 `yinHidden$` 的值动态控制 `yinElement` 和 `yangElement` 的显示状态:
575
+ * - 当 `yinHidden$` 为 `true` 时,隐藏 `yinElement`,显示 `yangElement`。
576
+ * - 当 `yinHidden$` 为 `false` 时,显示 `yinElement`,隐藏 `yangElement`。
577
+ *
578
+ * @param {Observable<boolean>} yinHidden$ - 一个 Observable,表示 `yinElement` 是否隐藏。
579
+ * @param {HTMLElement|HTMLElement[]} yin - 需要动态控制显示状态的第一个元素或元素数组。
580
+ * @param {HTMLElement|HTMLElement[]} yang - 需要动态控制显示状态的第二个元素或元素数组。
581
+ * @returns {HTMLElement[]} - 包含所有元素的数组。
582
+ *
583
+ */
584
+ export declare function flip(yinHidden$: Observable<boolean>, yin: HTMLElement | HTMLElement[], yang: HTMLElement | HTMLElement[]): HTMLElement[];
585
+
586
+ /**
587
+ * 通用折叠(递归归约)函数。
588
+ *
589
+ * @public
590
+ * @param {(this:any, acc: any, seed: any) => [*, *]|[any]|[]|null|undefined} fn - 处理函数,返回 [新acc, 新seed] 或 [新acc]
591
+ * @param {*} acc - 初始累加值
592
+ * @param {*} seed - 初始种子
593
+ * @returns {*} 折叠后的结果
594
+ * @this *
595
+ */
596
+ export declare function fold(this: any, fn: (this: any, acc: any, seed: any) => [any, any] | [any] | [] | null | undefined, acc: any, seed: any): any;
597
+
598
+ export declare function footer(props?: {
599
+ [_: string]: any;
600
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
601
+
602
+ export declare function form(props?: {
603
+ [_: string]: any;
604
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLFormElement>;
605
+
606
+ /**
607
+ * 用途:插入一组元素,不必使用循环语句,fragment 用后即弃。
608
+ *
609
+ * @param {...Node|Node[]} childNodes - 要插入的子节点,可以是单个节点、多个节点或节点数组。
610
+ * @returns {DocumentFragment} - 返回包含所有子节点的 DocumentFragment。
611
+ * @throws {Error} 如果传入的子节点不是有效的 DOM 节点。
612
+ */
613
+ export declare function fragment(...childNodes: (Node | Node[])[]): DocumentFragment;
614
+
615
+ /**
616
+ * 获取 HTML 元素的默认 CSS `display` 值。
617
+ *
618
+ * 根据元素的标签名称 (`tagName`),返回其对应的默认 `display` 属性值。
619
+ * 支持表格相关标签、块级元素、内联元素等常见 HTML 标签。
620
+ *
621
+ * @param {HTMLElement} elem - 要获取 `display` 值的 HTML 元素。
622
+ * @returns {string} - 元素的默认 `display` 值:
623
+ * - 表格相关标签:
624
+ * - `TBODY` -> `'table-row-group'`
625
+ * - `THEAD` -> `'table-header-group'`
626
+ * - `TFOOT` -> `'table-footer-group'`
627
+ * - `TR` -> `'table-row'`
628
+ * - `TD`、`TH` -> `'table-cell'`
629
+ * - `COLGROUP` -> `'table-column-group'`
630
+ * - `COL` -> `'table-column'`
631
+ * - `CAPTION` -> `'table-caption'`
632
+ * - 块级元素 -> `'block'`
633
+ * - 内联元素 -> `'inline'`
634
+ * - 未知标签 -> `'unset'`
635
+ *
636
+ */
637
+ export declare function getDisplay(elem: HTMLElement): string;
638
+
639
+ /**
640
+ * 根据属性路径数组读取对象的嵌套属性值。
641
+ * @param {Record<string | number, any>} obj - 要读取属性的对象。
642
+ * @param {(string | number)[]} keyPath - 属性路径数组,例如 ['a', 'b'] 表示 obj.a.b。
643
+ * @returns {any} - 返回目标属性的值,如果路径为空数组,则返回对象本身。
644
+ * @throws {Error} 如果路径中的某一级属性不存在或输入无效。
645
+ */
646
+ export declare function getNestedProperty(obj: Record<string | number, any>, keyPath: (string | number)[]): any;
647
+
648
+ /**
649
+ * Groups an array of flattened entries by their first level key.
650
+ * This function is memory-optimized and adapted from `groupArrayBy`.
651
+ *
652
+ * @param {[ (string | number)[], any ][]} flatEntries - Array of flattened entries to be grouped.
653
+ * Each entry is of the form [[key, ...keyPath], value] where:
654
+ * - The first element is an array representing the key path (first element is primary key)
655
+ * - The second element is the associated value
656
+ * @returns {[ string | number, [ (string | number)[], any ][] ][]} An array of grouped entries where:
657
+ * - Each entry is a tuple [key, group]
658
+ * - key is the first-level grouping key (string|number)
659
+ * - group is an array of entries sharing that key, each of form [keyPath, value]
660
+ *
661
+ */
662
+ export declare function groupByFirstLevelKey(flatEntries: [(string | number)[], any][]): [string | number, [(string | number)[], any][]][];
663
+
664
+ export declare function h1(props?: {
665
+ [_: string]: any;
666
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
667
+
668
+ export declare function h2(props?: {
669
+ [_: string]: any;
670
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
671
+
672
+ export declare function h3(props?: {
673
+ [_: string]: any;
674
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
675
+
676
+ export declare function h4(props?: {
677
+ [_: string]: any;
678
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
679
+
680
+ export declare function h5(props?: {
681
+ [_: string]: any;
682
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
683
+
684
+ export declare function h6(props?: {
685
+ [_: string]: any;
686
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLHeadingElement>;
687
+
688
+ export declare function header(props?: {
689
+ [_: string]: any;
690
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
691
+
692
+ export declare function hgroup(props?: {
693
+ [_: string]: any;
694
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
695
+
696
+ export declare function hr(props?: {
697
+ [_: string]: any;
698
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLHRElement>;
699
+
700
+ /**
701
+ * @typedef {import("./HyperscriptExtensions.d.ts").HyperscriptExtensions<HTMLElement>} HyperscriptElement
702
+ */
703
+ /**
704
+ * Creates an HTML element with extended event handling capabilities
705
+ * @public
706
+ * @param {string} elemName - The HTML element tag name
707
+ * @param {...any} args - Optional properties and child nodes
708
+ * @returns {HyperscriptElement} The created element with extended methods
709
+ * @throws {Error} If elemName is not a valid HTML element tag name
710
+ */
711
+ export declare function hyperscript(elemName: string, ...args: any[]): HyperscriptElement;
712
+
713
+ export declare type HyperscriptElement = HyperscriptExtensions_2<HTMLElement>;
714
+
715
+ export declare type HyperscriptExtensions<T extends HTMLElement> = HyperscriptExtensions_2<T>;
716
+
717
+ declare type HyperscriptExtensions_3<T extends HTMLElement> =
718
+ T & {
719
+
720
+ pipeEvent(
721
+ event: string,
722
+ subscriber: (input$: Observable<Event>) => Subscription
723
+ ): HyperscriptExtensions_3<T>;
724
+
725
+ subscribeEvent(
726
+ event: string,
727
+ observer: ((value: Event) => void) | Partial<Observer_2<Event>>
728
+ ): HyperscriptExtensions_3<T>;
729
+
730
+ unsubscribe(): void;
731
+
732
+ subscription?: Subscription;
733
+
734
+ };
735
+
736
+ export declare type HyperscriptInputElement = HyperscriptExtensions_2<HTMLInputElement>;
737
+
738
+ declare type HyperscriptInputElement_2 = HyperscriptExtensions_3<HTMLInputElement>;
739
+
740
+ export declare type HyperscriptSelectElement = HyperscriptExtensions_2<HTMLSelectElement>;
741
+
742
+ declare type HyperscriptSelectElement_2 = HyperscriptExtensions_3<HTMLSelectElement>;
743
+
744
+ declare type HyperscriptTextAreaElement = HyperscriptExtensions_3<HTMLTextAreaElement>;
745
+
746
+ export declare function i(props?: {
747
+ [_: string]: any;
748
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
749
+
750
+ export declare function img(props?: {
751
+ [_: string]: any;
752
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLImageElement>;
753
+
754
+ /**
755
+ * 一个包含所有 HTML 内联元素标签名称的集合。
756
+ *
757
+ * 内联元素是 HTML 中的一类元素,它们不会独占一行,通常用于包裹文本或其他内联元素。
758
+ * 该集合中的标签名称均为大写,便于快速判断某个元素是否为内联元素。
759
+ *
760
+ * 常见的内联元素包括:
761
+ * - 文本样式:`B`、`I`、`U`、`STRONG`、`EM`、`MARK` 等。
762
+ * - 链接和交互:`A`、`BUTTON`、`LABEL`、`INPUT`、`SELECT`、`TEXTAREA` 等。
763
+ * - 媒体和嵌入:`IMG`、`SVG`、`VIDEO`、`AUDIO`、`CANVAS` 等。
764
+ * - 其他:`SPAN`、`BR`、`WBR`、`CODE`、`Q` 等。
765
+ *
766
+ * @constant {Set<string>} inlineFamily
767
+ */
768
+ export declare const inlineFamily: Set<string>;
769
+
770
+ export declare function input(props?: {
771
+ [_: string]: any;
772
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLInputElement>;
773
+
774
+ export declare function ins(props?: {
775
+ [_: string]: any;
776
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLModElement>;
777
+
778
+ /**
779
+ * Creates an object composed of the picked object properties.
780
+ * @param {Record<string,any>} obj - Source object
781
+ * @param {string[]} keys - Array of property keys to pick
782
+ * @returns {Record<string,any>} New object with picked properties
783
+ * @throws {TypeError} If obj is not an object or keys is not an array
784
+ */
785
+ export declare function intersectObject(obj: Record<string, any>, keys: string[]): Record<string, any>;
786
+
787
+ export declare function isEmptyObject(obj: unknown): obj is Record<never, never>;
788
+
789
+ /**
790
+ * 检查一个值是否是普通对象(Plain Object)
791
+ * @param {unknown} value - 要检查的值
792
+ * @returns {value is object} - 返回是否是普通对象的类型谓词
793
+ */
794
+ export declare function isPlainObject(value: unknown): value is object;
795
+
796
+ /**
797
+ * 判断输入的字符串数组是否为从0开始的连续数字区间(如 ['0','1','2',...])。
798
+ *
799
+ * @public
800
+ * @param {string[]} keys - 要检查的字符串数组
801
+ * @returns {boolean} - 如果是从0开始的连续数字区间返回 true,否则返回 false
802
+ */
803
+ export declare function isRange(keys: string[]): boolean;
804
+
805
+ /**
806
+ * 检查对象是否为 RxJS 类型。
807
+ *
808
+ * `isRxType` 函数用于判断给定的对象是否为 RxJS 的 `Observable` 或 `Subscription` 类型。
809
+ *
810
+ * @param {any} obj - 要检查的对象。
811
+ * @returns {boolean} - 如果对象是 `Observable` 或 `Subscription`,返回 `true`;否则返回 `false`。
812
+ *
813
+ */
814
+ export declare function isRxType(obj: any): boolean;
815
+
816
+ export declare function kbd(props?: {
817
+ [_: string]: any;
818
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
819
+
820
+ export declare const keyComparer: Comparer<string | number>;
821
+
822
+ export declare const keyPathComparer: Comparer<(string | number)[]>;
823
+
824
+ export declare function label(props?: {
825
+ [_: string]: any;
826
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLLabelElement>;
827
+
828
+ export declare function legend(props?: {
829
+ [_: string]: any;
830
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLLegendElement>;
831
+
832
+ export declare function li(props?: {
833
+ [_: string]: any;
834
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLLIElement>;
835
+
836
+ export declare function main(props?: {
837
+ [_: string]: any;
838
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
839
+
840
+ export declare function mark(props?: {
841
+ [_: string]: any;
842
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
843
+
844
+ export declare function menu(props?: {
845
+ [_: string]: any;
846
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLMenuElement>;
847
+
848
+ export declare function menuitem(props?: {
849
+ [_: string]: any;
850
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
851
+
852
+ export declare function meter(props?: {
853
+ [_: string]: any;
854
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLMeterElement>;
855
+
856
+ /**
857
+ * @typedef {import("./HyperscriptExtensions.d.ts").HyperscriptExtensions<HTMLSelectElement>} HyperscriptSelectElement
858
+ */
859
+ /**
860
+ * 创建一个支持多选功能的 <select> 元素,并绑定选项的选中状态。必须手动添加控件更新BehaviorSubject的事件。
861
+ *
862
+ * @param {{oninput?: (e:Event)=>void, onchange?: (e:Event)=>void, [key: string]: any}} props - 配置对象,包含 <select> 元素的属性。
863
+ * @param {...HTMLOptionElement} options - 一个或多个 <option> 元素,必须是 HTMLOptionElement 类型。
864
+ * 每个选项需要包含一个 `selected` 属性,该属性是一个 BehaviorSubject ,用于绑定选中状态。
865
+ * @returns {HyperscriptSelectElement} - 创建的 <select> 元素。
866
+ * @throws {Error} 如果 `props` 不是对象,或者 `options` 中的选项未正确定义 `selected` 属性。
867
+ *
868
+ */
869
+ export declare function multiselect(props: {
870
+ oninput?: (e: Event) => void;
871
+ onchange?: (e: Event) => void;
872
+ [key: string]: any;
873
+ }, ...options: HTMLOptionElement[]): HyperscriptSelectElement;
874
+
875
+ export declare function nav(props?: {
876
+ [_: string]: any;
877
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
878
+
879
+ /**
880
+ *
881
+ * @param {Record<string|number, any>} model
882
+ * @returns {Observable<Record<string|number, any>>}
883
+ */
884
+ export declare function nestedCombineLatest(model: Record<string | number, any>): Observable<Record<string | number, any>>;
885
+
886
+ /**
887
+ *
888
+ * @param {Record<string|number, any>} model
889
+ * @returns {Observable<[(string | number)[], any]>}
890
+ */
891
+ export declare function nestedMerge(model: Record<string | number, any>): Observable<[(string | number)[], any]>;
892
+
893
+ /**
894
+ * 规范化子节点,将非节点转换为文本节点。
895
+ *
896
+ * @param {any[]} childNodes - 子节点数组。
897
+ * @returns {Node[]} - 返回规范化后的节点数组。
898
+ */
899
+ export declare function normalizeChildNodes(childNodes: any[]): Node[];
900
+
901
+ /**
902
+ * 创建一个支持双向绑定的数字输入框。
903
+ *
904
+ * `numberbox` 是一个自定义的输入框组件,支持通过 RxJS 的 `BehaviorSubject` 实现数字值的双向绑定。
905
+ * @public
906
+ * @param {{ number: BehaviorSubject<number>; [key: string]: any;}} props - 配置对象,包含输入框的属性。
907
+ * @returns {HyperscriptInputElement} - 创建的数字输入框元素。
908
+ * @throws {Error} 如果 `props` 不是对象,或者 `number` 不是 `BehaviorSubject` 实例。
909
+ *
910
+ */
911
+ export declare function numberbox(props: {
912
+ number: BehaviorSubject<number>;
913
+ [key: string]: any;
914
+ }): HyperscriptInputElement_2;
915
+
916
+ /**
917
+ * ObservableArray 是一个可观察的数组,支持 insertBefore、removeChild、replaceChild 操作,
918
+ * 并通过 RxJS Subject 通知变化,适用于响应式 DOM 操作场景。
919
+ *
920
+ * @template T
921
+ * @extends Array<T>
922
+ */
923
+ export declare class ObservableArray<T> extends Array<T> {
924
+ /**
925
+ * @constructor 创建一个 ObservableArray 实例。禁止传参。
926
+ * @param {()=>T} newItem
927
+ * @throws {Error} 如果传入参数则抛出异常。
928
+ */
929
+ constructor(newItem: () => T);
930
+ newitem: () => T;
931
+ /**
932
+ * 变化通知的 Subject。
933
+ * @type {Subject<any[]>}
934
+ */
935
+ action$: Subject<any[]>;
936
+ /**
937
+ * 插入元素事件流,发出 [item, index]。
938
+ * @type {import('rxjs').Observable<[T, number]>}
939
+ */
940
+ insertBefore$: Observable<[T, number]>;
941
+ /**
942
+ * 删除元素事件流,发出 index。
943
+ * @type {import('rxjs').Observable<number>}
944
+ */
945
+ removeChild$: Observable<number>;
946
+ /**
947
+ * 替换元素事件流,发出 [item, index]。
948
+ * @type {import('rxjs').Observable<[T, number]>}
949
+ */
950
+ replaceChild$: Observable<[T, number]>;
951
+ /**
952
+ * 在指定位置插入元素,并通知变化。
953
+ * @param {T} item 要插入的元素
954
+ * @param {number} [index=this.length] 插入位置,默认为数组末尾
955
+ */
956
+ insertBefore(item: T, index?: number): void;
957
+ /**
958
+ * 删除指定位置的元素,并通知变化。
959
+ * @param {number} [index=this.length-1] 删除位置,默认为数组末尾
960
+ */
961
+ removeChild(index?: number): void;
962
+ /**
963
+ * 替换指定位置的元素,并通知变化。
964
+ * @param {T} item 新元素
965
+ * @param {number} index 替换位置
966
+ */
967
+ replaceChild(item: T, index: number): void;
968
+ /**
969
+ * 附加一个默认子元素
970
+ */
971
+ appendChild(): void;
972
+ }
973
+
974
+ export declare type ObservableTextNode = Text & {
975
+ subscription?: Subscription;
976
+ unsubscribe?: () => void;
977
+ };
978
+
979
+ export declare type Observer<T> = Observer_2<T>;
980
+
981
+ export declare function ol(props?: {
982
+ [_: string]: any;
983
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLOListElement>;
984
+
985
+ export declare function optgroup(props?: {
986
+ [_: string]: any;
987
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLOptGroupElement>;
988
+
989
+ export declare function option(props?: {
990
+ [_: string]: any;
991
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLOptionElement>;
992
+
993
+ export declare function output(props?: {
994
+ [_: string]: any;
995
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLOutputElement>;
996
+
997
+ export declare function p(props?: {
998
+ [_: string]: any;
999
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLParagraphElement>;
1000
+
1001
+ /**
1002
+ * 解析 hyperscript 风格的参数,返回 props 和 childNodes。
1003
+ *
1004
+ * @param {any[]} args - hyperscript 风格的参数数组。
1005
+ * @returns {{ props: Record<string, any>, childNodes: any[] }} 包含 props(对象)和 childNodes(数组)的对象。
1006
+ * @throws 如果参数不是数组会抛出错误。
1007
+ */
1008
+ export declare function parseHyperscriptArgs(args: any[]): {
1009
+ props: Record<string, any>;
1010
+ childNodes: any[];
1011
+ };
1012
+
1013
+ /**
1014
+ * 解析嵌套的 DOM 属性路径,并返回目标对象和属性名。
1015
+ *
1016
+ * @param {string} props - 属性路径,是 DOM API 的属性,不需要引号包裹,支持嵌套属性(如 "style.color")。
1017
+ * @param {Record<string, any>} obj - 起始对象,通常是一个 DOM 元素。
1018
+ * @returns {[Record<string, any>, string]} - 返回一个数组,表示叶节点,其中第一个元素是目标对象,第二个元素是属性名。(如 [obj.style, "color"])。
1019
+ * @throws {Error} 如果路径中的某一级属性不存在或输入无效。
1020
+ */
1021
+ export declare function parsePropName(props: string, obj: Record<string, any>): [Record<string, any>, string];
1022
+
1023
+ /**
1024
+ *
1025
+ * 拾取对象中的BehaviorSubject值,作爲葉子節點,忽略其他值。
1026
+ *
1027
+ * @param {Record<string|number,any> & { pickeys?: string [] }} model - 输入的数据结构,可以是对象、数组或BehaviorSubject
1028
+ * @returns {Record<string|number,any>} - 返回只包含BehaviorSubject当前值的结构
1029
+ * @throws {Error} 当输入不包含任何BehaviorSubject或结构不符合预期时抛出错误
1030
+ */
1031
+ export declare function pickBehaviorSubject(model: Record<string | number, any> & {
1032
+ pickeys?: string[];
1033
+ }): Record<string | number, any>;
1034
+
1035
+ export declare function pipe(initialValue: any, ...fns: ((arg: any) => any)[]): any;
1036
+
1037
+ /**
1038
+ * 为指定的 DOM 元素订阅事件流,并通过 pipe 对事件流进行处理。
1039
+ *
1040
+ * @param {HTMLElement} elem - 要订阅事件的 DOM 元素。
1041
+ * @returns {(e:string,s:(event$: Observable<Event>) => Subscription)=>HTMLElement} - 返回一个函数,该函数接受事件名称和处理函数,用于订阅和处理事件。
1042
+ * @throws {Error} 如果参数无效。
1043
+ */
1044
+ export declare function pipeEvent(elem: HTMLElement): (e: string, s: (event$: Observable<Event>) => Subscription) => HTMLElement;
1045
+
1046
+ /**
1047
+ * 获取对象的嵌套属性
1048
+ * @param {Record<string | number, any>} obj - 源对象/数组
1049
+ * @param {(string|number)[]} keyPath - 属性访问路径数组
1050
+ * @returns {any} 路径对应的属性值
1051
+ * @throws {TypeError} 当路径不存在时抛出错误
1052
+ */
1053
+ export declare function pluckProperty(obj: Record<string | number, any>, keyPath: (string | number)[]): any;
1054
+
1055
+ export declare function pre(props?: {
1056
+ [_: string]: any;
1057
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLPreElement>;
1058
+
1059
+ export declare function progress(props?: {
1060
+ [_: string]: any;
1061
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLProgressElement>;
1062
+
1063
+ export declare function q(props?: {
1064
+ [_: string]: any;
1065
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLQuoteElement>;
1066
+
1067
+ /**
1068
+ * 将对象序列化为 URL 查询字符串(支持嵌套对象和多类型字段)。
1069
+ *
1070
+ * @public
1071
+ * @param {Object} data - 要序列化的对象
1072
+ * @returns {string} 查询字符串(如 "?a=1&b=2"),无有效字段时返回空字符串
1073
+ */
1074
+ export declare function queryStringify(data: Object): string;
1075
+
1076
+ /**
1077
+ * 单选按钮
1078
+ * @public
1079
+ * @param {{checked: BehaviorSubject<boolean>; [key: string]: any}} props
1080
+ * @returns {HyperscriptInputElement}
1081
+ */
1082
+ export declare function radio(props: {
1083
+ checked: BehaviorSubject<boolean>;
1084
+ [key: string]: any;
1085
+ }): HyperscriptInputElement_2;
1086
+
1087
+ /**
1088
+ * 创建一个从 0 到 length-1 的数字数组。
1089
+ *
1090
+ * @public
1091
+ * @param {number} length - 要创建的数组长度
1092
+ * @returns {number[]} - 从 0 到 length-1 的数字数组
1093
+ */
1094
+ export declare function rangeArray(length: number): number[];
1095
+
1096
+ export declare function rb(props?: {
1097
+ [_: string]: any;
1098
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1099
+
1100
+ /**
1101
+ * Updates a reactive model with new values from a source object.
1102
+ * Recursively synchronizes BehaviorSubject, ObservableArray, array and object contents.
1103
+ *
1104
+ * @param {Record<string | number, any>} model - The reactive model to update (can be BehaviorSubject, ObservableArray, array or object)
1105
+ * @param {Record<string | number, any>} src - The new values to restore, should match the structure of the model
1106
+ * @returns
1107
+ */
1108
+ export declare function restore(model: Record<string | number, any>, src: Record<string | number, any>): void;
1109
+
1110
+ export declare function rp(props?: {
1111
+ [_: string]: any;
1112
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1113
+
1114
+ export declare function rt(props?: {
1115
+ [_: string]: any;
1116
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1117
+
1118
+ export declare function rtc(props?: {
1119
+ [_: string]: any;
1120
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1121
+
1122
+ export declare function ruby(props?: {
1123
+ [_: string]: any;
1124
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1125
+
1126
+ export declare function s(props?: {
1127
+ [_: string]: any;
1128
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1129
+
1130
+ export declare function samp(props?: {
1131
+ [_: string]: any;
1132
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1133
+
1134
+ export declare function section(props?: {
1135
+ [_: string]: any;
1136
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1137
+
1138
+ /**
1139
+ * 创建一个支持 RxJS 数据绑定的 <select> 元素。仅单选选择框。
1140
+ *
1141
+ * @param {{ selectedIndex?: BehaviorSubject<number>, value?: BehaviorSubject<string>, [key: string]: any }} props - 配置对象,包含 <select> 元素的属性。
1142
+ * @param {...HTMLOptionElement} options - 一个或多个 <option> 元素,必须是 HTMLOptionElement 类型。
1143
+ * @returns {HyperscriptSelectElement} - 创建的 <select> 元素。
1144
+ * @throws {Error} 如果 `props` 不是对象,或者 `selectedIndex` 或 `value` 不是 BehaviorSubject。
1145
+ */
1146
+ export declare function select(props: {
1147
+ selectedIndex?: BehaviorSubject<number>;
1148
+ value?: BehaviorSubject<string>;
1149
+ [key: string]: any;
1150
+ }, ...options: HTMLOptionElement[]): HyperscriptSelectElement_2;
1151
+
1152
+ /**
1153
+ *
1154
+ * 设置一个元素对象的任意嵌套路径属性的值,如果是CSS类名,值为真则添加类名,值为假则移除类名。如果是普通属性或嵌套属性则设置改属性值。
1155
+ *
1156
+ * @param {HTMLElement} root - 要设置属性的 DOM 元素。
1157
+ * @param {string} key - 属性名称,支持普通属性、嵌套属性(如 "style.color")或以 "." 开头的类名(如 ".active")。
1158
+ * @param {*} value - 要设置的属性值。如果是布尔值,用于控制类名的添加或移除。
1159
+ * @returns {HTMLElement} - 返回元素本身,支持链式调用。
1160
+ * @throws {Error} 如果参数无效或设置失败。
1161
+ *
1162
+ */
1163
+ export declare function setProp(root: HTMLElement, key: string, value: any): HTMLElement;
1164
+
1165
+ /**
1166
+ * 为 DOM 元素设置属性,包括静态属性和动态属性(Observable)。
1167
+ *
1168
+ * @param {HTMLElement} element - 要设置属性的 DOM 元素。
1169
+ * @param {Object} props - 包含属性键值对的对象,其中值可以是普通值或 Observable。
1170
+ * @returns {HTMLElement} - 返回元素本身,支持链式调用。
1171
+ * @throws {Error} 如果参数无效或设置属性失败。
1172
+ */
1173
+ export declare function setProps(element: HTMLElement, props: Object): HTMLElement;
1174
+
1175
+ export declare function small(props?: {
1176
+ [_: string]: any;
1177
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1178
+
1179
+ export declare function span(props?: {
1180
+ [_: string]: any;
1181
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLSpanElement>;
1182
+
1183
+ /**
1184
+ * 将对象属性按类型分为两部分:可观察对象(Observable)与普通值(非 Observable)。
1185
+ *
1186
+ * @param {Record<string,any>} obj - 要分割的对象,其属性值可能是 Observable 或普通值。
1187
+ * @returns {[Record<string, Observable<any>>, Record<string, any>]} - 返回一个数组,第一个对象包含所有 Observable 属性,第二个对象包含所有非 Observable 属性。
1188
+ * @throws {Error} 如果参数不是一个非空对象。
1189
+ */
1190
+ export declare function splitObjectByObservable(obj: Record<string, any>): [Record<string, Observable<any>>, Record<string, any>];
1191
+
1192
+ export declare function strong(props?: {
1193
+ [_: string]: any;
1194
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1195
+
1196
+ export declare function sub(props?: {
1197
+ [_: string]: any;
1198
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1199
+
1200
+ /**
1201
+ * @template T
1202
+ * @typedef { import('rxjs').Observer<T> } Observer
1203
+ */
1204
+ /**
1205
+ * 为指定的 DOM 元素订阅事件流,并将订阅与元素绑定,便于管理。
1206
+ *
1207
+ * @param {HTMLElement} elem - 要订阅事件的 DOM 元素。
1208
+ * @returns {(e:string, o:((value: Event) => void) | Partial<Observer<Event>>) => HTMLElement} - 返回一个函数,该函数接受事件名称和观察者,用于订阅事件。
1209
+ * @throws {Error} 如果参数无效。
1210
+ *
1211
+ */
1212
+ export declare function subscribeEvent(elem: HTMLElement): (e: string, o: ((value: Event) => void) | Partial<Observer<Event>>) => HTMLElement;
1213
+
1214
+ /**
1215
+ *
1216
+ * 订阅一个 BehaviorSubject,将其发出的值动态设置为指定 DOM 元素的属性值。
1217
+ *
1218
+ * @template T
1219
+ * @param {HTMLElement} element - 要设置属性的 DOM 元素。
1220
+ * @param {string} key - 属性名称,支持普通属性、嵌套属性(如 "style.color")或以 "." 开头的类名(如 ".active")。
1221
+ * @param {Observable<T>} value$ - 一个 RxJS Observable ,用于发出属性值。
1222
+ * @returns {HTMLElement} - 返回元素本身,支持链式调用。
1223
+ * @throws {Error} 如果参数无效或订阅失败。
1224
+ */
1225
+ export declare function subscribeProp<T>(element: HTMLElement, key: string, value$: Observable<T>): HTMLElement;
1226
+
1227
+ export declare function summary(props?: {
1228
+ [_: string]: any;
1229
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1230
+
1231
+ export declare function sup(props?: {
1232
+ [_: string]: any;
1233
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1234
+
1235
+ /**
1236
+ * 创建静态选项卡组件。
1237
+ *
1238
+ * `tabControl` 函数生成一个静态选项卡组件,其中选项卡的数量和顺序是固定的。
1239
+ * 每个选项卡由一个导航按钮和一个对应的内容面板组成。
1240
+ *
1241
+ * @param {{ tabIndex: BehaviorSubject<number>, [key: string]: any}} props - 选项卡组件的属性。
1242
+ * @param {Array<string|HTMLElement>} tabs - 导航按钮的内容数组,可以是字符串或 HTML 元素。
1243
+ * @param {Array<string|HTMLElement>} panels - 内容面板的内容数组,可以是字符串或 HTML 元素。
1244
+ * @returns {HTMLElement} - 返回一个包含导航栏和内容面板的选项卡组件。
1245
+ */
1246
+ export declare function tabControl(props: {
1247
+ tabIndex: BehaviorSubject<number>;
1248
+ [key: string]: any;
1249
+ }, tabs: Array<string | HTMLElement>, panels: Array<string | HTMLElement>): HTMLElement;
1250
+
1251
+ export declare function table(props?: {
1252
+ [_: string]: any;
1253
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableElement>;
1254
+
1255
+ /**
1256
+ * 选项卡的导航按钮。
1257
+ *
1258
+ * `tabNavItem` 函数生成一个选项卡的导航按钮,通常用于选项卡的导航栏中。
1259
+ *
1260
+ * @param {...(string|HTMLElement)} source - 按钮的内容,可以是字符串或 HTML 元素。
1261
+ * @returns {HTMLElement} - 返回一个带有 `nav-item` 样式类的 `<li>` 元素,内部包含一个按钮。
1262
+ *
1263
+ */
1264
+ export declare function tabNavItem(...source: (string | HTMLElement)[]): HTMLElement;
1265
+
1266
+ /**
1267
+ * 选项卡的内容面板。
1268
+ *
1269
+ * `tabPanel` 函数生成一个选项卡的内容区域,用于显示与选项卡对应的内容。
1270
+ *
1271
+ * @param {...(string|HTMLElement)} source - 面板的内容,可以是字符串或 HTML 元素。
1272
+ * @returns {HTMLElement} - 返回一个带有 `tab-pane` 样式类的 `<div>` 元素。
1273
+ *
1274
+ */
1275
+ export declare function tabPanel(...source: (string | HTMLElement)[]): HTMLElement;
1276
+
1277
+ /**
1278
+ * 选项卡组件的基础框架。
1279
+ *
1280
+ * `tabRoot` 函数生成一个包含导航栏和内容面板的容器结构,
1281
+ * 用于构建选项卡组件的基础部分。
1282
+ *
1283
+ * @param {Object} props - 传递给根容器 `<div>` 的属性(如 `id`、`className` 等)。
1284
+ * @returns {HTMLElement} - 返回一个包含导航栏和内容面板的 `<div>` 元素。
1285
+ *
1286
+ */
1287
+ export declare function tabRoot(props: Object): HTMLElement;
1288
+
1289
+ export declare function tbody(props?: {
1290
+ [_: string]: any;
1291
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1292
+
1293
+ export declare function td(props?: {
1294
+ [_: string]: any;
1295
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
1296
+
1297
+ /**
1298
+ * 创建一个支持 RxJS 数据绑定的 <textarea> 元素。
1299
+ *
1300
+ * @param {{value:BehaviorSubject<string>, [key:string]:any}} props - 配置对象,包含 <textarea> 元素的属性。
1301
+ * @returns {HyperscriptTextAreaElement} - 创建的 <textarea> 元素。
1302
+ * @throws {Error} 如果 `props` 不是对象,或者 `value` 不是 BehaviorSubject。
1303
+ */
1304
+ export declare function textarea(props: {
1305
+ value: BehaviorSubject<string>;
1306
+ [key: string]: any;
1307
+ }): HyperscriptTextAreaElement;
1308
+
1309
+ /**
1310
+ * 创建一个支持 RxJS 数据绑定的 <input type="text"> 元素。
1311
+ *
1312
+ * @param {{value: BehaviorSubject<string>, [key: string]: any}} props - 配置对象,包含 <input> 元素的属性。
1313
+ * @returns {HyperscriptInputElement} - 创建的 <input type="text"> 元素。
1314
+ * @throws {Error} 如果 `props` 不是对象,或者 `value` 不是 BehaviorSubject。
1315
+ */
1316
+ export declare function textbox(props: {
1317
+ value: BehaviorSubject<string>;
1318
+ [key: string]: any;
1319
+ }): HyperscriptInputElement_2;
1320
+
1321
+ /**
1322
+ * @typedef {Text & {subscription?: Subscription, unsubscribe?: ()=>void}} ObservableTextNode
1323
+ */
1324
+ /**
1325
+ * 创建一个文本节点。
1326
+ * 支持静态文本和动态更新的文本(通过 RxJS Observable)。
1327
+ *
1328
+ * - 如果传入的是字符串,则创建一个静态文本节点。
1329
+ * - 如果传入的是 RxJS Observable,则创建一个动态文本节点,并根据 Observable 的值实时更新文本内容。
1330
+ * - 动态文本节点支持通过 `unsubscribe` 方法取消订阅。
1331
+ *
1332
+ * @param {any} text Observable<any> | any。
1333
+ * @returns {ObservableTextNode}
1334
+ *
1335
+ */
1336
+ export declare function textNode(text: any): ObservableTextNode;
1337
+
1338
+ export declare function tfoot(props?: {
1339
+ [_: string]: any;
1340
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1341
+
1342
+ export declare function th(props?: {
1343
+ [_: string]: any;
1344
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableCellElement>;
1345
+
1346
+ export declare function thead(props?: {
1347
+ [_: string]: any;
1348
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableSectionElement>;
1349
+
1350
+ export declare function time(props?: {
1351
+ [_: string]: any;
1352
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTimeElement>;
1353
+
1354
+ /**
1355
+ * 将扁平化的键值对数组转换为嵌套的 JavaScript 对象或数组。
1356
+ *
1357
+ * @param {[ (string | number)[], any ][]} flatEntries - 扁平化的键值对数组。
1358
+ * 每个键值对的格式为 `[keyPath, value]`,其中 `keyPath` 是一个表示嵌套路径的数组。假设输入的键值对数组已经按照键路径(keyPath)排好顺序。
1359
+ * @returns {Record<string|number, any>} - 返回嵌套的 JavaScript 对象或数组。
1360
+ *
1361
+ */
1362
+ export declare function tojs(flatEntries: [(string | number)[], any][]): Record<string | number, any>;
1363
+
1364
+ export declare function tr(props?: {
1365
+ [_: string]: any;
1366
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTableRowElement>;
1367
+
1368
+ export declare function track(props?: {
1369
+ [_: string]: any;
1370
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLTrackElement>;
1371
+
1372
+ export declare function tt(props?: {
1373
+ [_: string]: any;
1374
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1375
+
1376
+ export declare const types: string[];
1377
+
1378
+ export declare function u(props?: {
1379
+ [_: string]: any;
1380
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1381
+
1382
+ export declare function ul(props?: {
1383
+ [_: string]: any;
1384
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLUListElement>;
1385
+
1386
+ /**
1387
+ * 通过不断调用 fn 生成值,直到 fn 返回 falsy。
1388
+ *
1389
+ * @public
1390
+ * @template T, S
1391
+ * @param {(seed: S) => [T, S] | false | null | undefined} fn - 生成函数,接收当前 seed,返回 [value, nextSeed] 或 falsy。
1392
+ * @param {S} seed - 初始种子值。
1393
+ * @returns {Array<T>} 由 fn 生成的所有 value 组成的数组。
1394
+ * @this *
1395
+ */
1396
+ export declare function unfold<T, S>(this: any, fn: (seed: S) => [T, S] | false | null | undefined, seed: S): Array<T>;
1397
+
1398
+ /**
1399
+ * 将任意 JS 值序列化为“无引号 JSON”字符串(仅对键名和部分字符串值去引号)。
1400
+ *
1401
+ * @public
1402
+ * @param {*} value - 要序列化的值
1403
+ * @returns {string} 序列化后的字符串
1404
+ */
1405
+ export declare function unquotedJsonStringify(value: any): string;
1406
+
1407
+ /**
1408
+ * 简易unwrap参数数组。如果子节点是单个数组,则解构为子节点,否则返回原数组。
1409
+ *
1410
+ * @template T
1411
+ * @param {(T|T[])[]} args - 子节点数组。
1412
+ * @returns {T[]} - 解构后的子节点数组。
1413
+ */
1414
+ export declare function unwrapArgs<T>(args: (T | T[])[]): T[];
1415
+
1416
+ export declare function video(props?: {
1417
+ [_: string]: any;
1418
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLVideoElement>;
1419
+
1420
+ export declare function wbr(props?: {
1421
+ [_: string]: any;
1422
+ }, ...childNodes: any[]): HyperscriptExtensions<HTMLElement>;
1423
+
1424
+ /**
1425
+ * 合并两个数组为一个元组数组。
1426
+ *
1427
+ * 如果数组长度不同,将以较长的数组为基准,短数组对应位置为 undefined。
1428
+ *
1429
+ * @public
1430
+ * @template T, U
1431
+ * @param {T[]} a - 第一个数组
1432
+ * @param {U[]} b - 第二个数组
1433
+ * @returns {Array<[T, U]>} - 合并后的元组数组
1434
+ * @throws {Error} 如果 a 或 b 不是数组
1435
+ */
1436
+ export declare function zipArray<T, U>(a: T[], b: U[]): Array<[T, U]>;
1437
+
1438
+ export { }