mono-jsx 0.0.0-alpha.2 → 0.0.0-alpha.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mono-jsx",
3
- "version": "0.0.0-alpha.2",
3
+ "version": "0.0.0-alpha.4",
4
4
  "description": "A _WIP_ Project",
5
5
  "type": "module",
6
6
  "main": "./jsx.mjs",
package/types/html.d.ts CHANGED
@@ -88,11 +88,18 @@ export namespace HTML {
88
88
  * - `no`, which indicates that the element will not be translated.
89
89
  */
90
90
  translate?: "yes" | "no";
91
- /** Used to designate an element as a popover element (see [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)). */
91
+ /**
92
+ * Used to designate an element as a popover element.
93
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Popover_API */
92
94
  popover?: boolean;
95
+ /**
96
+ * The `popovertarget` attribute is used to designate an element as a popover target element.
97
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Popover_API.
98
+ */
99
+ popovertarget?: string;
93
100
  /** A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the [`::part`](https://developer.mozilla.org/en-US/docs/Web/CSS/::part) pseudo-element. */
94
101
  part?: string;
95
- /** The `slot` global attribute assigns a slot in a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM) shadow tree to an element: An element with a `slot` attribute is assigned to the slot created by the `<slot>` element whose name attribute's value matches that slot attribute's value. */
102
+ /** The `slot` attribute assigns a slot in a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM) shadow tree to an element: An element with a `slot` attribute is assigned to the slot created by the `<slot>` element whose name attribute's value matches that slot attribute's value. */
96
103
  solt?: string;
97
104
  /** Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see [Using custom elements](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements) for more details). */
98
105
  is?: string;
@@ -853,7 +860,37 @@ export namespace HTML {
853
860
  onErrorCapture?: EventHandler<Event, T>;
854
861
  }
855
862
 
863
+ type a_z =
864
+ | "a"
865
+ | "b"
866
+ | "c"
867
+ | "d"
868
+ | "e"
869
+ | "f"
870
+ | "g"
871
+ | "h"
872
+ | "i"
873
+ | "j"
874
+ | "k"
875
+ | "l"
876
+ | "m"
877
+ | "n"
878
+ | "o"
879
+ | "p"
880
+ | "q"
881
+ | "r"
882
+ | "s"
883
+ | "t"
884
+ | "u"
885
+ | "v"
886
+ | "w"
887
+ | "x"
888
+ | "y"
889
+ | "z";
890
+
856
891
  interface EventAttributes<T extends EventTarget> {
892
+ [key: `on${a_z}${string}`]: string;
893
+
857
894
  // Input Events when using `contentEditable`
858
895
  onBeforeInput?: EventHandler<Event, T>;
859
896
  onBeforeInputCapture?: EventHandler<Event, T>;
package/types/jsx.d.ts CHANGED
@@ -19,7 +19,7 @@ export type VNode =
19
19
  export type PropsWithChildren<P extends Record<string, any> = {}> = P & { children?: Child[] };
20
20
 
21
21
  export interface FC<P = PropsWithChildren<{}>> {
22
- (props: P): VNode | null | Promise<VNode | null> | Generator<VNode> | AsyncGenerator<VNode>;
22
+ (props: P): Child | Promise<ChildType | ChildType[]>;
23
23
  displayName?: string;
24
24
  rendering?: "eager" | "lazy" | (string | {});
25
25
  }