Socket
Socket
Sign inDemoInstall

@zag-js/core

Package Overview
Dependencies
Maintainers
1
Versions
891
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-20220425184023 to 0.0.0-dev-20220426065739

4

package.json
{
"name": "@zag-js/core",
"version": "0.0.0-dev-20220425184023",
"version": "0.0.0-dev-20220426065739",
"description": "A minimal implementation of xstate fsm for UI machines",

@@ -40,3 +40,3 @@ "keywords": [

"dependencies": {
"@zag-js/utils": "^0.0.0-dev-20220425184023",
"@zag-js/utils": "^0.0.0-dev-20220426065739",
"klona": "^2.0.5",

@@ -43,0 +43,0 @@ "valtio": "^1.5.2"

@@ -17,3 +17,3 @@ # @zag-js/core

- Transition actions
- Boolean guard helpers
- Boolean guard helpers (`and`, `or`, `not`)
- Basic spawn helpers

@@ -31,2 +31,4 @@ - Activities (for state nodes)

npm i @zag-js/core
# or
yarn add @zag-js/core
```

@@ -135,5 +137,5 @@

- `target?` (string) - the state name to transition to.
- `actions?` (Action | Action[]) - the [action(s)](#action-config) to execute when this transition is taken.
- `guard?` (Guard) - the condition (predicate function) to test. If it returns `true`, the transition will be taken.
- `target` (string) - the state name to transition to.
- `actions` (Action | Action[]) - the [action(s)](#action-config) to execute when this transition is taken.
- `guard` (Guard) - the condition (predicate function) to test. If it returns `true`, the transition will be taken.

@@ -149,18 +151,5 @@ ### Machine options

Function syntax:
The action function to execute while transitioning from one state to another. It takes the following arguments:
- (function) - the action function to execute. Resolves to `{ type: actionFn.name, exec: actionFn }` and the function
takes the following arguments:
1. `context` (any) - the machine's current `context`.
2. `event` (object) - the event that caused the action to be executed.
Object syntax:
- `type` (string) - the action type.
- `exec?` (function) - the action function to execute.
String syntax:
- (string) - the action type.
- By default it resolves to `{ type: actionType, exec: undefined }`. It can resolve to resolved function or resolved
object action **if** the action can be looked up in the `options.actions` object.
- `context` (any) - the machine's current `context`.
- `event` (object) - the event that caused the action to be executed.
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