dothtml-interfaces 0.1.20 → 0.1.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dothtml-interfaces",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "Dependency injection interfaces for DOTHtml.",
5
5
  "main": "src/index.d.ts",
6
6
  "types": "src/index.d.ts",
@@ -1,5 +1,5 @@
1
1
 
2
- import { IDotElement, IDotGenericElement } from "./i-dot";
2
+ import { IDotGenericElement } from "./i-dot";
3
3
  import IDotCss from "./i-dot-css";
4
4
 
5
5
  export interface FrameworkItems {
@@ -25,7 +25,7 @@ export default interface IComponent {
25
25
  /**
26
26
  * A function returning DOThtml (required).
27
27
  */
28
- build(...args: Array<any>): IDotElement;
28
+ build(...args: Array<any>): IDotGenericElement;
29
29
 
30
30
  /**
31
31
  * An optional function that is called after builder that stylizes the component using a scoped style builder.
package/src/i-dot.d.ts CHANGED
@@ -8,7 +8,7 @@ type DotContentPrimitive = string|number|boolean;
8
8
  type DotContentBasic = DotContentPrimitive|Node|Element|NodeList|IComponent|IDotDocument//typeof DotDocument;
9
9
  export type DotContent = DotContentBasic|Array<DotContent>|IObservable;//|(()=>DotContent);
10
10
 
11
- type PrimativeOrObservable<T = string|number|boolean> = T|IObservable<T>;
11
+ type AttrVal<T = string|number|boolean> = T|IObservable<T>;
12
12
 
13
13
  /**
14
14
  * Global interface containing elements.
@@ -151,6 +151,7 @@ export interface IDotDocument
151
151
 
152
152
  kbd(content?: DotContent): IDotElementDocument<IDotGenericElement>;
153
153
 
154
+ /** @deprecated Deprecated in HTML5. */
154
155
  keyGen(content?: DotContent): IDotKeyGen;
155
156
  label(content?: DotContent): IDotLabel;
156
157
 
@@ -260,12 +261,6 @@ export interface IDotConditionalDocument extends IDotDocument{
260
261
  otherwise(callback: DotContent): IDotDocument;
261
262
  }
262
263
 
263
- /**
264
- * Public interface indicating the return type of the Component builder method. Represents any VDBO containing an element.
265
- * The VDBO returned by Component builder method must contain exactly one element.
266
- */
267
- export interface IDotElement extends IDotElementDocument<IDotGenericElement>{}
268
-
269
264
  // Attribute interface (for all elements):
270
265
  export interface IDotElementDocument<T extends IDotDocument> extends IDotDocument
271
266
  {
@@ -290,34 +285,51 @@ export interface IDotElementDocument<T extends IDotDocument> extends IDotDocumen
290
285
  */
291
286
  ref(name: string, index?:number): T;
292
287
 
293
- // TODO: move to specific elements.
294
- /** @deprecated Deprecated in HTML5. Use CSS. */
295
- bgColor(value: unknown): T;
296
288
  /** @deprecated Deprecated in HTML5. Use CSS. */
297
- color(value: unknown): T;
289
+ bgColor(value: AttrVal<unknown>): T;
298
290
  /** @deprecated Deprecated in HTML5. Use CSS. */
299
- aLink(value: unknown): T;
291
+ color(value: AttrVal<unknown>): T;
300
292
  /** @deprecated Deprecated in HTML5. Use CSS. */
301
- archive(value: unknown): T;
302
- // Only add this if we decide to add the search element.
303
- // /** @deprecated Non-standard attribute. */
304
- // autoSave(value: unknown): IDotMajor;
293
+ aLink(value: AttrVal<unknown>): T;
294
+ /** @deprecated Deprecated in HTML5. */
295
+ archive(value: AttrVal<unknown>): T;
305
296
 
306
297
  // TODO: we're still missing some additional global attributes. See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/
307
- accessKey(value: PrimativeOrObservable<string>): T; // This could potentially be enumerated. But care should be taken as these types are already quite complex.
298
+ areaHidden(value: AttrVal<boolean>): T;
299
+ areaLabel(value: AttrVal<string>): T;
300
+ areaDescribedBy(value: AttrVal<string>): T;
301
+ areaControls(value: AttrVal<string>): T;
302
+ areaExpanded(value: AttrVal<boolean>): T;
303
+ areaChecked(value: AttrVal<string>): T;
304
+ areaSelected(value: AttrVal<boolean>): T;
305
+ accessKey(value: AttrVal<string>): T; // This could potentially be enumerated. But care should be taken as these types are already quite complex.
308
306
  class(value: unknown): T; // TODO: need a better way of setting classes.
309
- contentEditable(value: PrimativeOrObservable<"true">|PrimativeOrObservable<"false">|PrimativeOrObservable<"plaintext-only">): T;
310
- dir(value: PrimativeOrObservable<string>): T;
311
- draggable(value: PrimativeOrObservable<"true">|PrimativeOrObservable<"false">): T; // This one is enumerated. "true" or "false" is mandatory.
312
- dropZone(value: "move"|"copy"|"link"): T; // Might not be supported anywhere.
313
- hidden(value: PrimativeOrObservable<boolean>): T;
307
+ contentEditable(value: AttrVal<"true">|AttrVal<"false">|AttrVal<"plaintext-only">): T;
308
+ contextMenu(value: AttrVal<string>): T;
309
+ dir(value: AttrVal<string>): T;
310
+ draggable(value: AttrVal<"true">|AttrVal<"false">): T;
311
+ dropZone(value: AttrVal<"move">|AttrVal<"copy">|AttrVal<"link">): T;
312
+ exportParts(value: AttrVal<string>): T;
313
+ hidden(value: AttrVal<boolean>): T;
314
314
  id(value: string): T;
315
- itemProp(value: PrimativeOrObservable<string>): T;
316
- lang(value: PrimativeOrObservable<string>): T;
317
- spellCheck(value: PrimativeOrObservable<"true">|PrimativeOrObservable<"false">): T; // This one should ideally render as "true" or "false", not be removed.
315
+ inert(value: AttrVal<boolean>): T;
316
+ inputMode(value: AttrVal<string>): T;
317
+ is(value: AttrVal<string>): T;
318
+ itemId(value: AttrVal<string>): T;
319
+ itemProp(value: AttrVal<string>): T;
320
+ itemRef(value: AttrVal<string>): T;
321
+ itemScope(value: AttrVal<string>): T;
322
+ itemType(value: AttrVal<string>): T;
323
+ lang(value: AttrVal<string>): T;
324
+ nOnce(value: AttrVal<string>): T;
325
+ part(value: AttrVal<string>): T;
326
+ role(value: AttrVal<string>): T;
327
+ spellCheck(value: AttrVal<"true">|AttrVal<"false">): T;
318
328
  style(value: string|IDotcssProp): T;
319
- tabIndex(value: PrimativeOrObservable<number>): T;
320
- title(value: PrimativeOrObservable<string>): T;
329
+ tabIndex(value: AttrVal<number>): T;
330
+ title(value: AttrVal<string>): T;
331
+ translate(value: AttrVal<string>): T;
332
+ virtualKeyboardPolicy(value: AttrVal<"auto">|AttrVal<"manual">): T;
321
333
 
322
334
  // Events
323
335
 
@@ -387,36 +399,44 @@ interface IMountedComponent extends IDotDocument{
387
399
  }
388
400
 
389
401
  interface IDotA extends IDotElementDocument<IDotA>{
390
- download(value: PrimativeOrObservable<boolean>): IDotA;
391
- hRef(value: PrimativeOrObservable<string>): IDotA;
392
- hRefLang(value: PrimativeOrObservable<string>): IDotA;
393
- media(value: unknown): IDotA;
394
- ping(value: unknown): IDotA;
395
- rel(value: PrimativeOrObservable<string>): IDotA;
396
- rev(value: unknown): IDotA;
397
- target(value: PrimativeOrObservable<"_blank"|"_parent"|"_self"|"_top">): IDotA;
398
- type(value: unknown): IDotA; // This might be fake news.
402
+ download(value: AttrVal<boolean>): IDotA;
403
+ hRef(value: AttrVal<string>): IDotA;
404
+ hRefLang(value: AttrVal<string>): IDotA;
405
+ charset(value: AttrVal<string>): IDotA;
406
+ coords(value: AttrVal<string>): IDotA;
407
+ shape(value: AttrVal<string>): IDotA;
408
+ media(value: AttrVal<string>): IDotA;
409
+ ping(value: AttrVal<string>): IDotA; // Space separated. Consider an array. Or do what we're doing for class.
410
+ rel(value: AttrVal<string>): IDotA;
411
+ /** @deprecated Deprecated in HTML5. */
412
+ rev(value: AttrVal<unknown>): IDotA;
413
+ name(value: AttrVal<string>): IDotA;
414
+ // rev(value: unknown): IDotA; // Not supported in HTML 5.
415
+ target(value: AttrVal<"_blank">|AttrVal<"_parent">|AttrVal<"_self">|AttrVal<"_top">): IDotA;
416
+ type(value: AttrVal<string>): IDotA;
399
417
  }
400
418
  interface IDotArea extends IDotElementDocument<IDotArea>{
401
- alt(value: unknown): IDotArea;
402
- coords(value: unknown): IDotArea;
403
- download(value: unknown): IDotArea;
404
- hRef(value: unknown): IDotArea;
405
- hRefLang(value: unknown): IDotArea;
406
- media(value: unknown): IDotArea;
407
- noHRef(value: PrimativeOrObservable<string>): IDotArea;
408
- rel(value: unknown): IDotArea; // Fake?
409
- shape(value: PrimativeOrObservable<string>): IDotArea;
410
- target(value: PrimativeOrObservable<string>): IDotArea;
419
+ alt(value: AttrVal<string>): IDotArea;
420
+ coords(value: AttrVal<string>): IDotArea;
421
+ download(value: AttrVal<string>): IDotArea;
422
+ hRef(value: AttrVal<string>): IDotArea;
423
+ hRefLang(value: AttrVal<string>): IDotArea;
424
+ media(value: AttrVal<string>): IDotArea;
425
+ /** @deprecated Deprecated in HTML5. */
426
+ noHRef(value: AttrVal<string>): IDotArea;
427
+ rel(value: AttrVal<string>): IDotArea;
428
+ shape(value: AttrVal<string>): IDotArea;
429
+ target(value: AttrVal<string>): IDotArea;
411
430
  }
412
431
  interface IDotAudio extends IDotElementDocument<IDotAudio>{
413
- autoPlay(value: PrimativeOrObservable<boolean>): IDotAudio;
414
- buffered(value: unknown): IDotAudio;
415
- controls(value: PrimativeOrObservable<boolean>): IDotAudio;
416
- loop(value: PrimativeOrObservable<boolean>): IDotAudio;
417
- muted(value: PrimativeOrObservable<boolean>): IDotAudio;
418
- preload(value: PrimativeOrObservable<"auto">|PrimativeOrObservable<"metadata">|PrimativeOrObservable<"none">): IDotAudio;
419
- src(value: PrimativeOrObservable<string>): IDotAudio;
432
+ autoPlay(value: AttrVal<boolean>): IDotAudio;
433
+ // buffered(value: unknown): IDotAudio; // Not used?
434
+ controls(value: AttrVal<boolean>): IDotAudio;
435
+ loop(value: AttrVal<boolean>): IDotAudio;
436
+ muted(value: AttrVal<boolean>): IDotAudio;
437
+ preload(value: AttrVal<"auto">|AttrVal<"metadata">|AttrVal<"none">): IDotAudio;
438
+ src(value: AttrVal<string>): IDotAudio;
439
+ crossOrigin(value: AttrVal<"anonymous">|AttrVal<"use-credentials">): IDotAudio;
420
440
 
421
441
  // Special functions:
422
442
  pause(): IDotAudio;
@@ -447,7 +467,7 @@ interface IDotAudio extends IDotElementDocument<IDotAudio>{
447
467
  onCanPlay(callback: (e: Event)=>void): IDotAudio;
448
468
  }
449
469
  interface IDotBlockQuote extends IDotElementDocument<IDotBlockQuote>{
450
- quoteCite(value: unknown): IDotBlockQuote; // cite
470
+ quoteCite(value: AttrVal<string>): IDotBlockQuote; // alias for cite
451
471
  }
452
472
  interface IDotBody extends IDotElementDocument<IDotBody>{
453
473
  /** @deprecated Deprecated in HTML5. Use CSS. */
@@ -470,117 +490,133 @@ interface IDotBr extends IDotElementDocument<IDotBr>{
470
490
  clear(value: unknown): IDotBr;
471
491
  }
472
492
  interface IDotButton extends IDotElementDocument<IDotButton>{
473
- autoFocus(value: unknown): IDotButton;
474
- formAction(value: unknown): IDotButton;
475
- disabled(value?: unknown): IDotButton;
476
- name(value: unknown): IDotButton;
477
- type(value: unknown): IDotButton;
478
- whichForm(value: unknown): IDotButton; // form
479
- value(value: unknown): IDotButton;
493
+ autoFocus(value: AttrVal<boolean>): IDotButton;
494
+ formAction(value: AttrVal<string>): IDotButton;
495
+ disabled(value?: AttrVal<boolean>): IDotButton;
496
+ name(value: AttrVal<string>): IDotButton;
497
+ type(value: AttrVal<"button">|AttrVal<"submit">|AttrVal<"reset">): IDotButton;
498
+ whichForm(value: AttrVal<string>): IDotButton; // alias for form
499
+ value(value: AttrVal<string>): IDotButton;
480
500
  }
481
501
  interface IDotCanvas extends IDotElementDocument<IDotCanvas>{
482
- height(value: unknown): IDotCanvas;
483
- width(value: unknown): IDotCanvas;
502
+ height(value: AttrVal<number>): IDotCanvas;
503
+ width(value: AttrVal<number>): IDotCanvas;
484
504
  }
485
505
  interface IDotCol extends IDotElementDocument<IDotCol>{
486
506
  /** @deprecated Deprecated in HTML5. Use CSS. */
487
- charOff(value: unknown): IDotCol;
488
- colSpan(value: unknown): IDotCol; // span
489
- vAlign(value: unknown): IDotCol;
507
+ charOff(value: AttrVal<unknown>): IDotCol;
508
+ colSpan(value: AttrVal<number>): IDotCol; // alias for span
509
+ vAlign(value: AttrVal<number>): IDotCol;
490
510
  }
491
511
  interface IDotColGroup extends IDotElementDocument<IDotColGroup>{
492
512
  /** @deprecated Deprecated in HTML5. Use CSS. */
493
- charOff(value: unknown): IDotColGroup;
494
- colSpan(value: unknown): IDotColGroup; // span
495
- vAlign(value: unknown): IDotColGroup;
513
+ charOff(value: AttrVal<unknown>): IDotColGroup;
514
+ colSpan(value: AttrVal<number>): IDotColGroup; // alias for span
515
+ /** @deprecated Deprecated in HTML5. Use CSS. */
516
+ vAlign(value: AttrVal<unknown>): IDotColGroup;
496
517
  }
497
518
  interface IDotDel extends IDotElementDocument<IDotDel>{
498
- dateTime(value: unknown): IDotDel;
499
- quoteCite(value: unknown): IDotDel; // cite
519
+ dateTime(value: AttrVal<string>): IDotDel; // Would be cool if this could accept dates and just format them internally...
520
+ quoteCite(value: AttrVal<string>): IDotDel; // alias for cite
500
521
  }
501
522
  interface IDotDetails extends IDotElementDocument<IDotDetails>{
502
- open(value: unknown): IDotDetails;
523
+ open(value: AttrVal<boolean>): IDotDetails;
503
524
 
504
525
  // Events:
505
526
  onToggle (callback: (e: Event)=>void): IDotDetails;
506
527
  }
507
528
  interface IDotEmbed extends IDotElementDocument<IDotEmbed>{
508
- height(value: unknown): IDotEmbed;
509
- src(value: unknown): IDotEmbed;
510
- type(value: unknown): IDotEmbed;
511
- width(value: unknown): IDotEmbed;
529
+ height(value: AttrVal<number>): IDotEmbed;
530
+ src(value: AttrVal<string>): IDotEmbed;
531
+ type(value: AttrVal<string>): IDotEmbed;
532
+ width(value: AttrVal<number>): IDotEmbed;
512
533
  }
513
534
  interface IDotFieldSet extends IDotElementDocument<IDotFieldSet>{
514
- disabled(value: unknown): IDotFieldSet;
515
- name(value: unknown): IDotFieldSet;
516
- whichForm(value: unknown): IDotFieldSet; // form
535
+ disabled(value: AttrVal<boolean>): IDotFieldSet;
536
+ name(value: AttrVal<string>): IDotFieldSet;
537
+ whichForm(value: AttrVal<string>): IDotFieldSet; // alias for form
517
538
  }
518
539
  interface IDotForm extends IDotElementDocument<IDotForm>{
519
- acceptCharset(value: unknown): IDotForm; // accept-charset
520
- action(value: unknown): IDotForm;
521
- autoComplete(value: unknown): IDotForm;
522
- encType(value: unknown): IDotForm;
523
- method(value: unknown): IDotForm;
524
- name(value: unknown): IDotForm;
525
- noValidate(value: boolean): IDotForm;
526
- rel(value: unknown): IDotForm;
527
- target(value: unknown): IDotForm;
540
+ acceptCharset(value: AttrVal<string>): IDotForm; // accept-charset, apparently the only hyphenated attribute (aside from data-*)...
541
+ action(value: AttrVal<string>): IDotForm;
542
+ autoComplete(value: AttrVal<"on">|AttrVal<"off">): IDotForm;
543
+ encType(value: AttrVal<"application/x-www-form-urlencoded">|AttrVal<"multipart/form-data">|AttrVal<"text/plain">): IDotForm;
544
+ method(value: AttrVal<"get">|AttrVal<"post">): IDotForm;
545
+ name(value: AttrVal<string>): IDotForm;
546
+ noValidate(value: AttrVal<boolean>): IDotForm;
547
+ // rel(value: PrimativeOrObservable<string>): IDotForm; // Not used with forms?
548
+ target(value: AttrVal<"_self">|AttrVal<"_blank">|AttrVal<"_parent">|AttrVal<"_top">): IDotForm;
528
549
  }
529
550
  interface IDotHr extends IDotElementDocument<IDotHr>{
530
551
  noShade(value: unknown): IDotHr;
531
552
  }
532
553
  interface IDotIFrame extends IDotElementDocument<IDotIFrame>{
533
- height(value: unknown): IDotIFrame;
534
- longDesc(value: unknown): IDotIFrame;
535
- marginHeight(value: unknown): IDotIFrame;
536
- marginWidth(value: unknown): IDotIFrame;
537
- name(value: unknown): IDotIFrame;
538
- sandbox(value: unknown): IDotIFrame;
539
- scrolling(value: unknown): IDotIFrame;
540
- seamless(value: unknown): IDotIFrame;
541
- src(value: unknown): IDotIFrame;
542
- srcDoc(value: unknown): IDotIFrame;
543
- width(value: unknown): IDotIFrame;
554
+ allow(value: AttrVal<string>): IDotIFrame;
555
+ allowFullScreen(value: AttrVal<boolean>): IDotIFrame;
556
+ /** @deprecated Deprecated in HTML5. */
557
+ frameBorder(value: AttrVal<0>|AttrVal<1>): IDotIFrame;
558
+ height(value: AttrVal<number>): IDotIFrame;
559
+ /** @deprecated Deprecated in HTML5. */
560
+ longDesc(value: AttrVal<string>): IDotIFrame;
561
+ marginHeight(value: AttrVal<number>): IDotIFrame;
562
+ marginWidth(value: AttrVal<number>): IDotIFrame;
563
+ name(value: AttrVal<string>): IDotIFrame;
564
+ referrerPolicy(value: AttrVal<string>): IDotIFrame;
565
+ sandbox(value: AttrVal<string>): IDotIFrame;
566
+ /** @deprecated Deprecated in HTML5. */
567
+ scrolling(value: AttrVal<string>): IDotIFrame;
568
+ seamless(value: AttrVal<boolean>): IDotIFrame;
569
+ src(value: AttrVal<string>): IDotIFrame;
570
+ srcDoc(value: AttrVal<string>): IDotIFrame;
571
+ width(value: AttrVal<number>): IDotIFrame;
544
572
  }
545
573
  interface IDotImg extends IDotElementDocument<IDotImg>{
546
- alt(value: PrimativeOrObservable<string>): IDotImg;
547
- height(value: PrimativeOrObservable<number>): IDotImg;
548
- /** @deprecated Deprecated in HTML5. Use CSS. */
549
- hSpace(value: unknown): IDotImg;
550
- isMap(value: unknown): IDotImg;
551
- longDesc(value: unknown): IDotImg;
552
- sizes(value: unknown): IDotImg;
553
- src(value: PrimativeOrObservable<string>): IDotImg;
554
- srcSet(value: unknown): IDotImg;
555
- useMap(value: unknown): IDotImg;
556
- width(value: PrimativeOrObservable<number>): IDotImg;
574
+ alt(value: AttrVal<string>): IDotImg;
575
+ crossOrigin(value: AttrVal<"anonymous">|AttrVal<"use-credentials">): IDotImg;
576
+ decoding(value: AttrVal<"async">|AttrVal<"auto">|AttrVal<"sync">): IDotImg;
577
+ height(value: AttrVal<number>): IDotImg;
578
+ /** @deprecated Deprecated in HTML5. Use CSS. */
579
+ hSpace(value: AttrVal<unknown>): IDotImg;
580
+ isMap(value: AttrVal<boolean>): IDotImg;
581
+ /** @deprecated Deprecated in HTML5. Use CSS. */
582
+ loading(value: AttrVal<"eager">|AttrVal<"lazy">): IDotImg;
583
+ longDesc(value: AttrVal<string>): IDotImg;
584
+ referrerPolicy(value: AttrVal<string>): IDotImg;
585
+ sizes(value: AttrVal<string>): IDotImg;
586
+ src(value: AttrVal<string>): IDotImg;
587
+ srcSet(value: AttrVal<string>): IDotImg; // Comma separated. Consider accepting an array.
588
+ useMap(value: AttrVal<number>): IDotImg;
589
+ width(value: AttrVal<number>): IDotImg;
557
590
  }
558
591
  interface IDotInput extends IDotElementDocument<IDotInput>{
559
- accept(value: unknown): IDotInput;
560
- alt(value: unknown): IDotInput;
561
- autoComplete(value: unknown): IDotInput;
562
- autoFocus(value: unknown): IDotInput;
563
- checked(value?: PrimativeOrObservable<boolean>): IDotInput;
564
- dirName(value: PrimativeOrObservable<string>): IDotInput;
565
- disabled(value: PrimativeOrObservable<boolean>): IDotInput;
566
- formAction(value: unknown): IDotInput;
567
- list(value: unknown): IDotInput;
568
- max(value: PrimativeOrObservable<number>): IDotInput;
569
- maxLength(value: PrimativeOrObservable<number>): IDotInput;
570
- min(value: PrimativeOrObservable<number>): IDotInput;
571
- multiple(value: unknown): IDotInput;
572
- name(value: PrimativeOrObservable<string>): IDotInput;
573
- pattern(value: PrimativeOrObservable<string>): IDotInput;
574
- placeholder(value: unknown): IDotInput;
575
- readOnly(value: PrimativeOrObservable<boolean>): IDotInput;
576
- required(value: PrimativeOrObservable<boolean>): IDotInput;
577
- size(value: unknown): IDotInput;
578
- src(value: PrimativeOrObservable<string>): IDotInput;
579
- step(value: unknown): IDotInput;
592
+ accept(value: AttrVal<string>): IDotInput;
593
+ alt(value: AttrVal<string>): IDotInput;
594
+ autoCapitalize(value: AttrVal<"none">|AttrVal<"sentences">|AttrVal<"words">|AttrVal<"characters">): IDotInput;
595
+ autoComplete(value: AttrVal<"on">|AttrVal<"off">): IDotInput;
596
+ autoFocus(value: AttrVal<boolean>): IDotInput;
597
+ checked(value?: AttrVal<boolean>): IDotInput;
598
+ enterKeyHint(value: AttrVal<"enter">|AttrVal<"done">|AttrVal<"go">|AttrVal<"next">|AttrVal<"preveous">|AttrVal<"search">|AttrVal<"send">): IDotInput;
599
+ dirName(value: AttrVal<string>): IDotInput;
600
+ disabled(value: AttrVal<boolean>): IDotInput;
601
+ formAction(value: AttrVal<string>): IDotInput;
602
+ height(value: AttrVal<number>): IDotInput;
603
+ list(value: AttrVal<string>): IDotInput;
604
+ max(value: AttrVal<number>): IDotInput;
605
+ maxLength(value: AttrVal<number>): IDotInput;
606
+ min(value: AttrVal<number>): IDotInput;
607
+ multiple(value: AttrVal<boolean>): IDotInput;
608
+ name(value: AttrVal<string>): IDotInput;
609
+ pattern(value: AttrVal<string>): IDotInput;
610
+ placeholder(value: AttrVal<string>): IDotInput;
611
+ readOnly(value: AttrVal<boolean>): IDotInput;
612
+ required(value: AttrVal<boolean>): IDotInput;
613
+ size(value: AttrVal<number>): IDotInput;
614
+ src(value: AttrVal<string>): IDotInput;
615
+ step(value: AttrVal<string>|AttrVal<number>): IDotInput;
580
616
  type(value: "button"|"checkbox"|"color"|"date"|"datetime-local"|"email"|"file"|"hidden"|"image"|"month"|"number"|"password"|"radio"|"range"|"reset"|"search"|"submit"|"tel"|"text"|"time"|"url"|"week"): IDotInput;
581
- whichForm(value: unknown): IDotInput; // form
582
- value(value: PrimativeOrObservable<string>): IDotInput;
583
- width(value: PrimativeOrObservable<number>): IDotInput;
617
+ whichForm(value: AttrVal<string>): IDotInput; // form
618
+ value(value: AttrVal<string>): IDotInput;
619
+ width(value: AttrVal<number>): IDotInput;
584
620
 
585
621
  // Special functions:
586
622
  // getVal(): string
@@ -590,206 +626,215 @@ interface IDotInput extends IDotElementDocument<IDotInput>{
590
626
  onSearch(callback: (e: Event)=>void): IDotInput;
591
627
  }
592
628
  interface IDotIns extends IDotElementDocument<IDotIns>{
593
- dateTime(value: unknown): IDotIns;
594
- quoteCite(value: unknown): IDotIns; // cite
629
+ dateTime(value: AttrVal<string>): IDotIns;
630
+ quoteCite(value: AttrVal<string>): IDotIns; // alias for cite
595
631
  }
596
632
  interface IDotKeyGen extends IDotElementDocument<IDotKeyGen>{
597
- challenge(value: unknown): IDotKeyGen;
598
- keyType(value: unknown): IDotKeyGen;
633
+ challenge(value: AttrVal<string>): IDotKeyGen;
634
+ keyType(value: AttrVal<string>): IDotKeyGen;
599
635
  }
600
636
  interface IDotLabel extends IDotElementDocument<IDotLabel>{
601
- for(value: unknown): IDotLabel;
602
- whichForm(value: unknown): IDotLabel; // form
637
+ for(value: AttrVal<string>): IDotLabel;
603
638
  }
604
639
  interface IDotLi extends IDotElementDocument<IDotLi>{
605
- value(value: unknown): IDotLi;
640
+ value(value: AttrVal<number>): IDotLi;
606
641
  }
607
642
  interface IDotMap extends IDotElementDocument<IDotMap>{
608
- name(value: unknown): IDotMap;
643
+ name(value: AttrVal<string>): IDotMap;
609
644
  }
610
645
  interface IDotMenu extends IDotElementDocument<IDotMenu>{
611
- type(value: unknown): IDotMenu;
646
+ type(value: AttrVal<string>): IDotMenu;
612
647
  }
613
648
  interface IDotMeter extends IDotElementDocument<IDotMeter>{
614
- high(value: unknown): IDotMeter;
615
- low(value: unknown): IDotMeter;
616
- max(value: unknown): IDotMeter;
617
- min(value: unknown): IDotMeter;
618
- optimum(value: unknown): IDotMeter;
619
- whichForm(value: unknown): IDotMeter; // form
620
- value(value: unknown): IDotMeter;
649
+ high(value: AttrVal<number>): IDotMeter;
650
+ low(value: AttrVal<number>): IDotMeter;
651
+ max(value: AttrVal<number>): IDotMeter;
652
+ min(value: AttrVal<number>): IDotMeter;
653
+ optimum(value: AttrVal<number>): IDotMeter;
654
+ value(value: AttrVal<number>): IDotMeter;
621
655
  }
622
656
  interface IDotObject extends IDotElementDocument<IDotObject>{
623
- classId(value: unknown): IDotObject;
624
- codeBase(value: unknown): IDotObject;
625
- codeType(value: unknown): IDotObject;
626
- objectData(value: unknown): IDotObject; // data
627
- declare(value: unknown): IDotObject;
628
- height(value: unknown): IDotObject;
629
- name(value: unknown): IDotObject;
630
- standby(value: unknown): IDotObject;
631
- type(value: unknown): IDotObject;
632
- useMap(value: unknown): IDotObject;
633
- whichForm(value: unknown): IDotObject; // form
634
- width(value: unknown): IDotObject;
657
+ archive(value: AttrVal<string>): IDotObject;
658
+ classId(value: AttrVal<string>): IDotObject;
659
+ codeBase(value: AttrVal<string>): IDotObject;
660
+ codeType(value: AttrVal<string>): IDotObject;
661
+ objectData(value: AttrVal<string>): IDotObject; // alias for data
662
+ declare(value: AttrVal<boolean>): IDotObject;
663
+ height(value: AttrVal<number>): IDotObject;
664
+ name(value: AttrVal<string>): IDotObject;
665
+ standby(value: AttrVal<string>): IDotObject;
666
+ type(value: AttrVal<string>): IDotObject;
667
+ useMap(value: AttrVal<string>): IDotObject;
668
+ width(value: AttrVal<number>): IDotObject;
635
669
  }
636
670
  interface IDotOl extends IDotElementDocument<IDotOl>{
637
- reversed(value: unknown): IDotOl;
638
- start(value: unknown): IDotOl;
671
+ reversed(value: boolean): IDotOl;
672
+ start(value: number): IDotOl;
639
673
  }
640
674
  interface IDotOptGroup extends IDotElementDocument<IDotOptGroup>{
641
- disabled(value: unknown): IDotOptGroup;
675
+ disabled(value: boolean): IDotOptGroup;
642
676
  }
643
677
  interface IDotOption extends IDotElementDocument<IDotOption>{
644
- disabled(value: unknown): IDotOption;
645
- optionLabel(value: unknown): IDotOption; // label
646
- selected(value?: boolean): IDotOption;
647
- value(value: unknown): IDotOption;
678
+ disabled(value: AttrVal<boolean>): IDotOption;
679
+ optionLabel(value: AttrVal<string>): IDotOption; // alias for label
680
+ selected(value: AttrVal<boolean>): IDotOption;
681
+ value(value: AttrVal<string>): IDotOption;
648
682
 
649
683
  // Special functions:
650
684
  // getVal(): string;
651
685
  // setVal(value: unknown): IDotOption;
652
686
  }
653
687
  interface IDotOutput extends IDotElementDocument<IDotOutput>{
654
- for(value: PrimativeOrObservable<string>): IDotOutput;
655
- name(value: PrimativeOrObservable<string>): IDotOutput;
656
- whichForm(value: unknown): IDotOutput; // form
688
+ for(value: AttrVal<string>): IDotOutput;
689
+ name(value: AttrVal<string>): IDotOutput;
690
+ whichForm(value: AttrVal<string>): IDotOutput; // alias for form
657
691
  }
658
692
  interface IDotParam extends IDotElementDocument<IDotParam>{
659
- name(value: unknown): IDotParam;
660
- value(value: unknown): IDotParam;
661
- valueType(value: unknown): IDotParam;
693
+ name(value: AttrVal<string>): IDotParam;
694
+ value(value: AttrVal<string>): IDotParam;
695
+ /** @deprecated Deprecated in HTML5. */
696
+ valueType(value: AttrVal<unknown>): IDotParam;
662
697
  }
663
698
  interface IDotProgress extends IDotElementDocument<IDotProgress>{
664
- max(value: unknown): IDotProgress;
665
- value(value: unknown): IDotProgress;
699
+ max(value: AttrVal<number>): IDotProgress;
700
+ value(value: AttrVal<number>): IDotProgress;
666
701
  }
667
702
  interface IDotQ extends IDotElementDocument<IDotQ>{
668
- quoteCite(value: unknown): IDotQ; // cite
703
+ quoteCite(value: AttrVal<string>): IDotQ; // alias for cite
669
704
  }
670
705
  interface IDotSelect extends IDotElementDocument<IDotSelect>{
671
- autoFocus(value: unknown): IDotSelect;
672
- disabled(value: unknown): IDotSelect;
673
- multiple(value: unknown): IDotSelect;
674
- name(value: unknown): IDotSelect;
675
- required(value: unknown): IDotSelect;
676
- size(value: unknown): IDotSelect;
677
- whichForm(value: unknown): IDotSelect; // form
678
-
679
- // Special functions:
680
- // getVal(): string;
681
- // setVal(value: unknown): IDotSelect;
706
+ autoFocus(value: AttrVal<boolean>): IDotSelect;
707
+ disabled(value: AttrVal<boolean>): IDotSelect;
708
+ multiple(value: AttrVal<boolean>): IDotSelect;
709
+ name(value: AttrVal<string>): IDotSelect;
710
+ required(value: AttrVal<boolean>): IDotSelect;
711
+ size(value: AttrVal<number>): IDotSelect;
712
+ whichForm(value: AttrVal<string>): IDotSelect; // alias for form
713
+ value(value: AttrVal<string>); // Pseudo attribute for convenience.
682
714
  }
683
715
  interface IDotSource extends IDotElementDocument<IDotSource>{
684
- media(value: unknown): IDotSource;
685
- src(value: unknown): IDotSource;
686
- type(value: unknown): IDotSource;
687
- sizes(value: unknown): IDotSource;
688
- src(value: unknown): IDotSource;
689
- srcSet(value: unknown): IDotSource;
690
- type(value: unknown): IDotSource;
716
+ media(value: AttrVal<string>): IDotSource;
717
+ src(value: AttrVal<string>): IDotSource;
718
+ type(value: AttrVal<string>): IDotSource;
719
+ sizes(value: AttrVal<string>): IDotSource;
720
+ src(value: AttrVal<string>): IDotSource;
721
+ srcSet(value: AttrVal<string>): IDotSource;
722
+ type(value: AttrVal<string>): IDotSource;
691
723
  }
692
724
  interface IDotTable extends IDotElementDocument<IDotTable>{
693
725
  /** @deprecated Deprecated in HTML5. Use CSS. */
694
- border(value: unknown): IDotTable;
726
+ border(value: AttrVal<string>|AttrVal<number>): IDotTable;
727
+ /** @deprecated Deprecated in HTML5. Use CSS. */
728
+ cellPadding(value: AttrVal<string>|AttrVal<number>): IDotTable;
695
729
  /** @deprecated Deprecated in HTML5. Use CSS. */
696
- cellPadding(value: unknown): IDotTable;
730
+ cellSpacing(value: AttrVal<string>|AttrVal<number>): IDotTable;
697
731
  /** @deprecated Deprecated in HTML5. Use CSS. */
698
- cellSpacing(value: unknown): IDotTable;
732
+ frame(value: AttrVal<string>|AttrVal<number>): IDotTable;
733
+ /** @deprecated Deprecated in HTML5. */
734
+ height(value: AttrVal<number>): IDotTable;
699
735
  /** @deprecated Deprecated in HTML5. Use CSS. */
700
- frame(value: unknown): IDotTable;
701
- rules(value: unknown): IDotTable;
702
- tableSummary(value: unknown): IDotTable; // summary
736
+ rules(value: AttrVal<string>): IDotTable;
737
+ /** @deprecated Deprecated in HTML5. */
738
+ tableSummary(value: AttrVal<string>): IDotTable; // summary
739
+ /** @deprecated Deprecated in HTML5. */
740
+ width(value: AttrVal<number>): IDotTable;
703
741
  }
704
742
  interface IDotTextArea extends IDotElementDocument<IDotTextArea>{
705
- autoFocus(value: PrimativeOrObservable<boolean>): IDotTextArea;
706
- cols(value: PrimativeOrObservable<number>): IDotTextArea;
707
- dirName(value: PrimativeOrObservable<string>): IDotTextArea;
708
- disabled(value: PrimativeOrObservable<boolean>): IDotTextArea;
709
- maxLength(value: unknown): IDotTextArea;
710
- name(value: string): IDotTextArea;
711
- placeholder(value: unknown): IDotTextArea;
712
- readOnly(value: unknown): IDotTextArea;
713
- required(value: unknown): IDotTextArea;
714
- rows(value: PrimativeOrObservable<number>): IDotTextArea;
715
- whichForm(value: unknown): IDotTextArea; // form
716
- wrap(value: unknown): IDotTextArea;
717
-
718
- // Special functions:
719
- // getVal(): string;
720
- // setVal(value: unknown): IDotTextArea;
743
+ autoCapitalize(value: AttrVal<"none">|AttrVal<"sentences">|AttrVal<"words">|AttrVal<"characters">): IDotTextArea;
744
+ autoFocus(value: AttrVal<boolean>): IDotTextArea;
745
+ cols(value: AttrVal<number>): IDotTextArea;
746
+ dirName(value: AttrVal<string>): IDotTextArea;
747
+ disabled(value: AttrVal<boolean>): IDotTextArea;
748
+ enterKeyHint(value: AttrVal<"enter">|AttrVal<"done">|AttrVal<"go">|AttrVal<"next">|AttrVal<"preveous">|AttrVal<"search">|AttrVal<"send">): IDotTextArea;
749
+ maxLength(value: AttrVal<number>): IDotTextArea;
750
+ name(value: AttrVal<string>): IDotTextArea;
751
+ placeholder(value: AttrVal<string>): IDotTextArea;
752
+ readOnly(value: AttrVal<boolean>): IDotTextArea;
753
+ required(value: AttrVal<boolean>): IDotTextArea;
754
+ rows(value: AttrVal<number>): IDotTextArea;
755
+ whichForm(value: AttrVal<string>): IDotTextArea; // alias for form
756
+ wrap(value: AttrVal<string>): IDotTextArea;
757
+ value(value: AttrVal<string>); // Pseudo attribute for convenience.
721
758
  }
722
759
  interface IDotTBody extends IDotElementDocument<IDotTBody>{
723
760
  /** @deprecated Deprecated in HTML5. Use CSS. */
724
- charOff(value: unknown): IDotTBody;
725
- vAlign(value: unknown): IDotTBody;
761
+ charOff(value: AttrVal<unknown>): IDotTBody;
762
+ /** @deprecated Deprecated in HTML5. Use CSS. */
763
+ vAlign(value: AttrVal<unknown>): IDotTBody;
726
764
  }
727
765
  interface IDotTd extends IDotElementDocument<IDotTd>{
728
766
 
729
767
  /** @deprecated Deprecated in HTML5. Use CSS. */
730
- axis(value: unknown): IDotTd;
768
+ axis(value: AttrVal<string>): IDotTd;
731
769
  /** @deprecated Deprecated in HTML5. Use CSS. */
732
- char(value: unknown): IDotTd;
733
- colSpan(value: unknown): IDotTd;
770
+ char(value: AttrVal<string>): IDotTd;
771
+ colSpan(value: AttrVal<number>): IDotTd;
734
772
  /** @deprecated Deprecated in HTML5. Use CSS. */
735
- charOff(value: unknown): IDotTd;
736
- headers(value: unknown): IDotTd;
773
+ charOff(value: AttrVal<string>): IDotTd;
774
+ headers(value: AttrVal<string>): IDotTd;
737
775
  /** @deprecated Deprecated in HTML5. Use CSS. */
738
- nowrap(value: unknown): IDotTd;
739
- rowSpan(value: unknown): IDotTd;
740
- vAlign(value: unknown): IDotTd;
741
-
776
+ noWrap(value: AttrVal<boolean>): IDotTd;
777
+ rowSpan(value: AttrVal<number>): IDotTd;
778
+ scope(value: AttrVal<string>): IDotTd;
779
+ /** @deprecated Deprecated in HTML5. Use CSS. */
780
+ vAlign(value: AttrVal<string>): IDotTd;
742
781
  }
743
782
  interface IDotTFoot extends IDotElementDocument<IDotTFoot>{
744
783
  /** @deprecated Deprecated in HTML5. Use CSS. */
745
- charOff(value: unknown): IDotTFoot;
746
- vAlign(value: unknown): IDotTFoot;
784
+ charOff(value: AttrVal<number>): IDotTFoot;
785
+ /** @deprecated Deprecated in HTML5. Use CSS. */
786
+ vAlign(value: AttrVal<string>): IDotTFoot;
747
787
  }
748
788
  interface IDotTime extends IDotElementDocument<IDotTime>{
749
- dateTime(value: unknown): IDotTime;
789
+ dateTime(value: AttrVal<string>): IDotTime;
750
790
  }
751
791
  interface IDotTh extends IDotElementDocument<IDotTh>{
752
792
  /** @deprecated Deprecated in HTML5. Use CSS. */
753
- axis(value: unknown): IDotTh;
754
- colSpan(value: unknown): IDotTh;
793
+ axis(value: AttrVal<string>): IDotTh;
794
+ colSpan(value: AttrVal<number>): IDotTh;
795
+ /** @deprecated Deprecated in HTML5. Use CSS. */
796
+ charOff(value: AttrVal<string>): IDotTh;
797
+ headers(value: AttrVal<string>): IDotTh;
798
+ rowSpan(value: AttrVal<number>): IDotTh;
799
+ scope(value: AttrVal<string>): IDotTh;
755
800
  /** @deprecated Deprecated in HTML5. Use CSS. */
756
- charOff(value: unknown): IDotTh;
757
- headers(value: unknown): IDotTh;
758
- rowSpan(value: unknown): IDotTh;
759
- scope(value: unknown): IDotTh;
760
- vAlign(value: unknown): IDotTh;
801
+ vAlign(value: AttrVal<string>): IDotTh;
761
802
  }
762
803
  interface IDotTHead extends IDotElementDocument<IDotTHead>{
763
804
  /** @deprecated Deprecated in HTML5. Use CSS. */
764
- charOff(value: unknown): IDotTHead;
765
- vAlign(value: unknown): IDotTHead;
805
+ charOff(value: AttrVal<string>|AttrVal<number>): IDotTHead;
806
+ /** @deprecated Deprecated in HTML5. Use CSS. */
807
+ vAlign(value: AttrVal<string>): IDotTHead;
766
808
  }
767
809
  interface IDotTr extends IDotElementDocument<IDotTr>{
768
810
  /** @deprecated Deprecated in HTML5. Use CSS. */
769
- charOff(value: unknown): IDotTr;
770
- vAlign(value: unknown): IDotTr;
811
+ charOff(value: AttrVal<string>|AttrVal<number>): IDotTr;
812
+ /** @deprecated Deprecated in HTML5. Use CSS. */
813
+ vAlign(value: AttrVal<string>): IDotTr;
771
814
  }
772
815
  interface IDotTrack extends IDotElementDocument<IDotTrack>{
773
- default(value: unknown): IDotTrack;
774
- kind(value: unknown): IDotTrack;
775
- src(value: unknown): IDotTrack;
776
- srcLang(value: unknown): IDotTrack;
777
- trackLabel(value: unknown): IDotTrack; // label
816
+ default(value: AttrVal<boolean>): IDotTrack;
817
+ kind(value: AttrVal<string>): IDotTrack;
818
+ src(value: AttrVal<string>): IDotTrack;
819
+ srcLang(value: AttrVal<string>): IDotTrack;
820
+ trackLabel(value: AttrVal<string>): IDotTrack; // alias for label
778
821
 
779
822
  // Events:
780
823
  onCueChange(callback: (e: Event)=>void): IDotTrack;
781
824
  }
782
825
  interface IDotVideo extends IDotElementDocument<IDotVideo>{
783
- autoPlay(value: PrimativeOrObservable<boolean>): IDotVideo;
784
- buffered(value: unknown): IDotVideo;
785
- controls(value: PrimativeOrObservable<boolean>): IDotVideo;
786
- height(value: PrimativeOrObservable<number>): IDotVideo;
787
- loop(value: PrimativeOrObservable<boolean>): IDotVideo;
788
- muted(value: PrimativeOrObservable<boolean>): IDotVideo;
789
- poster(value: PrimativeOrObservable<string>): IDotVideo;
790
- preload(value: PrimativeOrObservable<boolean>): IDotVideo;
791
- src(value: PrimativeOrObservable<string>): IDotVideo;
792
- width(value: PrimativeOrObservable<number>): IDotVideo;
826
+ autoPlay(value: AttrVal<boolean>): IDotVideo;
827
+ buffered(value: IObservable<unknown>): IDotVideo; // Managed by browser not user. TODO: we can possibly use events to update observable objects.
828
+ controls(value: AttrVal<boolean>): IDotVideo;
829
+ crossOrigin(value: AttrVal<"anonymous">|AttrVal<"use-credentials">): IDotVideo;
830
+ height(value: AttrVal<number>): IDotVideo;
831
+ loop(value: AttrVal<boolean>): IDotVideo;
832
+ muted(value: AttrVal<boolean>): IDotVideo;
833
+ playsInline(value: AttrVal<boolean>): IDotVideo;
834
+ poster(value: AttrVal<string>): IDotVideo;
835
+ preload(value: AttrVal<"none">|AttrVal<"metadata">|AttrVal<"auto">): IDotVideo;
836
+ src(value: AttrVal<string>): IDotVideo;
837
+ width(value: AttrVal<number>): IDotVideo;
793
838
 
794
839
  // Special functions:
795
840
  pause(): IDotVideo;