@faiwer/react 0.8.1 → 0.8.3
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/jsx.d.ts +121 -0
- package/package.json +5 -2
package/dist/jsx.d.ts
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type JsxElement,
|
|
3
|
+
type TagProps,
|
|
4
|
+
type SvgTagProps,
|
|
5
|
+
type SvgRootProps,
|
|
6
|
+
} from './types';
|
|
7
|
+
|
|
8
|
+
export {};
|
|
9
|
+
|
|
10
|
+
declare global {
|
|
11
|
+
namespace JSX {
|
|
12
|
+
type Element = JsxElement;
|
|
13
|
+
|
|
14
|
+
interface IntrinsicElements {
|
|
15
|
+
// Document structure
|
|
16
|
+
html: TagProps<HTMLHtmlElement>;
|
|
17
|
+
head: TagProps<HTMLHeadElement>;
|
|
18
|
+
body: TagProps<HTMLBodyElement>;
|
|
19
|
+
title: TagProps<HTMLTitleElement>;
|
|
20
|
+
meta: TagProps<HTMLMetaElement>;
|
|
21
|
+
link: TagProps<HTMLLinkElement>;
|
|
22
|
+
script: TagProps<HTMLScriptElement>;
|
|
23
|
+
style: TagProps<HTMLStyleElement>;
|
|
24
|
+
|
|
25
|
+
// Content sectioning
|
|
26
|
+
h1: TagProps<HTMLHeadingElement>;
|
|
27
|
+
h2: TagProps<HTMLHeadingElement>;
|
|
28
|
+
h3: TagProps<HTMLHeadingElement>;
|
|
29
|
+
h4: TagProps<HTMLHeadingElement>;
|
|
30
|
+
h5: TagProps<HTMLHeadingElement>;
|
|
31
|
+
h6: TagProps<HTMLHeadingElement>;
|
|
32
|
+
|
|
33
|
+
// Text content
|
|
34
|
+
div: TagProps<HTMLDivElement>;
|
|
35
|
+
p: TagProps<HTMLParagraphElement>;
|
|
36
|
+
span: TagProps<HTMLSpanElement>;
|
|
37
|
+
pre: TagProps<HTMLPreElement>;
|
|
38
|
+
blockquote: TagProps<HTMLQuoteElement>;
|
|
39
|
+
ul: TagProps<HTMLUListElement>;
|
|
40
|
+
ol: TagProps<HTMLOListElement>;
|
|
41
|
+
li: TagProps<HTMLLIElement>;
|
|
42
|
+
dl: TagProps<HTMLDListElement>;
|
|
43
|
+
hr: TagProps<HTMLHRElement>;
|
|
44
|
+
br: TagProps<HTMLBRElement>;
|
|
45
|
+
|
|
46
|
+
// Inline text semantics
|
|
47
|
+
a: TagProps<HTMLAnchorElement>;
|
|
48
|
+
q: TagProps<HTMLQuoteElement>;
|
|
49
|
+
time: TagProps<HTMLTimeElement>;
|
|
50
|
+
|
|
51
|
+
// Image and multimedia
|
|
52
|
+
img: TagProps<HTMLImageElement>;
|
|
53
|
+
video: TagProps<HTMLVideoElement>;
|
|
54
|
+
audio: TagProps<HTMLAudioElement>;
|
|
55
|
+
source: TagProps<HTMLSourceElement>;
|
|
56
|
+
track: TagProps<HTMLTrackElement>;
|
|
57
|
+
canvas: TagProps<HTMLCanvasElement>;
|
|
58
|
+
|
|
59
|
+
// Embedded content
|
|
60
|
+
iframe: TagProps<HTMLIFrameElement>;
|
|
61
|
+
embed: TagProps<HTMLEmbedElement>;
|
|
62
|
+
object: TagProps<HTMLObjectElement>;
|
|
63
|
+
param: TagProps<HTMLParamElement>;
|
|
64
|
+
|
|
65
|
+
// Forms
|
|
66
|
+
form: TagProps<HTMLFormElement>;
|
|
67
|
+
input: TagProps<HTMLInputElement>;
|
|
68
|
+
button: TagProps<HTMLButtonElement>;
|
|
69
|
+
select: TagProps<HTMLSelectElement>;
|
|
70
|
+
option: TagProps<HTMLOptionElement>;
|
|
71
|
+
optgroup: TagProps<HTMLOptGroupElement>;
|
|
72
|
+
textarea: TagProps<HTMLTextAreaElement>;
|
|
73
|
+
label: TagProps<HTMLLabelElement>;
|
|
74
|
+
fieldset: TagProps<HTMLFieldSetElement>;
|
|
75
|
+
legend: TagProps<HTMLLegendElement>;
|
|
76
|
+
datalist: TagProps<HTMLDataListElement>;
|
|
77
|
+
output: TagProps<HTMLOutputElement>;
|
|
78
|
+
progress: TagProps<HTMLProgressElement>;
|
|
79
|
+
meter: TagProps<HTMLMeterElement>;
|
|
80
|
+
|
|
81
|
+
// Interactive elements
|
|
82
|
+
details: TagProps<HTMLDetailsElement>;
|
|
83
|
+
summary: TagProps<HTMLElement>;
|
|
84
|
+
dialog: TagProps<HTMLDialogElement>;
|
|
85
|
+
|
|
86
|
+
// Tables
|
|
87
|
+
table: TagProps<HTMLTableElement>;
|
|
88
|
+
thead: TagProps<HTMLTableSectionElement>;
|
|
89
|
+
tbody: TagProps<HTMLTableSectionElement>;
|
|
90
|
+
tfoot: TagProps<HTMLTableSectionElement>;
|
|
91
|
+
tr: TagProps<HTMLTableRowElement>;
|
|
92
|
+
td: TagProps<HTMLTableCellElement>;
|
|
93
|
+
th: TagProps<HTMLTableCellElement>;
|
|
94
|
+
caption: TagProps<HTMLTableCaptionElement>;
|
|
95
|
+
colgroup: TagProps<HTMLTableColElement>;
|
|
96
|
+
col: TagProps<HTMLTableColElement>;
|
|
97
|
+
|
|
98
|
+
// SVG elements
|
|
99
|
+
svg: SvgRootProps;
|
|
100
|
+
circle: SvgTagProps;
|
|
101
|
+
ellipse: SvgTagProps;
|
|
102
|
+
line: SvgTagProps;
|
|
103
|
+
path: SvgTagProps;
|
|
104
|
+
polygon: SvgTagProps;
|
|
105
|
+
polyline: SvgTagProps;
|
|
106
|
+
rect: SvgTagProps;
|
|
107
|
+
g: SvgTagProps;
|
|
108
|
+
defs: SvgTagProps;
|
|
109
|
+
clipPath: SvgTagProps;
|
|
110
|
+
mask: SvgTagProps;
|
|
111
|
+
pattern: SvgTagProps;
|
|
112
|
+
image: SvgTagProps;
|
|
113
|
+
text: SvgTagProps;
|
|
114
|
+
tspan: SvgTagProps;
|
|
115
|
+
use: SvgTagProps;
|
|
116
|
+
|
|
117
|
+
// Fallback for any other element
|
|
118
|
+
[elemName: string]: TagProps<HTMLElement>;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faiwer/react",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "A hobby project. A naive and simplified React implementation",
|
|
5
5
|
"keywords": ["react", "jsx", "hooks", "virtual-dom", "frontend", "ui-library"],
|
|
6
6
|
"repository": {
|
|
@@ -29,10 +29,13 @@
|
|
|
29
29
|
"./jsx-dev-runtime": {
|
|
30
30
|
"types": "./dist/jsx-dev-runtime.d.ts",
|
|
31
31
|
"default": "./dist/jsx-dev-runtime.js"
|
|
32
|
+
},
|
|
33
|
+
"./jsx": {
|
|
34
|
+
"types": "./dist/jsx.d.ts"
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
"scripts": {
|
|
35
|
-
"build": "npm run clean && npx tsgo -p tsconfig.build.json && npx tsc-alias -p tsconfig.build.json",
|
|
38
|
+
"build": "npm run clean && npx tsgo -p tsconfig.build.json && npx tsc-alias -p tsconfig.build.json && cp src/jsx.d.ts dist/jsx.d.ts",
|
|
36
39
|
"clean": "rm -rf dist",
|
|
37
40
|
"prepublishOnly": "npm run build",
|
|
38
41
|
"test": "jest",
|