mono-jsx 0.2.0 → 0.3.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.
- package/README.md +58 -16
- package/bin/mono-jsx +1 -42
- package/jsx-runtime.mjs +135 -136
- package/package.json +3 -2
- package/setup.mjs +58 -0
- package/types/css.d.ts +1 -1
- package/types/html.d.ts +3 -2
- package/types/htmx.d.ts +791 -0
- package/types/mono.d.ts +6 -5
- package/types/render.d.ts +42 -1
package/types/html.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference lib="dom" />
|
|
2
|
+
/// <reference path="./htmx.d.ts" />
|
|
2
3
|
|
|
3
4
|
import type * as Aria from "./aria.d.ts";
|
|
4
5
|
import type * as Mono from "./mono.d.ts";
|
|
@@ -42,7 +43,7 @@ export namespace HTML {
|
|
|
42
43
|
| "week";
|
|
43
44
|
|
|
44
45
|
/** Global HTML attributes from https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes */
|
|
45
|
-
interface GlobalAttributes<T extends EventTarget> extends EventAttributes<T>, Aria.Attributes, Mono.BaseAttributes {
|
|
46
|
+
interface GlobalAttributes<T extends EventTarget> extends EventAttributes<T>, Aria.Attributes, Mono.BaseAttributes, JSX.HtmlTag {
|
|
46
47
|
/** Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS). */
|
|
47
48
|
id?: string;
|
|
48
49
|
/** A space-separated list of the classes of the element. Classes allow CSS and JavaScript to select and access specific elements via the [class selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Class_selectors) or functions like the method [`Document.getElementsByClassName()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName). */
|
|
@@ -135,7 +136,7 @@ export namespace HTML {
|
|
|
135
136
|
|
|
136
137
|
interface FormAttributes<T extends EventTarget> extends GlobalAttributes<T> {
|
|
137
138
|
"accept-charset"?: string;
|
|
138
|
-
action: string | (/* mono-jsx specific */ (data: FormData, event: SubmitEvent) =>
|
|
139
|
+
action: string | (/* mono-jsx specific */ (data: FormData, event: SubmitEvent) => unknown | Promise<unknown>);
|
|
139
140
|
autoComplete?: "on" | "off";
|
|
140
141
|
encType?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
141
142
|
method?: "GET" | "POST" | "dialog";
|