Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zag-js/core

Package Overview
Dependencies
Maintainers
1
Versions
902
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/core - npm Package Compare versions

Comparing version 0.0.0-dev-20221103102301 to 0.0.0-dev-20221108152001

2

dist/index.d.ts

@@ -346,3 +346,3 @@ export { proxy, ref, snapshot, subscribe } from '@zag-js/store';

withContext: (context: Partial<Writable<TContext>>) => Machine<TContext, TState, TEvent>;
setActions: (actions: Partial<StateMachine.MachineOptions<TContext, TState, TEvent>>["actions"]) => void;
setOptions: (options: Partial<StateMachine.MachineOptions<TContext, TState, TEvent>>) => void;
private getStateNode;

@@ -349,0 +349,0 @@ private getNextStateInfo;

@@ -72,2 +72,9 @@ "use strict";

var isFunction = (v) => typeof v === "function";
function compact(obj) {
if (obj === void 0)
return obj;
return Object.fromEntries(
Object.entries(obj).filter(([, value]) => value !== void 0).map(([key, value]) => [key, isObject(value) ? compact(value) : value])
);
}
function warn(...a) {

@@ -471,12 +478,14 @@ const m = a.length === 1 ? a[0] : a[1];

return;
for (const key in context) {
this.state.context[key] = context[key];
}
Object.assign(this.state.context, compact(context));
});
__publicField(this, "withContext", (context) => {
const newContext = { ...this.config.context, ...context };
const newContext = { ...this.config.context, ...compact(context) };
return new Machine({ ...this.config, context: newContext }, this.options);
});
__publicField(this, "setActions", (actions) => {
this.actionMap = { ...this.actionMap, ...actions };
__publicField(this, "setOptions", (options) => {
const opts = compact(options);
this.actionMap = { ...this.actionMap, ...opts.actions };
this.delayMap = { ...this.delayMap, ...opts.delays };
this.activityMap = { ...this.activityMap, ...opts.activities };
this.guardMap = { ...this.guardMap, ...opts.guards };
});

@@ -483,0 +492,0 @@ __publicField(this, "getStateNode", (state) => {

{
"name": "@zag-js/core",
"version": "0.0.0-dev-20221103102301",
"version": "0.0.0-dev-20221108152001",
"description": "A minimal implementation of xstate fsm for UI machines",

@@ -31,7 +31,7 @@ "main": "dist/index.js",

"dependencies": {
"@zag-js/store": "0.0.0-dev-20221103102301",
"@zag-js/store": "0.2.0",
"klona": "2.0.5"
},
"devDependencies": {
"@zag-js/utils": "0.0.0-dev-20221103102301"
"@zag-js/utils": "0.0.0-dev-20221108152001"
},

@@ -38,0 +38,0 @@ "scripts": {

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