@zag-js/store
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -6,5 +6,2 @@ "use strict"; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __esm = (fn, res) => function __init() { | ||
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; | ||
}; | ||
var __export = (target, all) => { | ||
@@ -24,10 +21,2 @@ for (var name in all) | ||
// <define:import.meta.env> | ||
var define_import_meta_env_default; | ||
var init_define_import_meta_env = __esm({ | ||
"<define:import.meta.env>"() { | ||
define_import_meta_env_default = { MODE: "production" }; | ||
} | ||
}); | ||
// src/index.ts | ||
@@ -44,7 +33,6 @@ var src_exports = {}; | ||
module.exports = __toCommonJS(src_exports); | ||
init_define_import_meta_env(); | ||
// ../../node_modules/.pnpm/valtio@1.9.0/node_modules/valtio/esm/vanilla.mjs | ||
init_define_import_meta_env(); | ||
var import_proxy_compare = require("proxy-compare"); | ||
var import_meta = {}; | ||
var isObject = (x) => typeof x === "object" && x !== null; | ||
@@ -124,3 +112,3 @@ var proxyStateMap = /* @__PURE__ */ new WeakMap(); | ||
const addPropListener = (prop, propProxyState) => { | ||
if ((define_import_meta_env_default && define_import_meta_env_default.MODE) !== "production" && propProxyStates.has(prop)) { | ||
if ((import_meta.env && import_meta.env.MODE) !== "production" && propProxyStates.has(prop)) { | ||
throw new Error("prop listener already exists"); | ||
@@ -147,3 +135,3 @@ } | ||
propProxyStates.forEach(([propProxyState, prevRemove], prop) => { | ||
if ((define_import_meta_env_default && define_import_meta_env_default.MODE) !== "production" && prevRemove) { | ||
if ((import_meta.env && import_meta.env.MODE) !== "production" && prevRemove) { | ||
throw new Error("remove already exists"); | ||
@@ -257,3 +245,3 @@ } | ||
const proxyState = proxyStateMap.get(proxyObject); | ||
if ((define_import_meta_env_default && define_import_meta_env_default.MODE) !== "production" && !proxyState) { | ||
if ((import_meta.env && import_meta.env.MODE) !== "production" && !proxyState) { | ||
console.warn("Please use proxy object"); | ||
@@ -289,3 +277,3 @@ } | ||
const proxyState = proxyStateMap.get(proxyObject); | ||
if ((define_import_meta_env_default && define_import_meta_env_default.MODE) !== "production" && !proxyState) { | ||
if ((import_meta.env && import_meta.env.MODE) !== "production" && !proxyState) { | ||
console.warn("Please use proxy object"); | ||
@@ -302,3 +290,2 @@ } | ||
// ../../node_modules/.pnpm/valtio@1.9.0/node_modules/valtio/esm/vanilla/utils.mjs | ||
init_define_import_meta_env(); | ||
function subscribeKey(proxyObject, key, callback, notifyInSync) { | ||
@@ -305,0 +292,0 @@ let prevValue = proxyObject[key]; |
{ | ||
"name": "@zag-js/store", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "The reactive store package for zag machines", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
23180
611