@zag-js/core
Advanced tools
Comparing version
@@ -198,2 +198,3 @@ interface Props { | ||
type Service<T extends MachineSchema> = { | ||
getStatus: () => MachineStatus; | ||
state: State<T> & { | ||
@@ -214,2 +215,8 @@ matches: (...values: T["state"][]) => boolean; | ||
}; | ||
declare enum MachineStatus { | ||
NotStarted = "Not Started", | ||
Started = "Started", | ||
Stopped = "Stopped" | ||
} | ||
declare const INIT_STATE = "__init__"; | ||
@@ -243,2 +250,2 @@ declare function createGuards<T extends MachineSchema>(): { | ||
export { type ActionsOrFn, type Bindable, type BindableContext, type BindableParams, type BindableRefs, type ChooseFn, type ComputedFn, type EffectsOrFn, type EventObject, type GuardFn, type Machine, type MachineSchema, type Params, type PropFn, type Scope, type Service, type Transition, type ValueOrFn, createGuards, createMachine, createScope, memo, mergeProps, setup }; | ||
export { type ActionsOrFn, type Bindable, type BindableContext, type BindableParams, type BindableRefs, type ChooseFn, type ComputedFn, type EffectsOrFn, type EventObject, type GuardFn, INIT_STATE, type Machine, type MachineSchema, MachineStatus, type Params, type PropFn, type Scope, type Service, type Transition, type ValueOrFn, createGuards, createMachine, createScope, memo, mergeProps, setup }; |
@@ -102,2 +102,11 @@ 'use strict'; | ||
} | ||
// src/types.ts | ||
var MachineStatus = /* @__PURE__ */ ((MachineStatus2) => { | ||
MachineStatus2["NotStarted"] = "Not Started"; | ||
MachineStatus2["Started"] = "Started"; | ||
MachineStatus2["Stopped"] = "Stopped"; | ||
return MachineStatus2; | ||
})(MachineStatus || {}); | ||
var INIT_STATE = "__init__"; | ||
function createScope(props) { | ||
@@ -121,2 +130,4 @@ const getRootNode = () => props.getRootNode?.() ?? document; | ||
exports.INIT_STATE = INIT_STATE; | ||
exports.MachineStatus = MachineStatus; | ||
exports.createGuards = createGuards; | ||
@@ -123,0 +134,0 @@ exports.createMachine = createMachine; |
{ | ||
"name": "@zag-js/core", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "A minimal implementation of xstate fsm for UI machines", | ||
@@ -28,4 +28,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/utils": "1.6.1", | ||
"@zag-js/dom-query": "1.6.1" | ||
"@zag-js/utils": "1.6.2", | ||
"@zag-js/dom-query": "1.6.2" | ||
}, | ||
@@ -32,0 +32,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
32796
3.46%498
5.29%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated