@tempots/dom 28.6.1 → 28.6.3

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.
@@ -64,6 +64,7 @@ export declare const html: {
64
64
  dt: (...children: TNode[]) => Renderable;
65
65
  em: (...children: TNode[]) => Renderable;
66
66
  embed: (...children: TNode[]) => Renderable;
67
+ fencedframe: (...children: TNode[]) => Renderable;
67
68
  fieldset: (...children: TNode[]) => Renderable;
68
69
  figcaption: (...children: TNode[]) => Renderable;
69
70
  figure: (...children: TNode[]) => Renderable;
@@ -93,6 +94,7 @@ export declare const html: {
93
94
  main: (...children: TNode[]) => Renderable;
94
95
  map: (...children: TNode[]) => Renderable;
95
96
  mark: (...children: TNode[]) => Renderable;
97
+ menu: (...children: TNode[]) => Renderable;
96
98
  meta: (...children: TNode[]) => Renderable;
97
99
  meter: (...children: TNode[]) => Renderable;
98
100
  nav: (...children: TNode[]) => Renderable;
@@ -105,6 +107,7 @@ export declare const html: {
105
107
  p: (...children: TNode[]) => Renderable;
106
108
  param: (...children: TNode[]) => Renderable;
107
109
  picture: (...children: TNode[]) => Renderable;
110
+ portal: (...children: TNode[]) => Renderable;
108
111
  pre: (...children: TNode[]) => Renderable;
109
112
  progress: (...children: TNode[]) => Renderable;
110
113
  q: (...children: TNode[]) => Renderable;
@@ -114,6 +117,7 @@ export declare const html: {
114
117
  s: (...children: TNode[]) => Renderable;
115
118
  samp: (...children: TNode[]) => Renderable;
116
119
  script: (...children: TNode[]) => Renderable;
120
+ search: (...children: TNode[]) => Renderable;
117
121
  section: (...children: TNode[]) => Renderable;
118
122
  select: (...children: TNode[]) => Renderable;
119
123
  slot: (...children: TNode[]) => Renderable;
@@ -157,26 +161,26 @@ export declare const html: {
157
161
  */
158
162
  export declare const input: {
159
163
  number: (...children: TNode[]) => Renderable;
164
+ date: (...children: TNode[]) => Renderable;
165
+ time: (...children: TNode[]) => Renderable;
160
166
  text: (...children: TNode[]) => Renderable;
161
167
  color: (...children: TNode[]) => Renderable;
162
168
  hidden: (...children: TNode[]) => Renderable;
163
169
  button: (...children: TNode[]) => Renderable;
164
170
  search: (...children: TNode[]) => Renderable;
165
- time: (...children: TNode[]) => Renderable;
166
171
  image: (...children: TNode[]) => Renderable;
167
172
  reset: (...children: TNode[]) => Renderable;
168
173
  submit: (...children: TNode[]) => Renderable;
174
+ tel: (...children: TNode[]) => Renderable;
175
+ email: (...children: TNode[]) => Renderable;
176
+ url: (...children: TNode[]) => Renderable;
169
177
  checkbox: (...children: TNode[]) => Renderable;
170
178
  radio: (...children: TNode[]) => Renderable;
171
179
  file: (...children: TNode[]) => Renderable;
172
180
  password: (...children: TNode[]) => Renderable;
173
- date: (...children: TNode[]) => Renderable;
174
181
  range: (...children: TNode[]) => Renderable;
175
182
  month: (...children: TNode[]) => Renderable;
176
183
  week: (...children: TNode[]) => Renderable;
177
- email: (...children: TNode[]) => Renderable;
178
- tel: (...children: TNode[]) => Renderable;
179
- url: (...children: TNode[]) => Renderable;
180
184
  "datetime-local": (...children: TNode[]) => Renderable;
181
185
  };
182
186
  /**
@@ -246,18 +250,20 @@ export declare const svg: {
246
250
  title: (...children: TNode[]) => Renderable;
247
251
  tspan: (...children: TNode[]) => Renderable;
248
252
  use: (...children: TNode[]) => Renderable;
253
+ view: (...children: TNode[]) => Renderable;
249
254
  };
250
255
  /**
251
256
  * A convenience object to create Renderables for MATH elements.
252
257
  * @public
253
258
  */
254
259
  export declare const math: {
255
- annotation_xml: (...children: TNode[]) => Renderable;
260
+ 'annotation-xml': (...children: TNode[]) => Renderable;
256
261
  annotation: (...children: TNode[]) => Renderable;
257
262
  maction: (...children: TNode[]) => Renderable;
258
263
  maligngroup: (...children: TNode[]) => Renderable;
259
264
  malignmark: (...children: TNode[]) => Renderable;
260
265
  math: (...children: TNode[]) => Renderable;
266
+ menclose: (...children: TNode[]) => Renderable;
261
267
  merror: (...children: TNode[]) => Renderable;
262
268
  mfenced: (...children: TNode[]) => Renderable;
263
269
  mfrac: (...children: TNode[]) => Renderable;
@@ -271,6 +277,7 @@ export declare const math: {
271
277
  mover: (...children: TNode[]) => Renderable;
272
278
  mpadded: (...children: TNode[]) => Renderable;
273
279
  mphantom: (...children: TNode[]) => Renderable;
280
+ mprescripts: (...children: TNode[]) => Renderable;
274
281
  mroot: (...children: TNode[]) => Renderable;
275
282
  mrow: (...children: TNode[]) => Renderable;
276
283
  ms: (...children: TNode[]) => Renderable;
@@ -64,11 +64,15 @@ export declare const OnChecked: (fn: (event: boolean, ctx: DOMContext) => void)
64
64
  */
65
65
  export declare const on: {
66
66
  abort: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
67
+ afterprint: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
67
68
  animationcancel: (handler: (event: AnimationEvent, ctx: DOMContext) => void) => Renderable;
68
69
  animationend: (handler: (event: AnimationEvent, ctx: DOMContext) => void) => Renderable;
69
70
  animationiteration: (handler: (event: AnimationEvent, ctx: DOMContext) => void) => Renderable;
70
71
  animationstart: (handler: (event: AnimationEvent, ctx: DOMContext) => void) => Renderable;
71
72
  auxclick: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
73
+ beforeinput: (handler: (event: InputEvent, ctx: DOMContext) => void) => Renderable;
74
+ beforeprint: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
75
+ beforeunload: (handler: (event: BeforeUnloadEvent, ctx: DOMContext) => void) => Renderable;
72
76
  blur: (handler: (event: FocusEvent, ctx: DOMContext) => void) => Renderable;
73
77
  cancel: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
74
78
  canplay: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
@@ -76,8 +80,13 @@ export declare const on: {
76
80
  change: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
77
81
  click: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
78
82
  close: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
83
+ compositionend: (handler: (event: CompositionEvent, ctx: DOMContext) => void) => Renderable;
84
+ compositionstart: (handler: (event: CompositionEvent, ctx: DOMContext) => void) => Renderable;
85
+ compositionupdate: (handler: (event: CompositionEvent, ctx: DOMContext) => void) => Renderable;
79
86
  contextmenu: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
87
+ copy: (handler: (event: ClipboardEvent, ctx: DOMContext) => void) => Renderable;
80
88
  cuechange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
89
+ cut: (handler: (event: ClipboardEvent, ctx: DOMContext) => void) => Renderable;
81
90
  dblclick: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
82
91
  drag: (handler: (event: DragEvent, ctx: DOMContext) => void) => Renderable;
83
92
  dragend: (handler: (event: DragEvent, ctx: DOMContext) => void) => Renderable;
@@ -94,18 +103,25 @@ export declare const on: {
94
103
  focus: (handler: (event: FocusEvent, ctx: DOMContext) => void) => Renderable;
95
104
  focusin: (handler: (event: FocusEvent, ctx: DOMContext) => void) => Renderable;
96
105
  focusout: (handler: (event: FocusEvent, ctx: DOMContext) => void) => Renderable;
106
+ formdata: (handler: (event: FormDataEvent, ctx: DOMContext) => void) => Renderable;
107
+ fullscreenchange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
108
+ fullscreenerror: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
97
109
  gotpointercapture: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
110
+ hashchange: (handler: (event: HashChangeEvent, ctx: DOMContext) => void) => Renderable;
98
111
  input: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
99
112
  invalid: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
100
113
  keydown: (handler: (event: KeyboardEvent, ctx: DOMContext) => void) => Renderable;
101
114
  keypress: (handler: (event: KeyboardEvent, ctx: DOMContext) => void) => Renderable;
102
115
  keyup: (handler: (event: KeyboardEvent, ctx: DOMContext) => void) => Renderable;
116
+ languagechange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
103
117
  load: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
104
118
  loadeddata: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
105
119
  loadedmetadata: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
106
120
  loadend: (handler: (event: ProgressEvent<EventTarget>, ctx: DOMContext) => void) => Renderable;
107
121
  loadstart: (handler: (event: ProgressEvent<EventTarget>, ctx: DOMContext) => void) => Renderable;
108
122
  lostpointercapture: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
123
+ message: (handler: (event: MessageEvent<any>, ctx: DOMContext) => void) => Renderable;
124
+ messageerror: (handler: (event: MessageEvent<any>, ctx: DOMContext) => void) => Renderable;
109
125
  mousedown: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
110
126
  mouseenter: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
111
127
  mouseleave: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
@@ -113,6 +129,12 @@ export declare const on: {
113
129
  mouseout: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
114
130
  mouseover: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
115
131
  mouseup: (handler: (event: MouseEvent, ctx: DOMContext) => void) => Renderable;
132
+ offline: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
133
+ online: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
134
+ orientationchange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
135
+ pagehide: (handler: (event: PageTransitionEvent, ctx: DOMContext) => void) => Renderable;
136
+ pageshow: (handler: (event: PageTransitionEvent, ctx: DOMContext) => void) => Renderable;
137
+ paste: (handler: (event: ClipboardEvent, ctx: DOMContext) => void) => Renderable;
116
138
  pause: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
117
139
  play: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
118
140
  playing: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
@@ -120,23 +142,32 @@ export declare const on: {
120
142
  pointerdown: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
121
143
  pointerenter: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
122
144
  pointerleave: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
145
+ pointerlockchange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
146
+ pointerlockerror: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
123
147
  pointermove: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
124
148
  pointerout: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
125
149
  pointerover: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
150
+ pointerrawupdate: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
126
151
  pointerup: (handler: (event: PointerEvent, ctx: DOMContext) => void) => Renderable;
152
+ popstate: (handler: (event: PopStateEvent, ctx: DOMContext) => void) => Renderable;
127
153
  progress: (handler: (event: ProgressEvent<EventTarget>, ctx: DOMContext) => void) => Renderable;
128
154
  ratechange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
155
+ readystatechange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
156
+ rejectionhandled: (handler: (event: PromiseRejectionEvent, ctx: DOMContext) => void) => Renderable;
129
157
  reset: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
130
158
  resize: (handler: (event: UIEvent, ctx: DOMContext) => void) => Renderable;
131
159
  scroll: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
160
+ scrollend: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
132
161
  securitypolicyviolation: (handler: (event: SecurityPolicyViolationEvent, ctx: DOMContext) => void) => Renderable;
133
162
  seeked: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
134
163
  seeking: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
135
164
  select: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
136
165
  selectionchange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
137
166
  selectstart: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
167
+ slotchange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
138
168
  stalled: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
139
- submit: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
169
+ storage: (handler: (event: StorageEvent, ctx: DOMContext) => void) => Renderable;
170
+ submit: (handler: (event: SubmitEvent, ctx: DOMContext) => void) => Renderable;
140
171
  suspend: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
141
172
  timeupdate: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
142
173
  toggle: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
@@ -148,8 +179,12 @@ export declare const on: {
148
179
  transitionend: (handler: (event: TransitionEvent, ctx: DOMContext) => void) => Renderable;
149
180
  transitionrun: (handler: (event: TransitionEvent, ctx: DOMContext) => void) => Renderable;
150
181
  transitionstart: (handler: (event: TransitionEvent, ctx: DOMContext) => void) => Renderable;
182
+ unhandledrejection: (handler: (event: PromiseRejectionEvent, ctx: DOMContext) => void) => Renderable;
183
+ unload: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
184
+ visibilitychange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
151
185
  volumechange: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
152
186
  waiting: (handler: (event: Event, ctx: DOMContext) => void) => Renderable;
187
+ wheel: (handler: (event: WheelEvent, ctx: DOMContext) => void) => Renderable;
153
188
  };
154
189
  /**
155
190
  * Creates an event handler that extracts and emits the string value from an input element.
@@ -4,6 +4,8 @@ import { NValue, Renderable } from '../types/domain';
4
4
  * @public
5
5
  */
6
6
  export declare const style: {
7
+ page: (value: NValue<string>) => Renderable;
8
+ grid: (value: NValue<string>) => Renderable;
7
9
  all: (value: NValue<string>) => Renderable;
8
10
  accentColor: (value: NValue<string>) => Renderable;
9
11
  alignContent: (value: NValue<string>) => Renderable;
@@ -190,7 +192,6 @@ export declare const style: {
190
192
  fontWeight: (value: NValue<string>) => Renderable;
191
193
  forcedColorAdjust: (value: NValue<string>) => Renderable;
192
194
  gap: (value: NValue<string>) => Renderable;
193
- grid: (value: NValue<string>) => Renderable;
194
195
  gridArea: (value: NValue<string>) => Renderable;
195
196
  gridAutoColumns: (value: NValue<string>) => Renderable;
196
197
  gridAutoFlow: (value: NValue<string>) => Renderable;
@@ -308,7 +309,6 @@ export declare const style: {
308
309
  paddingLeft: (value: NValue<string>) => Renderable;
309
310
  paddingRight: (value: NValue<string>) => Renderable;
310
311
  paddingTop: (value: NValue<string>) => Renderable;
311
- page: (value: NValue<string>) => Renderable;
312
312
  pageBreakAfter: (value: NValue<string>) => Renderable;
313
313
  pageBreakBefore: (value: NValue<string>) => Renderable;
314
314
  pageBreakInside: (value: NValue<string>) => Renderable;
@@ -1,4 +1,4 @@
1
- import { GetValueType, NValue, RemoveSignals, Values } from '../types/domain';
1
+ import { ValueType, RemoveSignals, Values } from '../types/domain';
2
2
  import { AnySignal, Computed, Prop, Signal } from './signal';
3
3
  import { Value } from './value';
4
4
  /**
@@ -232,7 +232,7 @@ export declare const computedRecord: <T extends Record<string, Value<unknown>>,
232
232
  * @returns - The merged signal.
233
233
  * @public
234
234
  */
235
- export declare const merge: <T extends Record<string, Value<unknown>>>(options: T) => Signal<{ [K in keyof T]: GetValueType<T[K]>; }>;
235
+ export declare const merge: <T extends Record<string, Value<unknown>>>(options: T) => Signal<{ [K in keyof T]: ValueType<T[K]>; }>;
236
236
  /**
237
237
  * Delays the value of a signal by a specified amount of time.
238
238
  *
@@ -253,12 +253,4 @@ export declare const delaySignal: <T>(signal: Signal<T>, ms: number | ((value: T
253
253
  * @public
254
254
  */
255
255
  export declare const bind: <FN extends (...args: any[]) => R, R = ReturnType<FN>>(fn: Value<FN>) => (...args: Values<Parameters<FN>>) => Computed<R>;
256
- /**
257
- * Returns the first non-null and non-undefined value from a set of signals and literals.
258
- *
259
- * @typeParam T - The type of the signals and literals.
260
- * @param args - The set of signals and literals to search.
261
- * @returns - A computed signal that emits the first non-null and non-undefined value.
262
- * @public
263
- */
264
- export declare const coalesce: <T, L extends Array<NValue<T>>, R extends Value<T>>(...args: [...L, R]) => Computed<R>;
256
+ export declare function coalesce<L>(...args: readonly [...unknown[], L]): Computed<ValueType<L>>;
package/std/value.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GetValueTypes } from '../types/domain';
1
+ import { ValueTypes } from '../types/domain';
2
2
  import { ListenerOptions, Prop, Signal } from './signal';
3
3
  /**
4
4
  * Represents a value that can either be a `Signal<T>` or a generic type `T`.
@@ -81,7 +81,7 @@ export declare const Value: {
81
81
  * @returns - The computed signal.
82
82
  * @public
83
83
  */
84
- export declare const computedOf: <T extends Value<unknown>[]>(...args: T) => <O>(fn: (...args: GetValueTypes<T>) => O, equals?: (a: O, b: O) => boolean) => import('./signal').Computed<O>;
84
+ export declare const computedOf: <T extends Value<unknown>[]>(...args: T) => <O>(fn: (...args: ValueTypes<T>) => O, equals?: (a: O, b: O) => boolean) => import('./signal').Computed<O>;
85
85
  /**
86
86
  * Joins a set of signals into a single signal that emits a record of the values.
87
87
  * @param values - The set of signals to join as a record of `Value`s.
@@ -96,4 +96,4 @@ export declare const joinSignals: <T extends Record<string, Value<unknown>>>(val
96
96
  * @returns A disposable object that can be used to stop the effect.
97
97
  * @public
98
98
  */
99
- export declare const effectOf: <T extends Value<unknown>[]>(...args: T) => (fn: (...args: GetValueTypes<T>) => void, options?: ListenerOptions) => () => void;
99
+ export declare const effectOf: <T extends Value<unknown>[]>(...args: T) => (fn: (...args: ValueTypes<T>) => void, options?: ListenerOptions) => () => void;
@@ -7,24 +7,28 @@ export type AriaAttributes = {
7
7
  activedescendant: string;
8
8
  atomic: boolean;
9
9
  autocomplete: 'none' | 'inline' | 'list' | 'both';
10
+ braillelabel: string;
11
+ brailleroledescription: string;
10
12
  busy: boolean;
11
13
  checked: boolean | 'mixed';
12
14
  colcount: number;
13
15
  colindex: number;
16
+ colindextext: string;
14
17
  colspan: number;
15
18
  controls: string;
16
- current: string;
19
+ current: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | string;
17
20
  describedby: string;
21
+ description: string;
18
22
  details: string;
19
23
  disabled: boolean;
20
24
  dropeffect: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup';
21
25
  errormessage: string;
22
- expanded: boolean;
26
+ expanded: boolean | 'undefined';
23
27
  flowto: string;
24
28
  grabbed: boolean;
25
- haspopup: boolean;
26
- hidden: boolean;
27
- invalid: boolean | 'grammar' | 'spelling';
29
+ haspopup: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
30
+ hidden: boolean | 'undefined';
31
+ invalid: boolean | 'false' | 'true' | 'grammar' | 'spelling';
28
32
  keyshortcuts: string;
29
33
  label: string;
30
34
  labelledby: string;
@@ -33,19 +37,20 @@ export type AriaAttributes = {
33
37
  modal: boolean;
34
38
  multiline: boolean;
35
39
  multiselectable: boolean;
36
- orientation: 'horizontal' | 'vertical';
40
+ orientation: 'horizontal' | 'vertical' | 'undefined';
37
41
  owns: string;
38
42
  placeholder: string;
39
43
  posinset: number;
40
- pressed: boolean | 'mixed';
44
+ pressed: boolean | 'mixed' | 'undefined';
41
45
  readonly: boolean;
42
- relevant: 'additions' | 'removals' | 'text' | 'all';
46
+ relevant: 'additions' | 'removals' | 'text' | 'all' | string;
43
47
  required: boolean;
44
48
  roledescription: string;
45
49
  rowcount: number;
46
50
  rowindex: number;
51
+ rowindextext: string;
47
52
  rowspan: number;
48
- selected: boolean;
53
+ selected: boolean | 'undefined';
49
54
  setsize: number;
50
55
  sort: 'none' | 'ascending' | 'descending' | 'other';
51
56
  valuemax: number;
package/types/domain.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { DOMContext } from '../dom/dom-context';
2
- import { Signal } from '../std/signal';
2
+ import { Computed, Prop, Signal } from '../std/signal';
3
3
  import { Value } from '../std/value';
4
4
  /**
5
5
  * A function that renders content into the DOM and returns a cleanup function.
@@ -162,20 +162,25 @@ export type NValue<T> = WithNullish<T> | null | undefined;
162
162
  * Otherwise, it returns the type itself.
163
163
  * @public
164
164
  */
165
- export type GetValueType<T> = T extends Value<infer V> ? V : T;
165
+ export type ValueType<T> = T extends Computed<infer V> ? V : T extends Prop<infer V> ? V : T extends Signal<infer V> ? V : T;
166
+ /**
167
+ * Gets the base value type of a given Value type.
168
+ * @public
169
+ */
170
+ export type BaseValueType<T> = NonNullable<ValueType<T>>;
166
171
  /**
167
172
  * Gets the value types of a given array of Value types.
168
173
  * @public
169
174
  */
170
- export type GetValueTypes<T extends Value<unknown>[]> = {
171
- [K in keyof T]: GetValueType<T[K]>;
175
+ export type ValueTypes<T extends Value<unknown>[]> = {
176
+ [K in keyof T]: ValueType<T[K]>;
172
177
  };
173
178
  /**
174
179
  * Wraps all non-`Value` types in the array in `Value`.
175
180
  * @public
176
181
  */
177
182
  export type Values<T extends unknown[]> = {
178
- [K in keyof T]: T[K] extends Signal<unknown> ? T[K] : Value<T[K]>;
183
+ [K in keyof T]: T[K] extends Signal<unknown> | Computed<unknown> | Prop<unknown> ? T[K] : Value<T[K]>;
179
184
  };
180
185
  /**
181
186
  * Removes signals from a given object type and returns a new object type
@@ -186,6 +191,11 @@ export type Values<T extends unknown[]> = {
186
191
  * @public
187
192
  */
188
193
  export type RemoveSignals<T extends Record<string | number | symbol, Value<unknown>>, K extends (string | number | symbol) & keyof T = keyof T> = {
189
- [k in K]: GetValueType<T[k]>;
194
+ [k in K]: ValueType<T[k]>;
190
195
  };
196
+ /**
197
+ * Represents a value that can be null or undefined.
198
+ * @public
199
+ */
200
+ export type Nil = null | undefined;
191
201
  export {};
@@ -9,13 +9,19 @@ export type HTMLAttributes = {
9
9
  accesskey: string;
10
10
  action: string;
11
11
  align: string;
12
+ allow: string;
13
+ allowfullscreen: boolean;
14
+ allowpaymentrequest: boolean;
12
15
  alt: string;
16
+ as: string;
13
17
  async: boolean;
18
+ autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
14
19
  autocomplete: string;
15
20
  autofocus: boolean;
16
21
  autoplay: boolean;
17
22
  bgcolor: string;
18
23
  border: string;
24
+ capture: boolean | 'user' | 'environment';
19
25
  charset: string;
20
26
  checked: boolean;
21
27
  cite: string;
@@ -24,40 +30,57 @@ export type HTMLAttributes = {
24
30
  cols: number;
25
31
  colspan: number;
26
32
  content: string;
27
- contenteditable: boolean;
33
+ contenteditable: boolean | 'true' | 'false' | 'plaintext-only';
28
34
  controls: string;
29
35
  coords: string;
36
+ crossorigin: 'anonymous' | 'use-credentials' | '';
30
37
  data: string;
31
38
  datetime: string;
39
+ decoding: 'sync' | 'async' | 'auto';
32
40
  default: string;
33
41
  defer: string;
34
- dir: string;
42
+ dir: 'ltr' | 'rtl' | 'auto';
35
43
  dirname: string;
36
44
  disabled: boolean;
37
45
  download: string;
38
- draggable: string;
46
+ draggable: boolean | 'true' | 'false';
39
47
  dropzone: string;
40
48
  enctype: string;
49
+ enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
41
50
  for: string;
42
51
  form: string;
43
52
  formaction: string;
53
+ formenctype: string;
54
+ formmethod: string;
55
+ formnovalidate: boolean;
56
+ formtarget: string;
44
57
  headers: string;
45
58
  height: string;
46
- hidden: 'until-found' | 'hidden' | '';
59
+ hidden: 'until-found' | 'hidden' | '' | boolean;
47
60
  high: string;
48
61
  href: string;
49
62
  hreflang: string;
50
63
  'http-equiv': string;
51
64
  icon: string;
52
65
  id: string;
66
+ imagesizes: string;
67
+ imagesrcset: string;
68
+ inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
69
+ integrity: string;
70
+ is: string;
53
71
  ismap: string;
72
+ itemid: string;
54
73
  itemprop: string;
74
+ itemref: string;
75
+ itemscope: boolean;
76
+ itemtype: string;
55
77
  keytype: string;
56
78
  kind: string;
57
79
  label: string;
58
80
  lang: string;
59
81
  language: string;
60
82
  list: string;
83
+ loading: 'eager' | 'lazy';
61
84
  loop: string;
62
85
  low: string;
63
86
  manifest: string;
@@ -68,17 +91,25 @@ export type HTMLAttributes = {
68
91
  min: number;
69
92
  minlength: number;
70
93
  multiple: boolean;
94
+ muted: boolean;
71
95
  name: string;
96
+ nonce: string;
72
97
  novalidate: string;
73
98
  open: string;
74
99
  optimum: string;
100
+ part: string;
75
101
  pattern: string;
76
102
  ping: string;
77
103
  placeholder: string;
104
+ playsinline: boolean;
105
+ popover: 'auto' | 'manual' | '';
106
+ popovertarget: string;
107
+ popovertargetaction: 'hide' | 'show' | 'toggle';
78
108
  poster: string;
79
109
  preload: string;
80
110
  radiogroup: string;
81
111
  readonly: boolean;
112
+ referrerpolicy: 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
82
113
  rel: string;
83
114
  required: string;
84
115
  reversed: string;
@@ -93,8 +124,9 @@ export type HTMLAttributes = {
93
124
  shape: string;
94
125
  size: number;
95
126
  sizes: string;
127
+ slot: string;
96
128
  span: string;
97
- spellcheck: string;
129
+ spellcheck: boolean | 'true' | 'false';
98
130
  src: string;
99
131
  srcdoc: string;
100
132
  srclang: string;
@@ -105,7 +137,7 @@ export type HTMLAttributes = {
105
137
  tabindex: number;
106
138
  target: string;
107
139
  title: string;
108
- translate: string;
140
+ translate: 'yes' | 'no';
109
141
  type: string;
110
142
  usemap: string;
111
143
  value: string;
@@ -5,11 +5,15 @@
5
5
  */
6
6
  export type HTMLEvents = {
7
7
  abort: Event;
8
+ afterprint: Event;
8
9
  animationcancel: AnimationEvent;
9
10
  animationend: AnimationEvent;
10
11
  animationiteration: AnimationEvent;
11
12
  animationstart: AnimationEvent;
12
13
  auxclick: MouseEvent;
14
+ beforeinput: InputEvent;
15
+ beforeprint: Event;
16
+ beforeunload: BeforeUnloadEvent;
13
17
  blur: FocusEvent;
14
18
  cancel: Event;
15
19
  canplay: Event;
@@ -17,8 +21,13 @@ export type HTMLEvents = {
17
21
  change: Event;
18
22
  click: MouseEvent;
19
23
  close: Event;
24
+ compositionend: CompositionEvent;
25
+ compositionstart: CompositionEvent;
26
+ compositionupdate: CompositionEvent;
20
27
  contextmenu: MouseEvent;
28
+ copy: ClipboardEvent;
21
29
  cuechange: Event;
30
+ cut: ClipboardEvent;
22
31
  dblclick: MouseEvent;
23
32
  drag: DragEvent;
24
33
  dragend: DragEvent;
@@ -35,18 +44,25 @@ export type HTMLEvents = {
35
44
  focus: FocusEvent;
36
45
  focusin: FocusEvent;
37
46
  focusout: FocusEvent;
47
+ formdata: FormDataEvent;
48
+ fullscreenchange: Event;
49
+ fullscreenerror: Event;
38
50
  gotpointercapture: PointerEvent;
51
+ hashchange: HashChangeEvent;
39
52
  input: Event;
40
53
  invalid: Event;
41
54
  keydown: KeyboardEvent;
42
55
  keypress: KeyboardEvent;
43
56
  keyup: KeyboardEvent;
57
+ languagechange: Event;
44
58
  load: Event;
45
59
  loadeddata: Event;
46
60
  loadedmetadata: Event;
47
61
  loadend: ProgressEvent;
48
62
  loadstart: ProgressEvent;
49
63
  lostpointercapture: PointerEvent;
64
+ message: MessageEvent;
65
+ messageerror: MessageEvent;
50
66
  mousedown: MouseEvent;
51
67
  mouseenter: MouseEvent;
52
68
  mouseleave: MouseEvent;
@@ -54,6 +70,12 @@ export type HTMLEvents = {
54
70
  mouseout: MouseEvent;
55
71
  mouseover: MouseEvent;
56
72
  mouseup: MouseEvent;
73
+ offline: Event;
74
+ online: Event;
75
+ orientationchange: Event;
76
+ pagehide: PageTransitionEvent;
77
+ pageshow: PageTransitionEvent;
78
+ paste: ClipboardEvent;
57
79
  pause: Event;
58
80
  play: Event;
59
81
  playing: Event;
@@ -61,23 +83,32 @@ export type HTMLEvents = {
61
83
  pointerdown: PointerEvent;
62
84
  pointerenter: PointerEvent;
63
85
  pointerleave: PointerEvent;
86
+ pointerlockchange: Event;
87
+ pointerlockerror: Event;
64
88
  pointermove: PointerEvent;
65
89
  pointerout: PointerEvent;
66
90
  pointerover: PointerEvent;
91
+ pointerrawupdate: PointerEvent;
67
92
  pointerup: PointerEvent;
93
+ popstate: PopStateEvent;
68
94
  progress: ProgressEvent;
69
95
  ratechange: Event;
96
+ readystatechange: Event;
97
+ rejectionhandled: PromiseRejectionEvent;
70
98
  reset: Event;
71
99
  resize: UIEvent;
72
100
  scroll: Event;
101
+ scrollend: Event;
73
102
  securitypolicyviolation: SecurityPolicyViolationEvent;
74
103
  seeked: Event;
75
104
  seeking: Event;
76
105
  select: Event;
77
106
  selectionchange: Event;
78
107
  selectstart: Event;
108
+ slotchange: Event;
79
109
  stalled: Event;
80
- submit: Event;
110
+ storage: StorageEvent;
111
+ submit: SubmitEvent;
81
112
  suspend: Event;
82
113
  timeupdate: Event;
83
114
  toggle: Event;
@@ -89,6 +120,10 @@ export type HTMLEvents = {
89
120
  transitionend: TransitionEvent;
90
121
  transitionrun: TransitionEvent;
91
122
  transitionstart: TransitionEvent;
123
+ unhandledrejection: PromiseRejectionEvent;
124
+ unload: Event;
125
+ visibilitychange: Event;
92
126
  volumechange: Event;
93
127
  waiting: Event;
128
+ wheel: WheelEvent;
94
129
  };
@@ -20,7 +20,7 @@ export type HTMLTags = {
20
20
  br: HTMLBRElement;
21
21
  button: HTMLButtonElement;
22
22
  canvas: HTMLCanvasElement;
23
- caption: HTMLElement;
23
+ caption: HTMLTableCaptionElement;
24
24
  cite: HTMLElement;
25
25
  code: HTMLElement;
26
26
  col: HTMLTableColElement;
@@ -37,6 +37,7 @@ export type HTMLTags = {
37
37
  dt: HTMLElement;
38
38
  em: HTMLElement;
39
39
  embed: HTMLEmbedElement;
40
+ fencedframe: HTMLElement;
40
41
  fieldset: HTMLFieldSetElement;
41
42
  figcaption: HTMLElement;
42
43
  figure: HTMLElement;
@@ -66,6 +67,7 @@ export type HTMLTags = {
66
67
  main: HTMLElement;
67
68
  map: HTMLMapElement;
68
69
  mark: HTMLElement;
70
+ menu: HTMLMenuElement;
69
71
  meta: HTMLMetaElement;
70
72
  meter: HTMLMeterElement;
71
73
  nav: HTMLElement;
@@ -78,6 +80,7 @@ export type HTMLTags = {
78
80
  p: HTMLParagraphElement;
79
81
  param: HTMLParamElement;
80
82
  picture: HTMLPictureElement;
83
+ portal: HTMLElement;
81
84
  pre: HTMLPreElement;
82
85
  progress: HTMLProgressElement;
83
86
  q: HTMLQuoteElement;
@@ -87,6 +90,7 @@ export type HTMLTags = {
87
90
  s: HTMLElement;
88
91
  samp: HTMLElement;
89
92
  script: HTMLScriptElement;
93
+ search: HTMLElement;
90
94
  section: HTMLElement;
91
95
  select: HTMLSelectElement;
92
96
  slot: HTMLSlotElement;