@animaapp/anima-sdk-react 0.3.7 → 0.3.11
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/package.json +1 -1
- package/dist/index.cjs +0 -22
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -64
- package/dist/index.js +0 -5431
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { AnimaSDKResult } from '@animaapp/anima-sdk';
|
|
2
|
-
import { CodegenError } from '@animaapp/anima-sdk';
|
|
3
|
-
import { GetCodeParams } from '@animaapp/anima-sdk';
|
|
4
|
-
import { GetFileResponse } from '@figma/rest-api-spec';
|
|
5
|
-
|
|
6
|
-
declare type LocalAssetsStorage = {
|
|
7
|
-
strategy: "local";
|
|
8
|
-
path: string;
|
|
9
|
-
} | {
|
|
10
|
-
strategy: "local";
|
|
11
|
-
filePath: string;
|
|
12
|
-
referencePath: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
declare type Status = "idle" | "pending" | "success" | "aborted" | "error";
|
|
16
|
-
|
|
17
|
-
declare type TaskStatus = "pending" | "running" | "finished";
|
|
18
|
-
|
|
19
|
-
export declare const useAnimaCodegen: ({ url, method, }: {
|
|
20
|
-
url: string;
|
|
21
|
-
method?: string;
|
|
22
|
-
}) => {
|
|
23
|
-
getCode: <T extends UseAnimaParams = UseAnimaParams>(params: T) => Promise<{
|
|
24
|
-
result: null;
|
|
25
|
-
error: CodegenError;
|
|
26
|
-
} | {
|
|
27
|
-
result: AnimaSDKResult | null;
|
|
28
|
-
error: null;
|
|
29
|
-
}>;
|
|
30
|
-
status: Status;
|
|
31
|
-
tasks: {
|
|
32
|
-
fetchDesign: {
|
|
33
|
-
status: TaskStatus;
|
|
34
|
-
};
|
|
35
|
-
codeGeneration: {
|
|
36
|
-
status: TaskStatus;
|
|
37
|
-
progress: number;
|
|
38
|
-
};
|
|
39
|
-
uploadAssets: {
|
|
40
|
-
status: TaskStatus;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
error: CodegenError | null;
|
|
44
|
-
result: AnimaSDKResult | null;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export declare type UseAnimaParams = Omit<GetCodeParams, "assetsStorage"> & {
|
|
48
|
-
assetsStorage?: GetCodeParams["assetsStorage"] | LocalAssetsStorage;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export declare const useFigmaFile: ({ fileKey, authToken, enabled, params, }: {
|
|
52
|
-
fileKey: string;
|
|
53
|
-
authToken: string;
|
|
54
|
-
enabled?: boolean;
|
|
55
|
-
params?: {
|
|
56
|
-
depth?: number;
|
|
57
|
-
};
|
|
58
|
-
}) => {
|
|
59
|
-
data: GetFileResponse | null;
|
|
60
|
-
isLoading: boolean;
|
|
61
|
-
error: any;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { }
|