dothtml-interfaces 0.1.18 → 0.1.20
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 +1 -1
- package/src/i-dot.d.ts +66 -64
package/package.json
CHANGED
package/src/i-dot.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ 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>;
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
14
|
* Global interface containing elements.
|
|
13
15
|
*/
|
|
@@ -301,20 +303,21 @@ export interface IDotElementDocument<T extends IDotDocument> extends IDotDocumen
|
|
|
301
303
|
// /** @deprecated Non-standard attribute. */
|
|
302
304
|
// autoSave(value: unknown): IDotMajor;
|
|
303
305
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
// 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.
|
|
308
|
+
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.
|
|
309
312
|
dropZone(value: "move"|"copy"|"link"): T; // Might not be supported anywhere.
|
|
310
|
-
hidden(value:
|
|
311
|
-
id(value:
|
|
312
|
-
itemProp(value:
|
|
313
|
-
lang(value:
|
|
314
|
-
spellCheck(value:
|
|
313
|
+
hidden(value: PrimativeOrObservable<boolean>): T;
|
|
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
318
|
style(value: string|IDotcssProp): T;
|
|
316
|
-
tabIndex(value:
|
|
317
|
-
title(value:
|
|
319
|
+
tabIndex(value: PrimativeOrObservable<number>): T;
|
|
320
|
+
title(value: PrimativeOrObservable<string>): T;
|
|
318
321
|
|
|
319
322
|
// Events
|
|
320
323
|
|
|
@@ -323,7 +326,6 @@ export interface IDotElementDocument<T extends IDotDocument> extends IDotDocumen
|
|
|
323
326
|
onCut(callback: (e: Event)=>void): T; // global
|
|
324
327
|
onPagePaste(callback: (e: Event)=>void): T; // global
|
|
325
328
|
|
|
326
|
-
// TODO: Really really add:
|
|
327
329
|
onDrag(callback: (e: DragEvent)=>void): T; // global
|
|
328
330
|
onDragEnd(callback: (e: DragEvent)=>void): T; // global
|
|
329
331
|
onDragStart(callback: (e: DragEvent)=>void): T; // global
|
|
@@ -385,15 +387,15 @@ interface IMountedComponent extends IDotDocument{
|
|
|
385
387
|
}
|
|
386
388
|
|
|
387
389
|
interface IDotA extends IDotElementDocument<IDotA>{
|
|
388
|
-
download(value:
|
|
389
|
-
hRef(value:
|
|
390
|
-
hRefLang(value:
|
|
390
|
+
download(value: PrimativeOrObservable<boolean>): IDotA;
|
|
391
|
+
hRef(value: PrimativeOrObservable<string>): IDotA;
|
|
392
|
+
hRefLang(value: PrimativeOrObservable<string>): IDotA;
|
|
391
393
|
media(value: unknown): IDotA;
|
|
392
394
|
ping(value: unknown): IDotA;
|
|
393
|
-
rel(value:
|
|
395
|
+
rel(value: PrimativeOrObservable<string>): IDotA;
|
|
394
396
|
rev(value: unknown): IDotA;
|
|
395
|
-
target(value:
|
|
396
|
-
type(value: unknown): IDotA;
|
|
397
|
+
target(value: PrimativeOrObservable<"_blank"|"_parent"|"_self"|"_top">): IDotA;
|
|
398
|
+
type(value: unknown): IDotA; // This might be fake news.
|
|
397
399
|
}
|
|
398
400
|
interface IDotArea extends IDotElementDocument<IDotArea>{
|
|
399
401
|
alt(value: unknown): IDotArea;
|
|
@@ -402,19 +404,19 @@ interface IDotArea extends IDotElementDocument<IDotArea>{
|
|
|
402
404
|
hRef(value: unknown): IDotArea;
|
|
403
405
|
hRefLang(value: unknown): IDotArea;
|
|
404
406
|
media(value: unknown): IDotArea;
|
|
405
|
-
noHRef(value:
|
|
406
|
-
rel(value: unknown): IDotArea;
|
|
407
|
-
shape(value:
|
|
408
|
-
target(value:
|
|
407
|
+
noHRef(value: PrimativeOrObservable<string>): IDotArea;
|
|
408
|
+
rel(value: unknown): IDotArea; // Fake?
|
|
409
|
+
shape(value: PrimativeOrObservable<string>): IDotArea;
|
|
410
|
+
target(value: PrimativeOrObservable<string>): IDotArea;
|
|
409
411
|
}
|
|
410
412
|
interface IDotAudio extends IDotElementDocument<IDotAudio>{
|
|
411
|
-
autoPlay(value:
|
|
413
|
+
autoPlay(value: PrimativeOrObservable<boolean>): IDotAudio;
|
|
412
414
|
buffered(value: unknown): IDotAudio;
|
|
413
|
-
controls(value:
|
|
414
|
-
loop(value:
|
|
415
|
-
muted(value:
|
|
416
|
-
preload(value:
|
|
417
|
-
src(value:
|
|
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;
|
|
418
420
|
|
|
419
421
|
// Special functions:
|
|
420
422
|
pause(): IDotAudio;
|
|
@@ -541,44 +543,44 @@ interface IDotIFrame extends IDotElementDocument<IDotIFrame>{
|
|
|
541
543
|
width(value: unknown): IDotIFrame;
|
|
542
544
|
}
|
|
543
545
|
interface IDotImg extends IDotElementDocument<IDotImg>{
|
|
544
|
-
alt(value:
|
|
545
|
-
height(value:
|
|
546
|
+
alt(value: PrimativeOrObservable<string>): IDotImg;
|
|
547
|
+
height(value: PrimativeOrObservable<number>): IDotImg;
|
|
546
548
|
/** @deprecated Deprecated in HTML5. Use CSS. */
|
|
547
549
|
hSpace(value: unknown): IDotImg;
|
|
548
550
|
isMap(value: unknown): IDotImg;
|
|
549
551
|
longDesc(value: unknown): IDotImg;
|
|
550
552
|
sizes(value: unknown): IDotImg;
|
|
551
|
-
src(value:
|
|
553
|
+
src(value: PrimativeOrObservable<string>): IDotImg;
|
|
552
554
|
srcSet(value: unknown): IDotImg;
|
|
553
555
|
useMap(value: unknown): IDotImg;
|
|
554
|
-
width(value:
|
|
556
|
+
width(value: PrimativeOrObservable<number>): IDotImg;
|
|
555
557
|
}
|
|
556
558
|
interface IDotInput extends IDotElementDocument<IDotInput>{
|
|
557
559
|
accept(value: unknown): IDotInput;
|
|
558
560
|
alt(value: unknown): IDotInput;
|
|
559
561
|
autoComplete(value: unknown): IDotInput;
|
|
560
562
|
autoFocus(value: unknown): IDotInput;
|
|
561
|
-
checked(value?: boolean): IDotInput;
|
|
562
|
-
dirName(value:
|
|
563
|
-
disabled(value:
|
|
563
|
+
checked(value?: PrimativeOrObservable<boolean>): IDotInput;
|
|
564
|
+
dirName(value: PrimativeOrObservable<string>): IDotInput;
|
|
565
|
+
disabled(value: PrimativeOrObservable<boolean>): IDotInput;
|
|
564
566
|
formAction(value: unknown): IDotInput;
|
|
565
567
|
list(value: unknown): IDotInput;
|
|
566
|
-
max(value:
|
|
567
|
-
maxLength(value:
|
|
568
|
-
min(value:
|
|
568
|
+
max(value: PrimativeOrObservable<number>): IDotInput;
|
|
569
|
+
maxLength(value: PrimativeOrObservable<number>): IDotInput;
|
|
570
|
+
min(value: PrimativeOrObservable<number>): IDotInput;
|
|
569
571
|
multiple(value: unknown): IDotInput;
|
|
570
|
-
name(value:
|
|
571
|
-
pattern(value:
|
|
572
|
+
name(value: PrimativeOrObservable<string>): IDotInput;
|
|
573
|
+
pattern(value: PrimativeOrObservable<string>): IDotInput;
|
|
572
574
|
placeholder(value: unknown): IDotInput;
|
|
573
|
-
readOnly(value:
|
|
574
|
-
required(value:
|
|
575
|
+
readOnly(value: PrimativeOrObservable<boolean>): IDotInput;
|
|
576
|
+
required(value: PrimativeOrObservable<boolean>): IDotInput;
|
|
575
577
|
size(value: unknown): IDotInput;
|
|
576
|
-
src(value:
|
|
578
|
+
src(value: PrimativeOrObservable<string>): IDotInput;
|
|
577
579
|
step(value: unknown): IDotInput;
|
|
578
|
-
type(value:
|
|
580
|
+
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;
|
|
579
581
|
whichForm(value: unknown): IDotInput; // form
|
|
580
|
-
value(value:
|
|
581
|
-
width(value:
|
|
582
|
+
value(value: PrimativeOrObservable<string>): IDotInput;
|
|
583
|
+
width(value: PrimativeOrObservable<number>): IDotInput;
|
|
582
584
|
|
|
583
585
|
// Special functions:
|
|
584
586
|
// getVal(): string
|
|
@@ -649,8 +651,8 @@ interface IDotOption extends IDotElementDocument<IDotOption>{
|
|
|
649
651
|
// setVal(value: unknown): IDotOption;
|
|
650
652
|
}
|
|
651
653
|
interface IDotOutput extends IDotElementDocument<IDotOutput>{
|
|
652
|
-
for(value:
|
|
653
|
-
name(value:
|
|
654
|
+
for(value: PrimativeOrObservable<string>): IDotOutput;
|
|
655
|
+
name(value: PrimativeOrObservable<string>): IDotOutput;
|
|
654
656
|
whichForm(value: unknown): IDotOutput; // form
|
|
655
657
|
}
|
|
656
658
|
interface IDotParam extends IDotElementDocument<IDotParam>{
|
|
@@ -700,16 +702,16 @@ interface IDotTable extends IDotElementDocument<IDotTable>{
|
|
|
700
702
|
tableSummary(value: unknown): IDotTable; // summary
|
|
701
703
|
}
|
|
702
704
|
interface IDotTextArea extends IDotElementDocument<IDotTextArea>{
|
|
703
|
-
autoFocus(value:
|
|
704
|
-
cols(value:
|
|
705
|
-
dirName(value:
|
|
706
|
-
disabled(value:
|
|
705
|
+
autoFocus(value: PrimativeOrObservable<boolean>): IDotTextArea;
|
|
706
|
+
cols(value: PrimativeOrObservable<number>): IDotTextArea;
|
|
707
|
+
dirName(value: PrimativeOrObservable<string>): IDotTextArea;
|
|
708
|
+
disabled(value: PrimativeOrObservable<boolean>): IDotTextArea;
|
|
707
709
|
maxLength(value: unknown): IDotTextArea;
|
|
708
|
-
name(value:
|
|
710
|
+
name(value: string): IDotTextArea;
|
|
709
711
|
placeholder(value: unknown): IDotTextArea;
|
|
710
712
|
readOnly(value: unknown): IDotTextArea;
|
|
711
713
|
required(value: unknown): IDotTextArea;
|
|
712
|
-
rows(value:
|
|
714
|
+
rows(value: PrimativeOrObservable<number>): IDotTextArea;
|
|
713
715
|
whichForm(value: unknown): IDotTextArea; // form
|
|
714
716
|
wrap(value: unknown): IDotTextArea;
|
|
715
717
|
|
|
@@ -778,16 +780,16 @@ interface IDotTrack extends IDotElementDocument<IDotTrack>{
|
|
|
778
780
|
onCueChange(callback: (e: Event)=>void): IDotTrack;
|
|
779
781
|
}
|
|
780
782
|
interface IDotVideo extends IDotElementDocument<IDotVideo>{
|
|
781
|
-
autoPlay(value:
|
|
783
|
+
autoPlay(value: PrimativeOrObservable<boolean>): IDotVideo;
|
|
782
784
|
buffered(value: unknown): IDotVideo;
|
|
783
|
-
controls(value:
|
|
784
|
-
height(value:
|
|
785
|
-
loop(value:
|
|
786
|
-
muted(value:
|
|
787
|
-
poster(value:
|
|
788
|
-
preload(value:
|
|
789
|
-
src(value:
|
|
790
|
-
width(value:
|
|
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;
|
|
791
793
|
|
|
792
794
|
// Special functions:
|
|
793
795
|
pause(): IDotVideo;
|