amateras 0.2.0 → 0.3.0

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.
Files changed (54) hide show
  1. package/README.md +19 -3
  2. package/ext/css/src/index.ts +102 -45
  3. package/ext/css/src/lib/colorAssign.ts +6 -0
  4. package/ext/css/src/lib/colors/amber.ts +25 -0
  5. package/ext/css/src/lib/colors/blackwhite.ts +13 -0
  6. package/ext/css/src/lib/colors/blue.ts +25 -0
  7. package/ext/css/src/lib/colors/cyan.ts +25 -0
  8. package/ext/css/src/lib/colors/emerald.ts +25 -0
  9. package/ext/css/src/lib/colors/fuchsia.ts +25 -0
  10. package/ext/css/src/lib/colors/gray.ts +25 -0
  11. package/ext/css/src/lib/colors/green.ts +25 -0
  12. package/ext/css/src/lib/colors/indigo.ts +25 -0
  13. package/ext/css/src/lib/colors/lime.ts +25 -0
  14. package/ext/css/src/lib/colors/neutral.ts +25 -0
  15. package/ext/css/src/lib/colors/orange.ts +25 -0
  16. package/ext/css/src/lib/colors/pink.ts +25 -0
  17. package/ext/css/src/lib/colors/purple.ts +25 -0
  18. package/ext/css/src/lib/colors/red.ts +25 -0
  19. package/ext/css/src/lib/colors/rose.ts +25 -0
  20. package/ext/css/src/lib/colors/sky.ts +25 -0
  21. package/ext/css/src/lib/colors/slate.ts +25 -0
  22. package/ext/css/src/lib/colors/stone.ts +25 -0
  23. package/ext/css/src/lib/colors/teal.ts +25 -0
  24. package/ext/css/src/lib/colors/violet.ts +25 -0
  25. package/ext/css/src/lib/colors/yellow.ts +25 -0
  26. package/ext/css/src/lib/colors/zinc.ts +25 -0
  27. package/ext/css/src/lib/colors.ts +23 -0
  28. package/ext/css/src/structure/$CSSKeyframesRule.ts +1 -5
  29. package/ext/css/src/structure/$CSSMediaRule.ts +3 -23
  30. package/ext/css/src/structure/$CSSRule.ts +6 -18
  31. package/ext/css/src/structure/$CSSStyleRule.ts +10 -12
  32. package/ext/html/node/$Anchor.ts +31 -1
  33. package/ext/html/node/$Image.ts +54 -1
  34. package/ext/html/node/$Input.ts +154 -1
  35. package/ext/html/node/$OptGroup.ts +8 -1
  36. package/ext/html/node/$Option.ts +25 -1
  37. package/ext/html/node/$Select.ts +61 -1
  38. package/ext/router/index.ts +6 -4
  39. package/ext/router/node/Route.ts +2 -2
  40. package/ext/router/node/Router.ts +49 -15
  41. package/ext/router/node/RouterAnchor.ts +1 -1
  42. package/ext/ssr/index.ts +4 -4
  43. package/package.json +3 -1
  44. package/src/core.ts +19 -15
  45. package/src/global.ts +4 -0
  46. package/src/lib/assign.ts +4 -3
  47. package/src/lib/assignHelper.ts +1 -1
  48. package/src/lib/native.ts +14 -3
  49. package/src/node/$Element.ts +128 -24
  50. package/src/node/$HTMLElement.ts +70 -1
  51. package/src/node/$Node.ts +101 -30
  52. package/src/node/node.ts +2 -1
  53. package/src/structure/Signal.ts +3 -3
  54. package/ext/css/src/structure/$CSSKeyframeRule.ts +0 -14
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _red = {
4
+ 50: '#fef2f2',
5
+ 100: '#fee2e2',
6
+ 200: '#fecaca',
7
+ 300: '#fca5a5',
8
+ 400: '#f87171',
9
+ 500: '#ef4444',
10
+ 600: '#dc2626',
11
+ 700: '#b91c1c',
12
+ 800: '#991b1b',
13
+ 900: '#7f1d1d',
14
+ 950: '#450a0a',
15
+ } as const;
16
+
17
+ colorAssign('red', _red);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const red: typeof _red;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _rose = {
4
+ 50: '#fff1f2',
5
+ 100: '#ffe4e6',
6
+ 200: '#fecdd3',
7
+ 300: '#fda4af',
8
+ 400: '#fb7185',
9
+ 500: '#f43f5e',
10
+ 600: '#e11d48',
11
+ 700: '#be123c',
12
+ 800: '#9f1239',
13
+ 900: '#881337',
14
+ 950: '#4c0519',
15
+ } as const;
16
+
17
+ colorAssign('rose', _rose);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const rose: typeof _rose;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _sky = {
4
+ 50: '#f0f9ff',
5
+ 100: '#e0f2fe',
6
+ 200: '#bae6fd',
7
+ 300: '#7dd3fc',
8
+ 400: '#38bdf8',
9
+ 500: '#0ea5e9',
10
+ 600: '#0284c7',
11
+ 700: '#0369a1',
12
+ 800: '#075985',
13
+ 900: '#0c4a6e',
14
+ 950: '#082f49',
15
+ } as const;
16
+
17
+ colorAssign('sky', _sky);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const sky: typeof _sky;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _slate = {
4
+ 50: '#f8fafc',
5
+ 100: '#f1f5f9',
6
+ 200: '#e2e8f0',
7
+ 300: '#cbd5e1',
8
+ 400: '#94a3b8',
9
+ 500: '#64748b',
10
+ 600: '#475569',
11
+ 700: '#334155',
12
+ 800: '#1e293b',
13
+ 900: '#0f172a',
14
+ 950: '#020617',
15
+ } as const
16
+
17
+ colorAssign('slate', _slate);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const slate: typeof _slate;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _stone = {
4
+ 50: '#fafaf9',
5
+ 100: '#f5f5f4',
6
+ 200: '#e7e5e4',
7
+ 300: '#d6d3d1',
8
+ 400: '#a8a29e',
9
+ 500: '#78716c',
10
+ 600: '#57534e',
11
+ 700: '#44403c',
12
+ 800: '#292524',
13
+ 900: '#1c1917',
14
+ 950: '#0c0a09',
15
+ } as const;
16
+
17
+ colorAssign('stone', _stone);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const stone: typeof _stone;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _teal = {
4
+ 50: '#f0fdfa',
5
+ 100: '#ccfbf1',
6
+ 200: '#99f6e4',
7
+ 300: '#5eead4',
8
+ 400: '#2dd4bf',
9
+ 500: '#14b8a6',
10
+ 600: '#0d9488',
11
+ 700: '#0f766e',
12
+ 800: '#115e59',
13
+ 900: '#134e4a',
14
+ 950: '#042f2e',
15
+ } as const;
16
+
17
+ colorAssign('teal', _teal);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const teal: typeof _teal;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _violet = {
4
+ 50: '#f5f3ff',
5
+ 100: '#ede9fe',
6
+ 200: '#ddd6fe',
7
+ 300: '#c4b5fd',
8
+ 400: '#a78bfa',
9
+ 500: '#8b5cf6',
10
+ 600: '#7c3aed',
11
+ 700: '#6d28d9',
12
+ 800: '#5b21b6',
13
+ 900: '#4c1d95',
14
+ 950: '#2e1065',
15
+ } as const;
16
+
17
+ colorAssign('violet', _violet);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const violet: typeof _violet;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _yellow = {
4
+ 50: '#fefce8',
5
+ 100: '#fef9c3',
6
+ 200: '#fef08a',
7
+ 300: '#fde047',
8
+ 400: '#facc15',
9
+ 500: '#eab308',
10
+ 600: '#ca8a04',
11
+ 700: '#a16207',
12
+ 800: '#854d0e',
13
+ 900: '#713f12',
14
+ 950: '#422006',
15
+ } as const;
16
+
17
+ colorAssign('yellow', _yellow);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const yellow: typeof _yellow;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import { colorAssign } from "../colorAssign";
2
+
3
+ const _zinc = {
4
+ 50: '#fafafa',
5
+ 100: '#f4f4f5',
6
+ 200: '#e4e4e7',
7
+ 300: '#d4d4d8',
8
+ 400: '#a1a1aa',
9
+ 500: '#71717a',
10
+ 600: '#52525b',
11
+ 700: '#3f3f46',
12
+ 800: '#27272a',
13
+ 900: '#18181b',
14
+ 950: '#09090b',
15
+ } as const;
16
+
17
+ colorAssign('zinc', _zinc);
18
+
19
+ declare module 'amateras/core' {
20
+ export namespace $ {
21
+ export namespace color {
22
+ export const zinc: typeof _zinc;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,23 @@
1
+ import './colors/amber';
2
+ import './colors/blackwhite';
3
+ import './colors/blue';
4
+ import './colors/cyan';
5
+ import './colors/emerald';
6
+ import './colors/fuchsia';
7
+ import './colors/gray';
8
+ import './colors/green';
9
+ import './colors/indigo';
10
+ import './colors/lime';
11
+ import './colors/neutral';
12
+ import './colors/orange';
13
+ import './colors/pink';
14
+ import './colors/purple';
15
+ import './colors/red';
16
+ import './colors/rose';
17
+ import './colors/sky';
18
+ import './colors/slate';
19
+ import './colors/stone';
20
+ import './colors/teal';
21
+ import './colors/violet';
22
+ import './colors/yellow';
23
+ import './colors/zinc';
@@ -4,15 +4,11 @@ import { _Array_from } from "../../../../src/lib/native";
4
4
  export class $CSSKeyframesRule extends $CSSRule {
5
5
  name: string;
6
6
  constructor(name: string) {
7
- super();
7
+ super(`@keyframes ${name}`);
8
8
  this.name = name;
9
9
  }
10
10
 
11
11
  toString(): string {
12
12
  return this.name;
13
13
  }
14
-
15
- get css() {
16
- return `@keyframes ${this.name} { ${_Array_from(this.rules).map(rule => rule.css).join(' ')} }`
17
- }
18
14
  }
@@ -1,30 +1,10 @@
1
1
  import { _Array_from, _instanceof } from "amateras/lib/native";
2
2
  import { $CSSRule } from "#structure/$CSSRule";
3
- import { $CSSStyleRule } from "./$CSSStyleRule";
4
3
 
5
4
  export class $CSSMediaRule extends $CSSRule {
6
5
  condition: string;
7
- constructor(condition: string) {
8
- super();
9
- this.condition = condition;
10
- }
11
-
12
- get css(): string {
13
- function findOwnerMediaRule(rule: $CSSRule, contextRules: $CSSMediaRule[]) {
14
- const ownerRule = rule.ownerRule;
15
- if (!ownerRule) return contextRules;
16
- if (_instanceof(ownerRule, $CSSMediaRule)) return findOwnerMediaRule(ownerRule, [ownerRule, ...contextRules]);
17
- else return findOwnerMediaRule(ownerRule, contextRules);
18
- }
19
-
20
- function findChildRules(rule: $CSSRule, rules: $CSSStyleRule[] = []) {
21
- _Array_from(rule.rules).forEach((_rule => {
22
- if (!_instanceof(_rule, $CSSStyleRule)) return;
23
- rules.push(_rule);
24
- return findChildRules(_rule, rules);
25
- }))
26
- return rules
27
- }
28
- return `@media ${findOwnerMediaRule(this, [this]).map(rule => rule.condition).join(' and ')} { ${findChildRules(this).map(rule => rule.css).join(' ')} }`
6
+ constructor(selector: string) {
7
+ super(selector);
8
+ this.condition = selector.replace('@media ', '');
29
9
  }
30
10
  }
@@ -1,25 +1,13 @@
1
- import { _instanceof } from "amateras/lib/native";
2
- import { $CSSMediaRule } from "#structure/$CSSMediaRule";
1
+ import { _Array_from, _instanceof, _Object_fromEntries } from "amateras/lib/native";
3
2
 
4
3
  export abstract class $CSSRule {
5
4
  rules = new Set<$CSSRule>();
6
- ownerRule: $CSSRule | null = null;
7
- constructor() {}
8
-
9
- abstract get css(): string;
10
-
11
- get mediaRules() {
12
- const rules: $CSSMediaRule[] = []
13
- this.rules.forEach(rule => {
14
- if (_instanceof(rule, $CSSMediaRule)) rules.push(rule);
15
- rules.push(...rule.mediaRules)
16
- })
17
- return rules;
5
+ selector: string;
6
+ constructor(selector: string) {
7
+ this.selector = selector;
18
8
  }
19
9
 
20
- addRule(rule: $CSSRule) {
21
- this.rules.add(rule);
22
- rule.ownerRule = this;
23
- return this;
10
+ get options(): {[key: string]: any} {
11
+ return _Object_fromEntries(_Array_from(this.rules).map(rule => [rule.selector, rule]))
24
12
  }
25
13
  }
@@ -1,23 +1,21 @@
1
1
  import type { $CSSDeclaration } from "#structure/$CSSDeclaration";
2
2
  import { $CSSRule } from "#structure/$CSSRule";
3
- import { _Array_from, _instanceof } from "amateras/lib/native";
3
+ import { _Array_from, _instanceof, _Object_fromEntries } from "amateras/lib/native";
4
4
 
5
5
  export class $CSSStyleRule extends $CSSRule {
6
- context: string[] = [];
7
6
  declarations = new Map<string, $CSSDeclaration>();
8
- className: string = '';
9
- constructor(context: string[] = []) {
10
- super();
11
- this.context = context;
7
+ constructor(selector: string) {
8
+ super(selector);
12
9
  }
13
10
 
14
- get css(): string {
15
- return `${this.selector} { ${_Array_from(this.declarations).map(([_, dec]) => `${dec}`).join(' ')} }`
11
+ clone(selector: string) {
12
+ const rule = new $CSSStyleRule(selector)
13
+ rule.declarations = this.declarations;
14
+ rule.rules = this.rules;
15
+ return rule
16
16
  }
17
17
 
18
- get selector() {
19
- const ctx: string[][] = [];
20
- this.context.forEach((part, i) => ctx.push(part.split(',').map(sel => ctx[i - 1] ? ctx[i - 1]!.map(prefix => `${prefix} ${sel.trim()}`) : [sel.trim()]).flat()))
21
- return ctx.at(-1)?.join(', ')
18
+ get options(): {[key: string]: any} {
19
+ return {..._Object_fromEntries(_Array_from(this.declarations).map(([_, dec]) => [dec.key, dec])), ...super.options}
22
20
  }
23
21
  }
@@ -8,10 +8,40 @@ export class $Anchor extends $HTMLElement<HTMLAnchorElement> {
8
8
  }
9
9
 
10
10
  export interface $Anchor extends $HTMLElement<HTMLAnchorElement> {
11
- href(href: string): this;
11
+ /** {@link HTMLAnchorElement.href} */
12
+ href(href: $Parameter<string>): this;
12
13
  href(): string;
14
+ /** {@link HTMLAnchorElement.hreflang} */
15
+ hreflang(hreflang: $Parameter<string>): this;
16
+ hreflang(): string;
17
+ /** {@link HTMLAnchorElement.download} */
18
+ download(download: $Parameter<string>): this;
19
+ download(): string;
20
+ /** {@link HTMLAnchorElement.ping} */
21
+ ping(ping: $Parameter<string>): this;
22
+ ping(): string;
23
+ /** {@link HTMLAnchorElement.referrerPolicy} */
24
+ referrerPolicy(referrerPolicy: $Parameter<string>): this;
25
+ referrerPolicy(): string;
26
+ /** {@link HTMLAnchorElement.rel} */
27
+ rel(rel: $Parameter<string>): this;
28
+ rel(): string;
29
+ /** {@link HTMLAnchorElement.relList} */
30
+ relList(relList: $Parameter<string>): this;
31
+ relList(): DOMTokenList;
32
+ /** {@link HTMLAnchorElement.target} */
33
+ target(target: $Parameter<AnchorTarget>): this;
34
+ target(): AnchorTarget;
35
+ /** {@link HTMLAnchorElement.text} */
36
+ text(text: $Parameter<string>): this;
37
+ text(): string;
38
+ /** {@link HTMLAnchorElement.type} */
39
+ type(type: $Parameter<string>): this;
40
+ type(): string;
13
41
  }
14
42
 
43
+ export type AnchorTarget = '_self' | '_blank' | '_parent' | '_top' | '_unfenced_top' | '';
44
+
15
45
  declare module '#core' {
16
46
  export function $(nodeName: 'a'): $Anchor
17
47
  }
@@ -8,8 +8,61 @@ export class $Image extends $HTMLElement<HTMLImageElement> {
8
8
  }
9
9
 
10
10
  export interface $Image extends $HTMLElement<HTMLImageElement> {
11
- src(src: string): this;
11
+ /** {@link HTMLImageElement.complete} */
12
+ readonly complete: boolean;
13
+ /** {@link HTMLImageElement.currentSrc} */
14
+ readonly currentSrc: string;
15
+ /** {@link HTMLImageElement.naturalHeight} */
16
+ readonly naturalHeight: number;
17
+ /** {@link HTMLImageElement.naturalWidth} */
18
+ readonly naturalWidth: number;
19
+ /** {@link HTMLImageElement.x} */
20
+ readonly x: number;
21
+ /** {@link HTMLImageElement.y} */
22
+ readonly y: number;
23
+
24
+ /** {@link HTMLImageElement.decode} */
25
+ decode(): Promise<this>;
26
+
27
+ /** {@link HTMLImageElement.alt} */
28
+ alt(alt: $Parameter<string>): this;
29
+ alt(): string;
30
+ /** {@link HTMLImageElement.crossOrigin} */
31
+ crossOrigin(crossOrigin: $Parameter<string | null>): this;
32
+ crossOrigin(): string | null;
33
+ /** {@link HTMLImageElement.decoding} */
34
+ decoding(decoding: $Parameter<"async" | "sync" | "auto">): this;
35
+ decoding(): "async" | "sync" | "auto";
36
+ /** {@link HTMLImageElement.fetchPriority} */
37
+ fetchPriority(fetchPriority: $Parameter<"high" | "low" | "auto">): this;
38
+ fetchPriority(): "high" | "low" | "auto";
39
+ /** {@link HTMLImageElement.height} */
40
+ height(height: $Parameter<number>): this;
41
+ height(): number;
42
+ /** {@link HTMLImageElement.isMap} */
43
+ isMap(isMap: $Parameter<boolean>): this;
44
+ isMap(): boolean;
45
+ /** {@link HTMLImageElement.loading} */
46
+ loading(loading: $Parameter<"eager" | "lazy">): this;
47
+ loading(): "eager" | "lazy";
48
+ /** {@link HTMLImageElement.referrerPolicy} */
49
+ referrerPolicy(referrerPolicy: $Parameter<string>): this;
50
+ referrerPolicy(): string;
51
+ /** {@link HTMLImageElement.sizes} */
52
+ sizes(sizes: $Parameter<string>): this;
53
+ sizes(): string;
54
+ /** {@link HTMLImageElement.src} */
55
+ src(src: $Parameter<string>): this;
12
56
  src(): string;
57
+ /** {@link HTMLImageElement.srcset} */
58
+ srcset(srcset: $Parameter<string>): this;
59
+ srcset(): string;
60
+ /** {@link HTMLImageElement.useMap} */
61
+ useMap(useMap: $Parameter<string>): this;
62
+ useMap(): string;
63
+ /** {@link HTMLImageElement.width} */
64
+ width(width: $Parameter<number>): this;
65
+ width(): number;
13
66
  }
14
67
 
15
68
  assignHelper(HTMLImageElement, $Image, 'img');
@@ -7,7 +7,160 @@ export class $Input extends $HTMLElement<HTMLInputElement> {
7
7
  }
8
8
  }
9
9
 
10
- export interface $Input extends $HTMLElement<HTMLInputElement> {}
10
+ export interface $Input extends $HTMLElement<HTMLInputElement> {
11
+ /** {@link HTMLInputElement.form} */
12
+ readonly form: HTMLFormElement | null;
13
+ /** {@link HTMLInputElement.labels} */
14
+ readonly labels: NodeListOf<HTMLLabelElement> | null;
15
+ /** {@link HTMLInputElement.list} */
16
+ readonly list: HTMLDataListElement | null;
17
+ /** {@link HTMLInputElement.validationMessage} */
18
+ readonly validationMessage: string;
19
+ /** {@link HTMLInputElement.validity} */
20
+ readonly validity: ValidityState;
21
+ /** {@link HTMLInputElement.webkitEntries} */
22
+ readonly webkitEntries: ReadonlyArray<FileSystemEntry>;
23
+ /** {@link HTMLInputElement.willValidate} */
24
+ readonly willValidate: boolean;
25
+
26
+ /** {@link HTMLInputElement.checkValidity} */
27
+ checkValidity(): boolean;
28
+ /** {@link HTMLInputElement.reportValidity} */
29
+ reportValidity(): boolean;
30
+ /** {@link HTMLInputElement.select} */
31
+ select(): this;
32
+ /** {@link HTMLInputElement.setCustomValidity} */
33
+ setCustomValidity(error: string): this;
34
+ /** {@link HTMLInputElement.setRangeText} */
35
+ setRangeText(replacement: string): this;
36
+ setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): this;
37
+ /** {@link HTMLInputElement.setSelectionRange} */
38
+ setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): this;
39
+ /** {@link HTMLInputElement.showPicker} */
40
+ showPicker(): this;
41
+ /** {@link HTMLInputElement.stepDown} */
42
+ stepDown(n?: number): this;
43
+ /** {@link HTMLInputElement.stepUp} */
44
+ stepUp(n?: number): this;
45
+
46
+ /** {@link HTMLInputElement.accept} */
47
+ accept(accept: $Parameter<string>): this;
48
+ accept(): string;
49
+ /** {@link HTMLInputElement.alt} */
50
+ alt(alt: $Parameter<string>): this;
51
+ alt(): string;
52
+ /** {@link HTMLInputElement.autoFill} */
53
+ autoFill(autoFill: $Parameter<AutoFill>): this;
54
+ autoFill(): AutoFill;
55
+ /** {@link HTMLInputElement.capture} */
56
+ capture(capture: $Parameter<string>): this;
57
+ capture(): string;
58
+ /** {@link HTMLInputElement.checked} */
59
+ checked(checked: $Parameter<boolean>): this;
60
+ checked(): boolean;
61
+ /** {@link HTMLInputElement.defaultChecked} */
62
+ defaultChecked(defaultChecked: $Parameter<boolean>): this;
63
+ defaultChecked(): string;
64
+ /** {@link HTMLInputElement.defaultValue} */
65
+ defaultValue(defaultValue: $Parameter<string>): this;
66
+ defaultValue(): string;
67
+ /** {@link HTMLInputElement.dirName} */
68
+ dirName(dirName: $Parameter<string>): this;
69
+ dirName(): string;
70
+ /** {@link HTMLInputElement.disabled} */
71
+ disabled(disabled: $Parameter<boolean>): this;
72
+ disabled(): boolean;
73
+ /** {@link HTMLInputElement.files} */
74
+ files(files: $Parameter<FileList | null>): this;
75
+ files(): string;
76
+ /** {@link HTMLInputElement.formAction} */
77
+ formAction(formAction: $Parameter<string>): this;
78
+ formAction(): string;
79
+ /** {@link HTMLInputElement.formEnctype} */
80
+ formEnctype(formEnctype: $Parameter<string>): this;
81
+ formEnctype(): string;
82
+ /** {@link HTMLInputElement.formMethod} */
83
+ formMethod(formMethod: $Parameter<string>): this;
84
+ formMethod(): string;
85
+ /** {@link HTMLInputElement.formNoValidate} */
86
+ formNoValidate(formNoValidate: $Parameter<boolean>): this;
87
+ formNoValidate(): boolean;
88
+ /** {@link HTMLInputElement.formTarget} */
89
+ formTarget(formTarget: $Parameter<string>): this;
90
+ formTarget(): string;
91
+ /** {@link HTMLInputElement.height} */
92
+ height(height: $Parameter<number>): this;
93
+ height(): number;
94
+ /** {@link HTMLInputElement.indeterminate} */
95
+ indeterminate(indeterminate: $Parameter<boolean>): this;
96
+ indeterminate(): boolean;
97
+ /** {@link HTMLInputElement.max} */
98
+ max(max: $Parameter<string>): this;
99
+ max(): string;
100
+ /** {@link HTMLInputElement.maxLength} */
101
+ maxLength(maxLength: $Parameter<number>): this;
102
+ maxLength(): number;
103
+ /** {@link HTMLInputElement.min} */
104
+ min(min: $Parameter<string>): this;
105
+ min(): string;
106
+ /** {@link HTMLInputElement.minLength} */
107
+ minLength(minLength: $Parameter<string>): this;
108
+ minLength(): string;
109
+ /** {@link HTMLInputElement.multiple} */
110
+ multiple(multiple: $Parameter<boolean>): this;
111
+ multiple(): boolean;
112
+ /** {@link HTMLInputElement.name} */
113
+ name(name: $Parameter<string>): this;
114
+ name(): string;
115
+ /** {@link HTMLInputElement.pattern} */
116
+ pattern(pattern: $Parameter<string>): this;
117
+ pattern(): string;
118
+ /** {@link HTMLInputElement.placeholder} */
119
+ placeholder(placeholder: $Parameter<string>): this;
120
+ placeholder(): string;
121
+ /** {@link HTMLInputElement.readOnly} */
122
+ readOnly(readOnly: $Parameter<boolean>): this;
123
+ readOnly(): boolean;
124
+ /** {@link HTMLInputElement.required} */
125
+ required(required: $Parameter<boolean>): this;
126
+ required(): boolean;
127
+ /** {@link HTMLInputElement.selectionDirection} */
128
+ selectionDirection(selectionDirection: $Parameter<'forward' | 'backward' | 'none' | null>): this;
129
+ selectionDirection(): 'forward' | 'backward' | 'none' | null;
130
+ /** {@link HTMLInputElement.selectionEnd} */
131
+ selectionEnd(selectionEnd: $Parameter<number | null>): this;
132
+ selectionEnd(): number | null;
133
+ /** {@link HTMLInputElement.selectionStart} */
134
+ selectionStart(selectionStart: $Parameter<number>): this;
135
+ selectionStart(): number;
136
+ /** {@link HTMLInputElement.size} */
137
+ size(size: $Parameter<number>): this;
138
+ size(): number;
139
+ /** {@link HTMLInputElement.src} */
140
+ src(src: $Parameter<string>): this;
141
+ src(): string;
142
+ /** {@link HTMLInputElement.step} */
143
+ step(step: $Parameter<string>): this;
144
+ step(): string;
145
+ /** {@link HTMLInputElement.type} */
146
+ type(type: $Parameter<string>): this;
147
+ type(): string;
148
+ /** {@link HTMLInputElement.value} */
149
+ value(value: $Parameter<string>): this;
150
+ value(): string;
151
+ /** {@link HTMLInputElement.valueAsDate} */
152
+ valueAsDate(valueAsDate: $Parameter<Date | null>): this;
153
+ valueAsDate(): Date | null;
154
+ /** {@link HTMLInputElement.valueAsNumber} */
155
+ valueAsNumber(valueAsNumber: $Parameter<number>): this;
156
+ valueAsNumber(): number;
157
+ /** {@link HTMLInputElement.webkitdirectory} */
158
+ webkitdirectory(webkitdirectory: $Parameter<boolean>): this;
159
+ webkitdirectory(): boolean;
160
+ /** {@link HTMLInputElement.width} */
161
+ width(width: $Parameter<number>): this;
162
+ width(): number;
163
+ }
11
164
 
12
165
  assignHelper(HTMLInputElement, $Input, 'input');
13
166
 
@@ -7,7 +7,14 @@ export class $OptGroup extends $HTMLElement<HTMLOptGroupElement> {
7
7
  }
8
8
  }
9
9
 
10
- export interface $OptGroup extends $HTMLElement<HTMLOptGroupElement> {}
10
+ export interface $OptGroup extends $HTMLElement<HTMLOptGroupElement> {
11
+ /** {@link HTMLOptGroupElement.disabled} */
12
+ disabled(disabled: $Parameter<boolean>): this;
13
+ disabled(): boolean;
14
+ /** {@link HTMLOptGroupElement.label} */
15
+ label(label: $Parameter<string>): this;
16
+ label(): string;
17
+ }
11
18
 
12
19
  assignHelper(HTMLOptGroupElement, $OptGroup, 'optgroup');
13
20