@solidjs/web 2.0.0-beta.11 → 2.0.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web.js CHANGED
@@ -125,7 +125,6 @@ function reconcileArrays(parentNode, a, b) {
125
125
  const $$EVENTS = "_$DX_DELEGATE";
126
126
  const INNER_OWNED = {};
127
127
  function render$1(code, element, init, options = {}) {
128
- const renderRoot = getChildRoot(element);
129
128
  let disposer;
130
129
  createRoot(dispose => {
131
130
  disposer = dispose;
@@ -134,14 +133,14 @@ function render$1(code, element, init, options = {}) {
134
133
  effect(() => flatten(tree), () => {});
135
134
  } else {
136
135
  const tree = code();
137
- insert(element, () => tree, renderRoot.firstChild ? null : undefined, init, options.insertOptions);
136
+ insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
138
137
  }
139
138
  }, {
140
139
  id: options.renderId
141
140
  });
142
141
  return () => {
143
142
  disposer();
144
- renderRoot.textContent = "";
143
+ element.textContent = "";
145
144
  };
146
145
  }
147
146
  function create(html, bypassGuard, flag) {
@@ -278,11 +277,10 @@ function ref(fn, element) {
278
277
  runWithOwner(null, () => applyRef(resolved, element));
279
278
  }
280
279
  function insert(parent, accessor, marker, initial, options) {
281
- const childRoot = getChildRoot(parent);
282
280
  const multi = marker !== undefined;
283
281
  if (multi && !initial) initial = [];
284
282
  if (isHydrating(parent)) {
285
- if (!multi && initial === undefined && parent) initial = [...childRoot.childNodes];
283
+ if (!multi && initial === undefined && parent) initial = [...parent.childNodes];
286
284
  if (Array.isArray(initial)) {
287
285
  let j = 0;
288
286
  for (let i = 0; i < initial.length; i++) {
@@ -297,7 +295,7 @@ function insert(parent, accessor, marker, initial, options) {
297
295
  }
298
296
  if (multi && initial.length === 0) {
299
297
  const placeholder = document.createTextNode("");
300
- childRoot.insertBefore(placeholder, marker);
298
+ parent.insertBefore(placeholder, marker);
301
299
  initial = [placeholder];
302
300
  }
303
301
  let current = initial;
@@ -352,7 +350,7 @@ function loadModuleAssets(mapping) {
352
350
  return pending.length ? Promise.all(pending).then(() => {}) : undefined;
353
351
  }
354
352
  function hydrate$1(code, element, options = {}) {
355
- if (globalThis._$HY.done) return render$1(code, element, [...getChildRoot(element).childNodes], options);
353
+ if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
356
354
  options.renderId ||= "";
357
355
  if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
358
356
  if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
@@ -388,7 +386,7 @@ function hydrate$1(code, element, options = {}) {
388
386
  let disposer;
389
387
  p.then(() => {
390
388
  try {
391
- disposer = render$1(code, element, [...getChildRoot(element).childNodes], options);
389
+ disposer = render$1(code, element, [...element.childNodes], options);
392
390
  } finally {
393
391
  sharedConfig.hydrating = false;
394
392
  }
@@ -400,7 +398,7 @@ function hydrate$1(code, element, options = {}) {
400
398
  }
401
399
  try {
402
400
  gatherHydratable(element, options.renderId);
403
- return render$1(code, element, [...getChildRoot(element).childNodes], options);
401
+ return render$1(code, element, [...element.childNodes], options);
404
402
  } finally {
405
403
  sharedConfig.hydrating = false;
406
404
  }
@@ -443,7 +441,7 @@ function getNextMarker(start) {
443
441
  return [end, current];
444
442
  }
445
443
  function getFirstChild(node, expectedTag) {
446
- const child = getChildRoot(node).firstChild;
444
+ const child = node.firstChild;
447
445
  return child;
448
446
  }
449
447
  function getNextSibling(node, expectedTag) {
@@ -476,9 +474,6 @@ function runHydrationEvents() {
476
474
  function isHydrating(node) {
477
475
  return sharedConfig.hydrating && (!node || node.isConnected);
478
476
  }
479
- function getChildRoot(node) {
480
- return node && node.localName === "template" ? node.content : node;
481
- }
482
477
  function classListToObject(classList) {
483
478
  if (Array.isArray(classList)) {
484
479
  const result = {};
@@ -513,11 +508,7 @@ function assignProp(node, prop, value, prev, skipRef, nodeName) {
513
508
  return value;
514
509
  }
515
510
  const hasNamespace = prop.indexOf(":") > -1;
516
- if (hasNamespace && prop.slice(0, 3) === "on:") {
517
- const e = prop.slice(3);
518
- prev && node.removeEventListener(e, prev, typeof prev !== "function" && prev);
519
- value && node.addEventListener(e, value, typeof value !== "function" && value);
520
- } else if (!hasNamespace && prop.slice(0, 2) === "on") {
511
+ if (!hasNamespace && prop.slice(0, 2) === "on") {
521
512
  const name = prop.slice(2).toLowerCase();
522
513
  const delegate = DelegatedEvents.has(name);
523
514
  if (!delegate && prev) {
@@ -590,22 +581,21 @@ function eventHandler(e) {
590
581
  function insertExpression(parent, value, current, marker) {
591
582
  if (isHydrating(parent)) return;
592
583
  if (value === current) return;
593
- const childRoot = getChildRoot(parent);
594
584
  const t = typeof value,
595
585
  multi = marker !== undefined;
596
586
  if (t === "string" || t === "number") {
597
587
  const tc = typeof current;
598
588
  if (tc === "string" || tc === "number") {
599
- childRoot.firstChild.data = value;
600
- } else childRoot.textContent = value;
589
+ parent.firstChild.data = value;
590
+ } else parent.textContent = value;
601
591
  } else if (value === undefined) {
602
592
  cleanChildren(parent, current, marker);
603
593
  } else if (value.nodeType) {
604
594
  if (Array.isArray(current)) {
605
595
  cleanChildren(parent, current, multi ? marker : null, value);
606
- } else if (current === undefined || !childRoot.firstChild) {
607
- childRoot.appendChild(value);
608
- } else childRoot.replaceChild(value, childRoot.firstChild);
596
+ } else if (current === undefined || !parent.firstChild) {
597
+ parent.appendChild(value);
598
+ } else parent.replaceChild(value, parent.firstChild);
609
599
  } else if (Array.isArray(value)) {
610
600
  const currentArray = current && Array.isArray(current);
611
601
  if (value.length === 0) {
@@ -613,7 +603,7 @@ function insertExpression(parent, value, current, marker) {
613
603
  } else if (currentArray) {
614
604
  if (current.length === 0) {
615
605
  appendNodes(parent, value, marker);
616
- } else reconcileArrays(childRoot, current, value);
606
+ } else reconcileArrays(parent, current, value);
617
607
  } else {
618
608
  current && cleanChildren(parent);
619
609
  appendNodes(parent, value);
@@ -638,11 +628,9 @@ function normalize(value, current, multi, doNotUnwrap) {
638
628
  return value;
639
629
  }
640
630
  function appendNodes(parent, array, marker = null) {
641
- parent = getChildRoot(parent);
642
631
  for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
643
632
  }
644
633
  function cleanChildren(parent, current, marker, replacement) {
645
- parent = getChildRoot(parent);
646
634
  if (marker === undefined) return parent.textContent = "";
647
635
  if (current.length) {
648
636
  let inserted = false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@solidjs/web",
3
3
  "description": "Solid's web runtime: client rendering, hydration, SSR, and DOM-specific control flow (Portal, Dynamic).",
4
- "version": "2.0.0-beta.11",
4
+ "version": "2.0.0-beta.13",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -137,10 +137,10 @@
137
137
  "seroval-plugins": "^1.1.0"
138
138
  },
139
139
  "peerDependencies": {
140
- "solid-js": "^2.0.0-beta.11"
140
+ "solid-js": "^2.0.0-beta.13"
141
141
  },
142
142
  "devDependencies": {
143
- "solid-js": "2.0.0-beta.11"
143
+ "solid-js": "2.0.0-beta.13"
144
144
  },
145
145
  "scripts": {
146
146
  "build": "npm-run-all -nl build:clean types:copy-jsx build:js",
package/types/jsx.d.ts CHANGED
@@ -35,10 +35,9 @@ import type { Element as SolidElement } from "solid-js";
35
35
  *
36
36
  * - Event handlers use `camelCase` such `onClick` and will be delegated when possible, bubbling
37
37
  * through the component tree, not the dom tree.
38
- * - Native event handlers use the namespace `on:` such `on:click`, and wont be delegated. bubbling
39
- * the dom tree.
38
+ * - Event handlers use camelCase attributes; native listener options should be handled with `ref`
39
+ * callbacks that call `addEventListener` directly.
40
40
  * - A global case-insensitive event handler can be added by extending `EventHandlersElement<T>`
41
- * - A native `on:` event handler can be added by extending `CustomEvents<T>` interface
42
41
  *
43
42
  * ## Boolean Attributes (property setter that accepts `true | false`):
44
43
  *
@@ -176,17 +175,6 @@ export namespace JSX {
176
175
  EHandler extends EventHandler<T, any> = EventHandler<T, E>
177
176
  > = EHandler | BoundEventHandler<T, E, EHandler>;
178
177
 
179
- interface EventHandlerWithOptions<T, E extends Event, EHandler = EventHandler<T, E>>
180
- extends AddEventListenerOptions, EventListenerOptions {
181
- handleEvent: EHandler;
182
- }
183
-
184
- type EventHandlerWithOptionsUnion<
185
- T,
186
- E extends Event,
187
- EHandler extends EventHandler<T, any> = EventHandler<T, E>
188
- > = EHandler | EventHandlerWithOptions<T, E, EHandler>;
189
-
190
178
  interface InputEventHandler<T, E extends InputEvent> {
191
179
  (
192
180
  e: E & {
@@ -258,13 +246,9 @@ export namespace JSX {
258
246
  $ServerOnly?: boolean | undefined;
259
247
  }
260
248
  interface ExplicitProperties {}
261
- interface CustomEvents {}
262
249
  type PropAttributes = {
263
250
  [Key in keyof ExplicitProperties as `prop:${Key}`]?: ExplicitProperties[Key];
264
251
  };
265
- type OnAttributes<T> = {
266
- [Key in keyof CustomEvents as `on:${Key}`]?: EventHandlerWithOptionsUnion<T, CustomEvents[Key]>;
267
- };
268
252
 
269
253
  /**
270
254
  * Writable, element-specific DOM properties exposed as `prop:*` attributes, auto-derived
@@ -732,33 +716,7 @@ export namespace JSX {
732
716
  onUnhandledRejection?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
733
717
  onUnload?: EventHandlerUnion<T, Event> | undefined;
734
718
 
735
- "on:afterprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
736
- "on:beforeprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
737
- "on:beforeunload"?: EventHandlerWithOptionsUnion<T, BeforeUnloadEvent> | undefined;
738
- "on:devicemotion"?: EventHandlerWithOptionsUnion<T, DeviceMotionEvent> | undefined;
739
- "on:deviceorientation"?: EventHandlerWithOptionsUnion<T, DeviceOrientationEvent> | undefined;
740
- "on:deviceorientationabsolute"?:
741
- | EventHandlerWithOptionsUnion<T, DeviceOrientationEvent>
742
- | undefined;
743
- "on:gamepadconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
744
- "on:gamepaddisconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
745
- "on:hashchange"?: EventHandlerWithOptionsUnion<T, HashChangeEvent> | undefined;
746
- "on:languagechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
747
- "on:message"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
748
- "on:messageerror"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
749
- "on:offline"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
750
- "on:online"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
751
719
  /** @deprecated Use `screen.orientation` (`ScreenOrientation.change`) instead. */
752
- "on:orientationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
753
- "on:pagehide"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
754
- "on:pagereveal"?: EventHandlerWithOptionsUnion<T, PageRevealEvent> | undefined;
755
- "on:pageshow"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
756
- "on:pageswap"?: EventHandlerWithOptionsUnion<T, PageSwapEvent> | undefined;
757
- "on:popstate"?: EventHandlerWithOptionsUnion<T, PopStateEvent> | undefined;
758
- "on:rejectionhandled"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
759
- "on:storage"?: EventHandlerWithOptionsUnion<T, StorageEvent> | undefined;
760
- "on:unhandledrejection"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
761
- "on:unload"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
762
720
  }
763
721
 
764
722
  /**
@@ -884,167 +842,23 @@ export namespace JSX {
884
842
  onVolumeChange?: EventHandlerUnion<T, Event> | undefined;
885
843
  onWaiting?: EventHandlerUnion<T, Event> | undefined;
886
844
  onWheel?: EventHandlerUnion<T, WheelEvent> | undefined;
887
-
888
- "on:abort"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
889
- "on:animationcancel"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
890
- "on:animationend"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
891
- "on:animationiteration"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
892
- "on:animationstart"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
893
- "on:auxclick"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
894
- "on:beforecopy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
895
- "on:beforecut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
896
- "on:beforeinput"?:
897
- | EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
898
- | undefined;
899
- "on:beforematch"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
900
- "on:beforepaste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
901
- "on:beforetoggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
902
- "on:beforexrselect"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
903
- "on:blur"?:
904
- | EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
905
- | undefined;
906
- "on:cancel"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
907
- "on:canplay"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
908
- "on:canplaythrough"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
909
- "on:change"?: EventHandlerWithOptionsUnion<T, Event, ChangeEventHandler<T, Event>> | undefined;
910
- "on:click"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
911
- "on:close"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
912
- "on:command"?: EventHandlerWithOptionsUnion<T, CommandEvent> | undefined;
913
- "on:compositionend"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
914
- "on:compositionstart"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
915
- "on:compositionupdate"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
916
- "on:contentvisibilityautostatechange"?:
917
- | EventHandlerWithOptionsUnion<T, ContentVisibilityAutoStateChangeEvent>
918
- | undefined;
919
- "on:contextlost"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
920
- "on:contextmenu"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
921
- "on:contextrestored"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
922
- "on:copy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
923
- "on:cuechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
924
- "on:cut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
925
- "on:dblclick"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
926
- "on:drag"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
927
- "on:dragend"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
928
- "on:dragenter"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
929
- "on:dragexit"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
930
- "on:dragleave"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
931
- "on:dragover"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
932
- "on:dragstart"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
933
- "on:drop"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
934
- "on:durationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
935
- "on:emptied"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
936
- "on:ended"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
937
- "on:error"?: EventHandlerWithOptionsUnion<T, ErrorEvent> | undefined;
938
- "on:focus"?:
939
- | EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
940
- | undefined;
941
- "on:focusin"?:
942
- | EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
943
- | undefined;
944
- "on:focusout"?:
945
- | EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
946
- | undefined;
947
- "on:formdata"?: EventHandlerWithOptionsUnion<T, FormDataEvent> | undefined;
948
- "on:fullscreenchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
949
- "on:fullscreenerror"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
950
- "on:gotpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
951
- "on:input"?:
952
- | EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
953
- | undefined;
954
- "on:invalid"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
955
- "on:keydown"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
956
- "on:keypress"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
957
- "on:keyup"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
958
- "on:load"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
959
- "on:loadeddata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
960
- "on:loadedmetadata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
961
- "on:loadstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
962
- "on:lostpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
963
- "on:mousedown"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
964
- "on:mouseenter"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
965
- "on:mouseleave"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
966
- "on:mousemove"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
967
- "on:mouseout"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
968
- "on:mouseover"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
969
- "on:mouseup"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
970
- "on:paste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
971
- "on:pause"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
972
- "on:play"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
973
- "on:playing"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
974
- "on:pointercancel"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
975
- "on:pointerdown"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
976
- "on:pointerenter"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
977
- "on:pointerleave"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
978
- "on:pointermove"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
979
- "on:pointerout"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
980
- "on:pointerover"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
981
- "on:pointerrawupdate"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
982
- "on:pointerup"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
983
- "on:progress"?: EventHandlerWithOptionsUnion<T, ProgressEvent> | undefined;
984
- "on:ratechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
985
- "on:reset"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
986
- "on:resize"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
987
- "on:scroll"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
988
- "on:scrollend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
989
- "on:scrollsnapchange"?: EventHandlerWithOptionsUnion<T, SnapEvent> | undefined;
990
- "on:scrollsnapchanging"?: EventHandlerWithOptionsUnion<T, SnapEvent> | undefined;
991
- "on:securitypolicyviolation"?:
992
- | EventHandlerWithOptionsUnion<T, SecurityPolicyViolationEvent>
993
- | undefined;
994
- "on:seeked"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
995
- "on:seeking"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
996
- "on:select"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
997
- "on:selectionchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
998
- "on:selectstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
999
- "on:slotchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
1000
- "on:stalled"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
1001
- "on:submit"?: EventHandlerWithOptionsUnion<T, SubmitEvent> | undefined;
1002
- "on:suspend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
1003
- "on:timeupdate"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
1004
- "on:toggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
1005
- "on:touchcancel"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
1006
- "on:touchend"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
1007
- "on:touchmove"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
1008
- "on:touchstart"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
1009
- "on:transitioncancel"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
1010
- "on:transitionend"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
1011
- "on:transitionrun"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
1012
- "on:transitionstart"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
1013
- "on:volumechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
1014
- "on:waiting"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
1015
- "on:wheel"?: EventHandlerWithOptionsUnion<T, WheelEvent> | undefined;
1016
845
  }
1017
846
 
1018
847
  // EventName = "click" | "mousedown" ...
1019
848
 
1020
849
  type EventName =
1021
850
  | (keyof EventHandlersWindow<any> extends infer K
1022
- ? K extends `on:${infer T}`
1023
- ? T
1024
- : K extends `on${infer T}`
1025
- ? Lowercase<T>
1026
- : never
851
+ ? K extends `on${infer T}`
852
+ ? Lowercase<T>
853
+ : never
1027
854
  : never)
1028
855
  | (keyof EventHandlersElement<any> extends infer K
1029
- ? K extends `on:${infer T}`
1030
- ? T
1031
- : K extends `on${infer T}`
1032
- ? Lowercase<T>
1033
- : never
856
+ ? K extends `on${infer T}`
857
+ ? Lowercase<T>
858
+ : never
1034
859
  : never)
1035
860
  | (string & {});
1036
861
 
1037
- type ExtractEventType<T> = {
1038
- [K in keyof T as K extends `on:${infer Name}`
1039
- ? Name
1040
- : never]: T[K] extends EventHandlerWithOptionsUnion<Element, infer E> ? E : never;
1041
- };
1042
-
1043
- // EventType["click"] = MouseEvent
1044
-
1045
- type EventType = ExtractEventType<EventHandlersElement<Element>> &
1046
- ExtractEventType<EventHandlersWindow<Element>>;
1047
-
1048
862
  // GLOBAL ATTRIBUTES
1049
863
 
1050
864
  /**
@@ -1054,12 +868,7 @@ export namespace JSX {
1054
868
  * 2. Includes `keys` defined by `Element` and `Node` interfaces.
1055
869
  */
1056
870
  interface ElementAttributes<T>
1057
- extends
1058
- CustomAttributes<T>,
1059
- PropAttributes,
1060
- OnAttributes<T>,
1061
- EventHandlersElement<T>,
1062
- AriaAttributes {
871
+ extends CustomAttributes<T>, PropAttributes, EventHandlersElement<T>, AriaAttributes {
1063
872
  // [key: ClassKeys]: boolean;
1064
873
 
1065
874
  // properties
@@ -1723,13 +1532,6 @@ export namespace JSX {
1723
1532
  src?: string | RemoveAttribute;
1724
1533
 
1725
1534
  onEncrypted?: EventHandlerUnion<T, MediaEncryptedEvent> | undefined;
1726
- "on:encrypted"?: EventHandlerWithOptionsUnion<T, MediaEncryptedEvent> | undefined;
1727
-
1728
- onWaitingForKey?: EventHandlerUnion<T, Event> | undefined;
1729
- "on:waitingforkey"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
1730
-
1731
- /** @deprecated */
1732
- mediagroup?: string | RemoveAttribute;
1733
1535
 
1734
1536
  // special cases locked to properties
1735
1537
 
@@ -2064,14 +1866,6 @@ export namespace JSX {
2064
1866
  width?: number | string | RemoveAttribute;
2065
1867
 
2066
1868
  onEnterPictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
2067
- "on:enterpictureinpicture"?: EventHandlerWithOptionsUnion<T, PictureInPictureEvent> | undefined;
2068
-
2069
- onLeavePictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
2070
- "on:leavepictureinpicture"?: EventHandlerWithOptionsUnion<T, PictureInPictureEvent> | undefined;
2071
- }
2072
-
2073
- interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
2074
- allowpopups?: BooleanAttribute | RemoveAttribute;
2075
1869
  disableblinkfeatures?: string | RemoveAttribute;
2076
1870
  disablewebsecurity?: BooleanAttribute | RemoveAttribute;
2077
1871
  enableblinkfeatures?: string | RemoveAttribute;
@@ -2346,32 +2140,6 @@ export namespace JSX {
2346
2140
  interface AnimationElementSVGAttributes<T>
2347
2141
  extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
2348
2142
  onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
2349
- "on:begin"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
2350
-
2351
- onEnd?: EventHandlerUnion<T, TimeEvent> | undefined;
2352
- "on:end"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
2353
-
2354
- onRepeat?: EventHandlerUnion<T, TimeEvent> | undefined;
2355
- "on:repeat"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
2356
- }
2357
- interface ContainerElementSVGAttributes<T>
2358
- extends
2359
- SVGAttributes<T>,
2360
- ShapeElementSVGAttributes<T>,
2361
- Pick<
2362
- PresentationSVGAttributes,
2363
- | "clip-path"
2364
- | "mask"
2365
- | "cursor"
2366
- | "opacity"
2367
- | "filter"
2368
- | "enable-background"
2369
- | "color-interpolation"
2370
- | "color-rendering"
2371
- > {}
2372
- interface FilterPrimitiveElementSVGAttributes<T>
2373
- extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
2374
- height?: number | string | RemoveAttribute;
2375
2143
  result?: string | RemoveAttribute;
2376
2144
  width?: number | string | RemoveAttribute;
2377
2145
  x?: number | string | RemoveAttribute;