jsx-framework-pb 0.0.4 → 0.0.6
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/index.d.d.ts +36 -0
- package/package.json +1 -1
- package/dist/index.d.ts +0 -6
- package/dist/jsx-dev-runtime.d.ts +0 -7
- package/dist/jsx-runtime.d.ts +0 -7
- package/dist/types-CfBV6pAD.d.ts +0 -17
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference path="./jsx.d.ts" />
|
|
2
|
+
declare namespace JSX {
|
|
3
|
+
export type Element = VNode;
|
|
4
|
+
|
|
5
|
+
export interface IntrinsicElements {
|
|
6
|
+
[elemName: string]: any;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type Key = string | number | null;
|
|
11
|
+
|
|
12
|
+
type PropsWithChildren<P = {}> =
|
|
13
|
+
P & { children?: JSX.Element | JSX.Element[] };
|
|
14
|
+
|
|
15
|
+
interface VNode<P = any> {
|
|
16
|
+
type: string | Function;
|
|
17
|
+
props: P;
|
|
18
|
+
key: Key;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare function jsx(
|
|
22
|
+
type: VNode["type"],
|
|
23
|
+
props: any,
|
|
24
|
+
key?: string | number | null
|
|
25
|
+
): VNode {
|
|
26
|
+
return { type, props, key: key ?? null };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare const jsxs = jsx;
|
|
30
|
+
declare const Fragment = Symbol("Fragment");
|
|
31
|
+
|
|
32
|
+
declare function render(vnode: any, container: HTMLElement) {
|
|
33
|
+
container.appendChild(createNode(vnode));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Fragment, JSX, type Key, type PropsWithChildren, type VNode, jsx, jsxs, render };
|
package/package.json
CHANGED
package/dist/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { V as VNode } from './types-CfBV6pAD.js';
|
|
2
|
-
|
|
3
|
-
declare function jsxDEV(type: VNode['type'], props: any, key?: string | number | null, _isStaticChildren?: boolean, _source?: unknown, _self?: unknown): VNode;
|
|
4
|
-
declare const jsxsDEV: typeof jsxDEV;
|
|
5
|
-
declare const Fragment: unique symbol;
|
|
6
|
-
|
|
7
|
-
export { Fragment, jsxDEV, jsxsDEV };
|
package/dist/jsx-runtime.d.ts
DELETED
package/dist/types-CfBV6pAD.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare namespace JSX {
|
|
2
|
-
type Element = VNode;
|
|
3
|
-
interface IntrinsicElements {
|
|
4
|
-
[elemName: string]: any;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
type Key = string | number | null;
|
|
8
|
-
type PropsWithChildren<P = {}> = P & {
|
|
9
|
-
children?: JSX.Element | JSX.Element[];
|
|
10
|
-
};
|
|
11
|
-
interface VNode<P = any> {
|
|
12
|
-
type: string | Function;
|
|
13
|
-
props: P;
|
|
14
|
-
key: Key;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type { Key as K, PropsWithChildren as P, VNode as V };
|