yvee 0.0.8 → 0.0.9
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/index.d.ts +724 -480
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
type ModuleLike = {
|
|
2
|
+
[Symbol.toStringTag]: "Module";
|
|
3
|
+
default?: unknown;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
1
6
|
declare const isFN: (v: any) => v is Function;
|
|
2
7
|
declare const isAsync: (v: any) => v is Function;
|
|
3
8
|
declare const isPromise: (v: any) => v is Function;
|
|
4
9
|
declare const isNumber: (value: any) => boolean;
|
|
5
10
|
declare const isObject: (val: any) => val is Record<string, any>;
|
|
6
11
|
declare const isPlainObject: (value: any) => boolean;
|
|
12
|
+
declare const isModule: (obj: any) => obj is ModuleLike;
|
|
7
13
|
declare const isArraybuff: (val: any) => val is string | ArrayBuffer | Uint8Array<ArrayBufferLike>;
|
|
8
14
|
declare const isClassOrId: (k: string) => boolean;
|
|
9
15
|
declare const isBool: (v: any) => v is boolean;
|
|
@@ -19,6 +25,7 @@ declare const isInt: (str: string) => boolean;
|
|
|
19
25
|
declare const isWindow: boolean;
|
|
20
26
|
declare const isNotWindow: boolean;
|
|
21
27
|
|
|
28
|
+
type is_ModuleLike = ModuleLike;
|
|
22
29
|
declare const is_isArr: typeof isArr;
|
|
23
30
|
declare const is_isArraybuff: typeof isArraybuff;
|
|
24
31
|
declare const is_isAsync: typeof isAsync;
|
|
@@ -27,6 +34,7 @@ declare const is_isClassOrId: typeof isClassOrId;
|
|
|
27
34
|
declare const is_isDefined: typeof isDefined;
|
|
28
35
|
declare const is_isFN: typeof isFN;
|
|
29
36
|
declare const is_isInt: typeof isInt;
|
|
37
|
+
declare const is_isModule: typeof isModule;
|
|
30
38
|
declare const is_isNotNull: typeof isNotNull;
|
|
31
39
|
declare const is_isNotWindow: typeof isNotWindow;
|
|
32
40
|
declare const is_isNull: typeof isNull;
|
|
@@ -40,32 +48,15 @@ declare const is_isStr: typeof isStr;
|
|
|
40
48
|
declare const is_isUndefined: typeof isUndefined;
|
|
41
49
|
declare const is_isWindow: typeof isWindow;
|
|
42
50
|
declare namespace is {
|
|
43
|
-
export {
|
|
44
|
-
|
|
45
|
-
is_isArraybuff as isArraybuff,
|
|
46
|
-
is_isAsync as isAsync,
|
|
47
|
-
is_isBool as isBool,
|
|
48
|
-
is_isClassOrId as isClassOrId,
|
|
49
|
-
is_isDefined as isDefined,
|
|
50
|
-
is_isFN as isFN,
|
|
51
|
-
is_isInt as isInt,
|
|
52
|
-
is_isNotNull as isNotNull,
|
|
53
|
-
is_isNotWindow as isNotWindow,
|
|
54
|
-
is_isNull as isNull,
|
|
55
|
-
is_isNum as isNum,
|
|
56
|
-
is_isNumber as isNumber,
|
|
57
|
-
is_isObj as isObj,
|
|
58
|
-
is_isObject as isObject,
|
|
59
|
-
is_isPlainObject as isPlainObject,
|
|
60
|
-
is_isPromise as isPromise,
|
|
61
|
-
is_isStr as isStr,
|
|
62
|
-
is_isUndefined as isUndefined,
|
|
63
|
-
is_isWindow as isWindow,
|
|
64
|
-
};
|
|
51
|
+
export { is_isArr as isArr, is_isArraybuff as isArraybuff, is_isAsync as isAsync, is_isBool as isBool, is_isClassOrId as isClassOrId, is_isDefined as isDefined, is_isFN as isFN, is_isInt as isInt, is_isModule as isModule, is_isNotNull as isNotNull, is_isNotWindow as isNotWindow, is_isNull as isNull, is_isNum as isNum, is_isNumber as isNumber, is_isObj as isObj, is_isObject as isObject, is_isPlainObject as isPlainObject, is_isPromise as isPromise, is_isStr as isStr, is_isUndefined as isUndefined, is_isWindow as isWindow };
|
|
52
|
+
export type { is_ModuleLike as ModuleLike };
|
|
65
53
|
}
|
|
66
54
|
|
|
55
|
+
declare const IfClient: <T>(fn: () => T) => T | undefined;
|
|
56
|
+
|
|
67
57
|
type V = string | number | boolean;
|
|
68
58
|
type obj$1<T> = Record<string, T>;
|
|
59
|
+
type maybePromise<T> = Promise<T> | T;
|
|
69
60
|
|
|
70
61
|
/**
|
|
71
62
|
* A custom Map implementation that provides additional utility methods for working with objects and maps.
|
|
@@ -86,13 +77,6 @@ declare class log {
|
|
|
86
77
|
static set e(a: any);
|
|
87
78
|
static set w(a: any);
|
|
88
79
|
}
|
|
89
|
-
declare class idm {
|
|
90
|
-
_c: number;
|
|
91
|
-
_id: string;
|
|
92
|
-
constructor(mid?: string);
|
|
93
|
-
get id(): string;
|
|
94
|
-
get mid(): string;
|
|
95
|
-
}
|
|
96
80
|
|
|
97
81
|
interface metaViewport {
|
|
98
82
|
width?: string;
|
|
@@ -194,31 +178,37 @@ interface headAttr {
|
|
|
194
178
|
link?: link<string>[];
|
|
195
179
|
script?: script<string | boolean>[];
|
|
196
180
|
css?: string[] | string;
|
|
181
|
+
js?: string[] | string;
|
|
197
182
|
description?: string;
|
|
198
183
|
}
|
|
199
|
-
declare class head implements headAttr {
|
|
184
|
+
declare abstract class head implements headAttr {
|
|
200
185
|
title?: string;
|
|
201
186
|
description?: string;
|
|
202
|
-
|
|
187
|
+
css?: string[] | string;
|
|
188
|
+
js?: string[] | string;
|
|
203
189
|
meta?: meta<string>[] | Meta;
|
|
204
190
|
link?: link<string>[];
|
|
205
191
|
script?: script<string | boolean>[];
|
|
206
|
-
css?: string[] | string;
|
|
207
192
|
}
|
|
208
|
-
type CSSinT
|
|
193
|
+
type CSSinT = {
|
|
209
194
|
[P in keyof CSSStyleDeclaration]?: V;
|
|
210
195
|
} & {
|
|
211
196
|
[key: string]: V;
|
|
212
197
|
};
|
|
213
|
-
type headType = Mapper<keyof
|
|
198
|
+
type headType = Mapper<keyof headAttr, any>;
|
|
199
|
+
interface hHeadCFG {
|
|
200
|
+
initial?: headType;
|
|
201
|
+
mark?: boolean;
|
|
202
|
+
push?: obj$1<any>;
|
|
203
|
+
}
|
|
214
204
|
declare class htmlHead {
|
|
215
205
|
lang: string;
|
|
216
206
|
htmlHead: headType;
|
|
217
|
-
head: (heads?: headAttr) => void;
|
|
218
|
-
constructor();
|
|
207
|
+
head: (heads?: Omit<headAttr, "base">) => void;
|
|
208
|
+
constructor({ mark, push }?: hHeadCFG);
|
|
219
209
|
}
|
|
220
|
-
declare const cssLoader: (vv: link<string>) => Promise<
|
|
221
|
-
declare function addCSS(selector: string, rules?: CSSinT
|
|
210
|
+
declare const cssLoader: (vv: link<string>) => Promise<HTMLLinkElement | undefined>;
|
|
211
|
+
declare function addCSS(selector: string, rules?: CSSinT): void;
|
|
222
212
|
|
|
223
213
|
declare class MinStorage {
|
|
224
214
|
readonly path: string;
|
|
@@ -231,12 +221,13 @@ declare class MinStorage {
|
|
|
231
221
|
* string | int | float | file | uuid
|
|
232
222
|
* - /path/\<string:hell>
|
|
233
223
|
*/
|
|
234
|
-
declare class Storage
|
|
224
|
+
declare class Storage<T extends MinStorage> {
|
|
235
225
|
private _storage;
|
|
236
226
|
private CC;
|
|
237
227
|
constructor();
|
|
238
228
|
set(min: T): void;
|
|
239
229
|
get(path: string): [T | undefined, Record<string, string>];
|
|
230
|
+
keys(): MapIterator<string>;
|
|
240
231
|
}
|
|
241
232
|
|
|
242
233
|
declare class Time {
|
|
@@ -316,95 +307,566 @@ declare class Formatteer {
|
|
|
316
307
|
get pr(): string;
|
|
317
308
|
}
|
|
318
309
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
states: ((id: string) => () => void)[];
|
|
324
|
-
events: Mapper<string, (...arg: any) => any>;
|
|
325
|
-
OZ: OZ;
|
|
326
|
-
constructor(xid: string, IDM?: idm, _OZ?: OZ);
|
|
327
|
-
attr_push(key: string, val: any, pre?: string): void;
|
|
328
|
-
get attr(): string;
|
|
329
|
-
set id(id: string);
|
|
330
|
-
get id(): string | undefined;
|
|
310
|
+
type hookFN<T extends any[]> = (...args: statefulValue<T>) => maybePromise<void>;
|
|
311
|
+
interface stateCFG {
|
|
312
|
+
id?: string;
|
|
313
|
+
init?: boolean;
|
|
331
314
|
}
|
|
315
|
+
declare function StateHook<T extends any[]>(callback: hookFN<T>, statefuls: [...{
|
|
316
|
+
[K in keyof T]: Stateful<T[K]>;
|
|
317
|
+
}], { id, init }?: stateCFG): Promise<() => void>;
|
|
332
318
|
|
|
333
|
-
|
|
334
|
-
|
|
319
|
+
type statefulValue<T extends any[]> = {
|
|
320
|
+
[K in keyof T]: T[K] extends Stateful<infer U> ? U : T[K];
|
|
321
|
+
};
|
|
322
|
+
declare class Stateful<T> extends EventTarget {
|
|
323
|
+
private options;
|
|
324
|
+
private deep;
|
|
325
|
+
private verify;
|
|
326
|
+
private hooks;
|
|
335
327
|
private states;
|
|
336
|
-
private
|
|
337
|
-
private
|
|
338
|
-
private
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
get processWindowEvents(): this;
|
|
346
|
-
reset(id: string[]): this;
|
|
347
|
-
RPS(oz?: this): this;
|
|
328
|
+
private _value;
|
|
329
|
+
private listening;
|
|
330
|
+
private end?;
|
|
331
|
+
constructor(value: T, options?: AddEventListenerOptions, deep?: boolean, verify?: boolean);
|
|
332
|
+
get value(): T;
|
|
333
|
+
set value(newValue: T);
|
|
334
|
+
get listen(): () => void;
|
|
335
|
+
call<Q>(callback: (this: Elements, arg: T) => Q, entry: string): (id: string) => () => void;
|
|
336
|
+
hook<T extends any[]>(callback: hookFN<T>): (id: string) => () => void;
|
|
348
337
|
}
|
|
338
|
+
declare function State<T>(value: T, options?: AddEventListenerOptions): Stateful<T>;
|
|
339
|
+
/**
|
|
340
|
+
* Quick State checking - skip checking of Object keys:values as it will only be compared as a===b
|
|
341
|
+
*/
|
|
342
|
+
declare function QState<T>(value: T, verify?: boolean): Stateful<T>;
|
|
349
343
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
344
|
+
type CSSStyle = {
|
|
345
|
+
[P in keyof CSSStyleDeclaration]?: DVal;
|
|
346
|
+
} & {
|
|
347
|
+
[key: string]: DVal;
|
|
348
|
+
};
|
|
356
349
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
350
|
+
interface c_events<T extends Elements = HTMLElement> {
|
|
351
|
+
state?: (this: T, e: T) => [(...args: any[]) => void, Stateful<any>[], boolean?];
|
|
352
|
+
ready?: (this: T, e: T) => void;
|
|
353
|
+
resize?: (this: T, e: UIEvent) => void;
|
|
354
|
+
beforeunload?: (this: T, e: BeforeUnloadEvent) => void;
|
|
355
|
+
popstate?: (this: T, e: PopStateEvent) => void;
|
|
356
|
+
winscroll?: (this: T, e: Event) => void;
|
|
357
|
+
winload?: (this: T, e: Event) => void;
|
|
358
|
+
winfocus?: (this: T, e: Event) => void;
|
|
359
|
+
winblur?: (this: T, e: Event) => void;
|
|
362
360
|
}
|
|
363
|
-
declare function eventStream(url: string, withCredentials?: boolean): eStream;
|
|
364
361
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
362
|
+
interface EAttr<T = DVal> {
|
|
363
|
+
[key: string]: any;
|
|
364
|
+
[key: `data-${string}`]: T | any;
|
|
365
|
+
accesskey?: T;
|
|
366
|
+
autocapitalize?: T;
|
|
367
|
+
class?: T;
|
|
368
|
+
on?: events<any>;
|
|
369
|
+
contenteditable?: T;
|
|
370
|
+
dir?: T;
|
|
371
|
+
draggable?: T;
|
|
372
|
+
hidden?: T;
|
|
373
|
+
id?: T;
|
|
374
|
+
itemprop?: T;
|
|
375
|
+
lang?: T;
|
|
376
|
+
role?: T;
|
|
377
|
+
slot?: T;
|
|
378
|
+
spellcheck?: T;
|
|
379
|
+
style?: CSSStyle | string;
|
|
380
|
+
tabindex?: T;
|
|
381
|
+
title?: T;
|
|
382
|
+
translate?: T;
|
|
383
|
+
}
|
|
384
|
+
interface ElementAttributes {
|
|
385
|
+
link: linkAttr;
|
|
386
|
+
base: baseAttr;
|
|
387
|
+
meta: metaAttr;
|
|
388
|
+
p: EAttr;
|
|
389
|
+
br: EAttr;
|
|
390
|
+
hr: EAttr;
|
|
391
|
+
h: EAttr;
|
|
392
|
+
cmnt: EAttr;
|
|
393
|
+
root: EAttr;
|
|
394
|
+
div: EAttr;
|
|
395
|
+
span: EAttr;
|
|
396
|
+
header: EAttr;
|
|
397
|
+
hgroup: EAttr;
|
|
398
|
+
footer: EAttr;
|
|
399
|
+
main: EAttr;
|
|
400
|
+
section: EAttr;
|
|
401
|
+
search: EAttr;
|
|
402
|
+
article: EAttr;
|
|
403
|
+
aside: EAttr;
|
|
404
|
+
details: detailsAttr;
|
|
405
|
+
dialog: dialogAttr;
|
|
406
|
+
summary: EAttr;
|
|
407
|
+
data: dataAttr;
|
|
408
|
+
noscript: EAttr;
|
|
409
|
+
object: objectAttr;
|
|
410
|
+
param: paramAttr;
|
|
411
|
+
script: scriptAttr;
|
|
412
|
+
a: aAttr;
|
|
413
|
+
nav: EAttr;
|
|
414
|
+
style: styleAttr;
|
|
415
|
+
audio: audioAttr;
|
|
416
|
+
video: videoAttr;
|
|
417
|
+
source: sourceAttr;
|
|
418
|
+
track: trackAttr;
|
|
419
|
+
img: imgAttr;
|
|
420
|
+
map: mapAttr;
|
|
421
|
+
area: areaAttr;
|
|
422
|
+
canvas: canvasAttr;
|
|
423
|
+
figcaption: EAttr;
|
|
424
|
+
figure: EAttr;
|
|
425
|
+
picture: EAttr;
|
|
426
|
+
iframe: iframeAttr;
|
|
427
|
+
form: formAttr;
|
|
428
|
+
input: inputAttr;
|
|
429
|
+
textarea: textareaAttr;
|
|
430
|
+
button: buttonAttr;
|
|
431
|
+
select: selectAttr;
|
|
432
|
+
optgroup: optgroupAttr;
|
|
433
|
+
option: optionAttr;
|
|
434
|
+
label: labelAttr;
|
|
435
|
+
fieldset: fieldsetAttr;
|
|
436
|
+
legend: EAttr;
|
|
437
|
+
datalist: EAttr;
|
|
438
|
+
table: EAttr;
|
|
439
|
+
caption: EAttr;
|
|
440
|
+
th: thAttr;
|
|
441
|
+
tr: EAttr;
|
|
442
|
+
td: tdAttr;
|
|
443
|
+
thead: EAttr;
|
|
444
|
+
tbody: EAttr;
|
|
445
|
+
tfoot: EAttr;
|
|
446
|
+
col: colAttr;
|
|
447
|
+
colgroup: colgroupAttr;
|
|
448
|
+
b: EAttr;
|
|
449
|
+
i: EAttr;
|
|
450
|
+
q: qAttr;
|
|
451
|
+
s: EAttr;
|
|
452
|
+
u: EAttr;
|
|
453
|
+
em: EAttr;
|
|
454
|
+
rp: EAttr;
|
|
455
|
+
del: delAttr;
|
|
456
|
+
dfn: EAttr;
|
|
457
|
+
ins: insAttr;
|
|
458
|
+
kbd: EAttr;
|
|
459
|
+
pre: EAttr;
|
|
460
|
+
sub: EAttr;
|
|
461
|
+
sup: EAttr;
|
|
462
|
+
var: EAttr;
|
|
463
|
+
wbr: EAttr;
|
|
464
|
+
cite: EAttr;
|
|
465
|
+
time: timeAttr;
|
|
466
|
+
abbr: EAttr;
|
|
467
|
+
code: EAttr;
|
|
468
|
+
mark: EAttr;
|
|
469
|
+
samp: EAttr;
|
|
470
|
+
meter: meterAttr;
|
|
471
|
+
small: EAttr;
|
|
472
|
+
strong: EAttr;
|
|
473
|
+
address: EAttr;
|
|
474
|
+
progress: progressAttr;
|
|
475
|
+
template: EAttr;
|
|
476
|
+
blockquote: blockquoteAttr;
|
|
477
|
+
menu: menuAttr;
|
|
478
|
+
ul: EAttr;
|
|
479
|
+
ol: olAttr;
|
|
480
|
+
li: liAttr;
|
|
481
|
+
dl: EAttr;
|
|
482
|
+
dt: EAttr;
|
|
483
|
+
dd: EAttr;
|
|
484
|
+
h1: EAttr;
|
|
485
|
+
h2: EAttr;
|
|
486
|
+
h3: EAttr;
|
|
487
|
+
h4: EAttr;
|
|
488
|
+
h5: EAttr;
|
|
489
|
+
h6: EAttr;
|
|
490
|
+
}
|
|
491
|
+
interface SVGAttributes {
|
|
492
|
+
svg: EAttr;
|
|
493
|
+
path: EAttr;
|
|
494
|
+
circle: EAttr;
|
|
495
|
+
animate: EAttr;
|
|
496
|
+
animateMotion: EAttr;
|
|
497
|
+
animateTransform: EAttr;
|
|
498
|
+
clipPath: EAttr;
|
|
499
|
+
defs: EAttr;
|
|
500
|
+
desc: EAttr;
|
|
501
|
+
ellipse: EAttr;
|
|
502
|
+
feBlend: EAttr;
|
|
503
|
+
feColorMatrix: EAttr;
|
|
504
|
+
feComponentTransfer: EAttr;
|
|
505
|
+
feComposite: EAttr;
|
|
506
|
+
feConvolveMatrix: EAttr;
|
|
507
|
+
feDiffuseLighting: EAttr;
|
|
508
|
+
feDisplacementMap: EAttr;
|
|
509
|
+
feDistantLight: EAttr;
|
|
510
|
+
feDropShadow: EAttr;
|
|
511
|
+
feFlood: EAttr;
|
|
512
|
+
feFuncA: EAttr;
|
|
513
|
+
feFuncB: EAttr;
|
|
514
|
+
feFuncG: EAttr;
|
|
515
|
+
feFuncR: EAttr;
|
|
516
|
+
feGaussianBlur: EAttr;
|
|
517
|
+
feImage: EAttr;
|
|
518
|
+
feMerge: EAttr;
|
|
519
|
+
feMergeNode: EAttr;
|
|
520
|
+
feMorphology: EAttr;
|
|
521
|
+
feOffset: EAttr;
|
|
522
|
+
fePointLight: EAttr;
|
|
523
|
+
feSpecularLighting: EAttr;
|
|
524
|
+
feSpotLight: EAttr;
|
|
525
|
+
feTile: EAttr;
|
|
526
|
+
feTurbulence: EAttr;
|
|
527
|
+
filter: EAttr;
|
|
528
|
+
foreignObject: EAttr;
|
|
529
|
+
g: EAttr;
|
|
530
|
+
image: EAttr;
|
|
531
|
+
line: EAttr;
|
|
532
|
+
linearGradient: EAttr;
|
|
533
|
+
marker: EAttr;
|
|
534
|
+
mask: EAttr;
|
|
535
|
+
metadata: EAttr;
|
|
536
|
+
mpath: EAttr;
|
|
537
|
+
pattern: EAttr;
|
|
538
|
+
polygon: EAttr;
|
|
539
|
+
polyline: EAttr;
|
|
540
|
+
radialGradient: EAttr;
|
|
541
|
+
rect: EAttr;
|
|
542
|
+
set: EAttr;
|
|
543
|
+
stop: EAttr;
|
|
544
|
+
symbol: EAttr;
|
|
545
|
+
text: EAttr;
|
|
546
|
+
textPath: EAttr;
|
|
547
|
+
title: EAttr;
|
|
548
|
+
tspan: EAttr;
|
|
549
|
+
use: EAttr;
|
|
550
|
+
view: EAttr;
|
|
551
|
+
}
|
|
552
|
+
interface aAttr<T = DVal> extends EAttr {
|
|
553
|
+
download?: T;
|
|
554
|
+
href?: T;
|
|
555
|
+
hreflang?: T;
|
|
556
|
+
media?: T;
|
|
557
|
+
ping?: T;
|
|
558
|
+
referrerpolicy?: T;
|
|
559
|
+
rel?: T;
|
|
560
|
+
shape?: T;
|
|
561
|
+
target?: T;
|
|
562
|
+
}
|
|
563
|
+
interface areaAttr<T = DVal> extends EAttr {
|
|
564
|
+
alt?: T;
|
|
565
|
+
coords?: T;
|
|
566
|
+
download?: T;
|
|
567
|
+
href?: T;
|
|
568
|
+
media?: T;
|
|
569
|
+
ping?: T;
|
|
570
|
+
referrerpolicy?: T;
|
|
571
|
+
rel?: T;
|
|
572
|
+
shape?: T;
|
|
573
|
+
target?: T;
|
|
574
|
+
}
|
|
575
|
+
interface audioAttr<T = DVal> extends EAttr {
|
|
576
|
+
autoplay?: T;
|
|
577
|
+
controls?: T;
|
|
578
|
+
crossorigin?: T;
|
|
579
|
+
loop?: T;
|
|
580
|
+
muted?: T;
|
|
581
|
+
preload?: T;
|
|
582
|
+
src?: T;
|
|
583
|
+
}
|
|
584
|
+
interface baseAttr<T = DVal> extends EAttr {
|
|
585
|
+
href?: T;
|
|
586
|
+
target?: T;
|
|
587
|
+
}
|
|
588
|
+
interface blockquoteAttr<T = DVal> extends EAttr {
|
|
589
|
+
cite?: T;
|
|
590
|
+
}
|
|
591
|
+
interface buttonAttr<T = DVal> extends EAttr {
|
|
592
|
+
disabled?: T;
|
|
593
|
+
form?: T;
|
|
594
|
+
formaction?: T;
|
|
595
|
+
formenctype?: T;
|
|
596
|
+
formmethod?: T;
|
|
597
|
+
formnovalidate?: T;
|
|
598
|
+
formtarget?: T;
|
|
599
|
+
name?: T;
|
|
600
|
+
type?: T;
|
|
601
|
+
value?: T;
|
|
602
|
+
}
|
|
603
|
+
interface canvasAttr<T = DVal> extends EAttr {
|
|
604
|
+
height?: T;
|
|
605
|
+
width?: T;
|
|
606
|
+
}
|
|
607
|
+
interface colAttr<T = DVal> extends EAttr {
|
|
608
|
+
span?: T;
|
|
609
|
+
}
|
|
610
|
+
interface colgroupAttr<T = DVal> extends EAttr {
|
|
611
|
+
span?: T;
|
|
612
|
+
}
|
|
613
|
+
interface dataAttr<T = DVal> extends EAttr {
|
|
614
|
+
value?: T;
|
|
615
|
+
}
|
|
616
|
+
interface delAttr<T = DVal> extends EAttr {
|
|
617
|
+
cite?: T;
|
|
618
|
+
datetime?: T;
|
|
619
|
+
}
|
|
620
|
+
interface detailsAttr<T = DVal> extends EAttr {
|
|
621
|
+
open?: T;
|
|
622
|
+
}
|
|
623
|
+
interface dialogAttr<T = DVal> extends EAttr {
|
|
624
|
+
open?: T;
|
|
625
|
+
}
|
|
626
|
+
interface fieldsetAttr<T = DVal> extends EAttr {
|
|
627
|
+
disabled?: T;
|
|
628
|
+
form?: T;
|
|
629
|
+
name?: T;
|
|
630
|
+
}
|
|
631
|
+
interface formAttr<T = DVal> extends EAttr {
|
|
632
|
+
accept?: T;
|
|
633
|
+
"accept-charset"?: T;
|
|
634
|
+
action?: T;
|
|
635
|
+
autocomplete?: T;
|
|
636
|
+
enctype?: T;
|
|
637
|
+
method?: T;
|
|
638
|
+
name?: T;
|
|
639
|
+
novalidate?: T;
|
|
640
|
+
target?: T;
|
|
641
|
+
}
|
|
642
|
+
interface iframeAttr<T = DVal> extends EAttr {
|
|
643
|
+
allow?: T;
|
|
644
|
+
csp?: T;
|
|
645
|
+
loading?: T;
|
|
646
|
+
name?: T;
|
|
647
|
+
height?: T;
|
|
648
|
+
referrerpolicy?: T;
|
|
649
|
+
sandbox?: T;
|
|
650
|
+
src?: T;
|
|
651
|
+
srcdoc?: T;
|
|
652
|
+
width?: T;
|
|
653
|
+
}
|
|
654
|
+
interface imgAttr<T = DVal> extends EAttr {
|
|
655
|
+
alt?: T;
|
|
656
|
+
crossorigin?: T;
|
|
657
|
+
decoding?: T;
|
|
658
|
+
ismap?: T;
|
|
659
|
+
loading?: T;
|
|
660
|
+
height?: T;
|
|
661
|
+
referrerpolicy?: T;
|
|
662
|
+
sizes?: T;
|
|
663
|
+
src?: T;
|
|
664
|
+
srcset?: T;
|
|
665
|
+
usemap?: T;
|
|
666
|
+
width?: T;
|
|
667
|
+
}
|
|
668
|
+
interface inputAttr<T = DVal> extends EAttr {
|
|
669
|
+
accept?: T;
|
|
670
|
+
alt?: T;
|
|
671
|
+
autocomplete?: T;
|
|
672
|
+
capture?: T;
|
|
673
|
+
checked?: T;
|
|
674
|
+
dirname?: T;
|
|
675
|
+
disabled?: T;
|
|
676
|
+
form?: T;
|
|
677
|
+
formaction?: T;
|
|
678
|
+
formenctype?: T;
|
|
679
|
+
formmethod?: T;
|
|
680
|
+
formnovalidate?: T;
|
|
681
|
+
formtarget?: T;
|
|
682
|
+
list?: T;
|
|
683
|
+
max?: T;
|
|
684
|
+
maxlength?: T;
|
|
685
|
+
minlength?: T;
|
|
686
|
+
min?: T;
|
|
687
|
+
multiple?: T;
|
|
688
|
+
name?: T;
|
|
689
|
+
pattern?: T;
|
|
690
|
+
placeholder?: T;
|
|
691
|
+
height?: T;
|
|
692
|
+
readonly?: T;
|
|
693
|
+
required?: T;
|
|
694
|
+
size?: T;
|
|
695
|
+
src?: T;
|
|
696
|
+
step?: T;
|
|
697
|
+
type?: T;
|
|
698
|
+
usemap?: T;
|
|
699
|
+
value?: T;
|
|
700
|
+
width?: T;
|
|
701
|
+
}
|
|
702
|
+
interface insAttr<T = DVal> extends EAttr {
|
|
703
|
+
cite?: T;
|
|
704
|
+
datetime?: T;
|
|
705
|
+
}
|
|
706
|
+
interface labelAttr<T = DVal> extends EAttr {
|
|
707
|
+
for?: T;
|
|
708
|
+
form?: T;
|
|
709
|
+
}
|
|
710
|
+
interface liAttr<T = DVal> extends EAttr {
|
|
711
|
+
value?: T;
|
|
712
|
+
}
|
|
713
|
+
interface linkAttr<T = DVal> extends EAttr {
|
|
714
|
+
as?: T;
|
|
715
|
+
crossorigin?: T;
|
|
716
|
+
href?: T;
|
|
717
|
+
hreflang?: T;
|
|
718
|
+
integrity?: T;
|
|
719
|
+
media?: T;
|
|
720
|
+
referrerpolicy?: T;
|
|
721
|
+
rel?: T;
|
|
722
|
+
sizes?: T;
|
|
723
|
+
type?: T;
|
|
724
|
+
}
|
|
725
|
+
interface mapAttr<T = DVal> extends EAttr {
|
|
726
|
+
name?: T;
|
|
727
|
+
}
|
|
728
|
+
interface menuAttr<T = DVal> extends EAttr {
|
|
729
|
+
type?: T;
|
|
730
|
+
}
|
|
731
|
+
interface metaAttr<T = DVal> extends EAttr {
|
|
732
|
+
charset?: T;
|
|
733
|
+
content?: T;
|
|
734
|
+
"http-equiv"?: T;
|
|
735
|
+
name?: T;
|
|
736
|
+
}
|
|
737
|
+
interface meterAttr<T = DVal> extends EAttr {
|
|
738
|
+
form?: T;
|
|
739
|
+
high?: T;
|
|
740
|
+
low?: T;
|
|
741
|
+
max?: T;
|
|
742
|
+
min?: T;
|
|
743
|
+
optimum?: T;
|
|
744
|
+
value?: T;
|
|
745
|
+
}
|
|
746
|
+
interface objectAttr<T = DVal> extends EAttr {
|
|
747
|
+
data?: T;
|
|
748
|
+
form?: T;
|
|
749
|
+
name?: T;
|
|
750
|
+
height?: T;
|
|
751
|
+
type?: T;
|
|
752
|
+
usemap?: T;
|
|
753
|
+
width?: T;
|
|
754
|
+
}
|
|
755
|
+
interface olAttr<T = DVal> extends EAttr {
|
|
756
|
+
reversed?: T;
|
|
757
|
+
start?: T;
|
|
758
|
+
type?: T;
|
|
759
|
+
}
|
|
760
|
+
interface optgroupAttr<T = DVal> extends EAttr {
|
|
761
|
+
disabled?: T;
|
|
762
|
+
label?: T;
|
|
763
|
+
}
|
|
764
|
+
interface optionAttr<T = DVal> extends EAttr {
|
|
765
|
+
disabled?: T;
|
|
766
|
+
label?: T;
|
|
767
|
+
selected?: T;
|
|
768
|
+
value?: T;
|
|
769
|
+
}
|
|
770
|
+
interface paramAttr<T = DVal> extends EAttr {
|
|
771
|
+
name?: T;
|
|
772
|
+
value?: T;
|
|
773
|
+
}
|
|
774
|
+
interface progressAttr<T = DVal> extends EAttr {
|
|
775
|
+
form?: T;
|
|
776
|
+
max?: T;
|
|
777
|
+
value?: T;
|
|
778
|
+
}
|
|
779
|
+
interface qAttr<T = DVal> extends EAttr {
|
|
780
|
+
cite?: T;
|
|
781
|
+
}
|
|
782
|
+
interface scriptAttr<T = DVal> extends EAttr {
|
|
783
|
+
async?: T;
|
|
784
|
+
crossorigin?: T;
|
|
785
|
+
defer?: T;
|
|
786
|
+
integrity?: T;
|
|
787
|
+
referrerpolicy?: T;
|
|
788
|
+
src?: T;
|
|
789
|
+
type?: T;
|
|
790
|
+
}
|
|
791
|
+
interface selectAttr<T = DVal> extends EAttr {
|
|
792
|
+
autocomplete?: T;
|
|
793
|
+
disabled?: T;
|
|
794
|
+
form?: T;
|
|
795
|
+
multiple?: T;
|
|
796
|
+
name?: T;
|
|
797
|
+
required?: T;
|
|
798
|
+
size?: T;
|
|
799
|
+
}
|
|
800
|
+
interface sourceAttr<T = DVal> extends EAttr {
|
|
801
|
+
media?: T;
|
|
802
|
+
sizes?: T;
|
|
803
|
+
src?: T;
|
|
804
|
+
srcset?: T;
|
|
805
|
+
type?: T;
|
|
806
|
+
}
|
|
807
|
+
interface styleAttr<T = DVal> extends EAttr {
|
|
808
|
+
media?: T;
|
|
809
|
+
type?: T;
|
|
810
|
+
}
|
|
811
|
+
interface tdAttr<T = DVal> extends EAttr {
|
|
812
|
+
colspan?: T;
|
|
813
|
+
headers?: T;
|
|
814
|
+
rowspan?: T;
|
|
815
|
+
}
|
|
816
|
+
interface textareaAttr<T = DVal> extends EAttr {
|
|
817
|
+
autocomplete?: T;
|
|
818
|
+
cols?: T;
|
|
819
|
+
dirname?: T;
|
|
820
|
+
disabled?: T;
|
|
821
|
+
enterkeyhint?: T;
|
|
822
|
+
form?: T;
|
|
823
|
+
inputmode?: T;
|
|
824
|
+
maxlength?: T;
|
|
825
|
+
minlength?: T;
|
|
826
|
+
name?: T;
|
|
827
|
+
placeholder?: T;
|
|
828
|
+
readonly?: T;
|
|
829
|
+
required?: T;
|
|
830
|
+
rows?: T;
|
|
831
|
+
wrap?: T;
|
|
832
|
+
}
|
|
833
|
+
interface thAttr<T = DVal> extends EAttr {
|
|
834
|
+
colspan?: T;
|
|
835
|
+
headers?: T;
|
|
836
|
+
rowspan?: T;
|
|
837
|
+
scope?: T;
|
|
838
|
+
}
|
|
839
|
+
interface timeAttr<T = DVal> extends EAttr {
|
|
840
|
+
datetime?: T;
|
|
841
|
+
}
|
|
842
|
+
interface trackAttr<T = DVal> extends EAttr {
|
|
843
|
+
default?: T;
|
|
844
|
+
kind?: T;
|
|
845
|
+
label?: T;
|
|
846
|
+
src?: T;
|
|
847
|
+
srclang?: T;
|
|
848
|
+
}
|
|
849
|
+
interface videoAttr<T = DVal> extends EAttr {
|
|
850
|
+
autoplay?: T;
|
|
851
|
+
controls?: T;
|
|
852
|
+
crossorigin?: T;
|
|
853
|
+
loop?: T;
|
|
854
|
+
muted?: T;
|
|
855
|
+
playsinline?: T;
|
|
856
|
+
height?: T;
|
|
857
|
+
poster?: T;
|
|
858
|
+
preload?: T;
|
|
859
|
+
src?: T;
|
|
860
|
+
width?: T;
|
|
384
861
|
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Local Storage
|
|
388
|
-
*/
|
|
389
|
-
declare const local: {
|
|
390
|
-
get: <T>(item: obj$1<Stateful<T>> | string) => storageInterface<T>;
|
|
391
|
-
init: <T>(item: obj$1<Stateful<T>>, as: storeValTypes) => storageInterface<T>;
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Session Storage
|
|
396
|
-
*/
|
|
397
|
-
declare const session: {
|
|
398
|
-
get: <T>(item: obj$1<Stateful<T>> | string) => storageInterface<T>;
|
|
399
|
-
};
|
|
400
862
|
|
|
401
863
|
type kf = KeyframeAnimationOptions;
|
|
402
|
-
type KFType = (
|
|
864
|
+
type KFType = (CSSStyle | obj$1<V>)[] | CSSStyle | obj$1<V>;
|
|
403
865
|
declare class anim {
|
|
404
866
|
private e;
|
|
405
867
|
opt: kf;
|
|
406
868
|
constructor(e: Elem);
|
|
407
|
-
animate(keyframes:
|
|
869
|
+
animate(keyframes: CSSStyle[] | CSSStyle, options?: kf): Elem<HTMLElement>;
|
|
408
870
|
get slide(): {
|
|
409
871
|
left: (options?: kf) => anim;
|
|
410
872
|
right: (options?: kf) => anim;
|
|
@@ -445,7 +907,7 @@ declare class Eget<T extends Elements = HTMLElement> {
|
|
|
445
907
|
get rect(): DOMRect;
|
|
446
908
|
get remove_element(): this;
|
|
447
909
|
get style(): {
|
|
448
|
-
set: (style:
|
|
910
|
+
set: (style: CSSStyle | obj$1<V | null>, delayOrFN?: number | ((e?: any) => void)) => Elem<HTMLElement>;
|
|
449
911
|
get: (prop: keyof CSSStyleDeclaration | string) => string;
|
|
450
912
|
del: (...props: (keyof CSSStyleDeclaration | string)[]) => void;
|
|
451
913
|
};
|
|
@@ -485,6 +947,7 @@ declare class Elem<T extends Elements = HTMLElement> extends Eget<T> {
|
|
|
485
947
|
animate(keyframes: KFType, onComplete?: fn<any, void>): this;
|
|
486
948
|
}
|
|
487
949
|
|
|
950
|
+
type Elements = HTMLElementTagNameMap[keyof HTMLElementTagNameMap] | SVGElementTagNameMap[keyof SVGElementTagNameMap];
|
|
488
951
|
interface CLI {
|
|
489
952
|
id?: string;
|
|
490
953
|
class?: string;
|
|
@@ -503,33 +966,87 @@ declare class Ref<T extends Elements = HTMLElement> {
|
|
|
503
966
|
}
|
|
504
967
|
declare const useRef: <T extends Elements = HTMLElement>() => Ref<T>;
|
|
505
968
|
|
|
506
|
-
declare class
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
969
|
+
declare class Dom {
|
|
970
|
+
tag: string;
|
|
971
|
+
attr: attr;
|
|
972
|
+
ctx: ctx[];
|
|
973
|
+
constructor(tag: string, attr: attr, ctx: ctx[]);
|
|
974
|
+
}
|
|
975
|
+
declare function dom(tag: string | ((attr: attr, ...ctx: ctx[]) => Dom), attr?: attr | null, ...ctx: ctx[]): Dom;
|
|
976
|
+
declare const frag: (attr: attr, ...ctx: Dom[]) => Dom;
|
|
977
|
+
declare global {
|
|
978
|
+
type events<T extends Elements = HTMLElement> = {
|
|
979
|
+
[P in keyof GlobalEventHandlersEventMap]?: (this: T, e: GlobalEventHandlersEventMap[P]) => void;
|
|
980
|
+
} & c_events<T>;
|
|
981
|
+
type DVal<T = V | V[]> = T | Stateful<T> | undefined;
|
|
982
|
+
type dom = Dom;
|
|
983
|
+
type ctx<T = DVal | dom> = T | Stateful<T> | ctx[];
|
|
984
|
+
type obj<T> = Record<string, T>;
|
|
985
|
+
type DomFN<T = {}> = (a: attr & T, ...D: ctx[]) => dom;
|
|
986
|
+
type attr = EAttr;
|
|
987
|
+
namespace JSX {
|
|
988
|
+
type Element = dom;
|
|
989
|
+
interface IntrinsicElements extends ElementAttributes, SVGAttributes {
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
interface docObj {
|
|
995
|
+
args?: obj<any>;
|
|
996
|
+
data?: obj<any>;
|
|
997
|
+
}
|
|
998
|
+
declare class doc<T extends docObj = obj<obj<any>>> extends head {
|
|
510
999
|
path: string;
|
|
1000
|
+
data: T["data"];
|
|
511
1001
|
args: T["args"];
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
1002
|
+
importArgs: any[];
|
|
1003
|
+
fetch?(): maybePromise<obj<any>>;
|
|
1004
|
+
head?(): maybePromise<void>;
|
|
1005
|
+
body?(): maybePromise<any>;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
type ExtraState = Record<string, unknown>;
|
|
1009
|
+
type HistoryData<S extends ExtraState = ExtraState> = (S & {
|
|
1010
|
+
path: string;
|
|
1011
|
+
}) | null;
|
|
1012
|
+
type ChangeHandler<S extends ExtraState> = (path: string, state: HistoryData<S>) => void;
|
|
1013
|
+
declare class PathHistory<S extends ExtraState = ExtraState> {
|
|
1014
|
+
private onChange?;
|
|
1015
|
+
private popListener?;
|
|
1016
|
+
constructor(path?: Stateful<string>, onChange?: ChangeHandler<S>);
|
|
1017
|
+
/** Current path (pathname + search + hash) */
|
|
1018
|
+
path(): string;
|
|
1019
|
+
/** Current state object */
|
|
1020
|
+
state(): HistoryData<S>;
|
|
1021
|
+
/** Navigate to a new path using pushState (no-op if same as current) */
|
|
1022
|
+
navigate(path: string, state?: S, title?: string): void;
|
|
1023
|
+
/** Replace current entry using replaceState (no-op if same as current) */
|
|
1024
|
+
replace(path: string, state?: S, title?: string): void;
|
|
1025
|
+
back(): void;
|
|
1026
|
+
forward(): void;
|
|
1027
|
+
/** Remove listeners */
|
|
1028
|
+
destroy(): void;
|
|
1029
|
+
private resolve;
|
|
1030
|
+
private samePath;
|
|
1031
|
+
private assertClient;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
interface contentObj {
|
|
1035
|
+
args?: obj<any>;
|
|
1036
|
+
data?: obj<any>;
|
|
1037
|
+
}
|
|
1038
|
+
declare class content<T extends contentObj = obj<obj<string>>> {
|
|
1039
|
+
path: string;
|
|
1040
|
+
data: T["data"];
|
|
1041
|
+
args: T["args"];
|
|
1042
|
+
body?(): maybePromise<any>;
|
|
526
1043
|
}
|
|
527
1044
|
|
|
528
1045
|
declare class websocket<T = Record<string, any>> {
|
|
529
1046
|
path: string;
|
|
530
1047
|
protected args: T;
|
|
1048
|
+
route: string;
|
|
531
1049
|
ws: WebSocket;
|
|
532
|
-
static route: string;
|
|
533
1050
|
isConnected: Stateful<boolean>;
|
|
534
1051
|
data: T;
|
|
535
1052
|
constructor(path: string, args?: T);
|
|
@@ -551,374 +1068,101 @@ declare class websocket<T = Record<string, any>> {
|
|
|
551
1068
|
set send(message: string | ArrayBufferLike | Blob | ArrayBufferView);
|
|
552
1069
|
}
|
|
553
1070
|
declare class socket {
|
|
554
|
-
protected yvee:
|
|
555
|
-
constructor(yvee:
|
|
556
|
-
load(_path: string): Promise<websocket<
|
|
1071
|
+
protected yvee: Yvee;
|
|
1072
|
+
constructor(yvee: Yvee);
|
|
1073
|
+
load(_path: string): Promise<websocket<Record<string, any>> | undefined>;
|
|
557
1074
|
unload(_path: string): void;
|
|
558
1075
|
}
|
|
559
1076
|
|
|
560
|
-
declare class
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
protected root: Stateful<ctx[]>;
|
|
564
|
-
socket: socket;
|
|
565
|
-
id: string;
|
|
566
|
-
path: Stateful<string>;
|
|
567
|
-
lastPath: Stateful<string>;
|
|
568
|
-
loading: Stateful<boolean>;
|
|
569
|
-
mainElement?: HTMLElement;
|
|
570
|
-
A: (a: attr & {
|
|
571
|
-
href: string;
|
|
572
|
-
topRef?: Stateful<_$>;
|
|
573
|
-
top?: number | (() => number);
|
|
574
|
-
}, ...D: ctx[]) => Dom;
|
|
575
|
-
Main: (a: attr) => Dom;
|
|
576
|
-
load: (path?: string, data?: obj<string>) => Promise<this>;
|
|
577
|
-
matchPath: (str: string) => boolean;
|
|
578
|
-
protected isYvee: boolean;
|
|
579
|
-
constructor(config?: routerCfg, events?: events);
|
|
580
|
-
protected hooker(): void;
|
|
581
|
-
protected class(this: Pager, _path: string, _error: number, isError?: boolean): Promise<doc<{}>>;
|
|
582
|
-
protected fetch(CL?: doc<{}>): Promise<void>;
|
|
583
|
-
protected processHead(CL?: doc<{}>, head?: headAttr): Promise<headType>;
|
|
584
|
-
private processClassHead;
|
|
585
|
-
private processDefaultHead;
|
|
586
|
-
render(_path: string, _error?: number, data?: obj<string>, head?: headAttr, isClient?: boolean, isError?: boolean): Promise<{
|
|
587
|
-
lang: string;
|
|
588
|
-
heads: headType;
|
|
589
|
-
done: boolean;
|
|
590
|
-
}>;
|
|
1077
|
+
declare class BasePath<T> extends MinStorage {
|
|
1078
|
+
cls: T;
|
|
1079
|
+
constructor(path: string, cls: T);
|
|
591
1080
|
}
|
|
592
|
-
|
|
593
|
-
declare function pushHistory(path?: string, title?: string): void;
|
|
594
|
-
|
|
595
|
-
interface routerCfg {
|
|
596
|
-
classes?: string | string[];
|
|
597
|
-
id?: string;
|
|
598
|
-
base?: string;
|
|
1081
|
+
declare class ClientPath extends BasePath<typeof doc<{}>> {
|
|
599
1082
|
}
|
|
600
|
-
|
|
601
|
-
pushState?: boolean;
|
|
1083
|
+
declare class SocketPath extends BasePath<typeof websocket> {
|
|
602
1084
|
}
|
|
603
|
-
declare class
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
protected unload: boolean;
|
|
607
|
-
constructor(config?: yveeCfg, events?: events);
|
|
1085
|
+
declare class MainStorage<T extends InstanceType<typeof BasePath>> {
|
|
1086
|
+
storage: Storage<T>;
|
|
1087
|
+
error: Storage<T>;
|
|
608
1088
|
}
|
|
609
|
-
declare
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
type headFN<T = Record<string, any>> = (a: renderConfig & T) => Promise<headAttr> | headAttr;
|
|
619
|
-
type ND<T = Record<string, any>> = (a: renderConfig & T) => Dom | Promise<Dom>;
|
|
620
|
-
declare function Render<T = Record<string, any>>(DOM: ND<T>, head?: headAttr | headFN<T>, cfg?: headAttrPlus): Promise<({ path, data, status }: serverRender) => Promise<string>>;
|
|
621
|
-
declare function Render<T = Record<string, any>>(DOM: ND<T>, App: Yvee): Promise<({ path, data, status }: serverRender) => Promise<string>>;
|
|
622
|
-
|
|
623
|
-
declare class ClientPath extends MinStorage {
|
|
624
|
-
id: string;
|
|
625
|
-
cls: typeof doc<{}>;
|
|
626
|
-
constructor(path: string, id: string, cls: typeof doc<{}>);
|
|
1089
|
+
declare class Stormy extends MainStorage<ClientPath> {
|
|
1090
|
+
wss: Storage<SocketPath>;
|
|
1091
|
+
setRoute(path: string, _doc: typeof doc<{}>): void;
|
|
1092
|
+
getRoute(path: string, error?: number): doc<{}>;
|
|
1093
|
+
setWss(path: string): void;
|
|
1094
|
+
getWss(path: string): [SocketPath | undefined, Record<string, string>];
|
|
1095
|
+
setError(code: number, _doc: typeof doc<{}>): void;
|
|
1096
|
+
getError(code?: number): [ClientPath | undefined, Record<string, string>];
|
|
627
1097
|
}
|
|
628
|
-
declare class
|
|
629
|
-
id: string;
|
|
630
|
-
cls: typeof websocket<{}>;
|
|
631
|
-
constructor(path: string, id: string, cls: typeof websocket<{}>);
|
|
632
|
-
}
|
|
633
|
-
declare class minClient extends htmlHead {
|
|
634
|
-
protected storage: Storage$1<ClientPath>;
|
|
635
|
-
protected errorStorage: Storage$1<ClientPath>;
|
|
636
|
-
protected wssStorage: Storage$1<SocketPath>;
|
|
637
|
-
/** --------------------
|
|
638
|
-
* string | int | float | file | uuid
|
|
639
|
-
* - /url/\<string:hell>
|
|
640
|
-
*/
|
|
641
|
-
route: (path: string) => <Q extends typeof doc<{}>>(f: Q) => Q;
|
|
642
|
-
error: (...codes: number[]) => <Q extends typeof doc<{}>>(f: Q) => Q;
|
|
643
|
-
wss: (path: string) => <Q extends typeof websocket<{}>>(f: Q) => Q;
|
|
644
|
-
base: string;
|
|
645
|
-
constructor(base?: string);
|
|
646
|
-
protected _base(str: string): string;
|
|
647
|
-
protected getPath(path: string): Promise<[ClientPath | undefined, Record<string, string>]>;
|
|
648
|
-
protected loadError(code: number): Promise<[ClientPath | undefined, Record<string, string>]>;
|
|
649
|
-
protected loadWSS(path: string): Promise<[SocketPath | undefined, Record<string, string>]>;
|
|
1098
|
+
declare class TabPath extends BasePath<typeof content<{}>> {
|
|
650
1099
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
1100
|
+
declare class miniStormy extends MainStorage<TabPath> {
|
|
1101
|
+
setRoute(path: string, _doc: typeof content<{}>): void;
|
|
1102
|
+
getRoute(path: string, error?: number): content<{}>;
|
|
1103
|
+
setWss(path: string): void;
|
|
1104
|
+
getWss(path: string): void;
|
|
1105
|
+
setError(code: number, _doc: typeof doc<{}>): void;
|
|
1106
|
+
getError(code?: number): [TabPath | undefined, Record<string, string>];
|
|
658
1107
|
}
|
|
659
|
-
declare function StateHook<T extends any[]>(callback: hookFN<T>, statefuls: [...{
|
|
660
|
-
[K in keyof T]: Stateful<T[K]>;
|
|
661
|
-
}], { id, init }?: stateCFG): () => void;
|
|
662
1108
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
private deep;
|
|
669
|
-
private verify;
|
|
670
|
-
private hooks;
|
|
671
|
-
private states;
|
|
672
|
-
private _value;
|
|
673
|
-
private listening;
|
|
674
|
-
private end?;
|
|
675
|
-
constructor(value: T, options?: AddEventListenerOptions, deep?: boolean, verify?: boolean);
|
|
676
|
-
get value(): T;
|
|
677
|
-
set value(newValue: T);
|
|
678
|
-
get listen(): () => void;
|
|
679
|
-
call<Q>(callback: (this: Elements, arg: T) => Q, entry: string): (id: string) => () => void;
|
|
680
|
-
hook<T extends any[]>(callback: hookFN<T>): (id: string) => () => void;
|
|
1109
|
+
declare class Router extends htmlHead {
|
|
1110
|
+
storage: Stormy;
|
|
1111
|
+
protected base: string;
|
|
1112
|
+
constructor(base?: string, index?: string);
|
|
1113
|
+
route<Q extends typeof doc<{}>>(path: string): (f: Q) => Q;
|
|
681
1114
|
}
|
|
682
|
-
declare function State<T>(value: T, options?: AddEventListenerOptions): Stateful<T>;
|
|
683
|
-
/**
|
|
684
|
-
* Quick State checking - skip checking of Object keys:values as it will only be compared as a===b
|
|
685
|
-
*/
|
|
686
|
-
declare function QState<T>(value: T, verify?: boolean): Stateful<T>;
|
|
687
1115
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
type CSSinT = {
|
|
691
|
-
[P in keyof CSSStyleDeclaration]?: X3;
|
|
692
|
-
} & {
|
|
693
|
-
[key: string]: X3;
|
|
694
|
-
};
|
|
695
|
-
interface c_events<T extends Elements = HTMLElement> {
|
|
696
|
-
state?: (this: T, e: T) => [(...args: any[]) => void, Stateful<any>[], boolean?];
|
|
697
|
-
ready?: (this: T, e: T) => void;
|
|
698
|
-
resize?: (this: T, e: UIEvent) => void;
|
|
699
|
-
beforeunload?: (this: T, e: BeforeUnloadEvent) => void;
|
|
700
|
-
popstate?: (this: T, e: PopStateEvent) => void;
|
|
701
|
-
winscroll?: (this: T, e: Event) => void;
|
|
702
|
-
winload?: (this: T, e: Event) => void;
|
|
703
|
-
winfocus?: (this: T, e: Event) => void;
|
|
704
|
-
winblur?: (this: T, e: Event) => void;
|
|
1116
|
+
interface mtab {
|
|
1117
|
+
tab: string;
|
|
705
1118
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
ref?: Ref<any>;
|
|
1119
|
+
declare class minElements$1 {
|
|
1120
|
+
id: string;
|
|
1121
|
+
path: Stateful<string>;
|
|
1122
|
+
_root: Stateful<any[]>;
|
|
1123
|
+
Main(a: attr): Dom;
|
|
1124
|
+
Button(a: attr & mtab, ...ctx: ctx[]): Dom;
|
|
713
1125
|
}
|
|
714
|
-
declare class
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
__(pid?: idm): {
|
|
720
|
-
ctx: string;
|
|
721
|
-
oz: OZ;
|
|
722
|
-
id: string | undefined;
|
|
723
|
-
};
|
|
1126
|
+
declare class Tabs extends minElements$1 {
|
|
1127
|
+
storage: miniStormy;
|
|
1128
|
+
constructor();
|
|
1129
|
+
tab<Q extends typeof content<{}>>(path: string): (f: Q) => Q;
|
|
1130
|
+
load(tab: string, data?: obj<string>): Promise<void>;
|
|
724
1131
|
}
|
|
725
|
-
declare function dom(tag: string | ((attr: attr, ...ctx: ctx[]) => Dom), attr?: attr | null, ...ctx: ctx[]): Dom;
|
|
726
|
-
declare const frag: (attr: attr, ...dom: Dom[]) => Dom[];
|
|
727
1132
|
|
|
728
|
-
declare global {
|
|
729
|
-
type events<T extends Elements = HTMLElement> = {
|
|
730
|
-
[P in keyof GlobalEventHandlersEventMap]?: (this: T, e: GlobalEventHandlersEventMap[P]) => void;
|
|
731
|
-
} & c_events<T>;
|
|
732
|
-
type attr = baseAttr | obj<X3>;
|
|
733
|
-
type ctx = V | Dom | Stateful<V | Dom> | ctx[];
|
|
734
|
-
type obj<T> = Record<string, T>;
|
|
735
|
-
type dom = Dom;
|
|
736
|
-
type DomFN<T = {}> = (a: attr & T, ...D: ctx[]) => Dom;
|
|
737
|
-
const BASE_STRING: string;
|
|
738
|
-
namespace JSX {
|
|
739
|
-
type Element = Dom;
|
|
740
|
-
interface IntrinsicElements {
|
|
741
|
-
link: attr;
|
|
742
|
-
base: attr;
|
|
743
|
-
meta: attr;
|
|
744
|
-
p: attr;
|
|
745
|
-
br: attr;
|
|
746
|
-
hr: attr;
|
|
747
|
-
h: attr;
|
|
748
|
-
cmnt: attr;
|
|
749
|
-
root: attr;
|
|
750
|
-
html: attr;
|
|
751
|
-
body: attr;
|
|
752
|
-
div: attr;
|
|
753
|
-
span: attr;
|
|
754
|
-
header: attr;
|
|
755
|
-
hgroup: attr;
|
|
756
|
-
footer: attr;
|
|
757
|
-
main: attr;
|
|
758
|
-
section: attr;
|
|
759
|
-
search: attr;
|
|
760
|
-
article: attr;
|
|
761
|
-
aside: attr;
|
|
762
|
-
details: attr;
|
|
763
|
-
dialog: attr;
|
|
764
|
-
summary: attr;
|
|
765
|
-
data: attr;
|
|
766
|
-
noscript: attr;
|
|
767
|
-
object: attr;
|
|
768
|
-
param: attr;
|
|
769
|
-
script: attr;
|
|
770
|
-
a: attr;
|
|
771
|
-
nav: attr;
|
|
772
|
-
style: attr;
|
|
773
|
-
audio: attr;
|
|
774
|
-
video: attr;
|
|
775
|
-
source: attr;
|
|
776
|
-
track: attr;
|
|
777
|
-
img: attr;
|
|
778
|
-
map: attr;
|
|
779
|
-
area: attr;
|
|
780
|
-
canvas: attr;
|
|
781
|
-
figcaption: attr;
|
|
782
|
-
figure: attr;
|
|
783
|
-
picture: attr;
|
|
784
|
-
iframe: attr;
|
|
785
|
-
form: attr;
|
|
786
|
-
input: attr;
|
|
787
|
-
textarea: attr;
|
|
788
|
-
button: attr;
|
|
789
|
-
select: attr;
|
|
790
|
-
optgroup: attr;
|
|
791
|
-
option: attr;
|
|
792
|
-
label: attr;
|
|
793
|
-
fieldset: attr;
|
|
794
|
-
legend: attr;
|
|
795
|
-
datalist: attr;
|
|
796
|
-
table: attr;
|
|
797
|
-
caption: attr;
|
|
798
|
-
th: attr;
|
|
799
|
-
tr: attr;
|
|
800
|
-
td: attr;
|
|
801
|
-
thead: attr;
|
|
802
|
-
tbody: attr;
|
|
803
|
-
tfoot: attr;
|
|
804
|
-
col: attr;
|
|
805
|
-
colgroup: attr;
|
|
806
|
-
b: attr;
|
|
807
|
-
i: attr;
|
|
808
|
-
q: attr;
|
|
809
|
-
s: attr;
|
|
810
|
-
u: attr;
|
|
811
|
-
em: attr;
|
|
812
|
-
rp: attr;
|
|
813
|
-
del: attr;
|
|
814
|
-
dfn: attr;
|
|
815
|
-
ins: attr;
|
|
816
|
-
kbd: attr;
|
|
817
|
-
pre: attr;
|
|
818
|
-
sub: attr;
|
|
819
|
-
sup: attr;
|
|
820
|
-
var: attr;
|
|
821
|
-
wbr: attr;
|
|
822
|
-
cite: attr;
|
|
823
|
-
time: attr;
|
|
824
|
-
abbr: attr;
|
|
825
|
-
code: attr;
|
|
826
|
-
mark: attr;
|
|
827
|
-
samp: attr;
|
|
828
|
-
meter: attr;
|
|
829
|
-
small: attr;
|
|
830
|
-
strong: attr;
|
|
831
|
-
address: attr;
|
|
832
|
-
progress: attr;
|
|
833
|
-
template: attr;
|
|
834
|
-
blockquote: attr;
|
|
835
|
-
menu: attr;
|
|
836
|
-
ul: attr;
|
|
837
|
-
ol: attr;
|
|
838
|
-
li: attr;
|
|
839
|
-
dl: attr;
|
|
840
|
-
dt: attr;
|
|
841
|
-
dd: attr;
|
|
842
|
-
h1: attr;
|
|
843
|
-
h2: attr;
|
|
844
|
-
h3: attr;
|
|
845
|
-
h4: attr;
|
|
846
|
-
h5: attr;
|
|
847
|
-
h6: attr;
|
|
848
|
-
svg: attr;
|
|
849
|
-
path: attr;
|
|
850
|
-
circle: attr;
|
|
851
|
-
animate: attr;
|
|
852
|
-
animateMotion: attr;
|
|
853
|
-
animateTransform: attr;
|
|
854
|
-
clipPath: attr;
|
|
855
|
-
defs: attr;
|
|
856
|
-
desc: attr;
|
|
857
|
-
ellipse: attr;
|
|
858
|
-
feBlend: attr;
|
|
859
|
-
feColorMatrix: attr;
|
|
860
|
-
feComponentTransfer: attr;
|
|
861
|
-
feComposite: attr;
|
|
862
|
-
feConvolveMatrix: attr;
|
|
863
|
-
feDiffuseLighting: attr;
|
|
864
|
-
feDisplacementMap: attr;
|
|
865
|
-
feDistantLight: attr;
|
|
866
|
-
feDropShadow: attr;
|
|
867
|
-
feFlood: attr;
|
|
868
|
-
feFuncA: attr;
|
|
869
|
-
feFuncB: attr;
|
|
870
|
-
feFuncG: attr;
|
|
871
|
-
feFuncR: attr;
|
|
872
|
-
feGaussianBlur: attr;
|
|
873
|
-
feImage: attr;
|
|
874
|
-
feMerge: attr;
|
|
875
|
-
feMergeNode: attr;
|
|
876
|
-
feMorphology: attr;
|
|
877
|
-
feOffset: attr;
|
|
878
|
-
fePointLight: attr;
|
|
879
|
-
feSpecularLighting: attr;
|
|
880
|
-
feSpotLight: attr;
|
|
881
|
-
feTile: attr;
|
|
882
|
-
feTurbulence: attr;
|
|
883
|
-
filter: attr;
|
|
884
|
-
foreignObject: attr;
|
|
885
|
-
g: attr;
|
|
886
|
-
image: attr;
|
|
887
|
-
line: attr;
|
|
888
|
-
linearGradient: attr;
|
|
889
|
-
marker: attr;
|
|
890
|
-
mask: attr;
|
|
891
|
-
metadata: attr;
|
|
892
|
-
mpath: attr;
|
|
893
|
-
pattern: attr;
|
|
894
|
-
polygon: attr;
|
|
895
|
-
polyline: attr;
|
|
896
|
-
radialGradient: attr;
|
|
897
|
-
rect: attr;
|
|
898
|
-
set: attr;
|
|
899
|
-
stop: attr;
|
|
900
|
-
symbol: attr;
|
|
901
|
-
text: attr;
|
|
902
|
-
textPath: attr;
|
|
903
|
-
title: attr;
|
|
904
|
-
tspan: attr;
|
|
905
|
-
use: attr;
|
|
906
|
-
view: attr;
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
declare const resolvePath: (base: string, relative: string) => string;
|
|
911
1133
|
interface renderConfig {
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
1134
|
+
class?: string | string[];
|
|
1135
|
+
id?: string;
|
|
1136
|
+
data?: any;
|
|
1137
|
+
isDev?: boolean;
|
|
1138
|
+
}
|
|
1139
|
+
interface _Yvee {
|
|
1140
|
+
base?: string;
|
|
1141
|
+
index?: string;
|
|
1142
|
+
history?: boolean;
|
|
1143
|
+
}
|
|
1144
|
+
declare class minElements extends Router {
|
|
1145
|
+
protected pushHistory: boolean;
|
|
1146
|
+
id: string;
|
|
1147
|
+
data: obj<any>;
|
|
1148
|
+
path: Stateful<string>;
|
|
1149
|
+
protected _root: Stateful<any[]>;
|
|
1150
|
+
constructor(base?: string, index?: string, pushHistory?: boolean);
|
|
1151
|
+
Main(a: attr): Dom;
|
|
1152
|
+
A(a: aAttr, ...ctx: ctx[]): Dom;
|
|
915
1153
|
}
|
|
916
1154
|
interface serverRender {
|
|
917
1155
|
path: string;
|
|
1156
|
+
error?: number;
|
|
918
1157
|
data?: Record<string, any>;
|
|
919
|
-
status?: number;
|
|
920
1158
|
}
|
|
921
|
-
declare
|
|
1159
|
+
declare class Yvee extends minElements {
|
|
1160
|
+
yvee: Yvee;
|
|
1161
|
+
constructor({ base, history, index }?: _Yvee);
|
|
1162
|
+
render(x?: renderConfig): Promise<(() => void) | (({ path, data, error }: serverRender) => Promise<string>)>;
|
|
1163
|
+
private init;
|
|
1164
|
+
}
|
|
1165
|
+
declare const Routes: (fn: (route: Yvee["route"]) => void) => (route: Yvee["route"]) => void;
|
|
922
1166
|
|
|
923
|
-
export { $,
|
|
924
|
-
export type { $E, Elements, _$, headAttr,
|
|
1167
|
+
export { $, IfClient, Meta, PathHistory, QState, Ref, Routes, State, StateHook, Stateful, Tabs, Time, Yvee, __, addCSS, content, cssLoader, doc, dom, frag, log, socket, useRef, websocket };
|
|
1168
|
+
export type { $E, Elements, _$, aAttr, headAttr, maybePromise, serverRender };
|