@zag-js/store
Advanced tools
Comparing version 0.59.0 to 0.60.0
@@ -48,3 +48,3 @@ "use strict"; | ||
var import_proxy_compare = require("proxy-compare"); | ||
var isDev = process.env.NODE_ENV !== "production"; | ||
var isDev = () => process.env.NODE_ENV !== "production"; | ||
var isObject = (x) => typeof x === "object" && x !== null; | ||
@@ -124,3 +124,3 @@ var proxyStateMap = makeGlobal("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap()); | ||
const addPropListener = (prop, propProxyState) => { | ||
if (isDev && propProxyStates.has(prop)) { | ||
if (isDev() && propProxyStates.has(prop)) { | ||
throw new Error("prop listener already exists"); | ||
@@ -146,3 +146,3 @@ } | ||
propProxyStates.forEach(([propProxyState, prevRemove], prop) => { | ||
if (isDev && prevRemove) { | ||
if (isDev() && prevRemove) { | ||
throw new Error("remove already exists"); | ||
@@ -247,3 +247,3 @@ } | ||
const proxyState = proxyStateMap.get(proxyObject); | ||
if (isDev && !proxyState) { | ||
if (isDev() && !proxyState) { | ||
console.warn("Please use proxy object"); | ||
@@ -279,3 +279,3 @@ } | ||
const proxyState = proxyStateMap.get(proxyObject); | ||
if (isDev && !proxyState) { | ||
if (isDev() && !proxyState) { | ||
console.warn("Please use proxy object"); | ||
@@ -282,0 +282,0 @@ } |
{ | ||
"name": "@zag-js/store", | ||
"version": "0.59.0", | ||
"version": "0.60.0", | ||
"description": "The reactive store package for zag machines", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,3 +6,3 @@ // Credits: https://github.com/pmndrs/valtio | ||
const isDev = process.env.NODE_ENV !== "production" | ||
const isDev = () => process.env.NODE_ENV !== "production" | ||
const isObject = (x: unknown): x is object => typeof x === "object" && x !== null | ||
@@ -165,3 +165,3 @@ | ||
const addPropListener = (prop: string | symbol, propProxyState: ProxyState) => { | ||
if (isDev && propProxyStates.has(prop)) { | ||
if (isDev() && propProxyStates.has(prop)) { | ||
throw new Error("prop listener already exists") | ||
@@ -187,3 +187,3 @@ } | ||
propProxyStates.forEach(([propProxyState, prevRemove], prop) => { | ||
if (isDev && prevRemove) { | ||
if (isDev() && prevRemove) { | ||
throw new Error("remove already exists") | ||
@@ -308,3 +308,3 @@ } | ||
const proxyState = proxyStateMap.get(proxyObject as object) | ||
if (isDev && !proxyState) { | ||
if (isDev() && !proxyState) { | ||
console.warn("Please use proxy object") | ||
@@ -341,3 +341,3 @@ } | ||
const proxyState = proxyStateMap.get(proxyObject as object) | ||
if (isDev && !proxyState) { | ||
if (isDev() && !proxyState) { | ||
console.warn("Please use proxy object") | ||
@@ -344,0 +344,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78170