@reckona/mreact-compat 0.0.168 → 0.0.170
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/dom-children.d.ts.map +1 -1
- package/dist/dom-children.js +53 -0
- package/dist/dom-children.js.map +1 -1
- package/dist/element.d.ts +19 -4
- package/dist/element.d.ts.map +1 -1
- package/dist/element.js +56 -19
- package/dist/element.js.map +1 -1
- package/dist/hooks.js +18 -11
- package/dist/hooks.js.map +1 -1
- package/dist/host-reconciler.d.ts.map +1 -1
- package/dist/host-reconciler.js +263 -31
- package/dist/host-reconciler.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -1
- package/dist/jsx-dev-runtime.d.ts.map +1 -1
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx-runtime.js.map +1 -1
- package/package.json +3 -3
- package/src/dom-children.ts +78 -0
- package/src/element.ts +109 -23
- package/src/hooks.ts +24 -11
- package/src/host-reconciler.ts +430 -42
- package/src/index.ts +1 -0
- package/src/jsx-dev-runtime.ts +1 -1
- package/src/jsx-runtime.ts +3 -3
package/src/jsx-runtime.ts
CHANGED
|
@@ -95,7 +95,7 @@ declare global {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/** Creates a single-child JSX element for the automatic JSX runtime. */
|
|
98
|
-
export function jsx<P extends
|
|
98
|
+
export function jsx<P extends object>(
|
|
99
99
|
type: ElementType<P>,
|
|
100
100
|
props: (P & { children?: ReactCompatNode; key?: unknown; ref?: unknown }) | null,
|
|
101
101
|
key?: unknown,
|
|
@@ -104,7 +104,7 @@ export function jsx<P extends Record<string, unknown>>(
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/** Creates a multi-child JSX element for the automatic JSX runtime. */
|
|
107
|
-
export function jsxs<P extends
|
|
107
|
+
export function jsxs<P extends object>(
|
|
108
108
|
type: ElementType<P>,
|
|
109
109
|
props: (P & { children?: ReactCompatNode; key?: unknown; ref?: unknown }) | null,
|
|
110
110
|
key?: unknown,
|
|
@@ -112,7 +112,7 @@ export function jsxs<P extends Record<string, unknown>>(
|
|
|
112
112
|
return createElementFromJsx(type, props, key);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
function createElementFromJsx<P extends
|
|
115
|
+
function createElementFromJsx<P extends object>(
|
|
116
116
|
type: ElementType<P>,
|
|
117
117
|
props: (P & { children?: ReactCompatNode; key?: unknown; ref?: unknown }) | null,
|
|
118
118
|
key: unknown,
|