jsx-framework-pb 0.0.5 → 0.0.7
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/{chunk-XVAMNTOW.js → chunk-Y6I3KMBQ.js} +2 -2
- package/dist/chunk-Y6I3KMBQ.js.map +1 -0
- package/dist/index.d.d.ts +30 -0
- package/dist/index.js +1 -1
- package/dist/jsx-dev-runtime.js +3 -3
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-XVAMNTOW.js.map +0 -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/jsx-types.d.ts +0 -2
- package/dist/jsx-types.js +0 -1
- package/dist/jsx-types.js.map +0 -1
- package/dist/types-CfBV6pAD.d.ts +0 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/jsx-runtime.ts
|
|
2
2
|
function jsx(type, props, key) {
|
|
3
|
-
return { type, props, key: key != null ? key : null };
|
|
3
|
+
return { type, props: props != null ? props : {}, key: key != null ? key : null };
|
|
4
4
|
}
|
|
5
5
|
var jsxs = jsx;
|
|
6
6
|
var Fragment = /* @__PURE__ */ Symbol("Fragment");
|
|
@@ -10,4 +10,4 @@ export {
|
|
|
10
10
|
jsxs,
|
|
11
11
|
Fragment
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-Y6I3KMBQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/jsx-runtime.ts"],"sourcesContent":["import type { VNode, Component, Key } from \"./types\";\r\n\r\nexport function jsx<P>(\r\n type: string | Component<P>,\r\n props: P,\r\n key?: Key\r\n): VNode<P> {\r\n return { type, props: props ?? ({} as P), key: key ?? null };\r\n}\r\n\r\nexport const jsxs = jsx;\r\nexport const Fragment = Symbol(\"Fragment\");"],"mappings":";AAEO,SAAS,IACZ,MACA,OACA,KACQ;AACR,SAAO,EAAE,MAAM,OAAO,wBAAU,CAAC,GAAS,KAAK,oBAAO,KAAK;AAC/D;AAEO,IAAM,OAAO;AACb,IAAM,WAAW,uBAAO,UAAU;","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference path="./jsx.d.ts" />
|
|
2
|
+
type Key = string | number | null;
|
|
3
|
+
|
|
4
|
+
type Component<P = {}> = (props: P) => VNode | null;
|
|
5
|
+
|
|
6
|
+
interface VNode<P = any> {
|
|
7
|
+
type: string | Component<any>;
|
|
8
|
+
props: P;
|
|
9
|
+
key: Key;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type PropsWithChildren<P = {}> =
|
|
13
|
+
P & { children?: JSX.Element | JSX.Element[] };
|
|
14
|
+
|
|
15
|
+
declare function jsx<P>(
|
|
16
|
+
type: string | Component<P>,
|
|
17
|
+
props: P,
|
|
18
|
+
key?: Key
|
|
19
|
+
): VNode<P> {
|
|
20
|
+
return { type, props: props ?? ({} as P), key: key ?? null };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const jsxs = jsx;
|
|
24
|
+
declare const Fragment = Symbol("Fragment");
|
|
25
|
+
|
|
26
|
+
declare function render(vnode: any, container: HTMLElement) {
|
|
27
|
+
container.appendChild(createNode(vnode));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { type Component, Fragment, type Key, type PropsWithChildren, type VNode, jsx, jsxs, render };
|
package/dist/index.js
CHANGED
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Fragment,
|
|
2
3
|
jsx
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y6I3KMBQ.js";
|
|
4
5
|
|
|
5
6
|
// src/jsx-dev-runtime.ts
|
|
6
|
-
function jsxDEV(type, props, key
|
|
7
|
+
function jsxDEV(type, props, key) {
|
|
7
8
|
return jsx(type, props, key);
|
|
8
9
|
}
|
|
9
10
|
var jsxsDEV = jsxDEV;
|
|
10
|
-
var Fragment = /* @__PURE__ */ Symbol("Fragment");
|
|
11
11
|
export {
|
|
12
12
|
Fragment,
|
|
13
13
|
jsxDEV,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["import { jsx, Fragment } from \"./jsx-runtime\";\r\nimport type { VNode } from \"./types\";\r\n\r\nexport function jsxDEV(\r\n type: VNode[\"type\"],\r\n props: any,\r\n key?: string | number | null\r\n): VNode {\r\n return jsx(type, props, key);\r\n}\r\n\r\nexport const jsxsDEV = jsxDEV;\r\nexport { Fragment };"],"mappings":";;;;;;AAGO,SAAS,OACZ,MACA,OACA,KACK;AACL,SAAO,IAAI,MAAM,OAAO,GAAG;AAC/B;AAEO,IAAM,UAAU;","names":[]}
|
package/dist/jsx-runtime.js
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/jsx-runtime.ts"],"sourcesContent":["import type { VNode } from \"./types\";\r\n\r\nexport function jsx(\r\n type: VNode[\"type\"],\r\n props: any,\r\n key?: string | number | null\r\n): VNode {\r\n return { type, props, key: key ?? null };\r\n}\r\n\r\nexport const jsxs = jsx;\r\nexport const Fragment = Symbol(\"Fragment\");\r\n"],"mappings":";AAEO,SAAS,IACZ,MACA,OACA,KACK;AACL,SAAO,EAAE,MAAM,OAAO,KAAK,oBAAO,KAAK;AAC3C;AAEO,IAAM,OAAO;AACb,IAAM,WAAW,uBAAO,UAAU;","names":[]}
|
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/jsx-types.d.ts
DELETED
package/dist/jsx-types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=jsx-types.js.map
|
package/dist/jsx-types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
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 };
|