Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@zag-js/react

Package Overview
Dependencies
Maintainers
1
Versions
1088
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/react - npm Package Compare versions

Comparing version
1.40.0
to
1.41.0
+11
-3
dist/machine.js

@@ -131,3 +131,5 @@ "use strict";

if ((0, import_utils.isFunction)(str)) return str(getParams());
return machine.implementations?.guards?.[str](getParams());
const fn = machine.implementations?.guards?.[str];
if (!fn) (0, import_utils.warn)(`[zag-js] No implementation found for guard "${JSON.stringify(str)}"`);
return fn?.(getParams());
};

@@ -184,3 +186,6 @@ const effect = (keys) => {

const cleanup = effect(item.state?.effects);
if (cleanup) effects.current.set(item.path, cleanup);
if (cleanup) {
const existing = effects.current.get(item.path);
effects.current.set(item.path, existing ? (0, import_utils.callAll)(existing, cleanup) : cleanup);
}
});

@@ -190,3 +195,6 @@ if (prevState === import_core.INIT_STATE) {

const cleanup = effect(machine.effects);
if (cleanup) effects.current.set(import_core.INIT_STATE, cleanup);
if (cleanup) {
const existing = effects.current.get(import_core.INIT_STATE);
effects.current.set(import_core.INIT_STATE, existing ? (0, import_utils.callAll)(existing, cleanup) : cleanup);
}
}

@@ -193,0 +201,0 @@ entering.forEach((item) => {

@@ -14,3 +14,3 @@ "use client";

} from "@zag-js/core";
import { compact, ensure, isFunction, isString, toArray, warn } from "@zag-js/utils";
import { callAll, compact, ensure, isFunction, isString, toArray, warn } from "@zag-js/utils";
import { useMemo, useRef } from "react";

@@ -118,3 +118,5 @@ import { flushSync } from "react-dom";

if (isFunction(str)) return str(getParams());
return machine.implementations?.guards?.[str](getParams());
const fn = machine.implementations?.guards?.[str];
if (!fn) warn(`[zag-js] No implementation found for guard "${JSON.stringify(str)}"`);
return fn?.(getParams());
};

@@ -171,3 +173,6 @@ const effect = (keys) => {

const cleanup = effect(item.state?.effects);
if (cleanup) effects.current.set(item.path, cleanup);
if (cleanup) {
const existing = effects.current.get(item.path);
effects.current.set(item.path, existing ? callAll(existing, cleanup) : cleanup);
}
});

@@ -177,3 +182,6 @@ if (prevState === INIT_STATE) {

const cleanup = effect(machine.effects);
if (cleanup) effects.current.set(INIT_STATE, cleanup);
if (cleanup) {
const existing = effects.current.get(INIT_STATE);
effects.current.set(INIT_STATE, existing ? callAll(existing, cleanup) : cleanup);
}
}

@@ -180,0 +188,0 @@ entering.forEach((item) => {

{
"name": "@zag-js/react",
"version": "1.40.0",
"version": "1.41.0",
"description": "The react wrapper for zag",

@@ -28,6 +28,6 @@ "keywords": [

"dependencies": {
"@zag-js/core": "1.40.0",
"@zag-js/store": "1.40.0",
"@zag-js/types": "1.40.0",
"@zag-js/utils": "1.40.0"
"@zag-js/core": "1.41.0",
"@zag-js/store": "1.41.0",
"@zag-js/types": "1.41.0",
"@zag-js/utils": "1.41.0"
},

@@ -38,4 +38,4 @@ "devDependencies": {

"@types/jsdom": "^28.0.1",
"react": "19.2.4",
"react-dom": "19.2.4",
"react": "19.2.6",
"react-dom": "19.2.6",
"clean-package": "2.2.0",

@@ -42,0 +42,0 @@ "@testing-library/react": "^16.3.2",