@animaapp/anima-sdk 0.4.4 → 0.4.6
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/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.js +811 -801
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,13 +15,13 @@ export declare class Anima {
|
|
|
15
15
|
protected hasAuth(): boolean;
|
|
16
16
|
set auth(auth: Auth);
|
|
17
17
|
protected get headers(): Record<string, string>;
|
|
18
|
-
generateCode(params: GetCodeParams, handler?: GetCodeHandler): Promise<AnimaSDKResult>;
|
|
18
|
+
generateCode(params: GetCodeParams, handler?: GetCodeHandler, signal?: AbortSignal): Promise<AnimaSDKResult>;
|
|
19
19
|
/**
|
|
20
20
|
* @experimental
|
|
21
21
|
* This API is experimental and may change or be removed in future releases.
|
|
22
22
|
* Link2Code (l2c) flow.
|
|
23
23
|
*/
|
|
24
|
-
generateLink2Code(params: GetLink2CodeParams, handler?: GetLink2CodeHandler): Promise<AnimaSDKResult>;
|
|
24
|
+
generateLink2Code(params: GetLink2CodeParams, handler?: GetLink2CodeHandler, signal?: AbortSignal): Promise<AnimaSDKResult>;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export declare type AnimaFiles = Record<string, {
|
|
@@ -237,9 +237,9 @@ export declare type GetCodeParams = {
|
|
|
237
237
|
|
|
238
238
|
export declare const getFigmaApiErrorType: (error: Error) => FigmaApiErrorType;
|
|
239
239
|
|
|
240
|
-
export declare const getFigmaFile: ({ fileKey, authToken, figmaRestApi, params, }: GetFilePagesParams) => Promise<GetFileResponse>;
|
|
240
|
+
export declare const getFigmaFile: ({ fileKey, authToken, figmaRestApi, params, signal, }: GetFilePagesParams) => Promise<GetFileResponse>;
|
|
241
241
|
|
|
242
|
-
export declare const getFileNodes: ({ fileKey, authToken, nodeIds, figmaRestApi, params, }: GetFileNodesParams) => Promise<{
|
|
242
|
+
export declare const getFileNodes: ({ fileKey, authToken, nodeIds, figmaRestApi, params, signal, }: GetFileNodesParams) => Promise<{
|
|
243
243
|
[key: string]: {
|
|
244
244
|
document: Node_2;
|
|
245
245
|
components: {
|
|
@@ -261,6 +261,7 @@ export declare type GetFileNodesParams = {
|
|
|
261
261
|
nodeIds: string[];
|
|
262
262
|
figmaRestApi?: FigmaRestApi;
|
|
263
263
|
params?: Record<string, string | number>;
|
|
264
|
+
signal?: AbortSignal;
|
|
264
265
|
};
|
|
265
266
|
|
|
266
267
|
export declare type GetFilePagesParams = {
|
|
@@ -268,6 +269,7 @@ export declare type GetFilePagesParams = {
|
|
|
268
269
|
authToken?: string;
|
|
269
270
|
figmaRestApi?: FigmaRestApi;
|
|
270
271
|
params?: Record<string, string | number | undefined>;
|
|
272
|
+
signal?: AbortSignal;
|
|
271
273
|
};
|
|
272
274
|
|
|
273
275
|
export declare type GetFilePagesResult = FigmaPage[] | undefined;
|
|
@@ -361,6 +363,7 @@ export declare type L2CParamsReactConvention = {
|
|
|
361
363
|
framework: 'react';
|
|
362
364
|
language: L2CParamsLanguage;
|
|
363
365
|
styling: L2CParamsStyling;
|
|
366
|
+
enableGeneratePackageLock?: boolean;
|
|
364
367
|
};
|
|
365
368
|
|
|
366
369
|
export declare type L2CParamsStyling = 'tailwind' | 'inline-styles';
|