hyperscript-rxjs 1.3.25 → 1.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hyperscript-rxjs.d.ts +8 -38
- package/dist/hyperscript-rxjs.js +92 -300
- package/package.json +3 -3
|
@@ -30,7 +30,7 @@ export declare function address(...childNodes: NodeInput[]): HyperscriptExtensio
|
|
|
30
30
|
*/
|
|
31
31
|
export declare function advance<T>(array: Array<T>, n: number): [Array<T>, Array<T>];
|
|
32
32
|
|
|
33
|
-
export declare function area(props
|
|
33
|
+
export declare function area(props?: {
|
|
34
34
|
[_: string]: any;
|
|
35
35
|
}): HyperscriptExtensions<HTMLAreaElement>;
|
|
36
36
|
|
|
@@ -174,7 +174,7 @@ export declare function code(props: {
|
|
|
174
174
|
|
|
175
175
|
export declare function code(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
|
|
176
176
|
|
|
177
|
-
export declare function col(props
|
|
177
|
+
export declare function col(props?: {
|
|
178
178
|
[_: string]: any;
|
|
179
179
|
}): HyperscriptExtensions<HTMLTableColElement>;
|
|
180
180
|
|
|
@@ -858,7 +858,7 @@ export declare function i(props: {
|
|
|
858
858
|
|
|
859
859
|
export declare function i(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLElement>;
|
|
860
860
|
|
|
861
|
-
export declare function img(props
|
|
861
|
+
export declare function img(props?: {
|
|
862
862
|
[_: string]: any;
|
|
863
863
|
}): HyperscriptExtensions<HTMLImageElement>;
|
|
864
864
|
|
|
@@ -878,7 +878,7 @@ export declare function img(props: {
|
|
|
878
878
|
*/
|
|
879
879
|
export declare const inlineFamily: Set<string>;
|
|
880
880
|
|
|
881
|
-
export declare function input(props
|
|
881
|
+
export declare function input(props?: {
|
|
882
882
|
[_: string]: any;
|
|
883
883
|
}): HyperscriptExtensions<HTMLInputElement>;
|
|
884
884
|
|
|
@@ -1025,16 +1025,6 @@ export declare function nestedCombineLatest(model: Record<string | number, any>)
|
|
|
1025
1025
|
*/
|
|
1026
1026
|
export declare function nestedMerge(model: Record<string | number, any>): Observable<[(string | number)[], any]>;
|
|
1027
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
1028
|
export declare type NodeInput = Node | string | number | boolean | null | undefined
|
|
1039
1029
|
|
|
1040
1030
|
/**
|
|
@@ -1137,11 +1127,11 @@ export declare function optgroup(props: {
|
|
|
1137
1127
|
|
|
1138
1128
|
export declare function optgroup(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLOptGroupElement>;
|
|
1139
1129
|
|
|
1140
|
-
export declare function option(props
|
|
1130
|
+
export declare function option(props?: {
|
|
1141
1131
|
[_: string]: any;
|
|
1142
|
-
}, ...childNodes: (Text
|
|
1132
|
+
}, ...childNodes: (Text|string)[]): HyperscriptExtensions<HTMLOptionElement>
|
|
1143
1133
|
|
|
1144
|
-
export declare function option(...childNodes: (Text
|
|
1134
|
+
export declare function option(...childNodes: (Text|string)[]): HyperscriptExtensions<HTMLOptionElement>
|
|
1145
1135
|
|
|
1146
1136
|
export declare function output(props: {
|
|
1147
1137
|
[_: string]: any;
|
|
@@ -1177,26 +1167,6 @@ export declare function parseHyperscriptArgs(args: any[]): {
|
|
|
1177
1167
|
*/
|
|
1178
1168
|
export declare function parsePropName(props: string, obj: Record<string, any>): [Record<string, any>, string];
|
|
1179
1169
|
|
|
1180
|
-
/**
|
|
1181
|
-
*
|
|
1182
|
-
* 拾取对象中的BehaviorSubject值,作爲葉子節點,忽略其他值。
|
|
1183
|
-
* @public
|
|
1184
|
-
* @template T
|
|
1185
|
-
* @param {{[_:string]:NestedObject<T>} & { pickeys?:( () => string []) }} source - 输入的数据结构,可以是对象、数组或BehaviorSubject
|
|
1186
|
-
* @param {NestedStringArray[]} [paths]
|
|
1187
|
-
* @returns {{[_:string]:NestedObject<T>}}
|
|
1188
|
-
* @throws {Error} 当输入不包含任何BehaviorSubject或结构不符合预期时抛出错误
|
|
1189
|
-
*/
|
|
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
|
-
};
|
|
1199
|
-
|
|
1200
1170
|
/**
|
|
1201
1171
|
* 为指定的 DOM 元素订阅事件流,并通过 pipe 对事件流进行处理。
|
|
1202
1172
|
*
|
|
@@ -1585,7 +1555,7 @@ export declare function tr(props: {
|
|
|
1585
1555
|
|
|
1586
1556
|
export declare function tr(...childNodes: NodeInput[]): HyperscriptExtensions<HTMLTableRowElement>;
|
|
1587
1557
|
|
|
1588
|
-
export declare function track(props
|
|
1558
|
+
export declare function track(props?: {
|
|
1589
1559
|
[_: string]: any;
|
|
1590
1560
|
}): HyperscriptExtensions<HTMLTrackElement>;
|
|
1591
1561
|
|
package/dist/hyperscript-rxjs.js
CHANGED
|
@@ -90,7 +90,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
90
90
|
__webpack_require__.d(__webpack_exports__, {
|
|
91
91
|
Comparer: () => (/* reexport */ Comparer),
|
|
92
92
|
Deep: () => (/* reexport */ Deep),
|
|
93
|
-
ObservableArray: () => (/* reexport */
|
|
93
|
+
ObservableArray: () => (/* reexport */ ObservableArray),
|
|
94
94
|
a: () => (/* reexport */ a),
|
|
95
95
|
abbr: () => (/* reexport */ abbr),
|
|
96
96
|
address: () => (/* reexport */ address),
|
|
@@ -194,7 +194,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
194
194
|
p: () => (/* reexport */ p),
|
|
195
195
|
parseHyperscriptArgs: () => (/* reexport */ parseHyperscriptArgs),
|
|
196
196
|
parsePropName: () => (/* reexport */ parsePropName),
|
|
197
|
-
pickBehaviorSubject: () => (/* reexport */ pickBehaviorSubject),
|
|
198
197
|
pipeEvent: () => (/* reexport */ pipeEvent),
|
|
199
198
|
pluckProperty: () => (/* reexport */ pluckProperty),
|
|
200
199
|
pre: () => (/* reexport */ pre),
|
|
@@ -1500,7 +1499,7 @@ function isRxType(obj) {
|
|
|
1500
1499
|
* @template T
|
|
1501
1500
|
* @extends Array<T>
|
|
1502
1501
|
*/
|
|
1503
|
-
class
|
|
1502
|
+
class ObservableArray extends Array {
|
|
1504
1503
|
/**
|
|
1505
1504
|
* @constructor 创建一个 ObservableArray 实例。禁止传参。
|
|
1506
1505
|
* @param {()=>T} newItem
|
|
@@ -2164,6 +2163,10 @@ const tagNames = new Set(["a", "abbr", "address", "area", "article", "aside", "a
|
|
|
2164
2163
|
* @typedef {import("./HyperscriptExtensions.js").HyperscriptExtensions<T>} HyperscriptExtensions
|
|
2165
2164
|
*/
|
|
2166
2165
|
|
|
2166
|
+
/**
|
|
2167
|
+
* @typedef {import("../nodes/normalizeChildNodes.js").NodeInput} NodeInput
|
|
2168
|
+
*/
|
|
2169
|
+
|
|
2167
2170
|
/// void elements
|
|
2168
2171
|
|
|
2169
2172
|
/**
|
|
@@ -2222,7 +2225,7 @@ const input = props => (/** @type {HyperscriptExtensions<HTMLInputElement>} */hy
|
|
|
2222
2225
|
const track = props => (/** @type {HyperscriptExtensions<HTMLTrackElement>} */hyperscript('track', props));
|
|
2223
2226
|
|
|
2224
2227
|
/**
|
|
2225
|
-
* 创建 <option>
|
|
2228
|
+
* 创建 <option> 元素,尽管可以有一个Text子元素,但是用text属性替代没有问题。
|
|
2226
2229
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2227
2230
|
* @param {...(Text|string)} childNodes - 子节点
|
|
2228
2231
|
* @returns {HyperscriptExtensions<HTMLOptionElement>}
|
|
@@ -2232,7 +2235,7 @@ const tags_option = (props, ...childNodes) => (/** @type {HyperscriptExtensions<
|
|
|
2232
2235
|
/**
|
|
2233
2236
|
* 创建 <a> 元素
|
|
2234
2237
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2235
|
-
* @param {...
|
|
2238
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2236
2239
|
* @returns {HyperscriptExtensions<HTMLAnchorElement>}
|
|
2237
2240
|
*/
|
|
2238
2241
|
const a = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLAnchorElement>} */hyperscript('a', props, ...childNodes));
|
|
@@ -2240,7 +2243,7 @@ const a = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLAnchor
|
|
|
2240
2243
|
/**
|
|
2241
2244
|
* 创建 <abbr> 元素
|
|
2242
2245
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2243
|
-
* @param {...
|
|
2246
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2244
2247
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2245
2248
|
*/
|
|
2246
2249
|
const abbr = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('abbr', props, ...childNodes));
|
|
@@ -2248,7 +2251,7 @@ const abbr = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEle
|
|
|
2248
2251
|
/**
|
|
2249
2252
|
* 创建 <address> 元素
|
|
2250
2253
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2251
|
-
* @param {...
|
|
2254
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2252
2255
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2253
2256
|
*/
|
|
2254
2257
|
const address = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('address', props, ...childNodes));
|
|
@@ -2256,7 +2259,7 @@ const address = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTML
|
|
|
2256
2259
|
/**
|
|
2257
2260
|
* 创建 <article> 元素
|
|
2258
2261
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2259
|
-
* @param {...
|
|
2262
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2260
2263
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2261
2264
|
*/
|
|
2262
2265
|
const article = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('article', props, ...childNodes));
|
|
@@ -2264,7 +2267,7 @@ const article = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTML
|
|
|
2264
2267
|
/**
|
|
2265
2268
|
* 创建 <aside> 元素
|
|
2266
2269
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2267
|
-
* @param {...
|
|
2270
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2268
2271
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2269
2272
|
*/
|
|
2270
2273
|
const aside = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('aside', props, ...childNodes));
|
|
@@ -2272,7 +2275,7 @@ const aside = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEl
|
|
|
2272
2275
|
/**
|
|
2273
2276
|
* 创建 <audio> 元素
|
|
2274
2277
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2275
|
-
* @param {...
|
|
2278
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2276
2279
|
* @returns {HyperscriptExtensions<HTMLAudioElement>}
|
|
2277
2280
|
*/
|
|
2278
2281
|
const audio = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLAudioElement>} */hyperscript('audio', props, ...childNodes));
|
|
@@ -2280,7 +2283,7 @@ const audio = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLAu
|
|
|
2280
2283
|
/**
|
|
2281
2284
|
* 创建 <b> 元素
|
|
2282
2285
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2283
|
-
* @param {...
|
|
2286
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2284
2287
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2285
2288
|
*/
|
|
2286
2289
|
const b = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('b', props, ...childNodes));
|
|
@@ -2288,7 +2291,7 @@ const b = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElemen
|
|
|
2288
2291
|
/**
|
|
2289
2292
|
* 创建 <bdi> 元素
|
|
2290
2293
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2291
|
-
* @param {...
|
|
2294
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2292
2295
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2293
2296
|
*/
|
|
2294
2297
|
const bdi = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('bdi', props, ...childNodes));
|
|
@@ -2296,7 +2299,7 @@ const bdi = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElem
|
|
|
2296
2299
|
/**
|
|
2297
2300
|
* 创建 <bdo> 元素
|
|
2298
2301
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2299
|
-
* @param {...
|
|
2302
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2300
2303
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2301
2304
|
*/
|
|
2302
2305
|
const bdo = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('bdo', props, ...childNodes));
|
|
@@ -2304,7 +2307,7 @@ const bdo = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElem
|
|
|
2304
2307
|
/**
|
|
2305
2308
|
* 创建 <blockquote> 元素
|
|
2306
2309
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2307
|
-
* @param {...
|
|
2310
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2308
2311
|
* @returns {HyperscriptExtensions<HTMLQuoteElement>}
|
|
2309
2312
|
*/
|
|
2310
2313
|
const blockquote = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLQuoteElement>} */hyperscript('blockquote', props, ...childNodes));
|
|
@@ -2312,7 +2315,7 @@ const blockquote = (props, ...childNodes) => (/** @type {HyperscriptExtensions<H
|
|
|
2312
2315
|
/**
|
|
2313
2316
|
* 创建 <button> 元素
|
|
2314
2317
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2315
|
-
* @param {...
|
|
2318
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2316
2319
|
* @returns {HyperscriptExtensions<HTMLButtonElement>}
|
|
2317
2320
|
*/
|
|
2318
2321
|
const tags_button = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLButtonElement>} */hyperscript('button', props, ...childNodes));
|
|
@@ -2320,7 +2323,7 @@ const tags_button = (props, ...childNodes) => (/** @type {HyperscriptExtensions<
|
|
|
2320
2323
|
/**
|
|
2321
2324
|
* 创建 <caption> 元素
|
|
2322
2325
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2323
|
-
* @param {...
|
|
2326
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2324
2327
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2325
2328
|
*/
|
|
2326
2329
|
const caption = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('caption', props, ...childNodes));
|
|
@@ -2328,7 +2331,7 @@ const caption = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTML
|
|
|
2328
2331
|
/**
|
|
2329
2332
|
* 创建 <cite> 元素
|
|
2330
2333
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2331
|
-
* @param {...
|
|
2334
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2332
2335
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2333
2336
|
*/
|
|
2334
2337
|
const cite = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('cite', props, ...childNodes));
|
|
@@ -2336,7 +2339,7 @@ const cite = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEle
|
|
|
2336
2339
|
/**
|
|
2337
2340
|
* 创建 <code> 元素
|
|
2338
2341
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2339
|
-
* @param {...
|
|
2342
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2340
2343
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2341
2344
|
*/
|
|
2342
2345
|
const code = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('code', props, ...childNodes));
|
|
@@ -2344,7 +2347,7 @@ const code = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEle
|
|
|
2344
2347
|
/**
|
|
2345
2348
|
* 创建 <colgroup> 元素
|
|
2346
2349
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2347
|
-
* @param {...
|
|
2350
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2348
2351
|
* @returns {HyperscriptExtensions<HTMLTableColElement>}
|
|
2349
2352
|
*/
|
|
2350
2353
|
const colgroup = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTableColElement>} */hyperscript('colgroup', props, ...childNodes));
|
|
@@ -2352,7 +2355,7 @@ const colgroup = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTM
|
|
|
2352
2355
|
/**
|
|
2353
2356
|
* 创建 <data> 元素
|
|
2354
2357
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2355
|
-
* @param {...
|
|
2358
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2356
2359
|
* @returns {HyperscriptExtensions<HTMLDataElement>}
|
|
2357
2360
|
*/
|
|
2358
2361
|
const data = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDataElement>} */hyperscript('data', props, ...childNodes));
|
|
@@ -2360,7 +2363,7 @@ const data = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDat
|
|
|
2360
2363
|
/**
|
|
2361
2364
|
* 创建 <datalist> 元素
|
|
2362
2365
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2363
|
-
* @param {...
|
|
2366
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2364
2367
|
* @returns {HyperscriptExtensions<HTMLDataListElement>}
|
|
2365
2368
|
*/
|
|
2366
2369
|
const datalist = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDataListElement>} */hyperscript('datalist', props, ...childNodes));
|
|
@@ -2368,7 +2371,7 @@ const datalist = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTM
|
|
|
2368
2371
|
/**
|
|
2369
2372
|
* 创建 <dd> 元素
|
|
2370
2373
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2371
|
-
* @param {...
|
|
2374
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2372
2375
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2373
2376
|
*/
|
|
2374
2377
|
const dd = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('dd', props, ...childNodes));
|
|
@@ -2376,7 +2379,7 @@ const dd = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEleme
|
|
|
2376
2379
|
/**
|
|
2377
2380
|
* 创建 <del> 元素
|
|
2378
2381
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2379
|
-
* @param {...
|
|
2382
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2380
2383
|
* @returns {HyperscriptExtensions<HTMLModElement>}
|
|
2381
2384
|
*/
|
|
2382
2385
|
const del = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLModElement>} */hyperscript('del', props, ...childNodes));
|
|
@@ -2384,7 +2387,7 @@ const del = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLModE
|
|
|
2384
2387
|
/**
|
|
2385
2388
|
* 创建 <details> 元素
|
|
2386
2389
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2387
|
-
* @param {...
|
|
2390
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2388
2391
|
* @returns {HyperscriptExtensions<HTMLDetailsElement>}
|
|
2389
2392
|
*/
|
|
2390
2393
|
const details = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDetailsElement>} */hyperscript('details', props, ...childNodes));
|
|
@@ -2392,7 +2395,7 @@ const details = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTML
|
|
|
2392
2395
|
/**
|
|
2393
2396
|
* 创建 <dfn> 元素
|
|
2394
2397
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2395
|
-
* @param {...
|
|
2398
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2396
2399
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2397
2400
|
*/
|
|
2398
2401
|
const dfn = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('dfn', props, ...childNodes));
|
|
@@ -2400,7 +2403,7 @@ const dfn = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElem
|
|
|
2400
2403
|
/**
|
|
2401
2404
|
* 创建 <dialog> 元素
|
|
2402
2405
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2403
|
-
* @param {...
|
|
2406
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2404
2407
|
* @returns {HyperscriptExtensions<HTMLDialogElement>}
|
|
2405
2408
|
*/
|
|
2406
2409
|
const dialog = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDialogElement>} */hyperscript('dialog', props, ...childNodes));
|
|
@@ -2408,7 +2411,7 @@ const dialog = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLD
|
|
|
2408
2411
|
/**
|
|
2409
2412
|
* 创建 <div> 元素
|
|
2410
2413
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2411
|
-
* @param {...
|
|
2414
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2412
2415
|
* @returns {HyperscriptExtensions<HTMLDivElement>}
|
|
2413
2416
|
*/
|
|
2414
2417
|
const div = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDivElement>} */hyperscript('div', props, ...childNodes));
|
|
@@ -2416,7 +2419,7 @@ const div = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDivE
|
|
|
2416
2419
|
/**
|
|
2417
2420
|
* 创建 <dl> 元素
|
|
2418
2421
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2419
|
-
* @param {...
|
|
2422
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2420
2423
|
* @returns {HyperscriptExtensions<HTMLDListElement>}
|
|
2421
2424
|
*/
|
|
2422
2425
|
const dl = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDListElement>} */hyperscript('dl', props, ...childNodes));
|
|
@@ -2424,7 +2427,7 @@ const dl = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLDList
|
|
|
2424
2427
|
/**
|
|
2425
2428
|
* 创建 <dt> 元素
|
|
2426
2429
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2427
|
-
* @param {...
|
|
2430
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2428
2431
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2429
2432
|
*/
|
|
2430
2433
|
const dt = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('dt', props, ...childNodes));
|
|
@@ -2432,7 +2435,7 @@ const dt = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEleme
|
|
|
2432
2435
|
/**
|
|
2433
2436
|
* 创建 <em> 元素
|
|
2434
2437
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2435
|
-
* @param {...
|
|
2438
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2436
2439
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2437
2440
|
*/
|
|
2438
2441
|
const em = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('em', props, ...childNodes));
|
|
@@ -2440,7 +2443,7 @@ const em = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEleme
|
|
|
2440
2443
|
/**
|
|
2441
2444
|
* 创建 <fieldset> 元素
|
|
2442
2445
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2443
|
-
* @param {...
|
|
2446
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2444
2447
|
* @returns {HyperscriptExtensions<HTMLFieldSetElement>}
|
|
2445
2448
|
*/
|
|
2446
2449
|
const fieldset = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLFieldSetElement>} */hyperscript('fieldset', props, ...childNodes));
|
|
@@ -2448,7 +2451,7 @@ const fieldset = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTM
|
|
|
2448
2451
|
/**
|
|
2449
2452
|
* 创建 <figcaption> 元素
|
|
2450
2453
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2451
|
-
* @param {...
|
|
2454
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2452
2455
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2453
2456
|
*/
|
|
2454
2457
|
const figcaption = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('figcaption', props, ...childNodes));
|
|
@@ -2456,7 +2459,7 @@ const figcaption = (props, ...childNodes) => (/** @type {HyperscriptExtensions<H
|
|
|
2456
2459
|
/**
|
|
2457
2460
|
* 创建 <figure> 元素
|
|
2458
2461
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2459
|
-
* @param {...
|
|
2462
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2460
2463
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2461
2464
|
*/
|
|
2462
2465
|
const figure = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('figure', props, ...childNodes));
|
|
@@ -2464,7 +2467,7 @@ const figure = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLE
|
|
|
2464
2467
|
/**
|
|
2465
2468
|
* 创建 <footer> 元素
|
|
2466
2469
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2467
|
-
* @param {...
|
|
2470
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2468
2471
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2469
2472
|
*/
|
|
2470
2473
|
const footer = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('footer', props, ...childNodes));
|
|
@@ -2472,7 +2475,7 @@ const footer = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLE
|
|
|
2472
2475
|
/**
|
|
2473
2476
|
* 创建 <form> 元素
|
|
2474
2477
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2475
|
-
* @param {...
|
|
2478
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2476
2479
|
* @returns {HyperscriptExtensions<HTMLFormElement>}
|
|
2477
2480
|
*/
|
|
2478
2481
|
const tags_form = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLFormElement>} */hyperscript('form', props, ...childNodes));
|
|
@@ -2480,7 +2483,7 @@ const tags_form = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HT
|
|
|
2480
2483
|
/**
|
|
2481
2484
|
* 创建 <h1> 元素
|
|
2482
2485
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2483
|
-
* @param {...
|
|
2486
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2484
2487
|
* @returns {HyperscriptExtensions<HTMLHeadingElement>}
|
|
2485
2488
|
*/
|
|
2486
2489
|
const h1 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadingElement>} */hyperscript('h1', props, ...childNodes));
|
|
@@ -2488,7 +2491,7 @@ const h1 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadi
|
|
|
2488
2491
|
/**
|
|
2489
2492
|
* 创建 <h2> 元素
|
|
2490
2493
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2491
|
-
* @param {...
|
|
2494
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2492
2495
|
* @returns {HyperscriptExtensions<HTMLHeadingElement>}
|
|
2493
2496
|
*/
|
|
2494
2497
|
const h2 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadingElement>} */hyperscript('h2', props, ...childNodes));
|
|
@@ -2496,7 +2499,7 @@ const h2 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadi
|
|
|
2496
2499
|
/**
|
|
2497
2500
|
* 创建 <h3> 元素
|
|
2498
2501
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2499
|
-
* @param {...
|
|
2502
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2500
2503
|
* @returns {HyperscriptExtensions<HTMLHeadingElement>}
|
|
2501
2504
|
*/
|
|
2502
2505
|
const h3 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadingElement>} */hyperscript('h3', props, ...childNodes));
|
|
@@ -2504,7 +2507,7 @@ const h3 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadi
|
|
|
2504
2507
|
/**
|
|
2505
2508
|
* 创建 <h4> 元素
|
|
2506
2509
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2507
|
-
* @param {...
|
|
2510
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2508
2511
|
* @returns {HyperscriptExtensions<HTMLHeadingElement>}
|
|
2509
2512
|
*/
|
|
2510
2513
|
const h4 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadingElement>} */hyperscript('h4', props, ...childNodes));
|
|
@@ -2512,7 +2515,7 @@ const h4 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadi
|
|
|
2512
2515
|
/**
|
|
2513
2516
|
* 创建 <h5> 元素
|
|
2514
2517
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2515
|
-
* @param {...
|
|
2518
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2516
2519
|
* @returns {HyperscriptExtensions<HTMLHeadingElement>}
|
|
2517
2520
|
*/
|
|
2518
2521
|
const h5 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadingElement>} */hyperscript('h5', props, ...childNodes));
|
|
@@ -2520,7 +2523,7 @@ const h5 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadi
|
|
|
2520
2523
|
/**
|
|
2521
2524
|
* 创建 <h6> 元素
|
|
2522
2525
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2523
|
-
* @param {...
|
|
2526
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2524
2527
|
* @returns {HyperscriptExtensions<HTMLHeadingElement>}
|
|
2525
2528
|
*/
|
|
2526
2529
|
const h6 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadingElement>} */hyperscript('h6', props, ...childNodes));
|
|
@@ -2528,7 +2531,7 @@ const h6 = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLHeadi
|
|
|
2528
2531
|
/**
|
|
2529
2532
|
* 创建 <header> 元素
|
|
2530
2533
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2531
|
-
* @param {...
|
|
2534
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2532
2535
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2533
2536
|
*/
|
|
2534
2537
|
const header = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('header', props, ...childNodes));
|
|
@@ -2536,7 +2539,7 @@ const header = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLE
|
|
|
2536
2539
|
/**
|
|
2537
2540
|
* 创建 <hgroup> 元素
|
|
2538
2541
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2539
|
-
* @param {...
|
|
2542
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2540
2543
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2541
2544
|
*/
|
|
2542
2545
|
const hgroup = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('hgroup', props, ...childNodes));
|
|
@@ -2544,7 +2547,7 @@ const hgroup = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLE
|
|
|
2544
2547
|
/**
|
|
2545
2548
|
* 创建 <i> 元素
|
|
2546
2549
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2547
|
-
* @param {...
|
|
2550
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2548
2551
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2549
2552
|
*/
|
|
2550
2553
|
const i = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('i', props, ...childNodes));
|
|
@@ -2552,7 +2555,7 @@ const i = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElemen
|
|
|
2552
2555
|
/**
|
|
2553
2556
|
* 创建 <ins> 元素
|
|
2554
2557
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2555
|
-
* @param {...
|
|
2558
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2556
2559
|
* @returns {HyperscriptExtensions<HTMLModElement>}
|
|
2557
2560
|
*/
|
|
2558
2561
|
const ins = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLModElement>} */hyperscript('ins', props, ...childNodes));
|
|
@@ -2560,7 +2563,7 @@ const ins = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLModE
|
|
|
2560
2563
|
/**
|
|
2561
2564
|
* 创建 <kbd> 元素
|
|
2562
2565
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2563
|
-
* @param {...
|
|
2566
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2564
2567
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2565
2568
|
*/
|
|
2566
2569
|
const kbd = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('kbd', props, ...childNodes));
|
|
@@ -2568,7 +2571,7 @@ const kbd = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElem
|
|
|
2568
2571
|
/**
|
|
2569
2572
|
* 创建 <label> 元素
|
|
2570
2573
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2571
|
-
* @param {...
|
|
2574
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2572
2575
|
* @returns {HyperscriptExtensions<HTMLLabelElement>}
|
|
2573
2576
|
*/
|
|
2574
2577
|
const label = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLLabelElement>} */hyperscript('label', props, ...childNodes));
|
|
@@ -2576,7 +2579,7 @@ const label = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLLa
|
|
|
2576
2579
|
/**
|
|
2577
2580
|
* 创建 <legend> 元素
|
|
2578
2581
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2579
|
-
* @param {...
|
|
2582
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2580
2583
|
* @returns {HyperscriptExtensions<HTMLLegendElement>}
|
|
2581
2584
|
*/
|
|
2582
2585
|
const legend = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLLegendElement>} */hyperscript('legend', props, ...childNodes));
|
|
@@ -2584,7 +2587,7 @@ const legend = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLL
|
|
|
2584
2587
|
/**
|
|
2585
2588
|
* 创建 <li> 元素
|
|
2586
2589
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2587
|
-
* @param {...
|
|
2590
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2588
2591
|
* @returns {HyperscriptExtensions<HTMLLIElement>}
|
|
2589
2592
|
*/
|
|
2590
2593
|
const li = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLLIElement>} */hyperscript('li', props, ...childNodes));
|
|
@@ -2592,7 +2595,7 @@ const li = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLLIEle
|
|
|
2592
2595
|
/**
|
|
2593
2596
|
* 创建 <main> 元素
|
|
2594
2597
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2595
|
-
* @param {...
|
|
2598
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2596
2599
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2597
2600
|
*/
|
|
2598
2601
|
const main = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('main', props, ...childNodes));
|
|
@@ -2600,7 +2603,7 @@ const main = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEle
|
|
|
2600
2603
|
/**
|
|
2601
2604
|
* 创建 <mark> 元素
|
|
2602
2605
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2603
|
-
* @param {...
|
|
2606
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2604
2607
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2605
2608
|
*/
|
|
2606
2609
|
const mark = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('mark', props, ...childNodes));
|
|
@@ -2608,7 +2611,7 @@ const mark = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEle
|
|
|
2608
2611
|
/**
|
|
2609
2612
|
* 创建 <menu> 元素
|
|
2610
2613
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2611
|
-
* @param {...
|
|
2614
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2612
2615
|
* @returns {HyperscriptExtensions<HTMLMenuElement>}
|
|
2613
2616
|
*/
|
|
2614
2617
|
const menu = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLMenuElement>} */hyperscript('menu', props, ...childNodes));
|
|
@@ -2616,7 +2619,7 @@ const menu = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLMen
|
|
|
2616
2619
|
/**
|
|
2617
2620
|
* 创建 <menuitem> 元素
|
|
2618
2621
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2619
|
-
* @param {...
|
|
2622
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2620
2623
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2621
2624
|
*/
|
|
2622
2625
|
const menuitem = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('menuitem', props, ...childNodes));
|
|
@@ -2624,7 +2627,7 @@ const menuitem = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTM
|
|
|
2624
2627
|
/**
|
|
2625
2628
|
* 创建 <meter> 元素
|
|
2626
2629
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2627
|
-
* @param {...
|
|
2630
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2628
2631
|
* @returns {HyperscriptExtensions<HTMLMeterElement>}
|
|
2629
2632
|
*/
|
|
2630
2633
|
const meter = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLMeterElement>} */hyperscript('meter', props, ...childNodes));
|
|
@@ -2632,7 +2635,7 @@ const meter = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLMe
|
|
|
2632
2635
|
/**
|
|
2633
2636
|
* 创建 <nav> 元素
|
|
2634
2637
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2635
|
-
* @param {...
|
|
2638
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2636
2639
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2637
2640
|
*/
|
|
2638
2641
|
const nav = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('nav', props, ...childNodes));
|
|
@@ -2640,7 +2643,7 @@ const nav = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElem
|
|
|
2640
2643
|
/**
|
|
2641
2644
|
* 创建 <ol> 元素
|
|
2642
2645
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2643
|
-
* @param {...
|
|
2646
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2644
2647
|
* @returns {HyperscriptExtensions<HTMLOListElement>}
|
|
2645
2648
|
*/
|
|
2646
2649
|
const ol = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLOListElement>} */hyperscript('ol', props, ...childNodes));
|
|
@@ -2648,7 +2651,7 @@ const ol = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLOList
|
|
|
2648
2651
|
/**
|
|
2649
2652
|
* 创建 <optgroup> 元素
|
|
2650
2653
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2651
|
-
* @param {...
|
|
2654
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2652
2655
|
* @returns {HyperscriptExtensions<HTMLOptGroupElement>}
|
|
2653
2656
|
*/
|
|
2654
2657
|
const optgroup = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLOptGroupElement>} */hyperscript('optgroup', props, ...childNodes));
|
|
@@ -2656,7 +2659,7 @@ const optgroup = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTM
|
|
|
2656
2659
|
/**
|
|
2657
2660
|
* 创建 <output> 元素
|
|
2658
2661
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2659
|
-
* @param {...
|
|
2662
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2660
2663
|
* @returns {HyperscriptExtensions<HTMLOutputElement>}
|
|
2661
2664
|
*/
|
|
2662
2665
|
const output = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLOutputElement>} */hyperscript('output', props, ...childNodes));
|
|
@@ -2664,7 +2667,7 @@ const output = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLO
|
|
|
2664
2667
|
/**
|
|
2665
2668
|
* 创建 <p> 元素
|
|
2666
2669
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2667
|
-
* @param {...
|
|
2670
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2668
2671
|
* @returns {HyperscriptExtensions<HTMLParagraphElement>}
|
|
2669
2672
|
*/
|
|
2670
2673
|
const p = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLParagraphElement>} */hyperscript('p', props, ...childNodes));
|
|
@@ -2672,7 +2675,7 @@ const p = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLParagr
|
|
|
2672
2675
|
/**
|
|
2673
2676
|
* 创建 <pre> 元素
|
|
2674
2677
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2675
|
-
* @param {...
|
|
2678
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2676
2679
|
* @returns {HyperscriptExtensions<HTMLPreElement>}
|
|
2677
2680
|
*/
|
|
2678
2681
|
const pre = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLPreElement>} */hyperscript('pre', props, ...childNodes));
|
|
@@ -2680,7 +2683,7 @@ const pre = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLPreE
|
|
|
2680
2683
|
/**
|
|
2681
2684
|
* 创建 <progress> 元素
|
|
2682
2685
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2683
|
-
* @param {...
|
|
2686
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2684
2687
|
* @returns {HyperscriptExtensions<HTMLProgressElement>}
|
|
2685
2688
|
*/
|
|
2686
2689
|
const progress = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLProgressElement>} */hyperscript('progress', props, ...childNodes));
|
|
@@ -2688,7 +2691,7 @@ const progress = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTM
|
|
|
2688
2691
|
/**
|
|
2689
2692
|
* 创建 <q> 元素
|
|
2690
2693
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2691
|
-
* @param {...
|
|
2694
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2692
2695
|
* @returns {HyperscriptExtensions<HTMLQuoteElement>}
|
|
2693
2696
|
*/
|
|
2694
2697
|
const q = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLQuoteElement>} */hyperscript('q', props, ...childNodes));
|
|
@@ -2696,7 +2699,7 @@ const q = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLQuoteE
|
|
|
2696
2699
|
/**
|
|
2697
2700
|
* 创建 <rb> 元素
|
|
2698
2701
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2699
|
-
* @param {...
|
|
2702
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2700
2703
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2701
2704
|
*/
|
|
2702
2705
|
const rb = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('rb', props, ...childNodes));
|
|
@@ -2704,7 +2707,7 @@ const rb = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEleme
|
|
|
2704
2707
|
/**
|
|
2705
2708
|
* 创建 <rp> 元素
|
|
2706
2709
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2707
|
-
* @param {...
|
|
2710
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2708
2711
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2709
2712
|
*/
|
|
2710
2713
|
const rp = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('rp', props, ...childNodes));
|
|
@@ -2712,7 +2715,7 @@ const rp = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEleme
|
|
|
2712
2715
|
/**
|
|
2713
2716
|
* 创建 <rt> 元素
|
|
2714
2717
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2715
|
-
* @param {...
|
|
2718
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2716
2719
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2717
2720
|
*/
|
|
2718
2721
|
const rt = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('rt', props, ...childNodes));
|
|
@@ -2720,7 +2723,7 @@ const rt = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEleme
|
|
|
2720
2723
|
/**
|
|
2721
2724
|
* 创建 <rtc> 元素
|
|
2722
2725
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2723
|
-
* @param {...
|
|
2726
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2724
2727
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2725
2728
|
*/
|
|
2726
2729
|
const rtc = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('rtc', props, ...childNodes));
|
|
@@ -2728,7 +2731,7 @@ const rtc = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElem
|
|
|
2728
2731
|
/**
|
|
2729
2732
|
* 创建 <ruby> 元素
|
|
2730
2733
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2731
|
-
* @param {...
|
|
2734
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2732
2735
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2733
2736
|
*/
|
|
2734
2737
|
const ruby = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('ruby', props, ...childNodes));
|
|
@@ -2736,7 +2739,7 @@ const ruby = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEle
|
|
|
2736
2739
|
/**
|
|
2737
2740
|
* 创建 <s> 元素
|
|
2738
2741
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2739
|
-
* @param {...
|
|
2742
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2740
2743
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2741
2744
|
*/
|
|
2742
2745
|
const s = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('s', props, ...childNodes));
|
|
@@ -2744,7 +2747,7 @@ const s = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElemen
|
|
|
2744
2747
|
/**
|
|
2745
2748
|
* 创建 <samp> 元素
|
|
2746
2749
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2747
|
-
* @param {...
|
|
2750
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2748
2751
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2749
2752
|
*/
|
|
2750
2753
|
const samp = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('samp', props, ...childNodes));
|
|
@@ -2752,7 +2755,7 @@ const samp = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEle
|
|
|
2752
2755
|
/**
|
|
2753
2756
|
* 创建 <section> 元素
|
|
2754
2757
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2755
|
-
* @param {...
|
|
2758
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2756
2759
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2757
2760
|
*/
|
|
2758
2761
|
const section = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('section', props, ...childNodes));
|
|
@@ -2760,7 +2763,7 @@ const section = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTML
|
|
|
2760
2763
|
/**
|
|
2761
2764
|
* 创建 <small> 元素
|
|
2762
2765
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2763
|
-
* @param {...
|
|
2766
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2764
2767
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2765
2768
|
*/
|
|
2766
2769
|
const small = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('small', props, ...childNodes));
|
|
@@ -2768,7 +2771,7 @@ const small = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEl
|
|
|
2768
2771
|
/**
|
|
2769
2772
|
* 创建 <span> 元素
|
|
2770
2773
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2771
|
-
* @param {...
|
|
2774
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2772
2775
|
* @returns {HyperscriptExtensions<HTMLSpanElement>}
|
|
2773
2776
|
*/
|
|
2774
2777
|
const span = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLSpanElement>} */hyperscript('span', props, ...childNodes));
|
|
@@ -2776,7 +2779,7 @@ const span = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLSpa
|
|
|
2776
2779
|
/**
|
|
2777
2780
|
* 创建 <strong> 元素
|
|
2778
2781
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2779
|
-
* @param {...
|
|
2782
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2780
2783
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2781
2784
|
*/
|
|
2782
2785
|
const strong = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('strong', props, ...childNodes));
|
|
@@ -2784,7 +2787,7 @@ const strong = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLE
|
|
|
2784
2787
|
/**
|
|
2785
2788
|
* 创建 <sub> 元素
|
|
2786
2789
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2787
|
-
* @param {...
|
|
2790
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2788
2791
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2789
2792
|
*/
|
|
2790
2793
|
const sub = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('sub', props, ...childNodes));
|
|
@@ -2792,7 +2795,7 @@ const sub = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElem
|
|
|
2792
2795
|
/**
|
|
2793
2796
|
* 创建 <summary> 元素
|
|
2794
2797
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2795
|
-
* @param {...
|
|
2798
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2796
2799
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2797
2800
|
*/
|
|
2798
2801
|
const summary = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('summary', props, ...childNodes));
|
|
@@ -2800,7 +2803,7 @@ const summary = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTML
|
|
|
2800
2803
|
/**
|
|
2801
2804
|
* 创建 <sup> 元素
|
|
2802
2805
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2803
|
-
* @param {...
|
|
2806
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2804
2807
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2805
2808
|
*/
|
|
2806
2809
|
const sup = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('sup', props, ...childNodes));
|
|
@@ -2808,7 +2811,7 @@ const sup = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElem
|
|
|
2808
2811
|
/**
|
|
2809
2812
|
* 创建 <table> 元素
|
|
2810
2813
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2811
|
-
* @param {...
|
|
2814
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2812
2815
|
* @returns {HyperscriptExtensions<HTMLTableElement>}
|
|
2813
2816
|
*/
|
|
2814
2817
|
const table = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTableElement>} */hyperscript('table', props, ...childNodes));
|
|
@@ -2816,7 +2819,7 @@ const table = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTa
|
|
|
2816
2819
|
/**
|
|
2817
2820
|
* 创建 <tbody> 元素
|
|
2818
2821
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2819
|
-
* @param {...
|
|
2822
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2820
2823
|
* @returns {HyperscriptExtensions<HTMLTableSectionElement>}
|
|
2821
2824
|
*/
|
|
2822
2825
|
const tbody = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTableSectionElement>} */hyperscript('tbody', props, ...childNodes));
|
|
@@ -2824,7 +2827,7 @@ const tbody = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTa
|
|
|
2824
2827
|
/**
|
|
2825
2828
|
* 创建 <td> 元素
|
|
2826
2829
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2827
|
-
* @param {...
|
|
2830
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2828
2831
|
* @returns {HyperscriptExtensions<HTMLTableCellElement>}
|
|
2829
2832
|
*/
|
|
2830
2833
|
const td = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTableCellElement>} */hyperscript('td', props, ...childNodes));
|
|
@@ -2832,7 +2835,7 @@ const td = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTable
|
|
|
2832
2835
|
/**
|
|
2833
2836
|
* 创建 <tfoot> 元素
|
|
2834
2837
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2835
|
-
* @param {...
|
|
2838
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2836
2839
|
* @returns {HyperscriptExtensions<HTMLTableSectionElement>}
|
|
2837
2840
|
*/
|
|
2838
2841
|
const tfoot = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTableSectionElement>} */hyperscript('tfoot', props, ...childNodes));
|
|
@@ -2840,7 +2843,7 @@ const tfoot = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTa
|
|
|
2840
2843
|
/**
|
|
2841
2844
|
* 创建 <th> 元素
|
|
2842
2845
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2843
|
-
* @param {...
|
|
2846
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2844
2847
|
* @returns {HyperscriptExtensions<HTMLTableCellElement>}
|
|
2845
2848
|
*/
|
|
2846
2849
|
const th = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTableCellElement>} */hyperscript('th', props, ...childNodes));
|
|
@@ -2848,7 +2851,7 @@ const th = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTable
|
|
|
2848
2851
|
/**
|
|
2849
2852
|
* 创建 <thead> 元素
|
|
2850
2853
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2851
|
-
* @param {...
|
|
2854
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2852
2855
|
* @returns {HyperscriptExtensions<HTMLTableSectionElement>}
|
|
2853
2856
|
*/
|
|
2854
2857
|
const thead = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTableSectionElement>} */hyperscript('thead', props, ...childNodes));
|
|
@@ -2856,7 +2859,7 @@ const thead = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTa
|
|
|
2856
2859
|
/**
|
|
2857
2860
|
* 创建 <time> 元素
|
|
2858
2861
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2859
|
-
* @param {...
|
|
2862
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2860
2863
|
* @returns {HyperscriptExtensions<HTMLTimeElement>}
|
|
2861
2864
|
*/
|
|
2862
2865
|
const time = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTimeElement>} */hyperscript('time', props, ...childNodes));
|
|
@@ -2864,7 +2867,7 @@ const time = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTim
|
|
|
2864
2867
|
/**
|
|
2865
2868
|
* 创建 <tr> 元素
|
|
2866
2869
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2867
|
-
* @param {...
|
|
2870
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2868
2871
|
* @returns {HyperscriptExtensions<HTMLTableRowElement>}
|
|
2869
2872
|
*/
|
|
2870
2873
|
const tr = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTableRowElement>} */hyperscript('tr', props, ...childNodes));
|
|
@@ -2872,7 +2875,7 @@ const tr = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLTable
|
|
|
2872
2875
|
/**
|
|
2873
2876
|
* 创建 <tt> 元素
|
|
2874
2877
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2875
|
-
* @param {...
|
|
2878
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2876
2879
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2877
2880
|
*/
|
|
2878
2881
|
const tt = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('tt', props, ...childNodes));
|
|
@@ -2880,7 +2883,7 @@ const tt = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLEleme
|
|
|
2880
2883
|
/**
|
|
2881
2884
|
* 创建 <u> 元素
|
|
2882
2885
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2883
|
-
* @param {...
|
|
2886
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2884
2887
|
* @returns {HyperscriptExtensions<HTMLElement>}
|
|
2885
2888
|
*/
|
|
2886
2889
|
const u = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElement>} */hyperscript('u', props, ...childNodes));
|
|
@@ -2888,7 +2891,7 @@ const u = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLElemen
|
|
|
2888
2891
|
/**
|
|
2889
2892
|
* 创建 <ul> 元素
|
|
2890
2893
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2891
|
-
* @param {...
|
|
2894
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2892
2895
|
* @returns {HyperscriptExtensions<HTMLUListElement>}
|
|
2893
2896
|
*/
|
|
2894
2897
|
const ul = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLUListElement>} */hyperscript('ul', props, ...childNodes));
|
|
@@ -2896,7 +2899,7 @@ const ul = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLUList
|
|
|
2896
2899
|
/**
|
|
2897
2900
|
* 创建 <video> 元素
|
|
2898
2901
|
* @param {{ [_: string]: any }} [props] - 元素属性
|
|
2899
|
-
* @param {...
|
|
2902
|
+
* @param {...NodeInput} childNodes - 子节点
|
|
2900
2903
|
* @returns {HyperscriptExtensions<HTMLVideoElement>}
|
|
2901
2904
|
*/
|
|
2902
2905
|
const video = (props, ...childNodes) => (/** @type {HyperscriptExtensions<HTMLVideoElement>} */hyperscript('video', props, ...childNodes));
|
|
@@ -3662,216 +3665,6 @@ function nestedCombineLatest(model) {
|
|
|
3662
3665
|
function nestedMerge(model) {
|
|
3663
3666
|
return Deep.fromObservable(model).merge();
|
|
3664
3667
|
}
|
|
3665
|
-
;// ./src/object/pickBehaviorSubject.js
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
/**
|
|
3673
|
-
* @typedef {import('./pickBehaviorSubject.js').NestedStringArray} NestedStringArray
|
|
3674
|
-
*/
|
|
3675
|
-
|
|
3676
|
-
/**
|
|
3677
|
-
* @template T
|
|
3678
|
-
* @typedef {import('./pickBehaviorSubject.js').NestedObject<T>} NestedObject<T>
|
|
3679
|
-
*/
|
|
3680
|
-
|
|
3681
|
-
/**
|
|
3682
|
-
*
|
|
3683
|
-
* @param {NestedStringArray[]} paths
|
|
3684
|
-
*/
|
|
3685
|
-
const getMap = paths => new Map(paths.map(path => {
|
|
3686
|
-
if (typeof path === 'string') {
|
|
3687
|
-
return [path, []];
|
|
3688
|
-
} else {
|
|
3689
|
-
let [h, ...rest] = path;
|
|
3690
|
-
return [(/** @type {string} */h), rest];
|
|
3691
|
-
}
|
|
3692
|
-
}));
|
|
3693
|
-
|
|
3694
|
-
/**
|
|
3695
|
-
* @param {{pickeys?:()=>NestedStringArray[]}} source
|
|
3696
|
-
* @param {NestedStringArray[]} paths
|
|
3697
|
-
*/
|
|
3698
|
-
const mergeKeys = (source, paths) => {
|
|
3699
|
-
if (paths && paths.length > 0) {
|
|
3700
|
-
return paths;
|
|
3701
|
-
} else if ('pickeys' in source && typeof source.pickeys === 'function') {
|
|
3702
|
-
return source.pickeys();
|
|
3703
|
-
} else {
|
|
3704
|
-
return [];
|
|
3705
|
-
}
|
|
3706
|
-
};
|
|
3707
|
-
|
|
3708
|
-
/**
|
|
3709
|
-
* 数组中所有元素应该类型相同,符合同一套逻辑
|
|
3710
|
-
* @template T
|
|
3711
|
-
* @param {NestedObject<T>[]} arr
|
|
3712
|
-
* @param {NestedStringArray[]} paths
|
|
3713
|
-
* @returns {NestedObject<T>[] }}
|
|
3714
|
-
*/
|
|
3715
|
-
const getArray = (arr, paths) => [...function* () {
|
|
3716
|
-
for (const elem of arr) {
|
|
3717
|
-
if (isRxType(elem)) {
|
|
3718
|
-
if (elem instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
|
3719
|
-
yield elem.value;
|
|
3720
|
-
} else {
|
|
3721
|
-
// ignore observable, subscription ...
|
|
3722
|
-
}
|
|
3723
|
-
} else if (Array.isArray(elem) || elem instanceof ObservableArray_ObservableArray) {
|
|
3724
|
-
if (elem.length === 0) {} else {
|
|
3725
|
-
yield getArray(elem, paths);
|
|
3726
|
-
}
|
|
3727
|
-
} else if (isPlainObject(elem)) {
|
|
3728
|
-
if (isEmptyObject(elem)) {} else {
|
|
3729
|
-
yield getObject(elem, paths);
|
|
3730
|
-
}
|
|
3731
|
-
} else {
|
|
3732
|
-
// ignore other number, string, null, boolean, function ...
|
|
3733
|
-
}
|
|
3734
|
-
}
|
|
3735
|
-
}()];
|
|
3736
|
-
|
|
3737
|
-
/**
|
|
3738
|
-
* @template T
|
|
3739
|
-
* @param {{[_:string]:NestedObject<T>}} obj
|
|
3740
|
-
* @param {NestedStringArray[]} paths
|
|
3741
|
-
* @returns {{ [_: string]: NestedObject<T> }}
|
|
3742
|
-
*/
|
|
3743
|
-
const getObject = (obj, paths) => Object.fromEntries(function* () {
|
|
3744
|
-
let mergedPaths = mergeKeys(obj, paths);
|
|
3745
|
-
if (mergedPaths.length === 0) {
|
|
3746
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
3747
|
-
if (isRxType(value)) {
|
|
3748
|
-
if (value instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
|
3749
|
-
console.log('isRxType(value) && value instanceof BehaviorSubject');
|
|
3750
|
-
yield [key, value.value];
|
|
3751
|
-
} else {
|
|
3752
|
-
// ignore observable, subscription ...
|
|
3753
|
-
console.log('isRxType(value) && else');
|
|
3754
|
-
}
|
|
3755
|
-
} else if (Array.isArray(value) || value instanceof ObservableArray_ObservableArray) {
|
|
3756
|
-
if (value.length === 0) {} else {
|
|
3757
|
-
yield [key, getArray(value, [])];
|
|
3758
|
-
}
|
|
3759
|
-
} else if (isPlainObject(value)) {
|
|
3760
|
-
if (isEmptyObject(value)) {
|
|
3761
|
-
console.log('isPlainObject isEmptyObject');
|
|
3762
|
-
} else {
|
|
3763
|
-
console.log('isPlainObject');
|
|
3764
|
-
yield [key, getObject(value, [])];
|
|
3765
|
-
}
|
|
3766
|
-
} else {
|
|
3767
|
-
// ignore other number, string, null, boolean, function ...
|
|
3768
|
-
console.log('ignore other:' + `${key}:${value}`);
|
|
3769
|
-
}
|
|
3770
|
-
}
|
|
3771
|
-
} else {
|
|
3772
|
-
let mp = getMap(mergedPaths);
|
|
3773
|
-
for (const key of mp.keys()) {
|
|
3774
|
-
if (key in obj) {
|
|
3775
|
-
const value = obj[key];
|
|
3776
|
-
const newPaths = mp.get(key) ?? [];
|
|
3777
|
-
if (isRxType(value)) {
|
|
3778
|
-
if (value instanceof external_commonjs_rxjs_commonjs2_rxjs_amd_rxjs_root_rxjs_.BehaviorSubject) {
|
|
3779
|
-
console.log('isRxType(value) && value instanceof BehaviorSubject');
|
|
3780
|
-
yield [key, value.value];
|
|
3781
|
-
} else {
|
|
3782
|
-
// ignore observable, subscription ...
|
|
3783
|
-
console.log('isRxType(value) && else');
|
|
3784
|
-
}
|
|
3785
|
-
} else if (Array.isArray(value) || value instanceof ObservableArray_ObservableArray) {
|
|
3786
|
-
if (value.length === 0) {} else {
|
|
3787
|
-
yield [key, getArray(value, newPaths)];
|
|
3788
|
-
}
|
|
3789
|
-
} else if (isPlainObject(value)) {
|
|
3790
|
-
if (isEmptyObject(value)) {
|
|
3791
|
-
console.log('isPlainObject isEmptyObject');
|
|
3792
|
-
} else {
|
|
3793
|
-
console.log('isPlainObject');
|
|
3794
|
-
yield [key, getObject(value, newPaths)];
|
|
3795
|
-
}
|
|
3796
|
-
} else {
|
|
3797
|
-
// ignore other number, string, null, boolean, function ...
|
|
3798
|
-
console.log('ignore other:' + `${key}:${value}`);
|
|
3799
|
-
}
|
|
3800
|
-
}
|
|
3801
|
-
}
|
|
3802
|
-
}
|
|
3803
|
-
}());
|
|
3804
|
-
|
|
3805
|
-
/**
|
|
3806
|
-
*
|
|
3807
|
-
* 拾取对象中的BehaviorSubject值,作爲葉子節點,忽略其他值。
|
|
3808
|
-
* @public
|
|
3809
|
-
* @template T
|
|
3810
|
-
* @param {{[_:string]:NestedObject<T>} & { pickeys?: () => NestedStringArray[] }} source - 输入的数据结构,可以是对象、数组或BehaviorSubject
|
|
3811
|
-
* @param {NestedStringArray[]} [paths]
|
|
3812
|
-
* @returns {{[_:string]:NestedObject<T>}}
|
|
3813
|
-
* @throws {Error} 当输入不包含任何BehaviorSubject或结构不符合预期时抛出错误
|
|
3814
|
-
*/
|
|
3815
|
-
const pickBehaviorSubject = (source, paths = []) => {
|
|
3816
|
-
if (isRxType(source)) {
|
|
3817
|
-
throw new Error("请将内容包装在普通对象中");
|
|
3818
|
-
} else if (Array.isArray(source) || source instanceof ObservableArray_ObservableArray) {
|
|
3819
|
-
throw new Error("请将内容包装在普通对象中");
|
|
3820
|
-
} else if (isPlainObject(source)) {
|
|
3821
|
-
if (isEmptyObject(source)) {
|
|
3822
|
-
throw new Error("N没有内容需要pick");
|
|
3823
|
-
} else {
|
|
3824
|
-
return getObject(source, paths);
|
|
3825
|
-
}
|
|
3826
|
-
} else {
|
|
3827
|
-
throw new Error("没有内容需要pick");
|
|
3828
|
-
}
|
|
3829
|
-
};
|
|
3830
|
-
|
|
3831
|
-
/**
|
|
3832
|
-
* 提取值判断的分类
|
|
3833
|
-
* @param {*} value
|
|
3834
|
-
* @returns
|
|
3835
|
-
*/
|
|
3836
|
-
const testit = value => {
|
|
3837
|
-
if (typeof value === 'undefined' || value === null) {
|
|
3838
|
-
return {
|
|
3839
|
-
kind: "null"
|
|
3840
|
-
};
|
|
3841
|
-
} else if (isObservable(value)) {
|
|
3842
|
-
if (value instanceof BehaviorSubject) {
|
|
3843
|
-
return {
|
|
3844
|
-
kind: "BehaviorSubject"
|
|
3845
|
-
};
|
|
3846
|
-
} else {
|
|
3847
|
-
return {
|
|
3848
|
-
kind: "Observable"
|
|
3849
|
-
};
|
|
3850
|
-
}
|
|
3851
|
-
} else if (value instanceof ObservableArray) {
|
|
3852
|
-
return {
|
|
3853
|
-
kind: "ObservableArray"
|
|
3854
|
-
};
|
|
3855
|
-
} else if (Array.isArray(value)) {
|
|
3856
|
-
return {
|
|
3857
|
-
kind: "Array"
|
|
3858
|
-
};
|
|
3859
|
-
} else if (typeof value === 'object') {
|
|
3860
|
-
if (Object.keys(value).length === 0) {
|
|
3861
|
-
return {
|
|
3862
|
-
kind: "EmptyObject"
|
|
3863
|
-
};
|
|
3864
|
-
} else {
|
|
3865
|
-
return {
|
|
3866
|
-
kind: "PlainObject"
|
|
3867
|
-
};
|
|
3868
|
-
}
|
|
3869
|
-
} else {
|
|
3870
|
-
return {
|
|
3871
|
-
kind: "else"
|
|
3872
|
-
};
|
|
3873
|
-
}
|
|
3874
|
-
};
|
|
3875
3668
|
;// ./src/object/restore.js
|
|
3876
3669
|
|
|
3877
3670
|
|
|
@@ -3901,7 +3694,7 @@ function loop(o, src) {
|
|
|
3901
3694
|
o.next(src);
|
|
3902
3695
|
} else if (o === null || typeof o !== 'object' || isRxType(o)) {
|
|
3903
3696
|
// noop
|
|
3904
|
-
} else if (o instanceof
|
|
3697
|
+
} else if (o instanceof ObservableArray) {
|
|
3905
3698
|
let len = o.length;
|
|
3906
3699
|
let diffcount = len - src.length;
|
|
3907
3700
|
if (diffcount > 0) {
|
|
@@ -3950,7 +3743,6 @@ function loop(o, src) {
|
|
|
3950
3743
|
|
|
3951
3744
|
|
|
3952
3745
|
|
|
3953
|
-
|
|
3954
3746
|
;// ./src/props/0.js
|
|
3955
3747
|
|
|
3956
3748
|
|
package/package.json
CHANGED
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"jsdom": "26.1.0",
|
|
18
18
|
"typescript": "5.8.3",
|
|
19
19
|
"babel-loader": "10.0.0",
|
|
20
|
-
"webpack": "5.
|
|
20
|
+
"webpack": "5.100.0",
|
|
21
21
|
"webpack-cli": "6.0.1"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"check": "tsc --noEmit",
|
|
25
25
|
"types": "tsc",
|
|
26
26
|
"types:file": "tsc --allowJs --declaration --emitDeclarationOnly --outDir types",
|
|
27
|
-
"build": "webpack --stats
|
|
27
|
+
"build": "webpack --stats normal",
|
|
28
28
|
"test": "jest",
|
|
29
29
|
"extract": "api-extractor run --local"
|
|
30
30
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"type": "module",
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"license": "LGPL-3.0-or-later",
|
|
49
|
-
"version": "1.3.
|
|
49
|
+
"version": "1.3.26",
|
|
50
50
|
"files": [
|
|
51
51
|
"dist",
|
|
52
52
|
"README.md"
|