yvee 0.0.7 → 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 CHANGED
@@ -1,8 +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;
10
+ declare const isObject: (val: any) => val is Record<string, any>;
5
11
  declare const isPlainObject: (value: any) => boolean;
12
+ declare const isModule: (obj: any) => obj is ModuleLike;
6
13
  declare const isArraybuff: (val: any) => val is string | ArrayBuffer | Uint8Array<ArrayBufferLike>;
7
14
  declare const isClassOrId: (k: string) => boolean;
8
15
  declare const isBool: (v: any) => v is boolean;
@@ -18,6 +25,7 @@ declare const isInt: (str: string) => boolean;
18
25
  declare const isWindow: boolean;
19
26
  declare const isNotWindow: boolean;
20
27
 
28
+ type is_ModuleLike = ModuleLike;
21
29
  declare const is_isArr: typeof isArr;
22
30
  declare const is_isArraybuff: typeof isArraybuff;
23
31
  declare const is_isAsync: typeof isAsync;
@@ -26,23 +34,29 @@ declare const is_isClassOrId: typeof isClassOrId;
26
34
  declare const is_isDefined: typeof isDefined;
27
35
  declare const is_isFN: typeof isFN;
28
36
  declare const is_isInt: typeof isInt;
37
+ declare const is_isModule: typeof isModule;
29
38
  declare const is_isNotNull: typeof isNotNull;
30
39
  declare const is_isNotWindow: typeof isNotWindow;
31
40
  declare const is_isNull: typeof isNull;
32
41
  declare const is_isNum: typeof isNum;
33
42
  declare const is_isNumber: typeof isNumber;
34
43
  declare const is_isObj: typeof isObj;
44
+ declare const is_isObject: typeof isObject;
35
45
  declare const is_isPlainObject: typeof isPlainObject;
36
46
  declare const is_isPromise: typeof isPromise;
37
47
  declare const is_isStr: typeof isStr;
38
48
  declare const is_isUndefined: typeof isUndefined;
39
49
  declare const is_isWindow: typeof isWindow;
40
50
  declare namespace is {
41
- 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_isNotNull as isNotNull, is_isNotWindow as isNotWindow, is_isNull as isNull, is_isNum as isNum, is_isNumber as isNumber, is_isObj as isObj, is_isPlainObject as isPlainObject, is_isPromise as isPromise, is_isStr as isStr, is_isUndefined as isUndefined, is_isWindow as isWindow };
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 };
42
53
  }
43
54
 
55
+ declare const IfClient: <T>(fn: () => T) => T | undefined;
56
+
44
57
  type V = string | number | boolean;
45
58
  type obj$1<T> = Record<string, T>;
59
+ type maybePromise<T> = Promise<T> | T;
46
60
 
47
61
  /**
48
62
  * A custom Map implementation that provides additional utility methods for working with objects and maps.
@@ -63,13 +77,6 @@ declare class log {
63
77
  static set e(a: any);
64
78
  static set w(a: any);
65
79
  }
66
- declare class idm {
67
- _c: number;
68
- _id: string;
69
- constructor(mid?: string);
70
- get id(): string;
71
- get mid(): string;
72
- }
73
80
 
74
81
  interface metaViewport {
75
82
  width?: string;
@@ -171,31 +178,37 @@ interface headAttr {
171
178
  link?: link<string>[];
172
179
  script?: script<string | boolean>[];
173
180
  css?: string[] | string;
181
+ js?: string[] | string;
174
182
  description?: string;
175
183
  }
176
- declare class head implements headAttr {
184
+ declare abstract class head implements headAttr {
177
185
  title?: string;
178
186
  description?: string;
179
- base?: base<string>[];
187
+ css?: string[] | string;
188
+ js?: string[] | string;
180
189
  meta?: meta<string>[] | Meta;
181
190
  link?: link<string>[];
182
191
  script?: script<string | boolean>[];
183
- css?: string[] | string;
184
192
  }
185
- type CSSinT$1 = {
193
+ type CSSinT = {
186
194
  [P in keyof CSSStyleDeclaration]?: V;
187
195
  } & {
188
196
  [key: string]: V;
189
197
  };
190
- type headType = Mapper<keyof head, any>;
198
+ type headType = Mapper<keyof headAttr, any>;
199
+ interface hHeadCFG {
200
+ initial?: headType;
201
+ mark?: boolean;
202
+ push?: obj$1<any>;
203
+ }
191
204
  declare class htmlHead {
192
205
  lang: string;
193
206
  htmlHead: headType;
194
- head: (heads?: headAttr) => void;
195
- constructor();
207
+ head: (heads?: Omit<headAttr, "base">) => void;
208
+ constructor({ mark, push }?: hHeadCFG);
196
209
  }
197
- declare const cssLoader: (vv: link<string>) => Promise<unknown> | undefined;
198
- declare function addCSS(selector: string, rules?: CSSinT$1): void;
210
+ declare const cssLoader: (vv: link<string>) => Promise<HTMLLinkElement | undefined>;
211
+ declare function addCSS(selector: string, rules?: CSSinT): void;
199
212
 
200
213
  declare class MinStorage {
201
214
  readonly path: string;
@@ -208,26 +221,45 @@ declare class MinStorage {
208
221
  * string | int | float | file | uuid
209
222
  * - /path/\<string:hell>
210
223
  */
211
- declare class Storage$1<T extends MinStorage> {
224
+ declare class Storage<T extends MinStorage> {
212
225
  private _storage;
213
226
  private CC;
214
227
  constructor();
215
228
  set(min: T): void;
216
229
  get(path: string): [T | undefined, Record<string, string>];
230
+ keys(): MapIterator<string>;
231
+ }
232
+
233
+ declare class Time {
234
+ date: Date;
235
+ constructor(dateMS?: number);
236
+ delta(date2?: number | null, _Date?: boolean): number | Date;
237
+ timed(time?: {
238
+ year?: number;
239
+ month?: number;
240
+ day?: number;
241
+ hour?: number;
242
+ minute?: number;
243
+ second?: number;
244
+ }): Date;
245
+ static delta(date1: number, date2?: number | null): number;
246
+ static local(date: number): string;
247
+ static get now(): number;
217
248
  }
218
249
 
219
250
  declare class __ {
220
251
  static rand(min?: number, max?: number): number;
221
252
  static fill(count: number, fill?: any): any[];
222
253
  static new({ dom, id, inner, }: {
223
- dom: keyof HTMLElementTagNameMap;
254
+ dom: keyof HTMLElementTagNameMap | keyof SVGElementTagNameMap;
224
255
  id?: string;
225
256
  inner?: any;
226
257
  }): HTMLElement;
227
258
  static randFrom(arr: any[] | Object): any;
259
+ static randArray<T>(arr?: T[], length?: number, unique?: boolean): T[];
228
260
  static randomAZ: () => string;
229
261
  static makeID: (length: number) => string;
230
- static class(a: obj$1<any>, classes: string[]): void;
262
+ static class(a: obj$1<any>, ...classes: string[]): void;
231
263
  static get O(): {
232
264
  vals: {
233
265
  <T>(o: {
@@ -262,8 +294,10 @@ declare class __ {
262
294
  static format(val: any): Formatteer;
263
295
  }
264
296
  declare class returner {
265
- static arr(val: any): any[];
297
+ static arr<T = string>(val?: any): T[];
266
298
  static num(val: any, iferr?: any): number;
299
+ static str(val: any): string;
300
+ static arr2obj(val: any[], switched?: boolean): any;
267
301
  }
268
302
  declare class Formatteer {
269
303
  val: any;
@@ -273,88 +307,566 @@ declare class Formatteer {
273
307
  get pr(): string;
274
308
  }
275
309
 
276
- declare class CATT {
277
- xid: string;
278
- IDM: idm;
279
- map: Mapper<string, string[]>;
280
- states: ((id: string) => () => void)[];
281
- events: Mapper<string, (...arg: any) => any>;
282
- OZ: OZ;
283
- constructor(xid: string, IDM?: idm, _OZ?: OZ);
284
- attr_push(key: string, val: any, pre?: string): void;
285
- get attr(): string;
286
- set id(id: string);
287
- get id(): string | undefined;
310
+ type hookFN<T extends any[]> = (...args: statefulValue<T>) => maybePromise<void>;
311
+ interface stateCFG {
312
+ id?: string;
313
+ init?: boolean;
288
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>;
289
318
 
290
- declare class OZ {
291
- private events;
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;
292
327
  private states;
293
- private winStates;
294
- private windowEvents;
295
- private resetST;
296
- private resetEV;
297
- constructor();
298
- get keys(): string[];
299
- set(catt: CATT): this;
300
- push(_OZ: this): this;
301
- get stage(): this;
302
- get processWindowEvents(): this;
303
- reset(id: string[]): this;
304
- RPS(oz?: this): this;
305
- }
306
-
307
- declare class eStream {
308
- stream: EventSource;
309
- url: string;
310
- constructor(eurl: string, withCredentials: boolean);
311
- on(event: obj$1<(a: MessageEvent) => void>): this;
312
- }
313
- declare function eventStream(url: string, withCredentials?: boolean): eStream;
314
-
315
- declare class __I {
316
- value: any;
317
- constructor(value: any);
318
- get str(): string | null;
319
- get int(): number | null;
320
- get float(): number | null;
321
- get bool(): boolean | null;
322
- get json(): any | null;
323
- }
324
- type storeValTypes = keyof __I;
325
- declare class storageInterface<T> {
326
- key: string;
327
- state: Stateful<T> | null;
328
- storage: Storage;
329
- constructor(item: obj$1<Stateful<T>> | string, _type?: "local" | "session", init?: storeValTypes);
330
- get as(): __I;
331
- get value(): string | null;
332
- set set(val: any);
333
- get remove(): void;
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;
334
337
  }
335
-
338
+ declare function State<T>(value: T, options?: AddEventListenerOptions): Stateful<T>;
336
339
  /**
337
- * Local Storage
340
+ * Quick State checking - skip checking of Object keys:values as it will only be compared as a===b
338
341
  */
339
- declare const local: {
340
- get: <T>(item: obj$1<Stateful<T>> | string) => storageInterface<T>;
341
- init: <T>(item: obj$1<Stateful<T>>, as: storeValTypes) => storageInterface<T>;
342
- };
342
+ declare function QState<T>(value: T, verify?: boolean): Stateful<T>;
343
343
 
344
- /**
345
- * Session Storage
346
- */
347
- declare const session: {
348
- get: <T>(item: obj$1<Stateful<T>> | string) => storageInterface<T>;
344
+ type CSSStyle = {
345
+ [P in keyof CSSStyleDeclaration]?: DVal;
346
+ } & {
347
+ [key: string]: DVal;
349
348
  };
350
349
 
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;
360
+ }
361
+
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;
861
+ }
862
+
351
863
  type kf = KeyframeAnimationOptions;
352
- type KFType = (CSSinT | obj$1<V>)[] | CSSinT | obj$1<V>;
864
+ type KFType = (CSSStyle | obj$1<V>)[] | CSSStyle | obj$1<V>;
353
865
  declare class anim {
354
866
  private e;
355
867
  opt: kf;
356
868
  constructor(e: Elem);
357
- animate(keyframes: CSSinT[] | CSSinT, options?: kf): Elem<HTMLElement>;
869
+ animate(keyframes: CSSStyle[] | CSSStyle, options?: kf): Elem<HTMLElement>;
358
870
  get slide(): {
359
871
  left: (options?: kf) => anim;
360
872
  right: (options?: kf) => anim;
@@ -395,7 +907,7 @@ declare class Eget<T extends Elements = HTMLElement> {
395
907
  get rect(): DOMRect;
396
908
  get remove_element(): this;
397
909
  get style(): {
398
- set: (style: CSSinT | obj$1<V | null>, delayOrFN?: number | ((e?: any) => void)) => Elem<HTMLElement>;
910
+ set: (style: CSSStyle | obj$1<V | null>, delayOrFN?: number | ((e?: any) => void)) => Elem<HTMLElement>;
399
911
  get: (prop: keyof CSSStyleDeclaration | string) => string;
400
912
  del: (...props: (keyof CSSStyleDeclaration | string)[]) => void;
401
913
  };
@@ -414,10 +926,11 @@ declare class Eget<T extends Elements = HTMLElement> {
414
926
  type fn<E, T> = (e?: E) => T;
415
927
  declare class Elem<T extends Elements = HTMLElement> extends Eget<T> {
416
928
  constructor(e: T, query?: string);
417
- add(...className: string[]): this;
929
+ add(...className: string[]): () => void;
418
930
  remove(...className: string[]): this;
419
- toggle(className: string | fn<any, string>, force?: boolean): this;
420
- has(e: any | null): boolean;
931
+ toggle(className: string | fn<any, string>, force?: boolean): boolean;
932
+ hasNode(e: Node): boolean;
933
+ has(...classes: string[]): boolean;
421
934
  insert(position: InsertPosition): {
422
935
  HTML: (...text: string[]) => Elem<T>;
423
936
  element: (...elem: HTMLElement[]) => Elem<T>;
@@ -434,12 +947,13 @@ declare class Elem<T extends Elements = HTMLElement> extends Eget<T> {
434
947
  animate(keyframes: KFType, onComplete?: fn<any, void>): this;
435
948
  }
436
949
 
950
+ type Elements = HTMLElementTagNameMap[keyof HTMLElementTagNameMap] | SVGElementTagNameMap[keyof SVGElementTagNameMap];
437
951
  interface CLI {
438
952
  id?: string;
439
953
  class?: string;
440
954
  }
441
- declare function $<T extends Elements = HTMLElement>(query: CLI): Elem<T> | undefined;
442
- declare function $<T extends Elements = HTMLElement>(query: string): Elem<T> | undefined;
955
+ declare function $<T extends Elements = HTMLElement, P extends Elements = HTMLElement>(query: CLI, parent?: P): Elem<T> | undefined;
956
+ declare function $<T extends Elements = HTMLElement, P extends Elements = HTMLElement>(query: string, parent?: P): Elem<T> | undefined;
443
957
  declare function $<T extends Elements = HTMLElement>(element: T): Elem<T>;
444
958
  type _$<T extends Elements = HTMLElement> = Elem<T> | undefined;
445
959
  type $E<T extends Elements = HTMLElement> = Elem<T>;
@@ -452,33 +966,87 @@ declare class Ref<T extends Elements = HTMLElement> {
452
966
  }
453
967
  declare const useRef: <T extends Elements = HTMLElement>() => Ref<T>;
454
968
 
455
- declare class doc<T extends {
456
- args?: Record<string, any>;
457
- data?: Record<string, any>;
458
- } = Record<string, any>> extends head {
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 {
459
999
  path: string;
1000
+ data: T["data"];
460
1001
  args: T["args"];
461
- id: string;
462
- status: number;
463
- lang?: string;
464
- import?: any;
465
- _data: T["data"];
466
- static route: string;
467
- constructor(path: string, args: T["args"] | undefined, id: string, status?: number);
468
- fetch?(): Promise<Record<string, any>>;
469
- head?(): Promise<void> | void;
470
- body?(): Promise<Dom> | Dom;
471
- loader(): Promise<any[]>;
472
- getHeadAttr(head?: headAttr, ...toMap: headType[]): headType;
473
- set data(data: obj$1<any>);
474
- get data(): T["data"];
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>;
475
1043
  }
476
1044
 
477
1045
  declare class websocket<T = Record<string, any>> {
478
1046
  path: string;
479
1047
  protected args: T;
1048
+ route: string;
480
1049
  ws: WebSocket;
481
- static route: string;
482
1050
  isConnected: Stateful<boolean>;
483
1051
  data: T;
484
1052
  constructor(path: string, args?: T);
@@ -500,366 +1068,101 @@ declare class websocket<T = Record<string, any>> {
500
1068
  set send(message: string | ArrayBufferLike | Blob | ArrayBufferView);
501
1069
  }
502
1070
  declare class socket {
503
- protected yvee: Pager;
504
- constructor(yvee: Pager);
505
- load(_path: string): Promise<websocket<{}> | undefined>;
1071
+ protected yvee: Yvee;
1072
+ constructor(yvee: Yvee);
1073
+ load(_path: string): Promise<websocket<Record<string, any>> | undefined>;
506
1074
  unload(_path: string): void;
507
1075
  }
508
1076
 
509
- declare class Pager extends minClient {
510
- protected config: routerCfg;
511
- protected hook?: () => void;
512
- protected root: Stateful<ctx[]>;
513
- socket: socket;
514
- id: string;
515
- path: Stateful<string>;
516
- lastPath: Stateful<string>;
517
- loading: Stateful<boolean>;
518
- mainElement?: HTMLElement;
519
- A: (a: attr & {
520
- href: string;
521
- topRef?: Stateful<_$>;
522
- top?: number | (() => number);
523
- }, ...D: ctx[]) => Dom;
524
- Main: (a: attr) => Dom;
525
- load: (path?: string, data?: obj<string>) => Promise<this>;
526
- matchPath: (str: string) => boolean;
527
- protected isYvee: boolean;
528
- constructor(config?: routerCfg, events?: events);
529
- protected hooker(): void;
530
- protected class(this: Pager, _path: string, _error: number, isError?: boolean): Promise<doc<{}>>;
531
- protected fetch(CL?: doc<{}>): Promise<void>;
532
- protected processHead(CL?: doc<{}>, head?: headAttr): Promise<headType>;
533
- private processClassHead;
534
- private processDefaultHead;
535
- render(_path: string, _error?: number, data?: obj<string>, head?: headAttr, isClient?: boolean, isError?: boolean): Promise<{
536
- lang: string;
537
- heads: headType;
538
- done: boolean;
539
- }>;
540
- }
541
-
542
- declare function pushHistory(path?: string, title?: string): void;
543
-
544
- interface routerCfg {
545
- classes?: string | string[];
546
- id?: string;
547
- base?: string;
1077
+ declare class BasePath<T> extends MinStorage {
1078
+ cls: T;
1079
+ constructor(path: string, cls: T);
548
1080
  }
549
- interface yveeCfg extends routerCfg {
550
- pushState?: boolean;
1081
+ declare class ClientPath extends BasePath<typeof doc<{}>> {
551
1082
  }
552
- declare class Yvee extends Pager {
553
- protected config: yveeCfg;
554
- protected isYvee: boolean;
555
- protected unload: boolean;
556
- constructor(config?: yveeCfg, events?: events);
1083
+ declare class SocketPath extends BasePath<typeof websocket> {
557
1084
  }
558
- declare const Routes: (fn: (Yvee: Yvee) => void) => (Yvee: Yvee) => void;
559
- interface headAttrPlus {
560
- route?: string;
561
- base?: string;
562
- index?: string;
563
- id?: string;
564
- bodyattr?: obj$1<V>;
565
- data?: Record<string, any> | (() => Promise<Record<string, any>> | Record<string, any>);
1085
+ declare class MainStorage<T extends InstanceType<typeof BasePath>> {
1086
+ storage: Storage<T>;
1087
+ error: Storage<T>;
566
1088
  }
567
- type headFN<T = {}> = (a: Record<string, any> & T) => Promise<headAttr> | headAttr;
568
- type ND<T = Record<string, any>> = (a: renderConfig & T) => Dom | Promise<Dom>;
569
- declare function Render<T = Record<string, any>>(DOM: ND<T>, head?: headAttr | headFN<T>, cfg?: headAttrPlus): Promise<({ path, data, status }: serverRender) => Promise<string>>;
570
- declare function Render<T = Record<string, any>>(DOM: ND<T>, App: Yvee): Promise<({ path, data, status }: serverRender) => Promise<string>>;
571
-
572
- declare class ClientPath extends MinStorage {
573
- id: string;
574
- cls: typeof doc<{}>;
575
- 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>];
576
1097
  }
577
- declare class SocketPath extends MinStorage {
578
- id: string;
579
- cls: typeof websocket<{}>;
580
- constructor(path: string, id: string, cls: typeof websocket<{}>);
581
- }
582
- declare class minClient extends htmlHead {
583
- protected storage: Storage$1<ClientPath>;
584
- protected errorStorage: Storage$1<ClientPath>;
585
- protected wssStorage: Storage$1<SocketPath>;
586
- /** --------------------
587
- * string | int | float | file | uuid
588
- * - /url/\<string:hell>
589
- */
590
- route: (path: string) => <Q extends typeof doc<{}>>(f: Q) => Q;
591
- error: (...codes: number[]) => <Q extends typeof doc<{}>>(f: Q) => Q;
592
- wss: (path: string) => <Q extends typeof websocket<{}>>(f: Q) => Q;
593
- base: string;
594
- constructor(base?: string);
595
- protected _base(str: string): string;
596
- protected getPath(path: string): Promise<[ClientPath | undefined, Record<string, string>]>;
597
- protected loadError(code: number): Promise<[ClientPath | undefined, Record<string, string>]>;
598
- protected loadWSS(path: string): Promise<[SocketPath | undefined, Record<string, string>]>;
1098
+ declare class TabPath extends BasePath<typeof content<{}>> {
599
1099
  }
600
-
601
- type Elements = HTMLElementTagNameMap[keyof HTMLElementTagNameMap] | SVGElementTagNameMap[keyof SVGElementTagNameMap];
602
-
603
- type hookFN<T extends any[]> = (...args: statefulValue<T>) => void;
604
- interface stateCFG {
605
- id?: string;
606
- init?: boolean;
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>];
607
1107
  }
608
- declare function StateHook<T extends any[]>(callback: hookFN<T>, statefuls: [...{
609
- [K in keyof T]: Stateful<T[K]>;
610
- }], { id, init }?: stateCFG): () => void;
611
1108
 
612
- type statefulValue<T extends any[]> = {
613
- [K in keyof T]: T[K] extends Stateful<infer U> ? U : T[K];
614
- };
615
- declare class Stateful<T> extends EventTarget {
616
- private options?;
617
- private hooks;
618
- private states;
619
- private _value;
620
- private listening;
621
- private end?;
622
- constructor(value: T, options?: AddEventListenerOptions | undefined);
623
- get value(): T;
624
- set value(newValue: T);
625
- get listen(): () => void;
626
- call<Q>(callback: (this: Elements, arg: T) => Q, entry: string): (id: string) => () => void;
627
- 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;
628
1114
  }
629
- declare function State<T>(value: T, options?: AddEventListenerOptions): Stateful<T>;
630
1115
 
631
- type X2 = V | V[];
632
- type X3 = X2 | Stateful<X2> | null | undefined;
633
- type CSSinT = {
634
- [P in keyof CSSStyleDeclaration]?: X3;
635
- } & {
636
- [key: string]: X3;
637
- };
638
- interface c_events<T extends Elements = HTMLElement> {
639
- state?: (this: T, e: T) => [(...args: any[]) => void, Stateful<any>[], boolean?];
640
- ready?: (this: T, e: T) => void;
641
- resize?: (this: T, e: UIEvent) => void;
642
- beforeunload?: (this: T, e: BeforeUnloadEvent) => void;
643
- popstate?: (this: T, e: PopStateEvent) => void;
644
- winscroll?: (this: T, e: Event) => void;
645
- winload?: (this: T, e: Event) => void;
646
- winfocus?: (this: T, e: Event) => void;
647
- winblur?: (this: T, e: Event) => void;
1116
+ interface mtab {
1117
+ tab: string;
648
1118
  }
649
- type XU4 = V | undefined | XU4[];
650
- interface baseAttr {
651
- style?: CSSinT | string;
652
- on?: events<any>;
653
- id?: string;
654
- class?: XU4 | Stateful<X2>;
655
- ref?: Ref;
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;
656
1125
  }
657
- declare class Dom {
658
- tag: string;
659
- private attr;
660
- private ctx;
661
- constructor(tag: string, attr?: attr, ...ctx: ctx[]);
662
- __(pid?: idm): {
663
- ctx: string;
664
- oz: OZ;
665
- id: string | undefined;
666
- };
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>;
667
1131
  }
668
- declare function dom(tag: string | ((attr: attr, ...ctx: ctx[]) => Dom), attr?: attr | null, ...ctx: ctx[]): Dom;
669
- declare const frag: (attr: attr, ...dom: Dom[]) => Dom[];
670
1132
 
671
- declare global {
672
- type events<T extends Elements = HTMLElement> = {
673
- [P in keyof GlobalEventHandlersEventMap]?: (this: T, e: GlobalEventHandlersEventMap[P]) => void;
674
- } & c_events<T>;
675
- type attr = baseAttr | obj<X3>;
676
- type ctx = V | Dom | Stateful<V | Dom> | ctx[];
677
- type obj<T> = Record<string, T>;
678
- type DomFN<T = {}> = (a: attr & T, ...D: ctx[]) => Dom;
679
- const BASE_STRING: string;
680
- namespace JSX {
681
- type Element = Dom;
682
- interface IntrinsicElements {
683
- link: attr;
684
- base: attr;
685
- meta: attr;
686
- p: attr;
687
- br: attr;
688
- hr: attr;
689
- h: attr;
690
- cmnt: attr;
691
- root: attr;
692
- html: attr;
693
- body: attr;
694
- div: attr;
695
- span: attr;
696
- header: attr;
697
- hgroup: attr;
698
- footer: attr;
699
- main: attr;
700
- section: attr;
701
- search: attr;
702
- article: attr;
703
- aside: attr;
704
- details: attr;
705
- dialog: attr;
706
- summary: attr;
707
- data: attr;
708
- noscript: attr;
709
- object: attr;
710
- param: attr;
711
- script: attr;
712
- a: attr;
713
- nav: attr;
714
- style: attr;
715
- audio: attr;
716
- video: attr;
717
- source: attr;
718
- track: attr;
719
- img: attr;
720
- map: attr;
721
- area: attr;
722
- canvas: attr;
723
- figcaption: attr;
724
- figure: attr;
725
- picture: attr;
726
- iframe: attr;
727
- form: attr;
728
- input: attr;
729
- textarea: attr;
730
- button: attr;
731
- select: attr;
732
- optgroup: attr;
733
- option: attr;
734
- label: attr;
735
- fieldset: attr;
736
- legend: attr;
737
- datalist: attr;
738
- table: attr;
739
- caption: attr;
740
- th: attr;
741
- tr: attr;
742
- td: attr;
743
- thead: attr;
744
- tbody: attr;
745
- tfoot: attr;
746
- col: attr;
747
- colgroup: attr;
748
- b: attr;
749
- i: attr;
750
- q: attr;
751
- s: attr;
752
- u: attr;
753
- em: attr;
754
- rp: attr;
755
- del: attr;
756
- dfn: attr;
757
- ins: attr;
758
- kbd: attr;
759
- pre: attr;
760
- sub: attr;
761
- sup: attr;
762
- var: attr;
763
- wbr: attr;
764
- cite: attr;
765
- time: attr;
766
- abbr: attr;
767
- code: attr;
768
- mark: attr;
769
- samp: attr;
770
- meter: attr;
771
- small: attr;
772
- strong: attr;
773
- address: attr;
774
- progress: attr;
775
- template: attr;
776
- blockquote: attr;
777
- menu: attr;
778
- ul: attr;
779
- ol: attr;
780
- li: attr;
781
- dl: attr;
782
- dt: attr;
783
- dd: attr;
784
- h1: attr;
785
- h2: attr;
786
- h3: attr;
787
- h4: attr;
788
- h5: attr;
789
- h6: attr;
790
- svg: attr;
791
- path: attr;
792
- circle: attr;
793
- animate: attr;
794
- animateMotion: attr;
795
- animateTransform: attr;
796
- clipPath: attr;
797
- defs: attr;
798
- desc: attr;
799
- ellipse: attr;
800
- feBlend: attr;
801
- feColorMatrix: attr;
802
- feComponentTransfer: attr;
803
- feComposite: attr;
804
- feConvolveMatrix: attr;
805
- feDiffuseLighting: attr;
806
- feDisplacementMap: attr;
807
- feDistantLight: attr;
808
- feDropShadow: attr;
809
- feFlood: attr;
810
- feFuncA: attr;
811
- feFuncB: attr;
812
- feFuncG: attr;
813
- feFuncR: attr;
814
- feGaussianBlur: attr;
815
- feImage: attr;
816
- feMerge: attr;
817
- feMergeNode: attr;
818
- feMorphology: attr;
819
- feOffset: attr;
820
- fePointLight: attr;
821
- feSpecularLighting: attr;
822
- feSpotLight: attr;
823
- feTile: attr;
824
- feTurbulence: attr;
825
- filter: attr;
826
- foreignObject: attr;
827
- g: attr;
828
- image: attr;
829
- line: attr;
830
- linearGradient: attr;
831
- marker: attr;
832
- mask: attr;
833
- metadata: attr;
834
- mpath: attr;
835
- pattern: attr;
836
- polygon: attr;
837
- polyline: attr;
838
- radialGradient: attr;
839
- rect: attr;
840
- set: attr;
841
- stop: attr;
842
- symbol: attr;
843
- text: attr;
844
- textPath: attr;
845
- title: attr;
846
- tspan: attr;
847
- use: attr;
848
- view: attr;
849
- }
850
- }
851
- }
852
- declare const resolvePath: (base: string, relative: string) => string;
853
1133
  interface renderConfig {
854
- path: string;
855
- status: number;
856
- base: string;
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;
857
1153
  }
858
1154
  interface serverRender {
859
1155
  path: string;
1156
+ error?: number;
860
1157
  data?: Record<string, any>;
861
- status?: number;
862
1158
  }
863
- declare const IfClient: <T>(fn: () => T) => T | undefined;
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;
864
1166
 
865
- export { $, type $E, Dom, IfClient, Meta, Pager, Ref, Render, Routes, State, StateHook, Stateful, Yvee, type _$, __, addCSS, cssLoader, doc, dom, eventStream, frag, type headAttr, local, log, pushHistory, type renderConfig, resolvePath, type serverRender, session, useRef, websocket };
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 };