@zag-js/core 1.24.0 → 1.24.2
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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
}
|
|
6
6
|
type TupleTypes<T extends any[]> = T[number];
|
|
7
7
|
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
8
|
-
declare function mergeProps<T extends Props>(...args: T
|
|
8
|
+
declare function mergeProps<T extends Props>(...args: Array<T | undefined>): UnionToIntersection<TupleTypes<T[]>>;
|
|
9
9
|
|
|
10
10
|
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
11
11
|
declare function memo<TDeps extends any[], TDepArgs, TResult>(getDeps: (depArgs: TDepArgs) => [...TDeps], fn: (args: NoInfer<[...TDeps]>, deps: TDepArgs) => TResult, opts?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
}
|
|
6
6
|
type TupleTypes<T extends any[]> = T[number];
|
|
7
7
|
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
8
|
-
declare function mergeProps<T extends Props>(...args: T
|
|
8
|
+
declare function mergeProps<T extends Props>(...args: Array<T | undefined>): UnionToIntersection<TupleTypes<T[]>>;
|
|
9
9
|
|
|
10
10
|
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
11
11
|
declare function memo<TDeps extends any[], TDepArgs, TResult>(getDeps: (depArgs: TDepArgs) => [...TDeps], fn: (args: NoInfer<[...TDeps]>, deps: TDepArgs) => TResult, opts?: {
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ var css = (a, b) => {
|
|
|
26
26
|
function mergeProps(...args) {
|
|
27
27
|
let result = {};
|
|
28
28
|
for (let props of args) {
|
|
29
|
+
if (!props) continue;
|
|
29
30
|
for (let key in result) {
|
|
30
31
|
if (key.startsWith("on") && typeof result[key] === "function" && typeof props[key] === "function") {
|
|
31
32
|
result[key] = utils.callAll(props[key], result[key]);
|
package/dist/index.mjs
CHANGED
|
@@ -24,6 +24,7 @@ var css = (a, b) => {
|
|
|
24
24
|
function mergeProps(...args) {
|
|
25
25
|
let result = {};
|
|
26
26
|
for (let props of args) {
|
|
27
|
+
if (!props) continue;
|
|
27
28
|
for (let key in result) {
|
|
28
29
|
if (key.startsWith("on") && typeof result[key] === "function" && typeof props[key] === "function") {
|
|
29
30
|
result[key] = callAll(props[key], result[key]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/core",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.2",
|
|
4
4
|
"description": "A minimal implementation of xstate fsm for UI machines",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-machines",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@zag-js/utils": "1.24.
|
|
29
|
-
"@zag-js/dom-query": "1.24.
|
|
28
|
+
"@zag-js/utils": "1.24.2",
|
|
29
|
+
"@zag-js/dom-query": "1.24.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"clean-package": "2.2.0"
|