Socket
Socket
Sign inDemoInstall

@zag-js/store

Package Overview
Dependencies
Maintainers
1
Versions
731
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/store - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

dist/index.mjs

43

dist/index.js

@@ -0,3 +1,33 @@

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
import { getUntracked, markToTrack } from "proxy-compare";
var src_exports = {};
__export(src_exports, {
getHandler: () => getHandler,
getVersion: () => getVersion,
proxy: () => proxy,
proxyWithComputed: () => proxyWithComputed,
ref: () => ref,
snapshot: () => snapshot,
subscribe: () => subscribe
});
module.exports = __toCommonJS(src_exports);
var import_proxy_compare = require("proxy-compare");
var __DEV__ = process.env.NODE_ENV !== "production";

@@ -60,3 +90,3 @@ var VERSION = Symbol();

const snapshot2 = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));
markToTrack(snapshot2, true);
(0, import_proxy_compare.markToTrack)(snapshot2, true);
snapshotCache.set(receiver, [version, snapshot2]);

@@ -66,3 +96,3 @@ Reflect.ownKeys(target).forEach((key) => {

if (refSet.has(value)) {
markToTrack(value, false);
(0, import_proxy_compare.markToTrack)(value, false);
snapshot2[key] = value;

@@ -135,3 +165,3 @@ } else if (value instanceof Promise) {

if (isObject(value)) {
value = getUntracked(value) || value;
value = (0, import_proxy_compare.getUntracked)(value) || value;
}

@@ -234,3 +264,4 @@ let nextValue;

}
export {
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getHandler,

@@ -243,2 +274,2 @@ getVersion,

subscribe
};
});

12

package.json
{
"type": "module",
"name": "@zag-js/store",
"version": "0.1.3",
"version": "0.1.4",
"description": "The reactive store package for zag machines",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"keywords": [

@@ -15,4 +17,2 @@ "js",

"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/utilities/store",

@@ -33,5 +33,5 @@ "sideEffects": false,

"scripts": {
"build-fast": "tsup src/index.ts --format=esm",
"build-fast": "tsup src/index.ts --format=esm,cjs",
"start": "pnpm build --watch",
"build": "tsup src/index.ts --format=esm --dts",
"build": "tsup src/index.ts --format=esm,cjs --dts",
"test": "jest --config ../../../jest.config.js --rootDir tests",

@@ -38,0 +38,0 @@ "lint": "eslint src --ext .ts,.tsx",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc