@tempots/dom 28.6.2 → 29.0.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.
@@ -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,9 +179,47 @@ 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
  };
189
+ /**
190
+ * Options for event handlers.
191
+ *
192
+ * @public
193
+ */
194
+ export type EmitOptions = {
195
+ preventDefault?: boolean;
196
+ stopPropagation?: boolean;
197
+ stopImmediatePropagation?: boolean;
198
+ };
199
+ /**
200
+ * Creates an event handler that calls the provided function with the event as an argument.
201
+ * @param fn - The function to call when the event is triggered.
202
+ * @returns An event handler function that can be used with event listeners.
203
+ * @public
204
+ */
205
+ export declare const emit: (fn: (event: Event) => void, options?: EmitOptions) => (event: Event) => void;
206
+ /**
207
+ * Creates an event handler that extracts and emits the target element from an event.
208
+ *
209
+ * @example
210
+ * ```typescript
211
+ * html.input(
212
+ * on.input(emitTarget((input) => {
213
+ * console.log('Input value:', input.value)
214
+ * }))
215
+ * )
216
+ * ```
217
+ *
218
+ * @param fn - Callback function that receives the target element
219
+ * @returns Event handler function that can be used with event listeners
220
+ * @public
221
+ */
222
+ export declare const emitTarget: <EL extends HTMLElement>(fn: (element: EL, event: Event) => void, options?: EmitOptions) => (event: Event) => void;
154
223
  /**
155
224
  * Creates an event handler that extracts and emits the string value from an input element.
156
225
  *
@@ -185,7 +254,7 @@ export declare const on: {
185
254
  * @returns Event handler function that can be used with event listeners
186
255
  * @public
187
256
  */
188
- export declare const emitValue: (fn: (text: string) => void) => (event: Event) => void;
257
+ export declare const emitValue: (fn: (text: string, event: Event) => void, options?: EmitOptions) => (event: Event) => void;
189
258
  /**
190
259
  * Creates an event handler that extracts and emits the numeric value from an input element.
191
260
  *
@@ -226,35 +295,35 @@ export declare const emitValue: (fn: (text: string) => void) => (event: Event) =
226
295
  * @returns Event handler function that can be used with event listeners
227
296
  * @public
228
297
  */
229
- export declare const emitValueAsNumber: (fn: (num: number) => void) => (event: Event) => void;
298
+ export declare const emitValueAsNumber: (fn: (num: number, event: Event) => void, options?: EmitOptions) => (event: Event) => void;
230
299
  /**
231
300
  * Converts the value of an HTML input element to a Date object and emits it using the provided callback function.
232
301
  * @param fn - The callback function to be called with the converted Date object.
233
302
  * @returns A function that can be used as an event handler for input events.
234
303
  * @public
235
304
  */
236
- export declare const emitValueAsDate: (fn: (date: Date) => void) => (event: Event) => void;
305
+ export declare const emitValueAsDate: (fn: (date: Date, event: Event) => void, options?: EmitOptions) => (event: Event) => void;
237
306
  /**
238
307
  * Converts the value of an HTML input element to a Date object or null and emits it using the provided callback function.
239
308
  * @param fn - The callback function to be called with the converted Date object or null.
240
309
  * @returns A function that can be used as an event handler for input events.
241
310
  * @public
242
311
  */
243
- export declare const emitValueAsNullableDate: (fn: (date: Date | null) => void) => (event: Event) => void;
312
+ export declare const emitValueAsNullableDate: (fn: (date: Date | null, event: Event) => void, options?: EmitOptions) => (event: Event) => void;
244
313
  /**
245
314
  * Emits the value of an HTMLInputElement as a Date object.
246
315
  * @param fn - The callback function to be called with the emitted Date object.
247
316
  * @returns The event handler function.
248
317
  * @public
249
318
  */
250
- export declare const emitValueAsDateTime: (fn: (date: Date) => void) => (event: Event) => void;
319
+ export declare const emitValueAsDateTime: (fn: (date: Date, event: Event) => void, options?: EmitOptions) => (event: Event) => void;
251
320
  /**
252
321
  * Emits the value of an HTMLInputElement as a Date object or null.
253
322
  * @param fn - The callback function to be called with the emitted Date object or null.
254
323
  * @returns The event handler function.
255
324
  * @public
256
325
  */
257
- export declare const emitValueAsNullableDateTime: (fn: (date: Date | null) => void) => (event: Event) => void;
326
+ export declare const emitValueAsNullableDateTime: (fn: (date: Date | null, event: Event) => void, options?: EmitOptions) => (event: Event) => void;
258
327
  /**
259
328
  * Creates an event handler that extracts and emits the checked state from a checkbox or radio input.
260
329
  *
@@ -307,25 +376,4 @@ export declare const emitValueAsNullableDateTime: (fn: (date: Date | null) => vo
307
376
  * @returns Event handler function that can be used with event listeners
308
377
  * @public
309
378
  */
310
- export declare const emitChecked: (fn: (checked: boolean) => void) => (event: Event) => void;
311
- /**
312
- * Wraps a function to prevent the default behavior of an event before invoking it.
313
- * @param fn - The function to be wrapped.
314
- * @returns A new function that prevents the default behavior of the event and then invokes the original function.
315
- * @public
316
- */
317
- export declare const emitPreventDefault: (fn: () => void) => (event: Event) => void;
318
- /**
319
- * Creates a new event handler that stops event propagation and invokes the provided function.
320
- * @param fn - The function to be invoked when the event is triggered.
321
- * @returns A new event handler function.
322
- * @public
323
- */
324
- export declare const emitStopPropagation: (fn: () => void) => (event: Event) => void;
325
- /**
326
- * Creates an event handler that stops immediate propagation of the event and invokes the provided function.
327
- * @param fn - The function to be invoked.
328
- * @returns The event handler function.
329
- * @public
330
- */
331
- export declare const emitStopImmediatePropagation: (fn: () => void) => (event: Event) => void;
379
+ export declare const emitChecked: (fn: (checked: boolean, event: Event) => void, options?: EmitOptions) => (event: Event) => void;
@@ -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;
@@ -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 { Computed, Prop, Signal } from '../std/signal';
2
+ import { AnySignal, 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.
@@ -149,13 +149,14 @@ export type Size = {
149
149
  */
150
150
  readonly height: number;
151
151
  };
152
- type WithNullish<X> = Value<X> | Value<X | null> | Value<X | undefined> | Value<X | null | undefined>;
153
152
  /**
154
153
  * Represents a nullable value or a signal of a nullable value.
155
154
  * @typeParam T - The type of the value.
156
155
  * @public
157
156
  */
158
- export type NValue<T> = WithNullish<T> | null | undefined;
157
+ export type NValue<T> = Value<NonNullable<T>> | AnySignal<T> | AnySignal<T | null> | AnySignal<T | undefined> | AnySignal<T | null | undefined> | null | undefined;
158
+ type TupleToUnion<T extends unknown[]> = T[number];
159
+ export type SplitNValue<T> = (T extends unknown ? TupleToUnion<NValue<T>[]> : never) | NValue<T>;
159
160
  /**
160
161
  * Gets the value type of a given Value type.
161
162
  * If the type is a `Signal`, it returns the inferred value type.
@@ -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
  };