@common-stack/client-react 7.2.1-alpha.71 → 7.2.1-alpha.81

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.
@@ -1,8 +1,27 @@
1
1
  import { IReactFeature } from '../interfaces';
2
2
  import { BaseFeature } from './base-connector';
3
+ import { IModuleStateMachine } from '@common-stack/client-core';
3
4
  export declare class Feature extends BaseFeature implements IReactFeature {
4
5
  protected renderRoutes: any;
5
6
  protected renderRoutes2: any;
6
7
  protected getSortedRoutes: (path: string, routeData: import("packages/common-core/lib/component/interfaces/routeJson").IComputedRoutesArray, authWrapper?: (ele: React.ReactElement, props: Record<string, any>) => void) => any;
7
8
  protected getSortedRoutes2: (path: string, routeData: import("packages/common-core/lib/component/interfaces/routeJson").IComputedRoutesArray, authWrapper?: (ele: React.ReactElement, props: Record<string, any>) => void) => any;
9
+ /**
10
+ * Register an XState machine for this feature
11
+ * All registered machines are managed centrally via @common-stack/client-core
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const feature = new Feature([...routes]);
16
+ * feature.registerXState({
17
+ * key: 'chat-completion',
18
+ * name: 'Chat Completion',
19
+ * machine: completionMachine,
20
+ * inputs: [{ key: 'message', description: 'User message' }],
21
+ * outputs: [{ key: 'response', description: 'AI response' }],
22
+ * priority: 10
23
+ * });
24
+ * ```
25
+ */
26
+ registerXState(config: IModuleStateMachine): void;
8
27
  }
@@ -1,6 +1,26 @@
1
- import {BaseFeature}from'./base-connector.js';import {getSortedRoutes}from'../route/get-routes.js';class Feature extends BaseFeature {
1
+ import {BaseFeature}from'./base-connector.js';import {getSortedRoutes}from'../route/get-routes.js';import {stateMachineRegistry}from'@common-stack/client-core';class Feature extends BaseFeature {
2
2
  renderRoutes = null;
3
3
  renderRoutes2 = null;
4
4
  getSortedRoutes = getSortedRoutes;
5
5
  getSortedRoutes2 = getSortedRoutes;
6
+ /**
7
+ * Register an XState machine for this feature
8
+ * All registered machines are managed centrally via @common-stack/client-core
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const feature = new Feature([...routes]);
13
+ * feature.registerXState({
14
+ * key: 'chat-completion',
15
+ * name: 'Chat Completion',
16
+ * machine: completionMachine,
17
+ * inputs: [{ key: 'message', description: 'User message' }],
18
+ * outputs: [{ key: 'response', description: 'AI response' }],
19
+ * priority: 10
20
+ * });
21
+ * ```
22
+ */
23
+ registerXState(config) {
24
+ stateMachineRegistry.register(config);
25
+ }
6
26
  }export{Feature};//# sourceMappingURL=connector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connector.js","sources":["../../src/connector/connector.tsx"],"sourcesContent":[null],"names":[],"mappings":"mGAIM,MAAO,OAAQ,SAAQ,WAAW,CAAA;IAC1B,YAAY,GAAG,IAAI,CAAC;IACpB,aAAa,GAAG,IAAI,CAAC;IACrB,eAAe,GAAG,eAAe,CAAC;IAClC,gBAAgB,GAAG,eAAe,CAAC;AAChD"}
1
+ {"version":3,"file":"connector.js","sources":["../../src/connector/connector.tsx"],"sourcesContent":[null],"names":[],"mappings":"gKAKM,MAAO,OAAQ,SAAQ,WAAW,CAAA;IAC1B,YAAY,GAAG,IAAI,CAAC;IACpB,aAAa,GAAG,IAAI,CAAC;IACrB,eAAe,GAAG,eAAe,CAAC;IAClC,gBAAgB,GAAG,eAAe,CAAC;AAE7C;;;;;;;;;;;;;;;;AAgBG;AACI,IAAA,cAAc,CAAC,MAA2B,EAAA;AAC7C,QAAA,oBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KACzC;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/client-react",
3
- "version": "7.2.1-alpha.71",
3
+ "version": "7.2.1-alpha.81",
4
4
  "description": "Client Module for react app",
5
5
  "homepage": "https://github.com/cdmbase/fullstack-pro#readme",
6
6
  "bugs": {
@@ -31,8 +31,8 @@
31
31
  "watch": "npm run build:lib:watch"
32
32
  },
33
33
  "dependencies": {
34
- "@common-stack/client-core": "7.2.1-alpha.71",
35
- "@common-stack/core": "7.2.1-alpha.71",
34
+ "@common-stack/client-core": "7.2.1-alpha.81",
35
+ "@common-stack/core": "7.2.1-alpha.81",
36
36
  "@wordpress/hooks": "^3.53.0",
37
37
  "browser-bunyan": "^1.6.3",
38
38
  "history-with-query": "^4.10.4",
@@ -57,7 +57,7 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "a7cb492c3f7fcb90aa23986128250e3b160c0286",
60
+ "gitHead": "57b5d3790618c54039ba0c685cf091b2d414316f",
61
61
  "typescript": {
62
62
  "definition": "lib/index.d.ts"
63
63
  }