@derivesome/tree-web 0.1.1

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 (73) hide show
  1. package/.package.json.~undo-tree~ +10 -0
  2. package/.tsconfig.json.~undo-tree~ +6 -0
  3. package/dist/cjs/css.d.ts +5 -0
  4. package/dist/cjs/css.d.ts.map +1 -0
  5. package/dist/cjs/css.js +14 -0
  6. package/dist/cjs/css.js.map +1 -0
  7. package/dist/cjs/index.d.ts +5 -0
  8. package/dist/cjs/index.d.ts.map +1 -0
  9. package/dist/cjs/index.js +21 -0
  10. package/dist/cjs/index.js.map +1 -0
  11. package/dist/cjs/jsx-globals.d.ts +826 -0
  12. package/dist/cjs/jsx-globals.d.ts.map +1 -0
  13. package/dist/cjs/jsx-globals.js +18 -0
  14. package/dist/cjs/jsx-globals.js.map +1 -0
  15. package/dist/cjs/mount.d.ts +2 -0
  16. package/dist/cjs/mount.d.ts.map +1 -0
  17. package/dist/cjs/mount.js +9 -0
  18. package/dist/cjs/mount.js.map +1 -0
  19. package/dist/cjs/renderer.d.ts +3 -0
  20. package/dist/cjs/renderer.d.ts.map +1 -0
  21. package/dist/cjs/renderer.js +123 -0
  22. package/dist/cjs/renderer.js.map +1 -0
  23. package/dist/esm/css.d.ts +5 -0
  24. package/dist/esm/css.d.ts.map +1 -0
  25. package/dist/esm/css.js +14 -0
  26. package/dist/esm/css.js.map +1 -0
  27. package/dist/esm/index.d.ts +5 -0
  28. package/dist/esm/index.d.ts.map +1 -0
  29. package/dist/esm/index.js +21 -0
  30. package/dist/esm/index.js.map +1 -0
  31. package/dist/esm/jsx-globals.d.ts +826 -0
  32. package/dist/esm/jsx-globals.d.ts.map +1 -0
  33. package/dist/esm/jsx-globals.js +18 -0
  34. package/dist/esm/jsx-globals.js.map +1 -0
  35. package/dist/esm/mount.d.ts +2 -0
  36. package/dist/esm/mount.d.ts.map +1 -0
  37. package/dist/esm/mount.js +9 -0
  38. package/dist/esm/mount.js.map +1 -0
  39. package/dist/esm/renderer.d.ts +3 -0
  40. package/dist/esm/renderer.d.ts.map +1 -0
  41. package/dist/esm/renderer.js +123 -0
  42. package/dist/esm/renderer.js.map +1 -0
  43. package/package.json +47 -0
  44. package/package.json~ +53 -0
  45. package/src/.context.ts.~undo-tree~ +6 -0
  46. package/src/.css.ts.~undo-tree~ +6 -0
  47. package/src/.index.ts.~undo-tree~ +8 -0
  48. package/src/.jsx-globals.ts.~undo-tree~ +192 -0
  49. package/src/.jsx-types.ts.~undo-tree~ +23 -0
  50. package/src/.mount.test.ts.~undo-tree~ +438 -0
  51. package/src/.mount.ts.~undo-tree~ +16 -0
  52. package/src/.renderer.ts.~undo-tree~ +96 -0
  53. package/src/.tree.ts.~undo-tree~ +489 -0
  54. package/src/.velement.ts.~undo-tree~ +1738 -0
  55. package/src/context.ts~ +0 -0
  56. package/src/css.ts +13 -0
  57. package/src/css.ts~ +13 -0
  58. package/src/index.ts +4 -0
  59. package/src/index.ts~ +4 -0
  60. package/src/jsx-globals.ts +861 -0
  61. package/src/jsx-globals.ts~ +854 -0
  62. package/src/jsx-types.ts~ +772 -0
  63. package/src/mount.test.ts~ +375 -0
  64. package/src/mount.ts +6 -0
  65. package/src/mount.ts~ +10 -0
  66. package/src/renderer.ts +133 -0
  67. package/src/renderer.ts~ +133 -0
  68. package/src/tree.ts~ +212 -0
  69. package/src/velement.ts~ +856 -0
  70. package/tsconfig.cjs.json +10 -0
  71. package/tsconfig.esm.json +10 -0
  72. package/tsconfig.json +23 -0
  73. package/tsconfig.json~ +23 -0
@@ -0,0 +1,826 @@
1
+ /**
2
+ * JSX type definitions and global ambient declarations for @derivesome/tree-web.
3
+ *
4
+ * A prop value can be:
5
+ * - Static: T
6
+ * - Reactive: Reference<T> (from @derivesome/core)
7
+ * - Computed: () => T
8
+ *
9
+ * Event handler props (onClick, onInput, …) are always static functions and
10
+ * are NOT wrapped in Reactive<T>.
11
+ */
12
+ import { Component, createNode, TreeNodeProps, type TreeNode } from "@derivesome/tree";
13
+ import { Derived, Reference } from "@derivesome/core";
14
+ import { CSSProperties } from "./css";
15
+ /**
16
+ * A prop value that may be static, a reactive reference, or a computed function.
17
+ *
18
+ * Uses `ReadonlyReference<T>` (bivariant `observe`, covariant `get`/`peek`) rather than
19
+ * `Reference<T>` (invariant due to `set`) so that e.g. `ref(0)` (`Reference<number>`) is
20
+ * accepted wherever `Reactive<string | number>` is expected.
21
+ */
22
+ export type Reactive<T> = T | Reference<T> | Derived<T> | (() => T);
23
+ export type Child = unknown | TreeNode | TreeNode[];
24
+ export interface DOMEventHandlers<Target = HTMLElement> {
25
+ onClick?: (e: MouseEvent & {
26
+ target: Target;
27
+ }) => void;
28
+ onDblClick?: (e: MouseEvent & {
29
+ target: Target;
30
+ }) => void;
31
+ onMouseDown?: (e: MouseEvent & {
32
+ target: Target;
33
+ }) => void;
34
+ onMouseUp?: (e: MouseEvent & {
35
+ target: Target;
36
+ }) => void;
37
+ onMouseMove?: (e: MouseEvent & {
38
+ target: Target;
39
+ }) => void;
40
+ onMouseEnter?: (e: MouseEvent & {
41
+ target: Target;
42
+ }) => void;
43
+ onMouseLeave?: (e: MouseEvent & {
44
+ target: Target;
45
+ }) => void;
46
+ onMouseOver?: (e: MouseEvent & {
47
+ target: Target;
48
+ }) => void;
49
+ onMouseOut?: (e: MouseEvent & {
50
+ target: Target;
51
+ }) => void;
52
+ onContextMenu?: (e: MouseEvent & {
53
+ target: Target;
54
+ }) => void;
55
+ onKeyDown?: (e: KeyboardEvent & {
56
+ target: Target;
57
+ }) => void;
58
+ onKeyUp?: (e: KeyboardEvent & {
59
+ target: Target;
60
+ }) => void;
61
+ onKeyPress?: (e: KeyboardEvent & {
62
+ target: Target;
63
+ }) => void;
64
+ onInput?: (e: InputEvent & {
65
+ target: Target;
66
+ }) => void;
67
+ onChange?: (e: Event & {
68
+ target: Target;
69
+ }) => void;
70
+ onSubmit?: (e: SubmitEvent & {
71
+ target: Target;
72
+ }) => void;
73
+ onReset?: (e: Event & {
74
+ target: Target;
75
+ }) => void;
76
+ onFocus?: (e: FocusEvent & {
77
+ target: Target;
78
+ }) => void;
79
+ onBlur?: (e: FocusEvent & {
80
+ target: Target;
81
+ }) => void;
82
+ onSelect?: (e: Event & {
83
+ target: Target;
84
+ }) => void;
85
+ onPointerDown?: (e: PointerEvent & {
86
+ target: Target;
87
+ }) => void;
88
+ onPointerUp?: (e: PointerEvent & {
89
+ target: Target;
90
+ }) => void;
91
+ onPointerMove?: (e: PointerEvent & {
92
+ target: Target;
93
+ }) => void;
94
+ onPointerEnter?: (e: PointerEvent & {
95
+ target: Target;
96
+ }) => void;
97
+ onPointerLeave?: (e: PointerEvent & {
98
+ target: Target;
99
+ }) => void;
100
+ onPointerCancel?: (e: PointerEvent & {
101
+ target: Target;
102
+ }) => void;
103
+ onPointerOver?: (e: PointerEvent & {
104
+ target: Target;
105
+ }) => void;
106
+ onPointerOut?: (e: PointerEvent & {
107
+ target: Target;
108
+ }) => void;
109
+ onGotPointerCapture?: (e: PointerEvent & {
110
+ target: Target;
111
+ }) => void;
112
+ onLostPointerCapture?: (e: PointerEvent & {
113
+ target: Target;
114
+ }) => void;
115
+ onTouchStart?: (e: TouchEvent & {
116
+ target: Target;
117
+ }) => void;
118
+ onTouchEnd?: (e: TouchEvent & {
119
+ target: Target;
120
+ }) => void;
121
+ onTouchMove?: (e: TouchEvent & {
122
+ target: Target;
123
+ }) => void;
124
+ onTouchCancel?: (e: TouchEvent & {
125
+ target: Target;
126
+ }) => void;
127
+ onWheel?: (e: WheelEvent & {
128
+ target: Target;
129
+ }) => void;
130
+ onScroll?: (e: Event & {
131
+ target: Target;
132
+ }) => void;
133
+ onScrollEnd?: (e: Event & {
134
+ target: Target;
135
+ }) => void;
136
+ onCopy?: (e: ClipboardEvent & {
137
+ target: Target;
138
+ }) => void;
139
+ onCut?: (e: ClipboardEvent & {
140
+ target: Target;
141
+ }) => void;
142
+ onPaste?: (e: ClipboardEvent & {
143
+ target: Target;
144
+ }) => void;
145
+ onDrag?: (e: DragEvent & {
146
+ target: Target;
147
+ }) => void;
148
+ onDragStart?: (e: DragEvent & {
149
+ target: Target;
150
+ }) => void;
151
+ onDragEnd?: (e: DragEvent & {
152
+ target: Target;
153
+ }) => void;
154
+ onDragEnter?: (e: DragEvent & {
155
+ target: Target;
156
+ }) => void;
157
+ onDragOver?: (e: DragEvent & {
158
+ target: Target;
159
+ }) => void;
160
+ onDragLeave?: (e: DragEvent & {
161
+ target: Target;
162
+ }) => void;
163
+ onDrop?: (e: DragEvent & {
164
+ target: Target;
165
+ }) => void;
166
+ onAnimationStart?: (e: AnimationEvent & {
167
+ target: Target;
168
+ }) => void;
169
+ onAnimationEnd?: (e: AnimationEvent & {
170
+ target: Target;
171
+ }) => void;
172
+ onAnimationIteration?: (e: AnimationEvent & {
173
+ target: Target;
174
+ }) => void;
175
+ onAnimationCancel?: (e: AnimationEvent & {
176
+ target: Target;
177
+ }) => void;
178
+ onTransitionStart?: (e: TransitionEvent & {
179
+ target: Target;
180
+ }) => void;
181
+ onTransitionEnd?: (e: TransitionEvent & {
182
+ target: Target;
183
+ }) => void;
184
+ onTransitionCancel?: (e: TransitionEvent & {
185
+ target: Target;
186
+ }) => void;
187
+ onLoad?: (e: Event & {
188
+ target: Target;
189
+ }) => void;
190
+ onError?: (e: Event & {
191
+ target: Target;
192
+ }) => void;
193
+ onAbort?: (e: Event & {
194
+ target: Target;
195
+ }) => void;
196
+ onResize?: (e: UIEvent & {
197
+ target: Target;
198
+ }) => void;
199
+ onBeforeInput?: (e: InputEvent & {
200
+ target: Target;
201
+ }) => void;
202
+ onCompositionStart?: (e: CompositionEvent & {
203
+ target: Target;
204
+ }) => void;
205
+ onCompositionUpdate?: (e: CompositionEvent & {
206
+ target: Target;
207
+ }) => void;
208
+ onCompositionEnd?: (e: CompositionEvent & {
209
+ target: Target;
210
+ }) => void;
211
+ }
212
+ export interface HTMLAttributes<Target = HTMLElement> extends DOMEventHandlers<Target> {
213
+ /** Child nodes passed between JSX tags. */
214
+ children?: Child;
215
+ /** Reconciliation key for list rendering. */
216
+ key?: string | number;
217
+ /** Callback ref — called with the DOM element after it is inserted into the parent. */
218
+ ref?: (el: Element) => void;
219
+ id?: Reactive<string>;
220
+ class?: Reactive<string>;
221
+ className?: Reactive<string>;
222
+ style?: Reactive<string | CSSProperties>;
223
+ title?: Reactive<string>;
224
+ lang?: Reactive<string>;
225
+ dir?: Reactive<"ltr" | "rtl" | "auto">;
226
+ tabIndex?: Reactive<number>;
227
+ hidden?: Reactive<boolean>;
228
+ draggable?: Reactive<boolean | "true" | "false">;
229
+ spellCheck?: Reactive<boolean>;
230
+ translate?: Reactive<"yes" | "no">;
231
+ contentEditable?: Reactive<boolean | "true" | "false" | "inherit" | "plaintext-only">;
232
+ slot?: Reactive<string>;
233
+ part?: Reactive<string>;
234
+ exportparts?: Reactive<string>;
235
+ role?: Reactive<string>;
236
+ "aria-label"?: Reactive<string>;
237
+ "aria-labelledby"?: Reactive<string>;
238
+ "aria-describedby"?: Reactive<string>;
239
+ "aria-details"?: Reactive<string>;
240
+ "aria-hidden"?: Reactive<boolean | "true" | "false">;
241
+ "aria-expanded"?: Reactive<boolean | "true" | "false">;
242
+ "aria-checked"?: Reactive<boolean | "true" | "false" | "mixed">;
243
+ "aria-selected"?: Reactive<boolean | "true" | "false">;
244
+ "aria-disabled"?: Reactive<boolean | "true" | "false">;
245
+ "aria-required"?: Reactive<boolean | "true" | "false">;
246
+ "aria-readonly"?: Reactive<boolean | "true" | "false">;
247
+ "aria-invalid"?: Reactive<boolean | "true" | "false" | "grammar" | "spelling">;
248
+ "aria-current"?: Reactive<boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time">;
249
+ "aria-live"?: Reactive<"off" | "assertive" | "polite">;
250
+ "aria-atomic"?: Reactive<boolean | "true" | "false">;
251
+ "aria-relevant"?: Reactive<"additions" | "additions text" | "all" | "removals" | "text">;
252
+ "aria-busy"?: Reactive<boolean | "true" | "false">;
253
+ "aria-controls"?: Reactive<string>;
254
+ "aria-owns"?: Reactive<string>;
255
+ "aria-flowto"?: Reactive<string>;
256
+ "aria-activedescendant"?: Reactive<string>;
257
+ "aria-colcount"?: Reactive<number>;
258
+ "aria-colindex"?: Reactive<number>;
259
+ "aria-colspan"?: Reactive<number>;
260
+ "aria-rowcount"?: Reactive<number>;
261
+ "aria-rowindex"?: Reactive<number>;
262
+ "aria-rowspan"?: Reactive<number>;
263
+ "aria-posinset"?: Reactive<number>;
264
+ "aria-setsize"?: Reactive<number>;
265
+ "aria-level"?: Reactive<number>;
266
+ "aria-multiline"?: Reactive<boolean | "true" | "false">;
267
+ "aria-multiselectable"?: Reactive<boolean | "true" | "false">;
268
+ "aria-orientation"?: Reactive<"horizontal" | "vertical">;
269
+ "aria-haspopup"?: Reactive<boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog">;
270
+ "aria-sort"?: Reactive<"none" | "ascending" | "descending" | "other">;
271
+ "aria-valuemin"?: Reactive<number>;
272
+ "aria-valuemax"?: Reactive<number>;
273
+ "aria-valuenow"?: Reactive<number>;
274
+ "aria-valuetext"?: Reactive<string>;
275
+ "aria-autocomplete"?: Reactive<"none" | "inline" | "list" | "both">;
276
+ "aria-keyshortcuts"?: Reactive<string>;
277
+ "aria-roledescription"?: Reactive<string>;
278
+ "aria-placeholder"?: Reactive<string>;
279
+ [key: `data-${string}`]: Reactive<string | number | boolean | undefined>;
280
+ }
281
+ export interface AnchorAttributes extends HTMLAttributes<HTMLAnchorElement> {
282
+ href?: Reactive<string>;
283
+ target?: Reactive<"_blank" | "_self" | "_parent" | "_top" | (string & {})>;
284
+ rel?: Reactive<string>;
285
+ download?: Reactive<string | boolean>;
286
+ hrefLang?: Reactive<string>;
287
+ type?: Reactive<string>;
288
+ ping?: Reactive<string>;
289
+ referrerPolicy?: Reactive<ReferrerPolicy>;
290
+ }
291
+ export interface ButtonAttributes extends HTMLAttributes<HTMLButtonElement> {
292
+ type?: Reactive<"button" | "submit" | "reset">;
293
+ disabled?: Reactive<boolean>;
294
+ name?: Reactive<string>;
295
+ value?: Reactive<string>;
296
+ form?: Reactive<string>;
297
+ formAction?: Reactive<string>;
298
+ formMethod?: Reactive<"get" | "post">;
299
+ formEncType?: Reactive<string>;
300
+ formNoValidate?: Reactive<boolean>;
301
+ formTarget?: Reactive<string>;
302
+ autoFocus?: Reactive<boolean>;
303
+ popoverTarget?: Reactive<string>;
304
+ popoverTargetAction?: Reactive<"show" | "hide" | "toggle">;
305
+ }
306
+ export interface InputAttributes extends HTMLAttributes<HTMLInputElement> {
307
+ type?: Reactive<"text" | "password" | "email" | "number" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "file" | "checkbox" | "radio" | "range" | "hidden" | "submit" | "reset" | "button" | "image">;
308
+ value?: Reactive<string | number>;
309
+ defaultValue?: Reactive<string | number>;
310
+ checked?: Reactive<boolean>;
311
+ defaultChecked?: Reactive<boolean>;
312
+ placeholder?: Reactive<string>;
313
+ disabled?: Reactive<boolean>;
314
+ readOnly?: Reactive<boolean>;
315
+ required?: Reactive<boolean>;
316
+ multiple?: Reactive<boolean>;
317
+ min?: Reactive<string | number>;
318
+ max?: Reactive<string | number>;
319
+ step?: Reactive<string | number>;
320
+ minLength?: Reactive<number>;
321
+ maxLength?: Reactive<number>;
322
+ accept?: Reactive<string>;
323
+ autoComplete?: Reactive<string>;
324
+ autoFocus?: Reactive<boolean>;
325
+ name?: Reactive<string>;
326
+ pattern?: Reactive<string>;
327
+ size?: Reactive<number>;
328
+ src?: Reactive<string>;
329
+ width?: Reactive<number | string>;
330
+ height?: Reactive<number | string>;
331
+ list?: Reactive<string>;
332
+ form?: Reactive<string>;
333
+ capture?: Reactive<"user" | "environment">;
334
+ indeterminate?: Reactive<boolean>;
335
+ }
336
+ export interface SelectAttributes extends HTMLAttributes<HTMLSelectElement> {
337
+ value?: Reactive<string | number | string[]>;
338
+ defaultValue?: Reactive<string | number | string[]>;
339
+ disabled?: Reactive<boolean>;
340
+ multiple?: Reactive<boolean>;
341
+ name?: Reactive<string>;
342
+ required?: Reactive<boolean>;
343
+ size?: Reactive<number>;
344
+ autoFocus?: Reactive<boolean>;
345
+ form?: Reactive<string>;
346
+ }
347
+ export interface TextareaAttributes extends HTMLAttributes<HTMLTextAreaElement> {
348
+ value?: Reactive<string>;
349
+ defaultValue?: Reactive<string>;
350
+ disabled?: Reactive<boolean>;
351
+ readOnly?: Reactive<boolean>;
352
+ required?: Reactive<boolean>;
353
+ placeholder?: Reactive<string>;
354
+ rows?: Reactive<number>;
355
+ cols?: Reactive<number>;
356
+ minLength?: Reactive<number>;
357
+ maxLength?: Reactive<number>;
358
+ name?: Reactive<string>;
359
+ wrap?: Reactive<"hard" | "soft">;
360
+ autoFocus?: Reactive<boolean>;
361
+ autoComplete?: Reactive<string>;
362
+ form?: Reactive<string>;
363
+ spellCheck?: Reactive<boolean>;
364
+ resize?: Reactive<"none" | "both" | "horizontal" | "vertical">;
365
+ }
366
+ export interface FormAttributes extends HTMLAttributes<HTMLFormElement> {
367
+ action?: Reactive<string>;
368
+ method?: Reactive<"get" | "post" | "dialog">;
369
+ encType?: Reactive<string>;
370
+ noValidate?: Reactive<boolean>;
371
+ target?: Reactive<string>;
372
+ name?: Reactive<string>;
373
+ autoComplete?: Reactive<"on" | "off">;
374
+ }
375
+ export interface LabelAttributes extends HTMLAttributes<HTMLLabelElement> {
376
+ for?: Reactive<string>;
377
+ htmlFor?: Reactive<string>;
378
+ form?: Reactive<string>;
379
+ }
380
+ export interface FieldsetAttributes extends HTMLAttributes<HTMLFieldSetElement> {
381
+ disabled?: Reactive<boolean>;
382
+ name?: Reactive<string>;
383
+ form?: Reactive<string>;
384
+ }
385
+ export interface OptionAttributes extends HTMLAttributes<HTMLOptionElement> {
386
+ value?: Reactive<string | number>;
387
+ selected?: Reactive<boolean>;
388
+ disabled?: Reactive<boolean>;
389
+ label?: Reactive<string>;
390
+ }
391
+ export interface OptGroupAttributes extends HTMLAttributes<HTMLOptGroupElement> {
392
+ label?: Reactive<string>;
393
+ disabled?: Reactive<boolean>;
394
+ }
395
+ export interface ImgAttributes extends HTMLAttributes<HTMLImageElement> {
396
+ src?: Reactive<string>;
397
+ alt?: Reactive<string>;
398
+ width?: Reactive<number | string>;
399
+ height?: Reactive<number | string>;
400
+ loading?: Reactive<"eager" | "lazy">;
401
+ decoding?: Reactive<"auto" | "async" | "sync">;
402
+ crossOrigin?: Reactive<"anonymous" | "use-credentials">;
403
+ srcSet?: Reactive<string>;
404
+ sizes?: Reactive<string>;
405
+ referrerPolicy?: Reactive<ReferrerPolicy>;
406
+ fetchPriority?: Reactive<"high" | "low" | "auto">;
407
+ isMap?: Reactive<boolean>;
408
+ useMap?: Reactive<string>;
409
+ }
410
+ export interface MediaAttributes<Target = HTMLMediaElement> extends HTMLAttributes<Target> {
411
+ src?: Reactive<string>;
412
+ autoPlay?: Reactive<boolean>;
413
+ controls?: Reactive<boolean>;
414
+ loop?: Reactive<boolean>;
415
+ muted?: Reactive<boolean>;
416
+ preload?: Reactive<"auto" | "metadata" | "none">;
417
+ crossOrigin?: Reactive<"anonymous" | "use-credentials">;
418
+ width?: Reactive<number | string>;
419
+ height?: Reactive<number | string>;
420
+ onPlay?: (e: Event) => void;
421
+ onPause?: (e: Event) => void;
422
+ onEnded?: (e: Event) => void;
423
+ onTimeUpdate?: (e: Event) => void;
424
+ onLoadedData?: (e: Event) => void;
425
+ onLoadedMetadata?: (e: Event) => void;
426
+ onCanPlay?: (e: Event) => void;
427
+ onCanPlayThrough?: (e: Event) => void;
428
+ onVolumeChange?: (e: Event) => void;
429
+ onSeeked?: (e: Event) => void;
430
+ onSeeking?: (e: Event) => void;
431
+ onDurationChange?: (e: Event) => void;
432
+ onProgress?: (e: Event) => void;
433
+ onWaiting?: (e: Event) => void;
434
+ onStalled?: (e: Event) => void;
435
+ onSuspend?: (e: Event) => void;
436
+ onRateChange?: (e: Event) => void;
437
+ onEmptied?: (e: Event) => void;
438
+ }
439
+ export interface VideoAttributes extends MediaAttributes<HTMLVideoElement> {
440
+ poster?: Reactive<string>;
441
+ playsInline?: Reactive<boolean>;
442
+ }
443
+ export interface CanvasAttributes extends HTMLAttributes<HTMLCanvasElement> {
444
+ width?: Reactive<number | string>;
445
+ height?: Reactive<number | string>;
446
+ }
447
+ export interface IframeAttributes extends HTMLAttributes<HTMLIFrameElement> {
448
+ src?: Reactive<string>;
449
+ srcdoc?: Reactive<string>;
450
+ name?: Reactive<string>;
451
+ width?: Reactive<number | string>;
452
+ height?: Reactive<number | string>;
453
+ allow?: Reactive<string>;
454
+ allowFullScreen?: Reactive<boolean>;
455
+ loading?: Reactive<"eager" | "lazy">;
456
+ sandbox?: Reactive<string>;
457
+ referrerPolicy?: Reactive<ReferrerPolicy>;
458
+ }
459
+ export interface SourceAttributes extends HTMLAttributes<HTMLSourceElement> {
460
+ src?: Reactive<string>;
461
+ srcSet?: Reactive<string>;
462
+ media?: Reactive<string>;
463
+ type?: Reactive<string>;
464
+ sizes?: Reactive<string>;
465
+ width?: Reactive<number | string>;
466
+ height?: Reactive<number | string>;
467
+ }
468
+ export interface TrackAttributes extends HTMLAttributes<HTMLTrackElement> {
469
+ src?: Reactive<string>;
470
+ kind?: Reactive<"subtitles" | "captions" | "descriptions" | "chapters" | "metadata">;
471
+ srcLang?: Reactive<string>;
472
+ label?: Reactive<string>;
473
+ default?: Reactive<boolean>;
474
+ }
475
+ export interface LinkAttributes extends HTMLAttributes<HTMLLinkElement> {
476
+ href?: Reactive<string>;
477
+ rel?: Reactive<string>;
478
+ type?: Reactive<string>;
479
+ media?: Reactive<string>;
480
+ crossOrigin?: Reactive<"anonymous" | "use-credentials">;
481
+ as?: Reactive<string>;
482
+ integrity?: Reactive<string>;
483
+ hrefLang?: Reactive<string>;
484
+ sizes?: Reactive<string>;
485
+ fetchPriority?: Reactive<"high" | "low" | "auto">;
486
+ }
487
+ export interface MetaAttributes extends HTMLAttributes<HTMLMetaElement> {
488
+ name?: Reactive<string>;
489
+ content?: Reactive<string>;
490
+ charset?: Reactive<string>;
491
+ httpEquiv?: Reactive<string>;
492
+ property?: Reactive<string>;
493
+ }
494
+ export interface ScriptAttributes extends HTMLAttributes<HTMLScriptElement> {
495
+ src?: Reactive<string>;
496
+ type?: Reactive<string>;
497
+ async?: Reactive<boolean>;
498
+ defer?: Reactive<boolean>;
499
+ crossOrigin?: Reactive<"anonymous" | "use-credentials">;
500
+ integrity?: Reactive<string>;
501
+ noModule?: Reactive<boolean>;
502
+ nonce?: Reactive<string>;
503
+ }
504
+ export interface StyleAttributes extends HTMLAttributes<HTMLStyleElement> {
505
+ media?: Reactive<string>;
506
+ nonce?: Reactive<string>;
507
+ scoped?: Reactive<boolean>;
508
+ }
509
+ export interface TableCellAttributes extends HTMLAttributes<HTMLTableCellElement> {
510
+ colSpan?: Reactive<number>;
511
+ rowSpan?: Reactive<number>;
512
+ headers?: Reactive<string>;
513
+ scope?: Reactive<"col" | "colgroup" | "row" | "rowgroup">;
514
+ abbr?: Reactive<string>;
515
+ }
516
+ export interface ColAttributes extends HTMLAttributes<HTMLTableColElement> {
517
+ span?: Reactive<number>;
518
+ }
519
+ export interface DetailsAttributes extends HTMLAttributes<HTMLDetailsElement> {
520
+ open?: Reactive<boolean>;
521
+ }
522
+ export interface DialogAttributes extends HTMLAttributes<HTMLDialogElement> {
523
+ open?: Reactive<boolean>;
524
+ onClose?: (e: Event) => void;
525
+ onCancel?: (e: Event) => void;
526
+ }
527
+ export interface ProgressAttributes extends HTMLAttributes<HTMLProgressElement> {
528
+ value?: Reactive<number>;
529
+ max?: Reactive<number>;
530
+ }
531
+ export interface MeterAttributes extends HTMLAttributes<HTMLMeterElement> {
532
+ value?: Reactive<number>;
533
+ min?: Reactive<number>;
534
+ max?: Reactive<number>;
535
+ low?: Reactive<number>;
536
+ high?: Reactive<number>;
537
+ optimum?: Reactive<number>;
538
+ }
539
+ export interface OutputAttributes extends HTMLAttributes {
540
+ for?: Reactive<string>;
541
+ htmlFor?: Reactive<string>;
542
+ form?: Reactive<string>;
543
+ name?: Reactive<string>;
544
+ }
545
+ export interface ObjectAttributes extends HTMLAttributes {
546
+ data?: Reactive<string>;
547
+ type?: Reactive<string>;
548
+ name?: Reactive<string>;
549
+ width?: Reactive<number | string>;
550
+ height?: Reactive<number | string>;
551
+ form?: Reactive<string>;
552
+ }
553
+ export interface BlockquoteAttributes extends HTMLAttributes {
554
+ cite?: Reactive<string>;
555
+ }
556
+ export interface TimeAttributes extends HTMLAttributes<HTMLTimeElement> {
557
+ dateTime?: Reactive<string>;
558
+ }
559
+ export interface QAttributes extends HTMLAttributes {
560
+ cite?: Reactive<string>;
561
+ }
562
+ export interface OlAttributes extends HTMLAttributes<HTMLOListElement> {
563
+ reversed?: Reactive<boolean>;
564
+ start?: Reactive<number>;
565
+ type?: Reactive<"1" | "a" | "A" | "i" | "I">;
566
+ }
567
+ export interface LiAttributes extends HTMLAttributes<HTMLLIElement> {
568
+ value?: Reactive<number>;
569
+ }
570
+ export interface SVGAttributes<Target = SVGElement> extends DOMEventHandlers<Target> {
571
+ children?: Child;
572
+ /** Callback ref — called with the SVG element after it is inserted into the parent. */
573
+ ref?: (el: Element) => void;
574
+ id?: Reactive<string>;
575
+ class?: Reactive<string>;
576
+ className?: Reactive<string>;
577
+ style?: Reactive<string | CSSProperties>;
578
+ tabIndex?: Reactive<number>;
579
+ fill?: Reactive<string>;
580
+ fillOpacity?: Reactive<number | string>;
581
+ "fill-opacity"?: Reactive<number | string>;
582
+ fillRule?: Reactive<"nonzero" | "evenodd" | "inherit">;
583
+ "fill-rule"?: Reactive<"nonzero" | "evenodd" | "inherit">;
584
+ stroke?: Reactive<string>;
585
+ strokeWidth?: Reactive<number | string>;
586
+ "stroke-width"?: Reactive<number | string>;
587
+ strokeOpacity?: Reactive<number | string>;
588
+ "stroke-opacity"?: Reactive<number | string>;
589
+ strokeLinecap?: Reactive<"butt" | "round" | "square">;
590
+ "stroke-linecap"?: Reactive<"butt" | "round" | "square">;
591
+ strokeLinejoin?: Reactive<"arcs" | "bevel" | "miter" | "miter-clip" | "round">;
592
+ "stroke-linejoin"?: Reactive<"arcs" | "bevel" | "miter" | "miter-clip" | "round">;
593
+ strokeDasharray?: Reactive<string | number>;
594
+ "stroke-dasharray"?: Reactive<string | number>;
595
+ strokeDashoffset?: Reactive<string | number>;
596
+ "stroke-dashoffset"?: Reactive<string | number>;
597
+ opacity?: Reactive<number | string>;
598
+ x?: Reactive<number | string>;
599
+ y?: Reactive<number | string>;
600
+ x1?: Reactive<number | string>;
601
+ y1?: Reactive<number | string>;
602
+ x2?: Reactive<number | string>;
603
+ y2?: Reactive<number | string>;
604
+ cx?: Reactive<number | string>;
605
+ cy?: Reactive<number | string>;
606
+ r?: Reactive<number | string>;
607
+ rx?: Reactive<number | string>;
608
+ ry?: Reactive<number | string>;
609
+ d?: Reactive<string>;
610
+ points?: Reactive<string>;
611
+ width?: Reactive<number | string>;
612
+ height?: Reactive<number | string>;
613
+ transform?: Reactive<string>;
614
+ viewBox?: Reactive<string>;
615
+ preserveAspectRatio?: Reactive<string>;
616
+ "text-anchor"?: Reactive<"start" | "middle" | "end">;
617
+ textAnchor?: Reactive<"start" | "middle" | "end">;
618
+ "dominant-baseline"?: Reactive<string>;
619
+ dominantBaseline?: Reactive<string>;
620
+ "font-size"?: Reactive<string | number>;
621
+ fontSize?: Reactive<string | number>;
622
+ "font-family"?: Reactive<string>;
623
+ fontFamily?: Reactive<string>;
624
+ "font-weight"?: Reactive<string | number>;
625
+ fontWeight?: Reactive<string | number>;
626
+ "font-style"?: Reactive<string>;
627
+ fontStyle?: Reactive<string>;
628
+ mask?: Reactive<string>;
629
+ "clip-path"?: Reactive<string>;
630
+ clipPath?: Reactive<string>;
631
+ filter?: Reactive<string>;
632
+ href?: Reactive<string>;
633
+ "xlink:href"?: Reactive<string>;
634
+ xmlns?: string;
635
+ [key: `data-${string}`]: Reactive<string | number | boolean | undefined>;
636
+ }
637
+ export interface SVGSvgAttributes extends SVGAttributes<SVGSVGElement> {
638
+ xmlns?: string;
639
+ version?: Reactive<string>;
640
+ }
641
+ export interface SVGStopAttributes extends SVGAttributes<SVGStopElement> {
642
+ offset?: Reactive<string | number>;
643
+ "stop-color"?: Reactive<string>;
644
+ stopColor?: Reactive<string>;
645
+ "stop-opacity"?: Reactive<number | string>;
646
+ stopOpacity?: Reactive<number | string>;
647
+ }
648
+ export interface IntrinsicElementsMap {
649
+ div: HTMLAttributes;
650
+ span: HTMLAttributes;
651
+ p: HTMLAttributes;
652
+ h1: HTMLAttributes;
653
+ h2: HTMLAttributes;
654
+ h3: HTMLAttributes;
655
+ h4: HTMLAttributes;
656
+ h5: HTMLAttributes;
657
+ h6: HTMLAttributes;
658
+ header: HTMLAttributes;
659
+ footer: HTMLAttributes;
660
+ main: HTMLAttributes;
661
+ nav: HTMLAttributes;
662
+ aside: HTMLAttributes;
663
+ article: HTMLAttributes;
664
+ section: HTMLAttributes;
665
+ address: HTMLAttributes;
666
+ hgroup: HTMLAttributes;
667
+ search: HTMLAttributes;
668
+ ul: HTMLAttributes;
669
+ ol: OlAttributes;
670
+ li: LiAttributes;
671
+ dl: HTMLAttributes;
672
+ dt: HTMLAttributes;
673
+ dd: HTMLAttributes;
674
+ figure: HTMLAttributes;
675
+ figcaption: HTMLAttributes;
676
+ hr: HTMLAttributes;
677
+ pre: HTMLAttributes;
678
+ blockquote: BlockquoteAttributes;
679
+ a: AnchorAttributes;
680
+ abbr: HTMLAttributes;
681
+ b: HTMLAttributes;
682
+ bdi: HTMLAttributes;
683
+ bdo: HTMLAttributes;
684
+ br: HTMLAttributes;
685
+ cite: HTMLAttributes;
686
+ code: HTMLAttributes;
687
+ data: HTMLAttributes;
688
+ dfn: HTMLAttributes;
689
+ em: HTMLAttributes;
690
+ i: HTMLAttributes;
691
+ kbd: HTMLAttributes;
692
+ mark: HTMLAttributes;
693
+ q: QAttributes;
694
+ rp: HTMLAttributes;
695
+ rt: HTMLAttributes;
696
+ ruby: HTMLAttributes;
697
+ s: HTMLAttributes;
698
+ samp: HTMLAttributes;
699
+ small: HTMLAttributes;
700
+ strong: HTMLAttributes;
701
+ sub: HTMLAttributes;
702
+ sup: HTMLAttributes;
703
+ time: TimeAttributes;
704
+ u: HTMLAttributes;
705
+ var: HTMLAttributes;
706
+ wbr: HTMLAttributes;
707
+ form: FormAttributes;
708
+ input: InputAttributes;
709
+ button: ButtonAttributes;
710
+ select: SelectAttributes;
711
+ textarea: TextareaAttributes;
712
+ label: LabelAttributes;
713
+ fieldset: FieldsetAttributes;
714
+ legend: HTMLAttributes;
715
+ datalist: HTMLAttributes;
716
+ optgroup: OptGroupAttributes;
717
+ option: OptionAttributes;
718
+ output: OutputAttributes;
719
+ progress: ProgressAttributes;
720
+ meter: MeterAttributes;
721
+ details: DetailsAttributes;
722
+ summary: HTMLAttributes;
723
+ dialog: DialogAttributes;
724
+ menu: HTMLAttributes;
725
+ img: ImgAttributes;
726
+ picture: HTMLAttributes;
727
+ source: SourceAttributes;
728
+ iframe: IframeAttributes;
729
+ embed: HTMLAttributes;
730
+ object: ObjectAttributes;
731
+ map: HTMLAttributes;
732
+ area: HTMLAttributes;
733
+ canvas: CanvasAttributes;
734
+ audio: MediaAttributes;
735
+ video: VideoAttributes;
736
+ track: TrackAttributes;
737
+ script: ScriptAttributes;
738
+ noscript: HTMLAttributes;
739
+ template: HTMLAttributes;
740
+ slot: HTMLAttributes;
741
+ table: HTMLAttributes;
742
+ caption: HTMLAttributes;
743
+ colgroup: HTMLAttributes;
744
+ col: ColAttributes;
745
+ thead: HTMLAttributes;
746
+ tbody: HTMLAttributes;
747
+ tfoot: HTMLAttributes;
748
+ tr: HTMLAttributes;
749
+ td: TableCellAttributes;
750
+ th: TableCellAttributes;
751
+ head: HTMLAttributes;
752
+ title: HTMLAttributes;
753
+ base: HTMLAttributes;
754
+ link: LinkAttributes;
755
+ meta: MetaAttributes;
756
+ style: StyleAttributes;
757
+ html: HTMLAttributes;
758
+ body: HTMLAttributes;
759
+ svg: SVGSvgAttributes;
760
+ path: SVGAttributes;
761
+ circle: SVGAttributes;
762
+ rect: SVGAttributes;
763
+ ellipse: SVGAttributes;
764
+ line: SVGAttributes;
765
+ polyline: SVGAttributes;
766
+ polygon: SVGAttributes;
767
+ text: SVGAttributes;
768
+ tspan: SVGAttributes;
769
+ g: SVGAttributes;
770
+ defs: SVGAttributes;
771
+ use: SVGAttributes;
772
+ symbol: SVGAttributes;
773
+ marker: SVGAttributes;
774
+ clipPath: SVGAttributes;
775
+ mask: SVGAttributes;
776
+ pattern: SVGAttributes;
777
+ linearGradient: SVGAttributes;
778
+ radialGradient: SVGAttributes;
779
+ stop: SVGStopAttributes;
780
+ image: SVGAttributes;
781
+ filter: SVGAttributes;
782
+ feBlend: SVGAttributes;
783
+ feColorMatrix: SVGAttributes;
784
+ feComponentTransfer: SVGAttributes;
785
+ feComposite: SVGAttributes;
786
+ feConvolveMatrix: SVGAttributes;
787
+ feDiffuseLighting: SVGAttributes;
788
+ feDisplacementMap: SVGAttributes;
789
+ feFlood: SVGAttributes;
790
+ feGaussianBlur: SVGAttributes;
791
+ feImage: SVGAttributes;
792
+ feMerge: SVGAttributes;
793
+ feMorphology: SVGAttributes;
794
+ feOffset: SVGAttributes;
795
+ feSpecularLighting: SVGAttributes;
796
+ feTile: SVGAttributes;
797
+ feTurbulence: SVGAttributes;
798
+ foreignObject: SVGAttributes;
799
+ animate: SVGAttributes;
800
+ animateMotion: SVGAttributes;
801
+ animateTransform: SVGAttributes;
802
+ mpath: SVGAttributes;
803
+ set: SVGAttributes;
804
+ }
805
+ export interface UnknownElementsMap extends IntrinsicElementsMap {
806
+ [key: string | symbol]: TreeNodeProps;
807
+ }
808
+ declare global {
809
+ export namespace JSX {
810
+ type Element = any;
811
+ /** Tells TypeScript which prop holds children. */
812
+ interface ElementChildrenAttribute {
813
+ children: unknown;
814
+ }
815
+ interface IntrinsicElements extends UnknownElementsMap {
816
+ }
817
+ type IntrinsicAttributes = IntrinsicElements[keyof IntrinsicElements];
818
+ type Attributes = IntrinsicElements[keyof IntrinsicElements];
819
+ type ElementType = keyof IntrinsicElements | Component | null | undefined | false | true | boolean | string | (string & {}) | string[] | (string & {})[] | {};
820
+ }
821
+ export var React: typeof createNode;
822
+ export var ds_jsx: typeof createNode;
823
+ export var Fragment: typeof createNode;
824
+ }
825
+ export {};
826
+ //# sourceMappingURL=jsx-globals.d.ts.map