jsx-framework-pb 0.0.1 → 0.0.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.
@@ -1,10 +1,6 @@
1
1
  // src/jsx-runtime.ts
2
2
  function jsx(type, props, key) {
3
- return {
4
- type,
5
- props: props != null ? props : {},
6
- key: key != null ? key : null
7
- };
3
+ return { type, props, key: key != null ? key : null };
8
4
  }
9
5
  var jsxs = jsx;
10
6
  var Fragment = /* @__PURE__ */ Symbol("Fragment");
@@ -14,4 +10,4 @@ export {
14
10
  jsxs,
15
11
  Fragment
16
12
  };
17
- //# sourceMappingURL=chunk-C6TDJNNA.js.map
13
+ //# sourceMappingURL=chunk-XVAMNTOW.js.map
@@ -0,0 +1 @@
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 CHANGED
@@ -1 +1,2 @@
1
- export { Fragment, K as Key, P as PropsWithChildren, V as VNode, jsx, jsxs } from './jsx-runtime.js';
1
+ export { K as Key, P as PropsWithChildren, V as VNode } from './types-CfBV6pAD.js';
2
+ export { Fragment, jsx, jsxs } from './jsx-runtime.js';
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-C6TDJNNA.js";
5
+ } from "./chunk-XVAMNTOW.js";
6
6
  export {
7
7
  Fragment,
8
8
  jsx,
@@ -0,0 +1,7 @@
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 };
@@ -0,0 +1,16 @@
1
+ import {
2
+ jsx
3
+ } from "./chunk-XVAMNTOW.js";
4
+
5
+ // src/jsx-dev-runtime.ts
6
+ function jsxDEV(type, props, key, _isStaticChildren, _source, _self) {
7
+ return jsx(type, props, key);
8
+ }
9
+ var jsxsDEV = jsxDEV;
10
+ var Fragment = /* @__PURE__ */ Symbol("Fragment");
11
+ export {
12
+ Fragment,
13
+ jsxDEV,
14
+ jsxsDEV
15
+ };
16
+ //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["import type { VNode } from './types';\r\nimport { jsx } from './jsx-runtime';\r\n\r\nexport function jsxDEV(\r\n type: VNode['type'],\r\n props: any,\r\n key?: string | number | null,\r\n _isStaticChildren?: boolean,\r\n _source?: unknown,\r\n _self?: unknown\r\n): VNode {\r\n return jsx(type, props, key);\r\n}\r\n\r\nexport const jsxsDEV = jsxDEV;\r\nexport const Fragment = Symbol('Fragment');\r\n"],"mappings":";;;;;AAGO,SAAS,OACZ,MACA,OACA,KACA,mBACA,SACA,OACK;AACL,SAAO,IAAI,MAAM,OAAO,GAAG;AAC/B;AAEO,IAAM,UAAU;AAChB,IAAM,WAAW,uBAAO,UAAU;","names":[]}
@@ -1,21 +1,7 @@
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
- }
1
+ import { V as VNode } from './types-CfBV6pAD.js';
16
2
 
17
- declare function jsx<P>(type: VNode['type'], props: P, key?: Key): VNode<P>;
3
+ declare function jsx(type: VNode["type"], props: any, key?: string | number | null): VNode;
18
4
  declare const jsxs: typeof jsx;
19
5
  declare const Fragment: unique symbol;
20
6
 
21
- export { Fragment, type Key as K, type PropsWithChildren as P, type VNode as V, jsx, jsxs };
7
+ export { Fragment, jsx, jsxs };
@@ -2,7 +2,7 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-C6TDJNNA.js";
5
+ } from "./chunk-XVAMNTOW.js";
6
6
  export {
7
7
  Fragment,
8
8
  jsx,
@@ -0,0 +1,17 @@
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsx-framework-pb",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -15,6 +15,10 @@
15
15
  "./jsx-runtime": {
16
16
  "types": "./dist/jsx-runtime.d.ts",
17
17
  "default": "./dist/jsx-runtime.js"
18
+ },
19
+ "./jsx-dev-runtime": {
20
+ "types": "./dist/jsx-dev-runtime.d.ts",
21
+ "default": "./dist/jsx-dev-runtime.js"
18
22
  }
19
23
  },
20
24
  "scripts": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/jsx-runtime.ts"],"sourcesContent":["import type { VNode, Key } from './types';\r\n\r\nexport function jsx<P>(\r\n type: VNode['type'],\r\n props: P,\r\n key?: Key\r\n): VNode<P> {\r\n return {\r\n type,\r\n props: props ?? ({} as P),\r\n key: key ?? null,\r\n };\r\n}\r\n\r\nexport const jsxs = jsx;\r\n\r\nexport const Fragment = Symbol('Fragment');"],"mappings":";AAEO,SAAS,IACZ,MACA,OACA,KACQ;AACR,SAAO;AAAA,IACH;AAAA,IACA,OAAO,wBAAU,CAAC;AAAA,IAClB,KAAK,oBAAO;AAAA,EAChB;AACJ;AAEO,IAAM,OAAO;AAEb,IAAM,WAAW,uBAAO,UAAU;","names":[]}