@easyops-cn/a2ui-react 0.0.7 → 0.0.8

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.
@@ -40,4 +40,5 @@ export { A2UIRenderer } from './A2UIRenderer';
40
40
  export { ComponentRenderer } from './components/ComponentRenderer';
41
41
  export { useDispatchAction } from './hooks/useDispatchAction';
42
42
  export { useDataBinding, useFormBinding } from './hooks/useDataBinding';
43
- export { useA2UIMessageHandler } from './hooks/useA2UIMessageHandler';
43
+ export { useSurfaceContext } from './contexts/SurfaceContext';
44
+ export { useDataModelContext } from './contexts/DataModelContext';
package/dist/0.8/index.js CHANGED
@@ -1,15 +1,17 @@
1
- import { A2UIProvider as o } from "./contexts/A2UIProvider.js";
2
- import { A2UIRenderer as t } from "./A2UIRenderer.js";
1
+ import { A2UIProvider as r } from "./contexts/A2UIProvider.js";
2
+ import { A2UIRenderer as n } from "./A2UIRenderer.js";
3
3
  import { ComponentRenderer as p } from "./components/ComponentRenderer.js";
4
- import { useDispatchAction as s } from "./hooks/useDispatchAction.js";
5
- import { useDataBinding as f, useFormBinding as x } from "./hooks/useDataBinding.js";
6
- import { useA2UIMessageHandler as u } from "./hooks/useA2UIMessageHandler.js";
4
+ import { useDispatchAction as f } from "./hooks/useDispatchAction.js";
5
+ import { useDataBinding as a, useFormBinding as d } from "./hooks/useDataBinding.js";
6
+ import { useSurfaceContext as u } from "./contexts/SurfaceContext.js";
7
+ import { useDataModelContext as A } from "./contexts/DataModelContext.js";
7
8
  export {
8
- o as A2UIProvider,
9
- t as A2UIRenderer,
9
+ r as A2UIProvider,
10
+ n as A2UIRenderer,
10
11
  p as ComponentRenderer,
11
- u as useA2UIMessageHandler,
12
- f as useDataBinding,
13
- s as useDispatchAction,
14
- x as useFormBinding
12
+ a as useDataBinding,
13
+ A as useDataModelContext,
14
+ f as useDispatchAction,
15
+ d as useFormBinding,
16
+ u as useSurfaceContext
15
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyops-cn/a2ui-react",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "A2UI React Renderer",
5
5
  "homepage": "https://easyops-cn.github.io/a2ui-react/",
6
6
  "repository": {
@@ -1,21 +0,0 @@
1
- import { Surface } from '../types';
2
- /**
3
- * Gets a Surface by its ID.
4
- *
5
- * @param surfaceId - The surface ID to look up
6
- * @returns The Surface, or undefined if not found
7
- *
8
- * @example
9
- * ```tsx
10
- * function MySurface({ surfaceId }) {
11
- * const surface = useSurface(surfaceId);
12
- *
13
- * if (!surface) {
14
- * return <div>Surface not found</div>;
15
- * }
16
- *
17
- * return <ComponentRenderer surfaceId={surfaceId} componentId={surface.root} />;
18
- * }
19
- * ```
20
- */
21
- export declare function useSurface(surfaceId: string): Surface | undefined;