@mpen/jsxhtml 0.3.0 → 0.4.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/dist/classnames.d.ts +11 -0
- package/dist/custom/C.d.ts +6 -0
- package/dist/custom/Checkbox.d.ts +5 -0
- package/dist/custom/ColorInput.d.ts +5 -0
- package/dist/custom/DateInput.d.ts +5 -0
- package/dist/custom/DocType.d.ts +6 -0
- package/dist/custom/EmailInput.d.ts +5 -0
- package/dist/custom/Empty.d.ts +4 -0
- package/dist/custom/FileInput.d.ts +5 -0
- package/dist/custom/HtmlDocument.d.ts +5 -0
- package/dist/custom/NumberInput.d.ts +5 -0
- package/dist/custom/PasswordInput.d.ts +5 -0
- package/dist/custom/RadioButton.d.ts +5 -0
- package/dist/custom/RangeInput.d.ts +5 -0
- package/dist/custom/RawHtml.d.ts +6 -0
- package/dist/custom/SearchInput.d.ts +5 -0
- package/dist/custom/TelephoneInput.d.ts +5 -0
- package/dist/custom/TextInput.d.ts +5 -0
- package/dist/custom/TimeInput.d.ts +5 -0
- package/dist/custom/UrlInput.d.ts +5 -0
- package/dist/custom/WeekInput.d.ts +5 -0
- package/dist/custom/index.d.ts +20 -0
- package/dist/custom-components.d.ts +1 -23
- package/dist/htmlspec/IntrinsicElements.d.ts +240 -398
- package/dist/htmlspec/attributes/AriaAttributes.d.ts +11 -0
- package/dist/htmlspec/attributes/ElementAttributes.d.ts +28 -0
- package/dist/htmlspec/attributes/EventHandlers.d.ts +102 -0
- package/dist/htmlspec/attributes/GlobalAttributes.d.ts +11 -0
- package/dist/htmlspec/{GlobalAttributes.d.ts → attributes/StandardGlobalAttributes.d.ts} +26 -107
- package/dist/htmlspec/attributes/index.d.ts +7 -0
- package/dist/htmlspec/elements/a.d.ts +71 -0
- package/dist/htmlspec/elements/abbr.d.ts +4 -0
- package/dist/htmlspec/elements/address.d.ts +4 -0
- package/dist/htmlspec/elements/area.d.ts +66 -0
- package/dist/htmlspec/elements/article.d.ts +4 -0
- package/dist/htmlspec/elements/aside.d.ts +4 -0
- package/dist/htmlspec/elements/audio.d.ts +45 -0
- package/dist/htmlspec/elements/b.d.ts +4 -0
- package/dist/htmlspec/elements/base.d.ts +18 -0
- package/dist/htmlspec/elements/bdi.d.ts +4 -0
- package/dist/htmlspec/elements/bdo.d.ts +4 -0
- package/dist/htmlspec/elements/blockquote.d.ts +8 -0
- package/dist/htmlspec/elements/body.d.ts +92 -0
- package/dist/htmlspec/elements/br.d.ts +4 -0
- package/dist/htmlspec/elements/button.d.ts +103 -0
- package/dist/htmlspec/elements/canvas.d.ts +13 -0
- package/dist/htmlspec/elements/caption.d.ts +4 -0
- package/dist/htmlspec/elements/cite.d.ts +4 -0
- package/dist/htmlspec/elements/code.d.ts +4 -0
- package/dist/htmlspec/elements/col.d.ts +9 -0
- package/dist/htmlspec/elements/colgroup.d.ts +9 -0
- package/dist/htmlspec/elements/data.d.ts +9 -0
- package/dist/htmlspec/elements/datalist.d.ts +4 -0
- package/dist/htmlspec/elements/dd.d.ts +4 -0
- package/dist/htmlspec/elements/del.d.ts +12 -0
- package/dist/htmlspec/elements/details.d.ts +12 -0
- package/dist/htmlspec/elements/dfn.d.ts +4 -0
- package/dist/htmlspec/elements/dialog.d.ts +17 -0
- package/dist/htmlspec/elements/div.d.ts +4 -0
- package/dist/htmlspec/elements/dl.d.ts +4 -0
- package/dist/htmlspec/elements/dt.d.ts +4 -0
- package/dist/htmlspec/elements/element-types.d.ts +1 -0
- package/dist/htmlspec/elements/em.d.ts +4 -0
- package/dist/htmlspec/elements/embed.d.ts +21 -0
- package/dist/htmlspec/elements/fencedframe.d.ts +23 -0
- package/dist/htmlspec/elements/fieldset.d.ts +16 -0
- package/dist/htmlspec/elements/figcaption.d.ts +4 -0
- package/dist/htmlspec/elements/figure.d.ts +4 -0
- package/dist/htmlspec/elements/footer.d.ts +4 -0
- package/dist/htmlspec/elements/form.d.ts +61 -0
- package/dist/htmlspec/elements/h1.d.ts +4 -0
- package/dist/htmlspec/elements/h2.d.ts +4 -0
- package/dist/htmlspec/elements/h3.d.ts +4 -0
- package/dist/htmlspec/elements/h4.d.ts +4 -0
- package/dist/htmlspec/elements/h5.d.ts +4 -0
- package/dist/htmlspec/elements/h6.d.ts +4 -0
- package/dist/htmlspec/elements/head.d.ts +4 -0
- package/dist/htmlspec/elements/header.d.ts +4 -0
- package/dist/htmlspec/elements/hgroup.d.ts +4 -0
- package/dist/htmlspec/elements/hr.d.ts +4 -0
- package/dist/htmlspec/elements/html.d.ts +8 -0
- package/dist/htmlspec/elements/i.d.ts +4 -0
- package/dist/htmlspec/elements/iframe.d.ts +82 -0
- package/dist/htmlspec/elements/img.d.ts +90 -0
- package/dist/htmlspec/elements/index.d.ts +114 -0
- package/dist/htmlspec/elements/input.d.ts +189 -0
- package/dist/htmlspec/elements/ins.d.ts +12 -0
- package/dist/htmlspec/elements/kbd.d.ts +4 -0
- package/dist/htmlspec/elements/label.d.ts +8 -0
- package/dist/htmlspec/elements/legend.d.ts +4 -0
- package/dist/htmlspec/elements/li.d.ts +19 -0
- package/dist/htmlspec/elements/link.d.ts +77 -0
- package/dist/htmlspec/elements/main.d.ts +4 -0
- package/dist/htmlspec/elements/map.d.ts +8 -0
- package/dist/htmlspec/elements/mark.d.ts +4 -0
- package/dist/htmlspec/elements/menu.d.ts +4 -0
- package/dist/htmlspec/elements/meta.d.ts +24 -0
- package/dist/htmlspec/elements/meter.d.ts +29 -0
- package/dist/htmlspec/elements/nav.d.ts +4 -0
- package/dist/htmlspec/elements/noscript.d.ts +4 -0
- package/dist/htmlspec/elements/object.d.ts +29 -0
- package/dist/htmlspec/elements/ol.d.ts +24 -0
- package/dist/htmlspec/elements/optgroup.d.ts +12 -0
- package/dist/htmlspec/elements/option.d.ts +21 -0
- package/dist/htmlspec/elements/output.d.ts +16 -0
- package/dist/htmlspec/elements/p.d.ts +4 -0
- package/dist/htmlspec/elements/picture.d.ts +4 -0
- package/dist/htmlspec/elements/pre.d.ts +4 -0
- package/dist/htmlspec/elements/progress.d.ts +13 -0
- package/dist/htmlspec/elements/q.d.ts +8 -0
- package/dist/htmlspec/elements/rp.d.ts +4 -0
- package/dist/htmlspec/elements/rt.d.ts +4 -0
- package/dist/htmlspec/elements/ruby.d.ts +4 -0
- package/dist/htmlspec/elements/s.d.ts +4 -0
- package/dist/htmlspec/elements/samp.d.ts +4 -0
- package/dist/htmlspec/elements/script.d.ts +57 -0
- package/dist/htmlspec/elements/search.d.ts +4 -0
- package/dist/htmlspec/elements/section.d.ts +4 -0
- package/dist/htmlspec/elements/select.d.ts +37 -0
- package/dist/htmlspec/elements/selectedcontent.d.ts +7 -0
- package/dist/htmlspec/elements/slot.d.ts +8 -0
- package/dist/htmlspec/elements/small.d.ts +4 -0
- package/dist/htmlspec/elements/source.d.ts +33 -0
- package/dist/htmlspec/elements/span.d.ts +4 -0
- package/dist/htmlspec/elements/strong.d.ts +4 -0
- package/dist/htmlspec/elements/style.d.ts +21 -0
- package/dist/htmlspec/elements/sub.d.ts +4 -0
- package/dist/htmlspec/elements/summary.d.ts +4 -0
- package/dist/htmlspec/elements/sup.d.ts +4 -0
- package/dist/htmlspec/elements/table.d.ts +4 -0
- package/dist/htmlspec/elements/tbody.d.ts +4 -0
- package/dist/htmlspec/elements/td.d.ts +17 -0
- package/dist/htmlspec/elements/template.d.ts +29 -0
- package/dist/htmlspec/elements/textarea.d.ts +66 -0
- package/dist/htmlspec/elements/tfoot.d.ts +4 -0
- package/dist/htmlspec/elements/th.d.ts +31 -0
- package/dist/htmlspec/elements/thead.d.ts +4 -0
- package/dist/htmlspec/elements/time.d.ts +8 -0
- package/dist/htmlspec/elements/title.d.ts +4 -0
- package/dist/htmlspec/elements/tr.d.ts +4 -0
- package/dist/htmlspec/elements/track.d.ts +31 -0
- package/dist/htmlspec/elements/u.d.ts +4 -0
- package/dist/htmlspec/elements/ul.d.ts +12 -0
- package/dist/htmlspec/elements/var.d.ts +4 -0
- package/dist/htmlspec/elements/video.d.ts +66 -0
- package/dist/htmlspec/elements/wbr.d.ts +4 -0
- package/dist/index.cjs +142 -7
- package/dist/index.mjs +114 -9
- package/dist/internal/dev.d.ts +1 -0
- package/dist/internal/kitchen-sink-dev.d.ts +7 -0
- package/dist/internal/kitchen-sink.d.ts +2 -0
- package/dist/internal/type-assert.d.ts +39 -0
- package/dist/jsx-dev-runtime.cjs +1 -2
- package/dist/jsx-dev-runtime.mjs +2 -3
- package/dist/{jsx-runtime-cimCxEOU.js → jsx-runtime-BQPDXeiv.js} +27 -13
- package/dist/{jsx-runtime-Dh9PxNQe.js → jsx-runtime-DlHYwToA.js} +28 -14
- package/dist/jsx-runtime.cjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/jsx-types.d.ts +6 -26
- package/package.json +93 -86
- package/dist/htmlspec/AnchorElement.d.ts +0 -83
- package/dist/htmlspec/ButtonElement.d.ts +0 -55
- package/dist/htmlspec/InputAttributes.d.ts +0 -221
- package/dist/htmlspec/ScriptElement.d.ts +0 -38
- package/dist/htmlspec/StyleAttributes.d.ts +0 -19
- /package/dist/{dev.d.ts → classnames.test.d.ts} +0 -0
- /package/dist/{log.d.ts → internal/log.d.ts} +0 -0
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as jsx, l as isJsxComponent, e as JsxComment, h as JsxFragment } from "./jsx-runtime-DlHYwToA.js";
|
|
2
2
|
|
|
3
|
-
export { F as Fragment, m as JSX } from "./jsx-runtime-
|
|
3
|
+
export { F as Fragment, m as JSX } from "./jsx-runtime-DlHYwToA.js";
|
|
4
4
|
|
|
5
5
|
function jsxDEV(tag, props, key, isStaticChildren, source, self) {
|
|
6
6
|
let node = jsx(...arguments);
|
|
7
|
-
if (process.env.JSXHTML_DEV) return node;
|
|
8
7
|
if (isJsxComponent(tag) && !(node instanceof JsxComment)) {
|
|
9
8
|
const name = tag.displayName ?? tag.name ?? "Unknown";
|
|
10
9
|
node = new JsxFragment([ new JsxComment(`<${name}>`), node, new JsxComment(`</${name}>`) ]);
|
|
@@ -1318,21 +1318,35 @@ const entityMap = {
|
|
|
1318
1318
|
ffl: "ffllig"
|
|
1319
1319
|
};
|
|
1320
1320
|
|
|
1321
|
-
function
|
|
1322
|
-
if (
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1321
|
+
function pushClassNames(value, classes) {
|
|
1322
|
+
if (value == null || value === false || value === true) return;
|
|
1323
|
+
if (typeof value === "string") {
|
|
1324
|
+
if (value) classes.push(value);
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
if (typeof value === "number" || typeof value === "bigint") {
|
|
1328
|
+
classes.push(String(value));
|
|
1329
|
+
return;
|
|
1330
|
+
}
|
|
1331
|
+
if (Array.isArray(value)) {
|
|
1332
|
+
for (const item of value) {
|
|
1333
|
+
pushClassNames(item, classes);
|
|
1329
1334
|
}
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1335
|
+
return;
|
|
1336
|
+
}
|
|
1337
|
+
for (const key of Object.keys(value)) {
|
|
1338
|
+
if (value[key]) {
|
|
1339
|
+
classes.push(key);
|
|
1333
1340
|
}
|
|
1334
1341
|
}
|
|
1335
|
-
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
function classCat(...values) {
|
|
1345
|
+
const classes = [];
|
|
1346
|
+
for (const value of values) {
|
|
1347
|
+
pushClassNames(value, classes);
|
|
1348
|
+
}
|
|
1349
|
+
return classes.join(" ");
|
|
1336
1350
|
}
|
|
1337
1351
|
|
|
1338
1352
|
function isFunction$1(obj) {
|
|
@@ -1446,7 +1460,7 @@ function attrKvPair(rawAttr, rawVal) {
|
|
|
1446
1460
|
return null;
|
|
1447
1461
|
}
|
|
1448
1462
|
if (rawAttr === "class" && !isString$1(rawVal)) {
|
|
1449
|
-
rawVal =
|
|
1463
|
+
rawVal = classCat(rawVal);
|
|
1450
1464
|
}
|
|
1451
1465
|
if (rawAttr === "style" && isPlainObject(rawVal)) {
|
|
1452
1466
|
rawVal = styleObjectToString(rawVal);
|
|
@@ -1316,21 +1316,35 @@ const entityMap = {
|
|
|
1316
1316
|
ffl: "ffllig"
|
|
1317
1317
|
};
|
|
1318
1318
|
|
|
1319
|
-
function
|
|
1320
|
-
if (
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1319
|
+
function pushClassNames(value, classes) {
|
|
1320
|
+
if (value == null || value === false || value === true) return;
|
|
1321
|
+
if (typeof value === "string") {
|
|
1322
|
+
if (value) classes.push(value);
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
if (typeof value === "number" || typeof value === "bigint") {
|
|
1326
|
+
classes.push(String(value));
|
|
1327
|
+
return;
|
|
1328
|
+
}
|
|
1329
|
+
if (Array.isArray(value)) {
|
|
1330
|
+
for (const item of value) {
|
|
1331
|
+
pushClassNames(item, classes);
|
|
1327
1332
|
}
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
for (const key of Object.keys(value)) {
|
|
1336
|
+
if (value[key]) {
|
|
1337
|
+
classes.push(key);
|
|
1331
1338
|
}
|
|
1332
1339
|
}
|
|
1333
|
-
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
function classCat(...values) {
|
|
1343
|
+
const classes = [];
|
|
1344
|
+
for (const value of values) {
|
|
1345
|
+
pushClassNames(value, classes);
|
|
1346
|
+
}
|
|
1347
|
+
return classes.join(" ");
|
|
1334
1348
|
}
|
|
1335
1349
|
|
|
1336
1350
|
function isFunction$1(obj) {
|
|
@@ -1444,7 +1458,7 @@ function attrKvPair(rawAttr, rawVal) {
|
|
|
1444
1458
|
return null;
|
|
1445
1459
|
}
|
|
1446
1460
|
if (rawAttr === "class" && !isString$1(rawVal)) {
|
|
1447
|
-
rawVal =
|
|
1461
|
+
rawVal = classCat(rawVal);
|
|
1448
1462
|
}
|
|
1449
1463
|
if (rawAttr === "style" && isPlainObject(rawVal)) {
|
|
1450
1464
|
rawVal = styleObjectToString(rawVal);
|
|
@@ -2336,4 +2350,4 @@ function Fragment({children}) {
|
|
|
2336
2350
|
return new JsxFragment(children);
|
|
2337
2351
|
}
|
|
2338
2352
|
|
|
2339
|
-
export { EMPTY as E, Fragment as F,
|
|
2353
|
+
export { EMPTY as E, Fragment as F, JsxDocType as J, jsxs as a, JsxRawHtml as b, js as c, JsxElement as d, JsxComment as e, flattenString as f, JsxEmpty as g, JsxFragment as h, isJsxNode as i, jsx as j, JsxNode as k, isJsxComponent as l, JSX as m };
|
package/dist/jsx-runtime.cjs
CHANGED
package/dist/jsx-runtime.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as Fragment, m as JSX,
|
|
1
|
+
export { F as Fragment, m as JSX, j as jsx, a as jsxs } from "./jsx-runtime-DlHYwToA.js";
|
package/dist/jsx-types.d.ts
CHANGED
|
@@ -1,36 +1,16 @@
|
|
|
1
1
|
import type { JsxNode } from './jsx-node';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
import type { Class } from 'classcat';
|
|
5
|
-
import type { Properties, PropertiesHyphen } from 'csstype';
|
|
6
|
-
export interface Stringable {
|
|
7
|
-
toString(): string;
|
|
8
|
-
}
|
|
2
|
+
import type { AnyAttributes, AttrArr, AttrKvPair, AttrObj, AttributeValue, Attributes, ClassNames, CommonAttributes, JsxChildren, JsxRenderable, SpecialAttributes, Stringable, StyleObject } from './htmlspec/attributes/ElementAttributes';
|
|
3
|
+
export type { Stringable };
|
|
9
4
|
export type PlainObject = Record<PropertyKey, unknown>;
|
|
10
|
-
export type ClassNames
|
|
11
|
-
export type StyleObject = Properties | PropertiesHyphen;
|
|
12
|
-
export type AttributeValue = Stringable | StyleObject | ClassNames;
|
|
13
|
-
export type AttrKvPair = [name: string, value: AttributeValue];
|
|
14
|
-
export type AttrArr = AttrKvPair[];
|
|
15
|
-
export type AttrObj = Record<string, AttributeValue>;
|
|
16
|
-
export type Attributes = AttrObj | AttrArr;
|
|
5
|
+
export type { ClassNames, StyleObject, AttributeValue, AttrKvPair, AttrArr, AttrObj, Attributes };
|
|
17
6
|
export type UnkFn = (...args: unknown[]) => unknown;
|
|
18
7
|
export type AnyFn = (...args: any[]) => any;
|
|
19
8
|
export type HtmlSafe = {
|
|
20
9
|
__html: string;
|
|
21
10
|
};
|
|
22
|
-
export type JsxRenderable
|
|
23
|
-
export type
|
|
24
|
-
export type
|
|
25
|
-
children?: JsxChildren;
|
|
26
|
-
style?: StyleObject | string;
|
|
27
|
-
/**
|
|
28
|
-
* CSS class.
|
|
29
|
-
*/
|
|
30
|
-
class?: ClassNames;
|
|
31
|
-
};
|
|
32
|
-
export type CommonProps<E = HTMLElement> = Override<AllGlobalAttributes<E>, SpecialProps>;
|
|
33
|
-
export type AnyAttributes<E = HTMLElement> = Override<AttrObj, CommonProps<E>>;
|
|
11
|
+
export type { JsxRenderable, JsxChildren };
|
|
12
|
+
export type { SpecialAttributes };
|
|
13
|
+
export type { CommonAttributes, AnyAttributes };
|
|
34
14
|
export type JsxComponent<P = AnyAttributes> = ((props: P) => JsxNode) & {
|
|
35
15
|
displayName?: string;
|
|
36
16
|
name?: string;
|
package/package.json
CHANGED
|
@@ -1,90 +1,97 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
"name": "@mpen/jsxhtml",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"packageManager": "bun@1.3.7",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/index.mjs",
|
|
8
|
+
"require": "./dist/index.cjs",
|
|
9
|
+
"types": "./dist/index.d.ts"
|
|
10
|
+
},
|
|
11
|
+
"./jsx-runtime": {
|
|
12
|
+
"import": "./dist/jsx-runtime.mjs",
|
|
13
|
+
"require": "./dist/jsx-runtime.cjs",
|
|
14
|
+
"types": "./dist/jsx-runtime.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"./jsx-dev-runtime": {
|
|
17
|
+
"import": "./dist/jsx-dev-runtime.mjs",
|
|
18
|
+
"require": "./dist/jsx-dev-runtime.cjs",
|
|
19
|
+
"types": "./dist/jsx-dev-runtime.d.ts"
|
|
20
|
+
}
|
|
10
21
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
"type": "module",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"private": false,
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"author": {
|
|
29
|
+
"name": "Mark Penner",
|
|
30
|
+
"email": "npm@mpen.ca",
|
|
31
|
+
"url": "https://github.com/mnpenner"
|
|
15
32
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
"serve": "^14.2.4",
|
|
81
|
-
"tslib": "^2.8.1",
|
|
82
|
-
"typescript": "^5.8.3"
|
|
83
|
-
},
|
|
84
|
-
"optionalDependencies": {
|
|
85
|
-
"elysia": ">=1.2.25"
|
|
86
|
-
},
|
|
87
|
-
"dependencies": {
|
|
88
|
-
"classcat": "^5.0.5"
|
|
89
|
-
}
|
|
33
|
+
"keywords": [
|
|
34
|
+
"jsx",
|
|
35
|
+
"tsx",
|
|
36
|
+
"html",
|
|
37
|
+
"render",
|
|
38
|
+
"server",
|
|
39
|
+
"ssr"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"_dev:build": "rollup -cw",
|
|
43
|
+
"_dev:serve": "serve -l tcp://0.0.0.0:8080",
|
|
44
|
+
"dev": "run-p \"dev:**\"",
|
|
45
|
+
"dev:run": "NODE_ENV=production bun --watch run --jsx=react-jsx --jsx-import-source=. src/internal/dev.tsx",
|
|
46
|
+
"dev:build": "NODE_ENV=production bun --watch --no-clear-screen build src/internal/dev.tsx --outdir=dist --packages=external --external '*'",
|
|
47
|
+
"typecheck": "tsc --noEmit src/internal/dev.tsx --jsx react-jsx --jsxImportSource . --moduleResolution bundler --module esnext --lib dom,esnext --target esnext",
|
|
48
|
+
"test:types": "tsc --noEmit && echo \"tsc: no errors\"",
|
|
49
|
+
"test:unit": "NODE_ENV=production bun test --jsx-import-source=@mpen/jsxhtml",
|
|
50
|
+
"test": "run-p 'test:*'",
|
|
51
|
+
"bundle:clean": "rm -rf dist/",
|
|
52
|
+
"bundle:build": "NODE_ENV=production rollup -c",
|
|
53
|
+
"bundle": "run-s bundle:clean bundle:build",
|
|
54
|
+
"commit": "VER=$(jq -r '.version' package.json) && hg ci -m \"Commit v$VER\" && hg tag \"v$VER\"",
|
|
55
|
+
"bumpver": "npm version patch",
|
|
56
|
+
"release": "run-s test bundle bumpver commit && npm publish --access=public && hg pushall",
|
|
57
|
+
"lint": "bun run --bun eslint --fix --"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@mpen/is-type": "^0.1.15",
|
|
61
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
62
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
63
|
+
"@rollup/plugin-replace": "^5.0.7",
|
|
64
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
65
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
66
|
+
"@types/eslint": "^8.56.12",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
68
|
+
"@typescript-eslint/parser": "^8.29.1",
|
|
69
|
+
"bun-types": "^1.2.15",
|
|
70
|
+
"elysia": "^1.2.25",
|
|
71
|
+
"eslint": "^8.57.1",
|
|
72
|
+
"eslint-plugin-react-compiler": "^19.0.0-beta-e993439-20250405",
|
|
73
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
74
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
75
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
76
|
+
"js-serialize": "^0.6.0",
|
|
77
|
+
"npm-run-all": "^4.1.5",
|
|
78
|
+
"rimraf": "^5.0.10",
|
|
79
|
+
"rollup": "^4.40.0",
|
|
80
|
+
"serve": "^14.2.4",
|
|
81
|
+
"tslib": "^2.8.1",
|
|
82
|
+
"typescript": "^5.8.3"
|
|
83
|
+
},
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"csstype": "3.x",
|
|
86
|
+
"elysia": "1.x"
|
|
87
|
+
},
|
|
88
|
+
"peerDependenciesMeta": {
|
|
89
|
+
"elysia": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"csstype": {
|
|
93
|
+
"optional": false
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"dependencies": {}
|
|
90
97
|
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
export type AnchorElement = {
|
|
2
|
-
/**
|
|
3
|
-
* Causes the browser to treat the linked URL as a download. Can be used with or without a filename value:
|
|
4
|
-
*
|
|
5
|
-
* - Without a value, the browser will suggest a filename/extension, generated from various sources:
|
|
6
|
-
* - The `Content-Disposition` HTTP header
|
|
7
|
-
* - The final segment in the URL path
|
|
8
|
-
* - The media type (from the Content-Type header, the start of a data: URL, or Blob.type for a blob: URL)
|
|
9
|
-
* - `filename`: defining a value suggests it as the filename. / and \ characters are converted to underscores
|
|
10
|
-
* (_). Filesystems may forbid other characters in filenames, so browsers will adjust the suggested name if
|
|
11
|
-
* necessary.
|
|
12
|
-
*/
|
|
13
|
-
download?: true | string;
|
|
14
|
-
/**
|
|
15
|
-
* The URL that the hyperlink points to. Links are not restricted to HTTP-based URLs — they can use any URL scheme
|
|
16
|
-
* supported by browsers:
|
|
17
|
-
*
|
|
18
|
-
* - Sections of a page with document fragments
|
|
19
|
-
* - Specific text portions with text fragments
|
|
20
|
-
* - Pieces of media files with media fragments
|
|
21
|
-
* - Telephone numbers with tel: URLs
|
|
22
|
-
* - Email addresses with mailto: URLs
|
|
23
|
-
* - SMS text messages with sms: URLs
|
|
24
|
-
* - While web browsers may not support other URL schemes, websites can with registerProtocolHandler()
|
|
25
|
-
*/
|
|
26
|
-
href?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Hints at the human language of the linked URL. No built-in functionality. Allowed values are the same as the
|
|
29
|
-
* global lang attribute.
|
|
30
|
-
*/
|
|
31
|
-
hreflang?: string;
|
|
32
|
-
/**
|
|
33
|
-
* A space-separated list of URLs. When the link is followed, the browser will send POST requests with the body
|
|
34
|
-
* PING to the URLs. Typically for tracking.
|
|
35
|
-
*/
|
|
36
|
-
ping?: string;
|
|
37
|
-
/**
|
|
38
|
-
* How much of the referrer to send when following the link.
|
|
39
|
-
*/
|
|
40
|
-
referrerpolicy?: ReferrerPolicy | string;
|
|
41
|
-
/**
|
|
42
|
-
* The relationship of the linked URL as space-separated link types.
|
|
43
|
-
*/
|
|
44
|
-
rel?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Where to display the linked URL, as the name for a browsing context (a tab, window, or <iframe>).
|
|
47
|
-
*/
|
|
48
|
-
target?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
49
|
-
/**
|
|
50
|
-
* Hints at the linked URL's format with a MIME type. No built-in functionality.
|
|
51
|
-
*/
|
|
52
|
-
type?: string;
|
|
53
|
-
/**
|
|
54
|
-
* @deprecated
|
|
55
|
-
*/
|
|
56
|
-
charset?: string;
|
|
57
|
-
/**
|
|
58
|
-
* @deprecated
|
|
59
|
-
*/
|
|
60
|
-
coords?: string;
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated
|
|
63
|
-
*/
|
|
64
|
-
name?: string;
|
|
65
|
-
/**
|
|
66
|
-
* @deprecated
|
|
67
|
-
*/
|
|
68
|
-
rev?: string;
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated
|
|
71
|
-
*/
|
|
72
|
-
shape?: string;
|
|
73
|
-
};
|
|
74
|
-
export declare const enum ReferrerPolicy {
|
|
75
|
-
NoReferrer = "no-referrer",
|
|
76
|
-
NoReferrerWhenDowngrade = "no-referrer-when-downgrade",
|
|
77
|
-
Origin = "origin",
|
|
78
|
-
OriginWhenCrossOrigin = "origin-when-cross-origin",
|
|
79
|
-
SameOrigin = "same-origin",
|
|
80
|
-
StrictOrigin = "strict-origin",
|
|
81
|
-
StrictOriginWhenCrossOrigin = "strict-origin-when-cross-origin",
|
|
82
|
-
UnsafeUrl = "unsafe-url"
|
|
83
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* All standard attributes for the `<button>` HTML element.
|
|
3
|
-
*/
|
|
4
|
-
export type ButtonAttributes = {
|
|
5
|
-
/** Automatically focus the button when the page loads. */
|
|
6
|
-
autofocus?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Action to perform on the controlled element:
|
|
9
|
-
* - "show-modal" | "close" | "request-close"
|
|
10
|
-
* - "show-popover" | "hide-popover" | "toggle-popover"
|
|
11
|
-
* - "--custom": custom command (must start with `--`)
|
|
12
|
-
*/
|
|
13
|
-
command?: string;
|
|
14
|
-
/** ID of the element this button controls as a command button. */
|
|
15
|
-
commandfor?: string;
|
|
16
|
-
/** Whether the button is disabled and non-interactive. */
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/** Associates the button with a `<form>` by ID. */
|
|
19
|
-
form?: string;
|
|
20
|
-
/** URL to submit to when clicked. Overrides form’s `action`. */
|
|
21
|
-
formaction?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Encoding type for submitted data:
|
|
24
|
-
* - "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"
|
|
25
|
-
*/
|
|
26
|
-
formenctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
27
|
-
/**
|
|
28
|
-
* Method for submitting the form:
|
|
29
|
-
* - "get" | "post" | "dialog"
|
|
30
|
-
*/
|
|
31
|
-
formmethod?: 'get' | 'post' | 'dialog';
|
|
32
|
-
/** Skip form validation on submit. */
|
|
33
|
-
formnovalidate?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Browsing context for the response:
|
|
36
|
-
* - "_self" | "_blank" | "_parent" | "_top" | custom target
|
|
37
|
-
*/
|
|
38
|
-
formtarget?: string;
|
|
39
|
-
/** Name of the button, submitted as name=value with the form. */
|
|
40
|
-
name?: string;
|
|
41
|
-
/** ID of the popover element controlled by this button. */
|
|
42
|
-
popovertarget?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Action to perform on the popover:
|
|
45
|
-
* - "show" | "hide" | "toggle"
|
|
46
|
-
*/
|
|
47
|
-
popovertargetaction?: 'show' | 'hide' | 'toggle';
|
|
48
|
-
/**
|
|
49
|
-
* Button type:
|
|
50
|
-
* - "submit" (default), "reset", or "button"
|
|
51
|
-
*/
|
|
52
|
-
type?: 'submit' | 'reset' | 'button';
|
|
53
|
-
/** Value submitted with the form when using this button. */
|
|
54
|
-
value?: string;
|
|
55
|
-
};
|