@pulse-editor/react-api 0.1.1-beta.76 → 0.1.1-beta.77
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.
|
@@ -16,8 +16,8 @@ import { DependencyList } from "react";
|
|
|
16
16
|
*/
|
|
17
17
|
export default function useActionEffect(params: {
|
|
18
18
|
actionName: string;
|
|
19
|
-
beforeAction?: (args: any) => Promise<
|
|
20
|
-
afterAction?: (args: any, result: any) => Promise<
|
|
19
|
+
beforeAction?: (args: any) => Promise<any>;
|
|
20
|
+
afterAction?: (args: any, result: any) => Promise<any>;
|
|
21
21
|
}, deps: DependencyList, isExtReady?: boolean): {
|
|
22
22
|
isReady: boolean;
|
|
23
23
|
runAppAction: ((args: any) => Promise<any>) | undefined;
|
package/dist/main.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import useAgentTools from "./hooks/agent/use-agent-tools";
|
|
|
2
2
|
import useAgents from "./hooks/agent/use-agents";
|
|
3
3
|
import useLoading from "./hooks/editor/use-loading";
|
|
4
4
|
import useNotification from "./hooks/editor/use-notification";
|
|
5
|
-
import useActionEffect from "./hooks/editor/use-
|
|
5
|
+
import useActionEffect from "./hooks/editor/use-action-effect";
|
|
6
6
|
import useTheme from "./hooks/editor/use-theme";
|
|
7
7
|
import useFile from "./hooks/workspace/use-file";
|
|
8
8
|
import useImageGen from "./hooks/ai-modality/use-image-gen";
|
|
@@ -24,4 +24,4 @@ import useTerminal from "./hooks/workspace/use-terminal";
|
|
|
24
24
|
import useWorkspaceInfo from "./hooks/workspace/use-workspace-info";
|
|
25
25
|
import ReceiveFileProvider from "./providers/receive-file-provider";
|
|
26
26
|
import SnapshotProvider from "./providers/snapshot-provider";
|
|
27
|
-
export { ReceiveFileProvider, SnapshotProvider, useAgents, useAgentTools, useArtifact, useEditorEnv, useFile, useFileSystem, useImageGen, useLLM, useLoading, useNotification, useOCR, useOpenApp, useOpenLink, useOwnedAppView, useReceiveFile, useActionEffect
|
|
27
|
+
export { ReceiveFileProvider, SnapshotProvider, useAgents, useAgentTools, useArtifact, useEditorEnv, useFile, useFileSystem, useImageGen, useLLM, useLoading, useNotification, useOCR, useOpenApp, useOpenLink, useOwnedAppView, useReceiveFile, useActionEffect, useSnapshotState, useSTT, useTerminal, useTheme, useTranslations, useTTS, useVideoGen, useWorkspaceInfo, };
|
package/dist/main.js
CHANGED
|
@@ -5720,11 +5720,11 @@ function useActionEffect(params, deps, isExtReady = true) {
|
|
|
5720
5720
|
throw new Error("Action handler is not set");
|
|
5721
5721
|
}
|
|
5722
5722
|
if (beforeAction) {
|
|
5723
|
-
await beforeAction(args);
|
|
5723
|
+
args = await beforeAction(args);
|
|
5724
5724
|
}
|
|
5725
|
-
|
|
5725
|
+
let res = await handler(args);
|
|
5726
5726
|
if (afterAction) {
|
|
5727
|
-
await afterAction(args, res);
|
|
5727
|
+
res = await afterAction(args, res);
|
|
5728
5728
|
}
|
|
5729
5729
|
return res;
|
|
5730
5730
|
}
|
|
@@ -6501,5 +6501,5 @@ function useWorkspaceInfo() {
|
|
|
6501
6501
|
};
|
|
6502
6502
|
}
|
|
6503
6503
|
|
|
6504
|
-
export { ReceiveFileProvider, SnapshotProvider, useAgentTools, useAgents, useArtifact, useEditorEnv, useFile, useFileSystem, useImageGen, useLLM, useLoading, useNotification, useOCR, useOpenApp, useOpenLink, useOwnedAppView, useReceiveFile,
|
|
6504
|
+
export { ReceiveFileProvider, SnapshotProvider, useActionEffect, useAgentTools, useAgents, useArtifact, useEditorEnv, useFile, useFileSystem, useImageGen, useLLM, useLoading, useNotification, useOCR, useOpenApp, useOpenLink, useOwnedAppView, useReceiveFile, useSTT, useSnapShotState as useSnapshotState, useTTS, useTerminal, useTheme, useTranslations, useVideoGen, useWorkspaceInfo };
|
|
6505
6505
|
//# sourceMappingURL=main.js.map
|