@kosdev-code/kos-ui-sdk 0.1.0-dev.5072 → 0.1.0-dev.5092
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.
- package/core/core/companion-instantiator.d.ts +71 -0
- package/core/core/companion-instantiator.d.ts.map +1 -0
- package/core/core/decorators/fsm-injection-utils.d.ts +16 -0
- package/core/core/decorators/fsm-injection-utils.d.ts.map +1 -0
- package/core/core/decorators/index.d.ts +2 -0
- package/core/core/decorators/index.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +19 -0
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +466 -0
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -0
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/propKeys.d.ts +4 -0
- package/core/core/decorators/propKeys.d.ts.map +1 -1
- package/core/core/kos-registration.d.ts.map +1 -1
- package/core/core/kos-singleton-registration.d.ts.map +1 -1
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +12 -0
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts +11 -1
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/model-instantiator.d.ts +19 -0
- package/core/core/model-instantiator.d.ts.map +1 -1
- package/core/core/types/registration.d.ts +7 -0
- package/core/core/types/registration.d.ts.map +1 -1
- package/index.cjs +74 -74
- package/index.cjs.map +1 -1
- package/index.js +3835 -3413
- package/index.js.map +1 -1
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/utils/client.d.ts +8 -8
- package/models/utils/service.d.ts +8 -8
- package/package.json +2 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { IKosRegistry } from './types';
|
|
2
|
+
import { KosModelCacheHandler } from './model-cache';
|
|
3
|
+
import { IKosModel } from './kosModel';
|
|
4
|
+
import { DependencyLifecycle } from '../types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Handles creation and lifecycle management of companion models.
|
|
8
|
+
* Companions are models that extend or enhance parent models and can be
|
|
9
|
+
* created at specific lifecycle phases based on decorator configuration.
|
|
10
|
+
*/
|
|
11
|
+
export declare class KosCompanionInstantiator {
|
|
12
|
+
private registry;
|
|
13
|
+
private cache;
|
|
14
|
+
private createModel;
|
|
15
|
+
constructor(registry: IKosRegistry, cache: KosModelCacheHandler, createModel: (typeId: string, id: string, options: Record<string, any>) => any);
|
|
16
|
+
/**
|
|
17
|
+
* Creates companion models for a parent model, optionally filtered by lifecycle phase.
|
|
18
|
+
* Called automatically during instantiation for companions without lifecycle specified.
|
|
19
|
+
* Can be called from lifecycle hooks to create lifecycle-deferred companions.
|
|
20
|
+
*
|
|
21
|
+
* @param model The parent model
|
|
22
|
+
* @param options Options to pass to companion constructors
|
|
23
|
+
* @param lifecycle Optional lifecycle filter - only create companions matching this phase
|
|
24
|
+
*/
|
|
25
|
+
createCompanionModels(model: IKosModel, options: Record<string, any>, lifecycle?: DependencyLifecycle): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get companion definitions for a parent model type
|
|
28
|
+
*/
|
|
29
|
+
private getCompanionDefinitions;
|
|
30
|
+
/**
|
|
31
|
+
* Resolve companion type from definition and extract lifecycle metadata
|
|
32
|
+
*/
|
|
33
|
+
private resolveCompanionType;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve factory companion by calling factory and extracting lifecycle
|
|
36
|
+
*/
|
|
37
|
+
private resolveFactoryCompanion;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve string companion using pre-extracted lifecycle from registration
|
|
40
|
+
*/
|
|
41
|
+
private resolveStringCompanion;
|
|
42
|
+
/**
|
|
43
|
+
* Extract lifecycle metadata from companion model decorator
|
|
44
|
+
*/
|
|
45
|
+
private extractLifecycleFromType;
|
|
46
|
+
/**
|
|
47
|
+
* Determine if companion should be created based on lifecycle filtering
|
|
48
|
+
*/
|
|
49
|
+
private shouldCreateCompanion;
|
|
50
|
+
/**
|
|
51
|
+
* Instantiate and attach companion to parent model
|
|
52
|
+
*/
|
|
53
|
+
private instantiateCompanion;
|
|
54
|
+
/**
|
|
55
|
+
* Generate unique companion ID
|
|
56
|
+
*/
|
|
57
|
+
private generateCompanionId;
|
|
58
|
+
/**
|
|
59
|
+
* Check if companion already exists in cache
|
|
60
|
+
*/
|
|
61
|
+
private companionAlreadyExists;
|
|
62
|
+
/**
|
|
63
|
+
* Create companion model instance with parent context
|
|
64
|
+
*/
|
|
65
|
+
private createCompanionInstance;
|
|
66
|
+
/**
|
|
67
|
+
* Attach companion to parent model
|
|
68
|
+
*/
|
|
69
|
+
private attachCompanionToParent;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=companion-instantiator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companion-instantiator.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/core/companion-instantiator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvE;;;;GAIG;AACH,qBAAa,wBAAwB;IAEjC,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,WAAW;gBAFX,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,oBAAoB,EAC3B,WAAW,EAAE,CACnB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACzB,GAAG;IAGV;;;;;;;;OAQG;IACH,qBAAqB,CACnB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,SAAS,CAAC,EAAE,mBAAmB;IAyBjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAI/B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAqB/B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAU9B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAWhC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAa7B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAsC5B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAc9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAe/B;;OAEG;IACH,OAAO,CAAC,uBAAuB;CAOhC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main coordinator for injecting FSM support into a model instance.
|
|
3
|
+
* Delegates to Zone 3 functions for actual implementation.
|
|
4
|
+
*
|
|
5
|
+
* @param modelInstance The model instance to inject FSM support into
|
|
6
|
+
*/
|
|
7
|
+
export declare function injectStateMachineSupport(modelInstance: any): void;
|
|
8
|
+
/**
|
|
9
|
+
* Initialize the state machine at a specific lifecycle phase.
|
|
10
|
+
* Called from KosModel lifecycle hooks.
|
|
11
|
+
*
|
|
12
|
+
* @param modelInstance The model instance
|
|
13
|
+
* @param lifecycle The current lifecycle phase
|
|
14
|
+
*/
|
|
15
|
+
export declare function initializeStateMachine(modelInstance: any, lifecycle: string): void;
|
|
16
|
+
//# sourceMappingURL=fsm-injection-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fsm-injection-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/fsm-injection-utils.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,GAAG,QAoB3D;AAmZD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,QA0B3E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './fsm-injection-utils';
|
|
1
2
|
export * from './kos-child';
|
|
2
3
|
export * from './kos-companion';
|
|
3
4
|
export * from './kos-container-aware';
|
|
@@ -12,6 +13,7 @@ export * from './kos-model-effect';
|
|
|
12
13
|
export * from './kos-parent';
|
|
13
14
|
export * from './kos-reference';
|
|
14
15
|
export * from './kos-service-request';
|
|
16
|
+
export * from './kos-state-machine';
|
|
15
17
|
export * from './kos-trouble-aware';
|
|
16
18
|
export * from './kosDependency';
|
|
17
19
|
export * from './kosModel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IKosDataModel } from '../kosModel';
|
|
2
|
+
import { DependencyLifecycle } from '../../types';
|
|
2
3
|
|
|
3
4
|
export interface KosCompanionOptions {
|
|
4
5
|
/**
|
|
@@ -11,6 +12,20 @@ export interface KosCompanionOptions {
|
|
|
11
12
|
excludeProperties?: string[];
|
|
12
13
|
/** Custom parent property name. Default: 'companionParent' */
|
|
13
14
|
parentProperty?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Lifecycle phase at which this companion should be created.
|
|
17
|
+
* Defaults to INIT (created immediately during parent instantiation).
|
|
18
|
+
* Use LOAD to create after parent's load() completes, READY for after ready(), etc.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* @kosCompanion({ lifecycle: DependencyLifecycle.LOAD })
|
|
23
|
+
* class CarbAgitatorModel implements IKosDataModel {
|
|
24
|
+
* // Created after assembly.load() completes
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
lifecycle?: DependencyLifecycle;
|
|
14
29
|
}
|
|
15
30
|
/**
|
|
16
31
|
* Base interface for all companion models.
|
|
@@ -119,6 +134,10 @@ export interface KosCompanionDecorator<TParent extends IKosDataModel = IKosDataM
|
|
|
119
134
|
* // Decorator mode with exclusions
|
|
120
135
|
* @kosCompanion({ mode: 'decorator', excludeProperties: ['internalState'] })
|
|
121
136
|
* class MyCompanion { }
|
|
137
|
+
*
|
|
138
|
+
* // Lifecycle-deferred companion creation
|
|
139
|
+
* @kosCompanion({ lifecycle: DependencyLifecycle.LOAD })
|
|
140
|
+
* class DataDrivenCompanion { }
|
|
122
141
|
* ```
|
|
123
142
|
*
|
|
124
143
|
* @category KOS Model Decorator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-companion.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-companion.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC;IACnC,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"kos-companion.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-companion.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC;IACnC,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAChC,OAAO,SAAS,aAAa,GAAG,aAAa;IAE7C;;;;;;OAMG;IACH,kBAAkB,IAAI,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,uBAAuB,CACtC,OAAO,SAAS,aAAa,GAAG,aAAa,CAC7C,SAAQ,iBAAiB,CAAC,OAAO,CAAC;CAAG;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,qBAAqB,CACpC,OAAO,SAAS,aAAa,GAAG,aAAa,CAC7C,SAAQ,iBAAiB,CAAC,OAAO,CAAC;CAGnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAqB1E"}
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import { DependencyLifecycle } from '../../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for a KOS state machine.
|
|
5
|
+
*
|
|
6
|
+
* @template TState Union type of valid state strings
|
|
7
|
+
* @template TEvent Union type of valid event strings
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const config: KosStateMachineConfig<'idle' | 'active', 'START' | 'STOP'> = {
|
|
12
|
+
* initial: 'idle',
|
|
13
|
+
* initializeAt: DependencyLifecycle.READY,
|
|
14
|
+
* states: {
|
|
15
|
+
* idle: { on: { START: 'active' } },
|
|
16
|
+
* active: { on: { STOP: 'idle' } }
|
|
17
|
+
* }
|
|
18
|
+
* };
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export interface KosStateMachineConfig<TState extends string, TEvent extends string> {
|
|
22
|
+
/**
|
|
23
|
+
* The initial state when the state machine is initialized.
|
|
24
|
+
* This state will be set when the FSM reaches its configured lifecycle phase.
|
|
25
|
+
*/
|
|
26
|
+
initial: TState;
|
|
27
|
+
/**
|
|
28
|
+
* The lifecycle phase at which the state machine should be initialized.
|
|
29
|
+
* Before this phase, currentState will be undefined and isFsmInitialized will be false.
|
|
30
|
+
*
|
|
31
|
+
* @default DependencyLifecycle.READY
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* // FSM initializes when model is ready (most common)
|
|
36
|
+
* initializeAt: DependencyLifecycle.READY
|
|
37
|
+
*
|
|
38
|
+
* // FSM initializes only when UI activates the model
|
|
39
|
+
* initializeAt: DependencyLifecycle.ACTIVATE
|
|
40
|
+
*
|
|
41
|
+
* // FSM initializes during model initialization (rare)
|
|
42
|
+
* initializeAt: DependencyLifecycle.INIT
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
initializeAt?: DependencyLifecycle;
|
|
46
|
+
/**
|
|
47
|
+
* State machine definition mapping states to their allowed transitions.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* states: {
|
|
52
|
+
* idle: { on: { PREPARE: 'preparing' } },
|
|
53
|
+
* preparing: { on: { READY: 'ready', ERROR: 'error' } },
|
|
54
|
+
* ready: { on: { POUR: 'pouring' } },
|
|
55
|
+
* pouring: { on: { COMPLETE: 'idle', ERROR: 'error' } },
|
|
56
|
+
* error: { on: { RESET: 'idle' } }
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
states: Record<TState, {
|
|
61
|
+
/**
|
|
62
|
+
* Mapping of events to target states.
|
|
63
|
+
* When an event occurs in this state, transition to the target state.
|
|
64
|
+
*/
|
|
65
|
+
on?: Partial<Record<TEvent, TState>>;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Options for configuring state machine behavior.
|
|
70
|
+
*/
|
|
71
|
+
export interface KosStateMachineOptions {
|
|
72
|
+
/**
|
|
73
|
+
* Property name for storing the current state.
|
|
74
|
+
*
|
|
75
|
+
* @default "currentState"
|
|
76
|
+
*/
|
|
77
|
+
stateProperty?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to track state history.
|
|
80
|
+
* When enabled, a stateHistory array is maintained with timestamps and events.
|
|
81
|
+
*
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
trackHistory?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether to throw errors on invalid transitions.
|
|
87
|
+
* When false, invalid transitions are logged as warnings instead.
|
|
88
|
+
*
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
throwOnInvalid?: boolean;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Interface for models using the @kosStateMachine decorator.
|
|
95
|
+
*
|
|
96
|
+
* **IMPORTANT**: Use TypeScript interface merging to add FSM properties to your model class.
|
|
97
|
+
* This provides full type safety and IntelliSense support for all injected FSM functionality.
|
|
98
|
+
*
|
|
99
|
+
* ## Interface Merging Pattern
|
|
100
|
+
*
|
|
101
|
+
* ```typescript
|
|
102
|
+
* // 1. Define state and event types
|
|
103
|
+
* type PourState = 'idle' | 'preparing' | 'ready' | 'pouring' | 'error';
|
|
104
|
+
* type PourEvent = 'PREPARE' | 'READY' | 'POUR' | 'COMPLETE' | 'ERROR';
|
|
105
|
+
*
|
|
106
|
+
* // 2. Declare interface merging BEFORE the class
|
|
107
|
+
* interface DispenserModelImpl extends KosStateMachineAware<PourState, PourEvent> {}
|
|
108
|
+
*
|
|
109
|
+
* // 3. Apply decorators and implement the class
|
|
110
|
+
* @kosModel({ modelTypeId: "dispenser-model" })
|
|
111
|
+
* @kosStateMachine<PourState, PourEvent>({
|
|
112
|
+
* initial: 'idle',
|
|
113
|
+
* initializeAt: DependencyLifecycle.READY,
|
|
114
|
+
* states: {
|
|
115
|
+
* idle: { on: { PREPARE: 'preparing' } },
|
|
116
|
+
* preparing: { on: { READY: 'ready', ERROR: 'error' } },
|
|
117
|
+
* ready: { on: { POUR: 'pouring' } },
|
|
118
|
+
* pouring: { on: { COMPLETE: 'idle', ERROR: 'error' } },
|
|
119
|
+
* error: {}
|
|
120
|
+
* }
|
|
121
|
+
* })
|
|
122
|
+
* export class DispenserModelImpl implements IKosDataModel {
|
|
123
|
+
* // All FSM properties are now available with full type safety
|
|
124
|
+
* }
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
* ## Lifecycle-Aware Initialization
|
|
128
|
+
*
|
|
129
|
+
* The FSM is uninitialized until the configured lifecycle phase:
|
|
130
|
+
* - Before initialization: `currentState === undefined`, `isFsmInitialized === false`
|
|
131
|
+
* - After initialization: `currentState === initial`, `isFsmInitialized === true`
|
|
132
|
+
*
|
|
133
|
+
* ```typescript
|
|
134
|
+
* @kosStateMachine({
|
|
135
|
+
* initial: 'idle',
|
|
136
|
+
* initializeAt: DependencyLifecycle.READY, // FSM starts when model is ready
|
|
137
|
+
* states: { ... }
|
|
138
|
+
* })
|
|
139
|
+
* class MyModel {
|
|
140
|
+
* async ready(): Promise<void> {
|
|
141
|
+
* // Before this completes: this.currentState === undefined
|
|
142
|
+
* // After this completes: this.currentState === 'idle'
|
|
143
|
+
* }
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* ## Injected Properties and Methods
|
|
148
|
+
*
|
|
149
|
+
* The decorator automatically injects the following members:
|
|
150
|
+
*
|
|
151
|
+
* - **`currentState`**: Current state (undefined until FSM initialized, observable)
|
|
152
|
+
* - **`isFsmInitialized`**: Boolean indicating if FSM has been initialized
|
|
153
|
+
* - **`isTransitioning`**: Boolean indicating if a transition is in progress
|
|
154
|
+
* - **`allowedTransitions`**: Computed array of valid events for current state
|
|
155
|
+
* - **`transition(event)`**: Method to trigger state transitions
|
|
156
|
+
* - **`canTransition(event)`**: Check if a transition is valid from current state
|
|
157
|
+
* - **`isInState(state)`**: Check if currently in a specific state
|
|
158
|
+
* - **`stateHistory`**: Array of historical states (if trackHistory enabled)
|
|
159
|
+
*
|
|
160
|
+
* All properties are reactive and will automatically update UI components when state changes.
|
|
161
|
+
*
|
|
162
|
+
* @template TState Union type of valid state strings
|
|
163
|
+
* @template TEvent Union type of valid event strings
|
|
164
|
+
*
|
|
165
|
+
* @see {@link kosStateMachine} - The decorator function
|
|
166
|
+
* @see {@link KosStateMachineConfig} - Configuration interface
|
|
167
|
+
* @see {@link KosStateMachineOptions} - Options interface
|
|
168
|
+
*/
|
|
169
|
+
export interface KosStateMachineAware<TState extends string, TEvent extends string> {
|
|
170
|
+
/**
|
|
171
|
+
* Current state of the state machine.
|
|
172
|
+
* Observable property that updates automatically via @kosModel.
|
|
173
|
+
* Always initialized to the initial state immediately.
|
|
174
|
+
*/
|
|
175
|
+
currentState: TState;
|
|
176
|
+
/**
|
|
177
|
+
* Indicates whether the state machine has been initialized.
|
|
178
|
+
* FSM initializes at the configured lifecycle phase (READY, ACTIVATE, etc.).
|
|
179
|
+
*
|
|
180
|
+
* - Before initialization: `false`, `currentState === undefined`
|
|
181
|
+
* - After initialization: `true`, `currentState === initial`
|
|
182
|
+
*/
|
|
183
|
+
readonly isFsmInitialized: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Indicates whether a state transition is currently in progress.
|
|
186
|
+
* Observable property that updates during transitions.
|
|
187
|
+
*/
|
|
188
|
+
isTransitioning: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Computed array of valid events that can be triggered from the current state.
|
|
191
|
+
* Updates automatically when state changes.
|
|
192
|
+
* Returns empty array if FSM is not initialized.
|
|
193
|
+
*/
|
|
194
|
+
readonly allowedTransitions: TEvent[];
|
|
195
|
+
/**
|
|
196
|
+
* Trigger a state transition by event.
|
|
197
|
+
*
|
|
198
|
+
* @param event The event to trigger
|
|
199
|
+
* @throws Error if FSM not initialized (unless `throwOnInvalid` is false)
|
|
200
|
+
* @throws Error if transition is invalid (unless `throwOnInvalid` is false)
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```typescript
|
|
204
|
+
* this.transition('START'); // idle -> active
|
|
205
|
+
* this.transition('STOP'); // active -> idle
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
transition(event: TEvent): void;
|
|
209
|
+
/**
|
|
210
|
+
* Check if a transition is valid from the current state.
|
|
211
|
+
* Returns false if FSM is not initialized.
|
|
212
|
+
*
|
|
213
|
+
* @param event The event to check
|
|
214
|
+
* @returns true if the transition is valid, false otherwise
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```typescript
|
|
218
|
+
* if (this.canTransition('START')) {
|
|
219
|
+
* this.transition('START');
|
|
220
|
+
* }
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
canTransition(event: TEvent): boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Check if the state machine is currently in a specific state.
|
|
226
|
+
* Returns false if FSM is not initialized.
|
|
227
|
+
*
|
|
228
|
+
* @param state The state to check
|
|
229
|
+
* @returns true if currently in the specified state, false otherwise
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```typescript
|
|
233
|
+
* if (this.isInState('idle')) {
|
|
234
|
+
* console.log('System is idle');
|
|
235
|
+
* }
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
isInState(state: TState): boolean;
|
|
239
|
+
/**
|
|
240
|
+
* History of state transitions (if trackHistory is enabled).
|
|
241
|
+
* Each entry contains the state, timestamp, and optional event that caused the transition.
|
|
242
|
+
*
|
|
243
|
+
* Only available when `trackHistory: true` is set in options.
|
|
244
|
+
*/
|
|
245
|
+
stateHistory?: Array<{
|
|
246
|
+
state: TState;
|
|
247
|
+
timestamp: Date;
|
|
248
|
+
event?: TEvent;
|
|
249
|
+
}>;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Class decorator that adds finite state machine capabilities to a KOS model.
|
|
253
|
+
*
|
|
254
|
+
* This decorator eliminates manual state management boilerplate by:
|
|
255
|
+
* - **Adding lifecycle-aware FSM initialization** at configured phase (READY, ACTIVATE, etc.)
|
|
256
|
+
* - **Managing state transitions** automatically with validation
|
|
257
|
+
* - **Providing observable state** that integrates with @kosModel reactive system
|
|
258
|
+
* - **Supporting entry/exit handlers** via @kosStateEntry and @kosStateExit decorators
|
|
259
|
+
* - **Enabling state guards** via @kosStateGuard decorator
|
|
260
|
+
*
|
|
261
|
+
* ## Two-Level State System
|
|
262
|
+
*
|
|
263
|
+
* **Framework Lifecycle (Universal, Not Customizable):**
|
|
264
|
+
* - CREATED → INIT → LOAD → READY → ACTIVATE → UNLOAD → DESTROY
|
|
265
|
+
* - Managed by KOS framework
|
|
266
|
+
* - Same for all models
|
|
267
|
+
*
|
|
268
|
+
* **Application FSM (This Decorator):**
|
|
269
|
+
* - Runs WITHIN an active model
|
|
270
|
+
* - Application-specific business logic
|
|
271
|
+
* - Different for each model type
|
|
272
|
+
* - Examples: Pour states, connection states, workflow states
|
|
273
|
+
*
|
|
274
|
+
* ## Lifecycle Integration
|
|
275
|
+
*
|
|
276
|
+
* The FSM initializes at the configured lifecycle phase:
|
|
277
|
+
*
|
|
278
|
+
* ```typescript
|
|
279
|
+
* @kosStateMachine({
|
|
280
|
+
* initial: 'idle',
|
|
281
|
+
* initializeAt: DependencyLifecycle.READY, // Default
|
|
282
|
+
* states: { ... }
|
|
283
|
+
* })
|
|
284
|
+
* ```
|
|
285
|
+
*
|
|
286
|
+
* - **INIT**: FSM needs to be active during model initialization (rare)
|
|
287
|
+
* - **READY**: FSM operational as soon as data loaded (most common)
|
|
288
|
+
* - **ACTIVATE**: FSM only relevant when UI is active (UI-bound models)
|
|
289
|
+
*
|
|
290
|
+
* ## TypeScript Usage
|
|
291
|
+
*
|
|
292
|
+
* **IMPORTANT**: Use TypeScript interface merging to get proper type information:
|
|
293
|
+
*
|
|
294
|
+
* ```typescript
|
|
295
|
+
* type MyState = 'idle' | 'active';
|
|
296
|
+
* type MyEvent = 'START' | 'STOP';
|
|
297
|
+
*
|
|
298
|
+
* interface MyModelImpl extends KosStateMachineAware<MyState, MyEvent> {}
|
|
299
|
+
*
|
|
300
|
+
* @kosStateMachine<MyState, MyEvent>({ ... })
|
|
301
|
+
* class MyModelImpl implements IKosDataModel {
|
|
302
|
+
* // All FSM properties are now available with full type safety
|
|
303
|
+
* }
|
|
304
|
+
* ```
|
|
305
|
+
*
|
|
306
|
+
* @param config State machine configuration
|
|
307
|
+
* @param options Optional configuration for FSM behavior
|
|
308
|
+
* @returns A class decorator that modifies the target class prototype
|
|
309
|
+
*
|
|
310
|
+
* @see {@link KosStateMachineAware} - Interface for TypeScript merging
|
|
311
|
+
* @see {@link KosStateMachineConfig} - Configuration interface
|
|
312
|
+
* @see {@link KosStateMachineOptions} - Options interface
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* ```typescript
|
|
316
|
+
* // Basic FSM with default READY initialization
|
|
317
|
+
* type PourState = 'idle' | 'pouring' | 'complete';
|
|
318
|
+
* type PourEvent = 'START' | 'FINISH';
|
|
319
|
+
*
|
|
320
|
+
* interface PourModelImpl extends KosStateMachineAware<PourState, PourEvent> {}
|
|
321
|
+
*
|
|
322
|
+
* @kosModel({ modelTypeId: "pour-model" })
|
|
323
|
+
* @kosStateMachine<PourState, PourEvent>({
|
|
324
|
+
* initial: 'idle',
|
|
325
|
+
* states: {
|
|
326
|
+
* idle: { on: { START: 'pouring' } },
|
|
327
|
+
* pouring: { on: { FINISH: 'complete' } },
|
|
328
|
+
* complete: {}
|
|
329
|
+
* }
|
|
330
|
+
* })
|
|
331
|
+
* class PourModelImpl implements IKosDataModel {
|
|
332
|
+
* async ready(): Promise<void> {
|
|
333
|
+
* // After this completes, FSM is initialized to 'idle'
|
|
334
|
+
* }
|
|
335
|
+
*
|
|
336
|
+
* startPour(): void {
|
|
337
|
+
* this.transition('START'); // idle -> pouring
|
|
338
|
+
* }
|
|
339
|
+
* }
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* @example
|
|
343
|
+
* ```typescript
|
|
344
|
+
* // UI-bound FSM with ACTIVATE initialization
|
|
345
|
+
* type WorkflowState = 'draft' | 'review' | 'approved';
|
|
346
|
+
* type WorkflowEvent = 'SUBMIT' | 'APPROVE' | 'REJECT';
|
|
347
|
+
*
|
|
348
|
+
* interface DocumentModelImpl extends KosStateMachineAware<WorkflowState, WorkflowEvent> {}
|
|
349
|
+
*
|
|
350
|
+
* @kosModel({ modelTypeId: "document-model" })
|
|
351
|
+
* @kosStateMachine<WorkflowState, WorkflowEvent>({
|
|
352
|
+
* initial: 'draft',
|
|
353
|
+
* initializeAt: DependencyLifecycle.ACTIVATE, // UI-bound
|
|
354
|
+
* states: {
|
|
355
|
+
* draft: { on: { SUBMIT: 'review' } },
|
|
356
|
+
* review: { on: { APPROVE: 'approved', REJECT: 'draft' } },
|
|
357
|
+
* approved: {}
|
|
358
|
+
* }
|
|
359
|
+
* })
|
|
360
|
+
* class DocumentModelImpl implements IKosDataModel {
|
|
361
|
+
* // FSM only initializes when UI activates this model
|
|
362
|
+
* }
|
|
363
|
+
* ```
|
|
364
|
+
*
|
|
365
|
+
* @example
|
|
366
|
+
* ```typescript
|
|
367
|
+
* // FSM with history tracking
|
|
368
|
+
* interface HistoryModelImpl extends KosStateMachineAware<'idle' | 'active', 'TOGGLE'> {}
|
|
369
|
+
*
|
|
370
|
+
* @kosStateMachine<'idle' | 'active', 'TOGGLE'>(
|
|
371
|
+
* {
|
|
372
|
+
* initial: 'idle',
|
|
373
|
+
* states: {
|
|
374
|
+
* idle: { on: { TOGGLE: 'active' } },
|
|
375
|
+
* active: { on: { TOGGLE: 'idle' } }
|
|
376
|
+
* }
|
|
377
|
+
* },
|
|
378
|
+
* {
|
|
379
|
+
* trackHistory: true,
|
|
380
|
+
* stateProperty: 'status'
|
|
381
|
+
* }
|
|
382
|
+
* )
|
|
383
|
+
* class HistoryModelImpl implements IKosDataModel {
|
|
384
|
+
* // Access via this.stateHistory
|
|
385
|
+
* }
|
|
386
|
+
* ```
|
|
387
|
+
*
|
|
388
|
+
* @category KOS Model Decorator
|
|
389
|
+
* @since 2.1.0
|
|
390
|
+
*/
|
|
391
|
+
export declare function kosStateMachine<TState extends string, TEvent extends string>(config: KosStateMachineConfig<TState, TEvent>, options?: KosStateMachineOptions): ClassDecorator;
|
|
392
|
+
/**
|
|
393
|
+
* Method decorator that marks a method as a state entry handler.
|
|
394
|
+
* The decorated method will be called when the state machine enters the specified state.
|
|
395
|
+
*
|
|
396
|
+
* @param state The state to handle entry for
|
|
397
|
+
* @returns A method decorator
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* ```typescript
|
|
401
|
+
* @kosStateEntry('pouring')
|
|
402
|
+
* handlePouringStart(): void {
|
|
403
|
+
* this.logger.info('Pour started');
|
|
404
|
+
* EventBus.publish(TOPIC_POUR_STARTED, { id: this.id });
|
|
405
|
+
* }
|
|
406
|
+
* ```
|
|
407
|
+
*/
|
|
408
|
+
export declare function kosStateEntry<TState extends string>(state: TState): MethodDecorator;
|
|
409
|
+
/**
|
|
410
|
+
* Method decorator that marks a method as a state exit handler.
|
|
411
|
+
* The decorated method will be called when the state machine exits the specified state.
|
|
412
|
+
*
|
|
413
|
+
* @param state The state to handle exit for
|
|
414
|
+
* @returns A method decorator
|
|
415
|
+
*
|
|
416
|
+
* @example
|
|
417
|
+
* ```typescript
|
|
418
|
+
* @kosStateExit('pouring')
|
|
419
|
+
* handlePouringEnd(): void {
|
|
420
|
+
* this.logger.info('Pour ended');
|
|
421
|
+
* EventBus.publish(TOPIC_POUR_ENDED, { id: this.id });
|
|
422
|
+
* }
|
|
423
|
+
* ```
|
|
424
|
+
*/
|
|
425
|
+
export declare function kosStateExit<TState extends string>(state: TState): MethodDecorator;
|
|
426
|
+
/**
|
|
427
|
+
* Options for @kosStateGuard decorator.
|
|
428
|
+
*/
|
|
429
|
+
export interface KosStateGuardOptions<TState extends string> {
|
|
430
|
+
/**
|
|
431
|
+
* Array of states in which the decorated method can be called.
|
|
432
|
+
* The method will throw an error (or log a warning) if called from any other state.
|
|
433
|
+
*/
|
|
434
|
+
allowedStates: TState[];
|
|
435
|
+
/**
|
|
436
|
+
* Whether to throw an error on invalid state.
|
|
437
|
+
* When false, logs a warning instead.
|
|
438
|
+
*
|
|
439
|
+
* @default true (uses the FSM's throwOnInvalid setting)
|
|
440
|
+
*/
|
|
441
|
+
throwOnInvalid?: boolean;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Method decorator that guards a method with state validation.
|
|
445
|
+
* The decorated method can only be called when the state machine is in one of the allowed states.
|
|
446
|
+
*
|
|
447
|
+
* **IMPORTANT**: This decorator gracefully handles uninitialized FSM:
|
|
448
|
+
* - If FSM is not yet initialized, the guard allows the method to proceed
|
|
449
|
+
* - Once FSM is initialized, the guard enforces state validation
|
|
450
|
+
*
|
|
451
|
+
* @param options Guard configuration
|
|
452
|
+
* @returns A method decorator
|
|
453
|
+
*
|
|
454
|
+
* @example
|
|
455
|
+
* ```typescript
|
|
456
|
+
* @kosStateGuard({ allowedStates: ['ready'] })
|
|
457
|
+
* async pourBeverage(bevId: string): Promise<void> {
|
|
458
|
+
* // This method can only be called when currentState === 'ready'
|
|
459
|
+
* this.transition('POUR');
|
|
460
|
+
* await this.deviceService.dispense(bevId);
|
|
461
|
+
* this.transition('COMPLETE');
|
|
462
|
+
* }
|
|
463
|
+
* ```
|
|
464
|
+
*/
|
|
465
|
+
export declare function kosStateGuard<TState extends string>(options: KosStateGuardOptions<TState>): MethodDecorator;
|
|
466
|
+
//# sourceMappingURL=kos-state-machine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kos-state-machine.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-state-machine.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBA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ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kosModel.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kosModel.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAilB5C,UAAU,cAAc;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,CAAC,SAAS,aAAa,EACvB,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,cAAc,CAqDjD"}
|
|
@@ -17,4 +17,8 @@ export declare const FutureAliases: unique symbol;
|
|
|
17
17
|
export declare const TroubleAwareSetup: unique symbol;
|
|
18
18
|
export declare const LoggerSetup: unique symbol;
|
|
19
19
|
export declare const ContainerAwareSetup: unique symbol;
|
|
20
|
+
export declare const StateMachineSetup: unique symbol;
|
|
21
|
+
export declare const StateEntryHandlers: unique symbol;
|
|
22
|
+
export declare const StateExitHandlers: unique symbol;
|
|
23
|
+
export declare const StateActionHandlers: unique symbol;
|
|
20
24
|
//# sourceMappingURL=propKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propKeys.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/propKeys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,SAAS,eAAsB,CAAC;AAC7C,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,eAAO,MAAM,YAAY,eAAyB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,4BAA4B,eAExC,CAAC;AACF,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,mBAAmB,eAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"propKeys.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/propKeys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,SAAS,eAAsB,CAAC;AAC7C,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,eAAO,MAAM,YAAY,eAAyB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,4BAA4B,eAExC,CAAC;AACF,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,eAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/core/kos-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAIjC,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"kos-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/core/kos-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAIjC,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAuBpE,KAAK,GAAG,CACN,CAAC,SAAS,aAAa,EACvB,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACpC,gCAAgC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAC3C,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACzC,CAAC;AACF,UAAU,iBAAiB,CACzB,CAAC,SAAS,aAAa,EACvB,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAEtC,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACxB;AACD,UAAU,iBAAiB,CACzB,CAAC,SAAS,aAAa,EACvB,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAEtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAA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