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.0.0-dev-20220707125149 to 0.0.0-dev-20220714091855

LICENSE

17

dist/index.d.ts
interface AsRef {
$$valtioRef: true;
}
export declare function ref<T extends object>(o: T): T & AsRef;
declare function ref<T extends object>(o: T): T & AsRef;
declare type Path = (string | symbol)[];
declare type Op = [op: "set", path: Path, value: unknown, prevValue: unknown] | [op: "delete", path: Path, prevValue: unknown] | [op: "resolve", path: Path, value: unknown] | [op: "reject", path: Path, error: unknown];
export declare function proxy<T extends object>(initialObject?: T): T;
export declare function getVersion(proxyObject: unknown): number | undefined;
export declare function subscribe<T extends object>(proxyObject: T, callback: (ops: Op[]) => void, notifyInSync?: boolean): () => void;
declare function proxy<T extends object>(initialObject?: T): T;
declare function getVersion(proxyObject: unknown): number | undefined;
declare function subscribe<T extends object>(proxyObject: T, callback: (ops: Op[]) => void, notifyInSync?: boolean): () => void;
declare type AnyFunction = (...args: any[]) => any;

@@ -14,5 +14,5 @@ declare type Snapshot<T> = T extends AnyFunction ? T : T extends AsRef ? T : T extends Promise<infer V> ? Snapshot<V> : {

};
export declare function snapshot<T extends object>(proxyObject: T): Snapshot<T>;
export declare function getHandler<T extends object>(proxyObject: T): any;
export declare function proxyWithComputed<T extends object, U extends object>(initialObject: T, computedFns: {
declare function snapshot<T extends object>(proxyObject: T): Snapshot<T>;
declare function getHandler<T extends object>(proxyObject: T): any;
declare function proxyWithComputed<T extends object, U extends object>(initialObject: T, computedFns: {
[K in keyof U]: ((snap: Snapshot<T>) => U[K]) | {

@@ -23,2 +23,3 @@ get: (snap: Snapshot<T>) => U[K];

}): T & U;
export {};
export { getHandler, getVersion, proxy, proxyWithComputed, ref, snapshot, subscribe };

@@ -33,3 +33,3 @@ "use strict";

var import_proxy_compare = require("proxy-compare");
var __DEV__ = void 0 !== "production";
var __DEV__ = process.env.NODE_ENV !== "production";
var VERSION = Symbol();

@@ -262,1 +262,11 @@ var LISTENERS = Symbol();

}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getHandler,
getVersion,
proxy,
proxyWithComputed,
ref,
snapshot,
subscribe
});
{
"name": "@zag-js/store",
"version": "0.0.0-dev-20220707125149",
"version": "0.0.0-dev-20220714091855",
"description": "The reactive store package for zag machines",

@@ -22,11 +22,2 @@ "keywords": [

],
"scripts": {
"build:fast": "yarn zag build",
"start": "yarn zag build --watch",
"build": "yarn zag build --prod",
"test": "jest --config ../../../jest.config.js --rootDir tests",
"lint": "eslint src --ext .ts,.tsx",
"test:ci": "yarn test --ci --runInBand --updateSnapshot",
"test:watch": "yarn test --watchAll"
},
"publishConfig": {

@@ -40,3 +31,12 @@ "access": "public"

"proxy-compare": "2.2.0"
},
"scripts": {
"build-fast": "tsup src/index.ts --format=esm,cjs",
"start": "pnpm build --watch",
"build": "tsup src/index.ts --format=esm,cjs --dts",
"test": "jest --config ../../../jest.config.js --rootDir tests",
"lint": "eslint src --ext .ts,.tsx",
"test-ci": "pnpm test --ci --runInBand -u",
"test-watch": "pnpm test --watchAll"
}
}
}

@@ -15,9 +15,6 @@ # @zag-js/store

Yes please! See the
[contributing guidelines](https://github.com/chakra-ui/zag/blob/main/CONTRIBUTING.md)
for details.
Yes please! See the [contributing guidelines](https://github.com/chakra-ui/zag/blob/main/CONTRIBUTING.md) for details.
## Licence
This project is licensed under the terms of the
[MIT license](https://github.com/chakra-ui/zag/blob/main/LICENSE).
This project is licensed under the terms of the [MIT license](https://github.com/chakra-ui/zag/blob/main/LICENSE).

Sorry, the diff of this file is not supported yet

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