@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.
- package/dist/0.8/index.d.ts +2 -1
- package/dist/0.8/index.js +13 -11
- package/package.json +1 -1
- package/dist/0.8/hooks/useSurface.d.ts +0 -21
package/dist/0.8/index.d.ts
CHANGED
|
@@ -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 {
|
|
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
|
|
2
|
-
import { A2UIRenderer as
|
|
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
|
|
5
|
-
import { useDataBinding as
|
|
6
|
-
import {
|
|
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
|
-
|
|
9
|
-
|
|
9
|
+
r as A2UIProvider,
|
|
10
|
+
n as A2UIRenderer,
|
|
10
11
|
p as ComponentRenderer,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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,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;
|