@camcima/finita 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/README.md +176 -0
  2. package/dist/Dispatcher.d.ts +11 -0
  3. package/dist/Dispatcher.d.ts.map +1 -0
  4. package/dist/Dispatcher.js +30 -0
  5. package/dist/Dispatcher.js.map +1 -0
  6. package/dist/Event.d.ts +22 -0
  7. package/dist/Event.d.ts.map +1 -0
  8. package/dist/Event.js +54 -0
  9. package/dist/Event.js.map +1 -0
  10. package/dist/MaybePromise.d.ts +2 -0
  11. package/dist/MaybePromise.d.ts.map +1 -0
  12. package/dist/MaybePromise.js +2 -0
  13. package/dist/MaybePromise.js.map +1 -0
  14. package/dist/Process.d.ts +15 -0
  15. package/dist/Process.d.ts.map +1 -0
  16. package/dist/Process.js +43 -0
  17. package/dist/Process.js.map +1 -0
  18. package/dist/State.d.ts +22 -0
  19. package/dist/State.d.ts.map +1 -0
  20. package/dist/State.js +65 -0
  21. package/dist/State.js.map +1 -0
  22. package/dist/StateCollection.d.ts +14 -0
  23. package/dist/StateCollection.d.ts.map +1 -0
  24. package/dist/StateCollection.js +37 -0
  25. package/dist/StateCollection.js.map +1 -0
  26. package/dist/Statemachine.d.ts +45 -0
  27. package/dist/Statemachine.d.ts.map +1 -0
  28. package/dist/Statemachine.js +206 -0
  29. package/dist/Statemachine.js.map +1 -0
  30. package/dist/Transition.d.ts +19 -0
  31. package/dist/Transition.d.ts.map +1 -0
  32. package/dist/Transition.js +46 -0
  33. package/dist/Transition.js.map +1 -0
  34. package/dist/condition/AndComposite.d.ts +9 -0
  35. package/dist/condition/AndComposite.d.ts.map +1 -0
  36. package/dist/condition/AndComposite.js +23 -0
  37. package/dist/condition/AndComposite.js.map +1 -0
  38. package/dist/condition/CallbackCondition.d.ts +11 -0
  39. package/dist/condition/CallbackCondition.d.ts.map +1 -0
  40. package/dist/condition/CallbackCondition.js +15 -0
  41. package/dist/condition/CallbackCondition.js.map +1 -0
  42. package/dist/condition/Contradiction.d.ts +8 -0
  43. package/dist/condition/Contradiction.d.ts.map +1 -0
  44. package/dist/condition/Contradiction.js +13 -0
  45. package/dist/condition/Contradiction.js.map +1 -0
  46. package/dist/condition/Not.d.ts +8 -0
  47. package/dist/condition/Not.d.ts.map +1 -0
  48. package/dist/condition/Not.js +13 -0
  49. package/dist/condition/Not.js.map +1 -0
  50. package/dist/condition/OrComposite.d.ts +9 -0
  51. package/dist/condition/OrComposite.d.ts.map +1 -0
  52. package/dist/condition/OrComposite.js +23 -0
  53. package/dist/condition/OrComposite.js.map +1 -0
  54. package/dist/condition/Tautology.d.ts +8 -0
  55. package/dist/condition/Tautology.d.ts.map +1 -0
  56. package/dist/condition/Tautology.js +13 -0
  57. package/dist/condition/Tautology.js.map +1 -0
  58. package/dist/condition/Timeout.d.ts +10 -0
  59. package/dist/condition/Timeout.d.ts.map +1 -0
  60. package/dist/condition/Timeout.js +30 -0
  61. package/dist/condition/Timeout.js.map +1 -0
  62. package/dist/condition/index.d.ts +9 -0
  63. package/dist/condition/index.d.ts.map +1 -0
  64. package/dist/condition/index.js +8 -0
  65. package/dist/condition/index.js.map +1 -0
  66. package/dist/error/DuplicateStateError.d.ts +5 -0
  67. package/dist/error/DuplicateStateError.d.ts.map +1 -0
  68. package/dist/error/DuplicateStateError.js +9 -0
  69. package/dist/error/DuplicateStateError.js.map +1 -0
  70. package/dist/error/LockCanNotBeAcquiredError.d.ts +4 -0
  71. package/dist/error/LockCanNotBeAcquiredError.d.ts.map +1 -0
  72. package/dist/error/LockCanNotBeAcquiredError.js +7 -0
  73. package/dist/error/LockCanNotBeAcquiredError.js.map +1 -0
  74. package/dist/error/WrongEventForStateError.d.ts +6 -0
  75. package/dist/error/WrongEventForStateError.d.ts.map +1 -0
  76. package/dist/error/WrongEventForStateError.js +11 -0
  77. package/dist/error/WrongEventForStateError.js.map +1 -0
  78. package/dist/error/index.d.ts +4 -0
  79. package/dist/error/index.d.ts.map +1 -0
  80. package/dist/error/index.js +4 -0
  81. package/dist/error/index.js.map +1 -0
  82. package/dist/factory/AbstractNamedProcessDetector.d.ts +10 -0
  83. package/dist/factory/AbstractNamedProcessDetector.d.ts.map +1 -0
  84. package/dist/factory/AbstractNamedProcessDetector.js +18 -0
  85. package/dist/factory/AbstractNamedProcessDetector.js.map +1 -0
  86. package/dist/factory/Factory.d.ts +22 -0
  87. package/dist/factory/Factory.d.ts.map +1 -0
  88. package/dist/factory/Factory.js +42 -0
  89. package/dist/factory/Factory.js.map +1 -0
  90. package/dist/factory/SingleProcessDetector.d.ts +8 -0
  91. package/dist/factory/SingleProcessDetector.d.ts.map +1 -0
  92. package/dist/factory/SingleProcessDetector.js +10 -0
  93. package/dist/factory/SingleProcessDetector.js.map +1 -0
  94. package/dist/factory/StatefulStateNameDetector.d.ts +5 -0
  95. package/dist/factory/StatefulStateNameDetector.d.ts.map +1 -0
  96. package/dist/factory/StatefulStateNameDetector.js +15 -0
  97. package/dist/factory/StatefulStateNameDetector.js.map +1 -0
  98. package/dist/factory/index.d.ts +5 -0
  99. package/dist/factory/index.d.ts.map +1 -0
  100. package/dist/factory/index.js +5 -0
  101. package/dist/factory/index.js.map +1 -0
  102. package/dist/filter/ActiveTransitionFilter.d.ts +6 -0
  103. package/dist/filter/ActiveTransitionFilter.d.ts.map +1 -0
  104. package/dist/filter/ActiveTransitionFilter.js +12 -0
  105. package/dist/filter/ActiveTransitionFilter.js.map +1 -0
  106. package/dist/filter/FilterStateByEvent.d.ts +5 -0
  107. package/dist/filter/FilterStateByEvent.d.ts.map +1 -0
  108. package/dist/filter/FilterStateByEvent.js +10 -0
  109. package/dist/filter/FilterStateByEvent.js.map +1 -0
  110. package/dist/filter/FilterStateByFinalState.d.ts +5 -0
  111. package/dist/filter/FilterStateByFinalState.d.ts.map +1 -0
  112. package/dist/filter/FilterStateByFinalState.js +15 -0
  113. package/dist/filter/FilterStateByFinalState.js.map +1 -0
  114. package/dist/filter/FilterStateByTransition.d.ts +8 -0
  115. package/dist/filter/FilterStateByTransition.d.ts.map +1 -0
  116. package/dist/filter/FilterStateByTransition.js +16 -0
  117. package/dist/filter/FilterStateByTransition.js.map +1 -0
  118. package/dist/filter/FilterTransitionByEvent.d.ts +5 -0
  119. package/dist/filter/FilterTransitionByEvent.d.ts.map +1 -0
  120. package/dist/filter/FilterTransitionByEvent.js +10 -0
  121. package/dist/filter/FilterTransitionByEvent.js.map +1 -0
  122. package/dist/filter/index.d.ts +6 -0
  123. package/dist/filter/index.d.ts.map +1 -0
  124. package/dist/filter/index.js +6 -0
  125. package/dist/filter/index.js.map +1 -0
  126. package/dist/graph/GraphBuilder.d.ts +37 -0
  127. package/dist/graph/GraphBuilder.d.ts.map +1 -0
  128. package/dist/graph/GraphBuilder.js +132 -0
  129. package/dist/graph/GraphBuilder.js.map +1 -0
  130. package/dist/graph/index.d.ts +3 -0
  131. package/dist/graph/index.d.ts.map +1 -0
  132. package/dist/graph/index.js +2 -0
  133. package/dist/graph/index.js.map +1 -0
  134. package/dist/index.d.ts +22 -0
  135. package/dist/index.d.ts.map +1 -0
  136. package/dist/index.js +27 -0
  137. package/dist/index.js.map +1 -0
  138. package/dist/interfaces/ConditionInterface.d.ts +6 -0
  139. package/dist/interfaces/ConditionInterface.d.ts.map +1 -0
  140. package/dist/interfaces/ConditionInterface.js +2 -0
  141. package/dist/interfaces/ConditionInterface.js.map +1 -0
  142. package/dist/interfaces/DispatcherInterface.d.ts +11 -0
  143. package/dist/interfaces/DispatcherInterface.d.ts.map +1 -0
  144. package/dist/interfaces/DispatcherInterface.js +2 -0
  145. package/dist/interfaces/DispatcherInterface.js.map +1 -0
  146. package/dist/interfaces/EventInterface.d.ts +12 -0
  147. package/dist/interfaces/EventInterface.d.ts.map +1 -0
  148. package/dist/interfaces/EventInterface.js +2 -0
  149. package/dist/interfaces/EventInterface.js.map +1 -0
  150. package/dist/interfaces/FactoryInterface.d.ts +13 -0
  151. package/dist/interfaces/FactoryInterface.d.ts.map +1 -0
  152. package/dist/interfaces/FactoryInterface.js +2 -0
  153. package/dist/interfaces/FactoryInterface.js.map +1 -0
  154. package/dist/interfaces/LastStateHasChangedDateInterface.d.ts +4 -0
  155. package/dist/interfaces/LastStateHasChangedDateInterface.d.ts.map +1 -0
  156. package/dist/interfaces/LastStateHasChangedDateInterface.js +2 -0
  157. package/dist/interfaces/LastStateHasChangedDateInterface.js.map +1 -0
  158. package/dist/interfaces/LockAdapterInterface.d.ts +7 -0
  159. package/dist/interfaces/LockAdapterInterface.d.ts.map +1 -0
  160. package/dist/interfaces/LockAdapterInterface.js +2 -0
  161. package/dist/interfaces/LockAdapterInterface.js.map +1 -0
  162. package/dist/interfaces/LoggerInterface.d.ts +4 -0
  163. package/dist/interfaces/LoggerInterface.d.ts.map +1 -0
  164. package/dist/interfaces/LoggerInterface.js +2 -0
  165. package/dist/interfaces/LoggerInterface.js.map +1 -0
  166. package/dist/interfaces/Metadata.d.ts +4 -0
  167. package/dist/interfaces/Metadata.d.ts.map +1 -0
  168. package/dist/interfaces/Metadata.js +2 -0
  169. package/dist/interfaces/Metadata.js.map +1 -0
  170. package/dist/interfaces/MutexFactoryInterface.d.ts +6 -0
  171. package/dist/interfaces/MutexFactoryInterface.d.ts.map +1 -0
  172. package/dist/interfaces/MutexFactoryInterface.js +2 -0
  173. package/dist/interfaces/MutexFactoryInterface.js.map +1 -0
  174. package/dist/interfaces/MutexInterface.d.ts +8 -0
  175. package/dist/interfaces/MutexInterface.d.ts.map +1 -0
  176. package/dist/interfaces/MutexInterface.js +2 -0
  177. package/dist/interfaces/MutexInterface.js.map +1 -0
  178. package/dist/interfaces/Named.d.ts +4 -0
  179. package/dist/interfaces/Named.d.ts.map +1 -0
  180. package/dist/interfaces/Named.js +2 -0
  181. package/dist/interfaces/Named.js.map +1 -0
  182. package/dist/interfaces/Observer.d.ts +11 -0
  183. package/dist/interfaces/Observer.d.ts.map +1 -0
  184. package/dist/interfaces/Observer.js +2 -0
  185. package/dist/interfaces/Observer.js.map +1 -0
  186. package/dist/interfaces/ProcessDetectorInterface.d.ts +5 -0
  187. package/dist/interfaces/ProcessDetectorInterface.d.ts.map +1 -0
  188. package/dist/interfaces/ProcessDetectorInterface.js +2 -0
  189. package/dist/interfaces/ProcessDetectorInterface.js.map +1 -0
  190. package/dist/interfaces/ProcessInterface.d.ts +7 -0
  191. package/dist/interfaces/ProcessInterface.d.ts.map +1 -0
  192. package/dist/interfaces/ProcessInterface.js +2 -0
  193. package/dist/interfaces/ProcessInterface.js.map +1 -0
  194. package/dist/interfaces/StateCollectionInterface.d.ts +7 -0
  195. package/dist/interfaces/StateCollectionInterface.d.ts.map +1 -0
  196. package/dist/interfaces/StateCollectionInterface.js +2 -0
  197. package/dist/interfaces/StateCollectionInterface.js.map +1 -0
  198. package/dist/interfaces/StateInterface.d.ts +16 -0
  199. package/dist/interfaces/StateInterface.d.ts.map +1 -0
  200. package/dist/interfaces/StateInterface.js +2 -0
  201. package/dist/interfaces/StateInterface.js.map +1 -0
  202. package/dist/interfaces/StateNameDetectorInterface.d.ts +4 -0
  203. package/dist/interfaces/StateNameDetectorInterface.d.ts.map +1 -0
  204. package/dist/interfaces/StateNameDetectorInterface.js +2 -0
  205. package/dist/interfaces/StateNameDetectorInterface.js.map +1 -0
  206. package/dist/interfaces/StatefulInterface.d.ts +5 -0
  207. package/dist/interfaces/StatefulInterface.d.ts.map +1 -0
  208. package/dist/interfaces/StatefulInterface.js +2 -0
  209. package/dist/interfaces/StatefulInterface.js.map +1 -0
  210. package/dist/interfaces/StatemachineInterface.d.ts +20 -0
  211. package/dist/interfaces/StatemachineInterface.d.ts.map +1 -0
  212. package/dist/interfaces/StatemachineInterface.js +2 -0
  213. package/dist/interfaces/StatemachineInterface.js.map +1 -0
  214. package/dist/interfaces/TransitionInterface.d.ts +12 -0
  215. package/dist/interfaces/TransitionInterface.d.ts.map +1 -0
  216. package/dist/interfaces/TransitionInterface.js +2 -0
  217. package/dist/interfaces/TransitionInterface.js.map +1 -0
  218. package/dist/interfaces/TransitionSelectorInterface.d.ts +5 -0
  219. package/dist/interfaces/TransitionSelectorInterface.d.ts.map +1 -0
  220. package/dist/interfaces/TransitionSelectorInterface.js +2 -0
  221. package/dist/interfaces/TransitionSelectorInterface.js.map +1 -0
  222. package/dist/interfaces/Weighted.d.ts +4 -0
  223. package/dist/interfaces/Weighted.d.ts.map +1 -0
  224. package/dist/interfaces/Weighted.js +2 -0
  225. package/dist/interfaces/Weighted.js.map +1 -0
  226. package/dist/interfaces/index.d.ts +24 -0
  227. package/dist/interfaces/index.d.ts.map +1 -0
  228. package/dist/interfaces/index.js +2 -0
  229. package/dist/interfaces/index.js.map +1 -0
  230. package/dist/mutex/LockAdapterMutex.d.ts +13 -0
  231. package/dist/mutex/LockAdapterMutex.d.ts.map +1 -0
  232. package/dist/mutex/LockAdapterMutex.js +32 -0
  233. package/dist/mutex/LockAdapterMutex.js.map +1 -0
  234. package/dist/mutex/MutexFactory.d.ts +11 -0
  235. package/dist/mutex/MutexFactory.d.ts.map +1 -0
  236. package/dist/mutex/MutexFactory.js +13 -0
  237. package/dist/mutex/MutexFactory.js.map +1 -0
  238. package/dist/mutex/NullMutex.d.ts +9 -0
  239. package/dist/mutex/NullMutex.d.ts.map +1 -0
  240. package/dist/mutex/NullMutex.js +18 -0
  241. package/dist/mutex/NullMutex.js.map +1 -0
  242. package/dist/mutex/index.d.ts +5 -0
  243. package/dist/mutex/index.d.ts.map +1 -0
  244. package/dist/mutex/index.js +4 -0
  245. package/dist/mutex/index.js.map +1 -0
  246. package/dist/observer/CallbackObserver.d.ts +8 -0
  247. package/dist/observer/CallbackObserver.d.ts.map +1 -0
  248. package/dist/observer/CallbackObserver.js +14 -0
  249. package/dist/observer/CallbackObserver.js.map +1 -0
  250. package/dist/observer/OnEnterObserver.d.ts +8 -0
  251. package/dist/observer/OnEnterObserver.d.ts.map +1 -0
  252. package/dist/observer/OnEnterObserver.js +28 -0
  253. package/dist/observer/OnEnterObserver.js.map +1 -0
  254. package/dist/observer/StatefulStatusChanger.d.ts +5 -0
  255. package/dist/observer/StatefulStatusChanger.d.ts.map +1 -0
  256. package/dist/observer/StatefulStatusChanger.js +24 -0
  257. package/dist/observer/StatefulStatusChanger.js.map +1 -0
  258. package/dist/observer/TransitionLogger.d.ts +9 -0
  259. package/dist/observer/TransitionLogger.d.ts.map +1 -0
  260. package/dist/observer/TransitionLogger.js +62 -0
  261. package/dist/observer/TransitionLogger.js.map +1 -0
  262. package/dist/observer/index.d.ts +5 -0
  263. package/dist/observer/index.d.ts.map +1 -0
  264. package/dist/observer/index.js +5 -0
  265. package/dist/observer/index.js.map +1 -0
  266. package/dist/selector/OneOrNoneActiveTransition.d.ts +6 -0
  267. package/dist/selector/OneOrNoneActiveTransition.d.ts.map +1 -0
  268. package/dist/selector/OneOrNoneActiveTransition.js +14 -0
  269. package/dist/selector/OneOrNoneActiveTransition.js.map +1 -0
  270. package/dist/selector/ScoreTransition.d.ts +9 -0
  271. package/dist/selector/ScoreTransition.d.ts.map +1 -0
  272. package/dist/selector/ScoreTransition.js +33 -0
  273. package/dist/selector/ScoreTransition.js.map +1 -0
  274. package/dist/selector/WeightTransition.d.ts +9 -0
  275. package/dist/selector/WeightTransition.d.ts.map +1 -0
  276. package/dist/selector/WeightTransition.js +26 -0
  277. package/dist/selector/WeightTransition.js.map +1 -0
  278. package/dist/selector/index.d.ts +4 -0
  279. package/dist/selector/index.d.ts.map +1 -0
  280. package/dist/selector/index.js +4 -0
  281. package/dist/selector/index.js.map +1 -0
  282. package/dist/util/SetupHelper.d.ts +17 -0
  283. package/dist/util/SetupHelper.d.ts.map +1 -0
  284. package/dist/util/SetupHelper.js +48 -0
  285. package/dist/util/SetupHelper.js.map +1 -0
  286. package/dist/util/StateCollectionMerger.d.ts +23 -0
  287. package/dist/util/StateCollectionMerger.d.ts.map +1 -0
  288. package/dist/util/StateCollectionMerger.js +83 -0
  289. package/dist/util/StateCollectionMerger.js.map +1 -0
  290. package/dist/util/index.d.ts +3 -0
  291. package/dist/util/index.d.ts.map +1 -0
  292. package/dist/util/index.js +3 -0
  293. package/dist/util/index.js.map +1 -0
  294. package/package.json +52 -0
@@ -0,0 +1,3 @@
1
+ export { GraphBuilder } from "./GraphBuilder.js";
2
+ export type { Graph, GraphNode, GraphEdge, DotOptions, MermaidOptions, } from "./GraphBuilder.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACV,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { GraphBuilder } from "./GraphBuilder.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,22 @@
1
+ export type { MaybePromise } from "./MaybePromise.js";
2
+ export { Event } from "./Event.js";
3
+ export { State } from "./State.js";
4
+ export { Transition } from "./Transition.js";
5
+ export { StateCollection } from "./StateCollection.js";
6
+ export { Process } from "./Process.js";
7
+ export { Statemachine } from "./Statemachine.js";
8
+ export { Dispatcher } from "./Dispatcher.js";
9
+ export type { Named, Metadata, Weighted, Observer, ObservableSubject, ConditionInterface, EventInterface, TransitionInterface, StateInterface, StateCollectionInterface, ProcessInterface, StatemachineInterface, MutexInterface, MutexFactoryInterface, LockAdapterInterface, TransitionSelectorInterface, ProcessDetectorInterface, StateNameDetectorInterface, FactoryInterface, StatefulInterface, LastStateHasChangedDateInterface, DispatcherInterface, CallbackInterface, LoggerInterface, } from "./interfaces/index.js";
10
+ export { Tautology, Contradiction, CallbackCondition, Timeout, AndComposite, OrComposite, Not, } from "./condition/index.js";
11
+ export type { ConditionCallbackFn } from "./condition/index.js";
12
+ export { CallbackObserver, StatefulStatusChanger, OnEnterObserver, TransitionLogger, } from "./observer/index.js";
13
+ export { ActiveTransitionFilter, FilterStateByEvent, FilterStateByTransition, FilterStateByFinalState, FilterTransitionByEvent, } from "./filter/index.js";
14
+ export { OneOrNoneActiveTransition, ScoreTransition, WeightTransition, } from "./selector/index.js";
15
+ export { NullMutex, LockAdapterMutex, MutexFactory } from "./mutex/index.js";
16
+ export type { StringConverter } from "./mutex/index.js";
17
+ export { Factory, SingleProcessDetector, AbstractNamedProcessDetector, StatefulStateNameDetector, } from "./factory/index.js";
18
+ export { SetupHelper, StateCollectionMerger } from "./util/index.js";
19
+ export { GraphBuilder } from "./graph/index.js";
20
+ export type { Graph, GraphNode, GraphEdge, DotOptions, MermaidOptions, } from "./graph/index.js";
21
+ export { WrongEventForStateError, LockCanNotBeAcquiredError, DuplicateStateError, } from "./error/index.js";
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,YAAY,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EACjB,gCAAgC,EAChC,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,GAAG,GACJ,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7E,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGrE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EACV,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ // Core classes
2
+ export { Event } from "./Event.js";
3
+ export { State } from "./State.js";
4
+ export { Transition } from "./Transition.js";
5
+ export { StateCollection } from "./StateCollection.js";
6
+ export { Process } from "./Process.js";
7
+ export { Statemachine } from "./Statemachine.js";
8
+ export { Dispatcher } from "./Dispatcher.js";
9
+ // Conditions
10
+ export { Tautology, Contradiction, CallbackCondition, Timeout, AndComposite, OrComposite, Not, } from "./condition/index.js";
11
+ // Observers
12
+ export { CallbackObserver, StatefulStatusChanger, OnEnterObserver, TransitionLogger, } from "./observer/index.js";
13
+ // Filters
14
+ export { ActiveTransitionFilter, FilterStateByEvent, FilterStateByTransition, FilterStateByFinalState, FilterTransitionByEvent, } from "./filter/index.js";
15
+ // Selectors
16
+ export { OneOrNoneActiveTransition, ScoreTransition, WeightTransition, } from "./selector/index.js";
17
+ // Mutex
18
+ export { NullMutex, LockAdapterMutex, MutexFactory } from "./mutex/index.js";
19
+ // Factory
20
+ export { Factory, SingleProcessDetector, AbstractNamedProcessDetector, StatefulStateNameDetector, } from "./factory/index.js";
21
+ // Utils
22
+ export { SetupHelper, StateCollectionMerger } from "./util/index.js";
23
+ // Graph
24
+ export { GraphBuilder } from "./graph/index.js";
25
+ // Errors
26
+ export { WrongEventForStateError, LockCanNotBeAcquiredError, DuplicateStateError, } from "./error/index.js";
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,eAAe;AACf,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA8B7C,aAAa;AACb,OAAO,EACL,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,GAAG,GACJ,MAAM,sBAAsB,CAAC;AAG9B,YAAY;AACZ,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,UAAU;AACV,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAE3B,YAAY;AACZ,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,QAAQ;AACR,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAG7E,UAAU;AACV,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,QAAQ;AACR,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAErE,QAAQ;AACR,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAShD,SAAS;AACT,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { Named } from "./Named.js";
2
+ import type { MaybePromise } from "../MaybePromise.js";
3
+ export interface ConditionInterface extends Named {
4
+ checkCondition(subject: unknown, context: Map<string, unknown>): MaybePromise<boolean>;
5
+ }
6
+ //# sourceMappingURL=ConditionInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConditionInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/ConditionInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,kBAAmB,SAAQ,KAAK;IAC/C,cAAc,CACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,YAAY,CAAC,OAAO,CAAC,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ConditionInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConditionInterface.js","sourceRoot":"","sources":["../../src/interfaces/ConditionInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { EventInterface } from "./EventInterface.js";
2
+ import type { MaybePromise } from "../MaybePromise.js";
3
+ export interface CallbackInterface {
4
+ invoke(): MaybePromise<void>;
5
+ }
6
+ export interface DispatcherInterface extends CallbackInterface {
7
+ dispatch(event: EventInterface, args?: unknown[], onReadyCallback?: CallbackInterface): void;
8
+ isReady(): boolean;
9
+ invoke(): Promise<void>;
10
+ }
11
+ //# sourceMappingURL=DispatcherInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DispatcherInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/DispatcherInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,QAAQ,CACN,KAAK,EAAE,cAAc,EACrB,IAAI,CAAC,EAAE,OAAO,EAAE,EAChB,eAAe,CAAC,EAAE,iBAAiB,GAClC,IAAI,CAAC;IACR,OAAO,IAAI,OAAO,CAAC;IACnB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DispatcherInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DispatcherInterface.js","sourceRoot":"","sources":["../../src/interfaces/DispatcherInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { Named } from "./Named.js";
2
+ import type { Metadata } from "./Metadata.js";
3
+ import type { ObservableSubject } from "./Observer.js";
4
+ export interface EventInterface extends Named, Metadata, ObservableSubject {
5
+ getInvokeArgs(): unknown[];
6
+ invoke(...args: unknown[]): Promise<void>;
7
+ getMetadataValue(key: string): unknown;
8
+ setMetadataValue(key: string, value: unknown): void;
9
+ hasMetadataValue(key: string): boolean;
10
+ deleteMetadataValue(key: string): void;
11
+ }
12
+ //# sourceMappingURL=EventInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/EventInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,cAAe,SAAQ,KAAK,EAAE,QAAQ,EAAE,iBAAiB;IACxE,aAAa,IAAI,OAAO,EAAE,CAAC;IAC3B,MAAM,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACpD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=EventInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventInterface.js","sourceRoot":"","sources":["../../src/interfaces/EventInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import type { Observer } from "./Observer.js";
2
+ import type { StatemachineInterface } from "./StatemachineInterface.js";
3
+ import type { MutexFactoryInterface } from "./MutexFactoryInterface.js";
4
+ import type { TransitionSelectorInterface } from "./TransitionSelectorInterface.js";
5
+ export interface FactoryInterface {
6
+ createStatemachine(subject: unknown): Promise<StatemachineInterface>;
7
+ setMutexFactory(factory: MutexFactoryInterface | null): void;
8
+ setTransitionSelector(selector: TransitionSelectorInterface): void;
9
+ attachStatemachineObserver(observer: Observer): void;
10
+ detachStatemachineObserver(observer: Observer): void;
11
+ getStatemachineObservers(): Iterable<Observer>;
12
+ }
13
+ //# sourceMappingURL=FactoryInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FactoryInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/FactoryInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAEpF,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrE,eAAe,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7D,qBAAqB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACnE,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrD,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrD,wBAAwB,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAChD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=FactoryInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FactoryInterface.js","sourceRoot":"","sources":["../../src/interfaces/FactoryInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface LastStateHasChangedDateInterface {
2
+ getLastStateHasChangedDate(): Date;
3
+ }
4
+ //# sourceMappingURL=LastStateHasChangedDateInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LastStateHasChangedDateInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/LastStateHasChangedDateInterface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gCAAgC;IAC/C,0BAA0B,IAAI,IAAI,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LastStateHasChangedDateInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LastStateHasChangedDateInterface.js","sourceRoot":"","sources":["../../src/interfaces/LastStateHasChangedDateInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import type { MaybePromise } from "../MaybePromise.js";
2
+ export interface LockAdapterInterface {
3
+ acquireLock(resourceName: string): MaybePromise<boolean>;
4
+ releaseLock(resourceName: string): MaybePromise<boolean>;
5
+ isLocked(resourceName: string): MaybePromise<boolean>;
6
+ }
7
+ //# sourceMappingURL=LockAdapterInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LockAdapterInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/LockAdapterInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACzD,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACzD,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;CACvD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LockAdapterInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LockAdapterInterface.js","sourceRoot":"","sources":["../../src/interfaces/LockAdapterInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface LoggerInterface {
2
+ log(level: string, message: string, context?: Record<string, unknown>): void;
3
+ }
4
+ //# sourceMappingURL=LoggerInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoggerInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/LoggerInterface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC9E"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LoggerInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoggerInterface.js","sourceRoot":"","sources":["../../src/interfaces/LoggerInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface Metadata {
2
+ getMetadata(): Record<string, unknown>;
3
+ }
4
+ //# sourceMappingURL=Metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Metadata.d.ts","sourceRoot":"","sources":["../../src/interfaces/Metadata.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Metadata.js","sourceRoot":"","sources":["../../src/interfaces/Metadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { MutexInterface } from "./MutexInterface.js";
2
+ import type { MaybePromise } from "../MaybePromise.js";
3
+ export interface MutexFactoryInterface {
4
+ createMutex(subject: unknown): MaybePromise<MutexInterface>;
5
+ }
6
+ //# sourceMappingURL=MutexFactoryInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutexFactoryInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/MutexFactoryInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;CAC7D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MutexFactoryInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutexFactoryInterface.js","sourceRoot":"","sources":["../../src/interfaces/MutexFactoryInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { MaybePromise } from "../MaybePromise.js";
2
+ export interface MutexInterface {
3
+ acquireLock(): MaybePromise<boolean>;
4
+ releaseLock(): MaybePromise<boolean>;
5
+ isAcquired(): boolean;
6
+ isLocked(): MaybePromise<boolean>;
7
+ }
8
+ //# sourceMappingURL=MutexInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutexInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/MutexInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,WAAW,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,UAAU,IAAI,OAAO,CAAC;IACtB,QAAQ,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MutexInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutexInterface.js","sourceRoot":"","sources":["../../src/interfaces/MutexInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface Named {
2
+ getName(): string;
3
+ }
4
+ //# sourceMappingURL=Named.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Named.d.ts","sourceRoot":"","sources":["../../src/interfaces/Named.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,OAAO,IAAI,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Named.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Named.js","sourceRoot":"","sources":["../../src/interfaces/Named.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { MaybePromise } from "../MaybePromise.js";
2
+ export interface Observer {
3
+ update(subject: ObservableSubject): MaybePromise<void>;
4
+ }
5
+ export interface ObservableSubject {
6
+ attach(observer: Observer): void;
7
+ detach(observer: Observer): void;
8
+ notify(): Promise<void>;
9
+ getObservers(): Iterable<Observer>;
10
+ }
11
+ //# sourceMappingURL=Observer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Observer.d.ts","sourceRoot":"","sources":["../../src/interfaces/Observer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACjC,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACjC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,YAAY,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Observer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Observer.js","sourceRoot":"","sources":["../../src/interfaces/Observer.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ProcessInterface } from "./ProcessInterface.js";
2
+ export interface ProcessDetectorInterface {
3
+ detectProcess(subject: unknown): ProcessInterface;
4
+ }
5
+ //# sourceMappingURL=ProcessDetectorInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessDetectorInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/ProcessDetectorInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAAC;CACnD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ProcessDetectorInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessDetectorInterface.js","sourceRoot":"","sources":["../../src/interfaces/ProcessDetectorInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import type { Named } from "./Named.js";
2
+ import type { StateCollectionInterface } from "./StateCollectionInterface.js";
3
+ import type { StateInterface } from "./StateInterface.js";
4
+ export interface ProcessInterface extends Named, StateCollectionInterface {
5
+ getInitialState(): StateInterface;
6
+ }
7
+ //# sourceMappingURL=ProcessInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/ProcessInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,gBAAiB,SAAQ,KAAK,EAAE,wBAAwB;IACvE,eAAe,IAAI,cAAc,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ProcessInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessInterface.js","sourceRoot":"","sources":["../../src/interfaces/ProcessInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import type { StateInterface } from "./StateInterface.js";
2
+ export interface StateCollectionInterface {
3
+ getStates(): Iterable<StateInterface>;
4
+ getState(name: string): StateInterface;
5
+ hasState(name: string): boolean;
6
+ }
7
+ //# sourceMappingURL=StateCollectionInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateCollectionInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StateCollectionInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACvC,SAAS,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=StateCollectionInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateCollectionInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateCollectionInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import type { Named } from "./Named.js";
2
+ import type { Metadata } from "./Metadata.js";
3
+ import type { TransitionInterface } from "./TransitionInterface.js";
4
+ import type { EventInterface } from "./EventInterface.js";
5
+ export interface StateInterface extends Named, Metadata {
6
+ getTransitions(): Iterable<TransitionInterface>;
7
+ addTransition(transition: TransitionInterface): void;
8
+ getEventNames(): string[];
9
+ hasEvent(name: string): boolean;
10
+ getEvent(name: string): EventInterface;
11
+ getMetadataValue(key: string): unknown;
12
+ setMetadataValue(key: string, value: unknown): void;
13
+ hasMetadataValue(key: string): boolean;
14
+ deleteMetadataValue(key: string): void;
15
+ }
16
+ //# sourceMappingURL=StateInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StateInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,cAAe,SAAQ,KAAK,EAAE,QAAQ;IACrD,cAAc,IAAI,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAChD,aAAa,CAAC,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACrD,aAAa,IAAI,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC;IACvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACpD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=StateInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface StateNameDetectorInterface {
2
+ detectCurrentStateName(subject: unknown): string | null;
3
+ }
4
+ //# sourceMappingURL=StateNameDetectorInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateNameDetectorInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StateNameDetectorInterface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;CACzD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=StateNameDetectorInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateNameDetectorInterface.js","sourceRoot":"","sources":["../../src/interfaces/StateNameDetectorInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface StatefulInterface {
2
+ getCurrentStateName(): string;
3
+ setCurrentStateName(stateName: string): void;
4
+ }
5
+ //# sourceMappingURL=StatefulInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatefulInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StatefulInterface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,IAAI,MAAM,CAAC;IAC9B,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=StatefulInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatefulInterface.js","sourceRoot":"","sources":["../../src/interfaces/StatefulInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import type { ObservableSubject } from "./Observer.js";
2
+ import type { StateInterface } from "./StateInterface.js";
3
+ import type { ProcessInterface } from "./ProcessInterface.js";
4
+ import type { TransitionInterface } from "./TransitionInterface.js";
5
+ export interface StatemachineInterface extends ObservableSubject {
6
+ getCurrentState(): StateInterface;
7
+ getSubject(): unknown;
8
+ getProcess(): ProcessInterface;
9
+ triggerEvent(name: string, context?: Map<string, unknown>): Promise<void>;
10
+ checkTransitions(context?: Map<string, unknown>): Promise<void>;
11
+ getSelectedTransition(): TransitionInterface | null;
12
+ getLastState(): StateInterface | null;
13
+ getCurrentContext(): Map<string, unknown> | null;
14
+ acquireLock(): Promise<boolean>;
15
+ releaseLock(): Promise<void>;
16
+ isLockAcquired(): boolean;
17
+ isAutoreleaseLock(): boolean;
18
+ setAutoreleaseLock(autorelease: boolean): void;
19
+ }
20
+ //# sourceMappingURL=StatemachineInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatemachineInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/StatemachineInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,eAAe,IAAI,cAAc,CAAC;IAClC,UAAU,IAAI,OAAO,CAAC;IACtB,UAAU,IAAI,gBAAgB,CAAC;IAC/B,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,gBAAgB,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,qBAAqB,IAAI,mBAAmB,GAAG,IAAI,CAAC;IACpD,YAAY,IAAI,cAAc,GAAG,IAAI,CAAC;IACtC,iBAAiB,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,cAAc,IAAI,OAAO,CAAC;IAC1B,iBAAiB,IAAI,OAAO,CAAC;IAC7B,kBAAkB,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CAChD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=StatemachineInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatemachineInterface.js","sourceRoot":"","sources":["../../src/interfaces/StatemachineInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { Weighted } from "./Weighted.js";
2
+ import type { StateInterface } from "./StateInterface.js";
3
+ import type { EventInterface } from "./EventInterface.js";
4
+ import type { ConditionInterface } from "./ConditionInterface.js";
5
+ export interface TransitionInterface extends Weighted {
6
+ getTargetState(): StateInterface;
7
+ getEventName(): string | null;
8
+ getConditionName(): string | null;
9
+ getCondition(): ConditionInterface | null;
10
+ isActive(subject: unknown, context: Map<string, unknown>, event?: EventInterface): Promise<boolean>;
11
+ }
12
+ //# sourceMappingURL=TransitionInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransitionInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/TransitionInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;IACnD,cAAc,IAAI,cAAc,CAAC;IACjC,YAAY,IAAI,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,kBAAkB,GAAG,IAAI,CAAC;IAC1C,QAAQ,CACN,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,CAAC,EAAE,cAAc,GACrB,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TransitionInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransitionInterface.js","sourceRoot":"","sources":["../../src/interfaces/TransitionInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { TransitionInterface } from "./TransitionInterface.js";
2
+ export interface TransitionSelectorInterface {
3
+ selectTransition(transitions: Iterable<TransitionInterface>): TransitionInterface | null;
4
+ }
5
+ //# sourceMappingURL=TransitionSelectorInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransitionSelectorInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/TransitionSelectorInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,CACd,WAAW,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GACzC,mBAAmB,GAAG,IAAI,CAAC;CAC/B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TransitionSelectorInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransitionSelectorInterface.js","sourceRoot":"","sources":["../../src/interfaces/TransitionSelectorInterface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface Weighted {
2
+ getWeight(): number;
3
+ }
4
+ //# sourceMappingURL=Weighted.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Weighted.d.ts","sourceRoot":"","sources":["../../src/interfaces/Weighted.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,SAAS,IAAI,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Weighted.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Weighted.js","sourceRoot":"","sources":["../../src/interfaces/Weighted.ts"],"names":[],"mappings":""}